@charset "UTF-8";
/* Fidia Patrimoine · Fidia Horizon — socle visuel partagé fidia-ui.css (v10, Lot A du 10/11/2026).
   Grammaire : prototype unifié v10 (vault/chat_uploads/cb14089583f9_…). Aucune dépendance (ni Tailwind, ni bundler).
   Thème : html[data-theme="dark" | "light"], posé par fidia-theme.js (clé localStorage « fidia-theme »).
   Couches : un CSS de page hors couche l'emporte toujours sur le socle, ce qui permet la migration page par page
   (Lots B à D) sans casser l'existant. Orange Fidia #EA580C : accent graphique rare (lettrine, filets, élément actif).
   horizon-charts-ind-itm-vrp-css-cleanup-1.0 (28/11/2026) : fichier UTF-8 déclaré (@charset ci-dessus, servi en text/css; charset=utf-8).
   Paliers responsive : 1 440 · 1 366 · 1 180 px (Topbar desktop, en couche fh.shell) ; 960 · 768 · 480 px (sections 7 et 8, hors couche,
   l'emportent sur le socle). « !important » réservé à 3 usages : impression, masquage forcé (logo du moteur graphique) et, à ≤ 768 px,
   neutralisation des positions et tailles posées en ligne par le glisser-déposer (modales, tiroir Hari Seldon) ou par une règle de page
   plus spécifique (largeur des modales, légende de Charts). Chaque retrait a été vérifié au calcul des styles dans Chromium. */
@layer fh.tokens, fh.base, fh.shell, fh.obs, fh.components, fh.widgets;
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;1,8..60,400&display=swap");

/* ============================================================== 1. Tokens « Double Lumière » */
@layer fh.tokens {
  :root, [data-theme="dark"] {
    color-scheme: dark;
    --fh-ui: v10;                                   /* témoin : socle chargé (lu par les modules JS) */
    --bg-canvas: #0B0E14; --bg-sunken: #0E121A; --bg-surface: #121721; --bg-raised: #171D29;
    --bg-hover: #1A2130; --bg-selected: #1A2130; --bg-backdrop: rgba(7, 9, 14, .78);
    --border-subtle: #1F2633; --border-strong: #2E3747; --border-active: #3A4456;
    --ink-primary: #E8ECF2; --ink-secondary: #CBD2DF; --ink-muted: #98A0AC; --ink-inverse: #0B0E14;
    --fidia-accent: #EA580C; --fidia-accent-soft: rgba(234, 88, 12, .13); --fidia-accent-border: rgba(234, 88, 12, .45);
    --sem-up: #62C394; --sem-up-bg: rgba(98, 195, 148, .14); --sem-down: #EF8984; --sem-down-bg: rgba(239, 137, 132, .14); --sem-warn: #D4A359;
    --viz-ink: #CBD2DF;                             /* série « encre » : s'inverse en Clair (#2D323E) */
    --viz-blue: #5E9ED3; --viz-green: #62C394; --viz-purple: #9B8EC4; --viz-gold: #D4A359;
    --chart-grid: #19202C; --rec-fill: rgba(148, 163, 184, .16);
    --tint-up-rgb: 98, 195, 148; --tint-down-rgb: 239, 137, 132;   /* cellules thermiques : rgba(var(--tint-up-rgb), a) */
  }
  [data-theme="light"] {
    color-scheme: light;
    --bg-canvas: #F6F7F8; --bg-sunken: #EFF1F4; --bg-surface: #FFFFFF; --bg-raised: #EFF1F4;
    --bg-hover: #F2F4F8; --bg-selected: #FFF5EB; --bg-backdrop: rgba(17, 20, 28, .44);
    --border-subtle: #E2E5EC; --border-strong: #CBD0DC; --border-active: #9AA3B5;
    --ink-primary: #11141C; --ink-secondary: #2D323E; --ink-muted: #5E6675; --ink-inverse: #FFFFFF;
    --fidia-accent: #EA580C; --fidia-accent-soft: #FFF5EB; --fidia-accent-border: #FDBA74;
    --sem-up: #1D6A46; --sem-up-bg: rgba(29, 106, 70, .11); --sem-down: #A2343A; --sem-down-bg: rgba(162, 52, 58, .11); --sem-warn: #9A5B13;
    --viz-ink: #2D323E;
    --viz-blue: #28628A; --viz-green: #1D6A46; --viz-purple: #645394; --viz-gold: #9A671F;
    --chart-grid: #EAECEF; --rec-fill: rgba(94, 102, 117, .11);
    --tint-up-rgb: 29, 106, 70; --tint-down-rgb: 162, 52, 58;
  }
  :root {
    --font-serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
    --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    --topbar-h: 52px; --subbar-h: 36px; --radius: 6px; --radius-sm: 3px;
    --z-subbar: 44; --z-topbar: 50; --z-menu: 80; --z-modal: 90; --z-modal-up: 96; --z-tip: 120; --z-copilot: 900; --z-help-top: 1000;
  }
  /* Alias des variables historiques des pages (actifs dès qu'une page retire son :root ; Lots B à D). */
  :root, [data-theme] {
    --canvas: var(--bg-canvas); --surface: var(--bg-surface); --raised: var(--bg-raised);
    --filet: var(--border-subtle); --filet-strong: var(--border-strong);
    --encre: var(--ink-primary); --anthracite: var(--ink-secondary); --muted: var(--ink-muted);
    --accent: var(--fidia-accent); --up: var(--sem-up); --down: var(--sem-down);
    --s1: var(--viz-blue); --s2: var(--viz-green);
    --bg: var(--bg-canvas); --panel: var(--bg-surface); --panel2: var(--bg-raised); --line: var(--border-subtle);
    --text: var(--ink-primary); --pos: var(--sem-up); --neg: var(--sem-down);
    --serif: var(--font-serif); --sans: var(--font-sans);
  }
  @media print {
    :root, [data-theme] {
      color-scheme: light;
      --bg-canvas: #FFFFFF; --bg-sunken: #EFF1F4; --bg-surface: #FFFFFF; --bg-raised: #EFF1F4;
      --bg-hover: #FFFFFF; --bg-selected: #FFF5EB;
      --border-subtle: #E2E5EC; --border-strong: #CBD0DC; --border-active: #9AA3B5;
      --ink-primary: #11141C; --ink-secondary: #2D323E; --ink-muted: #5E6675; --ink-inverse: #FFFFFF;
      --fidia-accent-soft: #FFF5EB; --fidia-accent-border: #FDBA74;
      --sem-up: #1D6A46; --sem-down: #A2343A; --sem-warn: #9A5B13; --viz-ink: #2D323E;
      --viz-blue: #28628A; --viz-green: #1D6A46; --viz-purple: #645394; --viz-gold: #9A671F;
      --chart-grid: #EAECEF; --rec-fill: rgba(94, 102, 117, .11);
      --tint-up-rgb: 29, 106, 70; --tint-down-rgb: 162, 52, 58;
    }
  }
}

/* ============================================================== 2. Base */
@layer fh.base {
  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; background: var(--bg-canvas); color: var(--ink-primary); }
  body { font: 400 13px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
  h1, h2 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -.015em; }
  table, input, select, .num, .tabular, time, .asof, .fh-asof { font-variant-numeric: tabular-nums lining-nums; }
  a { color: inherit; }
  * { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
  ::selection { background: var(--fidia-accent-soft); }
  :focus-visible { outline: 1px solid var(--fidia-accent); outline-offset: 1px; }
  .pos { color: var(--sem-up); }
  .neg { color: var(--sem-down); }   /* pas de .up/.down : « .ovl.up » désigne une modale de second plan */
  .muted { color: var(--ink-muted); }
  .ic { flex: none; vertical-align: -2px; }
  @media print {
    html, body { background: #FFFFFF; }
    .fh-topbar, .fh-subbar, #fhHelpBtn, #fcopBtn, #fhGuideBtn, #fhGuide, #fcop, .cmtc, .cmtk, .fh-pill.fh-theme, .fx-bar, #fhHelpToast { display: none !important; }
  }
}

/* ============================================================== 3. Double Bandeau (Topbar 52 px + Subbar 36 px) */
@layer fh.shell {
  header.fh-header { position: sticky; top: 0; z-index: var(--z-topbar); }
  .fh-topbar {
    display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 16px;
    background: var(--bg-canvas); border-bottom: 1px solid var(--border-subtle);
  }
  /* Logo (Lot D, 10/11) : « Fidia » soudé (aucun espace ni gap entre F et idia), puis « Patrimoine » à 6 px.
     Seuls le F et le P sont en capitales : aucune transformation de casse. */
  .fh-brand {
    display: inline-flex; align-items: baseline; flex: none; padding-right: 14px; white-space: nowrap;
    border-right: 1px solid var(--border-subtle); color: var(--ink-primary); text-decoration: none;
  }
  .fh-brand .fh-wordmark { display: inline; font: 600 18px/1 var(--font-sans); letter-spacing: -.025em; }
  .fh-brand .f-mark { color: var(--fidia-accent); font-weight: 700; }
  .fh-brand .f-sub { margin-left: 6px; font: 500 13px/1 var(--font-sans); letter-spacing: 0; text-transform: none; color: var(--ink-muted); }
  .fh-spaces { display: flex; align-items: stretch; gap: 0; height: var(--topbar-h); flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .fh-spaces::-webkit-scrollbar { display: none; }
  .fh-spaces a {
    display: inline-flex; align-items: center; gap: 5px; height: 100%; padding: 0 9px;
    color: var(--ink-muted); text-decoration: none; font: 500 12px/1 var(--font-sans); white-space: nowrap;
    transition: color .12s, background-color .12s;
  }
  .fh-spaces a:hover { color: var(--ink-primary); background: var(--bg-hover); }
  .fh-spaces a.on, .fh-spaces a[aria-current="page"] { color: var(--ink-primary); font-weight: 600; box-shadow: inset 0 -2px 0 var(--fidia-accent); }
  .fh-spaces a.on svg, .fh-spaces a[aria-current="page"] svg { color: var(--fidia-accent); }
  .fh-top-tools { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
  .fh-asof, .fh-top-tools .asof, .fh-sub-tools .asof { color: var(--ink-muted); font: 500 11.5px/1 var(--font-sans); white-space: nowrap; margin-right: 2px; }
  .fh-subbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    min-height: var(--subbar-h); padding: 4px 16px; background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle);
  }
  .fh-anchors { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
  .fh-anchors a, .fh-anchors button {
    padding: 4px 9px; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer;
    font: 500 11.5px/1.2 var(--font-sans); color: var(--ink-secondary); text-decoration: none;
  }
  .fh-anchors a:hover, .fh-anchors a.on, .fh-anchors button:hover, .fh-anchors button.on { background: var(--bg-raised); color: var(--ink-primary); }
  .fh-sub-right, .fh-sub-tools { display: inline-flex; align-items: center; gap: 12px; margin-left: auto; flex-wrap: wrap; }
  .fh-top-tools > span:empty { display: none; }
  /* Topbar (Lot D) : les 6 libellés restent visibles d'un seul tenant dès 1280 px (#asof descendu dans la Subbar).
     ≤ 1440 px : icônes des outils masquées ; ≤ 1366 px : icônes des espaces masquées (libellé long au survol, title).
     < 1180 px seulement : libellés des espaces non actifs réduits à l'icône. */
  @media (max-width: 1440px) { .fh-top-tools :is(#cmtBtn, #fhHelpBtn, #fcopBtn) > svg { display: none; } .fh-topbar { gap: 10px; padding: 0 12px; } }
  @media (max-width: 1366px) { .fh-spaces a > svg { display: none; } .fh-spaces a { padding: 0 6px; } .fh-topbar { gap: 8px; } .fh-top-tools { gap: 3px; }
    .fh-topbar .fh-spaces .fh-wip { font-size: 9px; padding: 0 4px; }
    /* Lot G-1 (10/11) : 7 espaces à 1 280 px — badges « En construction » réduits à une pastille (texte au survol, title), « (EGPS) » masqué. */
    .fh-topbar .fh-spaces .fh-wip { font-size: 0; width: 7px; height: 7px; min-width: 7px; padding: 0; margin-left: 4px; border-radius: 50%; border: 0; background: var(--ink-muted); display: inline-block; vertical-align: middle; }
    .fh-topbar .fh-spaces .fh-egps { display: none; } }
  /* horizon-ux-ui-coherence-1.0 (28/11/2026) : portable standard (1 367 → 1 560 px). Les 9 espaces + « Outils ▾ » + les outils de droite
     débordaient de ~250 px et la Topbar tombait au palier fh-fit3 (« Patrimoine » masqué, compte en initiales, ☀ / ☾, « ? »).
     Compaction douce propre à cette plage : icônes des espaces masquées (libellé long au survol, title), marges resserrées,
     « (EGPS) » masqué ; le palier fh-fit1 suffit alors à 1 440 px. */
  @media (min-width: 1366.02px) and (max-width: 1560px) {
    .fh-spaces a > svg { display: none; } .fh-spaces a { padding: 0 7px; }
    .fh-topbar { gap: 8px; } .fh-brand { padding-right: 10px; } .fh-top-tools { gap: 4px; }
    .fh-topbar .fh-spaces .fh-egps { display: none; } }
  /* Compaction des outils ≤ 1366 px : voir la fin de la couche fh.widgets (les règles des boutons y sont déclarées, une couche
     ultérieure l'emporte quelle que soit la spécificité). */
  @media (max-width: 1179.98px) { .fh-spaces a > svg { display: inline; } .fh-spaces a:not(.on):not([aria-current="page"]) > span { display: none; } }
  /* Mode ?embed=1 (fenêtres de charts_ws.js) : aucun bandeau, géométrie ultra-compacte. */
  body.embed .fh-topbar, body.embed .fh-subbar { display: none; }
  @media (max-width: 900px) { .fh-brand .f-sub { display: none; } .fh-topbar { padding: 0 10px; gap: 8px; } }
  /* Lot D-bis (10/11) : même badge discret sur l'onglet Laboratoire (title complet sur le lien). */
  .fh-spaces .fh-wip { margin-left: 0; padding: 1px 5px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); font: 500 9.5px/1.2 var(--font-sans); letter-spacing: .02em; color: var(--ink-muted); white-space: nowrap; }
}

/* ============================================================== 3 bis. Pages d'observation (body.fh-obs : egps, conditions, earnings — Lot B)
   Mise en page commune des pages « tableaux + graphiques » ; chaque page ne garde que ses règles propres. */
@layer fh.obs {
  body.fh-obs main { max-width: 1320px; margin: 0 auto; padding: 18px 20px 56px; }
  body.fh-obs h1 { font: 400 27px/1.15 var(--font-serif); letter-spacing: -.015em; margin: 0 0 6px; color: var(--ink-primary); }
  body.fh-obs main > section {
    position: relative; margin: 0 0 16px; padding: 16px 18px; background: var(--bg-surface);
    border: 1px solid var(--border-subtle); border-radius: var(--radius);
    scroll-margin-top: calc(var(--topbar-h) + var(--subbar-h) + 12px);
  }
  body.fh-obs main > section::before { content: ""; position: absolute; left: 18px; top: -1px; width: 32px; height: 2px; background: var(--fidia-accent); }
  body.fh-obs section h2 { margin: 0 0 6px; font: 600 17px/1.3 var(--font-serif); letter-spacing: -.01em; color: var(--ink-primary); }
  body.fh-obs h3 { margin: 14px 0 6px; font: 600 10.5px/1.3 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-secondary); }
  body.fh-obs h4 { margin: 12px 0 4px; font: 600 12px/1.3 var(--font-sans); color: var(--ink-secondary); }
  body.fh-obs p.lead { margin: 0 0 16px; max-width: 980px; font-size: 13px; color: var(--ink-muted); }
  body.fh-obs p.note { margin: 2px 0 10px; max-width: 980px; font-size: 12.5px; color: var(--ink-muted); }
  body.fh-obs .src { margin: 6px 0 0; max-width: 1100px; font-size: 11.5px; color: var(--ink-muted); }
  body.fh-obs .fact { margin: 4px 0 8px; font-size: 13px; color: var(--ink-primary); }
  body.fh-obs #err { color: var(--sem-down); }
  body.fh-obs #err:empty { display: none; }
  .badge { display: inline-block; margin-left: 6px; padding: 1px 6px; font: 500 11px/1.4 var(--font-sans); color: var(--ink-secondary); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  .badge.warn { color: var(--sem-warn); border-color: var(--sem-warn); }
  .grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .grid2 > * { min-width: 0; }
  @media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
  .tw { overflow-x: auto; }

  /* Tableaux générés (table sans classe) : même grammaire que table.fh-tbl */
  body.fh-obs .tw table:not(.e) { width: 100%; border-collapse: collapse; font: 400 12.5px/1.35 var(--font-sans); font-variant-numeric: tabular-nums lining-nums; }
  body.fh-obs .tw table:not(.e) th {
    padding: 7px 9px; text-align: right; white-space: nowrap; background: var(--bg-raised); color: var(--ink-muted);
    border-bottom: 1px solid var(--border-strong); font: 600 10.5px/1.25 var(--font-sans); letter-spacing: .06em; text-transform: uppercase;
  }
  body.fh-obs .tw table:not(.e) td { padding: 6px 9px; text-align: right; white-space: nowrap; color: var(--ink-primary); border-bottom: 1px solid var(--border-subtle); }
  body.fh-obs .tw table :is(td, th):first-child { text-align: left; }
  body.fh-obs table th[data-dir] { color: var(--ink-primary); }
  body.fh-obs td.l { text-align: left; color: var(--ink-muted); }
  body.fh-obs td.na { color: var(--ink-muted); }
  body.fh-obs :is(td, th).g { border-left: 1px solid var(--border-strong); }
  body.fh-obs tr.cur td { box-shadow: inset 0 1px 0 var(--border-active), inset 0 -1px 0 var(--border-active); }
  /* Lot F (10/11) : egps.html passe en table.e (modèle earnings.html) ; quadrillage table.fh-grid et encadré .td-cur retirés. */
  body.fh-obs tr.ref td { background: var(--bg-sunken); font-style: italic; border-bottom-color: var(--border-strong); }
  body.fh-obs tr.ref td:first-child { white-space: normal; min-width: 180px; }
  body.fh-obs tr.grp td { background: var(--bg-sunken); color: var(--ink-secondary); font-weight: 600; text-align: left; }
  body.fh-obs tr.pick { cursor: pointer; }
  body.fh-obs tr.pick:hover td { background: var(--bg-hover); }
  body.fh-obs tr.sel td { background: var(--bg-selected); box-shadow: inset 0 1px 0 var(--fidia-accent-border), inset 0 -1px 0 var(--fidia-accent-border); }

  /* KPI (bandeau de chiffres clés généré par les pages) */
  body.fh-obs .kpi { display: flex; flex-wrap: wrap; margin: 8px 0 12px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); overflow: hidden; }
  body.fh-obs .kpi > div { flex: 1 1 150px; padding: 12px 14px; border-right: 1px solid var(--border-subtle); }
  body.fh-obs .kpi > div:first-child { box-shadow: inset 0 2px 0 var(--fidia-accent); }
  body.fh-obs .kpi > div:last-child { border-right: 0; }
  body.fh-obs .kpi div b { display: block; font: 400 24px/1.15 var(--font-serif); font-variant-numeric: tabular-nums lining-nums; color: var(--ink-primary); }
  body.fh-obs .kpi div b.pos { color: var(--sem-up); } body.fh-obs .kpi div b.neg { color: var(--sem-down); }
  body.fh-obs .kpi div span { display: block; margin-top: 4px; font: 500 11.5px/1.3 var(--font-sans); color: var(--ink-muted); }
  body.fh-obs .kpi .sep { flex: 0 0 0; padding: 0; border-right: 1px solid var(--border-strong); }

  /* Graphiques et légendes */
  body.fh-obs .chart { position: relative; height: 260px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); }
  body.fh-obs .chart.sm { height: 110px; margin-top: 6px; }
  body.fh-obs .chart.lg { height: 300px; }
  body.fh-obs .legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0; font: 500 11.5px/1.3 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink-muted); }
  body.fh-obs .legend i { display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: middle; }
  body.fh-obs .legend b { margin-left: 6px; color: var(--ink-primary); font-weight: 600; }

  /* Modales des pages : fenêtre graphique #gw, fiche #sh, méthodologie #ai */
  body.fh-obs .dlg { position: absolute; display: flex; flex-direction: column; padding: 14px 16px; }
  body.fh-obs #gwD { top: 4vh; bottom: 4vh; left: max(16px, calc(50% - 620px)); right: max(16px, calc(50% - 620px)); }
  body.fh-obs .dlg.txt { top: 6vh; max-height: 88vh; left: max(16px, calc(50% - 360px)); right: max(16px, calc(50% - 360px)); overflow: auto; font-size: 13px; line-height: 1.55; }
  body.fh-obs .dlg.txt h3 { margin: 14px 0 3px; font: 600 14px/1.3 var(--font-serif); letter-spacing: 0; text-transform: none; color: var(--ink-primary); }
  body.fh-obs .dlg.txt p { margin: 3px 0; color: var(--ink-secondary); }
  body.fh-obs .dlg.txt b { color: var(--ink-primary); font-weight: 600; }
  .dhead { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--border-subtle); }
  .dhead h2 { margin: 0; flex: 1; }
  .dx { background: transparent; border: 0; color: var(--ink-muted); font-size: 20px; line-height: 1; cursor: pointer; }
  .dx:hover { color: var(--ink-primary); }
  .gwbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0; font-size: 12px; color: var(--ink-muted); }
  .gwbar input[type="number"] { width: 64px; }
  body.fh-obs #gwM { flex: 3 1 0; min-height: 0; }
  body.fh-obs #gwS { flex: 1.5 1 0; min-height: 0; margin-top: 6px; }
  body.fh-obs :is(#gwM, #gwS) { position: relative; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
  .gleg { min-height: 18px; margin: 4px 0 0; font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
  .gleg b { color: var(--ink-primary); font-weight: 600; }
  /* Superposition d'un actif (conditions.html, Lot D) : sélecteur sobre en Subbar et dans .gwbar. */
  .fh-ovctl { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: 500 11.5px/1.2 var(--font-sans); color: var(--ink-secondary); }
  .fh-ovctl select { max-width: 230px; padding: 2px 5px; font-size: 11.5px; }
  .fiche dt { margin-top: 8px; font-size: 11.5px; color: var(--ink-muted); }
  .fiche dd { margin: 1px 0 0; color: var(--ink-primary); }
}

/* ============================================================== 4. Composants */
@layer fh.components {
  /* horizon-macro-desk-ergonomics-1.5 (29/11/2026) : légende interactive universelle (FidiaLegend, fidia-theme.js) — entrée cliquable,
     masquée = atténuée et barrée discrètement, focus clavier visible ; reste cliquable dans les bandeaux posés sur le graphique (pointer-events). */
  .fh-lg-it { cursor: pointer; pointer-events: auto; user-select: none; border-radius: 3px; transition: opacity .12s; }
  .fh-lg-it:hover { background: color-mix(in srgb, var(--ink-primary) 6%, transparent); }
  .fh-lg-it:focus-visible { outline: 2px solid var(--fidia-accent, #E8702A); outline-offset: 1px; }
  .fh-lg-it.fh-lg-off { opacity: .45; text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--ink-muted); }
  /* Lot F-7 (11/11) : bandeau « Fréquence · Source · dates des données · pastille » (FidiaUI.freshness ; modèle earnings.html, Lot F-6) */
  .fresh { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: 4px 0 14px; padding: 8px 12px; font-size: 12.5px; color: var(--ink-secondary);
    background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  .fresh b { color: var(--ink-primary); font-weight: 600; } .fresh small { color: var(--ink-muted); font-size: 11.5px; }
  .fresh .st { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border: 1px solid currentColor; border-radius: 999px; font-weight: 600; font-size: 11.5px; cursor: help; }
  .fresh .st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
  .fresh .st.ok { color: var(--pos); } .fresh .st.warn { color: var(--sem-warn); }
  /* Lot H-1 (11/11) : sous-vues de Vision LT (Mégatendances · Investir à long terme · Reconstitution historique), en tête de la Subbar */
  .fh-views { display: inline-flex; align-items: stretch; flex: none; margin-right: 14px; }
  .fh-views a { display: inline-flex; align-items: center; padding: 3px 10px; margin-left: -1px; white-space: nowrap; text-decoration: none; font: 500 11.5px/1.2 var(--font-sans);
    color: var(--ink-secondary); background: var(--bg-surface); border: 1px solid var(--border-strong); }
  .fh-views a:first-child { margin-left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); } .fh-views a:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .fh-views a:hover { color: var(--ink-primary); background: var(--bg-hover); }
  .fh-views a.on { position: relative; z-index: 1; color: var(--ink-primary); font-weight: 600; border-color: var(--fidia-accent); background: var(--fidia-accent-soft); }
  @media (max-width: 1366px) { .fh-views a { padding: 3px 7px; } }
  /* Boutons */
  .fh-btn, .tbtn {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; cursor: pointer; white-space: nowrap;
    background: var(--bg-surface); color: var(--ink-secondary); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    font: 500 11.5px/1.2 var(--font-sans); text-decoration: none; transition: border-color .12s, color .12s, background-color .12s;
  }
  .fh-btn:hover, .tbtn:hover { color: var(--ink-primary); border-color: var(--border-active); background: var(--bg-hover); }
  .fh-btn.on, .fh-btn.has, .tbtn.on { color: var(--ink-primary); border-color: var(--fidia-accent); background: var(--fidia-accent-soft); }
  .fh-btn-pri { background: var(--ink-primary); color: var(--ink-inverse); border-color: var(--ink-primary); font-weight: 600; }
  .fh-btn-pri:hover { opacity: .9; background: var(--ink-primary); color: var(--ink-inverse); }
  .fh-btn:disabled, .tbtn:disabled { opacity: .5; cursor: default; }

  /* Pilules (Clair | Sombre, segments courts) */
  .fh-pill { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: var(--bg-sunken); border: 1px solid var(--border-subtle); border-radius: 999px; }
  .fh-pill button { border: 0; background: transparent; color: var(--ink-muted); font: 500 11px/1 var(--font-sans); padding: 5px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
  .fh-pill button:hover { color: var(--ink-primary); }
  .fh-pill button.on { background: var(--bg-surface); color: var(--ink-primary); font-weight: 600; box-shadow: 0 0 0 1px var(--border-strong); }
  [data-theme="dark"] .fh-pill button.on { background: var(--bg-raised); }

  /* Contrôles segmentés (.seg, .gwseg, .recseg) : pas d'aplat orange, filet actif seulement. */
  .seg, .gwseg { display: inline-flex; align-items: stretch; }
  .seg button, .gwseg button {
    margin-left: -1px; padding: 3px 9px; cursor: pointer; white-space: nowrap;
    background: transparent; color: var(--ink-muted); border: 1px solid var(--border-strong); font: 500 11.5px/1.2 var(--font-sans);
  }
  .seg button:first-child, .gwseg button:first-child { margin-left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .seg button:last-child, .gwseg button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .seg button:hover, .gwseg button:hover { color: var(--ink-primary); background: var(--bg-hover); }
  .seg button.on, .gwseg button.on { position: relative; z-index: 1; color: var(--ink-primary); border-color: var(--fidia-accent); background: var(--fidia-accent-soft); }
  /* horizon-ux-ui-coherence-1.0 (28/11, ex-style local de titres_vifs.html) : libellé explicite d'un groupe de contrôles (règle UI du 28/11 :
     <span class="ctl"><span class="ctl-lab">Paramètre :</span> … </span>) ; une enveloppe masquée masque aussi son libellé. */
  .ctl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; max-width: 100%; }
  .ctl[hidden] { display: none; }   /* spécificité classe + attribut > .ctl : aucun !important (plafond de la politique CSS) */
  .ctl-lab { font: 600 12px/1.25 var(--font-sans); color: var(--ink-secondary); white-space: nowrap; }
  .ctl :is(.seg, .gwseg, .tv-seg, .qbt-seg) { flex-wrap: wrap; }
  @media (max-width: 599.98px) { .ctl-lab { white-space: normal; } }

  /* Conteneurs */
  .fh-container { max-width: 1520px; margin: 0 auto; padding: 18px 20px 56px; }
  .fh-eyebrow { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 6px; font: 600 10.5px/1 var(--font-sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-secondary); }
  .fh-eyebrow::after { content: ""; width: 44px; height: 1px; background: var(--fidia-accent); }
  h1.fh-title { font: 400 27px/1.15 var(--font-serif); letter-spacing: -.015em; margin: 0 0 6px; color: var(--ink-primary); }
  p.fh-lead { color: var(--ink-muted); font-size: 13px; margin: 0 0 16px; max-width: 960px; }
  .fh-card { position: relative; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
  .fh-card.accent-cap::before { content: ""; position: absolute; left: 18px; top: -1px; width: 32px; height: 2px; background: var(--fidia-accent); }
  .fh-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
  .fh-card-title { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; font: 600 17px/1.25 var(--font-serif); letter-spacing: -.01em; color: var(--ink-primary); }

  /* Bandeau KPI / Hero */
  .fh-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 14px; overflow: hidden; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); }
  .fh-kpi-cell { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; border-right: 1px solid var(--border-subtle); }
  .fh-kpi-cell:first-child { box-shadow: inset 0 2px 0 var(--fidia-accent); }
  .fh-kpi-cell:last-child { border-right: 0; }
  .fh-kpi-lbl { display: flex; align-items: center; justify-content: space-between; gap: 4px; font: 600 10px/1.2 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
  .fh-kpi-val { font: 400 26px/1.1 var(--font-serif); font-variant-numeric: tabular-nums lining-nums; color: var(--ink-primary); }
  .fh-kpi-sub { font: 500 11.5px/1.2 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink-muted); }

  /* Tableaux denses : table.fh-tbl, table.t, table.e */
  .fh-tw { overflow-x: auto; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); }
  table.fh-tbl, table.t, table.e { width: 100%; border-collapse: collapse; font: 400 12.5px/1.35 var(--font-sans); font-variant-numeric: tabular-nums lining-nums; }
  :is(table.fh-tbl, table.t, table.e) thead th {
    padding: 7px 9px; text-align: right; white-space: nowrap; user-select: none;
    background: var(--bg-raised); color: var(--ink-muted); border-bottom: 1px solid var(--border-strong);
    font: 600 10.5px/1.25 var(--font-sans); letter-spacing: .06em; text-transform: uppercase;
  }
  :is(table.fh-tbl, table.t, table.e) thead th.grp-hd { text-align: center; color: var(--ink-secondary); border-bottom: 1px solid var(--border-subtle); }
  :is(table.fh-tbl, table.t, table.e) :is(th, td):first-child, :is(table.fh-tbl, table.t, table.e) :is(th, td).tl { text-align: left; }
  :is(table.fh-tbl, table.t, table.e) td { padding: 6px 9px; text-align: right; white-space: nowrap; color: var(--ink-primary); border-bottom: 1px solid var(--border-subtle); }
  :is(table.fh-tbl, table.t, table.e) tbody tr:last-child td { border-bottom: 0; }
  :is(table.fh-tbl, table.t, table.e) tbody tr.clickable { cursor: pointer; }
  :is(table.fh-tbl, table.t, table.e) tbody tr.clickable:hover td, :is(table.t, table.e) tbody tr:hover td { background: var(--bg-hover); }
  :is(table.fh-tbl, table.t, table.e) tbody tr.sel td { background: var(--bg-selected); box-shadow: inset 0 0 0 1px var(--fidia-accent-border); }
  :is(table.fh-tbl, table.t, table.e) tr.grp-row td { background: var(--bg-sunken); color: var(--ink-secondary); font-weight: 600; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; text-align: left; }
  :is(table.fh-tbl, table.t, table.e) .col-sep { border-left: 1px solid var(--border-strong); }
  /* Colonne « Retenue » : lisible dans les deux thèmes (fin du vert clair forcé). */
  table td.ret { background: var(--fidia-accent-soft); color: var(--ink-primary); font-weight: 600; }

  /* Bouton [i] */
  button.i, button.i-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; padding: 0; margin-left: 4px; vertical-align: middle; cursor: pointer;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); font: italic 600 10px/1 var(--font-serif);
  }
  button.i:hover, button.i-btn:hover { color: var(--fidia-accent); border-color: var(--fidia-accent); background: var(--fidia-accent-soft); }

  /* Formulaires */
  input[type="text"], input[type="number"], input[type="search"], input[type="date"], select, textarea {
    font: 400 12.5px/1.3 var(--font-sans); color: var(--ink-primary); background: var(--bg-sunken);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 4px 7px;
  }
  input[type="checkbox"], input[type="radio"], input[type="range"], input[type="range"].fh-range { accent-color: var(--fidia-accent); }
  input[type="range"].fh-range { width: 100%; cursor: pointer; }

  /* Graphiques */
  .chart-box { position: relative; width: 100%; overflow: hidden; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); }
  .chart-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 6px 0; font: 500 11.5px/1.3 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink-muted); }
  .chart-legend i { display: inline-block; width: 12px; height: 2.5px; margin-right: 5px; vertical-align: middle; }
  .chart-legend b { margin-left: 4px; color: var(--ink-primary); font-weight: 600; }
  /* Indicateur de chargement (posé par FidiaUI.loading au-delà de 150 ms) : filet de 1 px animé, sans voile. */
  [data-loading] { position: relative; }
  [data-loading]::after {
    content: ""; position: absolute; left: 0; top: 0; z-index: 5; height: 1px; width: 30%; pointer-events: none;
    background: var(--fidia-accent); animation: fh-load 1.1s ease-in-out infinite;
  }
  @keyframes fh-load { 0% { left: 0; width: 8%; } 50% { left: 35%; width: 30%; } 100% { left: 92%; width: 8%; } }
  @media (prefers-reduced-motion: reduce) { [data-loading]::after { animation: none; width: 100%; opacity: .6; } }

  /* Modales : .ovl/.dlg (conditions, earnings), .fh-ovl/.fh-dlg, .modal/.box, #docPanel (clt_mandats) */
  .ovl, .fh-ovl { position: fixed; inset: 0; z-index: var(--z-modal); display: none; background: var(--bg-backdrop); }
  .ovl.up, .fh-ovl.up { z-index: var(--z-modal-up); }
  .ovl.show { display: block; }
  .fh-ovl { align-items: center; justify-content: center; padding: 3vh 16px; backdrop-filter: blur(2px); }
  .fh-ovl.show { display: flex; }
  .dlg, .fh-dlg, .modal .box, #docPanel {
    background: var(--bg-surface); color: var(--ink-primary); border: 1px solid var(--border-strong);
    box-shadow: inset 0 2px 0 var(--fidia-accent); border-radius: var(--radius);
  }
  .fh-dlg { display: flex; flex-direction: column; padding: 16px 18px; max-height: 90vh; width: min(740px, 96vw); overflow: hidden; }
  .fh-dlg.xl { width: min(1240px, 96vw); height: 86vh; }
  .fh-dlg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border-subtle); }
  .fh-dlg-head h2, .dlg h2, .modal .box h2, #docPanel h2 { margin: 0; flex: 1; font: 600 18px/1.2 var(--font-serif); }
  #docPanel { border-radius: 0; border-width: 0 0 0 1px; }
  #docPanel h3 { font: 600 15px var(--font-serif); }
  #docPanel p, #docPanel li { color: var(--ink-secondary); }
}

/* ============================================================== 5. Widgets JS partagés */
@layer fh.widgets {
  /* recession_bands.js */
  .recctl { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font: 500 11.5px/1 var(--font-sans); color: var(--ink-secondary); }
  .recctl label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
  .recctl input { accent-color: var(--fidia-accent); margin: 0; }
  .recseg { display: inline-flex; }
  .recseg button { margin-left: -1px; padding: 2px 7px; cursor: pointer; background: transparent; color: var(--ink-muted); border: 1px solid var(--border-strong); font: 500 11px/1.2 var(--font-sans); }
  .recseg button:first-child { margin-left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
  .recseg button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
  .recseg button:hover { color: var(--ink-primary); }
  .recseg button.on { position: relative; z-index: 1; color: var(--ink-primary); border-color: var(--fidia-accent); }

  /* committee.js : case « Word Comité » et panier */
  .cmtk { display: inline-flex; align-items: center; gap: 5px; margin-left: 10px; padding: 2px 7px; vertical-align: 1px; cursor: pointer; user-select: none; white-space: nowrap;
    font: 500 11px/1 var(--font-sans); color: var(--ink-muted); border: 1px solid transparent; border-radius: var(--radius-sm); }
  .cmtk:hover { color: var(--ink-primary); background: var(--bg-hover); }
  .cmtk.on { color: var(--ink-primary); border-color: var(--fidia-accent-border); background: var(--fidia-accent-soft); }
  .cmtk.err { color: var(--sem-down); }
  .cmtk input { accent-color: var(--fidia-accent); margin: 0; width: 12px; height: 12px; cursor: pointer; }
  .cmtc { position: relative; display: inline-flex; }
  .cmtc > button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; cursor: pointer; background: var(--bg-surface); color: var(--ink-secondary);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: 500 11.5px/1.2 var(--font-sans); }
  .cmtc > button:hover { color: var(--ink-primary); border-color: var(--border-active); background: var(--bg-hover); }
  .cmtc > button.has { color: var(--ink-primary); border-color: var(--fidia-accent); background: var(--fidia-accent-soft); }
  .cmtc b { font-weight: 600; font-variant-numeric: tabular-nums; }
  .cmtc > #cmtMore { margin-left: -1px; padding: 5px 6px; font-size: 10px; }   /* Lot I-5 : aperçu rapide du Comité */
  .cmtm { position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-menu); display: none; width: 380px; max-height: 70vh; overflow: auto; padding: 12px 14px;
    background: var(--bg-surface); color: var(--ink-primary); border: 1px solid var(--border-strong); box-shadow: inset 0 2px 0 var(--fidia-accent); border-radius: var(--radius);
    font: 12.5px/1.45 var(--font-sans); }
  .cmtm.show { display: block; }
  .cmtm h4 { margin: 0 0 6px; font: 600 14px/1.2 var(--font-serif); }
  .cmtm .pg { margin: 8px 0 2px; color: var(--ink-muted); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }
  .cmtm .it { display: flex; gap: 6px; align-items: baseline; padding: 2px 0; }
  .cmtm .it span { flex: 1; }
  .cmtm .it small { color: var(--ink-muted); }
  .cmtm .it button { background: transparent; border: 0; color: var(--ink-muted); cursor: pointer; font-size: 14px; line-height: 1; }
  .cmtm .it button:hover { color: var(--sem-down); }
  .cmtm .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
  .cmtm .acts a, .cmtm .acts button { padding: 4px 9px; cursor: pointer; text-decoration: none; background: transparent; color: var(--ink-secondary);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: 500 11.5px/1.2 var(--font-sans); }
  .cmtm .acts button.pri { background: var(--ink-primary); color: var(--ink-inverse); border-color: var(--ink-primary); font-weight: 600; }
  .cmtm .msg { margin-top: 6px; color: var(--ink-muted); font-size: 11.5px; }
  /* Lot F-3 (10/11) : format d'insertion Word d'un bloc retenu — Image | Tableau | Les deux (menu Comité et onglet 04 de CLT & Mandats) */
  .cmtmode { display: inline-flex; flex: none; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; vertical-align: middle; }
  .cmtm .it .cmtmode { display: flex; width: max-content; margin-top: 3px; }
  .cmtm .it .cmtmode button, .cmtmode button[data-mode] { padding: 2px 7px; margin: 0; border: 0; border-left: 1px solid var(--border-subtle); border-radius: 0; cursor: pointer;
    background: var(--bg-surface); color: var(--ink-secondary); font: 500 10.5px/1.3 var(--font-sans); }
  .cmtm .it .cmtmode button:first-child, .cmtmode button[data-mode]:first-child { border-left: 0; }
  .cmtm .it .cmtmode button:hover:not(:disabled), .cmtmode button[data-mode]:hover:not(:disabled) { color: var(--ink-primary); background: var(--bg-hover); }
  .cmtm .it .cmtmode button.on, .cmtmode button[data-mode].on { background: var(--ink-primary); color: var(--ink-inverse); font-weight: 600; }
  .cmtm .it .cmtmode button:disabled, .cmtmode button[data-mode]:disabled { opacity: .4; cursor: not-allowed; }

  /* help.js : bouton Mode Aide (intégré au bandeau) et bulle */
  #fhHelpBtn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; cursor: pointer; white-space: nowrap; background: var(--bg-surface); color: var(--ink-secondary);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: 500 11.5px/1.2 var(--font-sans); }
  #fhHelpBtn:hover { color: var(--ink-primary); border-color: var(--border-active); background: var(--bg-hover); }
  #fhHelpBtn.on { color: var(--ink-primary); border-color: var(--fidia-accent); background: var(--fidia-accent-soft); }
  /* Mode Aide actif : pastille au lieu d'un libellé élargi (« Aide activée » retiré, Lot D). */
  #fhHelpBtn .fh-dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: var(--fidia-accent); }
  #fhHelpBtn.on .fh-dot { display: inline-block; }
  #fhHelpBtn.fh-float { position: fixed; right: 14px; bottom: 14px; z-index: 60; }
  body.fh-help [data-help] { text-decoration: underline dotted var(--fidia-accent) 1.5px; text-underline-offset: 3px; cursor: help; }
  /* Pas de pointillé sur la barre supérieure (navigation et outils) : la bulle reste disponible au survol. */
  body.fh-help .fh-topbar [data-help], body.fh-help .fh-topbar [data-help] *, body.fh-help .fh-spaces a { text-decoration: none; }
  /* Lot D-bis : fenêtres ?embed=1 (barre compacte) — pas de pointillé orange en mode Aide, info-bulle conservée au survol. */
  body.embed.fh-help [data-help] { text-decoration: none; }
  /* Lot D-2 (11/11) : l'infobulle d'aide passe au-dessus du tiroir Hari Seldon (900) et de sa visionneuse (901). */
  /* Lot S-3d (15/11) : bulle interactive (on peut y entrer pour déplier l'accordéon Expert), défilement interne, bornée à l'écran (390 px). */
  #fhTip { position: fixed; z-index: var(--z-help-top, 1000); max-height: calc(100vh - 16px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; display: none;
    width: max-content; max-width: min(400px, calc(100vw - 16px)); box-sizing: border-box; padding: 10px 12px; pointer-events: auto; overflow-wrap: anywhere;
    background: var(--bg-surface); color: var(--ink-primary); border: 1px solid var(--border-strong); border-left: 3px solid var(--fidia-accent); border-radius: var(--radius);
    font: 12px/1.45 var(--font-sans); }
  #fhTip b.t { display: block; margin-bottom: 5px; font: 600 13px/1.2 var(--font-serif); color: var(--ink-primary); }
  #fhTip p { margin: 4px 0; color: var(--ink-secondary); }
  #fhTip p i { font-style: normal; font-weight: 600; color: var(--fidia-accent); }
  /* Lot S-3d : gabarit à 2 niveaux — Niveau 1 visible (En clair, Sens, 3 cas), Niveau 2 replié (Profil expert). */
  #fhTip .help-l1 p { color: var(--ink-primary); }
  #fhTip .help-sens b { font-weight: 600; color: var(--ink-primary); }
  #fhTip ul.help-cas { margin: 4px 0 6px; padding: 0 0 0 14px; color: var(--ink-primary); }
  #fhTip ul.help-cas li { margin: 3px 0; }
  #fhTip ul.help-cas li i { font-style: normal; font-weight: 600; }
  #fhTip ul.help-cas li.fav i { color: var(--pos, #15803d); }
  #fhTip ul.help-cas li.neu i { color: var(--ink-secondary); }
  #fhTip ul.help-cas li.vig i { color: var(--neg, #b91c1c); }
  #fhTip details.help-expert { margin-top: 6px; border-top: 1px solid var(--border-subtle, var(--border-strong)); padding-top: 5px; }
  #fhTip details.help-expert > summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--ink-secondary); padding: 3px 0; min-height: 24px; }
  #fhTip details.help-expert > summary::-webkit-details-marker { display: none; }
  #fhTip details.help-expert[open] > summary { color: var(--ink-primary); }
  #fhTip details.help-expert p { font-size: 11.5px; }
  #fhTip.pin { padding-right: 30px; }
  #fhTip .fh-tip-x { position: absolute; top: 4px; right: 6px; border: 0; background: none; font: 600 16px/1 var(--font-sans); color: var(--ink-secondary); cursor: pointer; padding: 4px 6px; }
  /* Lot F (10/11) : message d'accueil du mode Aide (help.js), une fois par session, sous la Topbar à droite. */
  #fhHelpToast { position: fixed; right: 16px; z-index: var(--z-tip); width: min(340px, calc(100vw - 32px)); padding: 10px 30px 10px 12px;
    background: var(--bg-surface); color: var(--ink-primary); border: 1px solid var(--border-strong); border-radius: var(--radius);
    box-shadow: inset 0 2px 0 var(--fidia-accent); font: 400 12.5px/1.45 var(--font-sans); opacity: 0; transform: translateY(-4px); transition: opacity .18s, transform .18s; }
  #fhHelpToast.show { opacity: 1; transform: none; }
  #fhHelpToast b { display: block; font: 600 12.5px/1.3 var(--font-sans); }
  #fhHelpToast p { margin: 3px 0 8px; color: var(--ink-secondary); }
  #fhHelpToast .act { display: flex; justify-content: flex-end; gap: 6px; }
  #fhHelpToast .act button { padding: 3px 9px; cursor: pointer; font: 500 11.5px/1.2 var(--font-sans); color: var(--ink-secondary); background: transparent; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  #fhHelpToast .act button:hover { color: var(--ink-primary); background: var(--bg-hover); }
  #fhHelpToast .act button.pri { color: var(--ink-primary); border-color: var(--fidia-accent); }
  #fhHelpToast .x { position: absolute; top: 4px; right: 6px; padding: 0 4px; cursor: pointer; font: 400 16px/1 var(--font-sans); color: var(--ink-muted); background: none; border: 0; }
  #fhHelpToast .x:hover { color: var(--ink-primary); }
  /* Lot F (10/11) : barres d'export FidiaExport (fidia-theme.js) — CSV · JSON · PNG devant chaque tableau, PNG devant chaque graphique. */
  .fx-bar { display: flex; justify-content: flex-end; gap: 4px; margin: 2px 0 4px; }
  .fx-bar.fx-inline { display: inline-flex; margin: 0 4px 0 auto; }
  .fx-bar button { padding: 1px 6px; cursor: pointer; font: 600 9.5px/1.45 var(--font-sans); letter-spacing: .06em; color: var(--ink-muted);
    background: transparent; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
  .fx-bar button:hover { color: var(--ink-primary); border-color: var(--border-active); background: var(--bg-hover); }
  .fx-bar button:focus-visible { outline: 1px solid var(--fidia-accent); outline-offset: 1px; }
  .fx-bar button.fx-err { color: var(--status-down, #A2343A); border-color: currentColor; }
  /* Lot F-2 (10/11) : sobriété — barres à 0,25 au repos, à 1 au survol / focus du bloc hôte (.fx-host : carte, .tw, .vbox, volet)
     ou du tableau / graphique qui suit ; toujours à 1 dans la fenêtre #gw, la barre du Scanner (.scbar), sur écran tactile et au clavier. */
  .fx-bar { opacity: .25; transition: opacity .15s ease; }
  .fx-host:hover .fx-bar, .fx-host:focus-within .fx-bar, .fx-bar:hover, .fx-bar:focus-within, .fx-bar:has(+ :hover), .fx-bar:has(+ :focus-within),
  #gw .fx-bar, .scbar .fx-bar { opacity: 1; }
  @media (hover: none) { .fx-bar { opacity: 1; } }
  @media print { .fx-bar { display: none !important; } }
  /* Charts (index.html, ?embed=1 compris) : barre posée en haut à droite du graphique principal, à gauche de l'échelle de prix. */
  .fx-bar.fx-ix { position: absolute; top: 4px; right: 74px; z-index: 6; margin: 0; padding: 1px; border-radius: var(--radius-sm); background: var(--bg-surface); }
  .fx-bar.fx-gw { display: inline-flex; margin: 0 0 0 auto; }
  /* Lot F (10/11) : fenêtres, menus et modales déplaçables par leur en-tête (fidia-theme.js) ; double-clic = position d'origine. */
  :is(.menu > h4, .modal .box > .hd, .modal .box > h3, .dlg > .dhead, .fh-dlg > .fh-dlg-head) { cursor: move; user-select: none; touch-action: none; }
  .fh-dragging { user-select: none; }

  /* copilot.js : bouton et fenêtre flottante */
  #fcopBtn { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 5px 9px; cursor: pointer; white-space: nowrap; background: var(--bg-surface); color: var(--ink-secondary);
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: 500 11.5px/1.2 var(--font-sans); }
  #fcopBtn:hover { color: var(--ink-primary); border-color: var(--border-active); background: var(--bg-hover); }
  #fcopBtn.on { color: var(--ink-primary); border-color: var(--fidia-accent); background: var(--fidia-accent-soft); }
  #fcopSlotAuto { margin-left: auto; display: inline-flex; flex: none; align-self: center; padding-left: 8px; }
  #fcop { position: fixed; z-index: var(--z-copilot); right: 16px; bottom: 52px; width: 460px; height: 560px; min-width: min(380px, calc(100vw - 8px)); min-height: 300px;
    max-width: max(380px, 75vw); max-height: calc(100dvh - 8px); resize: both; overflow: hidden; display: none; flex-direction: column;
    background: var(--bg-surface); color: var(--ink-primary); border: 1px solid var(--border-strong); box-shadow: inset 0 2px 0 var(--fidia-accent); border-radius: var(--radius);
    font: 13px/1.45 var(--font-sans); }
  #fcop.open { display: flex; }
  #fcopHead { flex: none; padding: 8px 8px 6px 12px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-raised); cursor: move; user-select: none; touch-action: none; }
  #fcopRow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
  #fcopRow b { font: 600 15px/1.2 var(--font-serif); color: var(--ink-primary); }
  #fcopRow b .fcopSub { font: 400 12px/1.2 var(--font-sans); color: var(--ink-muted); }      /* Lot J-5 */
  /* Lot L-2 (12/11/2026) : mention « Paramétrage en cours » — ambre sémantique (--sem-warn : #9A5B13 en Clair, #D4A359 en Sombre), contour fin, fond transparent. */
  .fcopBeta { display: inline-block; padding: 1px 7px; font: 500 10.5px/1.5 var(--font-sans); letter-spacing: .01em; color: var(--sem-warn); border: 1px solid var(--sem-warn); border-radius: 999px; background: transparent; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .fcopWelcome .fcopBeta { margin: 0 0 8px; white-space: normal; }
  .fcopWelcome { margin: 4px 2px 10px; padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-raised); font-size: 12.5px; line-height: 1.5; color: var(--ink-secondary, var(--ink-primary)); }
  .fcopWelcome b { display: block; font: 600 13.5px/1.3 var(--font-serif); color: var(--ink-primary); margin-bottom: 4px; }
  .fcopWelcome p { margin: 0 0 6px; } .fcopWelcome ul { margin: 0; padding-left: 18px; } .fcopWelcome li { margin: 2px 0; }
  #fcopEngineRow .fcopEngLbl { flex: none; font-weight: 600; color: var(--ink-primary); }
  #fcopEngineRow { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11px; color: var(--ink-muted); }
  #fcopEngine { max-width: min(440px, 100%); min-width: 0; text-overflow: ellipsis; padding: 1px 3px; font: 400 11px var(--font-sans); color: var(--ink-primary); background: var(--bg-sunken); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  #fcopGauge { font-size: 11px; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
  #fcopReset { margin-left: auto; padding: 1px 6px; cursor: pointer; font: 400 11px var(--font-sans); color: var(--ink-muted); background: transparent; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  #fcopReset:hover, #fcopX:hover { color: var(--ink-primary); }
  #fcopX { border: 0; background: transparent; padding: 2px 6px; cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink-muted); }
  #fcopBadges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
  #fcopBadges:empty { display: none; }
  #fcopBadges span { padding: 0 4px; font-size: 10px; color: var(--ink-secondary); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  /* Lot J-2 : posture, badges des outils, nombres non rattachés, actions Rédacteur Studio */
  #fcopMode { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
  #fcopMode button { padding: 2px 8px; cursor: pointer; font: 500 11px var(--font-sans); color: var(--ink-muted); background: transparent; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  #fcopMode button:hover { color: var(--ink-primary); }
  #fcopMode button.on { color: var(--ink-primary); border-color: var(--fidia-accent); background: var(--fidia-accent-soft); }
  #fcopBadges span.nw { color: var(--ink-primary); border-color: var(--border-active); }
  .fcopUnv { margin-top: 6px; padding: 4px 7px; font-size: 11px; line-height: 1.35; color: var(--sem-warn); border: 1px solid var(--sem-warn); border-left-width: 3px; border-radius: var(--radius-sm); background: transparent; }
  .fcopActs { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
  .fcopActs button { padding: 1px 7px; cursor: pointer; font: 500 11px var(--font-sans); color: var(--ink-secondary); background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  .fcopActs button:hover { color: var(--ink-primary); border-color: var(--border-active); }
  .fcopActs span { font-size: 11px; color: var(--ink-muted); }
  #fcopLog { flex: 1; min-height: 0; overflow: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 8px; }
  .fcopM { padding: 6px 9px; border-radius: var(--radius); overflow-wrap: anywhere; }
  .fcopM.user { align-self: flex-end; max-width: 88%; background: var(--bg-raised); white-space: pre-wrap; }
  .fcopM.assistant { background: var(--bg-sunken); border: 1px solid var(--border-subtle); }
  .fcopM.err { color: var(--sem-down); border: 1px solid var(--sem-down); }
  .fcopM p { margin: 0 0 6px; } .fcopM p:last-child { margin: 0; }
  .fcopM ul { margin: 0 0 6px; padding-left: 18px; }
  .fcopM h5 { margin: 6px 0 3px; font: 600 13.5px/1.25 var(--font-serif); color: var(--ink-primary); }
  /* horizon-hari-atlas-nav-links-1.0 : liens internes d'Hari Seldon, sobres, à l'accent Fidia (même onglet, session conservée) */
  .fcopM a.fcopLink { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-color: var(--fidia-accent-border); text-underline-offset: 2px; }
  .fcopM a.fcopLink:hover, .fcopM a.fcopLink:focus-visible { text-decoration-color: var(--accent); }
  .fcopM code { padding: 0 3px; font-size: 12px; background: var(--bg-raised); border-radius: var(--radius-sm); }
  .fcopM .tw { overflow: auto; margin-bottom: 6px; }
  .fcopM table { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums lining-nums; }
  .fcopM td, .fcopM th { padding: 3px 8px; text-align: left; white-space: nowrap; border: 1px solid var(--border-strong); }
  /* Lot J-4a : tables GFM rendues en <thead>/<tbody>, en-tête distinct, chiffres alignés à droite */
  .fcopM thead th { font-weight: 600; color: var(--ink-primary); background: var(--bg-raised); border-bottom-width: 2px; }
  .fcopM tbody tr:nth-child(even) td { background: var(--bg-surface); }
  .fcopM td.n, .fcopM th.n { text-align: right; }
  #fcopStop { flex: none; padding: 0 12px; cursor: pointer; font: 600 12px var(--font-sans); color: var(--ink-primary); background: var(--bg-surface); border: 1px solid var(--border-active); border-radius: var(--radius-sm); }
  #fcopStop:hover { background: var(--bg-hover); }
  #fcopStop[hidden], #fcopSend[hidden] { display: none; }
  .fcopM.wait { color: var(--ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
  .fcopM.stopped { color: var(--ink-muted); font-size: 12px; font-style: italic; background: transparent; border: 1px dashed var(--border-strong); }
  .fcopNote { margin-top: 4px; font-size: 11px; color: var(--ink-muted); }
  /* Lot J-4b (11/11) : poignée gauche, ⤢ Élargir / Standard, profil, graphiques du Copilote et visionneuse */
  #fcopGrip { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; cursor: ew-resize; touch-action: none; z-index: 1; }
  #fcopGrip:hover, #fcop.resizing #fcopGrip { background: var(--border-active); }
  #fcop.resizing { user-select: none; }
  /* Lot J-6a : poignée de coin haut gauche (largeur + hauteur), symétrique de la poignée native bas droite. */
  #fcopGripTL { position: absolute; left: 0; top: 0; width: 14px; height: 14px; cursor: nwse-resize; touch-action: none; z-index: 2;
    background: linear-gradient(135deg, var(--border-strong) 0 2px, transparent 2px 5px, var(--border-strong) 5px 6px, transparent 6px); border-top-left-radius: var(--radius-sm); }
  #fcopGripTL:hover, #fcop.resizing #fcopGripTL { background: var(--border-active); }
  #fcopWide { border: 1px solid var(--border-strong); background: transparent; padding: 0 5px; cursor: pointer; font-size: 13px; line-height: 18px; color: var(--ink-muted); border-radius: var(--radius-sm); }
  #fcopWide:hover, #fcopWide[aria-pressed="true"] { color: var(--ink-primary); border-color: var(--border-active); }
  #fcopProfile { max-width: 170px; margin-left: 4px; padding: 1px 3px; font: 400 11px var(--font-sans); color: var(--ink-primary); background: var(--bg-sunken); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  #fcopEngineRow label[for="fcopProfile"] { margin-left: 8px; }
  .fcopChart { margin: 8px 0 2px; }
  .fcopChart img { display: block; width: 100%; height: auto; cursor: zoom-in; background: #FFFFFF; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
  .fcopChart figcaption { margin-top: 3px; font-size: 11px; color: var(--ink-muted); }
  /* Lot D-2 (11/11) : graphique Lightweight Charts dans la bulle et en modale large */
  .fcopChart figcaption.t { margin: 0 0 3px; font: 600 12px var(--font-sans); color: var(--ink-primary); cursor: zoom-in; }
  .fcopLw { position: relative; width: 100%; height: 250px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); background: var(--bg-surface); cursor: crosshair; }
  .fcopLw.big { height: min(68vh, 720px); }
  .fcopLeg { display: flex; flex-wrap: wrap; gap: 4px 12px; min-height: 16px; margin: 0 0 3px; font-size: 11px; color: var(--ink-secondary); }
  .fcopLeg span { display: inline-flex; align-items: center; gap: 4px; }
  .fcopLeg span.d { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
  .fcopLeg i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; }
  .fcopLeg b { font-weight: 600; color: var(--ink-primary); font-variant-numeric: tabular-nums; }
  .fcopZoomBox { display: flex; flex-direction: column; gap: 4px; width: min(1280px, 94vw); padding: 14px 16px; cursor: default; color: var(--ink-primary);
    background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--radius-md, 8px); box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
  .fcopZoomBox > small { color: var(--ink-muted); font-size: 11px; }
  .fcopActs a { padding: 1px 7px; font: 500 11px var(--font-sans); color: var(--ink-secondary); text-decoration: none; background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  .fcopActs a:hover { color: var(--ink-primary); border-color: var(--border-active); }
  .fcopActs button:disabled { cursor: default; color: var(--ink-muted); }
  #fcopZoom { position: fixed; inset: 0; z-index: calc(var(--z-copilot) + 1); display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(11, 14, 20, .78); cursor: zoom-out; }
  #fcopZoom img { max-width: 100%; max-height: 100%; background: #FFFFFF; border-radius: var(--radius); }
  #fcopZoom button { position: absolute; top: 12px; right: 16px; border: 0; background: transparent; color: #FFFFFF; font-size: 26px; cursor: pointer; }
  /* hari-eq-snapshot-1.0 (Lot H-EQ-1, 24/11) : valeurs citées par Hari (puce), carte au survol, modale Fiche Titre & Graphique. */
  .fcopM .fh-eq-chip { all: unset; display: inline; cursor: pointer; color: inherit; font: inherit; border-bottom: 1px dotted var(--fidia-accent); border-radius: 2px; padding: 0 1px; transition: background-color .12s; }
  .fcopM .fh-eq-chip:hover, .fcopM .fh-eq-chip:focus-visible { background: var(--fidia-accent-soft); outline: none; }
  .fcopM .fh-eq-chip:focus-visible { box-shadow: 0 0 0 1px var(--fidia-accent-border); }
  #fhEqCard { position: fixed; z-index: calc(var(--z-copilot) + 3); box-sizing: border-box; padding: 10px 12px 8px; background: var(--bg-raised); color: var(--ink-primary); border: 1px solid var(--border-strong); border-top: 2px solid var(--fidia-accent); border-radius: var(--radius); font: 12px/1.35 var(--font-sans); cursor: pointer; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
  #fhEqCard[hidden] { display: none; }
  #fhEqCard .hd b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #fhEqCard .hd .tk { color: var(--ink-muted); font-weight: 600; }
  #fhEqCard .px { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin: 3px 0 6px; font-variant-numeric: tabular-nums; }
  #fhEqCard .up { color: var(--sem-up); } #fhEqCard .dn { color: var(--sem-down); }
  #fhEqCard .mm { padding: 0 5px; border: 1px solid var(--border-subtle); border-radius: 3px; font-size: 11px; }
  #fhEqCard .rad { padding: 0 5px; border: 1px solid var(--fidia-accent-border); border-radius: 3px; font-size: 11px; color: var(--ink-secondary); }
  #fhEqCard canvas.sp { display: block; width: 100%; height: 120px; }
  #fhEqCard .lg { display: flex; align-items: center; gap: 4px; margin: 2px 0 6px; color: var(--ink-muted); font-size: 10.5px; }
  #fhEqCard .lg i { display: inline-block; width: 12px; height: 0; border-top: 2px solid var(--fidia-accent); margin-left: 6px; } #fhEqCard .lg i:first-child { margin-left: 0; }
  #fhEqCard .lg i.m2 { border-top-color: var(--viz-blue); } #fhEqCard .lg i.m5 { border-top: 1px dashed var(--ink-muted); }
  #fhEqCard .lg em { margin-left: auto; font-style: normal; }
  #fhEqCard .na { padding: 18px 0; color: var(--ink-muted); }
  #fhEqCard .gr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 8px; padding-top: 6px; border-top: 1px solid var(--border-subtle); font-variant-numeric: tabular-nums; }
  #fhEqCard .gr span { display: flex; flex-direction: column; } #fhEqCard .gr .wide { grid-column: span 3; }
  #fhEqCard .gr small { color: var(--ink-muted); font-size: 10.5px; }
  #fhEqCard .ft { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; color: var(--ink-muted); font-size: 10.5px; font-style: italic; }
  #fhEqCard .ft .i { all: unset; cursor: help; font-style: normal; color: var(--ink-muted); }
  /* eq-bond-docx-1.0 (24/11) : croissance BPA fiable, bandeau « Action vs Dette » (has_bonds seulement), pied d'actions */
  #fhEqCard .eg { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--border-subtle); font-variant-numeric: tabular-nums; }
  #fhEqCard .eg small { flex: none; color: var(--ink-muted); font-size: 10.5px; white-space: nowrap; } #fhEqCard .eg b { flex: none; white-space: nowrap; }
  #fhEqCard .eg em { flex: 1 1 auto; min-width: 0; text-align: right; color: var(--ink-muted); font-size: 10px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #fhEqCard .bd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 6px; padding: 5px 7px; background: var(--bg-sunken); border: 1px solid var(--border-subtle); border-left: 2px solid var(--viz-blue); border-radius: 3px; font-size: 11px; font-variant-numeric: tabular-nums; }
  #fhEqCard .bd small { flex-basis: 100%; color: var(--ink-muted); font-size: 10.5px; font-weight: 600; } #fhEqCard .bd .wide { flex-basis: 100%; color: var(--ink-muted); }
  #fhEqCard .ac { display: flex; align-items: center; gap: 6px; margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--border-subtle); }
  #fhEqCard .ac > button:not(.i), #fhEqCard .ac > a { flex: none; padding: 3px 7px; border: 1px solid var(--border-subtle); border-radius: 3px; background: transparent; color: var(--ink-secondary); font: 600 11px/1.2 var(--font-sans); text-decoration: none; cursor: pointer; }
  #fhEqCard .ac > button:not(.i):hover, #fhEqCard .ac > a:hover { color: var(--ink-primary); border-color: var(--border-active); }
  #fhEqCard .ac .i { all: unset; margin-left: auto; cursor: help; color: var(--ink-muted); font-size: 11px; }
  #fhEqModal .hd .dx { background: transparent; cursor: pointer; font: 600 12px/1 var(--font-sans); }
  #fhEqModal { position: fixed; inset: 0; z-index: calc(var(--z-copilot) + 4); display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg-backdrop); }
  #fhEqModal .box { display: flex; flex-direction: column; width: min(1280px, 100%); height: min(92vh, 100%); background: var(--bg-canvas); border: 1px solid var(--border-strong); border-top: 2px solid var(--fidia-accent); border-radius: var(--radius); overflow: hidden; }
  #fhEqModal .hd { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-surface); }
  #fhEqModal .hd b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
  #fhEqModal .hd .nw { flex: none; color: var(--ink-secondary); font-size: 12px; text-decoration: none; border: 1px solid var(--border-subtle); border-radius: 3px; padding: 3px 8px; }
  #fhEqModal .hd .nw:hover { color: var(--ink-primary); border-color: var(--border-active); }
  #fhEqModal .hd .x { flex: none; border: 1px solid var(--border-subtle); border-radius: 3px; background: transparent; color: var(--ink-primary); font: 600 12px/1 var(--font-sans); padding: 5px 9px; cursor: pointer; }
  #fhEqModal iframe { flex: 1 1 auto; width: 100%; border: 0; background: var(--bg-canvas); }
  @media (max-width: 640px) { #fhEqModal { padding: 0; } #fhEqModal .box { height: 100%; border-radius: 0; } #fhEqModal .hd .nw { font-size: 11px; padding: 3px 5px; } }
  #fcopIn { flex: none; display: flex; gap: 6px; padding: 8px 18px 12px 10px; border-top: 1px solid var(--border-subtle); }
  #fcopQ { flex: 1; min-width: 0; resize: none; padding: 5px 7px; font: 400 13px/1.4 var(--font-sans); color: var(--ink-primary); background: var(--bg-sunken); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  #fcopSend { flex: none; padding: 0 12px; cursor: pointer; font: 600 12px var(--font-sans); color: var(--ink-inverse); background: var(--ink-primary); border: 1px solid var(--ink-primary); border-radius: var(--radius-sm); }
  #fcopSend:disabled { opacity: .5; cursor: default; }
  /* Lot D-bis (10/11) : compaction des outils de la Topbar ≤ 1366 px, déclarée en dernier (couche fh.widgets) pour l'emporter sur
     .tbtn (fh.components), #fhHelpBtn / #fcopBtn / .cmtc (fh.widgets) et .fh-pill (fh.components). Auparavant placée dans fh.shell,
     elle était sans effet. 6 espaces + badge Laboratoire + outils : environ 1 245 px estimés à 1280 px (mesure de police, non vérifiée en navigateur). */
  @media (max-width: 1366px) {
    .fh-top-tools :is(.tbtn, #fhHelpBtn, #fcopBtn), .fh-top-tools .cmtc > button { padding-left: 7px; padding-right: 7px; }
    .fh-top-tools .fh-pill button { padding: 5px 8px; }
  }
  /* Lot J-6b (11/11) : libellé « Hari S. réfléchit », ⚑ Remarque (file Fidia Brain), bouton « ? Guide » et modale d'accueil */
  .fcopThink { color: var(--ink-secondary, var(--ink-primary)); font-weight: 600; }
  .fcopThink i { display: inline-block; width: 1.4em; text-align: left; font-style: normal; }
  .fcopThink i::after { content: '…'; animation: fcopDots 1.2s steps(4, end) infinite; display: inline-block; overflow: hidden; vertical-align: bottom; width: 0; }
  @keyframes fcopDots { to { width: 1.2em; } }
  @media (prefers-reduced-motion: reduce) { .fcopThink i::after { animation: none; width: auto; } }
  #fcopRemBtn { border: 1px solid var(--border-strong); background: transparent; padding: 0 6px; cursor: pointer; font: 400 11.5px/18px var(--font-sans); color: var(--ink-muted); border-radius: var(--radius-sm); white-space: nowrap; }
  #fcopRemBtn:hover { color: var(--ink-primary); border-color: var(--border-active); }
  #fcopRem { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 8px 18px 8px 10px; border-top: 1px solid var(--border-subtle); background: var(--bg-raised); font-size: 12px; }
  #fcopRem[hidden] { display: none; }
  #fcopRem b { font: 600 12.5px var(--font-sans); color: var(--ink-primary); }
  #fcopRem small { color: var(--ink-muted); font-size: 11px; }
  #fcopRem .r { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
  #fcopRem textarea, #fcopRem select { font: 400 12.5px/1.4 var(--font-sans); color: var(--ink-primary); background: var(--bg-sunken); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 4px 6px; }
  #fcopRem textarea { resize: vertical; min-height: 54px; }
  #fcopRem button { padding: 3px 10px; cursor: pointer; font: 600 12px var(--font-sans); color: var(--ink-primary); background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  #fcopRem #fcopRemSend { color: var(--ink-inverse); background: var(--ink-primary); border-color: var(--ink-primary); }
  #fcopRemSend:disabled { opacity: .5; cursor: default; }
  #fhGuideBtn { display: inline-flex; align-items: center; flex: none; padding: 5px 9px; cursor: pointer; white-space: nowrap; font: 500 12.5px var(--font-sans); background: var(--bg-surface); color: var(--ink-secondary); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  #fhGuideBtn:hover { color: var(--ink-primary); border-color: var(--border-active); background: var(--bg-hover); }
  #fhGuide { position: fixed; inset: 0; z-index: calc(var(--z-copilot) + 2); display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(11, 14, 20, .62); }
  #fhGuide .fhGuideBox { position: relative; width: min(760px, 100%); max-height: calc(100vh - 48px); overflow: auto; padding: 22px 26px 18px; background: var(--bg-surface); color: var(--ink-primary); border: 1px solid var(--border-strong); border-radius: var(--radius); font: 400 13.5px/1.55 var(--font-sans); }
  #fhGuide h2 { margin: 0 0 10px; font: 600 20px/1.25 var(--font-serif); }
  #fhGuide h3 { margin: 14px 0 6px; font: 600 13px var(--font-sans); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
  #fhGuide p { margin: 0 0 8px; }
  #fhGuide ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
  #fhGuide li { padding: 6px 8px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); }
  #fhGuide li.on { border-color: var(--border-active); background: var(--bg-raised); }
  #fhGuide li a { display: block; font-weight: 600; color: var(--ink-primary); text-decoration: none; }
  #fhGuide li a:hover { text-decoration: underline; }
  #fhGuide li span { display: block; font-size: 12px; line-height: 1.4; color: var(--ink-muted); }
  #fhGuide .hint { margin-top: 12px; font-size: 12.5px; color: var(--ink-secondary, var(--ink-primary)); }
  #fhGuide .acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
  #fhGuide .acts button { padding: 6px 14px; cursor: pointer; font: 600 12.5px var(--font-sans); color: var(--ink-primary); background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
  #fhGuide .acts button.pri { color: var(--ink-inverse); background: var(--ink-primary); border-color: var(--ink-primary); }
  #fhGuide .x { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink-muted); }
}

/* ============================================================== 6. Filet de sécurité LightweightCharts (hors couche)
   Le lien d'attribution TradingView (a#tv-attr-logo) est désactivé par FidiaUI.chartOptions() (layout.attributionLogo:false) ;
   cette règle le masque si un graphique échappe à l'enveloppe. lightweight-charts.js n'est pas modifié. */
a#tv-attr-logo { display: none !important; pointer-events: none !important; }

/* Lot I-1b (11/11/2026) : menu « Outils ▾ » de la Topbar (composant FidiaNav de fidia-theme.js), à droite des 7 espaces d'analyse.
   Compact : même hauteur et même typographie que les espaces ; menu sous le bouton, clavier (Échap, flèches), clic extérieur. */
@layer fh.shell {
  .fh-tools { position: relative; display: flex; align-items: stretch; flex: none; height: var(--topbar-h); border-left: 1px solid var(--border-subtle); }
  .fh-tools-btn { display: inline-flex; align-items: center; gap: 4px; height: 100%; padding: 0 9px; margin: 0; border: 0; background: transparent; cursor: pointer;
    color: var(--ink-muted); font: 500 12px/1 var(--font-sans); white-space: nowrap; transition: color .12s, background-color .12s; }
  .fh-tools-btn:hover, .fh-tools-btn[aria-expanded="true"] { color: var(--ink-primary); background: var(--bg-hover); }
  .fh-tools-btn.on { color: var(--ink-primary); font-weight: 600; box-shadow: inset 0 -2px 0 var(--fidia-accent); }
  .fh-tools-btn:focus-visible, .fh-tools-menu a:focus-visible { outline: 2px solid var(--fidia-accent); outline-offset: -2px; }
  .fh-tools-btn .car { font-size: 10px; line-height: 1; }
  .fh-tools-n { min-width: 16px; padding: 1px 4px; border-radius: 8px; background: var(--fidia-accent); color: #FFFFFF; font: 600 10px/14px var(--font-sans); text-align: center; font-variant-numeric: tabular-nums; }
  .fh-tools-menu { position: absolute; left: 0; top: 100%; z-index: var(--z-menu); min-width: 320px; padding: 6px; background: var(--bg-surface); color: var(--ink-primary);
    border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: inset 0 2px 0 var(--fidia-accent), 0 8px 24px rgba(17, 20, 28, .12); }
  .fh-tools-menu[hidden] { display: none; }
  .fh-tools-menu a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--ink-primary); text-decoration: none; }
  .fh-tools-menu a:hover, .fh-tools-menu a:focus { background: var(--bg-hover); }
  .fh-tools-menu a[aria-current="page"] { background: var(--bg-selected); }
  .fh-tools-menu a b { font: 600 12.5px/1.3 var(--font-sans); }
  .fh-tools-menu a small { grid-column: 1 / -1; color: var(--ink-muted); font: 400 11.5px/1.35 var(--font-sans); }
  .fh-tools-menu a .fh-tools-n { align-self: center; }
  @media (max-width: 1366px) { .fh-tools-btn { padding: 0 6px; } }
  @media print { .fh-tools { display: none !important; } }
}

/* Lot P-3 (13/11) : paliers de compaction de la Topbar desktop posés par fidia-theme.js (fitTopbar) tant que les espaces débordent. */
@media (min-width: 768.02px) {
  .fh-topbar.fh-fit1 .fh-top-tools :is(#cmtBtn, #fhHelpBtn, #fcopBtn) > svg, .fh-topbar.fh-fit1 #fhAcctBtn .r, .fh-topbar.fh-fit1 #fhAcctBtn > svg { display: none; }
  .fh-topbar.fh-fit1 .fh-top-tools { gap: 3px; }
  .fh-topbar.fh-fit2 #fhAcctBtn > span:not(.i):not(.car) { display: none; }
  .fh-topbar.fh-fit2 #fhAcctBtn .i { display: inline; font-weight: 600; letter-spacing: .02em; }
  .fh-topbar.fh-fit2 .fh-top-tools .fh-pill.fh-theme button { font-size: 0; padding: 4px 7px; }
  .fh-topbar.fh-fit2 .fh-top-tools .fh-pill.fh-theme button[data-t="light"]::before { content: "☀"; font-size: 13px; }
  .fh-topbar.fh-fit2 .fh-top-tools .fh-pill.fh-theme button[data-t="dark"]::before { content: "☾"; font-size: 13px; }
  .fh-topbar.fh-fit2 .fh-top-tools #fhGuideBtn { font-size: 0; }
  .fh-topbar.fh-fit2 .fh-top-tools #fhGuideBtn::before { content: "?"; font: 600 13px/1 var(--font-sans); }
  .fh-topbar.fh-fit3 .fh-spaces a > svg { display: none; }
  .fh-topbar.fh-fit3 .fh-spaces a { padding: 0 6px; }
  .fh-topbar.fh-fit3 { gap: 6px; }
  .fh-topbar.fh-fit3 .fh-brand .f-sub { display: none; }
  .fh-topbar.fh-fit4 .fh-spaces a > svg { display: inline; }
  .fh-topbar.fh-fit4 .fh-spaces a:not(.on):not([aria-current="page"]) > span { display: none; }
  .fh-topbar .fh-spaces { flex-shrink: 0; max-width: none; }
  .fh-topbar .fh-top-tools { min-width: 0; }
}

/* ============================================================== 7. Lot N-1 (12/11/2026) — Responsive Mobile (375 / 390 px) & Tablette (768 / 1024 px)
   Hors couche : l'emporte sur tout le socle. Seuils : ≤ 960 px (suffixe « · Architecte » masqué), ≤ 768 px (Topbar sur 2 rangées, onglets
   défilants au doigt, modales et tiroir Hari Seldon plein écran), ≤ 480 px (outils réduits à l'icône, badge du compte en initiales).
   Les menus de la Topbar passent en position fixe sous 768 px : le défilement horizontal des outils ne les rogne jamais. */
#fhAcctBtn .i { display: none; }
#fhAcctMenu #fhAcctTheme { display: none; }   /* Lot P-3 : visible sous 480 px seulement (voir plus bas) */
@media (max-width: 960px) {
  #fhAcctBtn .r { display: none; }
}
@media (max-width: 768px) {
  body { overflow-x: hidden; }   /* propagé au viewport (html laissé en visible) : l’en-tête collant reste collant */
  /* Topbar : rangée 1 = logo + Outils ▾ + outils compacts ; rangée 2 = onglets d'espaces pleine largeur, défilants au doigt. */
  .fh-topbar { height: auto; min-height: 0; flex-wrap: wrap; gap: 0 6px; padding: 0 8px; }
  .fh-topbar > .fh-brand { order: 0; height: 44px; align-items: center; padding-right: 8px; }
  .fh-topbar > .fh-tools { order: 1; height: 44px; border-left: 0; }
  /* Lot P-3 (13/11) : justify-content:flex-start + margin-left:auto sur le 1er outil (et non flex-end) : en cas de manque de place,
     le surplus déborde à DROITE et défile au doigt, au lieu de passer à gauche sous « Outils ▾ » (Comité recouvert à moitié). */
  .fh-topbar > .fh-top-tools { order: 2; flex: 1 1 0; min-width: 0; height: 44px; justify-content: flex-start; gap: 4px; overflow-x: auto; overflow-y: hidden;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .fh-topbar > .fh-top-tools > :first-child { margin-left: auto; }
  .fh-topbar > .fh-brand, .fh-topbar > .fh-tools { flex: none; }
  .fh-top-tools button, .fh-tools-btn { touch-action: manipulation; }
  .fh-topbar > .fh-top-tools::-webkit-scrollbar { display: none; }
  .fh-topbar > .fh-top-tools > * { flex: none; }
  .fh-topbar > .fh-spaces { order: 3; flex: 1 0 100%; width: 100%; height: 40px; padding: 0; border-top: 1px solid var(--border-subtle);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
  .fh-topbar > .fh-spaces::-webkit-scrollbar { display: none; }
  .fh-spaces a { padding: 0 10px; scroll-snap-align: start; }
  .fh-spaces a > svg { display: none; }
  .fh-spaces a:not(.on):not([aria-current="page"]) > span { display: inline; }
  .fh-tools-btn { padding: 0 6px; font-size: 11.5px; }
  .fh-tools-menu { position: fixed; left: 2vw; right: 2vw; top: 46px; min-width: 0; width: auto; max-height: 80dvh; overflow: auto; }
  /* Outils de droite au format compact (cible tactile ≥ 32 px de haut) */
  .fh-top-tools :is(.tbtn, #fhHelpBtn, #fcopBtn, #fhGuideBtn), .fh-top-tools .cmtc > button { min-height: 32px; padding: 0 7px; font-size: 11.5px; }
  .fh-top-tools .fh-pill button { padding: 6px 8px; font-size: 11px; }
  .cmtm { position: fixed; left: 2vw; right: 2vw; top: 46px; width: auto; max-width: 96vw; max-height: 80dvh; }
  #fhAcctMenu { position: fixed; left: 8px; right: 8px; top: 46px; min-width: 0; max-width: none; }   /* Lot P-3 : placé par FidiaFloat (body) */
  #fhAcctMenu button.it { min-height: 44px; font-size: 15px; }
  /* Modales : 96vw, 90dvh, × ≥ 36 px, champs à 16 px (aucun zoom automatique d'iOS Safari) */
  /* !important conservés : positions et tailles posées en ligne par le glisser-déposer (fidia-theme.js) et largeurs de page plus spécifiques */
  .modal { padding: 2dvh 2vw !important; align-items: flex-start; }
  .modal .box, .fh-dlg, .fh-dlg.xl, .dlg, #fhGuide .fhGuideBox, #fhPwdBox form { width: 96vw !important; max-width: 96vw !important; max-height: 90dvh !important; }
  .fh-dlg.xl { height: 90dvh; }
  .dlg { left: 2vw !important; right: auto !important; }
  #fhGuide { padding: 2dvh 2vw; }
  #fhGuide ul { grid-template-columns: 1fr; }
  #fhGuide .x, .modal .box .hd > button, #infoClose, #pkClose, .fh-dlg-head .x, .dlg .x, .fh-dlg [data-close], .dlg [data-close], #fcopX, #fcopZoom button, #paneX, .scbar #scanX {
    min-width: 36px; min-height: 36px; }
  :is(.modal, .fh-dlg, .dlg, #fhGuide, #fhPwdBox, #fcop, .menu, .cmtm) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea) { font-size: 16px; }
  #fhPwdBox form { padding: 16px; }
  #fhPwdBox .row button { min-height: 40px; padding: 0 14px; }
  .menu { max-width: 96vw; min-width: min(260px, 96vw); max-height: 80dvh; }
  /* Tiroir Hari Seldon plein écran (100vw × 100dvh, clavier virtuel compris) ; poignées de redimensionnement masquées.
     !important conservés : copilot.js pose left / top / width / height en ligne au déplacement et au redimensionnement. */
  #fcop { inset: 0 !important; left: 0 !important; top: 0 !important; right: 0 !important; bottom: 0 !important; width: 100vw !important; height: 100dvh !important;
    min-width: 0 !important; min-height: 0 !important; max-width: 100vw !important; max-height: 100dvh !important; resize: none !important; border-radius: 0; border: 0; }
  #fcopGrip, #fcopGripTL, #fcopWide { display: none; }
  #fcopHead { cursor: default; padding: 6px 6px 6px 10px; padding-top: max(6px, env(safe-area-inset-top)); }
  #fcopRow { flex-wrap: wrap; row-gap: 4px; }
  #fcopRow b .fcopSub { display: none; }
  #fcopBeta { order: 10; flex: 1 1 100%; max-width: 100%; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #fcopX { margin-left: auto; font-size: 22px; }
  #fcopIn { padding: 8px 8px max(8px, env(safe-area-inset-bottom)); }
  #fcopQ { font-size: 16px; }
  #fcopLog { overflow-x: hidden; }
  .fcopM { max-width: 100%; min-width: 0; }
  .fcopM .tw, .fcopM .fcopTbl { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fcopLw { height: 220px; }
  /* Pages de données : tableaux larges défilants dans leur conteneur, jamais d'élargissement du body */
  main, body.fh-obs main { max-width: 100vw; overflow-x: clip; }
  body.fh-obs main { padding: 12px 10px 48px; }
  body.fh-obs main > section { padding: 12px 10px; }
  /* Tableau large : défile dans sa propre boîte (display:block) ; exclus : graphiques Lightweight Charts (table interne) et tableau de suivi Charts (en-tête collant). */
  table:not(#scanT):not(.tv-lightweight-charts table) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  main :is(.tw, .twrap, .table-wrap, .tbl-wrap, .scroll-x) { max-width: 100%; overflow-x: auto; }
  main canvas, main svg, main img { max-width: 100%; }
  .fh-subbar { padding: 4px 8px; }
  .fh-anchors { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .fh-anchors::-webkit-scrollbar { display: none; }
  /* horizon-ux-ui-coherence-1.0 (28/11) : fondu de 22 px sur le bord où des espaces / onglets restent masqués (classes posées par
     fidia-theme.js selon la position de défilement) ; l'entrée active est ramenée dans la zone visible (FidiaReveal). */
  .fh-topbar > .fh-spaces.fh-scr, .fh-anchors.fh-scr { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); }
  .fh-topbar > .fh-spaces.fh-scl, .fh-anchors.fh-scl { -webkit-mask-image: linear-gradient(to right, transparent, #000 22px); mask-image: linear-gradient(to right, transparent, #000 22px); }
  .fh-topbar > .fh-spaces.fh-scl.fh-scr, .fh-anchors.fh-scl.fh-scr { -webkit-mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to right, transparent, #000 22px, #000 calc(100% - 22px), transparent); }
  .fh-anchors { scroll-padding-inline: 22px; } .fh-topbar > .fh-spaces { scroll-padding-inline: 22px; }
  .grid2 { grid-template-columns: 1fr; }
  /* Lot P-3 (13/11) : légende OHLC du graphique Charts repliée (elle élargissait la page à 401 px pour 384 px : logo rogné à gauche au défilement) */
  .pane .lbl, .pane .lbl > span { white-space: normal !important; overflow-wrap: anywhere; }
  .pane { overflow: hidden; }
  /* Lot P-3 : aucune barre de la Subbar ni segment de contrôle ne doit élargir la page (Conditions, Mégatendances, Vision LT, Labo) */
  .fh-sub-tools, .fh-sub-right { max-width: 100%; min-width: 0; }
  .fh-ovctl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; max-width: 100%; }
  .fh-ovctl select { max-width: 100%; }
  .fh-views { display: flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .fh-views::-webkit-scrollbar { display: none; }
  .fh-views a { flex: none; }
  .seg, .gwseg { display: inline-flex; flex-wrap: wrap; max-width: 100%; }
  #fhHelpToast { max-width: calc(100vw - 16px); left: 8px; right: 8px; box-sizing: border-box; }
  /* Pages de données : contrôles empilés (EUR/USD & taux réels de conditions.html compris), légendes resserrées, titres repliés */
  .gwbar { gap: 6px 8px; }
  .gwbar > .gwseg { flex-wrap: wrap; max-width: 100%; }
  .gwbar > .src, .gwbar > [aria-live] { flex: 1 1 100%; }
  .gwbar .tbtn { min-height: 32px; }
  .seg button, .gwseg button { min-height: 30px; }
  body.fh-obs .legend { gap: 4px 10px; font-size: 11px; }
  body.fh-obs .chart.lg { height: 260px; }
  body.fh-obs h1 { font-size: 22px; }
  body.fh-obs h2, body.fh-obs h3 { overflow-wrap: anywhere; }
  .fx-bar { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .fh-brand .fh-wordmark { font-size: 16px; }
  #fhAcctBtn > span:not(.i):not(.car) { display: none; }
  #fhAcctBtn .i { display: inline; font-weight: 600; letter-spacing: .02em; }
  #fhAcctBtn > svg { display: none; }
  /* Aide, Guide, Comité : icône ou signe seul (libellé complet en title / aria-label) */
  .fh-top-tools #fhHelpBtn { font-size: 0; gap: 0; }
  .fh-top-tools #fhHelpBtn > svg { display: inline; width: 16px; height: 16px; }
  .fh-top-tools #fhGuideBtn { font-size: 0; }
  .fh-top-tools #fhGuideBtn::before { content: "?"; font: 600 14px/1 var(--font-sans); }
  .fh-top-tools .cmtc > #cmtBtn > span { display: none; }
  .fh-top-tools .cmtc > #cmtBtn > svg { display: inline; }
  .fh-top-tools .fh-pill.fh-theme button { font-size: 0; padding: 6px 7px; }
  .fh-top-tools .fh-pill.fh-theme button[data-t="light"]::before { content: "☀"; font-size: 13px; }
  .fh-top-tools .fh-pill.fh-theme button[data-t="dark"]::before { content: "☾"; font-size: 13px; }
  /* Lot P-3 (13/11) : la pilule ☀/☾ quitte la 1re rangée (manque de place à 360–390 px) ; le thème passe dans le menu du compte. */
  .fh-top-tools .fh-pill.fh-theme { display: none; }
  #fhAcctMenu #fhAcctTheme { display: block; }
  .fh-tools-btn { padding: 0 4px; }
  .fh-top-tools :is(.tbtn, #fhHelpBtn, #fcopBtn, #fhGuideBtn), .fh-top-tools .cmtc > button { padding: 0 6px; }
}

/* ============================================================== 8. Lot P-2 (13/11/2026) — Hari Seldon : vitesses, questions rapides, frise des étapes
   Hors couche (après N-1) : sélecteur « ⚡ Synthèse | 🏛️ Approfondi » sous le fil, au-dessus de la saisie ; 3 questions rapides dans l'accueil ;
   étapes réelles du serveur pendant la réflexion. Aucune largeur fixe : 375 px comme 1440 px, retour à la ligne plutôt que débordement. */
#fcopOpts { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding: 6px 18px 0 10px; border-top: 1px solid var(--border-subtle); }
#fcopOpts + #fcopIn { border-top: 0; padding-top: 6px; }
#fcopDepth { display: inline-flex; flex-wrap: wrap; max-width: 100%; padding: 1px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-sunken); }
#fcopDepth button { padding: 2px 9px; cursor: pointer; white-space: nowrap; font: 500 11.5px/1.5 var(--font-sans); color: var(--ink-muted); background: transparent; border: 0; border-radius: var(--radius-sm); }
#fcopDepth button:hover { color: var(--ink-primary); }
#fcopDepth button.on { color: var(--ink-primary); background: var(--bg-surface); box-shadow: inset 0 0 0 1px var(--border-active); }
#fcopDepth button:focus-visible { outline: 2px solid var(--border-active); outline-offset: 1px; }
.fcopChips { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: -2px 2px 10px; }
.fcopChips small { font: 600 10.5px/1.4 var(--font-sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.fcopChip { display: block; width: 100%; padding: 5px 9px; cursor: pointer; text-align: left; white-space: normal; overflow-wrap: anywhere; font: 400 12.5px/1.35 var(--font-sans);
  color: var(--ink-primary); background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.fcopChip:hover { border-color: var(--border-active); background: var(--bg-hover); }
.fcopSteps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.fcopSteps li { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.fcopSteps li span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.fcopSteps li em { flex: none; font-style: normal; font-size: 11px; color: var(--ink-muted); }
.fcopSteps li::before { flex: none; width: 1em; text-align: center; }
.fcopSteps li.ok { color: var(--ink-muted); }
.fcopSteps li.ok::before { content: "✓"; color: var(--sem-up, var(--ink-secondary)); }
.fcopSteps li.cur { color: var(--ink-primary); }
.fcopSteps li.cur::before { content: "●"; font-size: 9px; animation: fcopPulse 1.2s ease-in-out infinite; }
@keyframes fcopPulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .fcopSteps li.cur::before { animation: none; } }
@media (max-width: 768px) {
  #fcopOpts { padding: 6px 8px 0; }
  #fcopDepth { flex: 1 1 100%; }
  #fcopDepth button { flex: 1 1 0; min-height: 36px; font-size: 13px; }
  .fcopChip { min-height: 40px; font-size: 14px; }
}

/* Lot R-1 (13/11/2026) : sélecteur de mode de Charts « ETF & Marchés | Titres Vifs (Live FMP) » (index.html, equities.html) */
.fh-mode{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden;flex:0 0 auto}
.fh-mode a{padding:4px 10px;font:500 12px/1.2 var(--font-sans);color:var(--ink-muted);text-decoration:none;white-space:nowrap}
.fh-mode a.on{color:var(--ink-primary);background:var(--bg-raised);box-shadow:inset 0 -2px 0 var(--fidia-accent)}
@media (max-width:599.98px){.fh-mode a{padding:4px 7px;font-size:11.5px}}

/* Lot S-3e (15/11/2026) — « Fiche » de série et tiroirs de méthodologie au gabarit « Prise en main + Expert » (hors bulle #fhTip). */
.series-l1 { border: 1px solid var(--border-strong); border-left: 3px solid var(--fidia-accent, #EA580C); border-radius: var(--radius, 6px); padding: 8px 12px; margin: 6px 0 10px; background: var(--bg-sunken); overflow-wrap: anywhere; }
.series-l1 p { margin: 6px 0; color: var(--ink-primary); }
.series-l1 i, .ai-l1 i { font-style: normal; font-weight: 600; }
.series-l1 ul.help-cas, .ai-l1 ul.help-cas { margin: 4px 0 6px; padding: 0 0 0 16px; }
.series-l1 ul.help-cas li, .ai-l1 ul.help-cas li { margin: 4px 0; }
.series-l1 li.fav i, .ai-l1 li.fav i { color: var(--pos, #15803d); }
.series-l1 li.neu i, .ai-l1 li.neu i { color: var(--ink-secondary); }
.series-l1 li.vig i, .ai-l1 li.vig i { color: var(--neg, #b91c1c); }
.series-l1 .help-now { border-top: 1px dashed var(--border-strong); padding-top: 6px; }
details.series-expert, details.ai-expert { margin: 8px 0 4px; border-top: 1px solid var(--border-strong); padding-top: 6px; }
details.series-expert > summary, details.ai-expert > summary { cursor: pointer; list-style: none; font-weight: 600; color: var(--ink-secondary); padding: 6px 0; min-height: 32px; }
details.series-expert > summary::-webkit-details-marker, details.ai-expert > summary::-webkit-details-marker { display: none; }
details.series-expert[open] > summary, details.ai-expert[open] > summary { color: var(--ink-primary); }
dl.help-x { margin: 4px 0; overflow-wrap: anywhere; }
dl.help-x dt { font-weight: 600; margin-top: 6px; color: var(--ink-primary); }
dl.help-x dd { margin: 2px 0 0; color: var(--ink-secondary); font-size: 12.5px; }
.ai-l1 { border: 1px solid var(--border-strong); border-left: 3px solid var(--fidia-accent, #EA580C); border-radius: var(--radius, 6px); padding: 8px 12px; margin: 4px 0 10px; background: var(--bg-sunken); overflow-wrap: anywhere; }
.ai-l1 p { margin: 6px 0; }

/* Lot 3 qvm-bottomup-1.3 (18/11/2026) — Titres Vifs · 04 · Macro & Secteurs (Bottom-Up) : barre de commandes, carte thermique sobre
   (jetons sémantiques --sem-up / --sem-down, lisibles en Clair et en Sombre), lignes et cellules cliquables vers le Radar. */
#v-macro .m-bar { gap: 8px 16px; align-items: center; }
#v-macro .m-ctl { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
#v-macro .m-go { cursor: pointer; }
#v-macro tr.m-go:hover td, #v-macro tr.m-go:focus-visible td { background: color-mix(in srgb, var(--bg-sunken) 60%, transparent); }
#v-macro td.m-go:hover, #v-macro .m-go:focus-visible { outline: 1px solid var(--border-active); outline-offset: -1px; }
#v-macro table.mhm td { text-align: center; min-width: 58px; font-weight: 600; }
#v-macro table.mhm td.l, #v-macro table.ms td.l { font-weight: 400; text-align: left; }
#v-macro td.ml a.sym { margin-right: 4px; }
#v-macro .hp2 { background: color-mix(in srgb, var(--sem-up) 30%, transparent); }
#v-macro .hp1 { background: color-mix(in srgb, var(--sem-up) 14%, transparent); }
#v-macro .h0  { background: transparent; }
#v-macro .hn1 { background: color-mix(in srgb, var(--sem-down) 14%, transparent); }
#v-macro .hn2 { background: color-mix(in srgb, var(--sem-down) 30%, transparent); }
#v-macro .hs1 { background: color-mix(in srgb, var(--ink-muted) 8%, transparent); }
#v-macro .hs2 { background: color-mix(in srgb, var(--ink-muted) 18%, transparent); }
#v-macro .hs3 { background: color-mix(in srgb, var(--ink-muted) 30%, transparent); }
#v-macro .m-leg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 11.5px; color: var(--ink-muted); }
#v-macro .m-leg i { display: inline-block; width: 14px; height: 10px; border: 1px solid var(--border-subtle); border-radius: 2px; }
@media (max-width: 599.98px) { #v-macro .m-ctl .tv-seg button { padding: 5px 7px; font-size: 12px; } #v-macro table.mhm td { min-width: 46px; } }

/* pano-equity-signals-1.0 (24/11/2026) : pastille des signaux Actions (Panorama, Cadre de Décision) */
.eqs-pill { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 10px; border: 1px solid currentColor; font: 600 11.5px/1.6 var(--font-sans); white-space: nowrap; }
.eqs-pill.eqs-up { color: var(--sem-up); } .eqs-pill.eqs-down { color: var(--sem-down); } .eqs-pill.eqs-warn { color: var(--sem-warn); } .eqs-pill.eqs-muted { color: var(--ink-muted); }
