/* ==========================================================================
   Asteri · composants de référence · Trait × Astre
   À charger APRÈS tokens.css. Cette feuille n'emploie que les jetons : aucune couleur en dur (hors le noir
   opaque d'un masque, qui n'est jamais vu), et pour seules valeurs en dur la géométrie interne de la coche, la largeur des
   étapes (480 px), les angles de l'astre (60 degrés) et du cercle qui roule (deux tours), l'arc fixe de l'attente
   en mouvement réduit (25 %) et la position de repos du survol de la Trame, hors de la boîte. Elle est générale : aucun écran, aucune donnée, aucun produit.
   Règles d'emploi et raisons : DESIGN.md (paragraphes 5 à 12).

   Dans le document : <html lang="fr"> ; data-theme="light" ou "dark" force le thème. Lagon est la seule couleur de
   marque ; le présent (terre en clair, soleil en sombre) ne marque que ce qui se passe : étape courante, survol, pressé.
   ========================================================================== */

/* ---- Socle ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--as-space-24); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--as-color-bg); color: var(--as-color-text); font: var(--as-type-body); font-synthesis: none; }
h1, h2, h3, h4, p, ul, ol, figure, fieldset, legend { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
img, svg { max-width: 100%; }
h1 { font: var(--as-type-title-1); letter-spacing: var(--as-tracking-title-1); text-wrap: balance; }
h2 { font: var(--as-type-title-2); letter-spacing: var(--as-tracking-title-2); text-wrap: balance; }
h3 { font: var(--as-type-title-3); letter-spacing: var(--as-tracking-title-3); text-wrap: balance; }
p { max-width: var(--as-measure); text-wrap: pretty; }
a { color: var(--as-color-link); text-decoration-line: underline; text-decoration-thickness: var(--as-stroke-trait); text-underline-offset: 0.15em; }
/* :where() garde la spécificité d'un simple a:hover : les exceptions plus bas (navigation, aplat, encart) l'emportent */
@media (hover: hover) { a:where(:not(.bouton, .evitement)):hover { color: var(--as-color-link-hover); } }
a:where(:not(.bouton, .evitement)):active { color: var(--as-color-link-hover); } /* au toucher, le présent le temps de l'appui */
/* un signe de la marque placé dans un lien garde sa couleur : le présent ne touche jamais un signe */
.signe, a:hover .signe, a:active .signe { color: var(--as-color-text); }
:focus-visible { outline: var(--as-focus-width) solid var(--as-color-focus); outline-offset: var(--as-focus-offset); }

/* ---- Rôles de texte ---- */
.affichage { font: var(--as-type-display); letter-spacing: var(--as-tracking-display); text-wrap: balance; }
.chapo { font: var(--as-type-subtitle); color: var(--as-color-text-soft); }
.lecture { font: var(--as-type-reading); }
.secondaire { font: var(--as-type-secondary); color: var(--as-color-text-muted); }
.etiquette { font: var(--as-type-label); letter-spacing: var(--as-tracking-label); text-transform: uppercase; }
.etiquette-coiffe { color: var(--as-color-signature-text); } /* faculté : une étiquette qui coiffe un titre, une fois par bloc */
.a-fournir { background: var(--as-color-surface-muted); color: var(--as-color-text); border-radius: var(--as-radius-xs); padding-inline: var(--as-space-4); } /* emplacement marqué : maquette seulement */
.donnee { font: var(--as-type-data); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Mise en page : toujours par gap ---- */
.page { max-width: var(--as-layout-page-max); margin-inline: auto; padding-inline: var(--as-layout-page-margin); padding-block: var(--as-space-48) var(--as-space-96); display: flex; flex-direction: column; gap: var(--as-layout-section); }
.pile { display: flex; flex-direction: column; gap: var(--as-layout-stack); }
.pile-serree { display: flex; flex-direction: column; gap: var(--as-space-8); }
.pile-large { display: flex; flex-direction: column; gap: var(--as-space-32); }
.rang { display: flex; flex-wrap: wrap; align-items: center; gap: var(--as-space-12); }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--as-layout-col-min)), 1fr)); gap: var(--as-layout-gutter); }
.grille-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--as-layout-col-min-wide)), 1fr)); gap: var(--as-layout-gutter); }

/* ---- Surfaces ---- */
.carte { background: var(--as-card-bg); border: var(--as-stroke-hairline) solid var(--as-card-border); border-radius: var(--as-card-radius); padding: var(--as-card-padding); display: flex; flex-direction: column; gap: var(--as-layout-stack); min-width: 0; }
.encart { background: var(--as-inset-bg); border-radius: var(--as-inset-radius); padding: var(--as-inset-padding); }
.ilot { background: var(--as-color-bg); color: var(--as-color-text); border-radius: var(--as-radius-md); border: var(--as-stroke-hairline) solid var(--as-color-border); padding: var(--as-layout-card-padding); display: flex; flex-direction: column; gap: var(--as-space-24); min-width: 0; }
.aplat { display: flex; flex-wrap: wrap; align-items: center; gap: var(--as-space-12); border-radius: var(--as-radius-sm); padding: var(--as-space-16); background: var(--as-color-signature); color: var(--as-color-on-signature); font: var(--as-type-title-3); letter-spacing: var(--as-tracking-title-3); }
.aplat-porteur { border-radius: var(--as-radius-sm); padding: var(--as-space-16); background: var(--as-color-signature-strong); color: var(--as-color-on-signature-strong); }
.aplat :focus-visible, .aplat-porteur :focus-visible { outline-color: var(--as-color-focus-on-signature); }
/* sur un aplat lagon, le lien garde la couleur du texte de l'aplat, même survolé : jamais le présent au contact de lagon */
.aplat a, .aplat a:hover, .aplat a:active, .aplat-porteur a, .aplat-porteur a:hover, .aplat-porteur a:active { color: inherit; }
.separateur { border: 0; border-top: var(--as-separator-width) solid var(--as-separator-color); margin: 0; }
.trame { background-image: radial-gradient(circle, var(--as-color-pattern) calc(var(--as-pattern-dot) / 2), transparent calc(var(--as-pattern-dot) / 2 + 0.5px)); background-size: var(--as-pattern-step) var(--as-pattern-step); }

/* ---- Actions ---- */
.bouton { font: var(--as-button-font); min-height: var(--as-button-height); padding: 0 var(--as-button-padding-inline); border-radius: var(--as-button-radius); border: var(--as-stroke-trait) solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: var(--as-space-8); cursor: pointer; text-decoration: none; transition: background-color var(--as-duration-1) var(--as-ease-enter); }
.bouton-principal { background: var(--as-button-bg); color: var(--as-button-text); }
@media (hover: hover) { .bouton-principal:hover { background: var(--as-button-bg-hover); color: var(--as-button-text); } }
.bouton-principal:active { background: var(--as-button-bg-hover); color: var(--as-button-text); } /* au téléphone, pas de survol : le présent au pressé */
/* sur un aplat lagon ou dans un encart d'état, le présent n'entre pas : le bouton ne change pas */
.aplat .bouton-principal:hover, .aplat .bouton-principal:active, .aplat-porteur .bouton-principal:hover, .aplat-porteur .bouton-principal:active,
.message .bouton-principal:hover, .message .bouton-principal:active { background: var(--as-button-bg); }
.bouton-secondaire { background: transparent; color: var(--as-color-text); border-color: var(--as-color-border-strong); }
.bouton-secondaire:hover { background: var(--as-color-surface-muted); color: var(--as-color-text); }
.bouton-discret { background: transparent; color: var(--as-color-text); padding-inline: var(--as-space-8); text-decoration: underline; text-decoration-thickness: var(--as-link-underline); text-underline-offset: 0.15em; }
.bouton-compact { min-height: var(--as-control-height-compact); padding-inline: var(--as-space-12); font: var(--as-type-secondary); font-weight: var(--as-font-weight-bold); }
.bouton[aria-disabled="true"], .bouton[aria-disabled="true"]:hover, .bouton[aria-disabled="true"]:active { background: var(--as-color-disabled-bg); color: var(--as-color-disabled-text); border-color: transparent; cursor: not-allowed; }
.lien-seul { display: inline-flex; align-items: center; min-height: var(--as-control-height); }
.lien-nav { color: var(--as-color-text); font-weight: var(--as-font-weight-medium); text-decoration-thickness: var(--as-stroke-hairline); display: inline-flex; align-items: center; min-height: var(--as-control-height); }
.lien-nav[aria-current="page"] { text-decoration-thickness: var(--as-stroke-trait); font-weight: var(--as-font-weight-bold); }
/* le lien de navigation reste en couleur de texte au survol : seul son trait s'épaissit */
.lien-nav:hover, .lien-nav:active { color: var(--as-color-text); text-decoration-thickness: var(--as-stroke-trait); }
.evitement { position: absolute; left: var(--as-space-16); top: calc(-1 * var(--as-space-96)); display: inline-flex; align-items: center; min-height: var(--as-control-height); padding: 0 var(--as-space-16); background: var(--as-color-surface); border-radius: var(--as-radius-sm); }
.evitement:focus { top: var(--as-space-16); }

/* ---- Navigation : en-tête et pied de page ---- */
.entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--as-space-16) var(--as-space-32); }
.entete .logotype { display: inline-flex; align-items: center; min-height: var(--as-control-height); color: var(--as-color-text); }
.entete .logotype svg { height: var(--as-space-40); width: auto; display: block; }
.entete nav, .pied nav { display: flex; flex-wrap: wrap; gap: var(--as-space-4) var(--as-space-24); }
.pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--as-space-16) var(--as-space-32); border-top: var(--as-separator-width) solid var(--as-separator-color); padding-top: var(--as-space-24); font: var(--as-type-secondary); }
.pied .lien-nav { font: var(--as-type-secondary); font-weight: var(--as-font-weight-medium); }
.pied .marque { display: inline-flex; align-items: center; gap: var(--as-space-12); font-weight: var(--as-font-weight-bold); }
.pied .marque svg { width: var(--as-space-32); height: var(--as-space-32); }

/* ---- Accordéon : details natif ---- */
.accordeon { border-top: var(--as-separator-width) solid var(--as-separator-color); }
.accordeon details { border-bottom: var(--as-separator-width) solid var(--as-separator-color); }
.accordeon summary { display: flex; align-items: center; justify-content: space-between; gap: var(--as-space-16); min-height: var(--as-control-height); padding-block: var(--as-space-8); font: var(--as-type-body-strong); cursor: pointer; list-style: none; }
.accordeon summary::-webkit-details-marker { display: none; }
.accordeon summary::after { content: ""; flex: none; width: var(--as-space-8); height: var(--as-space-8); margin-right: var(--as-space-4); border-right: var(--as-stroke-trait) solid currentColor; border-bottom: var(--as-stroke-trait) solid currentColor; transform: rotate(45deg); transition: transform var(--as-duration-2) var(--as-ease-standard); }
.accordeon details[open] summary::after { transform: rotate(-135deg); }
.accordeon details > :not(summary) { padding-bottom: var(--as-space-16); }

/* ---- Badge ---- */
.badge { font: var(--as-badge-font); letter-spacing: var(--as-tracking-label); text-transform: uppercase; min-height: var(--as-badge-height); padding: 0 var(--as-badge-padding-inline); border-radius: var(--as-badge-radius); background: var(--as-color-surface-muted); color: var(--as-color-text); display: inline-flex; align-items: center; }
.badge-signature { background: transparent; color: var(--as-color-signature-text); border: var(--as-stroke-trait) solid var(--as-color-signature-text); }

/* ---- Saisie ---- */
.champ { display: flex; flex-direction: column; gap: var(--as-space-4); max-width: var(--as-layout-field-max); }
.champ label { font: var(--as-type-secondary); font-weight: var(--as-font-weight-medium); color: var(--as-color-text); }
.champ .aide { font: var(--as-type-secondary); color: var(--as-color-text-muted); }
.champ input, .champ textarea, .champ select { margin-top: var(--as-space-4); font: var(--as-type-body); color: var(--as-color-text); background: var(--as-field-bg); min-height: var(--as-field-height); padding: 0 var(--as-field-padding-inline); border: var(--as-stroke-hairline) solid var(--as-field-border); border-radius: var(--as-field-radius); width: 100%; }
.champ textarea { padding-block: var(--as-space-12); min-height: var(--as-space-128); resize: vertical; }
.champ input:focus-visible, .champ textarea:focus-visible, .champ select:focus-visible { border-color: var(--as-field-border-focus); box-shadow: inset 0 0 0 var(--as-stroke-hairline) var(--as-field-border-focus); }
.champ [aria-invalid="true"], .champ [aria-invalid="true"]:focus-visible { border-color: var(--as-field-border-error); box-shadow: inset 0 0 0 var(--as-stroke-hairline) var(--as-field-border-error); }
.erreur { font: var(--as-type-secondary); color: var(--as-color-danger-text); display: flex; gap: var(--as-space-8); align-items: flex-start; }
.erreur svg { flex: none; margin-top: var(--as-space-2); }
.groupe { row-gap: 0; }
.coche { display: inline-flex; align-items: center; gap: var(--as-space-12); min-height: var(--as-control-height); cursor: pointer; }
.coche input { appearance: none; -webkit-appearance: none; margin: 0; width: var(--as-space-20); height: var(--as-space-20); flex: none; border: var(--as-stroke-trait) solid var(--as-color-border-control); background: var(--as-color-surface); cursor: pointer; display: grid; place-content: center; }
.coche input[type="checkbox"] { border-radius: var(--as-radius-xs); }
.coche input[type="radio"] { border-radius: var(--as-radius-pill); }
.coche input:checked { background: var(--as-color-action-bg); border-color: var(--as-color-action-bg); }
.coche input[type="checkbox"]:checked::after { content: ""; width: 10px; height: 6px; border-left: var(--as-stroke-trait) solid var(--as-color-action-text); border-bottom: var(--as-stroke-trait) solid var(--as-color-action-text); transform: translateY(-1px) rotate(-45deg); }
.coche input[type="radio"]:checked::after { content: ""; width: var(--as-space-8); height: var(--as-space-8); border-radius: var(--as-radius-pill); background: var(--as-color-action-text); }

/* ---- Retour : encarts d'état. La teinte ne vit que sur l'icône et le titre ; texte et liens en couleur de texte ---- */
.message { display: flex; gap: var(--as-space-12); align-items: flex-start; border-radius: var(--as-radius-sm); padding: var(--as-space-12) var(--as-space-16); background: var(--fond); color: var(--as-color-text); font: var(--as-type-secondary); min-width: 0; }
.message svg { flex: none; color: var(--teinte); margin-top: var(--as-space-2); }
.message b { color: var(--teinte); display: block; }
.message a { color: var(--as-color-text); }
.message-erreur { --fond: var(--as-color-danger-bg); --teinte: var(--as-color-danger-text); }
.message-succes { --fond: var(--as-color-success-bg); --teinte: var(--as-color-success-text); }
.message-attention { --fond: var(--as-color-warning-bg); --teinte: var(--as-color-warning-text); }
.message-info { --fond: var(--as-color-info-bg); --teinte: var(--as-color-info-text); }
.flottant { background: var(--as-color-surface-raised); border: var(--as-stroke-hairline) solid var(--as-color-border); border-radius: var(--as-radius-md); box-shadow: var(--as-shadow-floating); }
.vide { align-items: flex-start; }
.vide svg { color: var(--as-color-text); }
.vide-titre { font: var(--as-type-body-strong); letter-spacing: 0; }

/* ---- Pièces du symbole (planche « le symbole en usage ») ---- */
/* interrupteur d'Astre (décisions 10 et 19) : trois indices, la position, le dessin, le cœur.
   <label class="interrupteur"><input class="sr" type="checkbox" role="switch"><span class="piste" aria-hidden="true">
   <span class="curseur"><i></i><i></i><i></i><b></b></span></span><span>Libellé</span></label>
   Éteint : l'astre replié, un seul trait. Allumé : le curseur passe à droite, les branches s'ouvrent, le cœur apparaît.
   Le libellé nomme le réglage, jamais l'état : role="switch" et le dessin disent l'état. Désactivé : disabled sur la case,
   et la raison écrite à côté, comme pour le bouton. */
.interrupteur { display: inline-flex; align-items: center; gap: var(--as-space-12); min-height: var(--as-control-height); cursor: pointer; }
.interrupteur .piste { position: relative; flex: none; width: var(--as-piece-switch-width); height: var(--as-piece-switch-height); border-radius: var(--as-radius-pill);
  background: var(--as-color-border-subtle); border: var(--as-stroke-hairline) solid var(--as-color-border-control);
  transition: background-color var(--as-duration-1) var(--as-ease-enter), border-color var(--as-duration-1) var(--as-ease-enter); }
.interrupteur .curseur { position: absolute; top: 50%; left: calc((var(--as-piece-switch-height) - var(--as-piece-switch-knob)) / 2 - var(--as-stroke-hairline));
  width: var(--as-piece-switch-knob); height: var(--as-piece-switch-knob); margin-top: calc(var(--as-piece-switch-knob) / -2); border-radius: var(--as-radius-pill);
  background: var(--as-color-surface); border: var(--as-stroke-hairline) solid var(--as-color-border-control); transition: transform var(--as-duration-2) var(--as-ease-standard); }
.interrupteur .curseur i { position: absolute; left: 50%; top: 50%; width: var(--as-stroke-trait); height: var(--as-piece-switch-branch);
  margin: calc(var(--as-piece-switch-branch) / -2) 0 0 calc(var(--as-stroke-trait) / -2); border-radius: var(--as-radius-pill); background: var(--as-color-text);
  transition: transform var(--as-duration-2) var(--as-ease-enter); }
.interrupteur .curseur b { position: absolute; left: 50%; top: 50%; width: var(--as-piece-switch-heart); height: var(--as-piece-switch-heart);
  margin: calc(var(--as-piece-switch-heart) / -2) 0 0 calc(var(--as-piece-switch-heart) / -2); border-radius: var(--as-radius-pill);
  background: var(--as-color-signature-graphic); transform: scale(0); transition: transform var(--as-duration-2) var(--as-ease-enter); }
.interrupteur input:checked + .piste { background: var(--as-color-action-bg); border-color: var(--as-color-action-bg); }
.interrupteur input:checked + .piste .curseur { transform: translateX(calc(var(--as-piece-switch-width) - var(--as-piece-switch-height))); border-color: transparent; }
.interrupteur input:checked + .piste .curseur i:nth-child(2) { transform: rotate(60deg); }
.interrupteur input:checked + .piste .curseur i:nth-child(3) { transform: rotate(-60deg); }
.interrupteur input:checked + .piste .curseur b { transform: scale(1); }
.interrupteur input:focus-visible + .piste { outline: var(--as-focus-width) solid var(--as-color-focus); outline-offset: var(--as-focus-offset); }
.aplat .interrupteur input:focus-visible + .piste, .aplat-porteur .interrupteur input:focus-visible + .piste { outline-color: var(--as-color-focus-on-signature); }
.interrupteur:has(input:disabled) { cursor: not-allowed; color: var(--as-color-disabled-text); }
.interrupteur input:disabled + .piste, .interrupteur input:disabled:checked + .piste { background: var(--as-color-disabled-bg); border-color: var(--as-color-disabled-bg); }
.interrupteur input:disabled + .piste .curseur { border-color: var(--as-color-disabled-bg); }
.interrupteur input:disabled + .piste .curseur i, .interrupteur input:disabled + .piste .curseur b { background: var(--as-color-disabled-text); }
/* sélecteur à segments : tout en encre ; le choisi prend lagon, un fond et la graisse */
.segments { display: inline-flex; border: var(--as-stroke-trait) solid var(--as-color-border-strong); border-radius: var(--as-radius-pill); }
.segments label { display: inline-flex; align-items: center; gap: var(--as-space-8); min-height: calc(var(--as-control-height) - 2 * var(--as-stroke-trait)); padding: 0 var(--as-space-16); border-radius: var(--as-radius-pill); font: var(--as-type-secondary); font-weight: var(--as-font-weight-medium); cursor: pointer; }
/* le choisi : lagon, et un second indice, un fond et la graisse (décision 11) */
.segments label:has(input:checked) { background: var(--as-color-surface-muted); font-weight: var(--as-font-weight-bold); }
.segments label:focus-within { outline: var(--as-focus-width) solid var(--as-color-focus); outline-offset: var(--as-focus-offset); }
.segments i { display: block; width: var(--as-space-12); height: var(--as-space-12); border-radius: var(--as-radius-pill); background: var(--as-color-text); transition: background-color var(--as-duration-1) var(--as-ease-enter); }
.segments input:checked + i { background: var(--as-color-signature-graphic); }
/* étapes : faite, en cours (aria-current="step"), à venir (.a-venir) */
.etapes { display: flex; align-items: center; list-style: none; max-width: 480px; }
.etapes li { display: flex; align-items: center; flex: 1; }
.etapes li:last-child { flex: none; }
.etapes li::after { content: ""; flex: 1; height: var(--as-piece-line); border-radius: var(--as-radius-pill); background: var(--as-color-text); margin-inline: var(--as-space-4); }
.etapes li:last-child::after { display: none; }
.etapes i { display: block; width: var(--as-piece-dot); height: var(--as-piece-dot); border-radius: var(--as-radius-pill); background: var(--as-color-text); flex: none; }
.etapes li[aria-current] i { width: var(--as-piece-ring); height: var(--as-piece-ring); background: transparent; border: var(--as-piece-ring-stroke) solid var(--as-color-present); box-shadow: var(--as-shadow-present); animation: as-battement var(--as-duration-4) var(--as-ease-enter) 1; }
/* la lueur bat une fois quand l'étape devient courante, puis reste immobile */
@keyframes as-battement { from { box-shadow: 0 0 0 0 transparent; } }
.etapes li[aria-current]::after, .etapes li.a-venir::after { background: var(--as-color-border-control); }
.etapes li.a-venir i { background: transparent; border: var(--as-stroke-trait) solid var(--as-color-border-control); }
/* pagination de carrousel : des points, le courant s'allonge en trait */
.pagination { display: inline-flex; align-items: center; gap: var(--as-space-8); }
.pagination i { display: block; width: var(--as-piece-page-dot); height: var(--as-piece-page-dot); border-radius: var(--as-radius-pill); background: var(--as-color-text); }
.pagination i.courant { width: var(--as-piece-page-mark); background: var(--as-color-present); }
/* attente : l'anneau du monogramme se remplit, un point en tête d'arc. --progression de 0 à 1 ; .indeterminee : le point seul tourne.
   <span class="attente" role="progressbar" aria-label="Relevé en cours" aria-valuemin="0" aria-valuemax="100" aria-valuenow="40" style="--progression: .4">
   <svg viewBox="0 0 28 28" width="28" height="28" aria-hidden="true"><circle class="piste-attente" cx="14" cy="14" r="11"></circle><circle class="arc" cx="14" cy="14" r="11" pathLength="100"></circle>
   <g class="tete"><circle cx="14" cy="3" r="2.5"></circle></g></svg><span class="attente-mot">40 %</span></span>
   Indéterminée : class="attente indeterminee", sans aria-valuenow ni --progression, et le mot « Chargement ».
   Le nom accessible est obligatoire (aria-label ou aria-labelledby) : le mot ne le donne pas. Le script qui fait avancer
   l'attente met à jour aria-valuenow et --progression ensemble. Jamais sur surface-muted : l'arc y tombe à 2,56 contre sa piste. */
.attente { display: inline-flex; align-items: center; gap: var(--as-space-8); }
.attente svg { display: block; flex: none; width: var(--as-piece-wait-size); height: var(--as-piece-wait-size); overflow: visible; }
.attente .piste-attente, .attente .arc { fill: none; stroke-width: var(--as-piece-wait-stroke); }
.attente .piste-attente { stroke: var(--as-color-wait-track); }
.attente .arc { stroke: var(--as-color-signature-graphic); stroke-linecap: round; stroke-dasharray: calc(clamp(0, var(--progression, 0), 1) * 100px) 100px;
  transform: rotate(-90deg); transform-box: view-box; transform-origin: center; }
.attente .tete { transform: rotate(calc(clamp(0, var(--progression, 0), 1) * 360deg)); transform-box: view-box; transform-origin: center; }
.attente .tete circle { fill: var(--as-color-wait-dot); }
.attente-mot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.attente.indeterminee .arc { display: none; }
.attente.indeterminee .tete { animation: as-tour var(--as-duration-wait) linear infinite; }
.attente.indeterminee .tete circle { fill: var(--as-color-text); }
@keyframes as-tour { to { transform: rotate(360deg); } }
/* barre de défilement (décisions 12 et 25) : une piste, un nœud par section, le cercle de Trait qui roule, au présent.
   <nav class="defilement" aria-label="Sections"><ol><li><a href="#section-1"><span class="sr">Titre</span></a></li>…</ol>
   <span class="curseur" aria-hidden="true"><i></i></span></nav>, avec asteri.js, qui pose --defilement, la section courante
   (aria-current), les sections passées (.fait, jamais retirées) et l'ampoule (.ampoule, une fois). La barre native reste :
   celle-ci s'y ajoute. Pour la page, le nav se place juste après l'en-tête (ordre de tabulation), dix sections au plus.
   Dans une zone à défilement propre, la barre est la sœur de la zone, dans une enveloppe :
   <div class="defilement-cadre"><div id="zone" tabindex="0" role="region" aria-label="…">…</div>
   <nav class="defilement dans-zone" data-zone="#zone" aria-label="…">…</nav></div>
   Au focus et au survol, un nœud montre son titre en bulle ; Échap la ferme. Sans script, le curseur n'est pas montré. */
.defilement { position: fixed; inset-block: var(--as-space-96); right: var(--as-space-16); width: var(--as-piece-scroll-target); z-index: 1; }
.carte { --fond-noeud: var(--as-card-bg); } /* le creux des nœuds prend la couleur de ce qui est dessous ; une autre surface redéfinit --fond-noeud */
.defilement-cadre { position: relative; }
.defilement-cadre > :not(.defilement) { padding-right: var(--as-space-64); } /* la barre, 24 du bord, et 16 d'air : le texte ne passe jamais dessous */
.defilement.dans-zone { position: absolute; inset-block: var(--as-space-16); right: var(--as-space-24); } /* 24 : la barre native de la zone garde sa place */
.defilement::before { content: ""; position: absolute; inset-block: 0; left: calc(50% - var(--as-piece-track) / 2); width: var(--as-piece-track); border-radius: var(--as-radius-pill); background: var(--as-color-track); }
.defilement ol { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: center; }
.defilement a { position: relative; display: grid; place-items: center; width: var(--as-piece-scroll-target); height: var(--as-piece-scroll-target); margin-block: calc(var(--as-piece-scroll-target) / -2); border-radius: var(--as-radius-pill); }
.defilement a::before { content: ""; width: var(--as-piece-scroll-node); height: var(--as-piece-scroll-node); border-radius: var(--as-radius-pill); background: var(--fond-noeud, var(--as-color-bg)); border: var(--as-stroke-trait) solid var(--as-color-border-control); }
.defilement a.fait::before { background: var(--as-color-text); border-color: var(--as-color-text); }
.defilement a[aria-current]::before { width: var(--as-piece-scroll-node-current); height: var(--as-piece-scroll-node-current); background: var(--fond-noeud, var(--as-color-bg)); border-color: var(--as-color-text); }
/* la bulle : le titre de la section, à gauche du nœud, au focus et au survol (DESIGN.md §11, Infobulle) */
.defilement:not(.sans-bulle) a:focus-visible > .sr { position: absolute; right: calc(100% + var(--as-space-8)); top: 50%; transform: translateY(-50%); width: auto; height: auto; overflow: visible; clip-path: none;
  padding: var(--as-space-4) var(--as-space-8); font: var(--as-type-secondary); color: var(--as-color-text); background: var(--as-color-surface-raised);
  border: var(--as-stroke-hairline) solid var(--as-color-border); border-radius: var(--as-radius-sm); box-shadow: var(--as-shadow-floating); }
@media (hover: hover) {
  .defilement:not(.sans-bulle) a:hover > .sr { position: absolute; right: calc(100% + var(--as-space-8)); top: 50%; transform: translateY(-50%); width: auto; height: auto; overflow: visible; clip-path: none;
    padding: var(--as-space-4) var(--as-space-8); font: var(--as-type-secondary); color: var(--as-color-text); background: var(--as-color-surface-raised);
    border: var(--as-stroke-hairline) solid var(--as-color-border); border-radius: var(--as-radius-sm); box-shadow: var(--as-shadow-floating); }
}
/* le curseur : l'anneau de Trait au présent, son point d'encre posé sur le trait ; à l'ampoule, l'anneau devient plein et le point s'efface */
.defilement .curseur { position: absolute; left: 50%; top: calc(var(--defilement, 0) * 100%); width: var(--as-piece-knob); height: var(--as-piece-knob);
  margin: calc(var(--as-piece-knob) / -2) 0 0 calc(var(--as-piece-knob) / -2); border-radius: var(--as-radius-pill); background: transparent;
  border: var(--as-piece-ring-stroke) solid var(--as-color-present); box-shadow: var(--as-shadow-present); pointer-events: none;
  transform: rotate(calc(var(--defilement, 0) * 720deg)); transition: background-color var(--as-duration-2) var(--as-ease-enter); }
.defilement:not(.est-vivante) .curseur { display: none; } /* sans script, un curseur figé en haut mentirait sur la position */
.defilement .curseur i { position: absolute; left: calc(50% - var(--as-piece-page-dot) / 2); top: calc(var(--as-piece-ring-stroke) / -2 - var(--as-piece-page-dot) / 2);
  width: var(--as-piece-page-dot); height: var(--as-piece-page-dot); border-radius: var(--as-radius-pill); background: var(--as-color-wait-dot); }
.defilement .curseur.bat { animation: as-battement var(--as-duration-4) var(--as-ease-enter) 1; }
.defilement.ampoule .curseur { background: var(--as-color-present); }
.defilement.ampoule .curseur i { opacity: 0; }
/* la barre de page vit dans la marge : masquée quand la marge est trop étroite pour elle et sa lueur, ou la fenêtre trop basse pour ses nœuds */
@media (width < 1024px), (height < 480px) { .defilement:not(.dans-zone) { display: none; } }
/* Trame vivante et Constellation (décisions 7 et 26) : au survol, les points à deux pas de grille du pointeur passent au présent
   (asteri.js pose --x et --y) ; la nuit, des fils (svg.fils) et un point allumé (.allume, au centre d'une maille : 12 + 24 × n). */
.trame-vivante { position: relative; }
.trame:has(> .fils, > .allume) { position: relative; } /* à part : un navigateur sans :has() jetterait toute la liste */
.trame-vivante::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity var(--as-duration-1) var(--as-ease-enter);
  background-image: radial-gradient(circle, var(--as-color-present) calc(var(--as-pattern-dot-hover) / 2), transparent calc(var(--as-pattern-dot-hover) / 2 + 0.5px));
  background-size: var(--as-pattern-step) var(--as-pattern-step);
  -webkit-mask: radial-gradient(circle calc(var(--as-pattern-step) * 2 + var(--as-pattern-dot-hover)) at var(--x, -999px) var(--y, -999px), #000 98%, transparent 100%);
  mask: radial-gradient(circle calc(var(--as-pattern-step) * 2 + var(--as-pattern-dot-hover)) at var(--x, -999px) var(--y, -999px), #000 98%, transparent 100%); }
.trame-vivante.est-survolee::after { opacity: 1; }
.trame .fils { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.trame .fils * { fill: none; stroke: var(--as-color-pattern-thread); stroke-width: var(--as-stroke-hairline); vector-effect: non-scaling-stroke; }
.trame .allume { position: absolute; width: var(--as-pattern-lit); height: var(--as-pattern-lit); margin: calc(var(--as-pattern-lit) / -2) 0 0 calc(var(--as-pattern-lit) / -2);
  border-radius: var(--as-radius-pill); background: var(--as-color-pattern-lit); box-shadow: var(--as-shadow-pattern-lit); pointer-events: none; }

/* ---- Barre native, habillée (décisions 12 et 36) : là où la barre dessinée n'est pas posée, la couleur de piste et de curseur suffit ; jamais le présent ---- */
:root, [data-theme] { scrollbar-color: var(--as-color-border-control) transparent; }

/* ---- Tableau ---- */
.tableau-boite { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font: var(--as-type-secondary); }
th, td { text-align: left; padding: var(--as-space-12); border-bottom: var(--as-stroke-hairline) solid var(--as-color-border); vertical-align: top; }
th { font: var(--as-type-label); letter-spacing: var(--as-tracking-label); text-transform: uppercase; }

/* ---- Mouvement réduit, couleurs forcées ---- */
@media (prefers-reduced-motion: reduce) {
  .interrupteur .piste, .interrupteur .curseur, .interrupteur .curseur i, .interrupteur .curseur b, .segments i, .bouton, .accordeon summary::after, .trame-vivante::after { transition: none; }
  .etapes li[aria-current] i, .defilement .curseur.bat { animation: none; }
  /* le curseur glisse toujours, puisque sa position porte l'information, mais il ne roule plus */
  .defilement .curseur { transform: none; transition: none; }
  /* l'attente indéterminée devient un arc fixe et le mot « chargement » : on retire le mouvement, jamais l'information */
  .attente.indeterminee { --progression: .25; /* @kind other */ }
  .attente.indeterminee .tete { animation: none; }
  .attente.indeterminee .tete circle { fill: var(--as-color-wait-dot); }
  .attente.indeterminee .arc { display: inline; }
  .attente.indeterminee .attente-mot { position: static; width: auto; height: auto; overflow: visible; clip-path: none; font: var(--as-type-secondary); }
}
@media (forced-colors: active) {
  .coche input:checked { background: Highlight; border-color: Highlight; }
  .coche input[type="radio"]:checked::after { background: HighlightText; }
  .coche input[type="checkbox"]:checked::after { border-color: HighlightText; }
  .interrupteur .piste { border-color: ButtonText; }
  .interrupteur input:checked + .piste { background: Highlight; border-color: Highlight; }
  .interrupteur .curseur { background: Canvas; border-color: ButtonText; }
  .interrupteur .curseur i { background: ButtonText; }
  .interrupteur .curseur b { background: Highlight; }
  .interrupteur input:disabled + .piste { background: Canvas; border-color: GrayText; }
  .interrupteur input:disabled + .piste .curseur i, .interrupteur input:disabled + .piste .curseur b { background: GrayText; }
  .defilement::before { background: GrayText; }
  .defilement a.fait::before { background: CanvasText; }
  .defilement .curseur { border-color: Highlight; box-shadow: none; }
  .defilement.ampoule .curseur { background: Highlight; }
  .defilement .curseur i { background: CanvasText; }
  .attente .piste-attente { stroke: GrayText; }
  .attente .arc { stroke: Highlight; }
  .attente .tete circle, .attente.indeterminee .tete circle { fill: CanvasText; }
  .trame-vivante::after, .trame .fils, .trame .allume { display: none; }
  .segments input:checked + i { background: Highlight; }
  .etapes li[aria-current] i { border-color: Highlight; box-shadow: none; }
  .pagination i.courant { background: Highlight; }
  .trame { background-image: none; }
}
