/* --- Statistiques (collège, 2de pro) : tableaux d'effectifs, droite graduée, graphiques SVG --- */
:root {
  --st-ink: #334155;
  --st-in: #16a34a;
  --st-out: #dc2626;
  --st-c0: #0d9488;
  --st-c1: #f59e0b;
  --st-c2: #7c3aed;
  --st-c3: #e11d48;
  --st-c4: #2563eb;
}

[data-bs-theme="dark"] {
  --st-ink: #cbd5e1;
  --st-in: #4ade80;
  --st-out: #f87171;
  --st-c0: #2dd4bf;
  --st-c1: #fbbf24;
  --st-c2: #a78bfa;
  --st-c3: #fb7185;
  --st-c4: #60a5fa;
}

.st-intro { color: var(--school-text-muted); font-style: italic; }

/* Tableau d'effectifs : ligne demandée et ligne du total */
.st-table { width: auto; min-width: 60%; }
.st-table th, .st-table td { text-align: center; padding: 0.25rem 0.75rem; }
.st-table th:first-child, .st-table td:first-child { text-align: left; }
.st-table .st-mark td { background: var(--mm-teal-soft); font-weight: 600; }
.st-table .st-total td { border-top: 2px solid var(--school-border); font-weight: 600; }

.st-answer { color: var(--mm-teal); font-weight: 600; }

/* Graphiques et droite graduée */
.st-svg {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 0.75rem;
}

.st-axis { stroke: var(--st-ink); stroke-width: 1.5; }
.st-grid { stroke: var(--school-border); stroke-width: 1; stroke-dasharray: 3 3; }
.st-axis-label { fill: var(--st-ink); font-size: 11px; }
.st-axis-title { fill: var(--st-ink); font-size: 11px; font-weight: 600; }
.st-bracket { fill: var(--mm-teal); font-size: 24px; font-weight: 700; }
.st-range { stroke: var(--mm-teal); stroke-width: 6; stroke-linecap: butt; opacity: 0.6; }
.st-in { fill: var(--st-in); }
.st-out { fill: var(--st-out); }
.st-stick { stroke: var(--mm-teal); stroke-width: 4; }
.st-bar { fill: var(--mm-teal); fill-opacity: 0.55; stroke: var(--mm-teal); stroke-width: 1.5; }

.st-c0 { fill: var(--st-c0); }
.st-c1 { fill: var(--st-c1); }
.st-c2 { fill: var(--st-c2); }
.st-c3 { fill: var(--st-c3); }
.st-c4 { fill: var(--st-c4); }
path.st-c0, path.st-c1, path.st-c2, path.st-c3, path.st-c4 { stroke: var(--school-surface, #fff); stroke-width: 1.5; }

/* Indicateurs : valeurs en pastilles, série rangée avec ses rangs, médiane de la boîte */
.is-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.75rem; }
.is-ranked { display: inline-flex; flex-direction: column; align-items: center; }
.is-ranked small { color: var(--school-text-muted); font-size: 0.7rem; }
.is-median { stroke: var(--st-c1); stroke-width: 4; }
