/* Pap’pote — curseur de vitesse de lecture (composant commun, couche V2, 25/11/2026).
   Jetons --pp-* de design-system/v2/tokens.css seulement : aucune couleur en dur, aucun !important, aucun texte, aucun
   style en ligne. Cibles de 44 px (56 px en version enfant). Propriétés logiques : le même fichier sert l'arabe (RTL).
   Clair, sombre et 200 % : les rôles (--pp-surface, --pp-text…) suivent le thème de la page. */

.vit { position: relative; display: inline-block; vertical-align: middle; font-family: inherit; color: var(--pp-text); }
.vit [hidden] { display: none; }
.vit__sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.vit__btn {
  min-width: 44px; min-height: 44px; padding: 0 var(--pp-s-3); border-radius: var(--pp-r-pill);
  border: 1px solid var(--pp-line-base); background: var(--pp-surface); color: var(--pp-text);
  font: inherit; font-size: var(--pp-fs-14); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1;
  cursor: pointer; touch-action: manipulation;
}
.vit__btn[data-modifie="true"] { border-color: var(--pp-accent); color: var(--pp-accent); }
.vit__btn:hover { background: var(--pp-surface-sunk); }
.vit__btn:focus-visible, .vit__reset:focus-visible, .vit__range:focus-visible { outline: none; box-shadow: var(--pp-focus-ring); }

.vit__panel {
  position: absolute; z-index: 40; inset-block-start: calc(100% + var(--pp-s-2)); inset-inline-end: 0;
  display: block; box-sizing: border-box; width: min(320px, calc(100vw - 2 * var(--pp-s-4)));
  padding: var(--pp-s-4); border-radius: var(--pp-r-md); border: 1px solid var(--pp-line-base);
  background: var(--pp-surface); color: var(--pp-text); text-align: start;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--pp-shadow-base) 18%, transparent);
}
.vit__panel--haut { inset-block-start: auto; inset-block-end: calc(100% + var(--pp-s-2)); }
.vit__head { display: flex; justify-content: space-between; align-items: center; gap: var(--pp-s-2); margin-block-end: var(--pp-s-2); }
.vit__title { font-size: var(--pp-fs-16); font-weight: 600; }
.vit__out { font-size: var(--pp-fs-16); font-weight: 700; font-variant-numeric: tabular-nums; }
.vit__range { display: block; width: 100%; height: 44px; margin: 0; accent-color: var(--pp-accent); cursor: pointer; background: transparent; }
.vit__ticks { display: flex; justify-content: space-between; padding-inline: var(--pp-s-2); font-size: var(--pp-fs-12); color: var(--pp-text-2); font-variant-numeric: tabular-nums; }
.vit__foot { display: flex; margin-block-start: var(--pp-s-3); }
.vit__reset {
  min-height: 44px; padding: 0 var(--pp-s-3); border-radius: var(--pp-r-pill); border: 1px solid var(--pp-line-base);
  background: transparent; color: var(--pp-text); font: inherit; font-size: var(--pp-fs-14); cursor: pointer; touch-action: manipulation;
}
.vit__reset:hover { background: var(--pp-surface-sunk); }
.vit__note { display: block; margin-block-start: var(--pp-s-2); font-size: var(--pp-fs-12); color: var(--pp-text-2); }
.vit__note:empty { display: none; }

.vit__ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.vit__ico-fill { fill: currentColor; fill-opacity: .1; }
.vit__ico-acc { stroke: var(--pp-accent); }

/* Version enfant : grandes cibles, tortue à une extrémité et lapin à l'autre, pas de graduation chiffrée */
.vit--enfant .vit__btn { min-width: 56px; min-height: 56px; font-size: var(--pp-fs-18); }
.vit--enfant .vit__panel { width: min(360px, calc(100vw - 2 * var(--pp-s-4))); padding: var(--pp-s-5); }
.vit--enfant .vit__ends { display: flex; justify-content: space-between; align-items: center; margin-block-end: var(--pp-s-1); }
.vit--enfant .vit__end { position: relative; display: inline-flex; }
.vit--enfant .vit__ico { width: 40px; height: 40px; }
.vit--enfant .vit__range { height: 56px; }
.vit--enfant .vit__reset { min-height: 56px; font-size: var(--pp-fs-16); }
.vit--enfant .vit__ticks { display: none; }

@media (forced-colors: active) {
  .vit__btn, .vit__reset, .vit__panel { border-color: CanvasText; }
  .vit__ico, .vit__ico-acc { stroke: CanvasText; }
}
@media (prefers-reduced-motion: reduce) {
  .vit__btn, .vit__reset { transition: none; }
}
