

        /* ===== MOBILE : pleine largeur & hauteur ===== */
@media (max-width: 640px) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        min-height: 100vh;
        min-height: 100dvh; /* pour les navigateurs modernes */
        background: var(--surface) !important; /* fond blanc pour la carte */
    }

    .auth-wrap {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 2rem 1.5rem !important;
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: center; /* centre le contenu verticalement */
    }

    /* Ajustement du pied de page pour rester en bas */
    .auth-footer {
        margin-top: auto !important;
        padding-bottom: 1rem;
    }
}

        *,
        *::before,
        *::after {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --blue: #3D5AFE;
            --blue-dark: #2847F0;
            --blue-alpha: rgba(61, 90, 254, 0.10);
            --blue-alpha2: rgba(61, 90, 254, 0.18);
            --ink-1: #0F1117;
            --ink-2: #4B5063;
            --ink-3: #9398AE;
            --bg: #F4F5F9;
            --surface: #FFFFFF;
            --border: #E4E6F0;
            --radius: 12px;
            --font-ui: 'Inter', system-ui, sans-serif;
            --font-hd: 'Sora', system-ui, sans-serif;
            --sh-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
            --sh-md: 0 6px 24px rgba(0, 0, 0, 0.08);
        }

        body {
            font-family: var(--font-ui);
            background: var(--bg);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem 1.5rem;
            -webkit-font-smoothing: antialiased;
        }

        .auth-wrap {
            width: 100%;
            max-width: 400px;
            background: var(--surface);
            border-radius: var(--radius);
            box-shadow: var(--sh-md);
            padding: 2rem 1.75rem;
            transition: box-shadow 0.2s ease;
        }

        .panel {
            width: 100%;
        }
        .panel.hidden {
            display: none;
        }

        .logo {
            font-family: var(--font-hd);
            font-size: 1.5rem;
            font-weight: 800;
            color: var(--blue);
            letter-spacing: -0.5px;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
                margin-bottom: 1.75rem;
        }
        .logo em {
            color: var(--ink-1);
            font-style: normal;
        }

        .headline {
            font-size: 1.5rem;
            font-weight: 700;
            letter-spacing: -0.03em;
            color: var(--ink-1);
            margin-bottom: 6px;
        }
        .subline {
            font-size: 0.9rem;
            color: var(--ink-3);
            margin-bottom: 1.75rem;
        }

        .socials {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 1.5rem;
        }
        .s-btn {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 12px 16px;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            background: var(--surface);
            text-decoration: none;
            color: var(--ink-1);
            font-size: 0.9rem;
            font-weight: 500;
            transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
            width: 100%;
            text-align: left;
        }
        .s-btn:hover {
            background: var(--bg);
            border-color: var(--blue);
            box-shadow: var(--sh-sm);
        }
        .s-icon {
            width: 22px;
            height: 22px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .s-label {
            flex: 1;
        }
        .s-arrow {
            font-size: 1.2rem;
            color: var(--ink-3);
            margin-left: auto;
            transition: transform 0.2s ease;
        }
        .s-btn:hover .s-arrow {
            transform: translateX(3px);
            color: var(--blue);
        }

        .divider {
            display: flex;
            align-items: center;
            gap: 14px;
            margin: 1.5rem 0;
        }
        .divider::before,
        .divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: var(--border);
        }
        .divider span {
            font-size: 0.7rem;
            font-weight: 600;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--ink-3);
        }

        .email-cta {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 100%;
            padding: 14px 16px;
            background: var(--blue);
            border: none;
            border-radius: var(--radius);
            font-size: 0.95rem;
            font-weight: 600;
            color: #fff;
            cursor: pointer;
            transition: background 0.15s, box-shadow 0.15s;
            box-shadow: 0 4px 12px var(--blue-alpha2);
        }
        .email-cta:hover {
            background: var(--blue-dark);
            box-shadow: 0 6px 20px var(--blue-alpha2);
            transform: translateY(-1px);
        }

        .register-row {
            text-align: center;
            margin-top: 1.25rem;
            font-size: 0.9rem;
            color: var(--ink-3);
        }
        .register-link {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--blue);
            text-decoration: underline;
            text-decoration-color: var(--blue-alpha);
            text-underline-offset: 3px;
            transition: text-decoration-color 0.15s;
        }
        .register-link:hover {
            text-decoration-color: var(--blue);
        }

        .terms-note {
            font-size: 0.75rem;
            color: var(--ink-3);
            text-align: center;
            margin-top: 1.75rem;
        }
        .terms-note a {
            color: var(--ink-2);
            text-decoration: none;
            text-underline-offset: 2px;
        }
        .terms-note a:hover {
            color: var(--blue);
        }

        .back-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: none;
            border: none;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 500;
            color: var(--ink-3);
            margin-bottom: 1.5rem;
            transition: color 0.15s;
        }
        .back-btn:hover {
            color: var(--ink-1);
        }

        .account-type-row {
            display: flex;
            gap: 10px;
            margin-bottom: 1.5rem;
        }
        .account-option {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            border: 1.5px solid var(--border);
            border-radius: 10px;
            cursor: pointer;
            background: var(--surface);
            transition: all 0.15s;
            user-select: none;
        }
        .account-option.selected {
            border-color: var(--blue);
            background: var(--blue);
            box-shadow: 0 2px 8px var(--blue-alpha2);
        }
        .account-option.selected .option-icon,
        .account-option.selected .option-label {
            color: white;
        }
        .account-option input[type="radio"] {
            display: none;
        }
        .option-icon {
            font-size: 1.1rem;
            color: var(--ink-2);
            flex-shrink: 0;
        }
        .option-label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--ink-2);
        }

        .field {
            margin-bottom: 1.25rem;
        }
        .field label {
            display: block;
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--ink-3);
            letter-spacing: 0.06em;
            text-transform: uppercase;
            margin-bottom: 6px;
        }
        .field-wrap {
            position: relative;
        }
        .field-input {
            width: 100%;
            height: 48px;
            padding: 0 48px 0 16px;
            border: 1.5px solid var(--border);
            border-radius: 10px;
            font-size: 0.9rem;
            color: var(--ink-1);
            font-weight: 500;
            background: var(--bg);
            transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
            outline: none;
        }
        .field-input:focus {
            border-color: var(--blue);
            box-shadow: 0 0 0 3px var(--blue-alpha);
            background: var(--surface);
        }
        .field-input::placeholder {
            color: #c8c8d8;
            font-weight: 400;
        }
        .field-ico {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--ink-3);
            font-size: 1.1rem;
            pointer-events: none;
        }
        .toggle-pw {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--ink-3);
            cursor: pointer;
            font-size: 1.1rem;
            transition: color 0.15s;
        }
        .toggle-pw:hover {
            color: var(--ink-1);
        }

        .email-feedback {
            font-size: 0.8rem;
            margin-top: 6px;
            min-height: 1.2rem;
        }
        .email-feedback.error {
            color: #b91c1c;
        }
        .email-feedback.success {
            color: #15803d;
        }
        .email-feedback.warning {
            color: #92400e;
        }
        .email-status-icon {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            pointer-events: none;
            font-size: 1.1rem;
        }

        .forgot-row {
            text-align: right;
            margin-bottom: 1.25rem;
            margin-top: -0.25rem;
        }
        .forgot-row a {
            font-size: 0.8rem;
            color: var(--ink-3);
            text-decoration: none;
            transition: color 0.15s;
        }
        .forgot-row a:hover {
            color: var(--blue);
        }

        .submit-btn {
            width: 100%;
            height: 48px;
            background: var(--blue);
            color: #fff;
            border: none;
            border-radius: 10px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.15s, box-shadow 0.15s;
            box-shadow: 0 4px 12px var(--blue-alpha2);
        }
        .submit-btn:hover:not(:disabled) {
            background: var(--blue-dark);
            box-shadow: 0 6px 20px var(--blue-alpha2);
            transform: translateY(-1px);
        }
        .submit-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            box-shadow: none;
        }

        .toggle-form {
            text-align: center;
            margin-top: 1.5rem;
            font-size: 0.9rem;
            color: var(--ink-3);
        }
        .toggle-form a {
            color: var(--blue);
            font-weight: 600;
            text-decoration: underline;
            text-decoration-color: var(--blue-alpha);
            cursor: pointer;
        }
        .toggle-form a:hover {
            text-decoration-color: var(--blue);
        }

        .alert {
            padding: 12px 16px;
            border-radius: 10px;
            font-size: 0.85rem;
            font-weight: 500;
            margin-bottom: 1.25rem;
            display: flex;
            align-items: center;
            gap: 10px;
            border: 1px solid;
        }
        .alert-error {
            background: #fef2f2;
            color: #b91c1c;
            border-color: #fecaca;
        }
        .alert-success {
            background: #f0fdf4;
            color: #15803d;
            border-color: #bbf7d0;
        }

        .popup-container {
            position: fixed;
            inset: 0;
            z-index: 2000;
            background: rgba(15, 17, 23, 0.4);
            backdrop-filter: blur(4px);
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s, visibility 0.2s;
        }
        .popup-container.show {
            opacity: 1;
            visibility: visible;
        }
        .popup-content {
            background: var(--surface);
            border-radius: 16px;
            max-width: 360px;
            width: 90%;
            overflow: hidden;
            transform: translateY(16px);
            transition: transform 0.25s ease;
            box-shadow: var(--sh-md);
        }
        .popup-container.show .popup-content {
            transform: translateY(0);
        }
        .popup-header {
            background: var(--blue);
            padding: 1.25rem;
            text-align: center;
        }
        .popup-icon {
            font-size: 2.2rem;
            color: white;
        }
        .popup-body {
            padding: 1.5rem;
            text-align: center;
        }
        .popup-title {
            font-weight: 600;
            font-size: 1.05rem;
            color: var(--ink-1);
            margin-bottom: 0.5rem;
        }
        .popup-message {
            color: var(--ink-3);
            font-size: 0.85rem;
            margin-bottom: 1.5rem;
        }
        .popup-button {
            background: var(--blue);
            color: white;
            border: none;
            padding: 0.6rem 1.75rem;
            border-radius: 8px;
            font-weight: 600;
            font-size: 0.85rem;
            cursor: pointer;
            transition: background 0.15s;
        }
        .popup-button:hover {
            background: var(--blue-dark);
        }

        .auth-footer {
            margin-top: 2.5rem;
            text-align: center;
            font-size: 0.75rem;
            color: var(--ink-3);
        }
        .auth-footer a {
            color: var(--ink-2);
            text-decoration: none;
            margin: 0 4px;
        }
        .auth-footer a:hover {
            color: var(--blue);
        }

        @media (max-width: 480px) {
            body {
                padding: 1rem;
                align-items: flex-start;
                padding-top: 2.5rem;
            }
            .auth-wrap {
                padding: 1.5rem;
            }
        }

        .honeypot-field {
            position: absolute !important;
            left: -9999px !important;
            top: -9999px !important;
            height: 0 !important;
            width: 0 !important;
            overflow: hidden !important;
            opacity: 0 !important;
            pointer-events: none !important;
        }
    
/* ═══ Indicateur Caps Lock (flèche ⇧ dans l'input, comme macOS/iOS) ═══ */
.caps-indicator {
    position: absolute;
    top: 50%;
    right: 46px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #D97706;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 2;
}
.caps-indicator.show { opacity: 1; }
/* ═══ FIX : cacher l'icône mail statique quand un statut email est affiché ═══ */
/* Empêche la superposition check/cross + icône mail (couche grise) */
.field-wrap:has(.email-status-icon:not(:empty)) .field-ico {
    opacity: 0;
    visibility: hidden;
}
.email-status-icon {
    z-index: 2;
    background: transparent;
}

/* ═══ Spinner email : force la rotation (Remix Icon ri-spin ne tourne pas toujours) ═══ */
.email-status-icon .ri-spin,
.email-status-icon .ri-loader-4-line {
    display: inline-block;
    animation: emailSpin 0.7s linear infinite !important;
    transform-origin: center center;
}
@keyframes emailSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH DESKTOP (≥1025px) — 2 colonnes : form gauche + image droite
   Mobile (< 1024px) : image cachée, comportement actuel conservé
   ═══════════════════════════════════════════════════════════════ */
.auth-side-image {
    display: none;
}

@media (min-width: 1025px) {
    /* Form à gauche au lieu de centré */
    body {
        justify-content: center !important;
        align-items: center !important;
        padding-left: 0 !important;
        padding-right: 60vw !important;
        background: #f9fafb !important;
    }

    .auth-wrap {
        position: relative;
        z-index: 2;
        margin: 0 !important;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.10) !important;
    }

    /* Image fixée à droite, plein écran vertical */
    .auth-side-image {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 60vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        z-index: 1;
    }
}


/* ═══════════════════════════════════════════════════════════════
   AUTH DESKTOP — Logo Lotooti blanc centré en haut de l'image
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
    .auth-side-logo {
        position: absolute;
        top: 50px;
        left: 50%;
        transform: translateX(-50%);
        font-family: var(--font-hd, 'Sora', system-ui, sans-serif);
        font-size: 2rem;
        font-weight: 800;
        color: #ffffff !important;
        letter-spacing: -0.5px;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        z-index: 10;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
        transition: opacity 0.2s ease;
    }

    .auth-side-logo em {
        font-style: normal;
        color: #ffffff !important;
    }

}

/* ═══════════════════════════════════════════════════════════════
   AUTH — Bienvenue + sous-titre (panel social uniquement)
   ═══════════════════════════════════════════════════════════════ */
.auth-welcome {
    text-align: center;
    margin-bottom: 1.75rem;
    width: 100%;
}

.auth-welcome-title {
    font-family: var(--font-hd, 'Sora', system-ui, sans-serif);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ink-1, #0F1117);
    letter-spacing: -0.5px;
    margin: 0 0 8px;
    line-height: 1.2;
}

.auth-welcome-sub {
    font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
    font-size: 0.9rem;
    color: var(--ink-2, #4B5063);
    margin: 0;
    line-height: 1.5;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 640px) {
    .auth-welcome-title {
        font-size: 1.5rem;
    }
    .auth-welcome-sub {
        font-size: 0.85rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH — Panel social : polish visuel
   ═══════════════════════════════════════════════════════════════ */

.auth-welcome {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

.auth-welcome-title {
    font-family: var(--font-hd, 'Sora', system-ui, sans-serif);
    font-size: 2rem;
    font-weight: 800;
    color: var(--ink-1, #0F1117);
    letter-spacing: -0.6px;
    margin: 0 0 10px;
    line-height: 1.15;
}

.auth-welcome-sub {
    font-family: var(--font-ui, 'Inter', system-ui, sans-serif);
    font-size: 0.9rem;
    color: var(--ink-3, #9398AE);
    margin: 0;
    line-height: 1.55;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.socials {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.s-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--border, #E4E6F0);
    background: #ffffff;
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink-1, #0F1117);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    position: relative;
}

.s-btn:hover {
    border-color: var(--blue, #3D5AFE);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(61, 90, 254, 0.10);
}

.s-btn .s-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.s-btn .s-label {
    flex: 1;
}

.s-btn .s-arrow {
    opacity: 0.4;
    font-size: 1.1rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.s-btn:hover .s-arrow {
    opacity: 1;
    transform: translateX(2px);
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.5rem 0;
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ink-3, #9398AE);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, #E4E6F0);
}

.email-cta {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: none;
    background: var(--blue, #3D5AFE);
    color: #ffffff;
    font-family: var(--font-hd, 'Sora', sans-serif);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    letter-spacing: -0.2px;
    margin-bottom: 1rem;
}

.email-cta:hover {
    background: var(--blue-dark, #2847F0);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(61, 90, 254, 0.25);
}

.email-cta:active {
    transform: translateY(0);
}

.register-row {
    text-align: center;
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.85rem;
    color: var(--ink-2, #4B5063);
    margin-top: 1rem;
}

.register-link {
    background: none;
    border: none;
    color: var(--blue, #3D5AFE);
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.register-link:hover {
    color: var(--blue-dark, #2847F0);
    text-decoration: underline;
}

.terms-note {
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.72rem;
    color: var(--ink-3, #9398AE);
    text-align: center;
    line-height: 1.5;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #E4E6F0);
}

.terms-note a {
    color: var(--ink-2, #4B5063);
    text-decoration: underline;
    text-decoration-color: var(--border, #E4E6F0);
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.terms-note a:hover {
    color: var(--blue, #3D5AFE);
    text-decoration-color: var(--blue, #3D5AFE);
}

.auth-footer {
    text-align: center;
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.75rem;
    color: var(--ink-3, #9398AE);
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #E4E6F0);
}

@media (max-width: 640px) {
    .auth-welcome-title { font-size: 1.6rem; }
    .auth-welcome-sub { font-size: 0.85rem; max-width: 280px; }
    .s-btn { padding: 12px 14px; font-size: 0.85rem; }
    .email-cta { padding: 13px 18px; font-size: 0.9rem; }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH — Boutons sociaux sur une seule ligne (horizontal)
   Override le flex-direction: column du bloc précédent
   ═══════════════════════════════════════════════════════════════ */
.socials {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    margin-bottom: 1.5rem;
    justify-content: center;
    align-items: stretch;
}

.socials .s-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 13px 12px;
    gap: 8px;
}

.socials .s-btn .s-label {
    flex: 0 1 auto;
    font-size: 0.85rem;
}

.socials .s-btn .s-arrow {
    display: none; /* cacher la flèche en mode compact */
}

/* Mobile : retour en colonne si pas assez de place */
/* < 480px : on garde la même ligne (voir patch "even smaller") */

/* ═══════════════════════════════════════════════════════════════
   AUTH — "Continuez en tant que" + badge "Utilisé la dernière fois"
   ═══════════════════════════════════════════════════════════════ */
.last-login-block {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 1.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.last-login-block:hover {
    border-color: #3D5AFE;
    box-shadow: 0 4px 16px rgba(61, 90, 254, 0.08);
}

.last-login-info-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.last-login-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3D5AFE, #2847F0);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-hd, 'Sora', sans-serif);
    font-size: 1.2rem;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}

.last-login-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.last-login-info {
    flex: 1;
    min-width: 0;
}

.last-login-info strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink-1, #0F1117);
    margin-bottom: 2px;
    line-height: 1.3;
    word-break: break-word;
}

.last-login-info small {
    display: block;
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.75rem;
    color: var(--ink-3, #9398AE);
}

.last-login-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
}

.last-login-btn {
    flex: 1;
    background: #3D5AFE;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 11px 16px;
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    text-align: center;
}

.last-login-btn:hover {
    background: #2847F0;
}

.last-login-cancel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    background: #ffffff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink-2, #4B5063);
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.last-login-cancel:hover {
    color: var(--ink-1, #0F1117);
    text-decoration: underline;
}

.last-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1rem 0;
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--ink-3, #9398AE);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.last-login-divider::before,
.last-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, #E4E6F0);
}

/* Badge "Utilisé la dernière fois" sur les boutons sociaux */
.last-used-badge {
    display: inline-block;
    background: rgba(61, 90, 254, 0.1);
    color: #3D5AFE;
    font-family: var(--font-ui, 'Inter', sans-serif);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
    margin-left: 4px;
    white-space: nowrap;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .last-login-block {
        flex-wrap: wrap;
    }
    .last-login-actions {
        width: 100%;
        flex-direction: row;
        justify-content: flex-end;
        margin-top: 8px;
    }
    .last-used-badge {
        display: none; /* caché sur mobile : trop serré */
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH TABLETTE + MOBILE (< 1025px)
   Image cachée → form prend 100% largeur + 100% hauteur
   Couvre la zone 641-1024px qui n'avait AUCUNE règle dédiée
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    body {
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: stretch !important;
        justify-content: center !important;
        min-height: 100dvh !important;
        background: var(--bg, #F4F5F9) !important;
    }

    .auth-wrap {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 100dvh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 2rem 1.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        margin: 0 !important;
    }

    /* L'image est déjà cachée à ce breakpoint, mais on sécurise */
    .auth-side-image {
        display: none !important;
    }
}

/* Sur très grande tablette (768-1024px), on centre le contenu avec une largeur confortable */
@media (min-width: 641px) and (max-width: 1024px) {
    .auth-wrap > .panel,
    .auth-wrap > .auth-welcome,
    .auth-wrap > .last-login-block,
    .auth-wrap > .socials,
    .auth-wrap > .divider,
    .auth-wrap > .email-cta,
    .auth-wrap > .register-row,
    .auth-wrap > .terms-note {
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH MOBILE (< 650px) — Form centré verticalement
   Corrige justify-content: flex-start du bloc existant ligne 9
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 649px) {
    body {
        justify-content: center !important;
    }

    .auth-wrap {
        justify-content: center !important;
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH MOBILE (< 650px) — Fix centrage : annuler margin-top:auto du footer
   Le margin-top:auto écrasait justify-content:center
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 649px) {
    /* Annuler le margin-top:auto qui casse le centrage */
    .auth-footer {
        margin-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Forcer le centrage vertical sur body */
    html, body {
        height: 100dvh !important;
        min-height: 100dvh !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: stretch !important;
    }

    /* .auth-wrap : s'adapte au contenu mais centré verticalement */
    .auth-wrap {
        min-height: auto !important;
        max-height: none !important;
        height: auto !important;
        margin: auto !important;
        padding: 1.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH MOBILE (< 650px) — Fond BLANC partout (body + html + wrap)
   Supprime le gris clair autour du form
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 649px) {
    html,
    body {
        background: #ffffff !important;
        background-color: #ffffff !important;
    }

    .auth-wrap {
        background: #ffffff !important;
        background-color: #ffffff !important;
    }

    /* Sécurité : les panels internes restent blancs aussi */
    .auth-wrap > .panel {
        background: #ffffff !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH — Retirer le border-top du footer "Lotooti ©" (toutes tailles)
   Le footer reste visible, seul le trait est supprimé
   ═══════════════════════════════════════════════════════════════ */
.auth-footer {
    border-top: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   AUTH — Boutons sociaux TOUJOURS sur la même ligne
   Font et padding dégressifs sur petit / très petit écran
   ═══════════════════════════════════════════════════════════════ */

/* Tous écrans : forcer la même ligne */
.socials {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
}

.socials .s-btn {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    padding: 12px 10px;
    gap: 6px;
}

.socials .s-btn .s-label {
    flex: 0 1 auto;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.socials .s-btn .s-arrow {
    display: none; /* gagner de la place */
}

/* Mobile < 480px : police un peu plus petite, tout reste sur une ligne */
@media (max-width: 480px) {
    .socials {
        gap: 6px !important;
    }
    .socials .s-btn {
        padding: 10px 8px;
        gap: 5px;
    }
    .socials .s-btn .s-label {
        font-size: 0.78rem;
    }
    .socials .s-btn .s-icon {
        width: 18px;
        height: 18px;
    }
    .socials .s-btn .s-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* Très petit < 380px : encore un peu plus petit, mais on garde la ligne */
@media (max-width: 380px) {
    .socials {
        gap: 4px !important;
    }
    .socials .s-btn {
        padding: 9px 6px;
        gap: 4px;
    }
    .socials .s-btn .s-label {
        font-size: 0.72rem;
    }
    .socials .s-btn .s-icon {
        width: 16px;
        height: 16px;
    }
    .socials .s-btn .s-icon svg {
        width: 14px;
        height: 14px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH — Labels sociaux SANS troncature "..."
   On réduit la font au lieu de couper le texte
   ═══════════════════════════════════════════════════════════════ */

/* 1. Retirer l'ellipsis sur TOUS les écrans */
.socials .s-btn .s-label {
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    flex: 0 1 auto;
}

/* 2. Écrans < 480px : font réduite */
@media (max-width: 480px) {
    .socials .s-btn .s-label {
        font-size: 0.78rem !important;
    }
}

/* 3. Écrans < 400px : encore plus petit */
@media (max-width: 400px) {
    .socials .s-btn {
        padding: 10px 6px !important;
        gap: 4px !important;
    }
    .socials .s-btn .s-label {
        font-size: 0.72rem !important;
    }
    .socials .s-btn .s-icon {
        width: 16px !important;
        height: 16px !important;
    }
    .socials .s-btn .s-icon svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* 4. Écrans < 360px (iPhone SE, Android 5"...) : encore plus petit */
@media (max-width: 360px) {
    .socials {
        gap: 4px !important;
    }
    .socials .s-btn {
        padding: 9px 4px !important;
        gap: 3px !important;
    }
    .socials .s-btn .s-label {
        font-size: 0.68rem !important;
    }
    .socials .s-btn .s-icon {
        width: 14px !important;
        height: 14px !important;
    }
    .socials .s-btn .s-icon svg {
        width: 12px !important;
        height: 12px !important;
    }
}

/* 5. Écrans < 320px (très rare) : minimum absolu */
@media (max-width: 320px) {
    .socials .s-btn {
        padding: 8px 3px !important;
        gap: 2px !important;
    }
    .socials .s-btn .s-label {
        font-size: 0.62rem !important;
        letter-spacing: -0.02em;
    }
    .socials .s-btn .s-icon {
        width: 12px !important;
        height: 12px !important;
    }
    .socials .s-btn .s-icon svg {
        width: 11px !important;
        height: 11px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH — Header mobile fixé en haut, style .hdr-logo
   Visible uniquement < 1025px (quand photo droite cachée)
   Sur desktop : masqué (le logo est déjà sur la photo)
   ═══════════════════════════════════════════════════════════════ */

/* Par défaut (desktop) : caché */
.auth-mobile-header {
    display: none;
}

@media (max-width: 1024px) {
    .auth-mobile-header {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: #ffffff;
        border-bottom: none;
        z-index: 100;
    }

    /* Style reproduit depuis .hdr-logo (updatedheader.css)
       Fallbacks vers les variables de rootauth.css */
    .auth-mobile-header .hdr-logo {
        font-family: 'Inter', system-ui, -apple-system, sans-serif;
        font-size: 1.5rem;
        font-weight: 800;
        letter-spacing: -0.5px;
        text-decoration: none;
        display: flex;
        align-items: center;
        color: var(--hdr-blue, var(--accent, #0066FF));
        transition: opacity 0.2s ease;
    }
    .auth-mobile-header .hdr-logo:hover {
        opacity: 0.8;
    }
    .auth-mobile-header .hdr-logo em {
        color: var(--hdr-ink-1, var(--ink-1, #1A1D2E));
        font-style: normal;
    }

    /* Décaler le form sous le header fixe */
    body {
        padding-top: 56px !important;
    }
    .auth-wrap {
        min-height: calc(100dvh - 56px) !important;
    }
}

/* Très petit écran : header un peu plus compact */
@media (max-width: 380px) {
    .auth-mobile-header {
        height: 50px;
    }
    .auth-mobile-header .hdr-logo {
        font-size: 1.3rem;
    }
    body {
        padding-top: 50px !important;
    }
    .auth-wrap {
        min-height: calc(100dvh - 50px) !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH — Header mobile : logo plus gros + flèche retour à gauche
   (ciblage .auth-mobile-header uniquement → n'affecte QUE auth.php)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    /* Logo plus gros */
    .auth-mobile-header .hdr-logo {
        font-size: 1.75rem !important;
    }

    /* Flèche retour, positionnée à gauche, logo reste centré */
    .auth-mobile-back {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        color: var(--ink-1, #1A1D2E);
        text-decoration: none;
        transition: background 0.15s ease;
    }
    .auth-mobile-back i {
        font-size: 1.4rem;
        line-height: 1;
    }
    .auth-mobile-back:hover {
        background: rgba(0, 0, 0, 0.06);
    }
}

/* Petit écran : logo encore plus gros (mais proportionné) + flèche plus compacte */
@media (max-width: 380px) {
    .auth-mobile-header .hdr-logo {
        font-size: 1.5rem !important;
    }
    .auth-mobile-back {
        left: 8px;
        width: 36px;
        height: 36px;
    }
    .auth-mobile-back i {
        font-size: 1.2rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH — Feedback au TAP sur la flèche retour (mobile)
   Remplace le hover par un effet :active visible au clic/appui
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .auth-mobile-back {
        /* Supprimer le highlight bleu natif iOS/Android */
        -webkit-tap-highlight-color: transparent;
        /* Feedback tactile instantané, pas d'attente des 300ms */
        touch-action: manipulation;
        /* Transition rapide pour un retour immédiat */
        transition: background 0.08s ease, transform 0.08s ease;
    }

    /* État appuyé (fonctionne au tap, pas juste au hover) */
    .auth-mobile-back:active {
        background: rgba(0, 0, 0, 0.10);
        transform: translateY(-50%) scale(0.92);
    }

    .auth-mobile-back:active i {
        color: var(--accent, #0066FF);
    }

    /* Désactiver le hover sur les appareils tactiles */
    @media (hover: none) {
        .auth-mobile-back:hover {
            background: transparent;
        }
        .auth-mobile-back:active {
            background: rgba(0, 0, 0, 0.10);
        }
    }
}

/* Petit écran : feedback un peu plus marqué (cible plus petite) */
@media (max-width: 380px) {
    .auth-mobile-back:active {
        background: rgba(0, 0, 0, 0.12);
        transform: translateY(-50%) scale(0.9);
    }
}
