/* Rubrique « Stats » (src/web/modules/stats.js). Mêmes groupes, lignes et boutons que Modération et Staff. */
.g-stats { --a: #7dd3fc; --b: #2f72cf; }
.st { display: grid; gap: 20px; }
.st-vide { margin: 0; padding: 6px 22px 14px; color: var(--attenue); font-size: 14.5px; line-height: 20px; }
/* Rien de compté : une carte qui dit quand les chiffres arrivent */
.st-attente { display: grid; gap: 6px; padding: 4px 22px 20px; color: var(--attenue); font-size: 15px; line-height: 22px; }
.st-attente p { margin: 0; }
.st-attente .st-attente-titre { color: var(--texte); font-size: 17px; font-weight: 600; }
.st-note { margin: 0; padding: 2px 22px 8px; color: var(--attenue); font-size: 14px; line-height: 19px; }

/* Période */
.st-outils { padding: 4px 22px 8px; }
.st-periodes { max-width: 100%; }
.st-periodes button { padding: 0 14px; }
@media (max-width: 420px) { .st-periodes { display: flex; } .st-periodes button { flex: 1 1 auto; padding: 0 8px; font-size: 14px; } }

/* Chiffres clés : 4 sur une ligne, 2 × 2 sur téléphone */
.st-chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 8px 22px 4px; }
@container panneau (min-width: 760px) { .st-chiffres { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.st-chiffre { display: grid; align-content: start; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--tuile-survol); min-width: 0; }
.st-etiquette { color: var(--attenue); font-size: 13.5px; line-height: 18px; font-weight: 600; }
.st-chiffre b { font-size: 26px; line-height: 32px; font-weight: 700; overflow-wrap: anywhere; }
.st-delta { color: var(--attenue); font-size: 13px; line-height: 17px; overflow-wrap: anywhere; }
@media (max-width: 420px) { .st-chiffres { gap: 6px; } .st-chiffre { padding: 10px 12px; } .st-chiffre b { font-size: 22px; line-height: 28px; } .st-delta { font-size: 12.5px; } }

/* Graphiques */
.st-figure { margin: 0; padding: 12px 22px 10px; }
.st-legende { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 8px; color: var(--attenue); font-size: 14px; font-weight: 600; }
.st-legende-texte { font-weight: 500; }
.st-courbes button { min-height: 32px; padding: 0 12px; font-size: 14px; }
@media (max-width: 420px) { .st-legende > span:first-child { flex: 1 1 100%; } .st-courbes { display: flex; width: 100%; } .st-courbes button { flex: 1 1 auto; } }
.st-legende-cles { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--texte); }
.st-legende-cles > span { display: inline-flex; align-items: center; gap: 7px; }
.st-cle { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.st-cle-1 { background: var(--bleu); }
.st-cle-2 { background: #7b7e87; }

.st-graphe { position: relative; min-height: 120px; border-radius: 8px; touch-action: pan-y; }
.st-graphe:focus-visible { outline-offset: 4px; }
.st-svg { display: block; overflow: visible; }
.st-axe text { fill: var(--attenue); font-size: 12px; font-variant-numeric: tabular-nums; }
.st-grille { stroke: rgb(255 255 255 / .07); stroke-width: 1; }
.st-base, .st-zero { stroke: rgb(255 255 255 / .2); stroke-width: 1; }
.st-barre { fill: var(--bleu); transition: fill .15s; }
.st-barre-2 { fill: #7b7e87; }
.st-barre.st-vu { fill: var(--bleu-clair); }
.st-barre-2.st-vu { fill: #a3a6ad; }
.st-ligne { fill: none; stroke: var(--bleu); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.st-point { fill: var(--bleu); stroke: var(--tuile); stroke-width: 2; }
.st-point-vu { fill: var(--bleu-clair); }
.st-repere { stroke: rgb(255 255 255 / .28); stroke-width: 1; }
.st-zone { fill: transparent; cursor: crosshair; }

/* Bulle de valeur, posée au-dessus de la marque survolée (--x, --y en JavaScript) */
.st-bulle { position: absolute; left: var(--x, 0); top: var(--y, 0); transform: translate(-50%, calc(-100% - 10px)); z-index: 2; pointer-events: none;
  padding: 7px 11px; border-radius: 10px; background: var(--tuile-haute); box-shadow: 0 6px 18px rgb(0 0 0 / .35); white-space: nowrap; }
.st-bulle p { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 13.5px; line-height: 19px; color: var(--attenue); }
.st-bulle p b { color: var(--texte); font-weight: 700; font-variant-numeric: tabular-nums; }
.st-bulle .st-bulle-titre { color: var(--texte); font-weight: 600; font-size: 13px; margin-bottom: 1px; }
.st-bulle .st-cle { width: 8px; height: 8px; }

/* Les plus actifs : 2 colonnes sur grand écran */
.st-colonnes { display: grid; gap: 4px 0; padding: 0 0 6px; }
@media (min-width: 735px) { .st-colonnes { grid-template-columns: 1fr 1fr; } }
.st-liste { min-width: 0; }
.st-titre { margin: 0; padding: 12px 22px 4px; font-size: 15px; line-height: 20px; font-weight: 600; }
.st-rangs { list-style: none; margin: 0; padding: 0 0 6px; }
.st-rang { padding: 7px 22px; min-width: 0; }
.st-rang-tete { display: flex; align-items: baseline; gap: 10px; font-size: 15px; line-height: 20px; }
.st-place { color: var(--attenue); font-variant-numeric: tabular-nums; min-width: 1.2em; }
.st-qui { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.st-n { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.st-jauge { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: var(--tuile-haute); overflow: hidden; }
.st-jauge > span { display: block; height: 100%; width: calc(var(--l, 0) * 100%); border-radius: 3px; background: var(--bleu); transition: width .5s var(--sortie); }

/* Réglages */
.st-puces { justify-content: flex-end; }
@media (max-width: 734px) { .st-puces { justify-content: flex-start; } }

@media (prefers-reduced-motion: reduce) { .st-jauge > span, .st-barre { transition: none; } }
@media (min-width: 735px) { .st-ligne-bouton > div:last-child { display: flex; justify-content: flex-end; } }
.st-bulle.st-bulle-bas { transform: translate(-50%, 12px); }
