/* ============================================================
   mananke — pages de compte
   
   Les couleurs sont celles de style.css, recopiées plutôt
   qu'importées : ces pages doivent s'afficher même si la
   feuille de l'éditeur change de nom ou de version.
   ============================================================ */

:root {
    --anthracite: #1e2124;
    --anthracite-clair: #262a2e;
    --anthracite-panneau: #23272b;
    --anthracite-bord: #34393e;
    --texte: #e6e8ea;
    --texte-doux: #9aa0a6;
    --vert-tendre: #7bc47f;
    --vert-doux: #a5d6a7;
    --vert-fort: #4caf72;
    --rouge-doux: #e5806f;
    --rayon: 6px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--anthracite);
    color: var(--texte);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    line-height: 1.55;
}

:focus-visible {
    outline: 2px solid var(--vert-tendre);
    outline-offset: 2px;
}

/* ============================================================
   La carte
   ============================================================ */

.carte {
    width: 100%;
    max-width: 420px;
    background: var(--anthracite-panneau);
    border: 1px solid var(--anthracite-bord);
    border-radius: var(--rayon);
    padding: 28px 26px 22px;
}

.carte.large { max-width: 620px; }

.retour {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--texte-doux);
    font-size: 12.5px;
    text-decoration: none;
}

.retour:hover { color: var(--texte); }

.logo {
    display: block;
    height: 28px;
    width: auto;
    margin-bottom: 14px;
}

h1 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--texte-doux);
    margin-bottom: 12px;
}

.sous-titre {
    margin-top: 6px;
    font-size: 13.5px;
    color: var(--texte-doux);
}

/* ============================================================
   Messages d'état
   ============================================================ */

.etat {
    margin-top: 18px;
    padding: 11px 13px;
    border-radius: var(--rayon);
    font-size: 13px;
    border-left: 3px solid;
}

.etat-bon {
    background: rgba(76, 175, 114, 0.10);
    border-color: var(--vert-fort);
    color: var(--vert-doux);
}

.etat-souci {
    background: rgba(229, 128, 111, 0.10);
    border-color: var(--rouge-doux);
    color: var(--rouge-doux);
}

/* ============================================================
   Formulaires
   ============================================================ */

form { margin-top: 22px; }

.champ { margin-bottom: 16px; }

label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--texte-doux);
    margin-bottom: 6px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 9px 11px;
    background: var(--anthracite);
    border: 1px solid var(--anthracite-bord);
    border-radius: var(--rayon);
    color: var(--texte);
    font-family: inherit;
    font-size: 14px;
}

input:focus {
    border-color: var(--vert-fort);
    outline: none;
}

.aide {
    margin-top: 6px;
    font-size: 12px;
    color: var(--texte-doux);
}

button {
    width: 100%;
    padding: 10px 16px;
    background: var(--vert-fort);
    color: #fff;
    border: none;
    border-radius: var(--rayon);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

button:hover { background: var(--vert-tendre); }

button.discret {
    background: transparent;
    border: 1px solid var(--anthracite-bord);
    color: var(--texte-doux);
}

button.discret:hover {
    background: var(--anthracite-clair);
    color: var(--texte);
}

button.danger {
    background: transparent;
    border: 1px solid var(--rouge-doux);
    color: var(--rouge-doux);
}

button.danger:hover {
    background: var(--rouge-doux);
    color: var(--anthracite);
}

/* ============================================================
   Liens de bas de carte
   ============================================================ */

.liens {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--anthracite-bord);
    font-size: 13px;
    color: var(--texte-doux);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.liens a { color: var(--vert-doux); text-decoration: none; }
.liens a:hover { text-decoration: underline; }

.mentions {
    margin-top: 22px;
    font-size: 11.5px;
    color: var(--texte-doux);
    text-align: center;
}

.mentions a { color: var(--texte-doux); }

/* ============================================================
   Page du compte
   ============================================================ */

.section {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--anthracite-bord);
}

.section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.fiche {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 18px;
    font-size: 13.5px;
}

.fiche dt { color: var(--texte-doux); }
.fiche dd { color: var(--texte); }

.jauge {
    margin-top: 12px;
    height: 6px;
    background: var(--anthracite);
    border-radius: 3px;
    overflow: hidden;
}

.jauge span {
    display: block;
    height: 100%;
    background: var(--vert-fort);
}

details.repli {
    margin-top: 14px;
}

details.repli > summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--texte-doux);
    list-style: none;
}

details.repli > summary::-webkit-details-marker { display: none; }
details.repli > summary::before { content: "▸ "; }
details.repli[open] > summary::before { content: "▾ "; }
details.repli > summary:hover { color: var(--texte); }

/* Sur un écran étroit, la carte occupe toute la largeur utile. */
@media (max-width: 480px) {
    body { padding: 20px 12px; }
    .carte { padding: 22px 18px 18px; }
    .fiche { grid-template-columns: 1fr; gap: 2px; }
    .fiche dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
