/* ==========================================================================
   Pages d'authentification (connexion, mot de passe oublié, vérification,
   nouveau mot de passe) — charte de la Commune de Tombolia.
   ========================================================================== */
:root {
    --a-navy: #12307a;
    --a-navy-dark: #0a1f52;
    --a-green: #1f7a34;
    --a-gold: #f5a800;
    --a-ink: #1b2437;
    --a-muted: #5b6475;
    --a-line: #dfe5ee;
    --a-soft: #f5f8fc;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body.auth-v2 {
    margin: 0; font-family: 'Lato', 'Segoe UI', Roboto, Arial, sans-serif; color: var(--a-ink);
    background: #fff; -webkit-font-smoothing: antialiased;
}
.auth-v2 a { color: var(--a-navy); text-decoration: none; }
.auth-v2 a:hover { color: var(--a-green); text-decoration: none; }

.auth-grid { display: flex; min-height: 100vh; }

/* ---------- Panneau de couverture ---------- */
.auth-cover {
    position: relative; flex: 0 0 46%; max-width: 46%; overflow: hidden; color: #fff;
    display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px;
    background: radial-gradient(120% 90% at 20% 10%, #1a3f96 0%, var(--a-navy) 45%, var(--a-navy-dark) 100%);
}
.auth-cover::before {
    content: ""; position: absolute; right: -180px; bottom: -180px; width: 520px; height: 520px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 60px rgba(255, 255, 255, .025), 0 0 0 120px rgba(255, 255, 255, .02);
}
.auth-brand { position: relative; display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; align-self: flex-start; }
.auth-brand:hover, .auth-brand:focus { color: inherit; text-decoration: none; }
.auth-brand:hover img, .auth-logo-sm a:hover img { opacity: .9; }
.auth-brand img { height: 56px; width: auto; background: #fff; border-radius: 12px; padding: 6px; }
.auth-brand strong { display: block; font-size: 18px; letter-spacing: .01em; color: #fff; }
.auth-brand span { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }

.auth-portrait { position: relative; text-align: center; margin: 32px 0; }
.auth-portrait figure { display: inline-block; margin: 0; }
.auth-portrait img {
    display: block; width: 300px; max-width: 100%; height: auto; border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35); border: 4px solid rgba(255, 255, 255, .95);
}
.auth-flag { display: flex; height: 5px; width: 120px; margin: 22px auto 14px; border-radius: 3px; overflow: hidden; }
.auth-flag i { flex: 1; }
.auth-flag i:nth-child(1) { background: #ce1126; }
.auth-flag i:nth-child(2) { background: #fcd116; }
.auth-flag i:nth-child(3) { background: #009460; }
.auth-portrait figcaption { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--a-gold); font-weight: 700; }
.auth-portrait figcaption small { display: block; margin-top: 6px; font-size: 12px; letter-spacing: .06em; text-transform: none; color: rgba(255, 255, 255, .72); font-weight: 400; }
/* Devise nationale, sous « République de Guinée » (bureau et bandeau mobile) */
.auth-portrait .auth-devise { display: block; margin-top: 12px; font-size: 9.5px; letter-spacing: .24em; color: rgba(255, 255, 255, .6); font-weight: 400; }

.auth-motto { position: relative; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .75); }

/* ---------- Formulaire ---------- */
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: #fff; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box .auth-logo-sm { display: none; text-align: center; margin-bottom: 20px; }
.auth-box .auth-logo-sm img { height: 72px; }
.auth-box h1 { font-size: 28px; font-weight: 700; color: var(--a-navy); margin: 0 0 8px; }
.auth-box .auth-sub { font-size: 15px; color: var(--a-muted); margin: 0 0 30px; line-height: 1.6; }

.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; font-size: 14px; font-weight: 700; color: #374151; margin-bottom: 7px; }
.auth-input { position: relative; }
.auth-input > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #8a94a6; font-size: 15px; pointer-events: none; }
.auth-input input {
    width: 100%; height: 50px; padding: 0 16px 0 44px; font-size: 15px; color: var(--a-ink);
    border: 1px solid var(--a-line); border-radius: 10px; background: var(--a-soft); outline: none;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.auth-input input:focus { border-color: var(--a-navy); background: #fff; box-shadow: 0 0 0 3px rgba(18, 48, 122, .12); }
.auth-input .auth-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #8a94a6; padding: 8px 10px; cursor: pointer; }
.auth-input .auth-eye:hover { color: var(--a-navy); }
.auth-input .auth-eye i { position: static; transform: none; }
.auth-input .auth-eye ~ input, .auth-input input:has(+ .auth-eye) { padding-right: 48px; }
.auth-field.has-error input { border-color: #dc2626; background: #fff; }
.auth-field .error, .auth-field .error p { display: block; margin: 6px 0 0; font-size: 13px; color: #dc2626; }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 24px; font-size: 14px; }
.auth-row label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; color: var(--a-muted); cursor: pointer; }
.auth-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--a-navy); }

.auth-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; border: 0; border-radius: 10px;
    background: var(--a-navy); color: #fff; font-size: 16px; font-weight: 700; letter-spacing: .02em; cursor: pointer; transition: background .15s;
}
.auth-btn:hover { background: var(--a-green); }

.auth-links { margin-top: 24px; text-align: center; font-size: 14px; color: var(--a-muted); }
.auth-links a { font-weight: 700; }
.auth-links .sep { margin: 0 8px; color: #c3cad6; }

.auth-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 20px; border-radius: 10px; font-size: 14px; line-height: 1.5; background: #ecf7ef; color: #1c5f2d; border: 1px solid #c6e8cf; }
.auth-alert.danger { background: #fdecec; color: #9b1c1c; border-color: #f7caca; }

.auth-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--a-line); text-align: center; font-size: 12px; color: #8a94a6; }
.auth-foot a { color: #8a94a6; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .auth-grid { flex-direction: column; }
    .auth-cover { flex: none; max-width: none; padding: 22px 24px; flex-direction: row; align-items: center; gap: 16px; }
    .auth-cover::before, .auth-motto, .auth-brand { display: none; }
    .auth-portrait { margin: 0; display: flex; align-items: center; gap: 16px; text-align: left; }
    .auth-portrait figure { display: flex; align-items: center; gap: 16px; }
    .auth-portrait img { width: 64px; height: 64px; object-fit: cover; object-position: top; border-radius: 50%; border-width: 2px; box-shadow: none; }
    .auth-flag { display: none; }
    .auth-portrait figcaption { font-size: 11px; }
    .auth-portrait .auth-devise { margin-top: 4px; font-size: 8.5px; letter-spacing: .16em; }
    .auth-main { padding: 32px 20px 40px; align-items: flex-start; }
    .auth-box .auth-logo-sm { display: block; }
    .auth-box h1 { font-size: 24px; text-align: center; }
    .auth-box .auth-sub { text-align: center; }
}
.auth-btn.auth-btn-outline { margin-top: 12px; background: #fff; color: var(--a-navy); border: 1px solid var(--a-navy); text-decoration: none; }
.auth-btn.auth-btn-outline:hover { background: var(--a-navy); color: #fff; }
.auth-brand img.auth-wordmark { height: 64px; padding: 8px 14px; }
.auth-box .auth-logo-sm img { max-width: 260px; height: auto; max-height: 72px; }
