/* ── Pages d'authentification (connexion, inscription, mot de passe, OTP) ── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    /* height (pas min-height) : borne le flex à la fenêtre, pour que ce
       soit .login-panel / .login-brand qui défilent en interne (cf. leur
       overflow-y ci-dessous) plutôt que la page entière — évite la barre
       de défilement disgracieuse quand le contenu dépasse 100vh. */
    height: 100vh;
    display: flex;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #F0F5F2;
}

/* ── Panneau gauche ───────────────────────────── */
.login-brand {
    width: 45%;
    background: #1A7340;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}

/* Cercles décoratifs */
.login-brand::before {
    content: '';
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    border: 60px solid rgba(255,255,255,.06);
    bottom: -120px; left: -100px;
}

.login-brand::after {
    content: '';
    position: absolute;
    width: 260px; height: 260px;
    border-radius: 50%;
    border: 40px solid rgba(255,255,255,.05);
    top: -80px; right: -60px;
}

.brand-logo-wrap {
    background: #fff;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 32px;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.brand-logo-wrap img { height: 72px; width: auto; display: block; }

.brand-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 12px;
}

.brand-subtitle {
    color: rgba(255,255,255,.72);
    font-size: .88rem;
    line-height: 1.6;
    max-width: 340px;
}

.brand-subtitle-intro {
    text-align: center;
    margin-bottom: 18px;
}

.brand-feature-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brand-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    padding: 10px 14px;
}

.brand-feature-icon {
    flex: none;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(245,192,0,.16);
    color: #F5C000;
    font-size: 1.05rem;
}

.brand-feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-feature-text strong {
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1.3;
}

.brand-feature-text span {
    color: rgba(255,255,255,.68);
    font-size: .78rem;
    line-height: 1.3;
}

.brand-feature-text span.text-white-bold {
    color: #fff;
    font-weight: 400;
}

.brand-stripe {
    display: flex;
    gap: 6px;
    margin-top: 36px;
}

.brand-stripe span {
    display: block;
    height: 4px;
    border-radius: 2px;
}

.stripe-green  { background: #56C27A; width: 40px; }
.stripe-yellow { background: #F5C000; width: 24px; }
.stripe-red    { background: #E04040; width: 24px; }

/* ── Panneau droit ────────────────────────────── */
.login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    overflow-y: auto;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-card.login-card-wide { max-width: 560px; }

.login-card-header {
    margin-bottom: 32px;
}

.login-card-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1C2B22;
    margin-bottom: 6px;
}

.login-card-header p {
    font-size: .875rem;
    color: #6B8573;
}

.form-label-login {
    font-size: .82rem;
    font-weight: 600;
    color: #3A5040;
    margin-bottom: 6px;
    display: block;
}

.input-login {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #D0E0D8;
    border-radius: 8px;
    font-size: .9rem;
    color: #1C2B22;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
}

.input-login:focus {
    border-color: #1A7340;
    box-shadow: 0 0 0 3px rgba(26,115,64,.12);
}

.input-login.is-invalid { border-color: #C0392B; }

.input-group-login {
    position: relative;
}

.input-group-login .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #8AAF96;
    pointer-events: none;
}

.input-group-login .input-login {
    padding-left: 38px;
}

.select-login {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #D0E0D8;
    border-radius: 8px;
    font-size: .9rem;
    color: #1C2B22;
    background: #fff;
    outline: none;
}

.select-login:focus {
    border-color: #1A7340;
    box-shadow: 0 0 0 3px rgba(26,115,64,.12);
}

/* ── Jauge de force du mot de passe ──────────────────────────────
   Regroupée dans un panneau propre (fond + bordure) plutôt que du
   texte flottant à même le fond de page, pour se détacher nettement
   et rester lisible malgré le fond pâle de la page. */
.pwd-strength-panel {
    margin-top: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #E0EAE4;
    border-radius: 10px;
}

.pwd-strength {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pwd-strength-bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #E4EDE8;
    overflow: hidden;
}

.pwd-strength-bar span {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: transparent;
    transition: width .2s ease, background-color .2s ease;
}

.pwd-strength-bar span.pwd-strength-weak   { background: var(--fnda-red); }
.pwd-strength-bar span.pwd-strength-medium { background: var(--fnda-gold); }
.pwd-strength-bar span.pwd-strength-strong { background: var(--fnda-green); }

.pwd-strength-label {
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
    color: #6B8573;
}

.pwd-strength-label-weak   { color: var(--fnda-red); }
.pwd-strength-label-medium { color: #B8860B; }
.pwd-strength-label-strong { color: var(--fnda-green); }

.pwd-requirements {
    list-style: none;
    margin: 12px 0 0;
    padding: 10px 0 0;
    border-top: 1px solid #F0F5F2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 14px;
}

.pwd-requirements li {
    font-size: .8rem;
    color: #5A7060;
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.3;
    transition: color .15s;
}

.pwd-requirements li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #C3D6CA;
    flex-shrink: 0;
    transition: background-color .15s, transform .15s;
}

.pwd-requirements li.pwd-req-met {
    color: #1A7340;
    font-weight: 600;
}

.pwd-requirements li.pwd-req-met::before {
    background: var(--fnda-green);
    transform: scale(1.15);
}

@media (max-width: 420px) {
    .pwd-requirements { grid-template-columns: 1fr; }
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #1A7340;
    color: #fff;
    font-size: .95rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s, transform .1s;
    letter-spacing: .02em;
}

.btn-login:hover  { background: #228B50; }
.btn-login:active { transform: translateY(1px); }

.btn-login:disabled,
.btn-login.btn-login-disabled {
    opacity: .55;
    cursor: not-allowed;
}

.btn-login-outline {
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #1A7340;
    font-size: .9rem;
    font-weight: 700;
    border: 1.5px solid #1A7340;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
}

.btn-login-outline:hover { background: #E8F5EE; }

.divider-line {
    border: none;
    border-top: 1px solid #E4EDE8;
    margin: 24px 0;
}

.login-footer-link {
    font-size: .82rem;
    color: #6B8573;
    text-align: center;
}

.login-footer-link a {
    color: #1A7340;
    font-weight: 600;
    text-decoration: none !important;
}

.login-footer-link a:hover { text-decoration: underline !important; }

.forgot-link {
    font-size: .8rem;
    color: #6B8573;
    text-decoration: none !important;
}
.forgot-link:hover { color: #1A7340; }

.btn-track-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 11px;
    background: #F5C000;
    color: #17442A;
    font-size: .85rem;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none !important;
    box-shadow: 0 2px 10px rgba(245,192,0,.35);
    transition: background .2s, transform .1s;
}

.btn-track-status i { font-size: 1rem; }

.btn-track-status:hover  { background: #FFD429; color: #17442A; }
.btn-track-status:active { transform: translateY(1px); }

.checkbox-label {
    font-size: .82rem;
    color: #3A5040;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #1A7340;
    width: 15px; height: 15px;
}

.login-countdown {
    font-size: .82rem;
    color: #6B8573;
    text-align: center;
    margin-top: 16px;
}

.login-countdown strong { color: #C0392B; }

/* ── Boîte de dialogue cookies ─────────────────── */
.cookie-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 30, 20, .55);
    z-index: 1050;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-overlay.show { display: flex; }

.cookie-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    animation: cookie-dialog-in .25s ease-out;
}

@keyframes cookie-dialog-in {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cookie-dialog-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #E8F5EE;
    color: #1A7340;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-dialog-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1C2B22;
    margin-bottom: 10px;
}

.cookie-dialog-text {
    font-size: .875rem;
    color: #6B8573;
    line-height: 1.6;
    margin-bottom: 24px;
}

.cookie-dialog-left { text-align: left; }

.cookie-dialog-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-link-btn {
    background: none;
    border: none;
    color: #1A7340;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px;
}

.cookie-link-btn:hover { text-decoration: underline; }

.cookie-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #1A7340;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 16px;
}

.cookie-back-btn:hover { text-decoration: underline; }

.cookie-pref-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #E4EDE8;
    border-bottom: 1px solid #E4EDE8;
    margin-top: 18px;
}

.cookie-pref-name {
    font-size: .875rem;
    font-weight: 700;
    color: #1C2B22;
    margin-bottom: 4px;
}

.cookie-pref-desc {
    font-size: .78rem;
    color: #6B8573;
    line-height: 1.5;
}

.cookie-switch {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 22px;
}

.cookie-switch input { opacity: 0; width: 0; height: 0; }

.cookie-switch-slider {
    position: absolute;
    inset: 0;
    background: #1A7340;
    border-radius: 22px;
    opacity: .6;
    cursor: not-allowed;
}

.cookie-switch-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transform: translateX(18px);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
    /* Empilé verticalement sur mobile : plus de raison de borner à 100vh,
       la page doit pouvoir défiler naturellement comme n'importe quelle
       page mobile classique. */
    body { flex-direction: column; height: auto; min-height: 100vh; }
    .login-panel { overflow-y: visible; }
    .login-brand {
        width: 100%;
        padding: 32px 24px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
    }
    .login-brand::before, .login-brand::after { display: none; }
    .brand-logo-wrap { margin-bottom: 0; }
    .brand-logo-wrap img { height: 44px; }
    .brand-title { font-size: .95rem; text-align: left; margin-bottom: 0; }
    .brand-subtitle, .brand-stripe { display: none; }
    .login-panel { padding: 32px 20px; }
}
