/* ABSYS Stats — pages publiques de compte (mot de passe oublié / nouveau mot de passe).
   Même identité que l'accueil : fond marine, carte blanche, bleu d'interface unique,
   barres « signal » aux couleurs des issues d'appel. */
:root {
    color-scheme: light;
    --navy: #07142D;
    --navy-2: #0F2247;
    --ink: #0F1B2D;
    --slate: #3B4658;
    --muted: #596579;
    --blue: #1B4FD1;
    --blue-dark: #163FA8;
    --blue-lt: #8FB0FF;
    --border: #D8DFE9;
    --input: #8592A7;
    --soft: #F4F7FB;
    --direct: #0E9467;
    --repris: #5CC29C;
    --vm: #D99A0B;
    --perdu: #D93F4C;
    --ease: cubic-bezier(.22, 1, .36, 1);
    font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--ink);
    background: radial-gradient(1100px 600px at 85% -10%, #1B4FD133, transparent 60%),
                radial-gradient(800px 500px at -10% 110%, #0E946722, transparent 60%),
                linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
    overflow-x: hidden;
}

/* Barres décoratives en bas de page */
.auth-bg {
    position: fixed; inset: auto 0 0 0; height: 34vh;
    display: flex; align-items: flex-end; justify-content: center; gap: clamp(6px, 1.4vw, 16px);
    padding: 0 16px; pointer-events: none; opacity: .5;
    -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 100%);
            mask-image: linear-gradient(to top, #000 10%, transparent 100%);
}
.auth-bg span {
    flex: 0 1 22px; height: calc(var(--h) * 100%);
    border-radius: 6px 6px 0 0;
    background: linear-gradient(to top, #1B4FD155, #8FB0FF88);
    transform-origin: bottom; animation: auth-rise 1.1s var(--ease) both; animation-delay: var(--d);
}
.auth-bg span:nth-child(5n+2) { background: linear-gradient(to top, #0E946755, #5CC29C99); }
.auth-bg span:nth-child(7n+4) { background: linear-gradient(to top, #D99A0B44, #D99A0B88); }
.auth-bg span:nth-child(11)  { background: linear-gradient(to top, #D93F4C44, #D93F4C88); }
@keyframes auth-rise { from { transform: scaleY(.05); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

.auth-shell {
    position: relative; z-index: 1;
    width: min(100% - 32px, 460px); margin: 0 auto;
    padding: clamp(28px, 7vh, 72px) 0 40px;
}
.auth-brand {
    display: inline-flex; align-items: center; gap: 12px; margin-bottom: 26px;
    color: #fff; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: .01em;
    border-radius: 10px;
}
.auth-brand img { background: #fff; border-radius: 11px; padding: 5px; }
.auth-brand b { font-weight: 500; color: var(--blue-lt); }
.auth-brand:focus-visible { outline: 3px solid var(--blue-lt); outline-offset: 4px; }

.auth-card {
    position: relative; overflow: hidden;
    padding: 34px 32px 30px; border-radius: 18px; background: #fff;
    box-shadow: 0 30px 90px #01091D66, 0 0 55px #4478CE1A;
    animation: auth-card-in .6s var(--ease) both;
}
.auth-card::before {
    content: ''; position: absolute; inset: 0 0 auto 0; height: 4px;
    background: linear-gradient(90deg, var(--direct) 0 46%, var(--repris) 46% 64%, var(--vm) 64% 82%, var(--blue) 82%);
}
@keyframes auth-card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.auth-eyebrow {
    margin: 0 0 8px; font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue);
}
.auth-card h1 {
    margin: 0 0 14px; font-family: 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
    font-size: clamp(26px, 6vw, 31px); line-height: 1.12; font-weight: 600; letter-spacing: -.01em;
}
.auth-card p { margin: 0 0 14px; font-size: 15px; line-height: 1.6; color: var(--slate); }
.auth-card .auth-lead { color: var(--ink); }
.auth-card .auth-muted { font-size: 13.5px; color: var(--muted); }

.auth-form { margin-top: 18px; }
.auth-field { margin-bottom: 18px; }
.auth-field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 500; }
.auth-field input {
    width: 100%; min-height: 48px; padding: 11px 14px;
    border: 1.5px solid var(--input); border-radius: 8px; background: #F7F9FD; color: var(--ink);
    font-size: 16px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.auth-field input:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px #1B4FD126; }
.auth-field input[aria-invalid="true"] { border-color: var(--perdu); }
.auth-password { position: relative; }
.auth-password input { padding-right: 52px; }
.auth-eye {
    position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
    width: 40px; height: 40px; display: grid; place-items: center;
    border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer;
}
.auth-eye:hover { color: var(--ink); background: #EEF1F6; }
.auth-eye:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.auth-eye svg { width: 20px; height: 20px; }
.auth-eye[aria-pressed="true"] { color: var(--blue); }

/* Robustesse du mot de passe */
.auth-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 10px 0 10px; }
.auth-meter span { height: 5px; border-radius: 3px; background: #E3E8F0; transition: background .2s; }
.auth-meter[data-level="1"] span:nth-child(-n+1) { background: var(--perdu); }
.auth-meter[data-level="2"] span:nth-child(-n+2) { background: var(--vm); }
.auth-meter[data-level="3"] span:nth-child(-n+3) { background: var(--repris); }
.auth-meter[data-level="4"] span { background: var(--direct); }
.auth-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.auth-rules li { position: relative; padding-left: 22px; }
.auth-rules li::before {
    content: ''; position: absolute; left: 2px; top: 4px; width: 12px; height: 12px;
    border: 1.5px solid #A2ACBE; border-radius: 50%;
}
.auth-rules li.ok { color: #0B7A55; }
.auth-rules li.ok::before {
    border-color: var(--direct); background: var(--direct)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2 5 8l4-4.2' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/10px no-repeat;
}
.auth-match { min-height: 20px; margin: 6px 0 0 !important; font-size: 13px !important; }
.auth-match.ok { color: #0B7A55 !important; }
.auth-match.ko { color: #B42335 !important; }

.auth-button {
    width: 100%; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 18px; border: 0; border-radius: 9px; background: var(--blue); color: #fff;
    font-size: 15.5px; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: background .15s, transform .15s var(--ease);
}
.auth-button:hover { background: var(--blue-dark); }
.auth-button:active { transform: translateY(1px); }
.auth-button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.auth-button svg { width: 20px; height: 20px; transition: transform .2s var(--ease); }
.auth-button:hover svg { transform: translateX(3px); }
.auth-button[aria-busy="true"] { opacity: .75; cursor: progress; }

.auth-error {
    margin: 4px 0 16px; padding: 12px 14px; border-radius: 8px;
    background: #FDF0F1; border: 1px solid #F3C4CA; color: #9F1239; font-size: 14px; line-height: 1.5;
}
.auth-error:focus { outline: 2px solid var(--perdu); outline-offset: 2px; }

.auth-account {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    margin: 4px 0 18px; padding: 12px 14px; border-radius: 10px; background: var(--soft);
    border: 1px solid #E3E8F0; border-left: 4px solid var(--blue);
}
.auth-account-label { font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.auth-account-value { font-family: 'IBM Plex Mono', monospace; font-size: 16px; font-weight: 500; color: var(--ink); word-break: break-all; text-align: right; }

.auth-done { padding: 4px 0 6px; }
.auth-done-icon {
    width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 14px;
    border-radius: 14px; background: #E7F6EF; color: var(--direct);
}
.auth-done-icon svg { width: 26px; height: 26px; }
.auth-done-warn .auth-done-icon { background: #FCF4E2; color: #A87405; }

.auth-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.auth-back { margin: 22px 0 0; text-align: center; }
.auth-back a {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px;
    color: #DCE5F7; font-size: 14.5px; font-weight: 500; text-decoration: none;
}
.auth-back a:hover { color: #fff; background: #ffffff14; }
.auth-back a:focus-visible { outline: 2px solid var(--blue-lt); outline-offset: 2px; }
.auth-back svg { width: 18px; height: 18px; }
.auth-signature { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: #8EA0C2; }

@media (max-width: 420px) {
    .auth-card { padding: 28px 20px 24px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-bg span, .auth-card { animation: none; }
    .auth-button, .auth-button svg, .auth-meter span { transition: none; }
}
