.auth-screen {
    --auth-bg: #FAFAF9;
    --auth-surface: #ffffff;
    --auth-input: #FAFAF9;
    --auth-text: #1C1917;
    --auth-muted: #78716C;
    --auth-subtle: #A8A29E;
    --auth-border: #E7E5E4;
    --auth-border-soft: #F0EEEC;
    --auth-orange: #F37A1F;
    --auth-orange-dark: #D9660F;
    --auth-navy: #061B4E;
    --auth-soft-orange: #fff3e8;
    --auth-soft-blue: #EAF1FF;
    --auth-red: #dc2626;
    --auth-shadow: 0 22px 50px rgba(28, 25, 23, 0.09);

    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(42px, 6.5vh, 72px) 1rem 36px;
    background:
        radial-gradient(circle at top left, rgba(11, 70, 216, 0.07), transparent 30%),
        radial-gradient(circle at top right, rgba(243, 122, 31, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(250, 250, 249, 0.65)),
        var(--auth-bg);
}

.auth-shell {
    width: min(100%, 460px);
    margin: 0 auto;
    animation: authFadeUp 320ms ease;
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.35rem;
}

.auth-logo-wrap {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    margin: 0 auto 1rem;
    border-radius: 999px;
    box-shadow: 0 16px 30px rgba(243, 122, 31, 0.18);
}

.auth-logo {
    width: 68px;
    height: 68px;
}

.auth-brand-name {
    margin: 0 0 0.35rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0;
}

.brand-blue,
.brand-mid {
    color: #0B46D8;
}

.brand-violet {
    color: #0B46D8;
}

.brand-brown {
    color: #B45309;
}

.brand-orange-dark {
    color: #D9660F;
}

.brand-orange {
    color: #F37A1F;
}

.auth-tagline {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.auth-card {
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 22px;
    padding: 1.4rem;
    box-shadow: var(--auth-shadow);
}

.auth-card-head {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.2rem;
}

.auth-card-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--auth-soft-orange);
    color: var(--auth-orange);
}

.auth-card-icon-svg,
.auth-input-icon svg,
.auth-password-toggle svg,
.auth-alert-icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-card-title {
    margin: 0;
    color: var(--auth-text);
    font-size: 1.45rem;
    font-weight: 800;
}

.auth-alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fef2f2;
    color: var(--auth-red);
    font-size: 0.87rem;
}

.auth-form {
    display: grid;
    gap: 0.95rem;
}

.auth-field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: -0.45rem;
}

.auth-field-head label {
    color: #44403C;
    font-size: 0.83rem;
    font-weight: 600;
}

.auth-forgot {
    color: var(--auth-orange);
    font-size: 0.83rem;
    font-weight: 600;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 0.9rem 0 2.8rem;
    border: 1.5px solid var(--auth-border);
    border-radius: 14px;
    background: var(--auth-input);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.auth-input-wrap:focus-within {
    border-color: var(--auth-orange);
    background: var(--auth-surface);
    box-shadow: 0 0 0 4px rgba(243, 122, 31, 0.1);
}

.auth-input-icon {
    position: absolute;
    left: 0.95rem;
    color: var(--auth-subtle);
}

.auth-input-wrap:focus-within .auth-input-icon {
    color: var(--auth-orange);
}

.auth-input-wrap input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--auth-text);
    font-size: 0.96rem;
    outline: none;
}

.auth-input-wrap input::placeholder {
    color: var(--auth-subtle);
}

.auth-password-toggle {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-right: -0.3rem;
    border: 0;
    background: transparent;
    color: var(--auth-subtle);
    cursor: pointer;
}

.auth-primary-btn,
.auth-secondary-btn {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.auth-primary-btn {
    margin-top: 0.15rem;
    background: var(--auth-orange);
    color: #fff;
    box-shadow: 0 14px 28px rgba(243, 122, 31, 0.22);
}

.auth-primary-btn:hover,
.auth-primary-btn:focus-visible {
    background: var(--auth-orange-dark);
    color: #fff;
    transform: translateY(-1px);
}

.auth-secondary-btn {
    background: var(--auth-soft-blue);
    color: var(--auth-text);
}

.auth-secondary-btn:hover,
.auth-secondary-btn:focus-visible {
    background: #DCE6FF;
    color: var(--auth-text);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.auth-divider span {
    flex: 1;
    height: 1px;
    background: var(--auth-border-soft);
}

.auth-divider strong {
    color: var(--auth-subtle);
    font-size: 0.75rem;
    font-weight: 600;
}

.auth-terms {
    margin: 0.15rem 0 0;
    text-align: center;
    color: var(--auth-subtle);
    font-size: 0.83rem;
}

.auth-terms a {
    color: var(--auth-orange);
    font-weight: 600;
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .auth-screen {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem 1rem 3rem;
    }

    .auth-shell {
        margin: 0;
    }
}

@media (max-width: 520px) {
    .auth-screen {
        padding: clamp(42px, 6vh, 60px) 0.75rem 2rem;
    }

    .auth-card {
        padding: 1.15rem;
        border-radius: 20px;
    }

    .auth-brand-name {
        font-size: 1.8rem;
    }
}

/* ═══════════════════════════════════════════════════
   Connexion via un compte externe (Google, Apple, Facebook)
   Aligné sur .auth-secondary-btn : 54px, radius 15px.
   ═══════════════════════════════════════════════════ */
.auth-social {
    display: grid;
    gap: 10px;
    margin-bottom: 0.9rem;
}
.auth-social-btn {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 16px;
    border: 1px solid var(--auth-border, #E7E5E4);
    border-radius: 15px;
    background: #fff;
    color: var(--auth-text, #1C1917);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}
.auth-social-btn:hover,
.auth-social-btn:focus-visible {
    background: #FAFAF9;
    color: var(--auth-text, #1C1917);
    box-shadow: 0 6px 18px rgba(28, 25, 23, .08);
}
.auth-social-btn:active { transform: scale(.99); }
.auth-social-btn:disabled { opacity: .6; cursor: progress; }
.auth-social-icon { width: 20px; height: 20px; flex: 0 0 20px; }
.auth-social-btn--apple { background: #1C1917; border-color: #1C1917; color: #fff; }
.auth-social-btn--apple:hover { background: #000; color: #fff; }
.auth-social-btn--facebook { background: #fff; }
/* Bouton natif Google gardé hors écran : le flux officiel reste utilisé. */
.auth-social-native { position: absolute; width: 0; height: 0; overflow: hidden; opacity: 0; }
.auth-social-form { display: none; }
