/* Page /mes-statistiques/ : mêmes jetons que /nouvelles/. Police Inter servie par le site (aucune requête à un tiers). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("fonts/inter-semibold.woff2") format("woff2"); }
:root {
  color-scheme: dark;
  --bg: #0b0c0b; --surface: #151715; --surface-2: #1c1f1d; --line: #282c29;
  --ink: #f3f4f2; --muted: #929994; --green: #73d4a5; --red: #f08a8a;
  --C: #9fdcbd; --PC: #8ab9fb; --R: #b993ef; --SR: #f082b8; --UR: #f5a66e; --L: #f1ce63;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --gutter: 16px;
}
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; margin: 0; padding: env(safe-area-inset-top) env(safe-area-inset-right) calc(32px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
  background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green); }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }

.top { position: relative; width: min(1100px, 100%); margin: 0 auto; padding: 18px var(--gutter) 10px; text-align: center; }
.top h1 { font-size: clamp(26px, 5vw, 36px); font-weight: 700; letter-spacing: -0.02em; margin-top: 8px; }
.lede { color: var(--muted); margin: 8px auto 0; max-width: 620px; }
.racine { position: absolute; top: 14px; right: var(--gutter); display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; background: var(--surface); }
.racine:hover { border-color: #3a403c; background: var(--surface-2); }
.racine svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.page { width: min(1100px, 100%); margin: 0 auto; padding: 12px var(--gutter); display: grid; gap: 16px; }
/* Un tableau large défile dans sa carte au lieu d'élargir la page (élément de grille : min-width auto). */
.page > *, #resultat > * { min-width: 0; }
.carte { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.carte h3 { font-size: 16px; margin-bottom: 10px; }
.note { color: var(--muted); font-size: 13px; }
.erreur { color: var(--red); font-size: 14px; }
.extension { max-width: 560px; width: 100%; margin: 0 auto; padding: 12px 16px; font-size: 14px; color: var(--muted); }
.extension.manque { color: var(--red); }
.extension.maj { color: var(--L); }
.ouvrir[aria-disabled="true"] { opacity: 0.55; }

.ouvrir { display: grid; gap: 12px; max-width: 560px; width: 100%; margin: 0 auto; }
.depot { display: grid; place-items: center; min-height: 110px; padding: 16px; border: 1.5px dashed #3a403c; border-radius: 14px; text-align: center; cursor: pointer; color: var(--muted); }
.depot.survol, .depot:hover { border-color: var(--green); color: var(--ink); }
.depot input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.depot:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.champ { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.code-ligne { display: flex; gap: 8px; }
.code-ligne input { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.bouton.petit { flex: 0 0 auto; padding: 0 12px; font-size: 13px; }
input[type="search"], input[type="password"], input[type="text"], select { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
#profil:focus { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.bouton { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--green); color: #0b0c0b; font-weight: 600; }
.bouton:disabled { opacity: 0.6; cursor: progress; }
.bouton.discret { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.bouton.danger { color: var(--red); }
.prive { display: grid; gap: 14px; width: min(760px, 100%); margin: 0 auto; }
.prive h2 { font-size: 20px; }
.connexion { display: grid; gap: 12px; }
.choix { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--muted); }
.choix input { flex: 0 0 auto; margin: 4px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.etat-prive { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--muted); font-size: 13px; }
.etat-prive[data-etat="online"] { color: var(--green); }
.etat-prive[data-etat="offline"] { color: var(--L); }
.mode-lecture { display: grid; gap: 10px; width: min(760px, 100%); margin: 0 auto; }
.mode-lecture legend { color: var(--muted); font-size: 13px; padding: 0 6px; }
.sauvegarde-code { display: grid; gap: 10px; border: 1px solid var(--L); border-radius: 10px; padding: 12px; }

.entete { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.entete h2 { font-size: 22px; }
.indicateurs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; }
.indicateur .valeur { font-size: 24px; font-weight: 700; }
.raretes, .tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.raretes th, .raretes td, .tableau th, .tableau td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--line); }
.raretes .num, .tableau .num { text-align: right; font-variant-numeric: tabular-nums; }
.tableau th { color: var(--muted); font-weight: 500; font-size: 13px; }
.tableau td:first-child, .tableau td.num { white-space: nowrap; }
.defile { overflow-x: auto; }
.espace { margin-top: 10px; }
.code { font-weight: 700; color: var(--r, var(--ink)); }
.barre { height: 6px; min-width: 50px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.barre span { display: block; height: 100%; background: var(--r, var(--green)); }
.r-C { --r: var(--C); } .r-PC { --r: var(--PC); } .r-R { --r: var(--R); } .r-SR { --r: var(--SR); } .r-UR { --r: var(--UR); } .r-L { --r: var(--L); }

.filtres { display: grid; gap: 10px; grid-template-columns: 2fr 1fr 1fr; margin-bottom: 10px; }
.paquets { display: grid; gap: 10px; margin: 10px 0; }
.paquet { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.paquet header { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 6px; }
.type { font-size: 12px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.paquet ul { list-style: none; margin: 0; padding: 0; }
.paquet li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 3px 0; font-size: 14px; }
.paquet li a { color: var(--ink); text-decoration: none; } .paquet li a:hover { text-decoration: underline; }
.shiny { color: var(--L); font-size: 12px; }

.duo { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.duo > .carte { min-width: 0; }

/* Graphiques (graphiques.js) : une série, la couleur du site ; texte toujours dans les encres du texte. */
.graphe { position: relative; margin: 10px 0 0; border-radius: 8px; }
.graphe:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.graphe svg { display: block; overflow: visible; font: 11px var(--sans); touch-action: pan-y; }
.graphe text { fill: var(--muted); font-variant-numeric: tabular-nums; }
.graphe .grille { stroke: var(--line); stroke-width: 1; }
.graphe .base { stroke: #3a403c; stroke-width: 1; }
.graphe .col { fill: var(--green); }
.graphe .col.actif { fill: #b5f0d2; }
.graphe .trait { fill: none; stroke: var(--green); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.graphe .point { fill: var(--green); stroke: var(--surface); stroke-width: 2; }
.graphe .repere { stroke: #4a514c; stroke-width: 1; }
.graphe .case { stroke: none; }
.graphe .case.actif { stroke: var(--ink); stroke-width: 1.5; }
.h0 { fill: var(--surface-2); } .h1 { fill: #1f3d2f; } .h2 { fill: #2b5f46; } .h3 { fill: #3d8562; } .h4 { fill: #58ae84; } .h5 { fill: #92e2b9; }
.bulle { position: absolute; z-index: 2; pointer-events: none; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: #0b0c0b; color: var(--ink); font-size: 13px; line-height: 1.4; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.bulle .titre { font-weight: 600; }
.bulle div:not(.titre) { color: var(--muted); }
.donnees { margin-top: 8px; }
.donnees summary { color: var(--muted); font-size: 13px; cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.donnees .defile { max-height: 320px; overflow: auto; }

.recherchees, .souvent { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.recherchees li, .souvent li { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.recherchees .titre { color: var(--ink); font-weight: 600; text-decoration: none; }
.recherchees a.titre:hover { text-decoration: underline; }
.par { color: var(--muted); font-size: 13px; }
.par a { color: var(--green); }
.paquet li .par { flex-basis: 100%; padding-left: 26px; }
.paquet li .par a { color: var(--green); text-decoration: underline; }
.souvent .titre { flex: 1; min-width: 0; }
.souvent .fois { font-variant-numeric: tabular-nums; }
#recherchees-plus { margin-top: 10px; }

@media (max-width: 640px) {
  .top { padding-top: 66px; }
  .racine { top: 12px; }
  .filtres { grid-template-columns: 1fr; }
}
