/* graphiques_stats.css : styles de la famille « statistiques » (graphiques_stats.js).
   Uniquement des jetons existants : --graph-1 à --graph-16, --graph-fond, --graph-sur, --graph-axe,
   --graph-grille (graphiques.css) et --ink, --ink-2, --bg-*, --line*, --ok, --warn, --bad, --info
   (app.css). Thèmes sombre et clair hérités des jetons. Aucune couleur seule : formes, motifs,
   libellés et tirets accompagnent toujours la teinte. */

/* ==================================================================== Encarts */
.gs-encart-fond { fill: color-mix(in srgb, var(--bg-1) 90%, transparent); stroke: var(--line); stroke-width: 1; }
.gg text.gs-encart-titre { font-size: var(--gg-fs-base); font-weight: 600; fill: var(--ink); }
.gg text.gs-encart-txt { font-size: var(--gg-fs-petit); fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.gg text.gs-bandeau-txt { font-size: var(--gg-fs-base); fill: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ==================================================================== Nuage, bulles */
.gs-dense .gg-marqueur { fill-opacity: .62; stroke-width: .6; }
.gs-dense .gg-marqueur.gg-creux { fill-opacity: 1; stroke-width: 1.1; }
.gs-bande-conf { fill: var(--c); fill-opacity: .16; stroke: none; }
.gs-reg { fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linecap: round; }
.gs-reg-globale { stroke-width: 2.4; }
.gs-reg-clic { fill: none; stroke: transparent; stroke-width: 12; pointer-events: stroke; cursor: pointer; }
.gs-bulle { fill: var(--c); fill-opacity: .42; stroke: var(--c); stroke-width: 1.4; }
.gs-bulle-centre { stroke-width: .8; }
.gs-marge { fill: var(--c); fill-opacity: .2; stroke: var(--c); stroke-width: 1.2; stroke-linejoin: round; }
.gs-cle-cercle { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.gs-cle-trait { stroke: var(--ink-2); stroke-width: .8; stroke-dasharray: 2 2; }

/* ==================================================================== Carte de chaleur */
.gs-cellule { stroke: none; }
.gs-cellule.gg-survol { filter: none; stroke: var(--ink); stroke-width: 1.5; }
/* séquentielle : du fond vers --graph-1 */
.gs-cs0 { fill: color-mix(in oklab, var(--graph-1) 9%, var(--graph-fond)); }
.gs-cs1 { fill: color-mix(in oklab, var(--graph-1) 19%, var(--graph-fond)); }
.gs-cs2 { fill: color-mix(in oklab, var(--graph-1) 30%, var(--graph-fond)); }
.gs-cs3 { fill: color-mix(in oklab, var(--graph-1) 41%, var(--graph-fond)); }
.gs-cs4 { fill: color-mix(in oklab, var(--graph-1) 52%, var(--graph-fond)); }
.gs-cs5 { fill: color-mix(in oklab, var(--graph-1) 63%, var(--graph-fond)); }
.gs-cs6 { fill: color-mix(in oklab, var(--graph-1) 75%, var(--graph-fond)); }
.gs-cs7 { fill: color-mix(in oklab, var(--graph-1) 87%, var(--graph-fond)); }
.gs-cs8 { fill: var(--graph-1); }
/* divergente : --graph-1 (négatif) <- neutre -> --graph-4 (positif) */
.gs-cd0 { fill: var(--graph-1); }
.gs-cd1 { fill: color-mix(in oklab, var(--graph-1) 72%, var(--graph-fond)); }
.gs-cd2 { fill: color-mix(in oklab, var(--graph-1) 46%, var(--graph-fond)); }
.gs-cd3 { fill: color-mix(in oklab, var(--graph-1) 22%, var(--graph-fond)); }
.gs-cd4 { fill: color-mix(in oklab, var(--ink) 7%, var(--graph-fond)); }
.gs-cd5 { fill: color-mix(in oklab, var(--graph-4) 22%, var(--graph-fond)); }
.gs-cd6 { fill: color-mix(in oklab, var(--graph-4) 46%, var(--graph-fond)); }
.gs-cd7 { fill: color-mix(in oklab, var(--graph-4) 72%, var(--graph-fond)); }
.gs-cd8 { fill: var(--graph-4); }
.gs-cellule-nd { fill: transparent; stroke: var(--graph-axe); stroke-width: 1; stroke-dasharray: 2 2; }
.gs-nd-trait { stroke: var(--graph-axe); stroke-width: 1; pointer-events: none; }
.gg text.gs-cel-txt { font-size: var(--gg-fs-petit); fill: var(--ink); font-variant-numeric: tabular-nums; pointer-events: none; }
.gg text.gs-cel-txt.gs-cel-fonce { fill: var(--graph-sur); }
.gg text.gs-rampe-txt { font-size: var(--gg-fs-petit); fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.gs-marge-barre { fill: color-mix(in srgb, var(--ink-2) 55%, transparent); }
.gs-marge-barre.gg-survol { filter: none; fill: var(--ink); }
.gg text.gs-marge-txt { font-size: var(--gg-fs-petit); fill: var(--ink-2); }

/* ==================================================================== Boîtes, violons */
.gs-zone-cible { fill: transparent; }
.gs-zone-cible.gg-survol { filter: none; fill: var(--graph-curseur); }
.gs-boite { fill: color-mix(in srgb, var(--c) 30%, transparent); stroke: var(--c); stroke-width: 1.5; stroke-linejoin: round; }
.gs-boite-motif { stroke: none; }
.gs-moustache { stroke: var(--c); stroke-width: 1.3; stroke-linecap: round; }
.gs-mediane { stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.gs-moyenne { fill: var(--graph-fond); stroke: var(--ink); stroke-width: 1.4; }
.gs-aberrant { fill: var(--graph-fond); stroke: var(--c); stroke-width: 1.4; }
.gs-aberrant.gs-extreme { fill: var(--c); stroke: var(--graph-fond); }
.gs-brut { fill: var(--c); fill-opacity: .5; stroke: none; pointer-events: none; }
.gs-violon { fill: color-mix(in srgb, var(--c) 34%, transparent); stroke: var(--c); stroke-width: 1.3; stroke-linejoin: round; }
.gs-violon-trait { stroke: var(--ink-2); stroke-width: 1.2; }
.gs-violon-boite { fill: var(--ink-2); }
.gs-violon-mediane { fill: var(--graph-fond); stroke: var(--ink); stroke-width: 1.6; }
.gs-ref-ligne { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 6 3 1.5 3; }
.gg text.gs-ref-txt { font-size: var(--gg-fs-petit); font-style: italic; fill: var(--ink-2); paint-order: stroke; stroke: var(--graph-fond); stroke-width: 3px; stroke-linejoin: round; }

/* ==================================================================== Histogramme */
.gs-hist { fill-opacity: .82; }
.gs-hist-contour { fill: var(--c); fill-opacity: .1; stroke: var(--c); stroke-width: 1.6; stroke-linejoin: round; }
.gs-tiret-1 { stroke-dasharray: 7 3; }
.gs-tiret-2 { stroke-dasharray: 2 2.5; }
.gs-tiret-3 { stroke-dasharray: 9 3 2 3; }
.gs-densite { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gs-densite.gs-densite-serie { stroke: var(--c); }
.gs-normale { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.gs-repere-stat { stroke: var(--ink); stroke-width: 1.2; pointer-events: none; }
.gs-repere-mediane { stroke-dasharray: 5 3; }
.gs-repere-quantile { stroke: var(--ink-2); stroke-dasharray: 1.5 3; }
.gg text.gs-repere-txt { font-size: var(--gg-fs-petit); font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--graph-fond); stroke-width: 3px; stroke-linejoin: round; font-variant-numeric: tabular-nums; }

/* ==================================================================== Carte de contrôle */
.gs-zone-c { fill: color-mix(in srgb, var(--ok) 7%, transparent); }
.gs-zone-b { fill: color-mix(in srgb, var(--warn) 7%, transparent); }
.gs-zone-a { fill: color-mix(in srgb, var(--bad) 8%, transparent); }
.gs-limite { stroke: var(--bad); stroke-width: 1.3; stroke-dasharray: 6 3; }
.gs-centre { stroke: var(--ink-2); stroke-width: 1.3; }
.gs-spec { stroke: var(--info); stroke-width: 1.2; stroke-dasharray: 2 3; }
.gg text.gs-limite-txt { font-size: var(--gg-fs-petit); font-weight: 600; fill: var(--bad); font-variant-numeric: tabular-nums; }
.gg text.gs-centre-txt { font-size: var(--gg-fs-petit); fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.gg text.gs-spec-txt { font-size: var(--gg-fs-petit); fill: var(--info); paint-order: stroke; stroke: var(--graph-fond); stroke-width: 3px; stroke-linejoin: round; }
.gs-ligne-controle { stroke-width: 1.6; }
.gs-ligne-mr { stroke-width: 1.3; }
.gs-hors { fill: var(--bad); stroke: var(--graph-fond); stroke-width: 1.4; }
.gg text.gs-regle-txt { font-size: var(--gg-fs-petit); font-weight: 700; fill: var(--bad); paint-order: stroke; stroke: var(--graph-fond); stroke-width: 3px; stroke-linejoin: round; }

/* ==================================================================== Contraste forcé */
@media (forced-colors: active) {
  .gs-bande-conf, .gs-marge, .gs-bulle, .gs-boite, .gs-violon, .gs-hist-contour { fill: Canvas; stroke: CanvasText; }
  .gs-reg, .gs-densite, .gs-limite, .gs-centre, .gs-moustache, .gs-mediane { stroke: CanvasText; }
  .gs-hors { fill: Highlight; }
  [class*="gs-cs"], [class*="gs-cd"] { forced-color-adjust: none; }
}

/* Densités marginales : au-delà de 4 groupes, ensemble en fond et contours par groupe */
.gs-marge-fine { fill: none; stroke-width: 1; }
.gs-marge-total .gs-marge { fill: var(--ink-2); fill-opacity: .16; stroke: var(--ink-2); stroke-width: 1; }
