/* V5 · HABILLAGE DES PAGES EXISTANTES — applique la grammaire commune Claude / ChatGPT et la densité Cursor aux pages
   pas encore reconstruites dessinent avec leurs classes d'origine (button.primary, button.ghost, champs, .switch,
   .segmented, .card, fenêtres .detail-sheet …). Les anciennes feuilles sont dans la couche CSS « ancien »
   (css/v5/ancien-pc.css) : toute règle écrite ici passe devant, sans !important.
   1. les variables de l'ancien système prennent les valeurs des jetons V5 (une seule palette, un seul jeu de rayons) ;
   2. chaque contrôle générique reprend les cotes de la primitive V5 correspondante (primitives.css, controles.css).
   Rien de propre à une page ici : voir css/v5/pages/*.css. */

/* ================================================================== 1. variables de l'ancien système → jetons V5 */
:where(html.v5){
  --background: var(--v5-fond); --bg: var(--v5-fond);
  --background-secondary: var(--v5-fond-lateral); --sidebar-bg: var(--v5-fond-lateral);
  --background-tertiary: var(--v5-carte);
  --surface: var(--v5-carte); --surface-bg: var(--v5-carte); --surface-solid: var(--v5-carte); --surface-2: var(--v5-carte); --surface-secondary: var(--v5-carte);
  --field-bg: var(--v5-surface-inset);
  --surface-hover: var(--v5-survol); --hover: var(--v5-survol);
  --surface-active: var(--v5-presse); --hover-strong: var(--v5-presse);
  --overlay: var(--v5-voile);
  --text-primary: var(--v5-texte); --text: var(--v5-texte); --cd-text-list: var(--v5-texte);
  --text-secondary: var(--v5-texte-2); --text-soft: var(--v5-texte-2);
  --text-tertiary: var(--v5-texte-3); --text-faint: var(--v5-texte-3); --text-muted: var(--v5-texte-3);
  --text-on-accent: var(--v5-sur-violet);
  --border-subtle: var(--v5-separateur); --line: var(--v5-separateur); --border: var(--v5-separateur); --cd-panel-border: var(--v5-separateur); --glass-border: var(--v5-separateur);
  --border-default: var(--v5-separateur-fort); --cd-field-border: var(--v5-bord-champ);
  --accent: var(--v5-violet); --violet: var(--v5-violet); --violet-vif: var(--v5-violet);
  --accent-hover: var(--v5-violet-survol); --accent-dark: var(--v5-violet-presse); --violet-profond: var(--v5-violet-presse);
  --accent-soft: var(--v5-violet-doux); --accent-texte: var(--v5-violet-texte); --accent-anneau: var(--v5-focus);
  --danger: var(--v5-rouge); --danger-text: var(--v5-rouge); --danger-soft: var(--v5-rouge-doux); --danger-solid: var(--v5-rouge-plein); --cd-danger-solid: var(--v5-rouge-plein); --echec: var(--v5-rouge-plein);
  --success: var(--v5-vert); --succes: var(--v5-vert); --fait: var(--v5-vert);
  --success-soft: var(--v5-vert-doux); --success-bg: var(--v5-vert-doux); --succes-soft: var(--v5-vert-doux);
  --warn: var(--v5-orange); --alerte: var(--v5-orange); --attente: var(--v5-orange);
  --warn-soft: var(--v5-orange-doux); --warn-bg: var(--v5-orange-doux); --alerte-soft: var(--v5-orange-doux);
  --cours: var(--v5-texte-2);   /* état « en cours » des pages d'origine : neutre (plus de point violet) */
  --cd-control: var(--v5-bouton); --cd-control-hover: var(--v5-bouton-presse);
  --cd-field: var(--v5-surface-inset); --cd-raised: var(--v5-carte); --cd-canvas: var(--v5-fond); --cd-inset: var(--v5-carte);
  --radius-xs: var(--v5-r-mini); --radius-sm: var(--v5-r-surface); --radius-md: var(--v5-r-sel); --radius-lg: var(--v5-r-groupe); --radius-xl: var(--v5-r-fenetre); --radius-2xl: var(--v5-r-popover);
  --r-ctrl: var(--v5-r-surface); --r-petit: var(--v5-r-petit); --r-carte: var(--v5-r-groupe); --r-dialogue: var(--v5-r-fenetre);
  --control-h: var(--v5-ctrl-h);
  --shadow-sm: none; --shadow-md: var(--v5-ombre-menu); --shadow-lg: var(--v5-ombre-fenetre); --shadow-pop: var(--v5-ombre-menu);
  --font-ui: var(--v5-police); --font-display: var(--v5-police); --font-mono: var(--v5-police-mono);
  --fs-2xs: var(--v5-t-10); --fs-xs: var(--v5-t-11); --fs-sm: var(--v5-t-12); --fs-md: var(--v5-t-13); --fs-base: var(--v5-t-13);
  --fs-lg: var(--v5-t-15); --fs-xl: var(--v5-t-17); --fs-2xl: var(--v5-t-22); --fs-3xl: var(--v5-t-26);
  --dur-fast: var(--v5-duree); --ease-out: var(--v5-courbe);
}
:where(html.v5),
:where(html.v5 body){ font-family: var(--v5-police); font-size: var(--v5-t-13); line-height: var(--v5-i-13); color: var(--v5-texte); -webkit-font-smoothing: antialiased; }
:where(html.v5 *)::selection{ background: var(--v5-violet-doux); }

/* barres de défilement du système (« Scrollbars » : une poignée arrondie de 6 px, noir 50 % | blanc 55 %, sans rail ni flèches).
   Les propriétés normalisées (scrollbar-width / scrollbar-color) feraient dessiner à Chrome la barre de Windows, avec ses deux
   flèches : on les remet à « auto » pour que les pseudo-éléments ci-dessous s'appliquent ; Firefox, qui ne les connaît pas, garde la barre fine. */
:where(html.v5 *){ scrollbar-width: auto; scrollbar-color: auto; }
@supports not selector(::-webkit-scrollbar){ :where(html.v5 *){ scrollbar-width: thin; scrollbar-color: var(--v5-defilement) transparent; } }
:where(html.v5 *)::-webkit-scrollbar{ width: 10px; height: 10px; }
:where(html.v5 *)::-webkit-scrollbar-button{ display: none; width: 0; height: 0; }
:where(html.v5 *)::-webkit-scrollbar-thumb{ min-height: 36px; min-width: 36px; border: 2px solid transparent; border-radius: 6px; background: var(--v5-defilement); background-clip: content-box; }
:where(html.v5 *)::-webkit-scrollbar-thumb:hover{ background: var(--v5-defilement-survol); background-clip: content-box; }
:where(html.v5 *)::-webkit-scrollbar-track,
:where(html.v5 *)::-webkit-scrollbar-corner{ background: transparent; }

/* ---- masquage : les utilitaires des pages restent prioritaires sur tout (les anciennes feuilles les déclaraient « !important ») */
html.v5 .hidden, html.v5 [hidden], html.v5 [data-retire], html.v5 .sel-natif{ display: none !important; }

/* ================================================================== 2. contrôles génériques */

/* liens dans un texte : couleur d'accent (avant les boutons : un <a class="primary"> garde sa couleur de bouton) */
:where(html.v5 #main-app a, html.v5 .detail-sheet a, html.v5 .auth-box a){ color: var(--v5-violet-texte); }

/* ---- boutons : « Bordered Default » (button.primary), « Bordered » (button.ghost), « Bordered Destructive » (danger) */
:where(html.v5 :is(button.primary, a.primary, button.ghost, a.ghost, button.danger-ghost, button.danger-contour, .cl-btn, .abx-btn, .aj-mini, .rou-mini)){
  align-items: center; justify-content: center; gap: 5px; box-sizing: border-box;
  width: auto; height: var(--v5-ctrl-h); min-height: 0; min-width: 0; margin: 0; padding: 0 14px;
  border: 0; border-radius: var(--v5-r-ctrl); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  font: var(--v5-g-moyen) var(--v5-t-13)/16px var(--v5-police); letter-spacing: normal; text-transform: none; text-decoration: none; white-space: nowrap;
  cursor: default; user-select: none; transform: none; opacity: 1;
  transition: background-color var(--v5-duree) var(--v5-courbe), filter var(--v5-duree);
}
:where(html.v5 :is(button.primary, a.primary)){ background: var(--v5-violet); color: var(--v5-sur-violet); }
:where(html.v5 :is(button.primary, a.primary):hover:not(:disabled)){ background: var(--v5-violet-survol); }
:where(html.v5 :is(button.primary, a.primary):active:not(:disabled)){ background: var(--v5-violet-presse); opacity: 1; transform: none; }
:where(html.v5 button.primary:disabled){ background: var(--v5-violet); color: var(--v5-sur-violet); opacity: var(--v5-opacite-inactif); }
:where(html.v5 :is(button.ghost, a.ghost, .cl-btn, .abx-btn, .aj-mini, .rou-mini)){ background: var(--v5-bouton); color: var(--v5-texte); }
:where(html.v5 :is(button.ghost, a.ghost, .cl-btn, .abx-btn, .aj-mini, .rou-mini):hover:not(:disabled)){ background: var(--v5-bouton); filter: brightness(.96); }
:where(html.v5 :is(button.ghost, a.ghost, .cl-btn, .abx-btn, .aj-mini, .rou-mini):active:not(:disabled)){ background: var(--v5-bouton-presse); filter: none; transform: none; }
:where(html.v5 :is(button.ghost, .cl-btn, .abx-btn, .aj-mini, .rou-mini):disabled){ background: var(--v5-bouton-inactif); color: var(--v5-texte-inactif); }
:where(html.v5 :is(button.danger-ghost, button.danger-contour)){ background: var(--v5-rouge-doux); color: var(--v5-rouge); }
:where(html.v5 :is(button.danger-ghost, button.danger-contour):hover){ background: var(--v5-rouge-doux); filter: brightness(.95); }
:where(html.v5 :is(button.primary, button.ghost, a.ghost, a.primary, button.danger-ghost) svg){ width: 15px; height: 15px; flex: none; }
/* action d'une feuille ou d'un écran plein cadre : taille Large en capsule (kit : boutons d'alerte de 28) */
:where(html.v5 :is(.detail-sheet, .modal-box, .auth-box) :is(button.primary, button.ghost, a.ghost, button.danger-ghost)){ height: var(--v5-ctrl-l); padding: 0 16px; border-radius: var(--v5-r-bouton); }
/* bouton de ligne compact (« Small ») */
:where(html.v5 :is(.aj-mini, .rou-mini)){ height: var(--v5-ctrl-s); padding: 0 10px; border-radius: var(--v5-r-petit); font-size: var(--v5-t-11); line-height: 14px; }

/* bouton symbole et lien d'action (« Borderless ») */
:where(html.v5 :is(.icon-btn, .contact-remove-btn, .detail-close, .vt-drawer-close, .list-search-btn, .sel-close-btn, .cl-btn--icone, .abx-iconbtn, .bd-icone, .tiroir-x)){
  align-items: center; justify-content: center; flex: none; box-sizing: border-box;
  width: var(--v5-ctrl-h); height: var(--v5-ctrl-h); min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: var(--v5-r-ctrl);
  background: none; box-shadow: none; color: var(--v5-texte-2); cursor: default; font-size: 0;
}
:where(html.v5 :is(.icon-btn, .contact-remove-btn, .detail-close, .vt-drawer-close, .list-search-btn, .sel-close-btn, .cl-btn--icone, .abx-iconbtn, .bd-icone, .tiroir-x):hover){ background: var(--v5-survol); color: var(--v5-texte); filter: none; }
:where(html.v5 :is(.icon-btn, .contact-remove-btn, .detail-close, .vt-drawer-close, .list-search-btn, .sel-close-btn, .cl-btn--icone, .abx-iconbtn, .bd-icone, .tiroir-x):active){ background: var(--v5-presse); }
:where(html.v5 :is(.icon-btn, .contact-remove-btn, .detail-close, .vt-drawer-close, .cl-btn--icone, .abx-iconbtn, .bd-icone, .tiroir-x) svg){ width: 16px; height: 16px; }
/* fermeture d'une feuille : pastille ronde de 24 (bouton de fermeture d'un panneau du système) */
:where(html.v5 .detail-close){ top: 12px; right: 12px; border-radius: 50%; background: var(--v5-bouton); }
:where(html.v5 .detail-close:hover){ background: var(--v5-bouton-presse); }
:where(html.v5 :is(.link-btn, .back-btn)){ padding: 0; border: 0; background: none; color: var(--v5-violet-texte); font: var(--v5-g-moyen) var(--v5-t-13)/16px var(--v5-police); cursor: default; text-decoration: none; }
:where(html.v5 :is(.link-btn, .back-btn):hover){ text-decoration: underline; }

/* ---- champs de saisie (« Text Fields ») */
:where(html.v5 :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=search], input[type=url], input[type=tel], input:not([type])):not(.v5-champ, .pal-champ, .v5-recherche input)){
  box-sizing: border-box; width: 100%; height: var(--v5-ctrl-h); min-height: 0; margin: 0; padding: 0 7px;
  border: 0; border-radius: var(--v5-r-surface); background: var(--v5-surface-inset); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-bord-champ);
  font: var(--v5-g-normal) var(--v5-t-13)/16px var(--v5-police); color: var(--v5-texte); outline: none;
  transition: none;
}
:where(html.v5 textarea:not(.v5-champ)){
  box-sizing: border-box; width: 100%; min-height: 64px; margin: 0; padding: 6px 7px;
  border: 0; border-radius: var(--v5-r-surface); background: var(--v5-surface-inset); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-bord-champ);
  font: var(--v5-g-normal) var(--v5-t-13)/1.4 var(--v5-police); color: var(--v5-texte); outline: none; resize: vertical;
}
:where(html.v5 :is(input, textarea))::placeholder{ color: var(--v5-texte-3); opacity: 1; }
:where(html.v5 :is(input, textarea):hover){ border-color: transparent; }
:where(html.v5 :is(input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=search], input[type=url], input[type=tel], input:not([type]), textarea, select, .carrier-filter):not(.pal-champ, .v5-recherche input):is(:focus, :focus-visible)){
  outline: var(--v5-focus-l) solid var(--v5-focus); outline-offset: 0; border-color: transparent;
  box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-bord-champ); background: var(--v5-surface-inset);
}
:where(html.v5 :is(input, textarea, select):disabled){ opacity: var(--v5-opacite-inactif); }
:where(html.v5 input[type=search])::-webkit-search-cancel-button{ -webkit-appearance: none; appearance: none; width: 13px; height: 13px; margin: 0 0 0 4px; border-radius: 50%; background: var(--v5-texte-3); cursor: default;
  /* « ⊗ » du système : disque plein dont la croix est évidée (masque en luminance : le disque blanc reste, la croix noire disparaît) */
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='7' fill='%23fff'/%3E%3Cpath d='M4.6 4.6l4.8 4.8M9.4 4.6L4.6 9.4' stroke='%23000' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat luminance; }
:where(html.v5 label.field){ margin-bottom: 12px; }
:where(html.v5 :is(label.field .lbl, .lbl)){ margin-bottom: 5px; font-size: var(--v5-t-13); font-weight: var(--v5-g-moyen); line-height: 16px; letter-spacing: normal; text-transform: none; color: var(--v5-texte); }
:where(html.v5 input[type=file]){ height: auto; padding: 0; border: 0; background: none; box-shadow: none; color: var(--v5-texte-2); font-size: var(--v5-t-12); }
:where(html.v5 input[type=file])::file-selector-button{ height: var(--v5-ctrl-h); margin-right: 8px; padding: 0 12px; border: 0; border-radius: var(--v5-r-ctrl); background: var(--v5-bouton); color: var(--v5-texte); font: var(--v5-g-moyen) var(--v5-t-13)/16px var(--v5-police); cursor: default; }
/* puits de couleur (« Color Well ») : petit rectangle arrondi bordé, la couleur au centre */
/* choix d'une couleur : un puits rond (macOS), comme la pastille de couleur des comptes dans la liste — pas une capsule vide qu'on prend pour un bouton */
:where(html.v5 input[type=color]){ flex: none; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; cursor: default; overflow: hidden; }
:where(html.v5 input[type=color])::-webkit-color-swatch-wrapper{ padding: 0; }
:where(html.v5 input[type=color])::-webkit-color-swatch{ border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--v5-rempli-1); }
:where(html.v5 input[type=color])::-moz-color-swatch{ border: 0; border-radius: 50%; }

/* ---- liste déroulante (« Pop-up Buttons ») : <select>, .carrier-filter et le bouton de js/pc-ui.js (.sel-btn) */
:where(html.v5 :is(select, .carrier-filter):not(.v5-champ)){
  -webkit-appearance: none; appearance: none; box-sizing: border-box; width: auto; max-width: 100%; height: var(--v5-ctrl-h); min-height: 0; margin: 0; padding: 0 26px 0 12px;
  border: 0; border-radius: var(--v5-r-ctrl); box-shadow: none; outline: none;
  background: var(--v5-bouton) var(--v5-img-chevrons) right 5px center / 14px 14px no-repeat;
  font: var(--v5-g-moyen) var(--v5-t-13)/16px var(--v5-police); color: var(--v5-texte); cursor: default; text-overflow: ellipsis;
}
:where(html.v5 .sel-btn){
  align-items: center; justify-content: space-between; gap: 4px; box-sizing: border-box; height: var(--v5-ctrl-h); min-height: 0; padding: 0 5px 0 12px;
  border: 0; border-radius: var(--v5-r-ctrl); background: var(--v5-bouton); box-shadow: none; outline: none;
  font: var(--v5-g-moyen) var(--v5-t-13)/16px var(--v5-police); color: var(--v5-texte); cursor: default;
}
:where(html.v5 .sel-btn:hover){ filter: brightness(.96); }
:where(html.v5 .sel-btn[aria-expanded="true"]),
:where(html.v5 .sel-btn:active){ background: var(--v5-bouton-presse); filter: none; }
:where(html.v5 .sel-btn:focus-visible){ outline: var(--v5-focus-l) solid var(--v5-focus); outline-offset: 0; box-shadow: none; }
:where(html.v5 .sel-btn:disabled){ opacity: var(--v5-opacite-inactif); }
:where(html.v5 .sel-btn .sel-chev){ width: 14px; height: 14px; flex: none; color: var(--v5-texte-2); background: var(--v5-img-chevrons) center / 14px 14px no-repeat; }
:where(html.v5 .sel-btn .sel-chev > *){ visibility: hidden; }   /* chevrons haut / bas d'une liste déroulante du système (le chevron simple d'origine est masqué) */
:where(html.v5 .sel-btn .sel-label){ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- case à cocher et bouton radio (« Toggles ») */
:where(html.v5 input[type=checkbox]:not(.v5-case, .switch input, .v5-masque)){
  -webkit-appearance: none; appearance: none; flex: none; position: relative; box-sizing: border-box; width: 16px; height: 16px; min-width: 0; margin: 0; padding: 0; border: 0;
  border-radius: var(--v5-r-case); background: var(--v5-rempli-1); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-texte-3); cursor: default; vertical-align: -3px;
}
:where(html.v5 input[type=checkbox]:not(.v5-case, .switch input, .v5-masque))::before{ content: none; }
:where(html.v5 input[type=checkbox]:not(.v5-case, .switch input, .v5-masque):checked){ background: var(--v5-violet); box-shadow: none; }
:where(html.v5 input[type=checkbox]:not(.v5-case, .switch input, .v5-masque):checked)::after{
  content: ""; position: absolute; inset: 0; background: var(--v5-sur-violet);   /* la coche du système, comme .v5-case (css/v5/controles.css) */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.3 8.5l2.7 2.8 4.8-6.6' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.3 8.5l2.7 2.8 4.8-6.6' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}
:where(html.v5 input[type=radio]:not(.v5-radio, .v5-masque)){
  -webkit-appearance: none; appearance: none; flex: none; position: relative; box-sizing: border-box; width: 16px; height: 16px; min-width: 0; margin: 0; padding: 0; border: 0;
  border-radius: 50%; background: var(--v5-rempli-1); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-texte-3); cursor: default; vertical-align: -3px;
}
:where(html.v5 input[type=radio]:not(.v5-radio, .v5-masque))::before{ content: none; }
:where(html.v5 input[type=radio]:not(.v5-radio, .v5-masque):checked){ background: var(--v5-violet); box-shadow: none; }
:where(html.v5 input[type=radio]:not(.v5-radio, .v5-masque):checked)::after{ content: ""; position: absolute; left: 5.5px; top: 5.5px; width: 5px; height: 5px; border-radius: 50%; background: var(--v5-sur-violet); }
:where(html.v5 :is(input[type=checkbox], input[type=radio]):focus-visible){ outline: var(--v5-focus-l) solid var(--v5-focus); outline-offset: 1px; }

/* ---- interrupteur (« Toggles - Switches » Regular : 54×24, bouton 32×20) : <label class="switch"><input><span class="track"> */
:where(html.v5 .switch){ position: relative; flex: none; width: 54px; height: 24px; }
:where(html.v5 .switch input){ position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: default; z-index: 1; }
:where(html.v5 .switch .track){ position: absolute; inset: 0; border-radius: 12px; background: var(--v5-rempli-1); box-shadow: inset 0 0 0 var(--v5-trait-fort) var(--v5-texte-3); cursor: default; transition: background-color var(--v5-duree-feuille) var(--v5-courbe); }
:where(html.v5 .switch .track)::before{ content: ""; position: absolute; left: 2px; top: 2px; width: 32px; height: 20px; border-radius: 10px; background: var(--v5-bouton-interrupteur); box-shadow: var(--v5-ombre-poignee); transform: none; transition: transform var(--v5-duree-feuille) var(--v5-courbe); }
:where(html.v5 .switch input:checked + .track){ background: var(--v5-violet); box-shadow: none; }
:where(html.v5 .switch input:checked + .track)::before{ transform: translateX(18px); background: var(--v5-sur-violet); }
:where(html.v5 .switch input:focus-visible + .track){ outline: var(--v5-focus-l) solid var(--v5-focus); outline-offset: 1px; }
:where(html.v5 .switch input:disabled + .track){ opacity: var(--v5-opacite-inactif); }

/* ---- curseur (« Sliders ») */
:where(html.v5 input[type=range]:not(.v5-curseur)){ -webkit-appearance: none; appearance: none; height: var(--v5-ctrl-h); margin: 0; padding: 0; border: 0; background: none; box-shadow: none; accent-color: var(--v5-violet); }
:where(html.v5 input[type=range]:not(.v5-curseur))::-webkit-slider-runnable-track{ height: 6px; border-radius: 3px; background: var(--v5-rempli-1); }
:where(html.v5 input[type=range]:not(.v5-curseur))::-webkit-slider-thumb{ -webkit-appearance: none; appearance: none; width: 22px; height: 16px; margin-top: -5px; border: 0; border-radius: 8px; background: var(--v5-bouton-interrupteur); box-shadow: var(--v5-ombre-poignee); }

/* ---- contrôle segmenté (« Segmented Controls ») : .segmented > button(.active) */
:where(html.v5 :is(.segmented, .segmented.glass)){
  gap: 0; box-sizing: border-box; height: var(--v5-ctrl-h); margin: 0; padding: 0; border: 0; border-radius: var(--v5-r-ctrl);
  background: var(--v5-bouton); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
:where(html.v5 .segmented button){
  position: relative; flex: 0 1 auto; height: 100%; min-height: 0; margin: 0; padding: 0 12px; border: 0; border-radius: var(--v5-r-ctrl); background: none; box-shadow: none;
  font: var(--v5-g-moyen) var(--v5-t-13)/16px var(--v5-police); color: var(--v5-texte); white-space: nowrap; cursor: default;
}
:where(html.v5 .segmented button + button)::before{ content: ""; position: absolute; left: -.5px; top: 5px; bottom: 5px; width: 1px; border-radius: 1px; background: var(--v5-rempli-1); }
:where(html.v5 .segmented button.active)::before,
:where(html.v5 .segmented button.active + button)::before{ content: none; }
:where(html.v5 .segmented button:hover:not(.active)){ background: none; color: var(--v5-texte); }
:where(html.v5 .segmented button.active){ background: var(--v5-violet); color: var(--v5-sur-violet); box-shadow: none; }

/* même contrôle sous une autre classe d'origine : .liens-mode (Auto / Manuel, Confortable / Compacte) */
:where(html.v5 .liens-mode){ gap: 0; box-sizing: border-box; height: var(--v5-ctrl-h); margin: 0; padding: 0; border: 0; border-radius: var(--v5-r-ctrl); background: var(--v5-bouton); box-shadow: none; }
:where(html.v5 .liens-mode button){ position: relative; height: 100%; min-height: 0; margin: 0; padding: 0 12px; border: 0; border-radius: var(--v5-r-ctrl); background: none; box-shadow: none; font: var(--v5-g-moyen) var(--v5-t-13)/16px var(--v5-police); color: var(--v5-texte); white-space: nowrap; cursor: default; }
:where(html.v5 .liens-mode button:is(.active, [aria-checked="true"])){ background: var(--v5-violet); color: var(--v5-sur-violet); box-shadow: none; }
:where(html.v5 .liens-mode button:is(.active, [aria-checked="true"]) .cpt){ color: inherit; }   /* le compteur du segment choisi reste lisible sur l'accent */

/* ---- pastilles d'état (texte court dans une capsule de remplissage) */
:where(html.v5 :is(.pill-status, .col-tag, .badge, .purchased-toggle)){
  align-items: center; height: 18px; margin: 0; padding: 0 7px; border: 0; border-radius: var(--v5-r-capsule);
  background: var(--v5-rempli-2); color: var(--v5-texte-2); font-size: var(--v5-t-11); font-weight: var(--v5-g-moyen); line-height: 1; white-space: nowrap;
}
:where(html.v5 .pill-status.echec){ background: none; color: var(--v5-rouge); }
:where(html.v5 .pill-status.en_cours){ background: none; color: var(--v5-violet-texte); }
:where(html.v5 .badge-destructive){ height: auto; padding: 0; border-radius: 0; background: none; color: var(--v5-rouge); font-size: var(--v5-t-12); font-weight: var(--v5-g-moyen); }   /* texte rouge, sans pastille (15/10) */

/* ---- conteneurs : groupe (« Group Boxes » : remplissage quaternaire, r12, sans bord ni ombre) */
:where(html.v5 :is(.card, .card.glass)){ border: 0; border-radius: var(--v5-r-groupe); background: var(--v5-fond-groupe); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
:where(html.v5 .empty){ padding: 40px 16px; text-align: center; font-size: var(--v5-t-13); color: var(--v5-texte-3); }
:where(html.v5 hr){ height: 1px; border: 0; background: var(--v5-separateur); }
:where(html.v5 :is(kbd)){ align-items: center; height: 16px; padding: 0 4px; border: 0; border-radius: var(--v5-r-mini); background: var(--v5-rempli-3); box-shadow: none; font: var(--v5-g-moyen) var(--v5-t-11)/1 var(--v5-police); color: var(--v5-texte-3); }

/* ---- fenêtres modales (« Windows » r16, ombre de fenêtre) : .detail-modal > .detail-sheet */
:where(html.v5 .detail-modal){ align-items: center; }
:where(html.v5 .detail-modal)::before,
:where(html.v5 .detail-backdrop){ background: var(--v5-voile); backdrop-filter: none; -webkit-backdrop-filter: none; }
:where(html.v5 :is(.detail-sheet, .detail-sheet.glass)){
  border: 0; border-radius: var(--v5-r-fenetre); background: var(--v5-surface-elevee); color: var(--v5-texte);
  box-shadow: var(--v5-ombre-fenetre); backdrop-filter: none; -webkit-backdrop-filter: none;
}
:where(html.v5 .detail-sheet :is(h2, h3, .detail-title)){ font-size: var(--v5-t-15); font-weight: var(--v5-g-fort); line-height: var(--v5-i-15); letter-spacing: normal; }

/* ---- icônes d'origine au trait : même épaisseur et mêmes bouts ronds que les symboles V5 (js/v5/icones.js) */
:where(html.v5 :is(#main-app, .detail-sheet, .menu-contexte.pc) svg[fill="none"][stroke="currentColor"]){ stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---- anneau de focus du système pour tout bouton hérité */
:where(html.v5 :is(button, a, [tabindex], summary):not(.v5-menu-item, .mc-item, .sel-item, .v5-menu, .v5-dialogue, .v5-alerte):focus-visible){ outline: var(--v5-focus-l) solid var(--v5-focus); outline-offset: var(--v5-focus-decalage, 0px); }
:where(html.v5 :is(button, a, summary):focus:not(:focus-visible)){ outline: none; }

/* 02/11 (audit) : alignements
   · titres de groupe (« À confirmer », « Variante à choisir »…) au bord gauche de la page, comme le grand titre ;
   · en-têtes de colonnes d'Annonces et de Colis au-dessus du texte des lignes (après la vignette), comme dans Production ;
   · page Extension : titres de section et lignes au même bord que les cartes du haut ;
   · Achats : le lien « Retirer ces anciens achats » ne garde pas de marge quand il passe à la ligne. */
:where(html.v5 .an-entete > .an-col:first-child){ padding-left: 42px; }
:where(html.v5 .article-table-head .h-article){ padding-left: 38px; }
:where(html.v5 .vt-achats-alerte .link-btn){ margin-left: 0; }
