/* ══════════════════════════════════════════════════════════════
   AUTH PAGES — Younited Credit
   Design premium split-screen : panneau gauche marque / formulaire droit
   ══════════════════════════════════════════════════════════════ */

:root {
    --auth-brand:   #E72179;
    --auth-dark:    #0d1b2a;
    --auth-gold:    #F4B400;
    --auth-light:   #f4f7fb;
    --auth-border:  #e2e8f0;
    --auth-input:   #fff;
    --auth-text:    #1e293b;
    --auth-muted:   #64748b;
    --auth-success: #16a34a;
    --auth-error:   #dc2626;
}

* { box-sizing: border-box; }
body { font-family: 'Heebo', sans-serif; background: var(--auth-light); margin: 0; }

/* ── Masquer le page-header inutile ── */
.page-header { display: none !important; }

/* ══ LAYOUT SPLIT-SCREEN ══ */
.auth-split {
    min-height: 100vh;
    display: flex;
}

/* Panneau gauche : brand */
.auth-brand-panel {
    width: 42%;
    background: linear-gradient(160deg, #0d1b2a 0%, #E72179 60%, #04a0af 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 48px 40px;
    position: relative;
    overflow: hidden;
}
.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(240,192,64,0.07);
}
.auth-brand-panel::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}

.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    z-index: 2;
}
.auth-brand-logo i { font-size: 1.8rem; color: var(--auth-gold); }
.auth-brand-logo span { font-family: 'Nunito', sans-serif; font-size: 1.5rem; font-weight: 900; }
.auth-brand-logo .brand-fast { color: #fff; }
.auth-brand-logo .brand-projet { color: var(--auth-gold); }

.auth-brand-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}
.auth-brand-content h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 16px;
}
.auth-brand-content p {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 18px;
    backdrop-filter: blur(4px);
}
.auth-feature-item i {
    font-size: 1.2rem;
    color: var(--auth-gold);
    flex-shrink: 0;
}
.auth-feature-item span {
    color: rgba(255,255,255,0.9);
    font-size: 0.88rem;
    font-weight: 600;
}

.auth-brand-footer {
    position: relative;
    z-index: 2;
}
.auth-brand-footer p {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    margin: 0;
}
.auth-trust-badges {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.auth-trust-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Panneau droit : formulaire */
.auth-form-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 56px;
    overflow-y: auto;
}

.auth-form-header { margin-bottom: 32px; }
.auth-form-header .auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(5,151,167,0.08);
    color: var(--auth-brand);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.auth-form-header h1 {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--auth-text);
    margin-bottom: 8px;
}
.auth-form-header p {
    color: var(--auth-muted);
    font-size: 0.92rem;
}
.auth-form-header a {
    color: var(--auth-brand);
    font-weight: 700;
    text-decoration: none;
}
.auth-form-header a:hover { text-decoration: underline; }

/* Champs de formulaire */
.auth-field { margin-bottom: 20px; }
.auth-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--auth-text);
    margin-bottom: 7px;
}
.auth-field .field-wrap {
    position: relative;
}
.auth-field .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    font-size: 1rem;
    pointer-events: none;
}
.auth-field input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    border: 1.5px solid var(--auth-border);
    border-radius: 10px;
    font-size: 0.93rem;
    color: var(--auth-text);
    background: var(--auth-input);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.auth-field input:focus {
    border-color: var(--auth-brand);
    box-shadow: 0 0 0 3px rgba(5,151,167,0.12);
}
.auth-field input::placeholder { color: #b0bec5; }
.auth-field input.is-error { border-color: var(--auth-error); }

.auth-field .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--auth-muted);
    padding: 0;
    font-size: 1rem;
}

/* Bouton principal */
.auth-btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--auth-brand), #04a0af);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, opacity .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    margin-top: 8px;
}
.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(5,151,167,0.35);
}
.auth-btn-primary:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--auth-muted);
    font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

/* Sécurité */
.auth-security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
    color: #166534;
    margin-top: 16px;
}
.auth-security-note i { color: #16a34a; flex-shrink: 0; }

/* Liens bas de page */
.auth-footer-links {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--auth-muted);
}
.auth-footer-links a { color: var(--auth-muted); text-decoration: none; }
.auth-footer-links a:hover { color: var(--auth-brand); }
.auth-footer-links span { margin: 0 8px; }

/* Messages d'état */
.auth-message { display: none; margin: 12px 0; padding: 12px 16px; border-radius: 10px; font-size: 0.88rem; font-weight: 600; }
.auth-message.info    { display: block; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.auth-message.warning { display: block; background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.auth-message.error   { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.auth-message.success { display: block; background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* Remember / Forgot */
.auth-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 20px;
    font-size: 0.85rem;
}
.auth-remember-row label { color: var(--auth-muted); cursor: pointer; }
.auth-remember-row a { color: var(--auth-brand); text-decoration: none; font-weight: 600; }
.auth-remember-row a:hover { text-decoration: underline; }

/* Section titre étape (register) */
.auth-step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--auth-brand);
    background: rgba(5,151,167,0.06);
    border-radius: 8px;
    padding: 10px 16px;
    margin: 20px 0 16px;
    border-left: 3px solid var(--auth-brand);
}

/* Compatibilité avec l'ancien login-card (pour register.html) */
.login-section, .register-section { padding: 0; background: none; }
.login-card, .register-card { all: unset; display: block; }
.btn-login { all: unset; }

/* Responsive */
@media (max-width: 768px) {
    .auth-split { flex-direction: column; }
    .auth-brand-panel { width: 100%; padding: 32px 24px; min-height: auto; }
    .auth-brand-content { padding: 20px 0; }
    .auth-features { display: none; }
    .auth-form-panel { padding: 32px 24px; }
    .auth-form-header h1 { font-size: 1.5rem; }
}

/* Surcharge bouton connexion - couleur visible */
.auth-btn-primary,.btn-login{background:#E72179!important;background:linear-gradient(135deg,#E72179,#E72179)!important;color:#fff!important;border:none!important;opacity:1!important;visibility:visible!important;}
.auth-btn-primary:hover,.btn-login:hover{background:linear-gradient(135deg,#047a88,#E72179)!important;transform:translateY(-1px);box-shadow:0 6px 20px rgba(5,151,167,0.35)!important;}
