/* ============================================================
   login.css  ·  E-JIMBERE  ·  Page de connexion
   Pattern : BRIDEP CORE (structure fidele)
   Couleurs : identite E-JIMBERE (vert logo + accent corail)
   ============================================================ */

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

:root {
    --primary:      #0B2E5E;
    --primary-mid:  #024E9E;
    --primary-lite: #2E73C8;
    --primary-sky:  #60a5fa;
    --accent:       #CC9428;
    --accent-light: #FAEEDA;
    --accent-dark:  #8F6E2A;
    --white:        #FFFFFF;
    --text-dark:    #1A202C;
    --text-muted:   #64748B;
    --text-hint:    #94A3B8;
    --border:       #E2E8F0;
    --success:      #10B981;
    --danger:       #EF4444;
}

html, body {
    height: 100%;
    font-family: 'Nunito Sans', sans-serif;
    color: var(--text-dark);
}

/* ============================  FULL PAGE BACKGROUND  ============================
   Repris a l'identique du CSS justiciable (E-Justice)
============================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0B2E5E 0%, #024E9E 35%, #2E73C8 70%, #60a5fa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.bg-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Mesh gradient overlay */
.bg-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(at 15% 20%, rgba(204,148,40, 0.22) 0%, transparent 42%),
        radial-gradient(at 85% 70%, rgba(16, 185, 129, 0.16) 0%, transparent 42%),
        radial-gradient(at 50% 50%, rgba(124, 58, 237, 0.12) 0%, transparent 52%);
    pointer-events: none;
}

.decor-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05);
}
.ring-1 { width: 700px; height: 700px; top: -300px; left: -200px; }
.ring-2 { width: 500px; height: 500px; top: -100px; right: -200px; border-color: rgba(204,148,40,0.07); }
.ring-3 { width: 400px; height: 400px; bottom: -150px; left: 10%; }
.ring-4 { width: 300px; height: 300px; bottom: -80px; right: 15%; border-color: rgba(204,148,40,0.06); }
.ring-5 { width: 200px; height: 200px; top: 40%; left: 45%; border-color: rgba(255,255,255,0.04); }

.decor-dot {
    position: absolute;
    width: 4px; height: 4px;
    border-radius: 50%;
    background: rgba(204,148,40,0.55);
    animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.5); }
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ============================  MAIN CONTAINER  ============================ */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    display: flex;
    border-radius: 28px;
    overflow: hidden;
    box-shadow:
        0 4px 8px rgba(0,0,0,0.1),
        0 16px 48px rgba(0,0,0,0.25),
        0 40px 80px rgba(0,0,0,0.2);
    animation: fadeUp 0.7s ease both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================  LEFT PANEL — BRANDING  ============================
   Degrade hero d'origine du justiciable
============================ */
.panel-left {
    width: 500px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #0B2E5E 0%, #024E9E 40%, #2952b5 75%, #2f5fc4 100%);
    border-right: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 44px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Mesh overlay lumineux du panneau — repris du justiciable */
.panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(at 15% 20%, rgba(204,148,40, 0.25) 0%, transparent 40%),
        radial-gradient(at 85% 70%, rgba(16, 185, 129, 0.20) 0%, transparent 40%),
        radial-gradient(at 50% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Blobs decoratifs flottants — repris du justiciable */
.panel-blob {
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 100%);
    top: -180px;
    right: -200px;
    animation: blob-float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
.panel-blob.blob-2 {
    width: 320px;
    height: 320px;
    bottom: -140px;
    left: -120px;
    top: auto;
    right: auto;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation-delay: -5s;
    animation-duration: 25s;
}
@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) rotate(0deg);          border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    33%      { transform: translate(30px, -50px) rotate(120deg); border-radius: 60% 40% 30% 70% / 50% 60% 40% 60%; }
    66%      { transform: translate(-20px, 30px) rotate(240deg); border-radius: 30% 70% 60% 40% / 60% 40% 50% 70%; }
}

/* Motif de points rotatif — repris du justiciable */
.panel-dots {
    position: absolute;
    top: 40px;
    right: 36px;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(circle, rgba(255,255,255,0.32) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    opacity: 0.45;
    pointer-events: none;
    animation: rotate-slow 60s linear infinite;
    z-index: 0;
}
@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Le contenu du panneau passe au-dessus des decors */
.panel-left .brand,
.panel-left .left-headline,
.panel-left .features,
.panel-left .left-footer {
    position: relative;
    z-index: 2;
}

.brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    animation: fadeUp 0.6s 0.1s ease both;
    position: relative;
    z-index: 1;
}
.brand-logo-box {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    border-radius: 50%;
    background: white;
    border: 3px solid rgba(204,148,40,0.85);
    padding: 0;
    box-shadow: 0 6px 18px rgba(0,0,0,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.brand-logo-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.brand-name {
    font-family: 'Nunito', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(255,255,255,0.92);
    letter-spacing: 0.2px;
    line-height: 1.45;
    max-width: 300px;
}

.left-headline { animation: fadeUp 0.6s 0.2s ease both; position: relative; z-index: 1; }

.eyebrow {
    font-size: 11px;
    font-weight: 700;
    color: rgba(218,178,99,0.95);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.eyebrow::before {
    content: '';
    display: inline-block;
    width: 20px; height: 2px;
    background: rgba(218,178,99,0.7);
    border-radius: 2px;
}

.headline {
    font-family: 'Nunito', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: white;
    line-height: 1.18;
    margin-bottom: 16px;
}
.headline .gold { color: #fbbf24; }

.headline-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.82);
    line-height: 1.75;
    max-width: 347px;
    margin-bottom: 10px;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeUp 0.6s 0.3s ease both;
    position: relative;
    z-index: 1;
}
.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    transition: all 0.2s;
}
.feature:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(218,178,99,0.25);
}
.feature-icon {
    width: 34px; height: 34px;
    border-radius: 9px;
    background: rgba(218,178,99,0.16);
    border: 1px solid rgba(218,178,99,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    font-size: 13px;
    flex-shrink: 0;
}
.feature-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.85); }
.feature-desc  { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 2px; }

.left-footer {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    animation: fadeUp 0.6s 0.4s ease both;
    margin-top: 12px;
    position: relative;
    z-index: 1;
}
.left-footer a { color: rgba(218,178,99,0.6); text-decoration: none; }

/* ============================  RIGHT PANEL — FORM  ============================ */
.panel-right {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 52px;
}
.form-wrap { width: 100%; max-width: 520px; }

.form-header { margin-bottom: 14px; }
.form-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.form-title {
    font-family: 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}
.secure-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    background: #EEF4FF;
    border: 1px solid #B6CCF0;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-mid);
}
.form-subtitle {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}
.form-divider {
    height: 3px;
    width: 44px;
    background: linear-gradient(90deg, var(--accent), #fbbf24);
    border-radius: 2px;
}

.login-form { display: flex; flex-direction: column; gap: 9px; margin-top: 8px; }

.field-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}
.field-wrap { position: relative; }
.field-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-hint);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}
.field-input {
    width: 100%;
    height: 50px;
    padding: 0 48px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 14.5px;
    font-family: 'Nunito Sans', sans-serif;
    color: var(--text-dark);
    background: #F8FAFC;
    outline: none;
    transition: all 0.2s;
}
.field-input::placeholder { color: #C1CEDE; }
.field-input:focus {
    border-color: var(--primary-mid);
    background: white;
    box-shadow: 0 0 0 3px rgba(30,64,175,0.12);
}
.field-input:focus ~ .field-icon { color: var(--primary-mid); }
.field-input.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239,68,68,0.10);
}
.field-toggle {
    position: absolute;
    right: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-hint);
    background: none; border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color 0.2s;
    z-index: 1;
}
.field-toggle:hover { color: var(--primary); }

.field-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text-muted);
    user-select: none;
}
.check-box {
    width: 18px; height: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}
.check-box.on {
    background: var(--primary-mid);
    border-color: var(--primary-mid);
    color: white;
}
.check-box i { font-size: 10px; }
.forgot {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary-mid);
    text-decoration: none;
    transition: color 0.2s;
}
.forgot:hover { color: var(--primary); }

.form-error {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-left: 3px solid var(--danger);
    border-radius: 10px;
    font-size: 13px;
    color: #991B1B;
}
.form-error.show { display: flex; }

.btn-submit {
    width: 100%;
    height: 52px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #BE8C20 0%, #D8AB44 50%, #EBCB80 100%);
    color: #0B2E5E;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 5px 16px rgba(204,148,40,0.35), 0 1px 3px rgba(184,132,31,0.22);
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}
.btn-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: none;
}
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(204,148,40,0.45), 0 2px 6px rgba(184,132,31,0.28);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit.loading .btn-text,
.btn-submit.loading .btn-icon { opacity: 0; }
.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 22px; height: 22px;
    border: 2.5px solid rgba(11,46,94,0.25);
    border-top-color: #0B2E5E;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-icon { font-size: 14px; transition: transform 0.25s; position: relative; }
.btn-text { position: relative; }
.btn-submit:hover .btn-icon { transform: translateX(4px); }

.form-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-note {
    font-size: 12px;
    color: var(--text-hint);
    line-height: 1.7;
    margin-bottom: 14px;
}
.roles-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.role-pill {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid;
    white-space: nowrap;
}

.r-dot { width: 6px; height: 6px; border-radius: 50%; }

.core-login-footer {
    position: absolute;
    bottom: 14px;
    left: 0; right: 0;
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    z-index: 1;
    padding: 0 20px;
}
.core-login-footer a { color: rgba(218,178,99,0.7); text-decoration: none; font-weight: 700; }
.core-footer-strong { color: rgba(255,255,255,0.7); font-weight: 800; }

@media (max-width: 820px) {
    .login-container { max-width: 440px; }
    .panel-left { display: none; }
    .panel-right { padding: 40px 36px; }
}
@media (max-width: 480px) {
    .panel-right { padding: 28px 22px; }
    .form-header-top { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ============================================================
   MODALE 2FA — VERIFICATION OTP
   ============================================================ */
.otp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}
.otp-overlay.show { display: flex; }

.otp-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 32px 32px 24px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    animation: otpPop 0.3s ease both;
}
@keyframes otpPop {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.otp-modal-head { text-align: center; margin-bottom: 20px; }
.otp-modal-icon {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.otp-modal-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.otp-modal-sub {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
}
.otp-modal-sub strong { color: var(--primary); }

.otp-error {
    display: none;
    align-items: center;
    gap: 8px;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #991B1B;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}
.otp-error.show { display: flex; }

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 22px;
}
.otp-digit {
    width: 48px; height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    border: 2px solid var(--border);
    border-radius: 12px;
    background: #F8FAFC;
    transition: all 0.15s;
}
.otp-digit:focus {
    outline: none;
    border-color: var(--primary-lite);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30,64,175,0.12);
}
.otp-digit.filled { border-color: var(--primary); background: #fff; }

.otp-valider-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 55%, var(--primary-lite) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.otp-valider-btn:hover { box-shadow: 0 8px 24px rgba(30,58,138,0.35); }
.otp-valider-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.otp-foot {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 14px;
}
.otp-foot a {
    color: var(--primary-lite);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}
.otp-foot a:hover { text-decoration: underline; }
.otp-foot a.otp-cancel { color: var(--text-hint); font-weight: 600; }

/* ============================================================
   BLOC SECURITE RENFORCEE (2FA)
   ============================================================ */
.security-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--accent-light);
    border: 1px solid rgba(204,148,40,0.3);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.security-icon {
    width: 34px; height: 34px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.security-text {
    font-size: 12.5px;
    color: var(--accent-dark);
    line-height: 1.5;
}
.security-text strong {
    display: block;
    font-size: 13px;
    color: #92400E;
    margin-bottom: 2px;
}

/* ============================================================
   MODALE FORGOT PASSWORD — etapes
   ============================================================ */
.forgot-step .field-group { text-align: left; margin-bottom: 14px; }
.forgot-step .field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.forgot-step .field-wrap { position: relative; }
.forgot-step .field-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #F8FAFC;
    color: var(--text-dark);
    transition: all 0.15s;
}
.forgot-step .field-input:focus {
    outline: none;
    border-color: var(--primary-lite);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30,64,175,0.12);
}
.forgot-step .field-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-hint);
    font-size: 14px;
}

/* ============================================================
   MODALE MOT DE PASSE OUBLIE  -  reprise de BRIDEP CORE
   Stepper + jauge de robustesse + ecran de succes
   Charte E-JIMBERE (bleu)
   ============================================================ */
.lb-forgot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9999;
    /* cache par defaut : visible uniquement avec .show */
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
}
.lb-forgot-overlay.show {
    display: flex;
    animation: lbOverlayFadeIn 0.25s ease both;
}
.lb-forgot-box {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 32px 80px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.lb-forgot-close {
    position: absolute; top: 16px; right: 16px;
    width: 32px; height: 32px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 13px; z-index: 1; transition: all 0.2s;
}
.lb-forgot-close:hover { background: rgba(239,68,68,0.8); border-color: transparent; color: white; }
.lb-forgot-header {
    background: linear-gradient(135deg, #0B2E5E 0%, #024E9E 40%, #2952b5 75%, #2f5fc4 100%);
    padding: 28px 32px 24px;
    position: relative; overflow: hidden;
}
.lb-forgot-header::before {
    content: ''; position: absolute;
    width: 200px; height: 200px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    top: -80px; right: -60px;
}
.lb-forgot-header::after {
    content: ''; position: absolute;
    width: 120px; height: 120px; border-radius: 50%;
    border: 1px solid rgba(232,160,32,0.1);
    bottom: -40px; left: 40px;
}
.lb-steps { display: flex; align-items: center; margin-bottom: 20px; position: relative; z-index: 1; margin-top: 20px; }
.lb-step-item { display: flex; align-items: center; gap: 8px; }
.lb-step-circle {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; font-family: 'Nunito', sans-serif;
    transition: all 0.3s; flex-shrink: 0;
}
.lb-step-circle.active { background: #CC9428; color: white; }
.lb-step-circle.done   { background: #10B981; color: white; }
.lb-step-circle.idle   { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.5); }
.lb-step-label { font-size: 11px; font-weight: 600; white-space: nowrap; transition: all 0.3s; }
.lb-step-label.active { color: white; }
.lb-step-label.done   { color: rgba(255,255,255,0.6); }
.lb-step-label.idle   { color: rgba(255,255,255,0.35); }
.lb-step-line { flex: 1; height: 1.5px; background: rgba(255,255,255,0.15); margin: 0 10px; min-width: 24px; }
.lb-step-line.done { background: rgba(16,185,129,0.6); }
.lb-forgot-title {
    font-family: 'Nunito', sans-serif; font-size: 22px; font-weight: 800;
    color: white; margin-bottom: 6px; position: relative; z-index: 1;
}
.lb-forgot-sub {
    font-size: 13px; color: rgba(255,255,255,0.55);
    line-height: 1.5; position: relative; z-index: 1;
}
.lb-forgot-sub span { color: #CC9428; font-weight: 600; }
.lb-forgot-body { padding: 28px 32px 32px; }
.lb-step-panel { display: none; }
.lb-step-panel.active { display: block; }
.lb-field { margin-bottom: 20px; }
.lb-field-label {
    display: block; font-size: 11.5px; font-weight: 700;
    color: #475569; text-transform: uppercase;
    letter-spacing: 0.8px; margin-bottom: 8px;
}
.lb-input {
    width: 100%; height: 50px; padding: 0 14px 0 44px;
    border: 1.5px solid #E2E8F0; border-radius: 12px;
    font-size: 14.5px; font-family: 'Nunito Sans', sans-serif;
    color: #1A202C; background: #F8FAFC; outline: none; transition: all 0.2s;
}
.lb-input:focus { border-color: #0B2E5E; background: white; box-shadow: 0 0 0 3px rgba(26,77,184,0.1); }
.lb-input.error { border-color: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
.lb-input-wrap { position: relative; }
.lb-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94A3B8; font-size: 14px; pointer-events: none; }
.lb-pwd-wrap { position: relative; }
.lb-pwd-toggle { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #94A3B8; cursor: pointer; font-size: 14px; }
.lb-otp-resend { text-align: center; font-size: 13px; color: #94A3B8; margin-top: 14px; }
.lb-otp-resend a { color: #0B2E5E; font-weight: 700; cursor: pointer; }
.lb-strength-wrap { display: flex; gap: 4px; margin-top: 8px; }
.lb-strength-seg { flex: 1; height: 4px; border-radius: 2px; background: #E2E8F0; transition: background 0.3s; }
.lb-strength-label { font-size: 11.5px; font-weight: 600; margin-top: 5px; height: 16px; }
.lb-criteria-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; }
.criteria-item { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #94A3B8; transition: color 0.2s; }
.criteria-item.ok { color: #10B981; }
.criteria-dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #E2E8F0; display: flex; align-items: center; justify-content: center; font-size: 8px; flex-shrink: 0; transition: all 0.2s; }
.criteria-item.ok .criteria-dot { background: #dbeafe; border-color: #10B981; color: #10B981; }
.lb-btn {
    width: 100%; height: 52px; border-radius: 14px; border: none;
    background: linear-gradient(135deg, #BE8C20 0%, #D8AB44 50%, #EBCB80 100%);
    color: #0B2E5E; font-size: 15px; font-weight: 700; font-family: 'Nunito', sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 5px 16px rgba(204,148,40,0.35), 0 1px 3px rgba(184,132,31,0.22); transition: all 0.25s; margin-top: 4px;
}
.lb-btn::before { content: ''; position: absolute; inset: 0; background: none; }
.lb-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(204,148,40,0.45), 0 2px 6px rgba(184,132,31,0.28); }
.lb-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.lb-btn.loading span, .lb-btn.loading i { opacity: 0; }
.lb-btn.loading::after { content: ''; position: absolute; width: 20px; height: 20px; border: 2.5px solid rgba(11,46,94,0.25); border-top-color: #0B2E5E; border-radius: 50%; animation: spin 0.7s linear infinite; }
.lb-btn-back {
    width: 100%; margin-top: 10px; padding: 10px; border-radius: 12px;
    border: 1.5px solid #E2E8F0; background: white; color: #64748B;
    font-size: 13px; font-weight: 600; font-family: 'Nunito Sans', sans-serif; cursor: pointer;
}
.lb-success-state { display: none; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px 20px; }
.lb-success-state.show { display: flex; }
.lb-success-anim {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border: 2px solid #10B981;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: #10B981; margin-bottom: 20px;
    animation: popIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
.lb-success-big-title { font-family: 'Nunito', sans-serif; font-size: 22px; font-weight: 800; color: #024E9E; margin-bottom: 10px; }
.lb-success-big-desc  { font-size: 14px; color: #64748B; line-height: 1.65; margin-bottom: 24px; max-width: 300px; }
.lb-success-close {
    padding: 12px 36px; border-radius: 12px; border: none;
    background: linear-gradient(135deg, #024E9E, #0B2E5E);
    color: white; font-size: 14px; font-weight: 700;
    font-family: 'Nunito', sans-serif; cursor: pointer;
    box-shadow: 0 4px 14px rgba(13,37,80,0.25);
}

/* --- Cases de saisie du code OTP (modale forgot) --- */
.lb-otp-wrap { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; }
.lb-otp-input {
    width: 54px; height: 64px;
    border: 2px solid #E2E8F0; border-radius: 14px;
    text-align: center; font-size: 26px; font-weight: 700;
    font-family: 'Nunito', sans-serif; color: #024E9E;
    background: #F8FAFC; outline: none;
    transition: all 0.2s; caret-color: #0B2E5E;
}
.lb-otp-input:focus {
    border-color: #0B2E5E; background: white;
    box-shadow: 0 0 0 3px rgba(26,77,184,0.12);
    transform: scale(1.06);
}
.lb-otp-input.filled { border-color: #0B2E5E; background: #eff6ff; }
.lb-otp-input.error  { border-color: #EF4444; background: #FEF2F2; animation: shake 0.4s ease; }
.lb-otp-timer { color: #CC9428; font-weight: 700; }
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-6px); }
    40%     { transform: translateX(6px); }
    60%     { transform: translateX(-4px); }
    80%     { transform: translateX(4px); }
}

/* ============================================================
   MODALE 2FA (verification a la connexion) - reprise BRIDEP CORE
   Charte E-JIMBERE (bleu)
   ============================================================ */
.lb-2fa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    overflow-y: auto;
}
.lb-2fa-overlay.show {
    display: flex;
    animation: lbOverlayFadeIn 0.25s ease both;
}

@keyframes lbOverlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.lb-2fa-box {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Animation d'entrée — léger rebond élastique */
@keyframes modalSlideIn {
    0%   { transform: scale(0.85) translateY(30px); opacity: 0; }
    60%  { transform: scale(1.02) translateY(-4px); opacity: 1; }
    80%  { transform: scale(0.99) translateY(2px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
.lb-2fa-header {
    background: linear-gradient(135deg, #0B2E5E 0%, #024E9E 40%, #2952b5 75%, #2f5fc4 100%);
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.lb-2fa-header::before {
    content: '';
    position: absolute;
    width: 220px; height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    top: -100px; right: -60px;
}
.lb-2fa-header::after {
    content: '';
    position: absolute;
    width: 140px; height: 140px;
    border-radius: 50%;
    border: 1px solid rgba(232,160,32,0.1);
    bottom: -60px; left: -30px;
}
.lb-2fa-icon-wrap {
    width: 64px; height: 64px;
    border-radius: 18px;
    background: rgba(232,160,32,0.15);
    border: 1.5px solid rgba(232,160,32,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative; z-index: 1;
}
.lb-2fa-icon-wrap i { font-size: 26px; color: #CC9428; }
.lb-2fa-title {
    font-family: 'Nunito', sans-serif;
    font-size: 22px; font-weight: 800;
    color: white; margin-bottom: 8px;
    position: relative; z-index: 1;
}
.lb-2fa-sub {
    font-size: 13px; color: rgba(255,255,255,0.55);
    line-height: 1.6; position: relative; z-index: 1;
}
.lb-2fa-sub span { color: #CC9428; font-weight: 600; }
.lb-2fa-body { padding: 32px; }
.lb-2fa-label { text-align: center; font-size: 13px; color: #64748B; margin-bottom: 20px; line-height: 1.6; }

/* Affichage de l'erreur 2FA via la classe .show (pilotee par login.js) */
.lb-2fa-error { display: none; }
.lb-2fa-error.show { display: block; }

/* --- Bouton et pied de la modale 2FA --- */
.lb-2fa-resend { text-align: center; font-size: 13px; color: #94A3B8; margin: 14px 0 22px; }
.lb-2fa-resend a { color: #0B2E5E; font-weight: 700; cursor: pointer; }
.lb-otp-timer { color: #CC9428; font-weight: 700; }
.lb-2fa-btn {
    width: 100%; height: 52px; border-radius: 14px; border: none;
    background: linear-gradient(135deg, #BE8C20 0%, #D8AB44 50%, #EBCB80 100%);
    color: #0B2E5E; font-size: 15px; font-weight: 700;
    font-family: 'Nunito', sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 5px 16px rgba(204,148,40,0.35), 0 1px 3px rgba(184,132,31,0.22);
    transition: all 0.25s;
}
.lb-2fa-btn::before {
    content: ''; position: absolute; inset: 0;
    background: none;
}
.lb-2fa-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(204,148,40,0.45), 0 2px 6px rgba(184,132,31,0.28); }
.lb-2fa-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }
.lb-2fa-btn.loading span, .lb-2fa-btn.loading i { opacity: 0; }
.lb-2fa-btn.loading::after {
    content: ''; position: absolute;
    width: 20px; height: 20px;
    border: 2.5px solid rgba(11,46,94,0.25);
    border-top-color: #0B2E5E; border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.lb-2fa-footer { text-align: center; margin-top: 14px; font-size: 12.5px; color: #94A3B8; }
.lb-2fa-footer a { color: #EF4444; font-weight: 700; cursor: pointer; }


/* === Bloc marque : logo | trait vertical | titre + sous-titres === */
.brand { gap: 16px; }
.brand-divider {
    width: 2px;
    height: 56px;
    flex: 0 0 2px;
    align-self: center;
    border-radius: 2px;
    background: linear-gradient(180deg,
        rgba(218,178,99,0) 0%, rgba(218,178,99,0.8) 22%,
        rgba(218,178,99,0.8) 78%, rgba(218,178,99,0) 100%);
}
.brand-text { display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.brand-title {
    font-family: 'Outfit','Nunito',sans-serif;
    font-size: 24px; font-weight: 800;
    color: #ffffff; letter-spacing: 1px; line-height: 1.05;
}
.brand-sub {
    font-family: 'Nunito',sans-serif;
    font-size: 12px; font-weight: 600;
    color: rgba(255,255,255,0.78); letter-spacing: 0.2px; line-height: 1.35;
}
.brand-sub-crn { color: rgba(218,178,99,0.95); font-weight: 700; }


/* === Encart 2FA / sécurité === */
.notice-2fa {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #FAEEDA;
    border: 1px solid rgba(204,148,40,0.30);
    border-left: 4px solid #CC9428;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.notice-icon {
    width: 34px; height: 34px;
    flex-shrink: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #CC9428 0%, #DAB263 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(204,148,40,0.35);
}
.notice-title { font-size: 13px; font-weight: 800; color: #6E531C; margin-bottom: 2px; }
.notice-desc  { font-size: 12.5px; color: #8F6E2A; line-height: 1.5; }


/* === Lien « Retour au site public » === */
.back-public {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 12px;
    padding: 8px 16px;
    border: 1.5px solid rgba(204,148,40,0.55);
    border-radius: 999px;
    color: #B8841F; font-weight: 700; font-size: 12.5px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.back-public:hover { background: #C08E22; color: #fff; border-color: #C08E22; transform: translateY(-1px); }
.back-public i { font-size: 11px; }


/* === États de succès (modales 2FA + récupération) === */
.lb-tfa-success,
.lb-success-state {
    display: none;
    text-align: center;
    padding: 14px 8px 6px;
}
.lb-tfa-success.show,
.lb-success-state.show {
    display: block;
    animation: lbSuccessPop 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes lbSuccessPop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.lb-success-circle {
    width: 74px; height: 74px;
    border-radius: 50%;
    background: #10B981;
    color: #ffffff;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px;
    margin: 4px auto 18px;
    box-shadow: 0 8px 22px rgba(16,185,129,0.35);
    animation: lbSuccessCircle 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes lbSuccessCircle { from { transform: scale(0); } to { transform: scale(1); } }
.lb-success-title { font-size: 20px; font-weight: 800; color: #0B2E5E; margin: 0 0 6px; }
.lb-success-desc  { font-size: 13.5px; color: #64748B; line-height: 1.5; margin: 0 auto; max-width: 320px; }

/* ============================================================
   ACADEMIE — Styles complémentaires login
   ============================================================ */
.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.remember-row input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--accent);
    cursor: pointer; flex-shrink: 0;
}
.remember-row label {
    font-size: 13px; color: var(--text-muted);
    cursor: pointer; margin: 0;
}
.forgot-link {
    margin-left: auto;
    font-size: 13px; font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}
.forgot-link:hover { color: var(--accent-dark); }

.footer-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.badge-blue {
    background: #EEF4FF;
    color: var(--primary);
    border: 1px solid rgba(11,46,94,0.15);
}
.badge-green {
    background: #f0f7f0;
    color: #1E6B1E;
    border: 1px solid rgba(30,107,30,0.15);
}

.lb-2fa-demo {
    background: #EAF4FB;
    color: #0b5c93;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}
.lb-2fa-demo b {
    font-size: 22px;
    letter-spacing: .35em;
    display: block;
    margin-top: 4px;
    color: #0b5c93;
}
