/*
 * global.css — R-Agency Tools
 * Styles transversaux partagés par tous les outils.
 * Chaque page ne doit redéfinir que ce qui lui est propre.
 *
 * Sommaire :
 *   1. Variables
 *   2. Reset
 *   3. Body & page wrapper
 *   4. Header navy
 *   5. Page body
 *   6. Layout sidebar + viewer
 *   7. Sidebar items
 *   8. Viewer
 *   9. Boutons
 *  10. Badges
 *  11. No-data / état vide
 *  12. Typographie — Alumni Sans réservée aux headers
 */

/* Jetons partagés avec le front client — AVANT toute règle (contrainte d'@import). */
@import url('tokens.css');
@import url('dataviz.css');   /* le langage graphique des données (ex-§21) */


/* ── 1. Variables ─────────────────────────────────────────────────────────── */
/* Les variables vivent dans tokens.css (lot B1, 2026-10-01) : partagées avec le front client. */


/* ── 2. Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


/* ── 3. Body & page wrapper ───────────────────────────────────────────────── */
body {
  min-height: 100vh;
  background: var(--gray-light);
  font-family: 'Open Sans', system-ui, sans-serif;
  color: var(--navy);
  padding: 64px 16px 48px;
}

.page {
  max-width: 960px;
  margin: 0 auto;
}

.page-narrow  { max-width: 780px;  margin: 0 auto; }
.page-wide    { max-width: 1200px; margin: 0 auto; }


/* ── 4. Header navy ───────────────────────────────────────────────────────── */
/*
 * Doctrine d'arrondis (cf. memory/feedback_html_header_system.md) :
 *
 *   Toutes les pages sont sur un fond gris clair. Les arrondis indiquent
 *   qu'un élément est posé sur ce fond contrasté. Là où un élément touche
 *   le bord du viewport ou un autre élément, pas d'arrondi sur ce côté.
 *
 *   Deux modes principaux pour le TYPE 1 :
 *
 *   Mode A — « Bandeau outil » (pleine largeur viewport)
 *     Le header touche les bords du viewport (gauche/droit/haut).
 *     `border-radius: 0` + sticky. Activé via `class="page-header is-fullwidth"`
 *     + `body { padding: 0 }`. Cas : admin, base-prix, visualiseurs INI.
 *
 *   Mode B — « Header sur fond gris » (par défaut)
 *     Le header est une card centrée flottant sur le fond gris. Par défaut
 *     `border-radius: var(--radius-card)` (4 coins arrondis = card autonome).
 *     Si le header est soudé en haut d'un bloc blanc englobant (cas
 *     prospection, arm-amplification), surcharger localement à
 *     `var(--radius-card) var(--radius-card) 0 0` pour épouser le bloc.
 *     Cas par défaut : brm, trm.
 *
 *   Mode C — « Document/Livrable » : pas de .page-header.
 *     Cas : devis-viewer, slides.
 */
.page-header {
  background: var(--navy);
  border-radius: var(--radius-card);
  padding: 0 32px 0 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-header.is-fullwidth {
  border-radius: 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-header-logo {
  width: 60px; min-width: 60px;
  align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid rgba(255,255,255,.1);
  margin-right: 20px;
}
.page-header-logo img { height: 36px; display: block; }

.page-header-content { padding: 20px 0; flex: 1; }

.page-header h1 {
  font-size: 28px; font-weight: 700;
  color: var(--white); letter-spacing: .04em;
}
.page-header p {
  font-size: 11px; color: var(--turquoise);
  margin-top: 6px; letter-spacing: .1em; text-transform: uppercase;
}

/* Mode COMPACT du TYPE 1 — bandeau bas (~56px) pour les pages denses à liste longue.
 * Remplace la convention locale `.hdr` qui était recopiée à l'identique dans les 9 visualiseurs
 * d'Initialisation (markup ET CSS), et la convention `.app-header` du tableau de bord.
 * Même structure, même vocabulaire de classes : seule la densité change. */
.page-header.is-compact { padding: 0 22px 0 0; gap: 14px; }
.page-header.is-compact .page-header-logo { width: 46px; min-width: 46px; margin-right: 14px; }
.page-header.is-compact .page-header-logo img { height: 30px; }
.page-header.is-compact .page-header-content { padding: 9px 0; }
.page-header.is-compact h1 { font-size: 22px; }
.page-header.is-compact p { margin-top: 2px; }

/* Page d'un MODULE du Cycle (aujourd'hui : les modules de l'Initialisation) — dire où l'on est et
 * comment remonter (remarque de Mika, 2026-10-02 : « on n'est pas confiant qu'on est dans un seul
 * module… écrire en très gros le module, et pouvoir revenir à la racine »). Se pose sur un TYPE 1
 * compact : `is-module` agrandit le titre ; `.page-header-back` est le SEUL chemin de retour, au-dessus
 * du titre, dans la zone titre — la zone droite reste aux sous-étapes, et il n'y a toujours que deux
 * bandes. `data-back-ini` : tools-nav.js y ajoute `?brand_id=` pour garder le dossier. */
/* Révision du 2026-10-02 (Mika, sur le Questionnaire de Toofruit) : « il faut que je sache que je
 * suis dans le Questionnaire AU NIVEAU DE L'AMORÇAGE, que son état est validé, et que je puisse en
 * sortir ». Le retour de la première passe EXISTAIT mais ne se lisait pas : 11 px, capitales, très
 * espacé, turquoise, sous un titre de 38 px — la forme d'un sur-titre, pas celle d'un contrôle, et
 * le sous-titre répétait « module de l'Initialisation » deux lignes plus bas. Il devient un bouton
 * encadré et porte le GROUPE ; l'ÉTAT de la tuile se pose à droite du titre.
 * La zone DROITE reste réservée aux sous-étapes (règle du 26/09, inchangée) : ces deux éléments
 * vivent dans la zone titre. Remplis par `tools-nav.js`, jamais recopiés dans une page. */
.page-header.is-module .page-header-content {
  display: flex; flex-direction: column; align-items: flex-start; padding: 8px 0 9px;
  /* `flex: none` était posé EN LIGNE dans les 10 pages (les sous-étapes se rangent contre le titre
   * au lieu d'être repoussées à droite). Remonté ici au 2026-10-02 : en ligne, il gagnait sur toute
   * règle de la feuille, et empêchait le titre composé de se replier sous 720 px — le badge d'état
   * sortait du viewport, avec une barre de défilement horizontale. */
  flex: none;
}
@media (max-width: 720px) {
  .page-header.is-module .page-header-content { flex: 1 1 auto; min-width: 0; }
}
/* TITRE COMPOSÉ (2026-10-02, 2e reprise — Mika : « il faut avoir conscience qu'on est dans un
 * SOUS-MODULE de l'Initialisation »). La 1re reprise avait rendu le retour visible, mais le module
 * se présentait encore comme un outil de plein droit : rien ne le subordonnait à l'Initialisation.
 * Le parent entre donc DANS le titre — `‹ Initialisation › Questionnaire` — où il porte à lui seul
 * les trois besoins : le niveau (on est dedans), le nom (le module), et la sortie (il est cliquable).
 * La queue « · module de l'Initialisation » a quitté les 10 sous-titres : le titre le dit désormais. */
/* `max-width: 100%` n'est pas décoratif : la colonne parente est en `align-items: flex-start`, donc
 * cette ligne se dimensionne sur son contenu et ne se replierait JAMAIS — le titre sortirait du
 * viewport sur un écran étroit, badge compris. */
.page-header .ph-titre { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; max-width: 100%; }
.page-header.is-module .page-header-back {
  display: inline-flex; align-items: baseline; gap: 7px;
  font-family: 'Alumni Sans', sans-serif;
  font-size: 24px; font-weight: 500; letter-spacing: .01em; text-transform: none;
  color: var(--turquoise); text-decoration: none;
  transition: color .12s;
}
.page-header.is-module .page-header-back svg { width: 15px; height: 15px; flex: none; align-self: center; }
.page-header.is-module .page-header-back:hover { color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
.page-header.is-module .page-header-back:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 3px; border-radius: 3px; }
.page-header .ph-sep { font-family: 'Alumni Sans', sans-serif; font-size: 26px; line-height: 1; color: rgba(255, 255, 255, .32); }
.page-header.is-module h1 { font-size: 38px; line-height: 1.02; margin-top: 2px; min-width: 0; }
.page-header.is-module p { margin-top: 3px; max-width: 100%; }
/* Le groupe des trois zones de /app/initialisation (Amorçage · Compléter le socle · Enrichir),
 * en tête du sous-titre : la place qu'occupait la répétition qu'on vient de retirer. */
.page-header.is-module .ph-groupe { color: rgba(255, 255, 255, .80); font-weight: 700; }
.page-header.is-module .ph-groupe::after { content: " ·"; color: rgba(255, 255, 255, .34); font-weight: 400; }
/* L'état de la tuile, transposé sur fond navy — §13.16 est taillé pour une carte blanche. Mêmes
 * jetons de statut, éclaircis pour tenir sur le navy : une seule source pour la sémantique. */
.page-header-etat {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 999px; padding: 3px 9px; white-space: nowrap;
  color: rgba(255, 255, 255, .70);
}
.page-header-etat[data-etat="valide"]      { color: color-mix(in srgb, var(--dv-status-good) 62%, white); }
.page-header-etat[data-etat="a_valider"]   { color: var(--turquoise); }
.page-header-etat[data-etat="a_revalider"],
.page-header-etat[data-etat="a_completer"] { color: color-mix(in srgb, var(--dv-status-warn) 62%, white); }
.page-header-etat[data-etat="en_cours"]    { color: color-mix(in srgb, var(--dv-brand-1) 60%, white); }
@media (max-width: 720px) { .page-header.is-module h1 { font-size: 30px; } }

/* ── Sous-étapes d'un module (dans la tetière navy) ───────────────────────────
 * UNE seule forme pour les phases internes d'un module du Cycle.
 * ⚠ Nommé `.page-header-*` et NON `.mod-*` : §18 définit déjà `.mod-step(s)` pour les modules
 *   de collecte (liste verticale, fond clair). Collision vécue le 2026-09-26 — §18 étant déclaré
 *   plus bas, il gagnait la cascade et empilait les sous-étapes en blocs blancs illisibles. Remplace les trois
 * conventions locales qui coexistaient (.trm-phase, .stp, .pa-step) — typographies et
 * tailles différentes pour le même objet. Chiffres arabes dans un rond : les glyphes
 * ①②③ ne s'alignent pas, ne se stylent pas, et la règle 3 proscrit les pictos décoratifs.
 * Grammaire, un cran sous celle de la frise du Cycle :
 *   .is-done   phase franchie (vert)      .is-active  phase ouverte à l'écran (turquoise + filet)
 *   (défaut)   accessible                 .is-locked  fermée tant que l'amont ne l'ouvre pas
 * Le vert et le turquoise ne disent pas la même chose et ne se remplacent jamais. */
.page-header-steps { display: flex; align-items: center; gap: 2px; margin-left: 26px; }
.page-header-steps[hidden], .page-header-step[hidden] { display: none; }   /* sans quoi display:flex l'emporte sur l'attribut */
.page-header-step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border: 0; background: none; cursor: pointer;
  font-family: 'Open Sans', system-ui, sans-serif; font-size: 12.5px; font-weight: 600;
  color: rgba(255,255,255,.62); border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
}
.page-header-step:hover { color: #fff; }
a.page-header-step { text-decoration: none; }   /* sous-étape en lien (ex. grille de scoring → back-office) */
.page-header-step .page-header-step-n {
  width: 19px; height: 19px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.35);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.page-header-step.is-active { color: var(--white); border-bottom-color: var(--turquoise); }
.page-header-step.is-active .page-header-step-n { background: var(--turquoise); border-color: var(--turquoise); color: var(--navy); }
.page-header-step.is-done .page-header-step-n { background: var(--green); border-color: var(--green); color: var(--white); }
.page-header-step.is-attn .page-header-step-n { background: #B7791F; border-color: #B7791F; color: var(--white); }
.page-header-step.is-wait { opacity: .62; }
/* Compteur d'oranges d'une étape (« 2 »), à droite de son libellé. */
.page-header-step-c { margin-left: 2px; padding: 0 6px; border-radius: 9px; font-family: system-ui, -apple-system, sans-serif; font-size: 11px; font-weight: 700; background: #FFF7E6; color: #856404; border: 1px solid #E8C77A; }
.page-header-step.is-locked { color: rgba(255,255,255,.3); cursor: not-allowed; }
.page-header-step.is-locked:hover { color: rgba(255,255,255,.3); }
.page-header-step.is-locked .page-header-step-n { border-color: rgba(255,255,255,.2); }
/* Écran étroit : les sous-étapes passent sous le titre et défilent dans leur propre bande, au lieu
 * d'élargir la page — le navigateur dézoomait alors toute la page (constaté le 2026-09-28 sur le
 * back-office du Baromètre, 4 sous-étapes ; même débordement sur la Trajectoire et le Plan d’action). */
@media (max-width: 720px) {
  .page-header:has(.page-header-steps) { flex-wrap: wrap; }
  .page-header-steps { order: 3; flex: 1 1 100%; min-width: 0; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  .page-header-steps::-webkit-scrollbar { display: none; }
  .page-header-step { flex-shrink: 0; }
}

.header-meta {
  font-size: 11px; color: rgba(193,229,227,.6);
  letter-spacing: .06em; white-space: nowrap;
}


/* ── 5. Page body ─────────────────────────────────────────────────────────── */
.page-body {
  background: var(--white);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  box-shadow: var(--shadow-page);
}


/* ── 6. Layout sidebar + viewer ───────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: 540px;
}
@media (max-width: 640px) {
  .layout { grid-template-columns: 1fr; }
}

.sidebar {
  border-right: 1.5px solid var(--border);
  padding: 16px 0;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gray);
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.sidebar-section-label {
  font-size: 9px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gray);
  padding: 12px 16px 4px;
}
.sidebar-section-label:first-child { padding-top: 4px; }


/* ── 7. Sidebar items ─────────────────────────────────────────────────────── */
.sidebar-item {
  padding: 10px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .12s, border-color .12s;
}
.sidebar-item:hover  { background: var(--gray-light); }
.sidebar-item.active { background: #EEF5FF; border-left-color: var(--accent); }

.sidebar-item-title {
  font-size: 13px; font-weight: 600;
  line-height: 1.3; color: var(--navy);
}
.sidebar-item-sub {
  font-size: 10px; color: var(--gray); margin-top: 2px;
}
.sidebar-item-meta {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px;
}


/* ── 8. Viewer ────────────────────────────────────────────────────────────── */
.viewer {
  padding: 28px 32px;
  display: flex; flex-direction: column;
  gap: 20px;
}

.viewer-empty {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--gray); gap: 12px; padding: 60px 24px;
}
.viewer-empty svg { opacity: .2; }
.viewer-empty p { font-size: 13px; text-align: center; line-height: 1.6; }

.viewer-titre {
  font-size: 22px; font-weight: 700;
  letter-spacing: .02em; color: var(--navy);
}
.viewer-desc {
  font-size: 12px; color: var(--gray);
  margin-top: 6px; line-height: 1.6;
}
.viewer-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px;
}


/* ── 9. Boutons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-btn); border: none; cursor: pointer;
  font-family: inherit; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; text-decoration: none;
  transition: opacity .12s;
}
.btn:hover { opacity: .85; }
.btn svg   { flex-shrink: 0; }

.btn-primary { background: var(--navy);  color: var(--white); }
.btn-outline { background: var(--white); color: var(--navy); border: 1.5px solid var(--border); }
.btn-danger  { background: #FEF2F2;      color: #C0392B;     border: 1.5px solid #FECACA; }
/* Tailles du bouton (2026-10-10) : UN seul bouton, trois tailles, plus de variante locale par page (.armbtn, .ux-adv, .trm-btn-sm retirés). */
.btn-sm    { padding: 5px 11px;  font-size: 11.5px; }
.btn-lg    { padding: 11px 22px; font-size: 14px; }
.btn-block { display: flex; width: 100%; justify-content: center; }


/* ── 10. Badges ───────────────────────────────────────────────────────────── */
.badge {
  font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 6px; border-radius: var(--radius-badge);
  display: inline-block;
}

/* Statuts */
.badge-proposition { background: #FFF3CD; color: #856404; }
.badge-valide      { background: #D4EDDA; color: #155724; }
.badge-archive     { background: var(--gray-light); color: var(--gray); }
.badge-reference   { background: #EDE9FE; color: #5B21B6; }
.badge-brouillon   { background: #FFF0EE; color: #C0392B; }

/* Métadonnée neutre */
.badge-neutral { background: var(--gray-light); color: var(--gray); }

/* Compatibilité anciens noms (organigramme) */
.badge-statut-proposition { background: #FFF3CD; color: #856404; }
.badge-statut-valide      { background: #D4EDDA; color: #155724; }
.badge-statut-archive     { background: var(--gray-light); color: var(--gray); }
.badge-statut-reference   { background: #EDE9FE; color: #5B21B6; }
.badge-date               { background: var(--gray-light); color: var(--gray); }


/* ── 11. No-data / état vide ──────────────────────────────────────────────── */
.no-data {
  padding: 32px 16px;
  text-align: center;
  font-size: 12px; color: var(--gray);
}


/* ── 12. Typographie — Alumni Sans réservée aux headers ───────────────────── */
.page-header h1,
.page-header p,
.doc-header h1,
.doc-header p,
.login-title,
.portal-logo-text {
  font-family: 'Alumni Sans', sans-serif;
}


/* ── 13. Composants UI génériques (design system) ─────────────────────────── */
/*
 * Section ajoutée 2026-05-26 — extraction des composants UI répétés dans le
 * <style> inline de chaque page (page de référence : admin.html). Toute page
 * nouvelle DOIT utiliser ces classes plutôt que redéfinir localement. Cf.
 * CLAUDE.md règle 7 + memory/design_system_components.md (référence rapide).
 *
 * Composants couverts :
 *   13.1 Boutons (extension de §9 : :disabled, :focus-visible)
 *   13.2 Cards (.card, .card-clickable, .card-pending, .card-dashed) — pattern expansible retiré 2026-05-26 (conflit avec login/forgot/reset/remuneration)
 *   13.3 Formulaires (.form-row, .form-field)
 *   13.4 Checkbox visuelles (.checkbox-pill, .checkbox-pill-grid)
 *   13.5 Toggle switch (.toggle, .toggle-slider, .toggle-desc)
 *   13.6 Toast (.toast, .toast.show, .toast.error)
 *   13.7 Section internes (.section-head, .body-section, .body-label)
 *   13.8 Badges étendus (.badge-info, .badge-success-outline)
 *   13.9 Alertes inline (.alert-info, .alert-warning, .alert-danger)
 *   13.10 Modal générique (.modal-backdrop, .modal, .modal-head, .modal-body, .modal-foot, .modal-close)
 *   13.30 Loupe — une image à sa taille réelle (.lb-ov, .lb-bar, .lb-scroll)
 *   13.31 Préparé pour le Pilotage, relecture dans le Plan d’action (.apc-…)
 *   13.32 Commande à copier (.cmd) · 13.33 Texte pour lecteur d'écran (.sr-only)
 *   (13.11 → 13.31 sont définis plus bas dans ce fichier, après §19.)
 */

/* 13.1 — Boutons (enrichit §9) ──────────────────────────────────────────────
 * §9 définit déjà .btn, .btn-primary, .btn-outline, .btn-danger. On ajoute
 * juste les états manquants (focus accessibilité, disabled). */
.btn:disabled,
.btn[disabled] { opacity: .4; cursor: not-allowed; pointer-events: none; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 13.2 — Cards génériques ──────────────────────────────────────────────────
 * Base : container blanc avec border + radius standard. Modificateurs :
 *  .card-clickable  → hover navy + shadow + cursor pointer
 *  .card-pending    → grisé, non cliquable (visuel "en attente")
 *  .card-dashed     → border dashed (formulaire de création)
 *
 * NOTE : le pattern card EXPANSIBLE (head/body avec display:none + .open
 * toggle JS) a été retiré 2026-05-26 du global — les noms `.card-head`
 * et `.card-body` étaient trop génériques et masquaient le contenu de
 * 4 pages (login, forgot-password, reset-password, remuneration) qui
 * utilisent `.card-body` comme body simple. Si besoin d'un pattern
 * card expansible, le redéfinir LOCALEMENT avec un nom plus spécifique.
 */
.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.card-clickable {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.card-clickable:hover {
  border-color: var(--navy);
  box-shadow: 0 4px 16px rgba(0,14,49,.10);
}
.card-pending { opacity: .5; cursor: default; }
.card-dashed { border: 1.5px dashed var(--border); }

/* Card empilée (« stacked ») — série de cards soudées sous un header Mode B :
 * séparateur entre cards, coin bas arrondi sur la dernière. Distincte de .card
 * (pas de bordure ni overflow). La 1re card reste à coin haut droit pour épouser
 * le header (override local .page-header { border-radius: 8px 8px 0 0 }).
 * Centralisé depuis analyse-page + arm-amplification (audit CSS 2026-06-02). */
.stacked-card {
  background: var(--white);
  box-shadow: 0 4px 24px rgba(0,14,49,.10);
  padding: 32px;
}
.stacked-card + .stacked-card { border-top: 1.5px solid var(--border); }
.stacked-card:last-child { border-radius: 0 0 8px 8px; }

/* Patron card head/body pour cards EXPANSIBLES (cf. admin user-card).
 * RETIRÉ du global.css 2026-05-26 — les noms `.card-head` et `.card-body`
 * étaient trop génériques et entraient en conflit avec 4 pages qui
 * utilisent `.card-body` comme body simple (login, forgot-password,
 * reset-password, remuneration). Le `display: none` du défaut global
 * masquait silencieusement le contenu de ces pages.
 *
 * Si un pattern card expansible est nécessaire ailleurs, le redéfinir
 * localement avec un nom plus spécifique (ex. .expandable-card-head /
 * .expandable-card-body) ou réutiliser le pattern .user-card du module
 * admin. */


/* 13.3 — Formulaires ───────────────────────────────────────────────────────
 * Lignes de champs avec label uppercase + input bordé. Utiliser .form-row
 * pour grouper plusieurs .form-field horizontalement (wrap automatique). */
.form-row {
  display: flex; gap: 10px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.form-field {
  display: flex; flex-direction: column; gap: 5px;
  flex: 1; min-width: 160px;
}
.form-field label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gray);
}
.form-field input,
.form-field select,
.form-field textarea {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  outline: none;
  color: var(--navy);
  background: var(--white);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--navy); }


/* 13.4 — Checkbox visuelles (pills cochables) ──────────────────────────────
 * Pour les grilles de sélection multiple (outils, marques, filtres, tags).
 * Pattern : <div class="checkbox-pill-grid">
 *             <div class="checkbox-pill checked">…</div>
 *             <div class="checkbox-pill">…</div>
 *           </div>
 * Toggle via JS : el.classList.toggle('checked'). */
.checkbox-pill-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.checkbox-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  cursor: pointer; user-select: none;
  background: var(--white);
  color: var(--navy);
  transition: border-color .12s, background .12s;
}
.checkbox-pill input { display: none; }
.checkbox-pill:hover { border-color: var(--navy); }
.checkbox-pill.checked {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}
.checkbox-pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
}
.checkbox-pill.checked .checkbox-pill-dot {
  background: var(--turquoise);
  border-color: var(--turquoise);
}
.checkbox-pill-label { font-size: 12px; font-weight: 500; }


/* 13.5 — Toggle switch ─────────────────────────────────────────────────────
 * Pattern : <label class="toggle">
 *             <input type="checkbox">
 *             <span class="toggle-slider"></span>
 *           </label>
 *           <span class="toggle-desc">Activer la fonction</span>     */
.toggle-row { display: flex; align-items: center; gap: 10px; }
.toggle {
  position: relative;
  width: 36px; height: 20px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 3px; top: 3px;
  background: var(--white);
  border-radius: 50%;
  transition: transform .2s;
}
.toggle input:checked + .toggle-slider { background: var(--navy); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); }
.toggle-desc { font-size: 12px; color: var(--gray); }


/* 13.6 — Toast (notification flottante bas-droit) ──────────────────────────
 * Pattern :
 *   HTML : <div class="toast" id="toast"></div>
 *   JS   : el.textContent = msg;
 *          el.className = 'toast show' + (error ? ' error' : '');
 *          setTimeout(() => el.className = 'toast', 2800);
 */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--navy);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px; font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  /* AU-DESSUS DE TOUT. Un message transitoire n'a de valeur que s'il se voit. Posé à 100, il était
     à ÉGALITÉ avec `.modal-backdrop` (§13.10) — il ne passait devant que parce qu'il arrive APRÈS
     lui dans le DOM, ce qui ne tient à rien : une page qui poserait son élément avant d'ouvrir sa
     fenêtre le verrait disparaître. Et face aux voiles plus hauts (`.adr-drawer` 1200, `.adr-ov`
     1300, `.trmpa-overlay` 1500), l'ordre du DOM ne sauve rien : un message à 100 est franchement
     recouvert. 2000 les passe tous — le seul étage correct pour une notification. */
  z-index: 2000;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #FF463A; }

/* ── Attente : un bouton qui déclenche un appel dit qu'il travaille ──────────
 * Le composant vit dans `tools-nav.js` (chargé par toutes les pages, règle 1) :
 * `Attente.demarrer(bouton, {libelle, attendu, total, progres})`. Il montre le temps
 * écoulé — la seule preuve de vie — et l'avancement quand la page sait le mesurer.
 * Demandé par Mika le 30/09 : « je dois savoir que c'est normal d'attendre, que ça
 * n'a pas planté. » Ni sablier ni emoji : la règle 3 réserve les pictos aux Feather. */
button.is-attente, .btn.is-attente {
  cursor: progress;
  opacity: .8;
  font-variant-numeric: tabular-nums;   /* le compteur ne fait pas sauter le libellé */
}
.attente-dit {
  margin-top: 6px;
  font-size: 12px;
  color: var(--gray, #666666);
}
/* Dépassement du temps attendu : un ÉTAT, pas une faute — ambre, jamais rouge. */
.attente-dit.is-long { color: #856404; font-weight: 600; }


/* 13.7 — Sections internes à une page ─────────────────────────────────────
 * Titres et labels de sections à l'intérieur d'un outil (h2 de section,
 * label uppercase 10px pour identifier un sous-bloc). */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: 16px; font-weight: 700;
  letter-spacing: .04em;
}
.body-section { margin-bottom: 20px; }
.body-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 10px;
}


/* 13.8 — Badges étendus (variantes de §10) ────────────────────────────────
 * .badge-info             → badge plein navy avec texte turquoise
 *                            (cas admin = rôle "Superadmin").
 * .badge-success-outline  → badge contour vert avec texte vert
 *                            (cas admin = client identifié).
 * .badge-warning-outline  → contour orange (cas générique avertissement). */
.badge-info {
  font-size: 10px; font-weight: 700;
  letter-spacing: .10em; text-transform: uppercase;
  background: var(--navy);
  color: var(--turquoise);
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}
.badge-success-outline {
  font-size: 10px; font-weight: 700;
  letter-spacing: .10em; text-transform: uppercase;
  background: #E8F7F2;
  color: #1A7F5A;
  border: 1.5px solid #1A7F5A;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}
.badge-warning-outline {
  font-size: 10px; font-weight: 700;
  letter-spacing: .10em; text-transform: uppercase;
  background: #FFF8E1;
  color: #B7791F;
  border: 1.5px solid #B7791F;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}


/* 13.9 — Alertes inline (boîtes d'état dans une page) ─────────────────────
 * Bandeaux colorés pour signaler un état contextuel (prototype, sandbox,
 * erreur, info). Différent des toasts (qui sont flottants/temporaires). */
.alert-info {
  background: #E3F2FD;
  border: 1px solid #90CAF9;
  color: #0D47A1;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.alert-warning {
  background: #FFFBEA;
  border: 1px dashed #E0C84A;
  color: #856404;
  padding: 10px 14px;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1.5;
}
.alert-danger {
  background: #FFEBEE;
  border: 1px solid #FFCDD2;
  color: #B71C1C;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.alert-success {
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  color: #1B5E20;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.5;
}


/* 13.10 — Modal générique (extrait de contacts.html, 2026-09-29, règle 7) ──
 * Chrome d'une fenêtre : fond, card, tetière navy, corps, pied. La LARGEUR
 * (max-width) reste à la page (elle varie : 680px pour contacts, 880/960px
 * pour la fenêtre de démo) — surcharger .modal localement pour ça, jamais
 * ici. Le contenu du corps (formulaires, listes) reste local à chaque page. */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,14,49,.5);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 50px 16px 24px; z-index: 100; overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--white); border-radius: 8px;
  width: 100%; max-width: 680px;
  box-shadow: var(--shadow-modal); overflow: hidden;
}
.modal-head {
  background: var(--navy); color: var(--white); padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head h2 {
  font-family: 'Alumni Sans', sans-serif;
  font-size: 22px; font-weight: 600; letter-spacing: .04em;
}
.modal-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.7); padding: 4px; display: inline-flex;
}
.modal-close:hover { color: #fff; }
.modal-body { padding: 22px 24px; }
.modal-foot {
  padding: 14px 24px; background: var(--gray-light);
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}


/* ── 14. Variante client (pages partagées au client) ──────────────────────
 *
 * Active automatiquement sur les pages déclarées dans TOOLS_REGISTRY.client_views
 * (main.py) + client.html (portail client). La classe `client-variant` est
 * injectée sur le <body> par _serve() côté serveur, sauf pour client.html qui
 * la porte statiquement.
 *
 * Dimension orthogonale aux Modes A/B/C du système de header (cf.
 * memory/feedback_html_header_system.md « Variante interne/client ») :
 *   - Mode A interne / Mode A client
 *   - Mode B interne / Mode B client
 *   - Mode C interne / Mode C client
 *
 * Différence visuelle actuelle : logo R-Agency design (hexagone identitaire
 * `r-agency_design_blue.svg`) à 80px de haut, au lieu du standard
 * `r-agency_blue.svg` à 36px. Le HTML doit utiliser le bon SVG explicitement
 * (pas de swap CSS magique — l'intention reste lisible dans le markup).
 *
 * Autres variations à ajouter ici si elles apparaissent (typo plus marquée,
 * espacement plus aéré, etc.). Pour démarrer : juste le logo.
 */
/* La règle vise les 2 conventions HTML actuelles pour le logo principal :
 *   - .page-header-logo (convention TYPE 1, pages internes en variante client
 *     si elles sont déclarées dans client_views — pas le cas aujourd'hui)
 *   - .logo (convention slide BRM, portail client — TYPE 3 et TYPE 4)
 * Les pages avec leur propre convention (ex. prez-rayonnement utilise
 * .logo-area, devis-viewer un layout document) gardent leur charte logo
 * existante et reçoivent juste la classe `client-variant` au cas où elles
 * voudraient l'utiliser pour d'autres ajustements futurs.
 */
.client-variant .page-header-logo {
  /* Le logo « design » est large : la cellule de 60px du TYPE 1 l'écraserait. Élargie ici, au
     niveau de la variante, plutôt que surchargée page par page (règle 7). */
  width: 120px; min-width: 120px;
}
.client-variant .logo {
  /* Pas de width imposé — TYPE 3/4 conservent leur layout. */
}
.client-variant .page-header-logo img,
.client-variant .logo img {
  height: 80px;
}


/* ── 15. Cran de retour (ex-fil d'Ariane, réduit le 2026-09-26) ──────────────
 * Né en 2026-06-04 comme fil d'Ariane à 3 crans « Clients / Client / Module ». Le fil a été
 * RETIRÉ le 2026-09-26 : ses crans étaient couverts par le sélecteur de dossier, le cran
 * « Initialisation » de la frise et le titre du module (cf. _meta/modules/navigation.md).
 * Ce qui reste : un CRAN DE RETOUR unique, que deux pages sont seules à proposer —
 * le tableau de bord d'Initialisation (« ‹ Tous les clients ») et le questionnaire
 * (« ‹ Retour au dossier »). Un contrôle, pas un fil : pas de séparateur, pas de cran
 * courant, pas de variante collante (les variantes correspondantes ont été retirées). */
.brm-breadcrumb {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
  min-height: 52px; padding: 0 24px;
  background: #fff; border-bottom: 1.5px solid var(--border);
  font-family: 'Open Sans', system-ui, sans-serif; font-size: 13px;
}
.brm-crumb {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 6px;
  color: var(--navy); text-decoration: none; font-weight: 600;
  background: none; border: none; font-family: inherit; font-size: inherit; cursor: pointer;
  transition: background .15s, color .15s;
}
a.brm-crumb:hover, button.brm-crumb:hover { background: var(--gray-light); color: var(--accent); }
.brm-crumb svg { width: 15px; height: 15px; flex-shrink: 0; }
.brm-crumb.is-root { color: #6b7480; }              /* « Clients » — discret */

/* ===== §16 — Pré-analyse TRM (composant partagé trm-preanalysis.js) ===== */
.trmpa { border: 1.5px solid #C7D7EE; background: #F5F8FD; border-radius: 8px; padding: 12px 14px 13px; margin-top: 10px; }
.trmpa-head { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; flex-wrap: wrap; }
.trmpa-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--accent, #1A56DB); }
.trmpa-meta { font-size: 10.5px; color: var(--gray, #666); }
.trmpa-meta b { color: var(--navy, #000E31); }
.trmpa-sub { font-size: 11.5px; color: #3f4d60; line-height: 1.5; margin: 2px 0 10px; }
.trmpa-badge { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 10px; }
.trmpa-badge.prop { background: #FCEEDB; color: #9A5B12; border: 1px solid #F0D2A8; }
.trmpa-badge.val { background: #DEF3E4; color: #176034; border: 1px solid #B7E0C4; }
.trmpa-grp { margin-top: 11px; }
.trmpa-grp-h { font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--navy, #000E31); margin: 0 0 5px; }
.trmpa-f { margin: 0 0 9px; padding-left: 10px; border-left: 2px solid #D7E2F2; }
.trmpa-f-label { font-size: 11px; font-weight: 600; color: var(--navy, #000E31); }
.trmpa-f-val { font-size: 12.5px; color: var(--navy, #000E31); line-height: 1.5; margin: 2px 0 3px; }
.trmpa-f-null { font-size: 12px; color: var(--gray, #666); font-style: italic; margin: 2px 0 3px; }
.trmpa-src { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.trmpa-src .chip { font-size: 9.5px; color: #5b6b80; background: #E8EFF9; border: 1px solid #D0DCEC; border-radius: 9px; padding: 1px 7px; }
.trmpa-conf { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 8px; margin-left: 6px; }
.trmpa-conf.haute { background: #DEF3E4; color: #176034; }
.trmpa-conf.moyenne { background: #FCF3D9; color: #8A6D0F; }
.trmpa-conf.faible { background: #F0E2E2; color: #9A3A2E; }
.trmpa-flag { font-size: 9px; font-weight: 700; color: #9A5B12; background: #FCEEDB; border: 1px solid #F0D2A8; border-radius: 8px; padding: 1px 7px; margin-left: 6px; }
.trmpa-actions { display: flex; gap: 8px; margin-top: 13px; align-items: center; }
.trmpa-live { font-size: 12px; color: var(--accent, #1A56DB); display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.trmpa-spin { width: 13px; height: 13px; border: 2px solid #C7D7EE; border-top-color: var(--accent, #1A56DB); border-radius: 50%; animation: trmpaSpin .7s linear infinite; flex: 0 0 auto; }
@keyframes trmpaSpin { to { transform: rotate(360deg); } }
.trmpa-statebtn { font: inherit; font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 6px; cursor: pointer; border: 1.5px solid; display: inline-flex; align-items: center; gap: 8px; }
.trmpa-statebtn::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .85; flex: 0 0 auto; }
.trmpa-statebtn.go { background: var(--accent, #1A56DB); border-color: var(--accent, #1A56DB); color: #fff; }
.trmpa-statebtn.prop { background: #FCEEDB; border-color: #E8B66B; color: #9A5B12; }
.trmpa-statebtn.val { background: #DEF3E4; border-color: #7DBD92; color: #176034; }
.trmpa-statebtn.insuf { background: #F1F3F6; border-color: #CBD2DC; color: #5b6b80; }
.trmpa-statebtn.err { background: #F7E2E0; border-color: #DD9C97; color: #9A3A2E; }
.trmpa-statebtn.run { background: #EAF0FB; border-color: #B9CDEE; color: var(--accent, #1A56DB); }
.trmpa-statebtn:hover { filter: brightness(.97); }
.trmpa-overlay { position: fixed; inset: 0; background: rgba(0,14,49,.45); display: none; align-items: flex-start; justify-content: center; z-index: 1500; padding: 40px 16px; overflow-y: auto; }
.trmpa-overlay.open { display: flex; }
.trmpa-modal { background: #fff; border-radius: 10px; width: 100%; max-width: 720px; padding: 22px 24px 24px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.trmpa-modal-title { font-family: 'Alumni Sans', sans-serif; font-size: 24px; margin: 0 0 4px; color: var(--navy, #000E31); }
.trmpa-modal-sub { color: var(--gray, #666); font-size: 12.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.trmpa-close { float: right; background: none; border: none; cursor: pointer; color: var(--gray, #666); font-size: 22px; line-height: 1; }
.trmpa-wait { font: inherit; font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 6px; border: 1.5px solid #CBD2DC; background: #F1F3F6; color: #5b6b80; display: inline-flex; align-items: center; gap: 8px; cursor: default; }
.trmpa-wait::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; flex: 0 0 auto; }
.trmpa-wait a { color: var(--accent, #1A56DB); font-weight: 700; text-decoration: none; }
/* Panneau compact (option `compact` de trm-preanalysis.js, pages de module refondues au lot L5) : la
   section « Préparer la Trajectoire » porte le titre et l'explication ; ici le bouton-pastille et sa phrase. */
.trmpa-compact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.trmpa-compact .trmpa-sub { margin: 0; }

/* ===== §17 — Cycle Track (composant transversal injecté par tools-nav.js) =====
 * Indicateur de progression MACRO du Cycle de Rayonnement (INI→BRM→TRM→ARM→Pilotage), staff-only.
 * Pastilles d'état dérivées (✓ fait · ● ici · ○ ouverte · 🔒 verrouillée), verbes-récit, compact.
 * Injecté sous le <header>, AU-DESSUS du fil d'Ariane §15 quand les deux coexistent (sous-pages INI).
 * tools-nav.js injecte un miroir de ces règles (self-suffisant sur les pages sans global.css). */
.cycle-track {
  display: flex; align-items: center; flex-wrap: wrap; gap: 3px;
  min-height: 44px; padding: 0 22px;
  background: #fff; border-bottom: 1.5px solid var(--border);
  font-family: 'Open Sans', system-ui, sans-serif; font-size: 13px;
}
.cycle-track.is-sticky { position: sticky; top: var(--cyc-top, 56px); z-index: 91; }
.cyc-brand { font-weight: 700; color: var(--navy); margin-right: 13px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.cyc-brand-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green, #1A7A4A); flex-shrink: 0; }
.cyc-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 1px; }
.cyc-step {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 9px; border-radius: 6px;
  font-weight: 600; color: var(--navy); cursor: pointer;
  background: none; border: none; font: inherit; font-size: 13px;
  transition: background .15s, color .15s; position: relative;
}
.cyc-step:hover { background: var(--gray-light); }
.cyc-ic { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1.5px solid transparent; }
.cyc-ic svg { width: 11px; height: 11px; stroke-width: 3; }
.cyc-step.is-done { color: var(--navy); }
.cyc-step.is-done .cyc-ic { background: var(--green, #1A7A4A); color: #fff; }
.cyc-step.is-open { color: #54627a; }
.cyc-step.is-open .cyc-ic { border-color: #aab4c2; color: transparent; }
.cyc-step.is-locked { color: #9aa6b6; cursor: help; }
.cyc-step.is-locked .cyc-ic { background: #eef1f4; color: #9aa6b6; }
.cyc-step.is-locked:hover { background: #f7f3ee; }
/* « Je suis ici » ne touche JAMAIS la pastille : la pastille ne dit que l'etat du dossier.
 * (Avant 2026-09-26, une regle .is-current.is-open remplissait la pastille en navy — le signal
 *  « ici » changeait donc de rendu selon que l'etape etait faite ou non.) */
.cyc-step.is-current { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; font-weight: 700; background: #EDF1F7; color: var(--navy); }
.cyc-sep { color: #cfd5de; user-select: none; }
.cycle-track.is-degraded .cyc-step { cursor: default; color: #8a93a3; font-weight: 600; }
.cycle-track.is-degraded .cyc-step.is-here { color: var(--navy); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.cyc-hint { margin-left: auto; color: #9aa6b6; font-size: 12px; font-style: italic; white-space: nowrap; }
.cyc-pop { position: absolute; top: calc(100% + 7px); left: 0; z-index: 50; background: var(--navy, #000E31); color: #fff; border-radius: 8px; padding: 9px 12px; font-size: 12px; font-weight: 400; width: 224px; box-shadow: 0 8px 24px rgba(0,14,49,.22); }
.cyc-pop b { font-weight: 700; }
.cyc-pop a { color: #9fc6ff; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }
.cyc-pop::before { content: ''; position: absolute; top: -5px; left: 16px; width: 10px; height: 10px; background: var(--navy, #000E31); transform: rotate(45deg); }

/* ── Barre de contexte (bande 2) — ajouts 2026-09-26 ────────────────────────────────────────
 * Le dossier courant (et son changement), ses mesures, et le cran des outils satellites.
 * Un seul endroit pour changer de client : les <select> locaux des modules ont disparu. */
.cycle-track { flex-wrap: nowrap; position: relative; }
.cyc-brandsel { flex-shrink: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--navy); background: none; border: 1px solid transparent; border-radius: 6px; padding: 5px 9px; margin-right: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.cyc-brandsel:hover, .cyc-brandsel.is-open { background: var(--gray-light); border-color: var(--border); }
/* Encre atténuée du régime dégradé (« Choisir un dossier », « Cycle de Rayonnement ») : une CLASSE
 * et non un style en ligne, pour que §22 puisse la transposer sur le navy de sa barre 1. */
.cyc-brandsel.is-muted, .cyc-brand.is-muted { color: #54627a; }
.cyc-chev { width: 13px; height: 13px; opacity: .5; flex-shrink: 0; }
/* Échec de chargement (R0a, 2026-10-01) : la barre dit « indisponible — réessayer » au lieu de
 * retirer le sélecteur, ce qui se lisait « aucun dossier ». */
.cyc-retry { color: #54627a; border-color: var(--border); font-weight: 600; }
.cyc-retry svg { width: 13px; height: 13px; flex-shrink: 0; }
.cyc-retry[disabled] { cursor: progress; opacity: .7; }
.cyc-flow { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.cyc-flow::-webkit-scrollbar { display: none; }
.cyc-flow.is-scrollable { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent); }
.cyc-right { margin-left: auto; padding-left: 12px; display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
/* Écran étroit : la barre passe sur deux lignes — dossier et mesures en haut, étapes du Cycle dessous, qui
   défilent sur toute la largeur. Sinon la partie droite (qui ne rétrécit pas) élargissait la page et le
   navigateur dézoomait tout (dossier avancé : Trajectoire, Plan d’action, Baromètre d'Eurovent, 2026-09-28). */
@media (max-width: 720px) {
  .cycle-track { flex-wrap: wrap; row-gap: 2px; padding: 4px 14px; }
  .cyc-flow { order: 3; flex: 1 1 100%; }
  .cyc-right { flex-shrink: 1; min-width: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }
}
.cyc-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--navy); background: var(--gray-light); border: 1px solid var(--border); border-radius: var(--radius-badge); padding: 3px 9px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cyc-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: #9aa6b6; flex-shrink: 0; }
.cyc-badge.is-good .cyc-badge-dot { background: var(--green); }
.cyc-badge.is-warn .cyc-badge-dot { background: #D4700A; }
.cyc-badge.is-bad .cyc-badge-dot { background: #C0392B; }
.cyc-tools { font: inherit; font-size: 12.5px; font-weight: 600; color: #54627a; background: none; border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.cyc-tools:hover, .cyc-tools.is-open { background: var(--gray-light); }
.cyc-tools svg { width: 14px; height: 14px; }
.cyc-menu { position: absolute; top: calc(100% + 6px); left: 16px; z-index: 60; min-width: 300px; max-width: 380px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-modal); overflow: hidden; }
.cyc-menu-head { padding: 9px 14px; border-bottom: 1px solid var(--gray-light); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #8792a5; }
.cyc-menu-filter { padding: 9px 12px; border-bottom: 1px solid var(--gray-light); }
.cyc-menu-filter input { width: 100%; font: inherit; font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-btn); }
.cyc-menu-list { max-height: 320px; overflow-y: auto; }
.cyc-menu-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 14px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--navy); cursor: pointer; text-align: left; }
.cyc-menu-item:hover { background: var(--gray-light); }
.cyc-menu-item.is-on { background: var(--gray-light); font-weight: 700; }
.cyc-menu-name { flex: 1; }
.cyc-menu-stage { font-size: 11px; font-weight: 400; color: #8792a5; white-space: nowrap; }
.cyc-menu-new { display: block; padding: 10px 14px; border-top: 1px solid var(--gray-light); font-size: 12.5px; font-weight: 600; color: #54627a; text-decoration: none; }
.cyc-menu-new:hover { background: var(--gray-light); }
.cyc-menu-empty { padding: 12px 14px; font-size: 12.5px; color: #8792a5; font-style: italic; }


/* ── Écran de garde (R-H) : un module fermé ou sans dossier ne reste jamais muet ─────────────
 * Injecté sous la barre de contexte quand l'étape courante est verrouillée pour le dossier
 * ouvert, ou qu'aucun dossier n'est ouvert. Dit la raison ET porte la sortie en un clic —
 * la raison et la cible sont déjà calculées par le serveur, on ne fabrique rien. */
.cyc-guard { background: var(--gray-light); padding: 26px 22px 28px; border-bottom: 1px solid var(--border); }
.cyc-guard-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px 22px; max-width: 620px; }
.cyc-guard-t { font-family: 'Alumni Sans', sans-serif; font-size: 24px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.cyc-guard-d { font-size: 13px; color: #54627a; margin: 7px 0 0; max-width: 56ch; line-height: 1.6; }
.cyc-guard-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 15px; background: var(--navy); color: #fff; border: 0; border-radius: var(--radius-btn); padding: 9px 15px; font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.cyc-guard-cta:hover { opacity: .88; }


/* ===== §18 — Module de collecte : zone aval + bandeau ①/② (Lot D, 2026-09-17) =====
 * Composant partagé sur les 7 visualiseurs de module BRM (sites/press/ai-mentions/trends/
 * posts/youtube/wayback). Enveloppe de zone aval (.mod-aval*) + gabarit du bandeau des deux
 * étapes de collecte (.mod-steps/.mod-step*). Cf. _meta/archive/plans/plan_parcours_ini.md — Lot D, chantier 5. */
.mod-aval { margin: 4px 0 16px; }
.mod-aval-title { font-family: 'Alumni Sans', sans-serif; font-size: 15px; font-weight: 700; color: var(--navy, #000E31); margin: 0 0 6px; }
.mod-aval-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.mod-aval-card { flex: 1 1 260px; border: 1.5px solid var(--border, #E2E6EC); border-radius: 8px; padding: 10px 12px; background: #fff; }
.mod-aval-dest { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--gray, #666); margin: 0 0 6px; }
.mod-aval-slot { min-height: 0; }
.mod-aval-slot > * { margin: 0 !important; }

.mod-steps { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 16px; }
.mod-step {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1.5px solid var(--border, #E2E6EC); border-left: 4px solid #C8CFD8;
  border-radius: 8px; background: #fff; padding: 12px 14px;
}
.mod-step.is-todo { border-left-color: #C8CFD8; }
.mod-step.is-running { border-left-color: #1E5BD8; }
.mod-step.is-done { border-left-color: #1A7A4A; }
.mod-step.is-failed { border-left-color: #A73232; }
.mod-step-num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--navy, #000E31); color: #fff; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.mod-step-main { flex: 1 1 auto; min-width: 0; }
.mod-step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mod-step-title { font-family: 'Alumni Sans', sans-serif; font-size: 16px; font-weight: 700; color: var(--navy, #000E31); }
.mod-step-badge { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; padding: 2px 8px; border-radius: 10px; border: 1.5px solid; background: #fff; }
.mod-step-badge.mes { color: #5C6B85; border-color: #C8CFD8; }
.mod-step-badge.ia { color: #7a5ba8; border-color: #c9b8e3; }
.mod-step-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--gray, #666); margin-left: auto; }
.mod-step-state svg { width: 14px; height: 14px; }
.mod-step.is-running .mod-step-state { color: #1E5BD8; }
.mod-step.is-done .mod-step-state { color: #1A7A4A; }
.mod-step.is-failed .mod-step-state { color: #A73232; }
.mod-step-state .mod-step-spin { animation: modStepSpin .8s linear infinite; }
@keyframes modStepSpin { to { transform: rotate(360deg); } }
.mod-step-desc { font-size: 12.5px; color: #3f4d60; line-height: 1.5; margin: 4px 0 2px; }
.mod-step.is-done .mod-step-desc { display: none; }
.mod-step-result { font-size: 12px; color: var(--gray, #666); margin-top: 2px; }
.mod-step.is-failed .mod-step-result { color: #A73232; }
.mod-step-actions { flex: 0 0 auto; display: flex; align-items: center; margin-left: 10px; }
.mod-step-btn { font: inherit; font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 6px; cursor: pointer; border: 1.5px solid; white-space: nowrap; }
.mod-step-btn.is-primary { background: #1E5BD8; border-color: #1E5BD8; color: #fff; }
.mod-step-btn.is-secondary { background: #fff; border-color: var(--border, #CBD2DC); color: var(--navy, #000E31); }
.mod-step-btn:disabled { opacity: .55; cursor: default; }

/* ===== §19 — Assistant flottant (lanceur + tiroir/page + bandeau d'état + modale « Ce que ce chat sait ») =====
 * Composant transversal `static/components/assist-drawer.js` (window.AssistDrawer). Enveloppe le panneau
 * conversationnel `arm-assistant.js` (.assist-*). Deux modes :
 *   - tiroir (défaut) : lanceur bas-droite → panneau latéral droit par-dessus une page hôte.
 *   - `.is-standalone` (v4) : page plein écran indépendante (ex. /app/brm/chat) — pas de lanceur,
 *     toujours ouvert, fermeture = lien de retour.
 * Premier usage : chat du Baromètre (cf. _meta/archive/plans/plan_chat_brm.md) ; réutilisable par TRM/ARM.
 * Préfixe .adr- (anti-collision : .assist-* appartient à arm-assistant.css).
 * Empilement bas-droite (mode tiroir) : bouton « Outils » de tools-nav.js à bottom:16px → lanceur
 * au-dessus (64px), toast décalé (body.has-assist-launcher).
 * v5 (retour Mika 2026-09-26) : le rail d'historique permanent (gauche) est retiré — l'historique
 * devient un 3ᵉ onglet du sélecteur de suggestions (« Échanges mémorisés », cf. arm-assistant.js
 * SUGG.historique), au même titre que « Pour votre marque » / « Comprendre le Baromètre ». Le
 * bandeau se limite désormais à titre + état + aide + fermeture. */
.adr-launcher {
  position: fixed; bottom: 64px; right: 16px; z-index: 1001;
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 12px; border-radius: 20px;
  background: var(--navy, #000E31); color: #fff; border: 1.5px solid var(--navy, #000E31);
  font-family: 'Open Sans', system-ui, sans-serif; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  cursor: pointer; text-decoration: none; box-shadow: 0 4px 14px rgba(0,14,49,.25); transition: transform .15s, box-shadow .15s;
}
.adr-launcher:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,14,49,.3); }
.adr-launcher svg { width: 18px; height: 18px; flex-shrink: 0; }
.adr-launcher.is-hidden { display: none; }
body.has-assist-launcher .toast { bottom: 120px; }

.adr-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1200;
  width: 70vw; min-width: 640px; max-width: 1080px;
  background: #fff; border-left: 1px solid var(--border, #E0E0E0);
  box-shadow: -12px 0 40px rgba(0,14,49,.18);
  display: flex; flex-direction: column;
  transform: translateX(104%); transition: transform .22s ease;
  font-family: 'Open Sans', system-ui, sans-serif;
}
.adr-drawer.is-open { transform: translateX(0); }
/* Page indépendante : plein viewport, pas d'ombre/bord de tiroir, pas d'animation d'entrée. */
.adr-drawer.is-standalone {
  width: 100vw; min-width: 0; max-width: none;
  border-left: none; box-shadow: none; transform: none; transition: none;
}

/* En-tête unifié : ligne titre/actions, puis le bandeau d'état en sous-titre (dérivé du scope,
 * jamais figé — cf. expert-ux R8, discret au repos). Même structure dans les deux modes. */
.adr-head {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 16px 10px 18px;
  background: var(--navy, #000E31); color: #fff; flex-shrink: 0;
}
.adr-head-row { display: flex; align-items: center; gap: 10px; }
.adr-head-row > svg { width: 20px; height: 20px; flex-shrink: 0; }
.adr-head h3 { font-family: 'Alumni Sans', sans-serif; font-size: 22px; font-weight: 700; margin: 0; flex: 1; letter-spacing: .01em; }
.adr-close {
  background: transparent; border: 1.5px solid rgba(255,255,255,.35); color: #fff; border-radius: 6px;
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  text-decoration: none; flex-shrink: 0;
}
.adr-close:hover { background: rgba(255,255,255,.12); }
.adr-close svg { width: 16px; height: 16px; }
.adr-help {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.55);
  background: transparent; color: #fff; font: 700 13px/1 'Open Sans', system-ui, sans-serif;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.adr-help:hover { background: rgba(255,255,255,.12); }
/* Anneau de focus par défaut trop épais sur fond navy. */
.adr-close:focus, .adr-help:focus { outline: none; }
.adr-close:focus-visible, .adr-help:focus-visible {
  outline: 2px solid #fff; outline-offset: 1px;
}

/* Bandeau d'état — TOUJOURS visible : ce que le chat lit, et ce qu'il ne sait pas encore. */
.adr-state {
  display: flex; align-items: flex-start; gap: 8px; padding-left: 30px;
  font-size: 12px; line-height: 1.4; color: rgba(255,255,255,.72);
}
.adr-state-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ED197; margin-top: 5px; flex-shrink: 0; }
.adr-state-dot.is-off { background: rgba(255,255,255,.3); }
.adr-state-text { flex: 1; }
.adr-state-text strong { color: #fff; }
/* Sélecteur de sources (Lot 4, chat à sources) — dans le bandeau : ce que le chat lit, et ce qu'on peut
   y ajouter. Ouverte = turquoise ; disponible = contour ; le Baromètre est toujours lu (fixe). */
.adr-srcsel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.adr-srcsel-lbl { font-size: 11px; color: rgba(255,255,255,.55); }
.adr-srcsel-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font: inherit; font-size: 11.5px; font-weight: 600; line-height: 1.6; cursor: pointer;
  color: rgba(255,255,255,.85); background: transparent; border: 1px solid rgba(255,255,255,.35);
}
.adr-srcsel-chip svg { width: 11px; height: 11px; }
.adr-srcsel-chip:hover { border-color: #fff; color: #fff; }
.adr-srcsel-chip:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.adr-srcsel-chip.is-on { background: var(--turquoise); border-color: var(--turquoise); color: var(--navy); }
.adr-srcsel-chip.is-fixed { cursor: default; border-style: dashed; color: rgba(255,255,255,.7); }

/* Corps : le panneau .assist (arm-assistant.js) remplit la hauteur ; journal extensible, saisie en pied.
   v5 : une seule colonne (.adr-conv) — l'ancien rail d'historique gauche est un onglet de suggestions. */
.adr-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.adr-conv { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }   /* min-height: 0, sinon le fil ne défile jamais et la saisie sort de l'écran */
/* overflow: visible — border-radius est déjà à 0 ici, rien à clipper ; nécessaire pour que le
   menu déroulant des suggestions (position: absolute) ne soit pas coupé par le tiroir. */
.adr-conv .assist { border: none; border-radius: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: visible; }
.adr-conv .assist-top { display: none; }                       /* titre et sous-titre portés par .adr-head / .adr-state */
.adr-conv .assist-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px 18px 16px; }
/* Repère de chat classique (retour Mika) : les suggestions se posent juste au-dessus de la saisie,
   pas en tête de colonne — le journal garde toute la hauteur disponible. Ordre visuel réécrit par
   flex `order`, le DOM (sugg → log → input → grounded, arm-assistant.js) ne change pas. */
.adr-conv .assist-log { flex: 1; min-height: 0; max-height: none; order: 1; }
.adr-conv .assist-sugg { order: 2; margin-bottom: 10px; }
.adr-conv .assist-input { order: 3; }
.adr-conv .assist-grounded { order: 4; }
/* Les suggestions vivent maintenant en bas d'écran (juste au-dessus de la saisie) : le menu
 * déroulant, resté ouvert vers le bas (arm-assistant.css), sortait de la fenêtre et devenait
 * inatteignable (retour Mika). Il s'ouvre vers le haut, par-dessus le journal. */
.adr-conv .assist-sugg-menu { top: auto; bottom: 100%; margin-top: 0; margin-bottom: 6px; }
.adr-conv .assist-msg.md .md-tbl { display: block; overflow-x: auto; }
.adr-chapeau { font-size: 12.5px; color: var(--gray, #666); margin: 0 0 10px; }
.adr-chapeau strong { color: var(--navy, #000E31); font-weight: 600; }

/* Modale « Ce que ce chat sait » — contenu 100 % dérivé de …/ask/scope. */
.adr-ov {
  position: fixed; inset: 0; z-index: 1300; background: rgba(0,14,49,.45);
  display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
  font-family: 'Open Sans', system-ui, sans-serif;
}
.adr-ov.is-open { display: flex; }
.adr-modal { background: #fff; border-radius: 10px; width: 100%; max-width: 680px; box-shadow: var(--shadow-modal, 0 8px 40px rgba(0,14,49,.25)); overflow: hidden; }
.adr-modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; background: var(--navy, #000E31); color: #fff; }
.adr-modal-head h3 { font-family: 'Alumni Sans', sans-serif; font-size: 24px; font-weight: 700; margin: 0; flex: 1; }
.adr-modal-head svg { width: 20px; height: 20px; flex-shrink: 0; }
.adr-modal-body { padding: 6px 20px 18px; color: #1f2d36; font-size: 13px; line-height: 1.5; }
.adr-modal-sec { padding: 14px 0; border-bottom: 1px solid var(--border, #E0E0E0); }
.adr-modal-sec:last-child { border-bottom: none; }
.adr-modal-sec h4 { font-family: 'Alumni Sans', sans-serif; font-size: 17px; font-weight: 700; color: var(--navy, #000E31); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.adr-stages { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; }
.adr-stage { font-size: 12px; padding: 4px 10px; border-radius: 14px; border: 1.5px solid var(--border, #E0E0E0); color: var(--gray, #666); }
.adr-stage.is-done { border-color: #2FA36B; color: #1f6f48; background: #EEF8F2; }
.adr-src { display: flex; gap: 10px; padding: 6px 0; align-items: flex-start; }
.adr-src-lbl { flex: 0 0 200px; font-weight: 600; color: var(--navy, #000E31); }
.adr-src-line { flex: 1; color: #1f2d36; }
.adr-src-abs { font-size: 12px; color: var(--gray, #666); font-style: italic; margin-top: 2px; }
.adr-ex { list-style: none; margin: 0; padding: 0; }
.adr-ex li { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; }
.adr-ex li span.grp { flex: 0 0 200px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray, #666); }
.adr-ex-q { background: none; border: none; padding: 0; font: inherit; color: var(--accent, #1A56DB); text-align: left; cursor: pointer; }
.adr-ex-q:hover { text-decoration: underline; }
.adr-ex-q::before { content: '→ '; }
.adr-modal-list { margin: 0; padding-left: 18px; }
.adr-modal-list li { margin: 3px 0; }

@media (max-width: 900px) {
  .adr-drawer:not(.is-standalone) { width: 100vw; min-width: 0; max-width: none; }
  .adr-launcher span { display: none; }
  .adr-launcher { padding: 0 11px; }
  .adr-src-lbl, .adr-ex li span.grp { flex-basis: 120px; }
}

/* 13.11 — Sélecteur segmenté (.dm-seg) ─────────────────────────────────────
 * Deux ou trois choix exclusifs, courts, montrés ensemble : le type d'un accès de démo, la vue
 * nommée / masquée d'un aperçu. Sorti de `demos.html` le 2026-09-29, le portail de démonstration
 * en ayant besoin aussi (règle 7). */
.dm-seg { display: inline-flex; border: 1.5px solid var(--border); border-radius: 8px; overflow: hidden; }
.dm-seg button {
  font-size: 12px; font-weight: 600; padding: 7px 14px; border: none; background: var(--white);
  color: var(--gray); cursor: pointer; font-family: inherit;
}
.dm-seg button + button { border-left: 1.5px solid var(--border); }
.dm-seg button.is-active { background: var(--navy); color: var(--white); }

/* 13.12 — Placeholder de chargement (.skel) ────────────────────────────────
 * Un rectangle qui prend la forme du contenu à venir, jamais une roue ni un texte
 * « Chargement… » (lot E1, `_meta/archive/plans/plan_backoffice_initialisation.md` §4.6). */
.skel {
  background: linear-gradient(90deg, var(--gray-light) 25%, var(--border) 37%, var(--gray-light) 63%);
  background-size: 400% 100%;
  border-radius: 6px;
  animation: skel-shimmer 1.4s ease infinite;
}
@keyframes skel-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; background-position: 50% 50%; } }

/* 13.13 — Barre de destinations (.dest-bar / .dest) ────────────────────────
 * Quatre pavés de même largeur, l'état d'un palier du Cycle lu depuis `GET …/paliers`.
 * Lot E1 ; réutilisable par toute étape du Cycle qui pose la même question (« où vais-je,
 * qu'est-ce qui m'en sépare »). `role="tablist"` sur `.dest-bar`, `role="tab"` sur `.dest`. */
.dest-bar {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  position: sticky; z-index: 5; padding: 10px 0; background: var(--gray-light);
}
.dest {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-card);
  padding: 10px 12px 9px; cursor: pointer; text-align: left; font-family: inherit;
  border-bottom: 3px solid transparent;
}
.dest[aria-selected="true"] { border-bottom-color: var(--navy); }
.dest-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dest-top svg { flex: none; width: 15px; height: 15px; }
.dest-name { font-size: 13px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dest-sub { font-size: 11px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dest.is-atteint .dest-sub.has-manquant { color: var(--dv-status-warn); }
.dest.is-atteint .dest-top svg { color: var(--dv-status-good); }
.dest.is-atteint.has-manquant .dest-top svg { color: var(--dv-status-warn); }
.dest.is-ferme .dest-top svg { color: var(--dv-status-none); }
.dest.is-ferme .dest-sub { color: var(--dv-status-none); }
@media (max-width: 640px) {
  /* Téléphone (§11 du plan E1) : défilement horizontal, jamais un menu déroulant — les
   * quatre états doivent rester visibles d'un coup d'œil. */
  .dest-bar { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .dest-bar::-webkit-scrollbar { display: none; }
  .dest { flex: 0 0 148px; }
}

/* 13.14 — Chapeau de page (.ini-hat) ────────────────────────────────────────
 * Une ligne d'intention sous la barre de destinations (Règle 9) : décrit la tâche, jamais
 * l'objet, et ne change pas selon la destination active. */
.ini-hat { font-size: 13px; color: var(--gray); padding: 2px 2px 14px; }

/* 13.15 — Pastille d'acteur (.who) ──────────────────────────────────────────
 * Qui agit sur un arrêt de l'itinéraire : Vous / Machine / IA / Rendez-vous. Une variable
 * visuelle = une information (CLAUDE.md) : ces couleurs ne disent jamais un verdict. */
.who { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.who-vous    { color: var(--navy); }
.who-machine { color: var(--dv-brand-1); }
.who-ia      { color: var(--dv-brand-2); }
.who-rdv     { color: var(--dv-brand-3); }

/* 13.16 — Badge d'état de module (.mod-state--<etat>) ──────────────────────
 * Les huit états de `scoring/ini_etats.py` — même table de libellés et de couleurs partout
 * (itinéraire, tiroir E2, carte E4, les 11 pages de module). */
.mod-state {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 10px; border: 1.5px solid; display: inline-block; white-space: nowrap;
}
.mod-state--valide       { color: var(--dv-status-good); border-color: var(--dv-status-good); background: color-mix(in srgb, var(--dv-status-good) 12%, var(--white)); }
.mod-state--a_valider    { color: var(--accent);         border-color: var(--accent);         background: color-mix(in srgb, var(--accent) 12%, var(--white)); }
.mod-state--a_revalider  { color: var(--dv-status-warn);  border-color: var(--dv-status-warn);  background: color-mix(in srgb, var(--dv-status-warn) 12%, var(--white)); }
.mod-state--a_completer  { color: var(--dv-status-warn);  border-color: var(--dv-status-warn);  background: color-mix(in srgb, var(--dv-status-warn) 12%, var(--white)); }
.mod-state--en_cours     { color: var(--dv-brand-1);      border-color: var(--dv-brand-1);      background: color-mix(in srgb, var(--dv-brand-1) 12%, var(--white)); }
.mod-state--verrouille,
.mod-state--non_lance,
.mod-state--sans_objet   { color: var(--dv-status-none);  border-color: var(--dv-status-none);  background: color-mix(in srgb, var(--dv-status-none) 10%, var(--white)); }

/* 13.17 — Carte d'arrêt et regroupements (.stop / .stop-group / .stop-while) ─
 * Un arrêt de l'itinéraire = une carte (§4.2 du plan). Le TRM et l'ARM auront la même forme
 * de tâche à rendre (Règle 7) : composant sorti dès le premier écran qui en a besoin. */
.stop {
  background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-card);
  padding: 12px 15px; display: flex; flex-direction: column; gap: 5px;
}
.stop.is-porte { background: var(--gray-light); border-style: dashed; }
.stop-row1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stop-title { font-size: 14px; font-weight: 600; color: var(--navy); }
/* Titre cliquable d'un arrêt `module` (§5 du plan, lot E2) : ouvre le tiroir, jamais la page du
 * module (le bouton de geste, lui, ouvre la page — « un geste = un lieu »). */
.stop-title-btn {
  background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: left;
}
.stop-title-btn:hover, .stop-title-btn:focus-visible { text-decoration: underline; outline: none; }
.stop-duree { font-size: 12px; color: var(--gray); }
.stop-apres { font-size: 12px; color: var(--gray); margin-left: auto; }
.stop-detail { font-size: 13px; color: var(--navy); line-height: 1.5; }
.stop-cout { font-size: 12px; color: var(--gray); }
.stop-geste { margin-top: 3px; }
.stop-none { font-size: 12.5px; color: var(--gray); font-style: italic; }
.stop-blocs { margin: 2px 0 0 18px; padding: 0; font-size: 12.5px; color: var(--navy); }
.stop-blocs li { margin-bottom: 3px; }
.stop-blocs a { color: var(--accent); }

.stop-group {
  border-left: 2px solid var(--dv-brand-1); padding: 10px 0 10px 14px; display: flex;
  flex-direction: column; gap: 9px;
}
.stop-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dv-brand-1);
}
.stop-while {
  display: flex; align-items: center; gap: 10px; margin: 2px 0 2px 14px;
  font-size: 11px; color: var(--gray); font-style: italic;
}
.stop-while::before { content: ""; width: 20px; height: 1.5px; background: var(--border); flex: none; }

/* 13.18 — Section repliable (<details class="fold">) ───────────────────────
 * Fermée par défaut (Règle du plan de l'Initialisation, lot E1, décision 10) : plusieurs blocs
 * d'un même écran, chacun refermé tant qu'on ne l'a pas ouvert — l'utilisateur choisit ce qu'il
 * regarde. `<summary>` porte un `.fold-h` (même gabarit que l'en-tête de section habituel) précédé
 * d'un chevron qui pivote à l'ouverture. Natif HTML, pas de JS : juste le marqueur par défaut masqué
 * et le chevron dessiné en CSS. */
details.fold { margin: 0; }
details.fold > summary { list-style: none; cursor: pointer; border-radius: 8px; outline-offset: 4px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary:focus-visible { outline: 2px solid var(--accent); }
details.fold > summary .fold-h { padding-block: 4px; }
details.fold[open] > summary .fold-h { margin-bottom: 14px; }
.fold-chev {
  flex: none; width: 9px; height: 9px; border-right: 2px solid var(--gray); border-bottom: 2px solid var(--gray);
  transform: rotate(-45deg); align-self: center; transition: transform .15s;
}
details.fold[open] .fold-chev { transform: rotate(45deg); }
details.fold > summary:hover .fold-chev { border-color: var(--navy); }
@media (prefers-reduced-motion: reduce) { .fold-chev { transition: none; } }
.fold-h svg { width: 20px; height: 20px; flex: none; color: var(--navy); }

/* 13.19 — Tuile de module (.mod-tile) ───────────────────────────────────────
 * Un module du catalogue, toujours ouvrable (lot E1, décision 10 : « une donnée n'est jamais
 * close »). Verrouillé = pas de lien, juste la raison du serveur (`etat.raison`, déjà la bonne
 * phrase — jamais reconstruite côté page). Toute la tuile est cliquable vers `app_route`
 * (`.mod-tile-link`, lot 2026-10-05) ; le détail (ex-bulle sur le nom) se rouvre via le bouton
 * rond « ? » posé en bas à droite, dont le clic s'arrête avant d'atteindre le lien englobant
 * (preventDefault + stopPropagation côté JS).
 *
 * Format carré (lot 2026-10-05, maquette validée) : le picto + le nom sont le sujet de la tuile,
 * donc le plus gros élément, centrés dans l'espace que le carré dégage. Le picto porte la couleur
 * de l'état (même regroupement que l'ancien `.mod-state--<etat>` : `--good`/`--accent`/`--warn`/
 * `--info`, rien = famille neutre) ; le texte de l'état vit sous le nom, dans la même couleur —
 * un coup d'œil sur le picto suffit, le texte confirme en toutes lettres. Le « ? » d'aide reste
 * seul en coin bas-droit. */
.mod-tile {
  position: relative; flex: 0 0 200px; aspect-ratio: 1 / 1; background: var(--white);
  border: 1.5px solid var(--border); border-radius: var(--radius-card); padding: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 10px; box-shadow: 0 1px 2px rgba(0, 14, 49, .06);
  transition: border-color .12s, box-shadow .12s, transform .1s;
}
.mod-tile.is-locked { border-style: dashed; opacity: .72; box-shadow: none; }
a.mod-tile-link { color: inherit; text-decoration: none; cursor: pointer; }
a.mod-tile-link:hover {
  border-color: var(--accent); transform: translateY(-1px);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 20%, transparent);
}
a.mod-tile-link:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
a.mod-tile-link:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0, 14, 49, .08); }

.mod-tile-id { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.mod-tile-ico {
  flex: none; width: 48px; height: 48px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--dv-status-none) 12%, var(--white)); color: var(--dv-status-none);
}
.mod-tile-ico svg { width: 27px; height: 27px; }
.mod-tile-ico--good   { background: color-mix(in srgb, var(--dv-status-good) 14%, var(--white)); color: var(--dv-status-good); }
.mod-tile-ico--accent { background: color-mix(in srgb, var(--accent) 14%, var(--white));         color: var(--accent); }
.mod-tile-ico--warn   { background: color-mix(in srgb, var(--dv-status-warn) 14%, var(--white)); color: var(--dv-status-warn); }
.mod-tile-ico--info   { background: color-mix(in srgb, var(--dv-brand-1) 14%, var(--white));     color: var(--dv-brand-1); }
.mod-tile-nom { font-size: 16px; font-weight: 700; color: var(--navy); line-height: 1.25; max-width: 100%; }
.mod-tile-etat { font-size: 11.5px; font-weight: 700; letter-spacing: .01em; color: var(--dv-status-none); }
.mod-tile-etat--good   { color: var(--dv-status-good); }
.mod-tile-etat--accent { color: var(--accent); }
.mod-tile-etat--warn   { color: var(--dv-status-warn); }
.mod-tile-etat--info   { color: var(--dv-brand-1); }
.mod-tile-lock { font-size: 11px; color: var(--gray); }
.mod-tile-aide {
  position: absolute; right: 10px; bottom: 10px; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--border); background: var(--white); color: var(--gray);
  font: 700 11px/1 system-ui; display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; transition: border-color .12s, color .12s, transform .06s;
}
.mod-tile-aide:hover, .mod-tile-aide:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.mod-tile-aide:active { transform: scale(.9); border-color: var(--accent); color: var(--accent); }

/* Conseil sur la tuile (détours de l'itinéraire rattachés à ce module) — posé le 2026-10-01 : un
 * conseil en pied de page passait inaperçu (Mika). Le conseil vit sur l'objet qu'il concerne, pas
 * dans une liste à part. Rempli par destination active ; vide = pas de détour pour ce module ici. */
.mod-tile-conseil {
  font-size: 11px; display: flex; align-items: flex-start; gap: 5px; color: var(--gray);
}
.mod-tile-conseil:empty { display: none; }
.mod-tile-conseil svg { width: 12px; height: 12px; flex: none; margin-top: 1px; }
.mod-tile.is-conseille {
  border-color: var(--accent); border-width: 1.5px; background: color-mix(in srgb, var(--accent) 5%, var(--white));
}
.mod-tile.is-conseille .mod-tile-conseil { color: var(--accent); font-weight: 600; }
.mod-tile.is-conseille .mod-tile-conseil svg { color: var(--accent); }
.mod-tile.is-inutile-ici .mod-tile-conseil svg { color: var(--dv-status-none); }

/* 13.20 — Tiroir de module, en feuille (.mod-sheet) ─────────────────────────
 * Lot E2 (plan §5, décision 13) : §3 prévoyait une colonne de droite à 360 px, mais E1 a livré
 * l'écran en une seule colonne — le tiroir s'ouvre donc TOUJOURS en feuille qui monte du bas (déjà
 * prévue sous 1200 px en §3), même en plein écran. Jamais `.modal`/`.modal-backdrop` (§13.10) :
 * sémantique différente (centré vs ancré bas), noms distincts pour ne pas les confondre.
 * Hauteur = celle du CONTENU (décision D1, 2026-10-01 — R1 : à pleine hauteur fixe, une fiche courte
 * laissait deux tiers de blanc et se lisait comme une erreur), plafonnée à la pleine hauteur moins les
 * deux bandes (`--dest-top`, déjà posée par la page pour la barre de destinations collante) ; au-delà,
 * le corps défile dans la fiche, l'en-tête reste collé. Fermeture : bouton, Échap, ou clic sur le voile. */
.mod-sheet-backdrop {
  position: fixed; inset: 0; background: rgba(0,14,49,.35); z-index: 90;
  display: flex; align-items: flex-end; justify-content: center;
}
.mod-sheet-backdrop[hidden] { display: none; }
.mod-sheet {
  background: var(--white); box-shadow: var(--shadow-modal); width: 100%; max-width: 640px;
  height: auto; max-height: calc(100% - var(--dest-top, 110px)); border-radius: 12px 12px 0 0; overflow-y: auto;
  display: flex; flex-direction: column;
}
.mod-sheet-head {
  position: sticky; top: 0; background: var(--white); border-bottom: 1px solid var(--border);
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; z-index: 1;
}
.mod-sheet-nom { font-family: 'Alumni Sans', sans-serif; font-size: 20px; font-weight: 700; color: var(--navy); }
.mod-sheet-close { background: none; border: none; cursor: pointer; color: var(--gray); padding: 4px; flex: none; display: inline-flex; }
.mod-sheet-close svg { width: 18px; height: 18px; }
.mod-sheet-close:hover { color: var(--navy); }
.mod-sheet-body { padding: 18px 20px 26px; display: flex; flex-direction: column; gap: 17px; }
.mod-sheet-objectif { font-size: 13px; color: var(--navy); line-height: 1.5; margin-top: 2px; }
.mod-sheet-section { display: flex; flex-direction: column; gap: 5px; }
.mod-sheet-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); }
.mod-sheet-phrase { font-size: 13px; color: var(--navy); line-height: 1.5; }
.mod-sheet-raison { font-size: 13px; color: var(--gray); line-height: 1.5; }
.mod-sheet-meta { font-size: 12.5px; color: var(--gray); display: flex; flex-direction: column; gap: 3px; }
.mod-sheet-verrou { font-size: 12.5px; color: var(--dv-status-warn); display: flex; align-items: center; gap: 6px; }
.mod-sheet-verrou svg { width: 14px; height: 14px; flex: none; }
.mod-sheet-bareme { font-size: 12.5px; }
.mod-sheet-bareme summary { font-weight: 600; color: var(--accent); cursor: pointer; }
.mod-sheet-bareme-raisons { margin: 0 0 10px 18px; padding: 0; font-size: 12.5px; color: var(--navy); }
.mod-sheet-bareme-raisons li { margin-bottom: 4px; }
.mod-sheet-bareme-dl { margin: 10px 0 0; font-size: 12px; color: var(--navy); }
.mod-sheet-bareme-dl dt { font-weight: 600; margin-top: 7px; }
.mod-sheet-bareme-dl dd { margin: 2px 0 0; color: var(--gray); }
.mod-sheet-bareme-evalue { font-size: 12px; color: var(--gray); margin-top: 9px; line-height: 1.5; }
.mod-sheet-gestes { display: flex; flex-direction: column; gap: 8px; }
.mod-sheet-gestes svg { width: 14px; height: 14px; flex: none; } /* .btn svg (§9) ne fixe pas de taille */
.mod-sheet-err { font-size: 12.5px; }
@media (max-width: 640px) {
  .mod-sheet { max-width: none; border-radius: 10px 10px 0 0; }
}

/* 13.21 — Copilote, panneau de la colonne droite (.side-panel) ─────────────
 * Lot E5 (plan §8, décision 14). §3 prévoyait une colonne de droite à 360 px partagée avec le
 * tiroir ; le tiroir est resté une feuille (décision 13) et E1 a figé une seule colonne empilée de
 * sections `<details class="fold">` (décision 10) — la colonne partagée n'a donc jamais existé.
 * Le copilote rejoint ces sections plutôt que d'en réintroduire une. `.side-panel` reste le nom du
 * conteneur pour qu'un futur écran du Cycle puisse, lui, le poser en colonne. Trois questions en
 * boutons (`.copilote-q-btn`), chacune ouvre sa réponse en accordéon (`.copilote-a`) — une seule à
 * la fois, même esprit que le tiroir à un seul module. */
.side-panel { display: flex; flex-direction: column; gap: 10px; }
.copilote-q { border: 1.5px solid var(--border); border-radius: var(--radius-card); background: var(--white); overflow: hidden; }
.copilote-q-btn {
  width: 100%; text-align: left; font: 600 13px/1.4 'Open Sans', sans-serif; color: var(--navy);
  background: none; border: none; cursor: pointer; padding: 12px 14px; display: flex; align-items: center; gap: 8px;
}
.copilote-q-btn::after {
  content: ""; margin-left: auto; flex: none; width: 8px; height: 8px;
  border-right: 2px solid var(--gray); border-bottom: 2px solid var(--gray); transform: rotate(45deg); transition: transform .15s;
}
.copilote-q-btn[aria-expanded="true"]::after { transform: rotate(-135deg); }
.copilote-q-btn:disabled { color: var(--gray); cursor: default; opacity: .7; }
.copilote-q-btn:disabled::after { display: none; }
.copilote-q-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (prefers-reduced-motion: reduce) { .copilote-q-btn::after { transition: none; } }
.copilote-a { padding: 0 14px 14px; margin-top: -2px; display: flex; flex-direction: column; gap: 9px; border-top: 1px solid var(--border); padding-top: 10px; }
.copilote-reponse { font-size: 13px; color: var(--navy); line-height: 1.5; margin: 0; }
.copilote-puces { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--navy); display: flex; flex-direction: column; gap: 4px; }
.copilote-tag { font-size: 10.5px; color: var(--gray); font-weight: 600; }
/* Lot I1 — la quatrième question (« Quel module ajouter ? ») rend des groupes (à ajouter /
 * inutiles / sans avis) et, sous chaque module, la décision de l'équipe : deux boutons, ou
 * l'état décidé avec son geste. `.copilote-a-geste` (posé par E5 sans style) aligne le geste de
 * fin de réponse et la loupe « sous le capot » sur une ligne. */
.copilote-groupe { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray); margin: 4px 0 0; }
.copilote-decision { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.copilote-decision .btn { padding: 4px 10px; font-size: 12px; }
.copilote-a-geste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Note de source (R7) : toute réponse calculée (ou, plus tard, produite par l'IA) doit dire d'où
 * elle sort — posée en global parce que le lot I1 (conseil de modules par l'IA) la réutilisera
 * telle quelle pour sa mention « Proposition de l'IA […] ». */
.src-note { font-size: 11px; color: var(--gray); margin: 0; }

/* 13.22 — Lancer un geste depuis l'itinéraire (.stop-launch) ────────────────
 * Lot E3 (plan §6, Règle 8, T7) : un geste `sorte: "route"` s'exécute sur place. Le bouton
 * annonce son coût avant de partir — confirmation DANS la page (`.lancement-confirm`), jamais une
 * fenêtre d'alerte — puis passe par le composant partagé `Attente` (`tools-nav.js`) pendant
 * l'appel. `.stop-resume` est ce qu'affiche un arrêt dont le geste tourne déjà (retrouvé après un
 * rechargement, T3) : un filet d'information, pas un bouton actif. Réutilisable par le TRM et
 * l'ARM, qui auront le même geste à lancer. */
.stop-launch-wrap, .stop-group-launch {
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.stop-group-launch { margin-top: 4px; }
.stop-launch-zone:empty { display: none; }
.lancement-confirm { padding: 10px 12px; font-size: 12.5px; max-width: 420px; }
.lancement-confirm p { margin: 0; }
.lancement-confirm-actions { display: flex; gap: 8px; margin-top: 8px; }
.stop-launch-err { font-size: 12px; padding: 8px 10px; max-width: 420px; }
.stop-resume { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--gray); }
.stop-resume-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--dv-brand-2); flex: none;
  animation: stop-resume-pulse 1.6s ease-in-out infinite;
}
@keyframes stop-resume-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .stop-resume-dot { animation: none; opacity: .8; } }

/* 13.23 — Sections numérotées d'un back-office du Cycle (.cycle-sec) ─────────
 * Sorties de `brm.html` (`.bo-sec`, lot L3 de `_meta/archive/plans/plan_remarques_en_ligne.md`, 2026-10-01, remarque
 * R2) pour que chaque module du Cycle ait la même grammaire : [étapes du module] → Chat → Publier au
 * client (décision D5). Une section = une carte repliable `<details class="card cycle-sec">` : pastille
 * numérotée (verte quand l'étape est faite), titre, état à droite (un badge), chevron. Ouverte quand une
 * action est attendue, fermée sinon ; verrouillée (`.is-locked`) tant que l'amont ne l'ouvre pas. Les
 * mêmes numéros dans la zone droite de l'en-tête (`.page-header-steps`). Rendu ET état :
 * `components/cycle-sections.js` (`CycleSections.html / render / update / steps`). Règles reprises à
 * l'identique de `brm.html` : le Baromètre ne change pas d'un pixel. */
details.cycle-sec { margin-bottom: 14px; scroll-margin-top: 150px; }
details.cycle-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center;
  gap: 12px; padding: 14px 18px; }
details.cycle-sec > summary::-webkit-details-marker { display: none; }
details.cycle-sec[open] > summary { border-bottom: 1px solid var(--border); }
details.cycle-sec.is-locked > summary { cursor: default; }
details.cycle-sec[hidden] { display: none; }   /* une section sans objet disparaît (ex. « Compléter les produits » quand rien n'est à compléter) ; elle revient d'elle-même */
.cycle-sec-num { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--navy);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: system-ui, -apple-system, sans-serif; font-size: 12px; font-weight: 700; color: var(--navy); }
.cycle-sec.is-done > summary .cycle-sec-num { background: var(--green); border-color: var(--green); color: #fff; }
.cycle-sec.is-locked > summary .cycle-sec-num { border-color: #aab4c2; color: #aab4c2; }
/* Orange (2026-10-08, Trajectoire) : la section contient quelque chose qui bloque ou qui est à revoir. Visible
 * replié — c'est tout l'objet : « ✓ vert ne ment jamais », donc tout ce qui n'est pas vert-et-rien-à-faire se lit
 * sans ouvrir. `.is-wait` : une étape amont d'abord (cliquable, mais pas ouverte par défaut). */
.cycle-sec.is-attn { border-color: #E8C77A; }
.cycle-sec.is-attn > summary { background: #FFF7E6; border-radius: 8px; }
.cycle-sec.is-attn[open] > summary { border-radius: 8px 8px 0 0; border-bottom-color: #E8C77A; }
.cycle-sec.is-attn > summary .cycle-sec-num { background: #B7791F; border-color: #B7791F; color: #fff; }
.cycle-sec.is-wait > summary .cycle-sec-num { border-color: #aab4c2; border-style: dashed; color: #8A93A0; }
.cycle-sec.is-wait > summary .cycle-sec-title { color: #8A93A0; }
.cycle-sec.is-info > summary .cycle-sec-num { border-color: #aab4c2; color: #8A93A0; }
.cycle-sec-title { font-family: 'Alumni Sans', sans-serif; font-size: 22px; font-weight: 600; color: var(--navy); }
.cycle-sec.is-locked .cycle-sec-title { color: #9aa6b6; }
.cycle-sec-state { margin-left: auto; text-align: right; }
.cycle-sec-chev { color: var(--gray); transition: transform .15s; flex-shrink: 0; }
details.cycle-sec[open] > summary .cycle-sec-chev { transform: rotate(90deg); }
details.cycle-sec.is-locked > summary .cycle-sec-chev { display: none; }   /* verrouillée en direct (update) */
.cycle-sec-body { padding: 16px 18px 18px; }
/* Occupation de l'espace (2026-10-10) : une section ne s'empile pas sur une seule colonne étroite. `.cs-grid` : une colonne latérale
   (consigne, gestes) + le contenu large ; `.cs-2` : deux blocs de même poids côte à côte ; `.cs-cols` : un texte long coulé en colonnes. */
.cs-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2.3fr); gap: 22px 34px; align-items: start; }
.cs-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 18px 34px; align-items: start; }
.cs-cols { column-width: 32rem; column-gap: 36px; }
.cs-side .cycle-sec-chapeau { max-width: none; }
.cs-side .cycle-issue { margin: 0 0 12px; }
@media (max-width: 1000px) { .cs-grid { grid-template-columns: 1fr; } }

/* 13.30 — Kit des éléments de section (2026-10-10, Mika : « des composants plus propres, plus jolis, plus lisibles »).
 * Une même grammaire pour ce qu'on trouve DANS une section : une carte d'élément à ton (.cs-item), un champ (.cs-field), un panneau
 * titré (.cs-panel), un bouton discret (.cs-btn-ghost) et la ligne qui déplie un détail (.cs-more). Pas de style en ligne dans une
 * page : on compose ces classes. Tons : ok (vert) · warn (ambre) · info (bleu) · danger (rouge) · par défaut gris.
 * Référence vivante : /app/design-system. */
.cs-items { display: flex; flex-direction: column; gap: 10px; }
.cs-item { --tone: #9AA6B6; --tone-bg: #EEF1F5; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 12px 14px 10px 16px; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--tone); border-radius: 10px; }
.cs-item[data-tone="ok"]     { --tone: var(--green); --tone-bg: #E4F3EA; }
.cs-item[data-tone="warn"]   { --tone: #B7791F;      --tone-bg: #FFF3DC; }
.cs-item[data-tone="info"]   { --tone: #2F6DF0;      --tone-bg: #E6EEFE; }
.cs-item[data-tone="danger"] { --tone: #C0392B;      --tone-bg: #FBE9E7; }
.cs-item-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--tone-bg); color: var(--tone);
  font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.cs-item-title { font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--navy); }
.cs-item-meta { font-size: 12px; line-height: 1.4; color: var(--gray); }
.cs-item-actions { display: flex; justify-content: flex-end; gap: 6px; align-self: stretch; margin-top: 2px; padding-top: 8px; border-top: 1px solid #EEF1F5; }
.cs-btn-ghost { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid transparent; border-radius: 6px; background: transparent;
  font: inherit; font-size: 12px; font-weight: 600; color: #5A6472; cursor: pointer; }
.cs-btn-ghost:hover, .cs-btn-ghost:focus-visible { background: #F1F4F8; color: var(--navy); outline: none; }
.cs-btn-ghost.is-danger:hover, .cs-btn-ghost.is-danger:focus-visible { background: #FBE9E7; color: #B3261E; }
.cs-subtitle { margin: 18px 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5A6472; }
.cs-more { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 1px dashed var(--border); border-radius: 8px; background: #FAFBFD;
  font-size: 12.5px; font-weight: 600; color: #3f4d60; cursor: pointer; }
.cs-more:hover { border-style: solid; background: #F3F6FA; }
.cs-more .chev { flex-shrink: 0; color: var(--gray); transition: transform .15s; }
details[open] > summary .cs-more .chev { transform: rotate(90deg); }
.cs-field { display: flex; flex-direction: column; gap: 5px; margin: 0 0 14px; }
.cs-label { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #5A6472; }
.cs-ta { display: block; width: 100%; min-height: 3.1em; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
  font: inherit; font-size: 13.5px; line-height: 1.55; color: var(--navy); resize: vertical; field-sizing: content; }
.cs-ta:focus { outline: 2px solid #BFD3F9; border-color: #2F6DF0; }
.cs-panel { border: 1px solid var(--border); border-radius: 10px; background: #fff; min-width: 0; }
.cs-panel.is-ref { background: #F6F8FB; }
.cs-panel-h { padding: 11px 16px; border-bottom: 1px solid var(--border); border-radius: 10px 10px 0 0; background: rgba(15, 29, 48, .03);
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #5A6472; }
.cs-panel-b { padding: 14px 16px 6px; }
.cycle-sec-chapeau { font-size: 13px; line-height: 1.6; color: #3a4a55; max-width: 82ch; margin: 0 0 14px; }
.cycle-sec-line { font-size: 13px; line-height: 1.6; margin: 0 0 6px; }
.cycle-sec-line.is-muted { color: var(--gray); }
.cycle-sec-line.is-warn { color: #9A6212; }
.cycle-sec-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.cycle-sec-actions .cycle-sec-push { margin-left: auto; }
.cycle-sec-link { font-size: 13px; font-weight: 600; color: var(--navy); }
@media (prefers-reduced-motion: reduce) { .cycle-sec-chev { transition: none; } }
/* Carte d'état d'une étape (« Pas encore publié », « Modifié depuis… ») : une alerte §13.9 avec son texte
 * à gauche et ses gestes à droite (`CycleSections.card`) ; la ligne « fait » (`CycleSections.okLine`) dit
 * qu'une étape est à jour, coche verte, geste éventuel à droite. Ex-`.bo-pub-*` de brm.html. */
.cycle-card { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; }
.cycle-card-text { flex: 1 1 340px; min-width: 0; }
.cycle-card-text b { display: block; margin-bottom: 2px; }
.cycle-card-detail { margin-top: 6px; font-size: 12px; }
.cycle-card-detail summary { cursor: pointer; font-weight: 600; }
.cycle-card-detail ul { margin: 6px 0 0 18px; font-family: system-ui, -apple-system, sans-serif; }
.cycle-ok-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--navy); }
.cycle-ok-line > svg { color: var(--green); flex-shrink: 0; }
.cycle-ok-line > .btn { margin-left: auto; }
.cycle-ok-line > span { flex: 1 1 240px; min-width: 0; }
/* Anatomie entrée/contenu/sortie d'une section (décision 2026-10-04, cf. skill /repenser) — une
 * section qui demande à l'utilisateur de comprendre ou d'agir s'ouvre sur une ENTRÉE (le `.cycle-sec-chapeau`
 * ci-dessus + un geste explicite qui fait apparaître le contenu — même quand ce contenu est déjà en
 * mémoire sans requête réelle, auquel cas un bref temps de transition honnête le marque, jamais une
 * progression simulée, cf. Règle 8) et se referme sur une SORTIE : la validation, dans une zone à
 * part, jamais un bouton perdu en bas du contenu. Référence : `trm.html` (Trajectoire → Instruction),
 * en CSS seulement — cette page ne monte pas encore `cycle-sections.js`. */
.cycle-sec-entree { font-size: 12.5px; line-height: 1.55; color: #3f4d60; }
.cycle-sec-entree .btn { margin-top: 11px; }
.cycle-sec-sortie { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 18px; padding: 12px 15px; background: var(--gray-light); border: 1.5px solid var(--border); border-radius: 8px; }
.cycle-sec-sortie-lbl { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gray); }

/* Bandeau « Ce qui m'attend » (2026-10-08, Trajectoire) — en tête de page : tout ce qui est orange, toutes étapes
 * confondues, avec la raison et un lien vers la section, puis la prochaine étape. Quand rien ne bloque, il le dit en
 * vert. Il sert à sortir du module avec un état validé. Rendu : `CycleSections.attente`. */
.cycle-todo { border: 1.5px solid #E8C77A; background: #FFF7E6; border-radius: 8px; padding: 6px 8px; margin: 0 0 14px; }
.cycle-todo.is-clear { border-color: var(--green); background: #E8F4EE; }
.cycle-todo-h { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 6px; font-family: 'Alumni Sans', sans-serif;
  font-size: 19px; font-weight: 600; color: #8A5A12; }
.cycle-todo.is-clear .cycle-todo-h { color: var(--green); }
.cycle-todo-n { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: #B7791F; color: #fff; font-family: system-ui, -apple-system, sans-serif; font-size: 12px; font-weight: 700; }
.cycle-todo ul { list-style: none; margin: 0; padding: 0; }
.cycle-todo li { margin: 0; }
/* La ligne entière est le geste : plus de lien « Y aller ». Une seule ligne (la raison est coupée, le texte complet au survol). */
.cycle-todo-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: transparent;
  font: inherit; font-size: 13px; color: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.cycle-todo-row:hover, .cycle-todo-row:focus-visible { background: rgba(183, 121, 31, .12); outline: none; }
.cycle-todo.is-clear .cycle-todo-row:hover, .cycle-todo.is-clear .cycle-todo-row:focus-visible { background: rgba(31, 107, 74, .10); }
.cycle-todo-where { font-weight: 700; flex: 0 0 auto; max-width: 42%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cycle-todo-why { flex: 1 1 auto; min-width: 0; color: #5A6472; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cycle-todo-lbl { flex: 0 0 auto; color: #5A6472; }
.cycle-todo-next { border-top: 1px solid rgba(183, 121, 31, .25); border-radius: 0 0 6px 6px; margin-top: 2px; }
.cycle-todo.is-clear .cycle-todo-next { border-top: 0; }
.cycle-todo-chev { margin-left: auto; flex-shrink: 0; color: #8A5A12; }
.cycle-todo.is-clear .cycle-todo-chev { color: var(--green); }
/* Synthèse d'une section FERMÉE : une ligne à côté du titre, avant l'état (politique « tout fermé », 2026-10-10). */
.cycle-sec-synth { flex: 1 1 0; min-width: 0; margin: 0 10px 0 4px; font-size: 13px; color: #5A6472; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
details.cycle-sec[open] > summary .cycle-sec-synth { display: none; }

/* Une raison d'orange à l'intérieur d'une section : le texte, et le geste qui la résout à droite. */
.cycle-issue { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: 12px 0 0; padding: 10px 13px;
  background: #FFF7E6; border: 1px solid #E8C77A; border-radius: 7px; font-size: 13px; }
.cycle-issue-text { flex: 1 1 260px; min-width: 0; }
.cycle-issue-text b { display: block; color: #856404; }

/* Barre d'action d'une section : LE geste attendu, pleine largeur, au-dessus du contenu consultable (2026-10-10). Tons : ok (vert) · warn (ambre). */
.cs-actionbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px;
  margin: 0 0 14px; border: 1px solid #d9dee5; border-left-width: 4px; border-radius: 8px; background: #fff; }
.cs-actionbar[data-tone="ok"] { border-color: #9bd1b3; background: #f1faf5; }
.cs-actionbar[data-tone="warn"] { border-color: #E8C77A; background: #FFF7E6; }
.cs-actionbar-txt { flex: 1 1 260px; min-width: 0; font-size: 14px; }
.u-pad-16 { padding: 16px !important; } .u-center { text-align: center !important; }
/* 13.30 bis — Espacements et rangées du kit (2026-10-10) : de quoi composer une section SANS style en ligne. Une valeur, une classe. */
.u-m0 { margin: 0 !important; }
.u-mt-4 { margin-top: 4px !important; } .u-mt-6 { margin-top: 6px !important; } .u-mt-8 { margin-top: 8px !important; } .u-mt-10 { margin-top: 10px !important; }
.u-mt-12 { margin-top: 12px !important; } .u-mt-14 { margin-top: 14px !important; } .u-mb-12 { margin-bottom: 12px !important; } .u-my-12 { margin: 12px 0 !important; }
.u-mt-6-0 { margin: 6px 0 0 !important; }
.u-grow { flex: 1 1 220px !important; min-width: 0 !important; } .u-grow-200 { flex: 1 1 200px !important; min-width: 0 !important; } .u-full { flex-basis: 100% !important; }
.u-row { display: flex; flex-wrap: wrap !important; gap: 8px !important; align-items: center !important; }
.u-row-6 { display: flex; gap: 6px !important; align-items: center !important; }
.u-prewrap { white-space: pre-line !important; }

.u-fs-12 { font-size: 12px !important; }
.u-fs-11 { font-size: 11px !important; }
.u-fs-13 { font-size: 13px !important; }
.u-mb-3 { margin-bottom: 3px !important; }
.u-mb-14 { margin-bottom: 14px !important; }
.u-mb-10 { margin-bottom: 10px !important; }
.u-mt-10-0 { margin: 10px 0 0 !important; }
.u-mt-8-0 { margin: 8px 0 0 !important; }
.u-mt-14-0 { margin: 14px 0 0 !important; }
.u-my-02 { margin: .2em 0 !important; }
.u-mt-0 { margin-top: 0 !important; }
.u-ml-auto { margin-left: auto !important; }
.u-ml-4 { margin-left: 4px !important; }
.u-flex-none { flex: none !important; }
.u-flex-1 { flex: 1 !important; }
.u-c-gray { color: var(--gray) !important; }
.u-c-green { color: var(--green) !important; }
.u-row-base { display: flex; align-items: baseline !important; gap: 10px !important; flex-wrap: wrap !important; }
.u-w-full { width: 100% !important; }

/* 13.24 — Questions du chat composées par l'équipe (.cq-…) ──────────────────
 * La section « Chat » d'un back-office du Cycle (Baromètre « 3 · Chat », Initialisation « 2 · Chat »,
 * puis Trajectoire et Plan d’action) : ce que le chat proposera au client. Propositions de l'IA À TRIER
 * (fond ambré, « Retenir » / « Écarter », jamais proposées sans décision humaine), questions de l'équipe,
 * socle du module replié, reformuler / rétablir / ajouter / « Régénérer les propositions ». L'origine se
 * dit en mots, la couleur ne dit que l'état (à trier). Rendu et gestes : `components/chat-questions.js`.
 * Règles reprises à l'identique de `brm.html` (`.bo-q-…`, lot 3c.1). */
.cq-block { margin-top: 16px; }
.cq-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cq-head .body-label { margin-bottom: 6px; }
details.cq-socle > summary { cursor: pointer; list-style: none; }
details.cq-socle > summary::-webkit-details-marker { display: none; }
details.cq-socle > summary .cycle-sec-chev { vertical-align: -3px; margin-right: 4px; }
details.cq-socle[open] > summary .cycle-sec-chev { transform: rotate(90deg); }
.cq-count { font-family: system-ui, -apple-system, sans-serif; font-size: 12px; color: var(--gray); }
.cq-zone { font-size: 12px; font-weight: 600; color: var(--navy); margin: 12px 0 2px; }
.cq-list { list-style: none; margin: 0; padding: 0; }
.cq { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cq:last-child { border-bottom: none; }
.cq.is-pending { background: #FFFBF0; margin: 0 -8px; padding: 10px 8px; border-radius: 6px; border-bottom: none; margin-bottom: 4px; }
.cq.is-off .cq-text { color: #8A93A0; }
.cq-check { margin-top: 3px; accent-color: var(--navy); width: 15px; height: 15px; flex-shrink: 0; cursor: pointer; }
.cq-tag { flex-shrink: 0; margin-top: 1px; }
.cq-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cq-text { font-size: 13.5px; line-height: 1.45; color: var(--navy); }
.cq-meta { font-size: 11.5px; color: var(--gray); }
.cq-link { background: none; border: none; padding: 0; font: inherit; color: var(--navy); text-decoration: underline; cursor: pointer; }
.cq-acts { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.cq-icon { background: none; border: 1px solid transparent; border-radius: 6px; padding: 4px; color: var(--gray); cursor: pointer; display: inline-flex; }
.cq-icon:hover { color: var(--navy); background: var(--gray-light); border-color: var(--border); }
.cq-icon:focus-visible, .cq-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cq-icon:disabled { color: #C7CCD4; cursor: not-allowed; }
.cq-icon:disabled:hover { color: #C7CCD4; background: none; border-color: transparent; }
.cq-icon.is-vedette { color: #B7791F; }
.cq-icon.is-vedette svg { fill: #B7791F; }
.cq-icon.is-vedette:hover { color: #96620F; }
.cq-vedette-tag { color: #B7791F; font-weight: 600; }
/* Champs de saisie = composant global .form-field (§13.3) ; seule la disposition en ligne est ici. */
.cq-editing, .cq-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cq-add { margin-top: 10px; }
.cq-regen { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 10px; }
.cq-regen .cycle-sec-line { flex: 1 1 300px; margin: 0; }
.cq-editing .form-field, .cq-add .form-field { flex: 1 1 260px; min-width: 0; }
.cq-note { font-size: 12.5px; color: #9A6212; margin: 8px 0 0; }
@media (max-width: 520px) {
  .cq { flex-wrap: wrap; }
  .cq-acts { margin-left: 25px; }
  .cq.is-pending .cq-body { flex: 1 1 100%; order: 2; }
  .cq.is-pending .cq-acts { order: 3; margin-left: 0; }
}

/* 13.25 — « Chat » et « Publier au client » de la Trajectoire et du Plan d’action (.cp-…) ─────
 * Lot L4 de `_meta/archive/plans/plan_remarques_en_ligne.md` : les deux dernières étapes de ces deux back-offices,
 * montées par `components/cycle-publier.js` sur §13.23 (section, carte d'état) et §13.24 (questions).
 * Ici seulement ce qui leur est propre : le réglage « proposé au client », l'aperçu de ce que le client
 * verra (la carte du module, posée telle quelle), le lien de partage. */
.cp-ouvert { margin: 0 0 6px; padding: 10px 12px; background: var(--gray-light); border-radius: 8px; flex-wrap: wrap; }
.cp-ouvert-nom { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.cp-apercu-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 20px 0 8px; }
.cp-apercu-h .body-label { margin: 0; }
.cp-apercu-chg { font-size: 12.5px; color: #9A6212; }
.cp-apercu { border: 1px dashed var(--border); border-radius: 10px; padding: 16px; background: #F7F9FB; }
.cp-share { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); }
.cp-share .body-label { display: block; margin-bottom: 4px; }
.cp-share-out { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.cp-share-out .form-field { flex: 1 1 320px; min-width: 0; }
.cp-err { margin: 10px 0 0; font-size: 12.5px; padding: 8px 10px; }

/* 13.26 — L'état d'un module sur SA page (.me-…) ────────────────────────────
 * Lot L5 de `_meta/archive/plans/plan_remarques_en_ligne.md` (page 1/10) : la section « Valider pour le Cycle »
 * d'une page de module de l'Initialisation, montée par `components/module-etat.js`. A remplacé la barre
 * de validation de chaque page (retirée à la fin du lot L5) : l'état affiché est celui de la tuile (`.mod-state--<etat>`, §13.16,
 * calculé par `scoring/ini_etats.py`). Deux colonnes : l'état · pourquoi ce verdict (par marque) et le
 * barème. Une colonne sous 900 px. Le geste (« Valider pour le Cycle ») vit depuis le lot R11 du
 * 2026-10-04 dans `.cycle-sec-sortie` (§13.23), sous la grille — plus dans cette colonne. */
.me-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px 28px; }
@media (max-width: 900px) { .me-grid { grid-template-columns: minmax(0, 1fr); } }
.me-h { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gray); margin: 0 0 10px; }
.me-etat-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.me-etat-verdict { font-size: 12.5px; color: var(--gray); }
.me-raison { font-size: 13.5px; line-height: 1.55; color: var(--navy); margin: 10px 0 4px; }
.me-meta { font-size: 12px; color: var(--gray); margin: 0 0 4px; font-family: system-ui, -apple-system, sans-serif; }
.me-aide { font-size: 12.5px; line-height: 1.5; color: #3a4a55; margin: 6px 0 0; max-width: 60ch; }
.me-err { font-size: 12.5px; padding: 8px 10px; margin: 10px 0 0; }
.me-ecart { font-size: 12px; line-height: 1.5; padding: 8px 10px; margin: 0 0 12px; }
.me-lien { font-size: 12px; color: var(--gray); margin: 14px 0 0; }
.me-lien a { color: var(--navy); font-weight: 600; }
.me-verdict { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.me-niveau { font-family: 'Alumni Sans', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.me-niveau.is-good { color: var(--dv-status-good); }
.me-niveau.is-warn { color: var(--dv-status-warn); }
.me-niveau.is-bad  { color: var(--dv-status-bad); }
.me-niveau.is-none { color: var(--dv-status-none); }
.me-plafond { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--dv-status-warn); }
.me-score { font-size: 13px; color: var(--navy); font-family: system-ui, -apple-system, sans-serif; }
.me-rationale { font-size: 12.5px; line-height: 1.6; color: #3a4a55; margin: 8px 0 12px; }
.me-ents { width: 100%; border-collapse: collapse; font-family: system-ui, -apple-system, sans-serif; font-size: 12.5px; color: var(--navy); }
.me-ents th { text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gray); padding: 4px 8px 6px 0; border-bottom: 1px solid var(--border); }
.me-ents td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.me-ents tr:last-child td { border-bottom: none; }
.me-ents .me-num { text-align: right; width: 56px; font-variant-numeric: tabular-nums; padding-right: 14px; }
.me-ents tr.is-pire td:first-child, .me-ents tr.is-pire .me-num { font-weight: 700; }
.me-off { color: var(--gray); }
.me-signaux { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 14px; margin-top: 12px; }
.me-sig { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; font-size: 11.5px; font-family: system-ui, -apple-system, sans-serif; }
.me-sig-l { color: var(--gray); }
.me-sig-v { font-weight: 700; color: var(--navy); }
.me-sig-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.me-sig-bar > i { display: block; height: 100%; background: var(--navy); opacity: .55; }
.me-bareme { margin-top: 14px; font-size: 12.5px; }
.me-bareme summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.me-bareme dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 10px 0 0; line-height: 1.5; }
.me-bareme dt { font-weight: 700; color: var(--navy); }
.me-bareme dd { margin: 0; color: #3a4a55; }
/* Indicateurs expliqués (`signaux_doc`, page 3/10 du lot L5 — Trends) : un bloc par indicateur. */
.me-doc-ind { margin: 12px 0 0; padding: 10px 12px; background: var(--gray-light); border-radius: 8px; }
.me-doc-h { font-weight: 700; color: var(--navy); }
.me-doc-h span { font-weight: 400; color: var(--gray); }
.me-doc-ind dl { margin: 6px 0 0; }

/* 13.27 — Les marques du radar, une carte chacune (.rm-…) ─────────────────────
 * Lot L5 (page 1/10) : la section « Collecter » d'une page de module de l'Initialisation range sa
 * matière PAR MARQUE DU RADAR (client d'abord, puis concurrents), en grille de cartes qui occupe la
 * largeur — jamais une liste de pastilles (règle R5, mémoire `feedback_composants_pas_des_listes`).
 * Une carte : rôle, nom, statut en mots ; quelques chiffres (`.rm-chiffres`, dl en grille) ; un texte
 * quand il n'y a pas de chiffres ; les gestes propres à la marque ; un détail repliable. Une forme
 * par état : pointillé = il manque quelque chose (non observée) · grisé = absence (une mesure, pas une
 * faute) · bordure ambre = contradiction. Markup :
 *   <div class="rm-grid"><article class="rm-card [is-manque|is-absente|is-conflit|is-hors|is-active]">
 *     <header class="rm-head"><span class="rm-role [is-client]">Client</span><h3 class="rm-nom">…</h3>
 *       <span class="rm-statut">…</span></header>
 *     <dl class="rm-chiffres"><div><dt>Posts</dt><dd>83</dd></div>…</dl> | <p class="rm-texte">…</p>
 *     <div class="rm-gestes">…boutons .btn…</div> <details class="rm-detail"><summary>…</summary>…</details>
 *   </article></div> */
.rm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; }
.rm-card { border: 1.5px solid var(--border); border-radius: var(--radius-card); background: var(--white);
  padding: 13px 15px 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rm-card.is-active { border-color: var(--navy); box-shadow: inset 3px 0 0 var(--navy); }
.rm-card.is-manque { border-style: dashed; }
.rm-card.is-absente, .rm-card.is-hors { background: var(--gray-light); }
.rm-card.is-conflit { border-color: var(--dv-status-warn); }
.rm-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; }
.rm-role { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 9px;
  background: var(--gray-light); color: var(--navy); border: 1px solid var(--border); }
.rm-role.is-client { background: var(--navy); color: var(--white); border-color: var(--navy); }
.rm-nom { font-family: 'Alumni Sans', sans-serif; font-size: 20px; font-weight: 700; color: var(--navy); margin: 0; line-height: 1.1; }
.rm-statut { margin-left: auto; font-size: 11.5px; color: var(--gray); }
.rm-card.is-conflit .rm-statut { color: #9A5B00; font-weight: 600; }
.rm-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px 12px; margin: 0; }
.rm-chiffres > div { min-width: 0; }
.rm-chiffres dt { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gray); }
.rm-chiffres dd { margin: 2px 0 0; font-family: 'Alumni Sans', sans-serif; font-size: 21px; font-weight: 700; color: var(--navy); line-height: 1.05; }
.rm-chiffres dd small { font-family: 'Open Sans', sans-serif; font-size: 11px; font-weight: 600; color: var(--gray); margin-left: 3px; }
.rm-texte { font-size: 12.5px; line-height: 1.55; color: #3a4a55; margin: 0; }
.rm-gestes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.rm-detail { font-size: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.rm-detail > summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.rm-confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; }
.rm-confirm[hidden] { display: none; }
.rm-confirm > span { flex: 1 1 100%; color: #3a4a55; }
.rm-confirm .form-field { flex: 1 1 200px; min-width: 0; }

/* 13.28 — Les aides d'une page de module (.mod-aides) ────────────────────────
 * Lot L5 (page 1/10) : sous les sections numérotées, un repli « Aides » sans numéro (décision D5) —
 * le secondaire : comment capturer et nommer, les raccourcis, comment se calcule un score. En
 * colonnes (`.mod-aides-grid`), une carte par aide. Le repli lui-même est `details.fold` (§13.18). */
.mod-aides { margin-top: 26px; }
.mod-aides-titre { font: 700 24px/1.1 'Alumni Sans', sans-serif; margin: 0; color: var(--navy); }
.mod-aides-sous { font-size: 12.5px; color: var(--gray); }
.mod-aides-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.mod-aide { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius-card); padding: 13px 15px; font-size: 12.5px; line-height: 1.55; color: #3a4a55; }
.mod-aide h3 { font-family: 'Alumni Sans', sans-serif; font-size: 18px; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.mod-aide p { margin: 0 0 6px; }
.mod-aide ul { margin: 0; padding-left: 18px; }
.mod-aide code { font-size: 11px; background: var(--gray-light); padding: 1px 5px; border-radius: 4px; word-break: break-all; }
.mod-aide kbd { font-family: system-ui, -apple-system, sans-serif; font-size: 11px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--white); color: var(--navy); }

/* 13.29 — Questionnaire d'Initialisation, composant partagé (.qi-…) ────────────
 * `components/questionnaire-ini.js` (plan `_meta/archive/plans/plan_demande_diagnostic.md`, §8.4) : UN balisage, deux
 * feuilles — le front (`components/questionnaire-ini.css`) et le back-office, ici. Créée au lot E avec la
 * seule MARQUE DE PROVENANCE (la page des demandes de diagnostic l'écrit par `QuestionnaireIni.marque(p)`),
 * complétée au lot G avec le reste du vocabulaire `qi-` du §8.4 (mode équipe de la tuile Questionnaire).
 * La provenance est une forme et un mot, jamais une couleur de verdict : vérifié = disque plein marqué
 * d'une coche · proposé, confirmé = petit point plein navy · déclaré = petit point plein gris.
 * Aucun des trois n'est un cercle à bordure vide : cette forme-là lit comme une case/un bouton radio
 * non coché dans une liste (confusion relevée par Mika le 2026-10-18 sur la page Demandes de diagnostic :
 * un rond cliquable dans une page en lecture seule laisse croire qu'il manque un geste à faire).
 *   <span class="qi-prov qi-prov--verifie"><i><svg…/></i>Vérifié</span> */
.qi-prov { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--gray); white-space: nowrap; }
.qi-prov i { width: 15px; height: 15px; border-radius: 50%; display: grid; place-items: center; font-style: normal; flex: none; }
.qi-prov i svg { width: 9px; height: 9px; }
.qi-prov--verifie i { background: var(--navy); color: var(--white); }
.qi-prov--confirme i { background: none; }
.qi-prov--confirme i::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--navy); }
.qi-prov--declare i { background: none; }
.qi-prov--declare i::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gray); }
/* Le mode équipe (lot G, §8.8) : la page du Questionnaire monte le composant dans ses sections 1 « Définir le radar »
 * et 2 « Cadrer l'observation ». Apparence reprise telle quelle de la page refaite au lot L5 de
 * `_meta/archive/plans/plan_remarques_en_ligne.md` (`64b4d02`) : une carte par question en grille, mention de criticité, deux
 * groupes en section 2, une carte par marque du radar (classes globales `.rm-…` §13.27, jamais redéfinies) et
 * l'éditeur repliable. Racine : `.qi[data-mode="equipe"]` (les deux groupes). Aucun style dans le JavaScript. */
.qi[data-mode="equipe"] { color: var(--navy); }
.qi-bloc + .qi-bloc { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.qi-bloc-titre { font: 700 20px/1.1 'Alumni Sans', sans-serif; color: var(--navy); margin: 0 0 4px; }
.qi-bloc-intro { font-size: 12.5px; line-height: 1.6; color: #3a4a55; max-width: 92ch; margin: 0 0 12px; }
.qi-grp + .qi-grp { margin-top: 16px; }
.qi-grp-titre { font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--gray); margin: 0 0 8px; }
.qi-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.qi-grille[data-grille="reglages"] { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
@media (max-width: 640px) { .qi-grille, .qi-grille[data-grille="reglages"] { grid-template-columns: minmax(0, 1fr); } }
.qi[data-mode="equipe"] .qi-champ { border: 1.5px solid var(--border); border-radius: var(--radius-card); background: var(--white);
  padding: 12px 14px; min-width: 0; scroll-margin-top: 150px; }
.qi[data-mode="equipe"] .qi-champ[data-plein] { border: none; padding: 0; background: none; }   /* le radar : ses cartes */
.qi[data-mode="equipe"] .qi-champ.is-manque { border-style: dashed; border-color: var(--dv-status-warn); }
.qi[data-mode="equipe"] .qi-champ[data-plein].is-manque { border: none; }   /* l'alerte de la section le dit déjà */
.qi[data-mode="equipe"] .qi-libelle { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 4px;
  font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--navy); }
.qi[data-mode="equipe"] .qi-libelle .qi-prov { font-size: 11px; }
.qi-crit { font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 1px 7px; border-radius: 9px;
  color: var(--dv-status-warn-ink); background: #FFF8E6; border: 1px solid #F0D98C; white-space: nowrap; }
.qi-crit.is-utile { color: var(--gray); background: var(--gray-light); border-color: var(--border); }
.qi[data-mode="equipe"] .qi-pourquoi { font-size: 11.5px; color: var(--gray); line-height: 1.55; margin: 0 0 10px; }
.qi[data-mode="equipe"] .qi-indice { font-size: 11.5px; color: var(--gray); line-height: 1.5; }
.qi[data-mode="equipe"] .qi-saisie { width: 100%; box-sizing: border-box; min-height: 64px; padding: 9px 12px; border: 1.5px solid var(--border);
  border-radius: 6px; font-family: 'Open Sans', sans-serif; font-size: 12.5px; color: var(--navy); background: #FAFBFD; resize: vertical; transition: border-color .15s; }
.qi[data-mode="equipe"] .qi-saisie:focus { outline: none; border-color: var(--accent); background: var(--white); }
.qi[data-mode="equipe"] select.qi-saisie { min-height: 0; width: auto; max-width: 100%; padding: 8px 32px 8px 12px; cursor: pointer; appearance: none; -webkit-appearance: none;
  background: #FAFBFD url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23555' d='M0 0l5 6 5-6z'/></svg>") no-repeat right 12px center; }
.qi[data-mode="equipe"] .qi-saisie[data-lu] { min-height: 2.6em; white-space: pre-wrap; cursor: default; overflow-wrap: anywhere; }
.qi[data-mode="equipe"] .qi-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; position: relative; }
.qi[data-mode="equipe"] .qi-ligne > * { min-width: 0; }
.btn.qi-petit { padding: 4px 11px; font-size: 11.5px; gap: 5px; }
.btn.qi-petit svg { width: 12px; height: 12px; flex: none; }
.qi[data-mode="equipe"] [hidden] { display: none !important; }   /* un menu, une ligne, un bouton cachés le restent */
.qi[data-mode="equipe"] .qi-lien, .qi[data-mode="equipe"] .qi-reprendre { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 600;
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.qi[data-mode="equipe"] .qi-aide:empty { display: none; }
.qi[data-mode="equipe"] .qi-aide { margin-top: 6px; font-size: 12px; }
/* Aides (registre, lecture du site) : un fond d'aide pâle — des propositions de l'outil, jamais une valeur posée. */
.qi[data-mode="equipe"] .qi-aide-tete { display: flex; align-items: center; gap: 6px; padding: 8px 11px 0; background: #F4F8FE; border-radius: 7px 7px 0 0;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gray); }
.qi[data-mode="equipe"] .qi-aide-tete svg { width: 13px; height: 13px; flex: none; }
.qi[data-mode="equipe"] .qi-aide-corps { display: grid; gap: 7px; padding: 8px 11px 10px; background: #F4F8FE; border-radius: 7px; }
.qi[data-mode="equipe"] .qi-aide-tete + .qi-aide-corps { border-radius: 0 0 7px 7px; padding-top: 6px; }
.qi[data-mode="equipe"] .qi-aide-corps .qi-libelle { margin: 2px 0 0; font-size: 11px; }
.qi[data-mode="equipe"] .qi-citation { margin: 0; padding-left: 10px; border-left: 3px solid var(--navy); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.qi[data-mode="equipe"] .qi-puces { display: flex; flex-wrap: wrap; gap: 6px; }
.qi[data-mode="equipe"] .qi-puce { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--white); font-size: 11.5px; color: var(--navy); text-decoration: none; max-width: 100%; }
.qi[data-mode="equipe"] .qi-puce small { color: var(--gray); overflow-wrap: anywhere; }
.qi[data-mode="equipe"] .qi-identite { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; font-size: 11.5px; color: #3a4a55; line-height: 1.4; }
.qi[data-mode="equipe"] .qi-identite > span:not(.qi-prov) { min-width: 0; overflow-wrap: anywhere; }
/* Registre officiel : un menu par-dessus l'éditeur, sous le nom de la ligne client ; cessées grisées. */
.qi[data-mode="equipe"] .qi-registre { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; min-width: 260px; max-height: 300px; overflow-y: auto;
  background: var(--white); border: 1.5px solid var(--navy); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,14,49,.16); padding: 5px; display: grid; gap: 2px; }
.qi[data-mode="equipe"] .qi-registre > .qi-indice { padding: 7px 9px; }
.qi[data-mode="equipe"] .qi-registre > .qi-lien { text-align: left; padding: 8px 9px; border-top: 1px solid var(--border); margin-top: 3px; }
.qi[data-mode="equipe"] .qi-cand { display: grid; gap: 1px; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 6px 9px;
  cursor: pointer; font: inherit; font-size: 12.5px; color: var(--navy); }
.qi[data-mode="equipe"] .qi-cand:hover { background: var(--gray-light); }
.qi[data-mode="equipe"] .qi-cand small { font-size: 11px; color: var(--gray); }
.qi[data-mode="equipe"] .qi-cand em { font-style: normal; font-size: 11px; font-weight: 600; margin-left: 6px; }
.qi[data-mode="equipe"] .qi-cand.is-off b, .qi[data-mode="equipe"] .qi-cand.is-off small { color: #8A93A0; font-weight: 500; }
/* Les cartes du radar : la pastille de la marque (couleur = sa place dans le radar, règle D20), sa fiche, son positionnement. */
.qi-pastille { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--dv-brand-x); }
.qi-pastille[data-couleur="client"] { background: var(--dv-client); }
.qi-pastille[data-couleur="1"] { background: var(--dv-brand-1); }
.qi-pastille[data-couleur="2"] { background: var(--dv-brand-2); }
.qi-pastille[data-couleur="3"] { background: var(--dv-brand-3); }
.qi-fiche { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: 12px; line-height: 1.5; }
.qi-fiche dt { color: var(--gray); }
.qi-fiche dd { margin: 0; color: var(--navy); overflow-wrap: anywhere; }
.qi-pos { margin: 8px 0 0; font-size: 12px; line-height: 1.55; color: #2d3a4a; white-space: pre-wrap; }
.qi-pos-src { font-size: 11px; color: var(--gray); margin: 6px 0 0; }
/* L'éditeur du radar : zone repliable (les cartes repliée, les lignes dépliée), une ligne par marque. */
.qi-ent-zone { display: flex; flex-direction: column; gap: 10px; }
.qi-ent-barre { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 10px; }
.qi-ent-barre [data-zone="libelle"] { font-size: 12.5px; font-weight: 600; color: var(--navy); }
.qi-ent-barre [data-zone="compte"] { font-size: 12px; color: var(--gray); margin-left: 6px; }
.qi-ent-zone[data-collapsed="1"] > [data-zone="editeur"], .qi-ent-zone[data-collapsed="0"] > [data-zone="resume"] { display: none; }
.qi-ent-zone > [data-zone="editeur"] { display: flex; flex-direction: column; gap: 10px; }
.qi-ent { border: 1.5px solid var(--border); border-radius: 7px; padding: 9px 11px; background: #FAFBFD; display: flex; flex-direction: column; gap: 6px; }
.qi-ent--client { background: #F1F5FF; border-color: #C7D6F5; }
.qi-ent-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.qi-ent-tete > .qi-ligne, .qi-ent-tete > .qi-ent-nom { flex: 1 1 200px; }
.qi-ent-role { font: inherit; font-size: 11.5px; padding: 3px 7px; border: 1px solid var(--border); border-radius: 5px; background: var(--white); color: var(--navy); }
span.qi-ent-role { font-size: 9px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #3257a8; background: #DCE6FA; border: 0; padding: 3px 8px; border-radius: 9px; white-space: nowrap; }
.qi-ent-nom { flex: 1; min-width: 0; width: 100%; box-sizing: border-box; font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 8px; border: 1.5px solid var(--border); border-radius: 5px; color: var(--navy); background: var(--white); }
.qi-ent-url { flex: 1 1 220px; box-sizing: border-box; font: inherit; font-size: 11.5px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 5px; color: var(--accent); background: var(--white); }
.qi-ent [data-place="geo"] label, .qi-ent [data-place="dir"] label { font-size: 10.5px; color: var(--gray); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.qi-ent-geo { font: inherit; font-size: 11.5px; padding: 3px 7px; border: 1px solid var(--border); border-radius: 5px; background: var(--white); color: var(--navy); }
.qi-ent-pos, .qi-ent-dir { width: 100%; box-sizing: border-box; min-height: 54px; font-family: 'Open Sans', sans-serif; font-size: 12px; padding: 7px 9px; border: 1px solid var(--border);
  border-radius: 5px; color: var(--navy); resize: vertical; background: var(--white); }
.qi-ent-pos[data-site-bound] { background: #F4F8FE; border-color: var(--accent); }   /* lié au module Sites */
.qi-ent-url::placeholder, .qi-ent-pos::placeholder, .qi-ent-dir::placeholder { color: #9aa6c2; }
.qi-ent-nom:focus, .qi-ent-url:focus, .qi-ent-pos:focus, .qi-ent-dir:focus { outline: none; border-color: var(--accent); }
.qi-ent-source { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--gray); font-style: italic; }
.qi-ent-source > i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.qi-ent-source b { color: var(--accent); font-style: normal; }
.qi-ent-source [data-etat] { margin-left: auto; opacity: .75; }
.qi-ent-source [data-etat="ok"] { color: var(--green); }
.qi-ent-source [data-etat="echec"] { color: var(--dv-status-bad); }
.qi-ent-retirer { font: inherit; font-size: 15px; line-height: 1; width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 5px; background: var(--white);
  color: var(--gray); cursor: pointer; flex-shrink: 0; padding: 0; }
.qi-ent-retirer:hover { border-color: var(--dv-status-bad); color: var(--dv-status-bad); }
.qi-ent-ajouter { font: inherit; font-size: 12px; padding: 5px 12px; border: 1.5px dashed var(--border); border-radius: 6px; background: var(--white); color: var(--navy); cursor: pointer; }
.qi-ent-ajouter:hover { border-color: var(--accent); color: var(--accent); }
.qi-ent-memo { position: relative; font-size: 11px; color: var(--gray); background: #FFF8E6; border: 1px solid #F0D98C; border-radius: 6px; padding: 7px 30px 7px 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.qi-ent-memo[data-lu] { padding-right: 10px; margin-top: 10px; }
.qi-ent-memo b { color: var(--navy); }
.qi-ent-memo > .qi-ent-retirer { position: absolute; top: 5px; right: 6px; width: 18px; height: 18px; font-size: 13px; border-color: #E2CE8A; border-radius: 4px; }
.qi-ent-alerte { padding: 8px 11px; background: #FFF8E6; border: 1px solid #F0D98C; border-radius: 6px; font-size: 11.5px; line-height: 1.55; color: var(--navy); }
.qi-ent-alerte ul { margin: 5px 0 5px 18px; padding: 0; }
.qi-ent-retrait { margin: 8px 0; }   /* confirmation avant de retirer une marque du dossier (alerte ambre : un état, pas une faute) */
.qi-ent-retrait p { margin: 0 0 6px; }
.qi-ent-retrait ul { margin: 0 0 8px 18px; padding: 0; }
.qi-ent-retrait li + li { margin-top: 3px; }
.qi-ent-retrait-titre { font-weight: 600; }
.qi-ent-retrait-case { display: flex; align-items: baseline; gap: 6px; margin: 0 0 8px; cursor: pointer; }
.qi-ent-retrait-err { color: var(--dv-status-bad); }
.qi-ent-retrait-actes { display: flex; flex-wrap: wrap; gap: 8px; }
.qi-emplacement:empty { display: none; }
/* « Vos autres marchés » (lot I, §8.10) : le même choix par zone que le prospect — des zones, puis leurs pays à cocher ;
 * la recherche trouve un pays dans toutes les zones ; les pays retenus en puces, qu'un clic retire. */
.qi[data-mode="equipe"] .qi-segments { display: flex; flex-wrap: wrap; gap: 6px; }
.qi[data-mode="equipe"] .qi-segments button { font: inherit; font-size: 12px; padding: 4px 10px; border: 1.5px solid var(--border); border-radius: 6px;
  background: var(--white); color: var(--navy); cursor: pointer; }
.qi[data-mode="equipe"] .qi-segments button[aria-pressed="true"], .qi[data-mode="equipe"] .qi-segments button[aria-expanded="true"] {
  border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); font-weight: 600; }
.qi-pays { display: grid; gap: 8px; }
.qi-pays [data-pays-zone] small { margin-left: 5px; font-weight: 700; }
.qi-pays [data-pays-liste]:empty, .qi-pays .qi-puces:empty { display: none; }
.qi-pays .qi-puces { align-items: center; }
.qi-pays [data-pays-liste] small { color: var(--gray); }
.qi[data-mode="equipe"] .qi-pays .qi-saisie { min-height: 0; }
.qi[data-mode="equipe"] .qi-pays .qi-puce { font: inherit; font-size: 11.5px; cursor: pointer; }
.qi-pays .qi-puce svg { width: 12px; height: 12px; flex: none; }
@media print {
  .qi-ent-barre .btn, .qi-ent-ajouter, .qi-ent-retirer, .qi-aide, [data-geste="registre"], [data-geste="lire"] { display: none !important; }
  .qi-pays [data-pays-zones], .qi-pays [data-pays-filtre], .qi-pays [data-pays-liste] { display: none !important; }   /* à l'impression : les pays retenus */
  .qi[data-mode="equipe"] .qi-champ { break-inside: avoid; page-break-inside: avoid; }
  .qi[data-mode="equipe"] .qi-saisie { border: 1px solid #ccc; background: #fff; min-height: 40px; }
}

/* 13.30 — Loupe : une image à sa TAILLE RÉELLE (.lb-…) ───────────────────────
 * Ce n'est pas une §13.10 : la modale générique est une carte blanche bornée à 680 px, taillée
 * pour un formulaire. Ici on regarde des PIXELS — fond sombre plein cadre, barre d'outils sobre,
 * zone défilante, et l'image à sa taille native par défaut (on ouvre une loupe pour voir ce que
 * l'aperçu réduit cache, pas pour revoir la même image en plus grand).
 * Premier usage : le visualiseur de posts, où juger un cadrage ou relire un texte demande le
 * vrai pixel. C'est aussi là que viendront se ranger les gestes SUR l'image (recadrage), pour ne
 * pas alourdir la fiche par défaut.
 *   <div class="lb-ov"><div class="lb-bar">…</div><div class="lb-scroll real"><img></div></div>
 * `.real` = taille native (défilement) · `.fit` = ajustée à l'écran. */
.lb-ov { position: fixed; inset: 0; background: rgba(16,22,34,.9); z-index: 3000;
  display: none; flex-direction: column; }
.lb-ov.open { display: flex; }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 9px 14px; color: #fff;
  font-size: 12px; font-family: system-ui, -apple-system, sans-serif; flex: 0 0 auto; }
.lb-bar .lb-key { font-weight: 700; }
.lb-bar .lb-dim { opacity: .68; }
.lb-bar .lb-sp { flex: 1; }
.lb-bar button { font: inherit; font-size: 11.5px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.32);
  border-radius: 5px; padding: 4px 10px; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.lb-bar button:hover { background: rgba(255,255,255,.26); }
/* Un bouton inactif doit SE VOIR inactif : sans cette règle il reste blanc et franc, on clique
   et rien ne se passe — le pire des retours (constaté en séance le 2026-10-02). */
.lb-bar button:disabled { opacity: .4; cursor: not-allowed; }
.lb-bar button:disabled:hover { background: rgba(255,255,255,.14); }
/* L'image est posée au MILIEU du cadre, sur les deux axes — une loupe centre son sujet, elle ne
   l'accroche pas en haut à gauche (Mika, 2026-10-02). Le centrage se fait par `margin:auto` sur
   l'élément flex, jamais par `justify-content`/`align-items` : quand l'image dépasse le cadre, les
   marges automatiques retombent à 0 et le défilement atteint tout le pixel, là où un centrage par
   `justify-content` rend le haut et la gauche INACCESSIBLES au défilement. */
.lb-scroll { flex: 1; overflow: auto; padding: 14px; display: flex; }
.lb-scroll img { display: block; margin: auto; background: #fff; border-radius: 4px; }
.lb-scroll.fit img  { max-width: 100%; max-height: calc(100vh - 100px); width: auto; height: auto; }
.lb-scroll.real img { max-width: none; max-height: none; width: auto; height: auto; }

/* 13.31 — Préparé pour le Pilotage, relecture dans le Plan d’action (.apc-…) ─────────────
 * Refonte du Pilotage, lot D (`_meta/analyse_refonte_pilotage.md` §7.0.4) : la section que monte
 * `components/arm-precalcul.js` dans la phase « Publier au client » du Plan d’action, au-dessus de la carte
 * de publication. Section, badges, cartes d'état et sortie = §13.23 ; champs = .form-field (§13.3) ; une ligne
 * repliable par action = details.fold (§13.18). Ici seulement ce qui lui est propre : la ligne d'action (champs
 * à gauche, relecture critique en regard), les objectifs, les regroupements. La critique se dit en ambre : un
 * point à relire, pas une faute (« une variable visuelle, une information »).
 * (Le contrat du lot A prévoyait §13.29 : déjà pris par le Questionnaire, d'où 13.31.) */
.apc-tete { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.apc-resume { font-family: system-ui, -apple-system, sans-serif; font-size: 12.5px; color: #3a4a55; }
.apc-cout { font-size: 12px; margin-top: 6px; }
.apc-alerte { margin-bottom: 12px; font-size: 13px; }
.apc-generales { margin: 10px 0 0 18px; font-size: 12.5px; color: #9A6212; }
.apc-bloc { margin-top: 22px; }
.apc-bloc > .body-label { display: block; }
.apc-lignes { border-top: 1px solid var(--border); }
.apc-ligne { border-bottom: 1px solid var(--border); }
.apc-ligne-h { display: flex; align-items: center; gap: 12px; padding: 10px 2px; }
.apc-act { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--navy); }
.apc-meta { font-family: system-ui, -apple-system, sans-serif; font-size: 12px; color: var(--gray); font-weight: 400; }
.apc-ligne-etat { flex: none; }
.apc-ligne-c { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 16px; padding: 4px 2px 18px; }
.apc-champs .form-row { margin-bottom: 10px; }
.apc-champs textarea { resize: vertical; line-height: 1.45; }
.apc-court { flex: 0 1 200px; }
.apc-crit { background: var(--gray-light); border-radius: 8px; padding: 12px 14px; align-self: start; }
.apc-crit .body-label { display: block; margin-bottom: 6px; }
.apc-crit ul { margin: 0; padding-left: 16px; font-size: 12.5px; line-height: 1.5; color: #9A6212; }
.apc-crit li + li { margin-top: 5px; }
.apc-crit li.apc-auto { color: #3a4a55; font-style: italic; }
.apc-rien { margin: 0; font-size: 12.5px; color: var(--gray); }
.apc-objectifs { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.apc-objectif { border: 1.5px solid var(--border); border-radius: 8px; padding: 12px 14px; background: var(--white); }
.apc-objectif-t { display: block; font-size: 13.5px; color: var(--navy); margin-bottom: 6px; }
.apc-objectif ol { margin: 0; padding-left: 18px; }
.apc-objectif li { margin-bottom: 8px; }
.apc-ajout { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.apc-objectif-a { display: block; font-size: 12.5px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.apc-objectif li .form-field { display: inline-flex; width: calc(100% - 90px); min-width: 0; vertical-align: middle; }
.apc-objectif .btn, .apc-ajout .btn { padding: 5px 10px; font-size: 12px; }
.apc-ajout { margin-top: 6px; }
.apc-objectif li > .apc-meta { display: block; line-height: 1.45; }
.apc-modif { margin-top: 8px; }
.apc-modif > summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--gray); }
.apc-modif[open] > summary { margin-bottom: 8px; }
.apc-ajout .form-field { flex: 1 1 160px; }
.apc-groupes { display: flex; flex-direction: column; gap: 10px; }
.apc-groupe { display: grid; grid-template-columns: minmax(200px, 340px) minmax(0, 1fr); gap: 12px; align-items: center; }
@media (max-width: 760px) {
  .apc-ligne-c, .apc-groupe { grid-template-columns: 1fr; }
  .apc-objectif li .form-field { width: 100%; }
}


/* ===== §20 — Portail : retiré le 2026-10-16 (lot L1 de _meta/archive/plans/plan_portail_client_demo.md) =====
 * Le portail unique (`client.html`, servi par /app/client ET /app/demo) est une page du front client : sa seule feuille est
 * `components/portail.css`. `demo.html`, la dernière page qui lisait ces classes `cl-…` ici, est supprimée. Le numéro §20
 * reste libre (les renvois « §20 » des anciens documents désignent ce portail). */

/* 13.32 — Commande à copier, avec sa bulle d'aide (.cmd) ─────────────────────────────
 * Toute commande que le back-office recommande de lancer (script, skill, requête) s'affiche ainsi : le texte sur fond sombre, le bouton « Copier » et, au bout de
 * la ligne, un petit « ? » qui ouvre une bulle décrivant ce que fait la commande (décision de Mika, 2026-10-12). Le balisage est produit par
 * `components/commande.js` (`Commande.html`) ou par `md-simple.js` (page Opérations) : jamais écrit à la main. La carte qui contient le bloc doit laisser
 * déborder la bulle (`.card` rogne : `overflow: visible` sur la carte). */
.cmd { position: relative; margin: 0 0 14px; display: flex; align-items: flex-start; gap: 8px; background: #0b1b3a; border-radius: 10px; padding: 9px 9px 9px 0; }
.cmd-pre { flex: 1 1 auto; min-width: 0; margin: 0; background: none; color: #e8eefc; padding: 5px 4px 5px 16px; overflow-x: auto; }
/* `.cmd .cmd-pre code` (2 classes) : doit l'emporter sur le style des `code` en ligne d'une page hôte (ex. `.op-sec code`), sinon le texte clair se retrouve sur fond clair */
.cmd .cmd-pre code { background: none; color: inherit; padding: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-ligatures: none; font-size: 12.5px; line-height: 1.55; white-space: pre; overflow-wrap: normal; }
.cmd-copier { flex: none; height: 30px; padding: 0 12px; font-size: 12px; background: #fff; display: inline-flex; align-items: center; }
/* Commande masquée (29/10/2026) : pas de code affiché, une ligne claire : où la coller, « Copier la commande », « ? ». */
.cmd.cmd-masque { align-items: center; background: #F1F4F8; border: 1px solid #D5DEEA; padding: 8px 10px; flex-wrap: wrap; }
.cmd-masque .cmd-cible { flex: 1 1 auto; font: 600 13px 'Open Sans', sans-serif; color: var(--navy, #000E31); padding-left: 6px; }
.cmd-masque .cmd-cible::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: #1A56DB; }
.cmd-masque .cmd-cible-terminal::before { background: #2E7D5B; }
.cmd-aide-btn { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid #c9d6f2; background: #fff; color: var(--accent, #1A56DB); font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.cmd-aide-btn:hover, .cmd-aide-btn[aria-expanded="true"] { background: var(--accent, #1A56DB); color: #fff; border-color: var(--accent, #1A56DB); }
.cmd-bulle { position: absolute; z-index: 30; right: 0; top: calc(100% + 8px); width: min(560px, 100%); box-sizing: border-box; background: #fff; border: 1.5px solid #c9d6f2; border-radius: 12px; box-shadow: 0 8px 28px rgba(11, 27, 58, .18); padding: 12px 18px 6px; font-family: 'Open Sans', sans-serif; font-size: 13px; line-height: 1.55; color: #3f4d60; cursor: auto; white-space: normal; }
.cmd-bulle[hidden] { display: none; }
.cmd-bulle h4 { margin: 0 0 4px; font-family: 'Alumni Sans', sans-serif; font-size: 17px; font-weight: 600; color: var(--navy, #000E31); }
.cmd-bulle p { margin: 0 0 8px; font-size: 13px; line-height: 1.55; color: #3f4d60; }
.cmd-bulle ol, .cmd-bulle ul { margin: 0 0 8px; padding-left: 20px; }
.cmd-bulle li { margin-bottom: 4px; font-size: 13px; line-height: 1.55; color: #3f4d60; }
.cmd-bulle code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #F1F3F7; border-radius: 4px; padding: 1px 5px; color: inherit; }

/* 13.33 — Texte masqué à l'œil, lu par le lecteur d'écran (.sr-only) ───────────────────────
 * Pour le libellé d'un bouton ou d'un picto qui ne montre que son icône : le nom reste dans le texte de la page (lecteur d'écran, recherche) sans prendre de place.
 * Né du module Présentations (30/10/2026, audit C35) qui le récrivait trois fois dans sa feuille ; `components/simulation.css` (.sim-page) et `components/visibilite.css`
 * (.vis-cache) en portent encore une copie chacun. Le front client a le sien (`.fc-sr`, front-client.css) : deux feuilles, deux jeux de classes.
 *   HTML : <button class="btn" aria-label="Exporter"><svg …/><span class="sr-only">Exporter</span></button> */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== §21 — Dataviz : vit dans dataviz.css (importé en tête), partagé avec le front client — lot I1 de
   _meta/plan_design_front_client.md, 2026-10-01. ===== */


/* ════════════════════════════════════════════════════════════════════════════════════════════════
   §22 — Le chrome du Cycle en QUATRE BARRES
   Lots 3 à 5 de _meta/archive/plans/plan_barre_navigation.md (2026-10-02). Décisions M-1 à M-7 tranchées au §5.

   **Le drapeau `?chrome=4` est tombé le 2026-10-02** : ce modèle est le défaut sur les 15 pages du
   Cycle. Ce qui a remplacé le drapeau n'est PAS « rien » — c'est `<body class="cycle-chrome">`,
   **déclaré par la page elle-même**. Trois raisons, et chacune corrige un défaut de la version à
   drapeau :
     · le PÉRIMÈTRE. `.page-header` est le TYPE 1 de TOUTE l'app, satellites compris (`contacts`,
       `devis`, `design-system`…). Dissoudre ces règles dans §4 sans portée les aurait transformés
       en barres de titre eux aussi — ils gardent le cartouche navy jusqu'au lot 6.
     · l'ÉCLAIR. La classe était posée par `tools-nav.js`, donc après la feuille : on voyait l'en-tête
       navy une fraction de seconde. Dans le markup, elle est là dès l'analyse du document.
     · la MIGRATION. Une page rejoint la pile en déclarant la classe, et pas autrement. `trm-trends.html`
       (en-tête hors flux, pas de `global.css`) ne la déclare pas et garde l'ancien chrome : pas de cas
       particulier à écrire dans le composant.
   `tools-nav.js` lit la MÊME classe pour décider s'il pose trois barres ou une — une seule source de
   vérité, et c'est la page qui la porte.

   Le défaut corrigé était structurel, pas cosmétique : la bande du module (son titre ET ses
   sous-étapes) était AU-DESSUS de la bande du dossier (où l'on choisit le module). On cliquait un
   module en bas, ses choix internes apparaissaient en haut. Quatre étages, chaque enfant sous son
   parent :

     1  .nav-bar       46 px   navy    le logo · le dossier · les mesures · « Outils »
     2  .modules-bar   42 px   blanc   la frise des 5 modules du Cycle
     3  .sections-bar  38 px   turquoise pâle   les sous-étapes du module ouvert (M-6 : celles du
                                                SOUS-module quand on est dans un sous-module)
     4  .page-header   42 px   fond de page     le titre — 24 px (M-1), ni logo (M-3) ni navy (M-7)

   Les TROIS premières sont collantes (126 px) ; la quatrième DÉFILE avec la page — elle appartient à
   la page qu'elle nomme, et 126 px de collant est déjà beaucoup. C'est la sortie du titre hors du
   cartouche (M-7) qui rend quatre étages supportables.

   Pourquoi §22 reste un bloc à part, et n'est PAS dissous dans §4 et §17 comme le lot 5 le prévoyait :
   c'est la portée (ci-dessus). §4 doit continuer de décrire le TYPE 1 **navy** — il sert les satellites
   et les pages hors Cycle, qui gardent ce modèle jusqu'au lot 6. Les variantes `is-fullwidth` et
   `is-compact` restent donc déclarées au §4 **pour eux** ; les 15 pages du Cycle les ont perdues, car
   §22 impose de toute façon position, fond, padding et taille de titre. `is-module`, lui, n'est pas du
   style : c'est le marqueur « cette page est un sous-module », LU par `tools-nav.js` (titre composé,
   groupe, badge d'état) — il reste dans le markup des 10 pages de module.

   Les trois barres sont INJECTÉES par tools-nav.js (`injectCycleChrome`), qui porte un miroir de leurs
   règles de contenant pour les pages sans global.css (trm-trends.html). Les règles des sous-étapes
   (`.page-header-step*`, §4) et de la barre de titre vivent ICI seulement : une page sans global.css
   n'a de toute façon ni `.page-header` ni sous-étapes.
   ════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── Les trois barres collantes ────────────────────────────────────────────────────────────────
 * `min-height` et non `height` : sous 720 px, §17 replie la barre du dossier sur deux lignes plutôt
 * que d'élargir la page. Une hauteur figée y rognerait le contenu ; une hauteur minimale le laisse
 * respirer, et tools-nav.js MESURE les hauteurs rendues pour caler les barres du dessous
 * (`--r-nav-h`, `--r-modules-h`). Les valeurs nominales restent le repli du premier rendu. */
body.cycle-chrome .nav-bar {
  min-height: 46px;
  background: var(--navy);
  border-bottom: 1px solid rgba(193, 229, 227, .18);
  color: var(--white);
}
body.cycle-chrome .nav-bar.is-sticky { top: 0; z-index: 93; }
body.cycle-chrome .modules-bar { min-height: 42px; }
body.cycle-chrome .modules-bar.is-sticky { top: var(--r-nav-h, 46px); z-index: 92; }

/* Le logo suit la navigation (M-3) : il quitte la barre de titre pour la barre 1, à gauche du
 * sélecteur de dossier. Les trois autres barres n'ont plus de gouttière de logo. */
body.cycle-chrome .cyc-logo { height: 23px; display: block; flex: none; margin-right: 15px; }

/* Les crans de la barre 1, transposés sur le navy. Même grammaire qu'au §17 — seules les encres
 * changent, parce que le fond change. Le panneau déroulant (`.cyc-menu`) reste une carte blanche :
 * il se pose SUR la page, pas sur la barre. */
body.cycle-chrome .nav-bar .cyc-brand,
body.cycle-chrome .nav-bar .cyc-brandsel { color: var(--white); }
body.cycle-chrome .nav-bar .cyc-brandsel:hover,
body.cycle-chrome .nav-bar .cyc-brandsel.is-open { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); }
body.cycle-chrome .nav-bar .cyc-badge {
  color: #DDE6F4; background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .16);
}
body.cycle-chrome .nav-bar .cyc-tools { color: #DDE6F4; border-color: rgba(255, 255, 255, .22); }
body.cycle-chrome .nav-bar .cyc-tools:hover,
body.cycle-chrome .nav-bar .cyc-tools.is-open { background: rgba(255, 255, 255, .12); }
body.cycle-chrome .nav-bar .cyc-retry { color: #FFD9A8; border-color: rgba(255, 217, 168, .4); }
/* Régime dégradé : faute de dossier, la barre 1 dit « Choisir un dossier » / « Cycle de Rayonnement »
 * en encre atténuée (`.is-muted`, §17). Cette encre-là est calculée pour un fond blanc. */
body.cycle-chrome .nav-bar .cyc-brandsel.is-muted,
body.cycle-chrome .nav-bar .cyc-brand.is-muted { color: rgba(255, 255, 255, .72); }

/* ── Barre 3 — les sous-étapes du module ouvert ────────────────────────────────────────────────
 * Le `.page-header-steps` n'est pas recopié : tools-nav.js le DÉPLACE hors du <header>. Les pages
 * gardent donc leur markup, leurs `id` et leurs écouteurs — c'est le même nœud.
 * Un module sans sous-étape ne laisse pas de trou : la barre disparaît (`:has`), et la pile se
 * referme sur le titre. C'est ce que le Pilotage prouve. */
body.cycle-chrome .sections-bar {
  display: flex; align-items: stretch;
  min-height: 38px; padding: 0 22px;
  position: sticky; top: calc(var(--r-nav-h, 46px) + var(--r-modules-h, 42px)); z-index: 91;
  background: color-mix(in srgb, var(--turquoise) 34%, var(--white));
  border-bottom: 1px solid color-mix(in srgb, var(--turquoise-ink) 24%, var(--border));
}
body.cycle-chrome .sections-bar:not(:has(.page-header-steps:not([hidden]))) { display: none; }
body.cycle-chrome .sections-bar .page-header-steps {
  margin-left: 0; align-items: stretch; flex: 1 1 auto; min-width: 0;
  overflow-x: auto; scrollbar-width: none;
}
body.cycle-chrome .sections-bar .page-header-steps::-webkit-scrollbar { display: none; }
body.cycle-chrome .sections-bar .page-header-step {
  padding: 0 12px; border-bottom-width: 2px; color: var(--turquoise-ink); flex-shrink: 0;
}
body.cycle-chrome .sections-bar .page-header-step:hover { color: var(--navy); background: rgba(255, 255, 255, .6); }
body.cycle-chrome .sections-bar .page-header-step .page-header-step-n {
  border-color: color-mix(in srgb, var(--turquoise-ink) 40%, transparent);
}
body.cycle-chrome .sections-bar .page-header-step.is-active { color: var(--navy); background: var(--white); border-bottom-color: var(--navy); }
body.cycle-chrome .sections-bar .page-header-step.is-active .page-header-step-n { background: var(--navy); border-color: var(--navy); color: var(--white); }
body.cycle-chrome .sections-bar .page-header-step.is-done .page-header-step-n { background: var(--green); border-color: var(--green); color: var(--white); }
body.cycle-chrome .sections-bar .page-header-step.is-attn .page-header-step-n { background: #B7791F; border-color: #B7791F; color: var(--white); }
body.cycle-chrome .sections-bar .page-header-step.is-wait { opacity: .62; }
body.cycle-chrome .sections-bar .page-header-step.is-locked { color: var(--dv-ink-3); }
body.cycle-chrome .sections-bar .page-header-step.is-locked:hover { color: var(--dv-ink-3); background: none; }
body.cycle-chrome .sections-bar .page-header-step.is-locked .page-header-step-n { border-color: color-mix(in srgb, var(--dv-ink-3) 45%, transparent); }

/* ── Barre 4 — le titre, posé sur le fond de la page (M-7) ─────────────────────────────────────
 * « ça pourrait être juste de la couleur du fond de page, que ça ne soit pas aussi visible que ça.
 *   Tu gardes la hiérarchie, mais tu ne le mets pas sur un fond de couleur. » (Mika, 02/10)
 * Donc : plus de cartouche navy, plus d'arrondi, plus de logo — et plus de collant : le titre
 * appartient à la page. La promesse du module passe EN LIGNE derrière le titre, à sa hauteur de
 * base : elle n'est pas perdue, et elle ne coûte pas une deuxième ligne de barre. */
body.cycle-chrome .page-header,
body.cycle-chrome .page-header.is-fullwidth {
  position: static;
  background: var(--gray-light);
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  min-height: 42px;
  padding: 0 22px;
  gap: 10px;
}
body.cycle-chrome .page-header .page-header-logo { display: none; }
/* Compteur à droite du titre (Prospection, Métiers, Organigrammes, Ressources, Conduite…) : turquoise translucide sur navy en §4 — illisible sur le fond clair de la barre 4. */
body.cycle-chrome .page-header .header-meta { margin-left: auto; color: var(--dv-ink-2); font-size: 11.5px; letter-spacing: .04em; }
body.cycle-chrome .page-header .page-header-content {
  padding: 0; display: flex; flex-direction: row; align-items: baseline;
  gap: 4px 11px; flex-wrap: wrap; min-width: 0;
}
body.cycle-chrome .page-header h1,
body.cycle-chrome .page-header.is-compact h1,
body.cycle-chrome .page-header.is-module h1 {
  font-size: 24px; line-height: 1; color: var(--navy); letter-spacing: .01em; margin-top: 0;
}
body.cycle-chrome .page-header p,
body.cycle-chrome .page-header.is-compact p,
body.cycle-chrome .page-header.is-module p { color: var(--dv-ink-2); margin-top: 0; }
body.cycle-chrome .page-header .ph-titre { gap: 9px; }
/* Le parent d'un sous-module reste DANS le titre et reste cliquable : c'est le seul chemin de sortie
 * (M-6 — les sections de l'Initialisation quittent l'écran tant qu'on est dans le Questionnaire). */
body.cycle-chrome .page-header.is-module .page-header-back { font-size: 15px; color: var(--turquoise-ink); }
body.cycle-chrome .page-header.is-module .page-header-back:hover { color: var(--navy); }
body.cycle-chrome .page-header.is-module .page-header-back:focus-visible { outline-color: var(--turquoise-ink); }
body.cycle-chrome .page-header .ph-sep { font-size: 17px; color: var(--dv-ink-3); }
body.cycle-chrome .page-header.is-module .ph-groupe { color: var(--dv-ink-2); }
body.cycle-chrome .page-header.is-module .ph-groupe::after { color: var(--dv-ink-3); }
/* L'état de la tuile reprend les encres de statut de plein droit : §4 les éclaircissait pour tenir
 * sur le navy, ce fond n'est plus là. Même sémantique, mêmes jetons. */
body.cycle-chrome .page-header-etat { color: var(--dv-ink-2); font-size: 9.5px; }
body.cycle-chrome .page-header-etat[data-etat="valide"]      { color: var(--dv-status-good); }
body.cycle-chrome .page-header-etat[data-etat="a_valider"]   { color: var(--turquoise-ink); }
body.cycle-chrome .page-header-etat[data-etat="a_revalider"],
body.cycle-chrome .page-header-etat[data-etat="a_completer"] { color: var(--dv-status-warn-ink); }
body.cycle-chrome .page-header-etat[data-etat="en_cours"]    { color: var(--dv-brand-1); }
/* Un seul gabarit de titre (M-1) : 24 px partout, écran étroit compris. §4 descend `is-module` à
 * 30 px sous 720 px parce qu'il part de 38 ; ici il n'y a rien à descendre. */
@media (max-width: 720px) {
  body.cycle-chrome .page-header,
  body.cycle-chrome .page-header.is-fullwidth { padding: 5px 14px; }
  body.cycle-chrome .page-header.is-module h1 { font-size: 24px; }
  body.cycle-chrome .sections-bar { padding: 0 14px; }
}
