/* shell.css — la coque de navigation (chantier 1, lot 2 — bible XIII-115).
 *
 * Ne s'applique qu'aux pages qui portent `<html class="hx-shell">` : toutes les
 * autres gardent leur navigation actuelle, intacte. C'est ce qui permet de
 * livrer la coque page par page, et de la retirer d'une page en enlevant une
 * classe.
 *
 * Palette GLACIER (décision du 23/09/2026, après comparaison avec Marine sur les
 * trois pages pilotes). Ses jetons sont GÉNÉRÉS par `docs/design/palettes.py`, qui
 * vérifie les contrastes ; le bloc ci-dessous est contrôlé par
 * `python docs/design/palettes.py --verifier-shell assets/css/shell.css`.
 *
 * Les variables de `helix.css` y sont REDIRIGÉES vers la palette : le contenu des
 * pages se repeint avec elle, et le texte secondaire atteint enfin le seuil de
 * lisibilité (XIII-117).
 */

/* ═══ JETONS GÉNÉRÉS — docs/design/palettes.py — ne pas éditer à la main ═══ */
html.hx-shell{--surface:#FFFFFF;--blanc:#FFFFFF;--brand-dk:#084A67;--accent:#BF5610;--accent-ink:#FFFFFF;--accent-soft:#FBEBDD;--vif:#EA7722;--on-vif:#FFFFFF;--ok:#0B7A53;--ok-soft:#E4F4EC;--warn:#8F5406;--warn-soft:#FBF0DC;--bad:#AD3326;--bad-soft:#FBEAE7;--helix:#0B6E99;--leg:#A8640E;--vme:#6C4FD1;--canvas:#EDF2F6;--surface2:#F6F9FB;--hover:#EEF3F7;--line:#DDE5EC;--line2:#C4D0DB;--ink:#0D1B26;--ink2:#394A58;--muted:#5B6D7E;--brand:#0B5F84;--brand-soft:#E2EEF5;--brand-line:#96C0D4;--rail:#FFFFFF;--rail-ink:#0D1B26;--rail-mute:#5B6D7E;--rail-hover:#EEF3F7;--rail-on:#E2EEF5;--rail-on-ink:#0B5F84;--rail-line:#DDE5EC;--ind:#0B5F84;--mark:#0B4F6C;--mark-ink:#FFFFFF;--bg:#EDF2F6;--surface:#FFFFFF;--surface2:#F6F9FB;--border-lt:#DDE5EC;--border:#DDE5EC;--border-md:#C4D0DB;--text:#0D1B26;--muted:#5B6D7E;--muted-dk:#394A58;--blue:#0B5F84;--blue-md:#0B5F84;--blue-lt:#E2EEF5;--blue-bd:#96C0D4;--blue-dk:#084A67;--orange:#BF5610;--orange-dk:#BF5610;--orange-lt:#FBEBDD;--green:#0B7A53;--success:#0B7A53;--green-lt:#E4F4EC;--success-bg:#E4F4EC;--red:#AD3326;--danger:#AD3326;--red-lt:#FBEAE7;--danger-bg:#FBEAE7;--amber:#8F5406;--warn:#8F5406;--amber-lt:#FBF0DC;--warn-bg:#FBF0DC;--nav-bg:#FFFFFF;--footer-bg:#FFFFFF;--stats-bg:#FFFFFF;--stats-sep:#DDE5EC}
html.hx-shell[data-theme="dark"]{color-scheme:dark;--blanc:#FFFFFF;--brand-dk:#285E78;--accent:#F28A3F;--accent-ink:#1A0D03;--accent-soft:#2E1C0F;--vif:#F28A3F;--on-vif:#0A1117;--ok:#3CCB93;--ok-soft:#10271F;--warn:#E5A63A;--warn-soft:#2A2110;--bad:#EF7A6E;--bad-soft:#2C1715;--helix:#5DBDE3;--leg:#E5A63A;--vme:#A48CF5;--canvas:#0A1117;--surface:#10191F;--surface2:#0D151B;--hover:#16212A;--line:#1E2B35;--line2:#2A3A47;--ink:#E6EDF3;--ink2:#B3C3CF;--muted:#8095A6;--brand:#6CC4E6;--brand-soft:#112A38;--brand-line:#2E6C88;--rail:#10191F;--rail-ink:#E6EDF3;--rail-mute:#8095A6;--rail-hover:#16212A;--rail-on:#112A38;--rail-on-ink:#8FD3EE;--rail-line:#1E2B35;--ind:#6CC4E6;--mark:#0B5F84;--mark-ink:#FFFFFF;--bg:#0A1117;--surface:#10191F;--surface2:#0D151B;--border-lt:#1E2B35;--border:#1E2B35;--border-md:#2A3A47;--text:#E6EDF3;--muted:#8095A6;--muted-dk:#B3C3CF;--blue:#6CC4E6;--blue-md:#6CC4E6;--blue-lt:#112A38;--blue-bd:#2E6C88;--blue-dk:#285E78;--orange:#F28A3F;--orange-dk:#F28A3F;--orange-lt:#2E1C0F;--green:#3CCB93;--success:#3CCB93;--green-lt:#10271F;--success-bg:#10271F;--red:#EF7A6E;--danger:#EF7A6E;--red-lt:#2C1715;--danger-bg:#2C1715;--amber:#E5A63A;--warn:#E5A63A;--amber-lt:#2A2110;--warn-bg:#2A2110;--nav-bg:#10191F;--footer-bg:#10191F;--stats-bg:#10191F;--stats-sep:#1E2B35}
/* ═══ FIN DES JETONS GÉNÉRÉS ═══ */

/* ═══ POLICE — Inter, hébergée par le portail (bible XIII-129) ═══
   La CSP de la racine refuse les feuilles et polices tierces (style-src / font-src 'self') : la feuille
   Google d'Inter y était bloquée, et les pages de la racine s'affichaient en police de repli (Segoe UI
   sous Windows) pendant que Rapport et Mes soumissions étaient en Inter — la police changeait d'un
   onglet à l'autre. Un seul fichier variable (graisses 100 à 900), licence SIL OFL (LICENSE-Inter.txt). */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/InterVariable.woff2') format('woff2'); }
/* --hx-police : la pile de polices du portail, à employer dans le raccourci `font:` — `font: 600 13px/1 inherit` est
   INVALIDE (le mot-clé `inherit` n'y est pas admis) : le navigateur ignore toute la déclaration, taille et graisse
   comprises, et le bouton retombe en Arial 13,33 px. Vu le 25/09 sur 34 déclarations, dont les composants communs. */
html.hx-shell { --hx-police: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
html.hx-shell body { font-family: var(--hx-police); }
/* Les champs et les boutons n'héritent PAS de la police par défaut (le navigateur leur impose la sienne) : sans cette
   règle, un <input> ou un <select> sans police explicite s'affichait en Arial, un <textarea> en chasse fixe. */
html.hx-shell :where(button, input, select, textarea, optgroup) { font-family: inherit; }
/* La chasse fixe du portail pour les codes (numéros de compte, RTA) : sans elle, un <code> prenait la chasse fixe du
   navigateur (« monospace », Courier) — vue sur Mes ventes le 25/09. */
html.hx-shell :where(code, kbd, samp, pre) { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; }


/* ── L'ancienne navigation, masquée sur les pages de la coque ─────────────
   Masquée, pas supprimée : retirer la classe `hx-shell` la fait revenir.
   `.hx-footer` et `.hx-accent-bar` ajoutés après la première vérification sur le
   serveur de test (23/09) : le pied de page est FIXE et calé à gauche, il passait
   sous le rail (« kim Belkhiri ») et doublait le menu du compte (nom, « ← Hub »,
   Déconnexion) ; la bande décorative soulignait l'ancien en-tête. */
html.hx-shell .hx-footer,
html.hx-shell .hx-accent-bar,
html.hx-shell .hx-navbar:not(.hx-garde),
html.hx-shell .hx-bnav,
html.hx-shell .atabs-bar:not(.atabs-contenu),
html.hx-shell .hx-sheet-overlay,
html.hx-shell .hx-sheet { display: none !important; }

/* Deux exceptions, déclarées dans la page plutôt que devinées ici (lot 3b, 23/09) :
   · `.atabs-contenu` — une barre d'onglets qui change le CONTENU de la page
     (Produits : Internet, Télévision… ; Aide Salesforce : ses quatre chapitres).
     Même classe `atabs-bar` que les copies de navigation, rôle opposé : la
     masquer rendait six catégories de produits inaccessibles.
   · `.hx-garde` — un en-tête qui porte une commande propre à la vue (la fiche
     plein écran du CRM et son bouton de retour).
   `scripts/test-nav-catalogue.js` refuse une barre d'onglets à boutons sans la
   première classe. */
/* Le bandeau hors-ligne (`.hx-offline`, helix.css) est fixé en haut, z-index 200 :
   sous la coque il glissait SOUS l'en-tête (240) — un agent hors ligne n'aurait
   jamais vu l'alerte (crible du 24/09). Il se place sous l'en-tête, à droite du rail. */
html.hx-shell .hx-offline { top: 56px; left: 76px; z-index: 239; }   /* 239 : caché SOUS l’en-tête au repos (translateY -100 %), visible dessous une fois descendu */
@media (max-width: 899px) { html.hx-shell .hx-offline { top: 52px; left: 0; } }
html.hx-shell .atabs-contenu { top: 56px; }
@media (max-width: 899px) { html.hx-shell .atabs-contenu { top: 52px; } }

html.hx-shell body { background: var(--canvas); padding-left: 76px; padding-top: 56px; }

/* ── Une couleur par section (24/09/2026 — « les icônes et tuiles manquent de couleur ») ──
   La même teinte partout pour une section : icône du rail, icône de la barre du bas,
   carré d'icône des accès rapides. La couleur devient un repère. Contrastes vérifiés :
   blanc sur la teinte claire ≥ 5,18 ; teinte sombre sur le rail sombre ≥ 6,43.
   Hors du bloc généré par palettes.py : ce ne sont pas des jetons de la palette. */
html.hx-shell { --sc: var(--brand); }
html.hx-shell .sc-accueil  { --sc: #0B5F84; }
html.hx-shell .sc-vendre   { --sc: #C2410C; }
html.hx-shell .sc-resultats{ --sc: #1D4ED8; }
html.hx-shell .sc-clients  { --sc: #047857; }
html.hx-shell .sc-equipe   { --sc: #7C3AED; }
html.hx-shell .sc-traiter  { --sc: #B91C1C; }
html.hx-shell .sc-ventes   { --sc: #1D4ED8; }
html.hx-shell .sc-offre    { --sc: #C2410C; }
html.hx-shell .sc-equipeA  { --sc: #7C3AED; }
html.hx-shell .sc-systeme  { --sc: #475569; }
html.hx-shell[data-theme="dark"] .sc-accueil  { --sc: #6CC4E6; }
html.hx-shell[data-theme="dark"] .sc-vendre   { --sc: #FB923C; }
html.hx-shell[data-theme="dark"] .sc-resultats{ --sc: #7FA8F8; }
html.hx-shell[data-theme="dark"] .sc-clients  { --sc: #34D399; }
html.hx-shell[data-theme="dark"] .sc-equipe   { --sc: #B79BFA; }
html.hx-shell[data-theme="dark"] .sc-traiter  { --sc: #F87171; }
html.hx-shell[data-theme="dark"] .sc-ventes   { --sc: #7FA8F8; }
html.hx-shell[data-theme="dark"] .sc-offre    { --sc: #FB923C; }
html.hx-shell[data-theme="dark"] .sc-equipeA  { --sc: #B79BFA; }
html.hx-shell[data-theme="dark"] .sc-systeme  { --sc: #A3B1C2; }
/* Rail et barre du bas : l'icône porte la couleur de sa section ; la section
   courante prend un fond teinté et un repère de sa couleur. */
html.hx-shell .sh-r svg, html.hx-shell .sh-b svg { color: var(--sc); }
html.hx-shell .sh-r[aria-current="page"] { background: color-mix(in srgb, var(--sc) 13%, var(--rail)); color: var(--rail-ink); }
html.hx-shell .sh-r[aria-current="page"]::before { background: var(--sc); }
html.hx-shell .sh-b[aria-current="page"] { color: var(--ink); }
html.hx-shell .sh-b[aria-current="page"]::before { background: var(--sc); }

/* ── Rail : cinq sections, ne défile jamais ─────────────────────────────── */
.sh-rail {
  position: fixed; left: 0; top: 0; bottom: 0; width: 76px; z-index: 250;
  background: var(--rail); border-right: 1px solid var(--rail-line);
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 12px;
  overflow: hidden;
}
.sh-mark { width: 38px; height: 38px; border-radius: 10px; background: var(--mark); display: grid; place-items: center; margin-bottom: 6px; }
/* Repère d'espace sous le logo (24/09) — bleu en Terrain, ambre en Gestion. */
.sh-esp { font: 700 12px/1 var(--hx-police); letter-spacing:0; padding: 4px 6px; border-radius: 5px; margin-bottom: 8px; }
.sh-esp-terrain { background: var(--brand-soft); color: var(--brand); }
.sh-esp-gestion { background: var(--warn-soft); color: var(--warn); }
.sh-mark svg { width: 20px; height: 20px; stroke: var(--mark-ink); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sh-mark svg .dot { fill: var(--vif); stroke: none; }
.sh-r {
  position: relative; width: 64px; border-radius: 10px; padding: 9px 2px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--rail-mute); font-size: 12px; font-weight: 500; text-decoration: none; letter-spacing: 0;   /* 10,5 → 12 px (crible du 24/09) */
}
.sh-r svg { width: 20px; height: 20px; }
.sh-r:hover { background: var(--rail-hover); color: var(--rail-ink); }
.sh-r[aria-current="page"] { background: var(--rail-on); color: var(--rail-on-ink); }
.sh-r[aria-current="page"]::before {
  content: ""; position: absolute; left: -6px; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--ind);
}
.sh-spacer { flex: 1; }
.sh-me {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rail-line);
  background: var(--rail-on); color: var(--rail-on-ink); font: 600 12px/1 var(--hx-police); cursor: pointer;
}

/* ── En-tête ────────────────────────────────────────────────────────────── */
.sh-head {
  position: fixed; top: 0; left: 76px; right: 0; height: 56px; z-index: 240;
  background: var(--surface); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 0 20px;
}
.sh-crumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; }
.sh-crumb svg { width: 13px; height: 13px; flex: none; opacity: .6; }
.sh-crumb b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.sh-head .sh-mark { display: none; }
.sh-search {
  margin-left: auto; display: flex; align-items: center; gap: 9px; flex: none;
  width: min(300px, 24vw); height: 34px; padding: 0 8px 0 11px;   /* laisse la place au fil d'Ariane */
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface2);
  color: var(--muted); font: 400 13px/1 var(--hx-police); text-align: left; cursor: pointer;
}
.sh-search svg { width: 15px; height: 15px; flex: none; }
.sh-search span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-kbd { font: 500 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--muted); background: var(--surface); }
.sh-seg { display: inline-flex; background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; flex: none; }
.sh-seg button, .sh-seg a {
  border: 0; background: transparent; border-radius: 6px; padding: 5px 10px;
  font: 500 12.5px/1.2 var(--hx-police); color: var(--muted); cursor: pointer; text-decoration: none;
}
.sh-seg [aria-pressed="true"], .sh-seg [aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(14,26,36,.08); }
.sh-seg .sh-lbl { font-size: 12px; color: var(--muted); padding: 5px 6px 5px 8px; cursor: default; }
.sh-icon {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface2); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none;
}
.sh-icon svg { width: 16px; height: 16px; }

/* ── Bandeau de section : nom + pages en onglets ───────────────────────── */
.sh-band { background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 24px 0; margin: 0 0 18px; }
.sh-band h2 { font-size: 19px; font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.2; color: var(--ink); }
.sh-band p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.sh-tabs { display: flex; gap: 2px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.sh-tabs::-webkit-scrollbar { display: none; }
.sh-tab {
  position: relative; padding: 9px 12px 11px; font-size: 13px; font-weight: 500;
  color: var(--muted); white-space: nowrap; text-decoration: none; border-radius: 6px 6px 0 0;
}
.sh-tab:hover { color: var(--ink); background: var(--hover); }
.sh-tab[aria-current="page"] { color: var(--ink); }
.sh-tab[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }

/* ── Menu du compte ─────────────────────────────────────────────────────── */
.sh-menu {
  position: fixed; left: 84px; bottom: 12px; z-index: 260; min-width: 220px;
  background: var(--surface); border: 1px solid var(--line2); border-radius: 10px;
  box-shadow: 0 18px 40px -12px rgba(6,11,16,.4); padding: 6px;
}
.sh-menu .qui { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sh-menu .qui b { display: block; font-size: 13.5px; color: var(--ink); }
.sh-menu .qui small { font-size: 12px; color: var(--muted); }
.sh-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 7px; font: 500 13px/1.3 var(--hx-police); color: var(--ink); cursor: pointer; text-align: left;
}
.sh-menu button:hover { background: var(--hover); }
.sh-menu svg { width: 15px; height: 15px; color: var(--muted); }

/* ── Recherche « Aller à… » ─────────────────────────────────────────────── */
.sh-scrim { position: fixed; inset: 0; background: rgba(6,11,16,.42); z-index: 400; }
.sh-pal {
  position: fixed; left: 50%; top: 72px; transform: translateX(-50%); z-index: 401;
  width: min(580px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--line2);
  border-radius: 12px; box-shadow: 0 24px 60px -12px rgba(6,11,16,.45); overflow: hidden;
}
.sh-pal-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.sh-pal-in svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.sh-pal-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 15px/1.4 var(--hx-police); color: var(--ink); }
.sh-res-list { max-height: 380px; overflow-y: auto; padding: 6px; }
.sh-res-h { font-size: 12px; font-weight: 600; letter-spacing:0; color: var(--muted); padding: 10px 10px 4px; }
.sh-res { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 7px; text-decoration: none; color: var(--ink); }
.sh-res svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.sh-res .t { flex: 1; min-width: 0; }
.sh-res .t b { display: block; font-size: 13.5px; font-weight: 500; }
.sh-res .t small { font-size: 12px; color: var(--muted); }
.sh-res .t em { font-style: normal; color: var(--accent); font-weight: 500; }
.sh-res .sp { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; }
.sh-res .sp.act { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.sh-res[aria-selected="true"] { background: var(--hover); }
.sh-res[aria-selected="true"] svg { color: var(--brand); }
.sh-vide { padding: 18px 14px; color: var(--muted); font-size: 13px; }
.sh-pal-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); background: var(--surface2); }

/* ── Barre du bas (téléphone) ───────────────────────────────────────────── */
.sh-bottom { display: none; }
.sh-me-tel { display: none !important; }

@media (max-width: 899px) {
  html.hx-shell body { padding-left: 0; padding-top: 52px; padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .sh-rail { display: none; }
  .sh-head { left: 0; height: 52px; padding: 0 12px; gap: 8px; }
  .sh-head .sh-mark { display: grid; width: 32px; height: 32px; margin: 0; }
  .sh-head .sh-mark svg { width: 16px; height: 16px; }
  .sh-crumb { display: none; }
  .sh-search { width: 36px; padding: 0; justify-content: center; }
  .sh-search span, .sh-search .sh-kbd { display: none; }
  .sh-seg .sh-lbl { display: none; }
  .sh-band { padding: 14px 16px 0; margin-bottom: 14px; }
  .sh-tabs { gap: 6px; margin: 10px -16px 0; padding: 0 16px 12px; }
  .sh-tab { border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; background: var(--surface); }
  .sh-tab[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
  .sh-tab[aria-current="page"]::after { display: none; }
  .sh-bottom {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 240;
    height: calc(64px + env(safe-area-inset-bottom, 0px)); padding: 0 4px env(safe-area-inset-bottom, 0px);
    background: var(--surface); border-top: 1px solid var(--line);
  }
  .sh-b {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; min-width: 0;   /* 10,5 → 12 px */
  }
  .sh-b svg { width: 21px; height: 21px; }
  .sh-b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .sh-b[aria-current="page"] { color: var(--brand); }
  .sh-b[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--brand); }
  .sh-menu { left: auto; right: 12px; bottom: auto; top: 58px; }
  .sh-me-tel { display: grid !important; font: 600 12px/1 var(--hx-police); color: var(--brand); background: var(--brand-soft); }

  .sh-pal { top: 10px; }
}

/* Clavier : un focus toujours visible, dans la couleur vive de la marque. */
html.hx-shell :focus-visible { outline: 2px solid var(--vif); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html.hx-shell * { transition: none !important; animation: none !important; } }

/* ═══ COMPOSANTS COMMUNS — un par RÔLE, jamais par page (bible XIII-126, règle de CLAUDE.md) ═══
   (1) Onglets de page : la coque (.sh-tabs) — ci-dessus.
   (2) Changer de vue dans une page : .hx-vues — sélecteur groupé, posé sur le fond.
   (3) Filtrer une liste : .hx-filtres — puces à bordure, l'active en teinte douce de la marque.
   + .hx-act : bouton secondaire (aller ailleurs, exporter, revenir).
   L'état actif se lit sur .on, .active, [aria-selected="true"] ou [aria-pressed="true"] : les
   pages converties gardent leurs classes et leur JS, seul le conteneur change. */
html.hx-shell .hx-barre { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }

html.hx-shell .hx-vues { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  background: var(--hover); border: 1px solid var(--line); border-radius: 10px; }
html.hx-shell .hx-vues::-webkit-scrollbar { display: none; }
/* Les vues passent à la ligne DÈS qu'elles manquent de place, au lieu de défiler barre masquée — toutes visibles d'un coup
   d'œil. Le 25/09 : d'abord sous 640 px seulement (Produits, CRM, Aide Salesforce : 568 px de vues dans 356) ; puis les huit
   onglets du Suivi des ventes (770 px) dans la colonne d'une tablette (~656 px) cachaient trois onglets hors champ. À toutes
   les largeurs, donc — là où elles tiennent, rien ne change. */
html.hx-shell .hx-vues > button, html.hx-shell .hx-vues > a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; margin: 0;
  border: 1px solid transparent; border-radius: 7px; background: none; box-shadow: none;
  color: var(--muted); font: 600 13px/1 var(--hx-police); white-space: nowrap; cursor: pointer; text-decoration: none; }
html.hx-shell .hx-vues > :hover { color: var(--ink); }
html.hx-shell .hx-vues > .on, html.hx-shell .hx-vues > .active,
html.hx-shell .hx-vues > [aria-selected="true"], html.hx-shell .hx-vues > [aria-pressed="true"] {
  background: var(--surface); color: var(--ink); border-color: var(--line2); box-shadow: 0 1px 2px rgba(13,27,38,.06); }

html.hx-shell .hx-filtres { display: flex; gap: 6px; flex-wrap: wrap; }
html.hx-shell .hx-filtres.defile { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
html.hx-shell .hx-filtres.defile::-webkit-scrollbar { display: none; }
html.hx-shell .hx-filtres > button, html.hx-shell .hx-filtres > a {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 13px; margin: 0;
  border: 1px solid var(--line2); border-radius: 999px; background: var(--surface); box-shadow: none;
  color: var(--ink2); font: 600 12.5px/1 var(--hx-police); white-space: nowrap; cursor: pointer; text-decoration: none; }
html.hx-shell .hx-filtres > :hover { border-color: var(--brand-line); color: var(--ink); }
html.hx-shell .hx-filtres > .on, html.hx-shell .hx-filtres > .active,
html.hx-shell .hx-filtres > [aria-selected="true"], html.hx-shell .hx-filtres > [aria-pressed="true"] {
  background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }

html.hx-shell .hx-act { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; margin: 0;
  border: 1px solid var(--line2); border-radius: 8px; background: var(--surface); box-shadow: none;
  color: var(--ink2); font: 600 13px/1 var(--hx-police); white-space: nowrap; cursor: pointer; text-decoration: none; }
html.hx-shell .hx-act:hover { color: var(--ink); border-color: var(--brand-line); background: var(--brand-soft); }
html.hx-shell .hx-act:disabled { opacity: .7; cursor: progress; }
html.hx-shell .hx-act.active, html.hx-shell .hx-act[aria-pressed="true"] { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }
html.hx-shell .hx-act.hx-danger:hover { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
/* L'ACTION PRINCIPALE d'une page (exporter, importer — une par vue) : pleine, à la couleur de la marque, sur le modèle du bouton
   « Importer » de la Remise des contrats, que l'utilisateur a désigné comme le plus beau (25/09). Encre des fonds vifs : lisible
   en sombre, contrairement au blanc figé sur --blue qu'il portait. Un export PROPRE À UN TABLEAU reste un .hx-act secondaire. */
html.hx-shell .hx-act.hx-principal { background: var(--brand); border-color: var(--brand); color: var(--on-vif, #fff); }
html.hx-shell .hx-act.hx-principal:hover { background: var(--brand); border-color: var(--brand); color: var(--on-vif, #fff); filter: brightness(1.08); }
/* `hidden` l'emporte TOUJOURS sur le display d'une page (25/09). La règle ne visait que .hx-act, .hx-vues et .hx-filtres ;
   ailleurs, un { display: flex } de page gagnait sur l'attribut : deux panneaux vides et la barre d'action groupée restaient
   affichés sur la Remise des contrats, le « 0 » du CRM avant elle. controle-page.js le relève désormais (masque_visible). */
html.hx-shell [hidden] { display: none !important; }
/* Un graphique (Chart.js) garde la largeur où il a été dessiné : dans une grille, il empêchait la colonne de rétrécir quand l'écran
   change de largeur (tablette qu'on tourne, fenêtre qu'on réduit) — 561 px dans une colonne de 340 sur Salesforce, 1 158 sur
   Productivité (25/09). En pourcentage, il cesse d'imposer sa largeur à la grille et Chart.js redessine à la bonne taille. */
html.hx-shell canvas { max-width: 100%; }
@media (max-width: 560px) { html.hx-shell .hx-act .hx-txt { display: none; } }

/* ═══ LA PAGE — un bord gauche, une largeur qui suit l'écran (bible XIII-127) ═══
   Une colonne de 1 200 px, CENTRÉE — la largeur des pages sœurs (Mes soumissions, Productivité…), pour
   qu'on ne « saute » pas d'un onglet à l'autre. Historique des essais, 24/09 : plafond 1 600 px aligné à
   gauche → « vide à droite » ; pleine largeur → « trop large ». Aucune page ne doit défiler
   horizontalement — les agents travaillent sur téléphone, tablette et portable. */
html.hx-shell { --hx-page-max: 1200px; --hx-page-pad: 24px; }
@media (max-width: 899px) { html.hx-shell { --hx-page-pad: 16px; } }
html.hx-shell .hx-page { box-sizing: border-box; width: 100%; margin: 0 auto;
  max-width: calc(var(--hx-page-max) + 2 * var(--hx-page-pad));
  padding-left: var(--hx-page-pad); padding-right: var(--hx-page-pad); }
/* Grille qui compte ses colonnes selon l'écran : 1 sur téléphone, plusieurs sur grand écran. */
html.hx-shell .hx-grille { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--hx-col, 340px)), 1fr)); }
html.hx-shell .hx-grille > .hx-grille-tout { grid-column: 1 / -1; }

/* Icônes au trait (HelixShell.icone) dans les commandes communes ; points d'identité des trois
   services — seule couleur d'un écran sobre (XIII-128). */
html.hx-shell .hx-act svg, html.hx-shell .hx-ico svg { width: 16px; height: 16px; flex-shrink: 0; }
html.hx-shell .hx-ico { display: inline-flex; }
html.hx-shell .hx-pt { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--muted); }
html.hx-shell .hx-pt.helix { background: var(--helix); }
html.hx-shell .hx-pt.legacy { background: var(--leg); }
html.hx-shell .hx-pt.vmedia { background: var(--vme); }
