@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    body {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.88)),
            url("../img/backgrounds/home-hero-mobile.webp");
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
        background-attachment: scroll;
    }

    body::before {
        display: none;
    }

    main {
        padding-top: 56px;
    }

    /* Header mobile */
    .site-header {
        height: 56px;
        padding: 0 16px;
        display: flex;
        justify-content: space-between;
        background: rgba(0, 0, 0, 0.30);
    }

    .site-logo img {
        height: 26px;
    }

    .site-nav,
    .site-actions {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        border: 1px solid var(--color-border-strong);
        border-radius: var(--radius-sm);
        background: rgba(0, 0, 0, 0.4);
        cursor: pointer;
        z-index: 10001;
    }

    .mobile-menu-toggle span {
        width: 18px;
        height: 1.5px;
        margin: 0 auto;
        border-radius: var(--radius-pill);
        background: var(--color-text);
        transition: 0.3s ease;
    }

    .mobile-menu-toggle.is-open span:nth-child(1) {
        transform: translateY(6.5px) rotate(45deg);
    }

    .mobile-menu-toggle.is-open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.is-open span:nth-child(3) {
        transform: translateY(-6.5px) rotate(-45deg);
    }

    .mobile-menu {
        display: flex;
        position: fixed;
        top: 66px;
        left: 16px;
        right: 16px;
        z-index: 10000;
        flex-direction: column;
        gap: 4px;
        padding: 16px;
        background: var(--color-surface-solid);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lift);
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: var(--transition-normal);
    }

    .mobile-menu.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .mobile-menu a {
        color: var(--color-text);
        font-weight: 500;
        font-size: 15px;
        padding: 12px 8px;
        border-radius: var(--radius-sm);
    }

    .mobile-menu a:active {
        background: rgba(255, 255, 255, 0.06);
    }

    .mobile-menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 46px;
        margin-top: 6px;
        border-radius: var(--radius-pill);
        background: var(--color-text) !important;
        color: #050505 !important;
    }

    /* Accueil mobile */
    .home-hero {
        min-height: auto;
        display: block;
        padding: 28px 20px 30px;
    }

    .home-hero-content {
        max-width: 100%;
        padding: 0;
    }

    .hero-badge {
        font-size: 10px;
        padding: 7px 12px;
        margin-bottom: 18px;
    }

    .home-hero h1 {
        font-size: 38px;
        line-height: 1.06;
        letter-spacing: -0.03em;
    }

    .home-hero p {
        max-width: 100%;
        font-size: 15px;
        line-height: 1.6;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 26px;
    }

    .hero-actions .btn {
        width: 100%;
        min-height: 50px;
    }

    .hero-trust {
        flex-direction: column;
        gap: 8px;
        font-size: 11px;
        margin-top: 22px;
    }

    .home-hero-card {
        width: 100%;
        max-width: none;
        margin: 32px 0 0;
        padding: 22px;
        justify-self: auto;
    }

    .home-features {
        width: calc(100% - 32px);
        margin: 24px auto;
        grid-template-columns: 1fr;
    }

    .feature {
        padding: 22px;
    }

    .home-stats {
        width: calc(100% - 32px);
        margin: 8px auto 60px;
        padding: 28px 0 0;
        grid-template-columns: repeat(2, 1fr);
        row-gap: 24px;
    }

    .stat {
        border-right: 0;
        padding: 0 0 0 20px;
    }

    /* Tarifs mobile */
    .pricing-section {
        width: calc(100% - 32px);
        margin: 30px auto 70px;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card {
        min-height: auto;
        padding: 28px 24px;
    }

    .pricing-card h3 {
        font-size: 22px;
    }

    .price {
        font-size: 38px;
    }

    .section-heading h2 {
        font-size: 30px;
    }

    /* Page login secours */
    .auth-page {
        padding: 76px 20px 30px;
    }

    .auth-card {
        padding: 28px 22px;
    }

    .auth-card h1 {
        font-size: 30px;
    }

    /* Footer mobile */
    .site-footer {
        width: 100%;
        margin: 0;
        padding: 26px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .footer-right {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .footer-right a {
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    /* Popups mobile */
    .login-modal {
        align-items: flex-start;
        padding: 12px;
        overflow-y: auto;
    }

    .login-modal-card {
        width: 100%;
        max-width: 100%;
        margin: 16px auto;
        padding: 26px 20px;
        border-radius: var(--radius-lg);
    }

    .login-modal-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .login-modal-card h2 {
        max-width: calc(100% - 42px);
        font-size: 26px;
        line-height: 1.1;
        letter-spacing: -0.02em;
    }

    .login-modal-card p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 22px;
    }

    .auth-form {
        gap: 14px;
    }

    .form-group input,
    .password-field input {
        height: 50px;
        font-size: 15px;
    }

    .auth-options {
        align-items: flex-start;
        gap: 12px;
        font-size: 13px;
    }

    .auth-options a {
        max-width: 150px;
        text-align: right;
    }

    .auth-submit {
        min-height: 54px;
    }

    .register-choice-card {
        width: 100%;
    }

    .account-choice-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .account-choice {
        min-height: auto;
        padding: 20px;
    }

    .account-choice-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 16px;
    }

    .account-choice-icon img {
        width: 22px;
        height: 22px;
    }

    .account-choice strong {
        font-size: 19px;
    }
}

@media (max-width: 420px) {
    .home-hero h1 {
        font-size: 34px;
    }

    .login-modal-card h2 {
        font-size: 24px;
    }

    .auth-options {
        font-size: 12px;
    }
}
