/* ============================================================
   Page « Statistiques » (cf. js/pages/stats.js)
   ============================================================
   st-   la coque : en-tête, onglets, attente, bulle ;
   sth-  les rapports de référence (stats-themes.js) ;
   sti-  l'Analyse interactive (stats-interactive.js).
   Discipline (sd-) et Suivi joueurs CO (sj-) ont leur propre feuille.

   Les quatre bandes de rang sont celles de l'appli (rank-band-*) :
   1-3 vert d'eau, 4-6 jaune, 7-9 orange, 10-14 rose — en pastilles
   claires à texte nuit, lisibles sur le fond sombre du site.
   FLUIDITÉ : on n'anime que transform, opacity et stroke-dashoffset ; un
   graphique retracé à la volée (largeur qui change) ne rejoue pas ses
   animations (.sans-anim). */

.st-page {
  --b1: #9fddd2; --b2: #ffda72; --b3: #ffbd79; --b4: #ff99b3;
  --bon: #36d27a; --mauvais: #ff5a63;
}

/* ---------------- Coque ---------------- */
.st-entete { margin-bottom: 18px; }
.st-onglets { max-width: 100%; min-width: 0; margin-bottom: 20px; }
.st-onglets .segments { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.st-onglets .segments::-webkit-scrollbar { display: none; }
.st-court { display: none; }
.st-corps { min-width: 0; }
.st-attente { display: flex; align-items: center; gap: 12px; padding: 50px 0; color: var(--texte-3); font-weight: 650; }
.st-attente i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--bleu-2); border-right-color: transparent; animation: tourne .8s linear infinite; }
.st-vide { padding: 46px 20px; text-align: center; color: var(--texte-3); border-radius: 18px; border: 1px dashed var(--ligne-2); }
.st-vide b { display: block; margin-bottom: 6px; color: var(--texte); font: 600 20px var(--titre); text-transform: uppercase; }

.st-bulle {
  position: fixed; z-index: 70; left: 0; top: 0; max-width: 300px; padding: 10px 13px; border-radius: 12px; pointer-events: none;
  background: rgba(8, 16, 42, .97); border: 1px solid var(--ligne-2); box-shadow: 0 18px 44px -14px rgba(0, 0, 0, .85);
  font-size: 12.5px; line-height: 1.45; color: var(--texte-2); opacity: 0; transition: opacity .15s;
}
.st-bulle.est-visible { opacity: 1; }
.st-bulle b { display: block; color: #fff; font-size: 13px; }
.st-bulle span { display: block; color: var(--texte); font-weight: 700; }
.st-bulle small { display: block; color: var(--texte-3); }

/* ---------------- Réglages ---------------- */
.sth-barre, .sti-reglages {
  position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 16px; padding: 14px 16px;
  border-radius: 18px; background: linear-gradient(135deg, rgba(47, 107, 255, .1), rgba(255, 255, 255, .02)); border: 1px solid var(--ligne);
}
.sth-champ { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sth-champ > span:first-child { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--texte-3); }
.sth-champ .liste-deroulante select { max-width: 100%; min-width: 0; }
.sth-champ .liste-deroulante { max-width: 100%; }
.sth-kpi-b {
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--ligne-2);
  background: var(--surface-2); color: var(--texte); font-weight: 700; font-size: 13.5px; transition: background .2s, border-color .2s;
}
.sth-kpi-b svg { width: 17px; height: 17px; color: var(--ciel); }
.sth-kpi-b b { padding: 1px 9px; border-radius: 999px; font-size: 11.5px; background: rgba(47, 107, 255, .3); color: #dfe8ff; }
.sth-kpi-b:hover, .sth-kpi-b.est-actif { background: var(--surface-3); border-color: rgba(143, 179, 255, .45); }
.sth-bascule {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 4px; border: 0; background: none; color: var(--texte-2); font-weight: 650; font-size: 13.5px; text-align: left;
}
.sth-bascule i { position: relative; flex: none; width: 38px; height: 22px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid var(--ligne-2); transition: background .25s; }
.sth-bascule i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #cfd9f5; transition: transform .3s var(--ressort); }
.sth-bascule.est-actif i { background: linear-gradient(135deg, var(--bleu), #1d47c9); border-color: transparent; }
.sth-bascule.est-actif i::after { transform: translateX(16px); background: #fff; }
.sth-bascule.est-actif { color: var(--texte); }

/* Le choix des KPI */
.sth-choix {
  margin: -4px 0 18px; padding: 16px; border-radius: 18px; background: rgba(9, 18, 46, .96); border: 1px solid var(--ligne-2);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .9); animation: monte .3s var(--ressort);
}
.sth-choix[hidden] { display: none; }
.sth-choix-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sth-choix-tete .champ { flex: 1 1 260px; min-width: 0; }
.sth-choix-tete .champ input { min-width: 0; width: 100%; }
.sth-choix-n { font-size: 12.5px; font-weight: 750; color: var(--texte-2); }
.sth-choix-aide { margin: 10px 0 4px; font-size: 12.5px; color: var(--texte-3); }
.sth-groupes { max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.sth-groupe h4 { margin: 14px 0 7px; font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--ciel); }
.sth-groupe > div { display: flex; flex-wrap: wrap; gap: 6px; }
.sth-puce {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--ligne);
  background: var(--surface-2); color: var(--texte-2); font-size: 12.5px; font-weight: 650; text-align: left; transition: background .2s, color .2s, border-color .2s, transform .15s var(--ressort);
}
.sth-puce:active { transform: scale(.96); }
.sth-puce:hover { color: var(--texte); border-color: var(--ligne-2); }
.sth-puce em { font-style: normal; display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: #fff; color: #10224f; font-size: 11px; font-weight: 800; }
.sth-puce small { color: var(--texte-3); font-size: 11px; }
.sth-puce.est-choisi { color: #fff; background: linear-gradient(135deg, rgba(47, 107, 255, .55), rgba(33, 73, 196, .55)); border-color: rgba(143, 179, 255, .5); }
.sth-puce.est-bloque { opacity: .4; cursor: not-allowed; }
.sth-rien { padding: 20px; color: var(--texte-3); }

/* ---------------- Le rapport ---------------- */
.sth-tete {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  padding: 20px 24px; border-radius: 22px; margin-bottom: 16px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(47, 107, 255, .32), transparent 55%), linear-gradient(120deg, #0d1d4f, #0a1433 60%, #1a0d2e);
  border: 1px solid rgba(143, 179, 255, .2);
}
.sth-tete::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(224, 49, 58, .22), transparent 65%); pointer-events: none; }
.sth-tete-g { position: relative; z-index: 1; display: flex; align-items: center; gap: 16px; min-width: 0; }
.sth-tete-g img { width: 64px; height: auto; flex: none; filter: drop-shadow(0 10px 24px rgba(47, 107, 255, .55)); animation: flotte 4s ease-in-out infinite; }
.sth-mono { flex: none; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, #2f6bff, #6b1022); font: 600 20px var(--titre); color: #fff; }
.sth-tete .surtitre { margin-bottom: 4px; }
.sth-tete h2 { margin: 0; font: 600 clamp(22px, 2.6vw, 34px)/1.02 var(--titre); letter-spacing: .02em; }
.sth-tete h2 em { font-style: normal; background: linear-gradient(90deg, #fff, var(--ciel)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sth-tete p { margin: 6px 0 0; color: var(--texte-2); font-size: 14px; }
.sth-legende { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.sth-legende b { margin-right: 4px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--texte-3); }

.sth-pil { display: inline-block; min-width: 54px; padding: 4px 9px; border-radius: 999px; text-align: center; font-weight: 800; font-size: 12.5px; font-variant-numeric: tabular-nums; color: #0b1636; white-space: nowrap; }
.sth-pil.b1 { background: var(--b1); } .sth-pil.b2 { background: var(--b2); } .sth-pil.b3 { background: var(--b3); } .sth-pil.b4 { background: var(--b4); }
.sth-pil.na { background: rgba(255, 255, 255, .07); color: var(--texte-3); }
.sth-legende .sth-pil { min-width: 0; }

.sth-grille { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.sth-carte {
  position: relative; min-width: 0; padding: 18px 20px; border-radius: 20px;
  background: linear-gradient(165deg, rgba(47, 107, 255, .08), rgba(255, 255, 255, .02) 48%); border: 1px solid var(--ligne);
}
.sth-carte h3 { margin: 0 0 12px; font: 600 19px/1.1 var(--titre); text-transform: uppercase; letter-spacing: .03em; }
.sth-cote { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sth-defile { overflow-x: auto; margin: 0 -6px; padding: 0 6px 4px; scrollbar-width: thin; }

.sth-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.sth-table th, .sth-table td { padding: 7px 6px; border-bottom: 1px solid var(--ligne); text-align: center; }
.sth-table thead th { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--texte-3); border-bottom-color: var(--ligne-2); white-space: nowrap; }
.sth-table thead th.est-der { color: var(--ciel); }
.sth-table .sth-dom { text-align: left; color: var(--texte-3); font-size: 12px; max-width: 150px; }
.sth-table .sth-k { text-align: left; min-width: 170px; font-weight: 700; color: var(--texte); }
.sth-table tbody .sth-k { position: sticky; left: 0; z-index: 1; background: #0a1536; }
.sth-table .sth-k span { display: block; }
.sth-table .sth-k small { display: none; margin-top: 1px; font-size: 11px; font-weight: 600; color: var(--texte-3); }
.sth-table tbody tr { cursor: pointer; transition: background .15s; }
.sth-table tbody tr:hover, .sth-table tbody tr:focus-visible { background: rgba(47, 107, 255, .08); outline: none; }
.sth-table tbody tr:hover .sth-k { background: #0e1b44; }
.sth-table tbody tr.est-focus { background: rgba(47, 107, 255, .14); }
.sth-table tbody tr.est-focus .sth-k { background: #111f4d; box-shadow: inset 3px 0 0 var(--bleu-2); }
.sth-table td .sth-pil { opacity: 0; transform: translate3d(0, 6px, 0) scale(.92); animation: sth-pil .5s var(--ressort) forwards; animation-delay: calc(var(--k) * 45ms + 60ms); }
@keyframes sth-pil { to { opacity: 1; transform: none; } }
.sth-delta { font-weight: 800; white-space: nowrap; }
.sth-delta.est-bon, .est-bon { color: var(--bon); }
.sth-delta.est-mauvais, .est-mauvais { color: var(--mauvais); }
.sth-delta.est-neutre { color: var(--texte-3); }

.sth-retenir { margin-top: 16px; padding: 14px 16px; border-radius: 16px; background: rgba(245, 196, 81, .07); border: 1px solid rgba(245, 196, 81, .22); }
.sth-retenir h3 { margin-bottom: 8px; font-size: 15px; color: var(--or); }
.sth-retenir p { margin: 4px 0; font-size: 13.5px; color: var(--texte-2); }
.sth-retenir strong { color: var(--texte); }
.sth-retenir strong.est-bon { color: var(--bon); }
.sth-retenir strong.est-mauvais { color: var(--mauvais); }

.sth-graphe-t { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.sth-graphe-t .surtitre { margin-bottom: 0; }
.sth-graphe-t b { font: 600 18px/1.15 var(--titre); text-transform: uppercase; letter-spacing: .02em; }
.sth-graphe { min-height: 120px; }
.sth-astuce { margin: 4px 0 0; font-size: 11.5px; color: var(--texte-3); }
.sth-ligne-s { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--ligne); font-size: 13px; color: var(--texte-2); }
.sth-ligne-s:last-child { border-bottom: 0; }
.sth-ligne-s b { font-size: 14px; font-variant-numeric: tabular-nums; }
.sth-muet { margin: 0; font-size: 13px; color: var(--texte-3); }
.sth-conclusion { background: linear-gradient(135deg, rgba(47, 107, 255, .2), rgba(224, 49, 58, .1)); border-color: rgba(143, 179, 255, .28); }
.sth-conclusion h4 { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .2em; color: var(--ciel); }
.sth-conclusion p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--texte); }
.sth-pied { margin-top: 14px; font-size: 12px; color: var(--texte-3); }
.sth-pied span { display: block; margin-top: 2px; opacity: .8; }

/* ---------------- Graphiques ---------------- */
.sth-svg { display: block; width: 100%; height: auto; overflow: visible; }
.sth-g-grille { stroke: rgba(143, 179, 255, .1); stroke-width: 1; }
.sth-g-x, .sth-g-y { fill: var(--texte-3); font-size: 11px; font-weight: 650; }
.sth-g-ligne { fill: none; stroke: #8fb3ff; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: sth-trace 1s var(--doux) .1s forwards; }
.sth-g-aire { opacity: 0; animation: sth-fondu .8s var(--doux) .4s forwards; }
@keyframes sth-trace { to { stroke-dashoffset: 0; } }
@keyframes sth-fondu { to { opacity: 1; } }
.sth-g-pt { opacity: 0; animation: sth-fondu .4s var(--doux) forwards; animation-delay: calc(var(--k) * 90ms + 250ms); cursor: default; }
.sth-g-zone { fill: transparent; }
.sth-g-rond { stroke: #0a1433; stroke-width: 2; fill: rgba(255, 255, 255, .5); }
.sth-g-rond.b1 { fill: var(--b1); } .sth-g-rond.b2 { fill: var(--b2); } .sth-g-rond.b3 { fill: var(--b3); } .sth-g-rond.b4 { fill: var(--b4); }
.sth-g-pt:hover .sth-g-rond { stroke: #fff; }
.sth-g-val { fill: #fff; font-size: 12px; font-weight: 800; paint-order: stroke; stroke: #0a1433; stroke-width: 3px; }
.sth-g-rang { fill: #0b1636; font-size: 11px; font-weight: 800; }
.sth-g-bande { opacity: .13; }
.sth-g-bande.b1 { fill: var(--b1); } .sth-g-bande.b2 { fill: var(--b2); } .sth-g-bande.b3 { fill: var(--b3); } .sth-g-bande.b4 { fill: var(--b4); }
.sans-anim .sth-g-ligne, .sans-anim .sth-g-aire, .sans-anim .sth-g-pt, .sans-anim .sti-l, .sans-anim .sti-b, .sans-anim .sti-b-barre { animation: none; opacity: 1; stroke-dashoffset: 0; transform: none; }

/* ============================================================
   ANALYSE INTERACTIVE
   ============================================================ */
.sti-reglages { display: flex; flex-wrap: wrap; align-items: flex-end; }
.sti-reglages > .sth-champ { flex: 1 1 170px; }
.sti-reglages > .sti-ind { flex: 2 1 240px; }
.sti-reglages > .sth-champ:has(.sti-sens) { flex: 0 1 auto; }
.sti-reglages .liste-deroulante, .sti-reglages .liste-deroulante select { width: 100%; }
.sti-sens { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--ligne); }
.sti-sens button { border: 0; background: none; padding: 7px 11px; border-radius: 9px; color: var(--texte-2); font-size: 12.5px; font-weight: 700; white-space: nowrap; transition: background .2s, color .2s; }
.sti-sens button.est-actif { background: linear-gradient(135deg, var(--bleu), #2149c4); color: #fff; }

.sti-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.sti-kpi {
  position: relative; overflow: hidden; min-width: 0; padding: 16px 18px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(47, 107, 255, .13), rgba(255, 255, 255, .02) 55%); border: 1px solid var(--ligne);
}
.sti-kpi::after { content: ""; position: absolute; inset: 0; background: radial-gradient(140px 70px at 88% 0%, rgba(143, 179, 255, .16), transparent); pointer-events: none; }
.sti-kpi span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--texte-3); }
.sti-kpi b { display: block; margin-top: 6px; font: 600 40px/1 var(--titre); font-variant-numeric: tabular-nums; color: #fff; }
.sti-kpi b sup { font-size: .45em; margin-left: 2px; }
.sti-kpi small { display: block; margin-top: 6px; font-size: 12.5px; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sti-kpi.est-co { background: linear-gradient(160deg, rgba(47, 107, 255, .32), rgba(47, 107, 255, .05) 60%); border-color: rgba(91, 140, 255, .45); box-shadow: 0 20px 50px -28px rgba(47, 107, 255, .8); }
.sti-kpi.est-alerte b { color: #ff8a90; }
.sti-kpi.est-bon b { color: #8cf0b6; }

.sti-duo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.sti-carte-t { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 6px 14px; margin-bottom: 10px; }
.sti-carte-t .surtitre { margin-bottom: 3px; }
.sti-carte-t h3 { margin: 0; }
.sti-sens-p { font-size: 11.5px; font-weight: 750; color: var(--texte-3); }
.sti-b { opacity: 0; animation: sth-fondu .45s var(--doux) forwards; animation-delay: calc(var(--k) * 35ms); }
.sti-b-zone { fill: transparent; }
.sti-b:hover .sti-b-zone { fill: rgba(47, 107, 255, .07); }
.sti-b-rang { fill: var(--texte-3); font-size: 11px; font-weight: 800; }
.sti-b-nom { fill: var(--texte-2); font-size: 12.5px; font-weight: 650; }
.sti-b-val { fill: var(--texte); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sti-b-barre { fill: rgba(143, 179, 255, .28); transform-box: fill-box; transform-origin: left center; transform: scaleX(0); animation: sti-pousse .8s var(--doux) forwards; animation-delay: calc(var(--k) * 35ms + 80ms); }
@keyframes sti-pousse { to { transform: scaleX(1); } }
.sti-b.est-co .sti-b-barre { fill: #3f78ff; filter: drop-shadow(0 0 10px rgba(47, 107, 255, .7)); }
.sti-b.est-co .sti-b-nom, .sti-b.est-co .sti-b-rang { fill: #fff; font-weight: 800; }
.sti-b.est-top14 .sti-b-barre { fill: rgba(245, 196, 81, .45); }
.sti-b.est-top14 .sti-b-nom { fill: var(--or); font-style: italic; }
.sti-zero { stroke: rgba(255, 255, 255, .35); stroke-dasharray: 3 3; }
.sti-l { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: sth-trace 1.1s var(--doux) .1s forwards; }
.sti-l.est-co { stroke-width: 3.2; filter: drop-shadow(0 0 6px rgba(91, 140, 255, .55)); }
.sti-l.est-gris { stroke-width: 1.2; opacity: .45; }
.sti-gris:hover .sti-l { opacity: 1; stroke: #cfd9f5; stroke-width: 2; }
.sti-pt { stroke: #0a1433; stroke-width: 2; }
.sti-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; font-size: 12.5px; font-weight: 650; color: var(--texte-2); }
.sti-leg i { display: inline-block; width: 18px; height: 4px; margin-right: 7px; border-radius: 2px; vertical-align: middle; }

.sti-detail details > summary { list-style: none; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; cursor: pointer; }
.sti-detail details > summary::-webkit-details-marker { display: none; }
.sti-detail summary h3 { margin: 0; }
.sti-detail summary h3::before { content: "▸ "; color: var(--ciel); }
.sti-detail details[open] summary h3::before { content: "▾ "; }
.sti-detail summary span { font-size: 12px; color: var(--texte-3); }
.sti-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.sti-table th { text-align: left; padding: 8px 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--texte-3); border-bottom: 1px solid var(--ligne-2); }
.sti-table td { padding: 7px 10px; border-bottom: 1px solid var(--ligne); color: var(--texte-2); }
.sti-table td:last-child, .sti-table th:last-child { text-align: right; }
.sti-table tr.est-co td { color: #fff; font-weight: 800; background: rgba(47, 107, 255, .16); }
.sti-table tr.est-top14 td { color: var(--or); font-style: italic; }

.sti-intervalle { margin-top: 34px; }
.sti-sec-t { margin-bottom: 14px; }
.sti-sec-t h2 { margin: 0; font: 600 clamp(24px, 2.6vw, 34px)/1 var(--titre); text-transform: uppercase; }
.sti-sec-t h2 em { font-style: normal; background: linear-gradient(90deg, var(--bleu-2), var(--ciel)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sti-sec-t p { margin: 8px 0 0; max-width: 780px; font-size: 14px; color: var(--texte-2); }
.sti-reglages-iv > .sti-curseur-c { flex: 2 1 280px; }
.sti-curseur { position: relative; height: 34px; min-width: 200px; }
.sti-piste { position: absolute; left: 9px; right: 9px; top: 15px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); }
.sti-piste i { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, var(--bleu), var(--ciel)); box-shadow: 0 0 12px rgba(47, 107, 255, .6); }
.sti-curseur input[type=range] {
  position: absolute; inset: 0; width: 100%; height: 34px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.sti-curseur input[type=range]::-webkit-slider-runnable-track { background: none; height: 34px; }
.sti-curseur input[type=range]::-moz-range-track { background: none; }
.sti-curseur input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; margin-top: 7px; border-radius: 50%; cursor: grab;
  background: #fff; border: 3px solid var(--bleu); box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
}
.sti-curseur input[type=range]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--bleu); cursor: grab; }
.sti-curseur-v { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texte-3); }
.sti-curseur-v b { color: var(--texte); font-variant-numeric: tabular-nums; }
.sti-intervalle > [data-iv-corps] { display: flex; flex-direction: column; gap: 16px; }
.sti-legende-iv, .sti-note { margin: 8px 0 0; font-size: 12px; color: var(--texte-3); }
.sti-pos { width: 100%; border-collapse: separate; border-spacing: 3px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sti-pos th { padding: 6px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--texte-3); text-align: center; white-space: nowrap; }
.sti-pos tbody th { position: sticky; left: 0; z-index: 1; text-align: left; min-width: 150px; color: var(--texte); font-size: 12.5px; letter-spacing: 0; background: #0a1536; }
.sti-pos td { padding: 7px 4px; min-width: 40px; text-align: center; border-radius: 7px; font-weight: 800; color: var(--texte-2); background: rgba(255, 255, 255, .04); }
.sti-pos td.est-teinte { color: #0b1636; }
.sti-source { margin: 22px 0 0; font-size: 12px; color: var(--texte-3); }

/* ---------------- Écrans moyens et téléphone ---------------- */
/* Le domaine passe sous le nom du KPI tant que la colonne Δ ne tient pas. */
@media (max-width: 1620px) {
  .sth-table .sth-dom { display: none; }
  .sth-table .sth-k small { display: block; }
}
@media (max-width: 1280px) {
  .sth-grille { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1100px) {
  .sth-grille, .sti-duo { grid-template-columns: minmax(0, 1fr); }
  .sth-cote { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sth-cote .sth-graphe-c { grid-column: 1 / -1; }
  .sti-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .st-long { display: none; }
  .st-court { display: inline; }
  .sth-barre, .sti-reglages, .sti-reglages-iv { display: flex; flex-direction: column; align-items: stretch; padding: 12px; }
  .sth-barre .liste-deroulante select, .sti-reglages .liste-deroulante select { width: 100%; }
  .sti-sens { display: flex; }
  .sti-sens button { flex: 1; white-space: normal; padding: 7px 8px; }
  .sth-tete { padding: 16px; }
  .sth-tete-g img { width: 46px; }
  .sth-legende .sth-pil { padding: 3px 7px; }
  .sth-carte { padding: 14px 12px; }
  .sth-cote { display: flex; }
  .sth-table .sth-k { min-width: 128px; max-width: 150px; }
  .sth-table th, .sth-table td { padding: 6px 4px; }
  .sth-pil { min-width: 44px; padding: 4px 6px; font-size: 11.5px; }
  .sti-kpi { padding: 13px 14px; }
  .sti-kpi b { font-size: 30px; }
  .sth-choix-tete .bouton { flex: 1 1 auto; justify-content: center; }
  .sti-pos tbody th { min-width: 118px; }
}
@media (prefers-reduced-motion: reduce) {
  .sth-g-ligne, .sth-g-aire, .sth-g-pt, .sth-table td .sth-pil, .sti-l, .sti-b, .sti-b-barre, .sth-tete-g img { animation: none; opacity: 1; stroke-dashoffset: 0; transform: none; }
}
