/* SécuCash — styles. Palette bleu Sécu (#0D47A1) sur fond clair, thème sombre. */
:root {
  --bleu: #0D47A1;
  --bleu-2: #1565C0;
  --bleu-clair: #E3ECFA;
  --bleu-tres-clair: #F2F6FC;
  --fond: #F7F9FC;
  --surface: #FFFFFF;
  --surface-2: #EEF2F8;
  --encre: #0F1A2C;
  --encre-2: #45536B;
  --encre-3: #6B7890;
  --bord: #D8E0EC;
  --vert: #1B7F4B;
  --vert-clair: #E3F4EA;
  --rouge: #B3261E;
  --rouge-clair: #FBE9E7;
  --ambre: #8A5A00;
  --ambre-clair: #FFF4D6;
  --cotis: #8FA8CF;
  --ombre: 0 1px 2px rgba(15, 26, 44, .06), 0 6px 18px -8px rgba(15, 26, 44, .18);
  --rayon: 14px;
  --police: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bleu: #8AB4F8; --bleu-2: #A8C7FA; --bleu-clair: #1B2B45; --bleu-tres-clair: #141F33;
    --fond: #0B111C; --surface: #121A28; --surface-2: #19243A; --encre: #E6ECF5; --encre-2: #B3BFD3;
    --encre-3: #8592A8; --bord: #26334B; --vert: #6FD49C; --vert-clair: #12301F; --rouge: #F2A097;
    --rouge-clair: #3A1714; --ambre: #F3C55B; --ambre-clair: #33270B; --cotis: #4F6A96;
    --ombre: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px -10px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bleu: #8AB4F8; --bleu-2: #A8C7FA; --bleu-clair: #1B2B45; --bleu-tres-clair: #141F33;
  --fond: #0B111C; --surface: #121A28; --surface-2: #19243A; --encre: #E6ECF5; --encre-2: #B3BFD3;
  --encre-3: #8592A8; --bord: #26334B; --vert: #6FD49C; --vert-clair: #12301F; --rouge: #F2A097;
  --rouge-clair: #3A1714; --ambre: #F3C55B; --ambre-clair: #33270B; --cotis: #4F6A96;
  --ombre: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 22px -10px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--encre);
  font: 16px/1.55 var(--police); overflow-x: hidden;
}
a { color: var(--bleu-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.muet { color: var(--encre-2); }
.petit { font-size: .875rem; }
.chiffre { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

.conteneur { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.entete { background: var(--bleu); color: #fff; }
:root[data-theme="dark"] .entete { background: #0A2A5E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .entete { background: #0A2A5E; } }
.entete .conteneur { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.logo .pastille { width: 30px; height: 30px; border-radius: 9px; background: #fff; color: #0D47A1; display: inline-grid; place-items: center; font-size: 1rem; font-weight: 800; }
.logo .cash { color: #9CC3FF; }
.entete .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-entete { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; padding: 6px 12px; font: 600 .875rem var(--police); cursor: pointer; }
.btn-entete:hover { background: rgba(255, 255, 255, .22); }

/* Bandeau d'accroche */
.accroche { background: linear-gradient(180deg, var(--bleu) 0%, var(--bleu) 40%, transparent 40%); padding-bottom: 8px; }
:root[data-theme="dark"] .accroche { background: linear-gradient(180deg, #0A2A5E 0%, #0A2A5E 40%, transparent 40%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .accroche { background: linear-gradient(180deg, #0A2A5E 0%, #0A2A5E 40%, transparent 40%); } }
.accroche .carte { padding: 24px; }
.accroche h1 { font-size: clamp(1.45rem, 3.6vw, 2.1rem); color: var(--encre); }
.accroche .promesse { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--encre-2); font-size: .925rem; }
.accroche .promesse li::before { content: "✓ "; color: var(--vert); font-weight: 700; }

/* Cartes et sections */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; margin: 16px 0; }
.etape { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; background: var(--bleu); color: #fff; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; margin-right: 8px; flex: none; }
:root[data-theme="dark"] .etape { color: #0B111C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .etape { color: #0B111C; } }
.titre-etape { display: flex; align-items: center; }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .grille-2 { grid-template-columns: 1fr; } }

/* Dépôt */
.depot { display: block; border: 2px dashed var(--bord); border-radius: 12px; padding: 22px 16px; text-align: center; background: var(--bleu-tres-clair); cursor: pointer; transition: border-color .15s, background .15s; }
.depot:hover, .depot.survol { border-color: var(--bleu-2); background: var(--bleu-clair); }
.depot strong { color: var(--bleu); }
.depot input { display: none; }
.liste-releves { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.liste-releves li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px; border: 1px solid var(--bord); border-radius: 10px; background: var(--surface); font-size: .9rem; }
.liste-releves .mois { font-weight: 600; min-width: 9em; }
.liste-releves .etat { margin-left: auto; font-weight: 600; font-size: .8rem; padding: 2px 8px; border-radius: 99px; }
.etat.ok { background: var(--vert-clair); color: var(--vert); }
.etat.ecart { background: var(--ambre-clair); color: var(--ambre); }
.etat.erreur { background: var(--rouge-clair); color: var(--rouge); }
.btn-x { border: none; background: transparent; color: var(--encre-3); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 4px; }
.btn-x:hover { color: var(--rouge); }

/* Formulaire salaire */
.champ { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.champ label, .legende { font-weight: 600; font-size: .9rem; }
input[type="number"], input[type="month"], select {
  font: inherit; color: var(--encre); background: var(--surface); border: 1px solid var(--bord);
  border-radius: 10px; padding: 8px 10px; min-height: 42px; max-width: 100%;
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid var(--bleu-clair); outline-offset: 1px; border-color: var(--bleu-2); }
.saisie-euro { display: flex; align-items: center; gap: 6px; }
.saisie-euro input { width: 9em; }
.case { display: flex; align-items: center; gap: 8px; font-size: .95rem; margin: 6px 0; }
.case input { width: 18px; height: 18px; accent-color: var(--bleu); }
.periodes { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.periode { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px; border: 1px solid var(--bord); border-radius: 10px; background: var(--bleu-tres-clair); font-size: .9rem; }
.periode input[type="number"] { width: 7.5em; }
.periode input[type="month"] { width: 10.5em; }
.btn { font: 600 .95rem var(--police); border-radius: 10px; padding: 9px 14px; cursor: pointer; border: 1px solid var(--bleu); background: var(--bleu); color: #fff; }
:root[data-theme="dark"] .btn { color: #0B111C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #0B111C; } }
.btn.secondaire { background: transparent; color: var(--bleu); }
.btn.danger { background: transparent; border-color: var(--rouge); color: var(--rouge); }
.btn:disabled { opacity: .5; cursor: default; }
.note { font-size: .85rem; color: var(--encre-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; }

/* Estimation immédiate à partir du brut (carte « Votre salaire », 09/11/2026) */
.estimation { background: var(--bleu-tres-clair); border: 1px solid var(--bord); border-radius: 12px; padding: 12px 14px; margin: 6px 0 14px; }
.estimation-titre { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-3); font-weight: 700; }
.estimation-ligne { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.estimation-valeur { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; color: var(--bleu); font-variant-numeric: tabular-nums; }
.estimation-detail { font-size: .85rem; color: var(--encre-2); margin: 4px 0 0; }

/* Tuiles */
.tuiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 920px) { .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tuiles { grid-template-columns: 1fr; } }
.tuile { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; box-shadow: var(--ombre); min-width: 0; }
.tuile .libelle { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--encre-3); font-weight: 700; }
.tuile .valeur { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tuile .sous { font-size: .85rem; color: var(--encre-2); }
.tuile.vedette { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.tuile.vedette .libelle, .tuile.vedette .sous { color: rgba(255, 255, 255, .85); }
:root[data-theme="dark"] .tuile.vedette { background: #0A2A5E; border-color: #1C4B94; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tuile.vedette { background: #0A2A5E; border-color: #1C4B94; } }

/* Tableaux */
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--encre-3); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.exclue td { color: var(--encre-3); }
tr.total td { font-weight: 700; border-top: 2px solid var(--bord); }
td.libelle-acte { white-space: normal; min-width: 12em; }
.neg { color: var(--rouge); }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; border-radius: 99px; padding: 1px 8px; background: var(--surface-2); color: var(--encre-2); }
.badge.tp { background: var(--bleu-clair); color: var(--bleu); }

/* Barres */
.barres { display: flex; flex-direction: column; gap: 10px; }
.barre-ligne { display: grid; grid-template-columns: minmax(8em, 15em) 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
@media (max-width: 560px) { .barre-ligne { grid-template-columns: 1fr auto; } .barre-ligne .piste { grid-column: 1 / -1; order: 3; } }
.piste { height: 12px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.plein { height: 100%; background: var(--bleu-2); border-radius: 99px; }
.plein.neg { background: var(--rouge); }
.annees-graphe { display: flex; gap: 18px; align-items: flex-end; min-height: 190px; padding: 8px 4px 0; overflow-x: auto; }
.annee-col { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 76px; }
.annee-col .duo { display: flex; gap: 6px; align-items: flex-end; height: 160px; }
.annee-col .b { width: 26px; border-radius: 6px 6px 0 0; min-height: 2px; }
.b.remb { background: var(--bleu-2); }
.b.cot { background: var(--cotis); }
.legende-graphe { display: flex; gap: 16px; font-size: .85rem; color: var(--encre-2); flex-wrap: wrap; }
.legende-graphe span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--c); }

details.detail { border: 1px solid var(--bord); border-radius: 10px; margin: 8px 0; background: var(--surface); }
details.detail > summary { cursor: pointer; padding: 10px 12px; font-weight: 600; }
details.detail[open] > summary { border-bottom: 1px solid var(--bord); }

.alerte { border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin: 10px 0; }
.alerte.info { background: var(--bleu-clair); color: var(--encre); }
.alerte.attention { background: var(--ambre-clair); color: var(--encre); }
.alerte.erreur { background: var(--rouge-clair); color: var(--encre); }

.vide { text-align: center; padding: 28px 12px; color: var(--encre-2); }
.methode li { margin-bottom: 6px; }
.pied { padding: 24px 0 40px; color: var(--encre-3); font-size: .85rem; }

/* ----------------------------------------------------------------------------
   Page « Les chiffres de la Sécu » (chiffres.html, 09/11/2026)
   Couleurs des segments : --c1…--c9, variantes sombres plus bas. */
:root { --c1: #0D47A1; --c2: #1E88E5; --c3: #64B5F6; --c4: #26A69A; --c5: #9CCC65; --c6: #FFB300; --c7: #FB8C00; --c8: #8D6E63; --c9: #B3261E; }
:root[data-theme="dark"] { --c1: #8AB4F8; --c2: #5E97F6; --c3: #3F6FC0; --c4: #4DB6AC; --c5: #AED581; --c6: #FFD54F; --c7: #FFA726; --c8: #A1887F; --c9: #EF5350; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c1: #8AB4F8; --c2: #5E97F6; --c3: #3F6FC0; --c4: #4DB6AC; --c5: #AED581; --c6: #FFD54F; --c7: #FFA726; --c8: #A1887F; --c9: #EF5350; } }
.entete .actions a.btn-entete { text-decoration: none; display: inline-flex; align-items: center; }
.sous-titre { font-size: 1rem; margin: 18px 0 8px; }
.empilee { margin: 10px 0 4px; }
.empilee-barre { display: flex; height: 34px; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.empilee-seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: .8rem; font-weight: 700; min-width: 0; overflow: hidden; white-space: nowrap; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); transition: filter .15s; }
.empilee-seg:hover { filter: brightness(1.08); }
.empilee-seg.avant { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.empilee-legende { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 18px; font-size: .9rem; }
.empilee-legende li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.empilee-legende li .lib { flex: 1 1 10em; }
.empilee-legende li.avant .lib, .empilee-legende li.avant strong { color: var(--encre); font-weight: 700; }
.pastille-coul { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; align-self: center; }
.fin-bloc { margin-top: 14px; }
.fin-bloc h4 { margin: 0 0 4px; font-size: .95rem; }
.solde-graphe { display: flex; gap: 6px; align-items: flex-end; overflow-x: auto; padding: 6px 2px 0; }
.solde-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 44px; flex: 1 0 44px; }
.solde-col.prev .solde-barre { opacity: .55; background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, .35) 4px 8px); }
.solde-zone { display: flex; align-items: flex-start; justify-content: center; width: 100%; position: relative; }
.solde-barre { width: 70%; max-width: 40px; border-radius: 0 0 6px 6px; position: relative; }
.solde-barre.neg { background: var(--rouge); }
.solde-barre.pos { background: var(--vert); }
.solde-val { position: absolute; left: 50%; transform: translateX(-50%); bottom: -20px; font-size: .72rem; font-weight: 700; color: var(--encre-2); white-space: nowrap; }
.solde-trou { align-self: center; }
.solde-annee { margin-top: 18px; }
.piste.piste-double { position: relative; height: 14px; }
.piste.piste-double .plein { position: absolute; left: 0; top: 0; }
.piste.piste-double .plein.oc { background: var(--cotis); opacity: .85; left: auto; right: 0; border-radius: 99px; }
.sources-liste { margin: 8px 0 0; padding-left: 18px; font-size: .9rem; }
.sources-liste li { margin-bottom: 4px; }
.sources-liste a { color: var(--bleu); }

/* Porte d'accès */
.porte { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--fond); }
.porte .carte { width: 100%; max-width: 400px; text-align: center; }
.porte .logo { color: var(--bleu); font-size: 1.8rem; justify-content: center; margin-bottom: 8px; }
.porte .logo .pastille { background: var(--bleu); color: #fff; }
.porte .logo .cash { color: var(--bleu-2); }
.porte form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.porte input { font: inherit; font-size: 1.1rem; text-align: center; padding: 10px; border: 1px solid var(--bord); border-radius: 10px; background: var(--surface); color: var(--encre); }
.porte .message { min-height: 1.4em; color: var(--rouge); font-size: .9rem; }
