/* ============================================================
   MODALE — MOT DE PASSE OUBLIÉ (3 étapes par code)
   Reproduite de PAEEJ Academy, convertie aux couleurs BRIDEP
   Vert #026325 / #024f1f · Accent orange #fc9401 · Vert vif #14A751
   ============================================================ */

.lb-forgot-overlay {
    position: fixed; inset: 0; z-index: 1001;
    background: rgba(1, 30, 12, 0.55);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px;
}
.lb-forgot-overlay.open { display: flex; }

.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: fmModalSlideIn 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.85); border-color: transparent; color: white; }

.lb-forgot-header {
    background: linear-gradient(135deg, #155215 0%, #1F7A1F 70%, #0F3D0F 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(252,148,1,0.12); 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; transition: all 0.3s; flex-shrink: 0;
}
.lb-step-circle.active { background: #fc9401; color: white; }
.lb-step-circle.done   { background: #14A751; 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(20,167,81,0.6); }

.lb-forgot-title { 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.6); line-height: 1.5; position: relative; z-index: 1; }
.lb-forgot-sub span { color: #fc9401; font-weight: 600; }

.lb-forgot-body { padding: 28px 32px 32px; position: relative; }
.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; color: #1A202C; background: #F8FAFC; outline: none; transition: all 0.2s;
}
.lb-input:focus { border-color: #026325; background: white; box-shadow: 0 0 0 3px rgba(2,99,37,0.12); }
.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-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; color: #024f1f;
    background: #F8FAFC; outline: none; transition: all 0.2s; caret-color: #026325;
}
.lb-otp-input:focus { border-color: #026325; background: white; box-shadow: 0 0 0 3px rgba(2,99,37,0.12); transform: scale(1.06); }
.lb-otp-input.filled { border-color: #026325; background: #EAF5EC; }
.lb-otp-input.error  { border-color: #EF4444; background: #FEF2F2; animation: fmShake 0.4s ease; }

.lb-otp-resend { text-align: center; font-size: 13px; color: #94A3B8; margin-top: 14px; }
.lb-otp-resend a { color: #026325; font-weight: 700; cursor: pointer; }
.lb-otp-timer { color: #fc9401; font-weight: 700; }

.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: #14A751; }
.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: #D1FAE5; border-color: #14A751; color: #14A751; }

.lb-btn {
    width: 100%; height: 52px; border-radius: 14px; border: none;
    background: linear-gradient(135deg, #024f1f 0%, #026325 100%);
    color: white; font-size: 15px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    cursor: pointer; position: relative; overflow: hidden;
    box-shadow: 0 4px 16px rgba(1,73,27,0.28); transition: all 0.25s; margin-top: 4px;
}
.lb-btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%); }
.lb-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(1,73,27,0.36); }
.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(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: fmSpin 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; 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, #D1FAE5, #A7F3D0); border: 2px solid #14A751; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #14A751; margin-bottom: 20px; animation: fmPopIn 0.4s cubic-bezier(0.16,1,0.3,1) both; }
.lb-success-big-title { font-size: 22px; font-weight: 800; color: #026325; 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, #024f1f, #026325); color: white; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 4px 14px rgba(1,73,27,0.25); }

.lb-toast { display: none; text-align: center; font-size: 12.5px; color: #EF4444; font-weight: 600; margin-bottom: 16px; padding: 9px 12px; background: #FEF2F2; border-radius: 8px; border: 1px solid #FECACA; }

@keyframes fmModalSlideIn {
    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; }
}
@keyframes fmShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@keyframes fmSpin { to { transform: rotate(360deg); } }
@keyframes fmPopIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
