/* ============================================================
   LegalPass — Pages d'authentification
   Design centré minimaliste, inspiré LegalPlace
   • .auth-client  → ambiance bleu (espace client)
   • .auth-admin   → ambiance neutre (espace pro)
   ============================================================ */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0F172A;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(900px 700px at -10% -10%, rgba(27, 58, 138, .06), transparent 70%),
        radial-gradient(800px 600px at 110% 110%, rgba(255, 210, 63, .09), transparent 70%),
        linear-gradient(180deg, #FBFCFE 0%, #F1F4FB 100%);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   HEADER (logo + langue)
   ============================================================ */
.auth-topbar {
    width: 100%;
    padding: 22px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    .auth-topbar { padding: 18px 20px; }
}

.auth-brand {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    font-weight: 800;
    font-size: 22px;
    color: #1B3A8A;
    letter-spacing: -.4px;
    text-decoration: none;
}
.auth-brand-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #FFD23F;
    margin-left: 4px;
    transform: translateY(-2px);
}

.auth-topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    color: #475569;
}
.auth-topbar-right a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.auth-topbar-right a:hover {
    background: rgba(15, 23, 42, .05);
    color: #0F172A;
}

/* ============================================================
   MAIN — carte centrée
   ============================================================ */
.auth-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 24px 48px;
}
@media (min-height: 720px) {
    .auth-main { align-items: center; padding-top: 0; padding-bottom: 60px; }
}
@media (max-width: 640px) {
    .auth-main { padding: 8px 16px 32px; }
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 20px;
    padding: 36px 36px 32px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .04),
        0 12px 32px rgba(15, 23, 42, .08);
    border: 1px solid #ECEEF4;
}
@media (max-width: 640px) {
    .auth-card {
        padding: 28px 22px 24px;
        border-radius: 16px;
        box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
    }
}

/* ============================================================
   En-tête de la carte (titre + sous-titre)
   ============================================================ */
.auth-card-head {
    text-align: center;
    margin-bottom: 26px;
}
.auth-card-head h1 {
    font-size: 24px;
    margin: 0 0 6px;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -.5px;
    line-height: 1.2;
}
.auth-card-head p {
    margin: 0;
    color: #64748B;
    font-size: 14.5px;
    line-height: 1.55;
}
.auth-card-head .tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #EEF2FE;
    color: #1B3A8A;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 14px;
}

/* ============================================================
   Onglets (Connexion / Inscription)
   ============================================================ */
.auth-tabs {
    display: flex;
    background: #F4F6FB;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
    gap: 2px;
}
.auth-tabs a {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    color: #64748B;
    transition: all .15s;
}
.auth-tabs a:hover { color: #0F172A; }
.auth-tabs a.active {
    background: #fff;
    color: #0F172A;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

/* ============================================================
   Formulaire
   ============================================================ */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-field { display: flex; flex-direction: column; }
.auth-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 6px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input-icon {
    position: absolute;
    left: 13px;
    color: #94A3B8;
    pointer-events: none;
    display: inline-flex;
}
.auth-field input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid #E2E8F0;
    border-radius: 11px;
    font: inherit;
    font-size: 14.5px;
    background: #fff;
    color: #0F172A;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-field input::placeholder { color: #94A3B8; }
.auth-field input:focus {
    outline: none;
    border-color: #1B3A8A;
    box-shadow: 0 0 0 4px rgba(27, 58, 138, .10);
}
.auth-input-wrap:focus-within .auth-input-icon { color: #1B3A8A; }

.auth-eye {
    position: absolute;
    right: 6px;
    width: 34px; height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    transition: color .15s, background .15s;
}
.auth-eye:hover { background: #F1F5F9; color: #0F172A; }

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin: -2px 0 0;
}
.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}
.auth-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: #1B3A8A;
    cursor: pointer;
}
.auth-link {
    color: #1B3A8A;
    font-weight: 600;
    text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

/* ============================================================
   Bouton principal
   ============================================================ */
.auth-submit {
    width: 100%;
    padding: 13px;
    border-radius: 11px;
    border: none;
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .15s;
    background: #1B3A8A;
    color: #fff;
    margin-top: 4px;
}
.auth-submit:hover {
    background: #102765;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(27, 58, 138, .25);
}
.auth-submit:active { transform: translateY(0); }
.auth-submit svg { transition: transform .15s; }
.auth-submit:hover svg { transform: translateX(3px); }

/* ============================================================
   Alertes
   ============================================================ */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    animation: slide-down .25s ease;
}
@keyframes slide-down {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.auth-alert-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.auth-alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.auth-alert-info    { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.auth-alert svg { flex-shrink: 0; margin-top: 1px; }

/* ============================================================
   Pied de la carte
   ============================================================ */
.auth-card-foot {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #F1F4FB;
    text-align: center;
    font-size: 13.5px;
    color: #64748B;
}
.auth-card-foot a { color: #1B3A8A; font-weight: 600; text-decoration: none; }
.auth-card-foot a:hover { text-decoration: underline; }

/* ============================================================
   Strip de réassurance sous la carte
   ============================================================ */
.auth-trust {
    margin-top: 20px;
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    font-size: 12.5px;
    color: #475569;
}
.auth-trust span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.auth-trust svg { color: #10B981; flex-shrink: 0; }

/* ============================================================
   Demo info
   ============================================================ */
.auth-demo {
    margin-top: 16px;
    padding: 10px 12px;
    background: #FFFBEB;
    border: 1px dashed #F59E0B;
    border-radius: 10px;
    font-size: 12px;
    color: #78350F;
    line-height: 1.55;
    text-align: center;
}
.auth-demo code {
    background: rgba(255, 255, 255, .8);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: #92400E;
    font-weight: 700;
}

/* ============================================================
   Footer page
   ============================================================ */
.auth-footer {
    padding: 20px 32px 28px;
    text-align: center;
    font-size: 12px;
    color: #94A3B8;
}
.auth-footer a {
    color: #64748B;
    text-decoration: none;
    margin: 0 8px;
}
.auth-footer a:hover { color: #0F172A; text-decoration: underline; }

/* ============================================================
   Force de mot de passe (register)
   ============================================================ */
.auth-strength {
    display: flex;
    gap: 4px;
    margin-top: 7px;
}
.auth-strength span {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: #E2E8F0;
    transition: background .25s;
}
.auth-strength-hint {
    display: block;
    margin-top: 6px;
    font-size: 11.5px;
    color: #94A3B8;
}

/* ============================================================
   Champ "two-col" pour register
   ============================================================ */
.auth-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 480px) {
    .auth-row-2 { grid-template-columns: 1fr; gap: 14px; }
}

/* ============================================================
   ADMIN — variante avec accent gris/anthracite
   ============================================================ */
body.auth-admin {
    background:
        radial-gradient(900px 700px at -10% -10%, rgba(15, 23, 42, .04), transparent 70%),
        radial-gradient(700px 600px at 110% 110%, rgba(15, 23, 42, .03), transparent 70%),
        #FAFBFC;
}
body.auth-admin .auth-card-head .tag {
    background: #F1F5F9;
    color: #475569;
}
body.auth-admin .auth-submit {
    background: #0F172A;
}
body.auth-admin .auth-submit:hover {
    background: #1E293B;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .2);
}
body.auth-admin .auth-field input:focus {
    border-color: #0F172A;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, .08);
}
body.auth-admin .auth-input-wrap:focus-within .auth-input-icon { color: #0F172A; }
body.auth-admin .auth-link { color: #0F172A; }
body.auth-admin .auth-card-foot a { color: #0F172A; }
body.auth-admin .auth-brand { color: #0F172A; }
