/* =============================================================================
   🎨 Déploiement IA / HTML multipages  -  assets/css/portal.css
   =============================================================================
   Objectif:
   - Centraliser tout le style du portail multi-pages.
   - Garantir des tableaux lisibles, des tooltips propres et une navigation cohérente.
   - Permettre un rendu autonome sans framework externe.
   ============================================================================= */
:root {
  --bg:#0b1220; --surface:#111a2b; --surface-2:#172338; --surface-3:#1d2c44; --ink:#e6eef8; --muted:#9fb1c8;
  --line:#2a3d5d; --accent:#60a5fa; --good:#22c55e; --warn:#f59e0b; --danger:#ef4444; --violet:#8b5cf6; --cyan:#22d3ee;
  --shadow:0 18px 46px rgba(0,0,0,.28); --radius:22px; --max:1500px;
  --space-shell:46px; --space-section:52px; --space-stack:30px; --space-grid:36px; --space-card:32px;
  --table-pad-y:16px; --table-pad-x:16px; --table-edge:20px; --table-radius:18px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:var(--ink);line-height:1.66;background:radial-gradient(circle at top left, rgba(96,165,250,.12), transparent 22%), radial-gradient(circle at 100% 0%, rgba(34,197,94,.08), transparent 20%), linear-gradient(180deg,#08101b,#0b1220 20%,#0b1220 100%)}
a{color:#9cc7ff;text-decoration:none} a:hover{text-decoration:underline}
code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#0b1220;border:1px solid var(--line);padding:2px 6px;border-radius:8px;color:#dbeafe;white-space:nowrap;word-break:normal;overflow-wrap:normal;hyphens:none}
.shell{max-width:var(--max);margin:0 auto;padding:var(--space-shell) var(--space-shell) 72px}
.page-hero{border:1px solid var(--line);border-radius:30px;padding:44px 48px;background:linear-gradient(135deg, rgba(96,165,250,.16), rgba(34,197,94,.05));box-shadow:var(--shadow);position:relative;overflow:hidden}
.page-hero:after{content:'';position:absolute;inset:auto -60px -70px auto;width:230px;height:230px;border-radius:50%;background:radial-gradient(circle, rgba(96,165,250,.22), transparent 70%)}
.hero-top{margin-bottom:18px}.breadcrumb{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:14px;flex-wrap:wrap}
.page-hero h1{margin:0;max-width:1200px;font-size:44px;line-height:1.12;letter-spacing:-.02em}
.hero-desc{margin:28px 0 0;color:#d9e5f4;max-width:1120px;font-size:18px;line-height:1.82}
.hero-tags,.stats,.exercise-tags{display:flex;flex-wrap:wrap;gap:10px}
.hero-tags{margin-top:26px}
.badge{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;padding:6px 12px;font-size:13px;background:rgba(255,255,255,.03);color:var(--muted)}
.site-nav{position:sticky;top:0;z-index:20;margin:36px 0 50px;padding:24px 26px;border-radius:20px;border:1px solid rgba(42,61,93,.92);background:rgba(8,17,29,.88);backdrop-filter:blur(10px);box-shadow:var(--shadow);display:grid;gap:18px}
.nav-group{display:grid;gap:8px}.nav-label{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#93c5fd}.nav-links{display:flex;flex-wrap:wrap;gap:10px}
.nav-link{display:inline-flex;padding:9px 14px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.03);color:var(--ink);font-size:14px}.nav-link.active{border-color:#60a5fa;background:rgba(96,165,250,.15);color:#fff}
section{margin:0;padding:40px 44px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(180deg, rgba(23,35,56,.95), rgba(17,26,43,.98));box-shadow:var(--shadow)}
section + section{margin-top:var(--space-section)}
section > :first-child{margin-top:0}
section > :last-child{margin-bottom:0}
section > * + *{margin-top:var(--space-stack)}
.svg-box + .gate-grid{margin-top:calc(var(--space-grid) + 8px)}
.gate-grid + .note,.cards + .note,.grid-2 + .note,.grid-3 + .note{margin-top:calc(var(--space-stack) + 4px)}
section h2{margin:0;font-size:29px;line-height:1.18;letter-spacing:-.01em}
.intro{margin:0;max-width:1140px;color:var(--muted);font-size:16px;line-height:1.82}.muted{color:var(--muted)}
.cards,.grid-2,.grid-3,.gate-grid,.exercise-grid,.focus-grid,.template-grid,.tool-grid,.mini-cols,.stats,.dashboard-grid{display:grid;gap:var(--space-grid);margin:6px 0 0}
.cards,.grid-3,.tool-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.template-grid,.exercise-grid{grid-template-columns:1fr}.grid-2,.mini-cols,.gate-grid,.focus-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stats{grid-template-columns:repeat(6,minmax(0,1fr))}.dashboard-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.card,.gate-card,.exercise-card,.focus-card,.template-card,.tool-card,.panel{border:1px solid var(--line);border-radius:20px;background:rgba(255,255,255,.03);padding:var(--space-card);box-shadow:0 12px 28px rgba(0,0,0,.14)}
.gate-card-link{display:block;color:inherit;text-decoration:none}
.gate-card-link:hover,.gate-card-link:focus,.gate-card-link:focus-visible{text-decoration:none}
.gate-card-link .gate-card{height:100%;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
.gate-card-link:hover .gate-card,.gate-card-link:focus-visible .gate-card{transform:translateY(-2px);border-color:#3b82f6;box-shadow:0 14px 30px rgba(59,130,246,.12)}
.card > :first-child,.gate-card > :first-child,.exercise-card > :first-child,.focus-card > :first-child,.template-card > :first-child,.tool-card > :first-child,.panel > :first-child{margin-top:0}
.card > :last-child,.gate-card > :last-child,.exercise-card > :last-child,.focus-card > :last-child,.template-card > :last-child,.tool-card > :last-child,.panel > :last-child{margin-bottom:0}
.card > * + *,.gate-card > * + *,.exercise-card > * + *,.focus-card > * + *,.template-card > * + *,.tool-card > * + *,.panel > * + *{margin-top:22px}
.card h3,.gate-card h3,.exercise-card h3,.focus-card h3,.template-card h3,.tool-card h3,.panel h3{margin:0;line-height:1.24}.card h3,.gate-card h3,.exercise-card h3,.focus-card h3,.template-card h3,.tool-card h3{min-height:2.8em}.card p,.gate-card p,.exercise-card p,.focus-card p,.template-card p,.tool-card p,.panel p{margin:0;max-width:72ch;color:var(--muted);line-height:1.72}
.stat{min-height:92px;border:1px solid var(--line);border-radius:18px;padding:16px 18px;background:rgba(11,18,32,.48)}.stat strong{display:block;font-size:30px;color:#fff;margin-bottom:6px}.stat span{color:var(--muted);font-size:14px}
.table-scroll{position:relative;display:block;width:100%;margin:12px 0 0;overflow:hidden;border-radius:var(--table-radius);background:linear-gradient(180deg, rgba(18,29,46,.96), rgba(11,18,32,.82));max-width:100%;isolation:isolate;box-shadow:inset 0 0 0 1px var(--line)}.table-scroll table{width:100%;min-width:0;border-collapse:separate;border-spacing:0;table-layout:auto;background:transparent}
thead th{border-top:1px solid var(--line)}
thead th,tbody td{border-bottom:1px solid var(--line)}
thead,tbody,tr,th,td{background-clip:padding-box}
th,td{padding:var(--table-pad-y) var(--table-pad-x);text-align:left;overflow-wrap:break-word;word-break:normal;hyphens:none}th{position:sticky;top:0;vertical-align:middle;background:rgba(18,29,46,.98);color:#e7eef8;font-size:14px;font-weight:700;z-index:1;line-height:1.28}td{vertical-align:top;font-size:14px;color:#d9e5f5;line-height:1.5;background:rgba(255,255,255,.01)}
th:first-child,td:first-child{padding-left:var(--table-edge)}th:last-child,td:last-child{padding-right:var(--table-edge)}
thead th:first-child{border-top-left-radius:calc(var(--table-radius) - 1px)}thead th:last-child{border-top-right-radius:calc(var(--table-radius) - 1px)}tbody tr:last-child td:first-child{border-bottom-left-radius:calc(var(--table-radius) - 1px)}tbody tr:last-child td:last-child{border-bottom-right-radius:calc(var(--table-radius) - 1px)}
th.nowrap-col,td.nowrap-col{white-space:nowrap;overflow-wrap:normal;word-break:normal;hyphens:none}th.col-jalon,td.col-jalon{width:88px;min-width:88px}th.col-ref,td.col-ref{min-width:128px}tbody tr:nth-child(even) td{background:rgba(255,255,255,.025)}tbody tr:last-child td{border-bottom:none}tbody tr:last-child td:first-child,tbody tr:last-child td:last-child,thead th:first-child,thead th:last-child{background-clip:padding-box}
.svg-box{border:1px solid var(--line);border-radius:20px;padding:24px;background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));overflow:hidden}.svg-box svg{display:block;width:100%;height:auto}
.d3-box{border:1px solid var(--line);border-radius:20px;padding:28px;background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));overflow:hidden;background-clip:padding-box}
.d3-host{width:100%;min-height:380px}
.d3-caption{margin-top:14px;color:var(--muted);font-size:14px;line-height:1.55}
.tooltip-term{color:#bfdbfe;border-bottom:1px dotted rgba(147,197,253,.78);text-decoration:none;cursor:help}
.tooltip-term:hover,.tooltip-term:focus{color:#dbeafe;border-bottom-color:#dbeafe}
.explain-list{margin:0;padding-left:18px;color:var(--muted)}
.explain-list li + li{margin-top:8px}
.quick-glossary{display:flex;flex-wrap:wrap;gap:10px 14px}
.d3-tooltip{position:fixed;z-index:99;pointer-events:none;min-width:220px;max-width:320px;padding:12px 14px;border:1px solid var(--line);border-radius:16px;background:rgba(8,17,29,.96);color:#e7eef8;box-shadow:var(--shadow);opacity:0;transform:translateY(6px);transition:opacity .12s ease,transform .12s ease}
.d3-tooltip.visible{opacity:1;transform:translateY(0)}
.d3-tooltip strong{display:block;margin-bottom:6px;color:#fff}
.d3-legend{display:flex;flex-wrap:wrap;gap:10px 16px;margin-top:12px}
.d3-legend-item{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:13px}
.d3-legend-swatch{display:inline-block;width:12px;height:12px;border-radius:999px;border:1px solid rgba(255,255,255,.18)}
.d3-axis text,.d3-axis-label,.d3-annotation,.d3-value-label{fill:#cbd5e1;font-size:12px}
.d3-grid line{stroke:#22314a;stroke-dasharray:4 6}
.d3-domain{stroke:#4b678d}
.d3-quad-label{fill:#93c5fd;font-size:13px;font-weight:700}
.d3-label{fill:#e5eefb;font-size:12px;font-weight:600;cursor:help}
.d3-line-muted{stroke:#5b708f;stroke-dasharray:7 7;stroke-width:2}
.d3-focus-ring{stroke:#fff;stroke-width:2;fill:none;opacity:.65}
.d3-ref-line{stroke:#64748b;stroke-dasharray:5 5}
.d3-bar-total{filter:drop-shadow(0 10px 18px rgba(124,58,237,.22))}
.d3-panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-grid);margin:0}
.d3-panel-grid .panel{height:100%}
.gate-head,.exercise-top,.tool-top,.template-head,.focus-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}.gate-id{display:inline-flex;min-width:48px;height:36px;justify-content:center;align-items:center;border-radius:999px;background:#172554;color:#bfdbfe;font-weight:800}.gate-stats{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.exercise-top h3,.tool-top h3,.template-head h3,.focus-top h3{flex:1 1 320px}
.exercise-top span,.tool-top span,.template-head span{color:#93c5fd;font-size:12px;border:1px solid var(--line);border-radius:999px;padding:4px 8px}
.tool-toolbar{display:flex;flex-wrap:wrap;gap:20px;align-items:stretch;margin:0 0 36px;padding:12px 0 10px}.filter-input{flex:1 1 420px;min-height:54px;border:1px solid var(--line);border-radius:14px;background:#0b1220;color:var(--ink);padding:16px 20px}.tool-toolbar .badge{align-self:center;margin:0}
.tool-group,.exercise-group{border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.02);margin:0;overflow:hidden}.tool-group summary,.exercise-group summary{cursor:pointer;list-style:none;padding:18px 20px;font-size:18px;font-weight:700;background:rgba(255,255,255,.03)}.tool-group summary::-webkit-details-marker,.exercise-group summary::-webkit-details-marker{display:none}.count{color:var(--muted);font-weight:500}
.template-card{width:100%}
.template-preview{margin-top:16px;border:none;border-radius:0;padding:0;background:transparent;min-height:auto;overflow:visible;box-shadow:none}
.template-preview .table-scroll{overflow:hidden}
.template-preview .table-scroll table{min-width:0;table-layout:auto}
.template-preview table{width:100%;max-width:100%}
.template-preview th,.template-preview td{padding:12px 10px;font-size:13px}
.note{border-left:4px solid var(--warn);background:rgba(245,158,11,.08);color:#fde68a;border-radius:14px;padding:20px 22px;margin-top:28px;line-height:1.74}.note strong{color:#fff8db}
.dashboard-grid div,.mini-cols div{border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.02);padding:10px}.dashboard-grid strong,.mini-cols strong{display:block;font-size:12px;color:#93c5fd;text-transform:uppercase;letter-spacing:.04em;margin-bottom:6px}.dashboard-grid span,.mini-cols p{color:#dce8f8;font-size:13px;line-height:1.45;margin:0}
ul{margin:0;padding-left:20px}li{margin:0 0 6px}
.term-en{color:#fff;font-weight:600}.term-fr{color:var(--muted)}
.tt{position:relative;display:inline-flex;align-items:center;border-bottom:1px dotted rgba(156,199,255,.55);cursor:help}.tt-box{position:absolute;left:0;bottom:calc(100% + 10px);min-width:220px;max-width:320px;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:rgba(8,17,29,.98);color:#e7eef8;font-size:12px;line-height:1.45;opacity:0;transform:translateY(6px);pointer-events:none;transition:opacity .15s ease,transform .15s ease;box-shadow:var(--shadow);z-index:30}.tt:hover .tt-box,.tt:focus .tt-box,.tt:focus-within .tt-box{opacity:1;transform:translateY(0)}
.cards>.full-span,.grid-2>.full-span,.grid-3>.full-span,.gate-grid>.full-span,.exercise-grid>.full-span,.focus-grid>.full-span,.template-grid>.full-span,.tool-grid>.full-span,.mini-cols>.full-span,.stats>.full-span,.dashboard-grid>.full-span{grid-column:1 / -1 !important;width:100%;max-width:100%}
.full-span .table-scroll,.full-span .template-preview,.full-span table{max-width:100%}
.nowrap,.ref-code,.ref-link,.path-link{white-space:nowrap;word-break:normal;overflow-wrap:normal;hyphens:none}
.ref-code{display:inline-flex;align-items:center;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#dbeafe}
.ref-link,.path-link{display:inline-flex;align-items:center;gap:6px;color:#bfdbfe;font-size:13px;text-decoration:none}
section .cards + .cards,section .grid-2 + .grid-2,section .grid-3 + .grid-3,section .panel + .panel{margin-top:calc(var(--space-grid) - 4px)}
section h2 + .intro{margin-top:18px}
section .intro + .note{margin-top:24px}

.ref-link:hover,.path-link:hover{text-decoration:underline}
.site-footer{text-align:center;color:var(--muted);padding:40px 0 54px}
@media (max-width:1200px){.stats,.cards,.grid-3,.tool-grid,.dashboard-grid{grid-template-columns:1fr 1fr}}
@media (max-width:920px){.shell{padding:24px 20px 42px}.page-hero{padding:30px}.page-hero h1{font-size:34px}.site-nav{position:static;margin:24px 0 34px;padding:20px}.stats,.cards,.grid-2,.grid-3,.gate-grid,.focus-grid,.tool-grid,.dashboard-grid,.mini-cols,.d3-panel-grid{grid-template-columns:1fr}section{padding:30px 22px}.tool-toolbar{margin-bottom:24px}.table-scroll{overflow:hidden}.table-scroll table{min-width:0}.template-preview .table-scroll table{min-width:0}.d3-host{min-height:320px}}
.reference-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.7fr);gap:var(--space-grid);align-items:start}
.reference-rail{position:sticky;top:92px;display:grid;gap:16px}
.anchor-list{display:grid;gap:10px}
.anchor-list a{display:block;border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:rgba(255,255,255,.03);color:#dbeafe;text-decoration:none}
.anchor-list a:hover{border-color:#60a5fa;background:rgba(96,165,250,.09)}
.summary-list a{display:grid;gap:5px;padding:12px 14px}
.summary-list strong{color:#fff;font-size:15px;line-height:1.25}
.summary-list span{color:var(--muted);font-size:13px;line-height:1.45}
.workpad{border:1px dashed rgba(147,197,253,.45);border-radius:16px;padding:16px 18px;background:rgba(11,18,32,.42);color:#dbeafe;line-height:1.6;outline:none}
.workpad:focus{border-color:#60a5fa;box-shadow:0 0 0 3px rgba(96,165,250,.12)}
.work-table td[contenteditable="true"],.work-table th[contenteditable="true"]{background:rgba(96,165,250,.06);outline:none}
.folder-card{display:grid;gap:10px}
.folder-list{display:grid;gap:12px}
.folder-list a{display:grid;gap:4px;border:1px solid var(--line);border-radius:14px;padding:12px 14px;background:rgba(255,255,255,.03);color:#dbeafe;text-decoration:none}
.folder-list a:hover{border-color:#60a5fa;background:rgba(96,165,250,.09)}
.kpi-stack{display:grid;gap:12px}
.kpi-chip{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:12px 14px;background:rgba(255,255,255,.03)}
.kpi-chip strong{font-size:14px;color:#fff}
.kpi-chip span{color:#93c5fd;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:nowrap}
@media (max-width:1100px){.reference-layout{grid-template-columns:1fr}.reference-rail{position:static}}

.output-tree-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:var(--space-grid)}
.output-card{display:grid;gap:12px;border:1px solid var(--line);border-radius:18px;padding:18px 20px;background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02));min-height:100%}
.output-card h3{margin:0}
.output-meta{display:flex;flex-wrap:wrap;gap:8px}
.doc-pills{display:flex;flex-wrap:wrap;gap:8px}
.doc-pill{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;padding:6px 10px;background:rgba(255,255,255,.03);font-size:13px;color:#bfdbfe}
.output-links{display:grid;gap:8px;margin-top:4px}
.output-links a{display:block;border:1px solid var(--line);border-radius:14px;padding:10px 12px;background:rgba(255,255,255,.03);color:#dbeafe;text-decoration:none}
.output-links a:hover{border-color:#60a5fa;background:rgba(96,165,250,.09)}
.family-stack{display:grid;gap:18px}
.family-block{display:grid;gap:14px;border:1px solid var(--line);border-radius:18px;padding:18px 20px;background:rgba(255,255,255,.02)}
.output-mini-list{display:grid;gap:8px;margin:0;padding-left:18px}
.output-mini-list li{color:#dbeafe}

.search-summary{display:grid;gap:12px}.export-file-list{display:grid;gap:10px}.folder-list a span{display:block}.d3-panel-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:var(--space-grid)}.work-table tbody tr.filter-card[style*="display: none"]{display:none !important}.path-link{word-break:break-word}.folder-card .folder-list{margin-top:10px}



/* =============================================================================
   🧩 THÈME INDIGO  -  overrides spécifiques
   ============================================================================= */
.stats .stat p { margin: 8px 0 0; font-size: 12px; line-height: 1.45; }
.timeline { position: relative; display: grid; gap: 16px; margin: 0; }
.timeline-item { position: relative; padding-left: 22px; color: var(--ink); line-height: 1.6; }
.timeline-item::before { content: ''; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 6px rgba(96,165,250,.12); }
.timeline-item::after { content: ''; position: absolute; left: 4px; top: 18px; bottom: -16px; width: 2px; background: rgba(96,165,250,.2); }
.timeline-item:last-child::after { display: none; }
.tl-title { color: #fff; font-weight: 700; }
.note { margin-top: 18px; }
.tool-grid { align-items: start; }
.tool-card.full-span { grid-column: 1 / -1 !important; }
.raw-block { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; max-height: 720px; overflow: auto; }
.raw-block code { white-space: pre-wrap; }
.tool-card h3 { min-height: auto; }
.table-scroll table a { color: #bfdbfe; }
.badge strong { color: #fff; }
.page-hero h1 { max-width: 1300px; }
section > * + * { margin-top: 28px; }
section > h2 + .intro { margin-top: 20px; }
section > .intro { margin-bottom: 0; max-width: 78ch; }
section > .intro + * { margin-top: 34px; }
section > .intro + :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details) { margin-top: 36px; }
section > :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details)
  + :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details) { margin-top: 42px; }
section > :where(.svg-box,.note,.reference-layout,details)
  + :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details) { margin-top: 46px; }
.cards .card p + p { margin-top: 10px; }
.d3-box[data-indigo-chart] .d3-host { min-height: 380px; }
.quick-glossary { margin-top: 14px; }
.quick-glossary .tooltip-term { display:inline-flex; align-items:center; padding:6px 10px; border:1px dashed var(--line); border-radius:999px; background:rgba(255,255,255,.03); }
.status-pill { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:rgba(255,255,255,.03); }
.status-pill.success { border-color:rgba(34,197,94,.5); color:#bbf7d0; }
.status-pill.warning { border-color:rgba(245,158,11,.5); color:#fde68a; }
.status-pill.neutral { border-color:rgba(148,163,184,.45); color:#cbd5e1; }
@media (max-width: 920px) {
  .stats .stat p { display: none; }
  .raw-block { max-height: none; }
}

/* =============================================================================
   🎨 Codex Dark Overlay
   ============================================================================= */
/* Kubernetes Markdown Report Theme - Reference-aligned */
:root {
  color-scheme: dark;
  --bg: #0b0f16;
  --bg-2: #111827;
  --fg: #e6edf3;
  --muted: #9aa4b2;
  --border: #223044;
  --accent: #38bdf8;
  --accent-2: #34d399;
  --accent-3: #fbbf24;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #f87171;
  --info: #38bdf8;
  --code: #0f172a;
  --code-border: #243248;
  --layer-1: rgba(56,189,248,0.14);
  --layer-2: rgba(52,211,153,0.12);
  --thead-bg: #122132;
  --thead-fg: #e6edf3;
  --row-alt: #0f1722;
  --row-hover: rgba(56,189,248,0.12);
  --viz-gap: 0.75rem;
  --viz-card-radius: 12px;
  --viz-card-pad: 0.72rem 0.82rem;
  --viz-card-shadow: 0 8px 18px rgba(2, 6, 23, 0.42);
  --viz-meter-width: 124px;
  --viz-meter-height: 11px;
  --viz-hbar-width: 148px;
  --viz-hbar-height: 11px;
  --viz-ring-size: 92px;
  --viz-ring-thickness: 11px;
  --viz-ring-track: rgba(148, 163, 184, 0.25);
  --viz-transition-fast: 160ms ease;
  --viz-transition-slow: 260ms ease;
}

body,
.markdown-body {
  background:
    radial-gradient(1200px 600px at 5% -10%, var(--layer-1), transparent 60%),
    radial-gradient(900px 500px at 95% -20%, var(--layer-2), transparent 60%),
    var(--bg);
  color: var(--fg);
}

a {
  color: var(--accent);
}

hr {
  border-color: var(--border);
}

code,
pre {
  background: var(--code);
}

code {
  border: 1px solid var(--code-border);
  border-radius: 6px;
  padding: 0.1rem 0.25rem;
}

pre {
  border: 1px solid var(--code-border);
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
}

h1,
h2,
h3,
h4 {
  scroll-margin-top: 80px;
}

h1 {
  font-weight: 800;
  background: linear-gradient(90deg, var(--layer-1), transparent);
  border-left: 6px solid var(--accent);
  padding: 0.4rem 0.7rem;
  border-radius: 10px;
  margin: 0.2rem 0 0.9rem;
  line-height: 1.2;
}

h2 {
  font-weight: 700;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.25rem;
  margin-top: 1.4rem;
}

h3 {
  font-weight: 700;
  color: var(--accent-2);
  margin-top: 1.1rem;
}

h4 {
  font-weight: 700;
  color: var(--accent-3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.15;
}

.badge.neutral {
  color: var(--fg);
  background: var(--bg-2);
}

.badge.success {
  color: var(--success);
  border-color: var(--success);
}

.badge.warning {
  color: var(--warning);
  border-color: var(--warning);
}

.badge.danger {
  color: var(--danger);
  border-color: var(--danger);
}

.badge.info {
  color: var(--info);
  border-color: var(--info);
}

.total-cell {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.22rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 700;
}

.total-cell.total-success {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.24) 0%, rgba(34, 197, 94, 0.14) 70%, rgba(245, 158, 11, 0.08) 90%, rgba(239, 68, 68, 0.05) 100%);
}

.total-cell.total-warning {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.22) 0%, rgba(34, 197, 94, 0.16) 70%, rgba(245, 158, 11, 0.26) 90%, rgba(239, 68, 68, 0.10) 100%);
  border-color: rgba(245, 158, 11, 0.45);
}

.total-cell.total-danger {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.20) 0%, rgba(34, 197, 94, 0.15) 70%, rgba(245, 158, 11, 0.28) 90%, rgba(239, 68, 68, 0.34) 100%);
  border-color: rgba(220, 38, 38, 0.55);
}

.total-cell.total-neutral {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.20), rgba(148, 163, 184, 0.10));
}

.kpi {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem 0 0.25rem;
  flex-wrap: wrap;
}

.summary,
.toc {
  border: 1px solid var(--border);
  background: var(--bg-2);
  padding: 0.9rem;
  border-radius: 10px;
}

.toc {
  margin-top: 0.8rem;
  margin-bottom: 1rem;
}

.toc ul {
  margin: 0.4rem 0 0.2rem 1rem;
}

.callout {
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  margin: 0.75rem 0;
}

.callout h4 {
  margin: 0.1rem 0 0.5rem;
}

.callout + .callout {
  margin-top: 1rem;
}

.callout.info {
  border-left: 6px solid var(--info);
  background: rgba(14, 165, 233, 0.12);
}

.callout.success {
  border-left: 6px solid var(--success);
  background: rgba(34, 197, 94, 0.12);
}

.callout.warning {
  border-left: 6px solid var(--warning);
  background: rgba(245, 158, 11, 0.14);
}

.callout.danger {
  border-left: 6px solid var(--danger);
  background: rgba(248, 113, 113, 0.14);
}

.section-links {
  float: right;
  display: inline-flex;
  gap: 0.4rem;
  opacity: 0.85;
}

.section-links a {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
  text-decoration: none;
  color: var(--accent);
}

.section-links a:hover {
  opacity: 0.95;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

table thead th {
  text-align: left;
  font-weight: 700;
  color: var(--thead-fg);
  background: var(--thead-bg);
  border-top: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
}

table td,
table th {
  padding: 7px 10px;
  border-right: 1px solid var(--border);
}

table td:last-child,
table th:last-child {
  border-right: none;
}

table tbody tr + tr td {
  border-top: 1px solid var(--border);
}

table tbody tr:nth-child(odd) {
  background: var(--row-alt);
}

table tbody tr:hover {
  background: var(--row-hover);
}

blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 0.9rem;
  color: var(--muted);
  background: rgba(14, 165, 233, 0.06);
}

details {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  margin: 0.45rem 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

kbd {
  background: var(--code);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
}

.meter {
  display: inline-block;
  vertical-align: middle;
  width: var(--viz-meter-width);
  height: var(--viz-meter-height);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.22), rgba(148, 163, 184, 0.08));
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0.35rem;
  box-shadow: inset 0 0 0 1px rgba(2, 6, 23, 0.35);
}

.meter .fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width var(--viz-transition-slow);
}

.meter .fill.success {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.meter .fill.warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.meter .fill.danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.meter .fill.neutral {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.meter-label {
  font-size: 0.82rem;
  color: var(--muted);
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.tooltip-term {
  border-bottom: 1px dotted var(--border);
  cursor: help;
}

.viz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--viz-gap);
  margin: 0.7rem 0 1rem;
}

.viz-card {
  border: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: var(--viz-card-radius);
  padding: var(--viz-card-pad);
  box-shadow: var(--viz-card-shadow);
  transition: transform var(--viz-transition-fast), box-shadow var(--viz-transition-fast);
}

.viz-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.55);
}

.viz-card h4 {
  margin: 0.05rem 0 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.viz-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.viz-stack {
  display: grid;
  gap: 0.38rem;
}

.viz-legend {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.viz-legend .item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.viz-legend .dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-block;
}

.viz-legend .dot.success { background: var(--success); }
.viz-legend .dot.warning { background: var(--warning); }
.viz-legend .dot.danger  { background: var(--danger); }
.viz-legend .dot.neutral { background: #94a3b8; }

.donut {
  --pct: 0;
  --size: var(--viz-ring-size);
  --thickness: var(--viz-ring-thickness);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--viz-ring-track) 0);
  box-shadow: inset 0 0 0 1px rgba(2, 6, 23, 0.32);
  transition: transform var(--viz-transition-fast);
}

.donut:hover {
  transform: scale(1.015);
}

.donut::before {
  content: "";
  width: calc(var(--size) - var(--thickness) * 2);
  height: calc(var(--size) - var(--thickness) * 2);
  border-radius: 50%;
  background: var(--bg);
}

.donut .donut-value {
  position: absolute;
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.donut.success {
  background: conic-gradient(var(--success) calc(var(--pct) * 1%), var(--viz-ring-track) 0);
}

.donut.warning {
  background: conic-gradient(var(--warning) calc(var(--pct) * 1%), var(--viz-ring-track) 0);
}

.donut.danger {
  background: conic-gradient(var(--danger) calc(var(--pct) * 1%), var(--viz-ring-track) 0);
}

.donut.neutral {
  background: conic-gradient(#94a3b8 calc(var(--pct) * 1%), var(--viz-ring-track) 0);
}

.hbar-wrap {
  display: inline-block;
  vertical-align: middle;
  width: var(--viz-hbar-width);
  height: var(--viz-hbar-height);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.22), rgba(148, 163, 184, 0.08));
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-right: 0.35rem;
  box-shadow: inset 0 0 0 1px rgba(2, 6, 23, 0.35);
}

.hbar {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width var(--viz-transition-slow);
}

.hbar.success {
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.hbar.warning {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.hbar.danger {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.hbar.neutral {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.spark {
  display: grid;
  grid-auto-flow: column;
  align-items: end;
  gap: 4px;
  height: 36px;
  min-width: 84px;
}

.spark span {
  display: block;
  min-width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  opacity: 0.92;
}

.spark span:nth-child(odd) {
  opacity: 0.76;
}

.spark.success span { background: linear-gradient(180deg, #22c55e, #16a34a); }
.spark.warning span { background: linear-gradient(180deg, #f59e0b, #d97706); }
.spark.danger span  { background: linear-gradient(180deg, #ef4444, #dc2626); }

.trend {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.trend.up { color: var(--warning); }
.trend.down { color: var(--success); }
.trend.flat { color: var(--muted); }

.stars {
  position: relative;
  font-size: 0.92rem;
  letter-spacing: 0.06rem;
  color: #f59e0b;
  cursor: help;
  text-shadow: 0 1px 0 rgba(2, 6, 23, 0.45);
}

.stars:hover::after {
  content: "★★★★★ excellent | ★★★★☆ tres bon | ★★★☆☆ correct | ★★☆☆☆ faible | ★☆☆☆☆ mauvais";
  position: absolute;
  left: 0;
  top: 1.25rem;
  z-index: 20;
  white-space: nowrap;
  font-size: 0.72rem;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
}

.maint {
  display: inline-block;
  padding: 0.08rem 0.52rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.16);
  transition: transform var(--viz-transition-fast);
}

.maint:hover {
  transform: translateY(-1px);
}

.maint.success {
  color: var(--success);
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.16);
}

.maint.warning {
  color: var(--warning);
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.20);
}

.maint.danger {
  color: var(--danger);
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.18);
}

.maint.neutral {
  color: var(--muted);
  border-color: var(--border);
  background: rgba(148, 163, 184, 0.13);
}

.code-block {
  --cb-accent: var(--border);
  --cb-bg: var(--code);
  --cb-label-bg: transparent;
  --cb-label-fg: transparent;
  margin: 14px 0 18px;
}

.code-block.code-danger  { --cb-accent: var(--danger);  --cb-bg: rgba(220, 38, 38, 0.14); --cb-label-bg: rgba(220, 38, 38, 0.20); --cb-label-fg: var(--danger); }
.code-block.code-create  { --cb-accent: var(--success); --cb-bg: rgba(22, 163, 74, 0.10); --cb-label-bg: rgba(22, 163, 74, 0.14); --cb-label-fg: var(--success); }
.code-block.code-update  { --cb-accent: var(--warning); --cb-bg: rgba(217, 119, 6, 0.14);  --cb-label-bg: rgba(217, 119, 6, 0.18);  --cb-label-fg: var(--warning); }
.code-block.code-upgrade { --cb-accent: var(--info);    --cb-bg: rgba(2, 132, 199, 0.14);  --cb-label-bg: rgba(2, 132, 199, 0.18);  --cb-label-fg: var(--info); }
.code-block.code-delete  { --cb-accent: var(--danger);  --cb-bg: rgba(220, 38, 38, 0.18); --cb-label-bg: rgba(220, 38, 38, 0.22); --cb-label-fg: var(--danger); }

.code-block pre {
  position: relative;
  overflow: auto;
  margin: 0;
  padding: 14px;
  padding-top: 22px;
  border-radius: 14px;
  border: 1px solid var(--cb-accent);
  background: var(--cb-bg) !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.code-block pre::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--cb-accent);
  border-radius: 14px 0 0 14px;
  opacity: 0.95;
}

.code-block[data-label] pre::after {
  content: attr(data-label);
  position: absolute;
  top: 7px;
  right: 10px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cb-label-fg);
  background: var(--cb-label-bg);
  border: 1px solid var(--cb-accent);
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
}

.code-block pre code {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  display: block;
}



/* =============================================================================
   🧩 THÈME INDIGO  -  overrides spécifiques
   ============================================================================= */
.stats .stat p { margin: 8px 0 0; font-size: 12px; line-height: 1.45; }
.timeline { position: relative; display: grid; gap: 16px; margin: 0; }
.timeline-item { position: relative; padding-left: 22px; color: var(--ink); line-height: 1.6; }
.timeline-item::before { content: ''; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 6px rgba(96,165,250,.12); }
.timeline-item::after { content: ''; position: absolute; left: 4px; top: 18px; bottom: -16px; width: 2px; background: rgba(96,165,250,.2); }
.timeline-item:last-child::after { display: none; }
.tl-title { color: #fff; font-weight: 700; }
.note { margin-top: 18px; }
.tool-grid { align-items: start; }
.tool-card.full-span { grid-column: 1 / -1 !important; }
.raw-block { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; max-height: 720px; overflow: auto; }
.raw-block code { white-space: pre-wrap; }
.tool-card h3 { min-height: auto; }
.table-scroll table a { color: #bfdbfe; }
.badge strong { color: #fff; }
.page-hero h1 { max-width: 1300px; }
section > * + * { margin-top: 28px; }
section > h2 + .intro { margin-top: 20px; }
section > .intro { margin-bottom: 0; max-width: 78ch; }
section > .intro + * { margin-top: 34px; }
section > .intro + :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details) { margin-top: 36px; }
section > :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details)
  + :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details) { margin-top: 42px; }
section > :where(.svg-box,.note,.reference-layout,details)
  + :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details) { margin-top: 46px; }
.cards .card p + p { margin-top: 10px; }
.d3-box[data-indigo-chart] .d3-host { min-height: 380px; }
.quick-glossary { margin-top: 14px; }
.quick-glossary .tooltip-term { display:inline-flex; align-items:center; padding:6px 10px; border:1px dashed var(--line); border-radius:999px; background:rgba(255,255,255,.03); }
.status-pill { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:rgba(255,255,255,.03); }
.status-pill.success { border-color:rgba(34,197,94,.5); color:#bbf7d0; }
.status-pill.warning { border-color:rgba(245,158,11,.5); color:#fde68a; }
.status-pill.neutral { border-color:rgba(148,163,184,.45); color:#cbd5e1; }
@media (max-width: 920px) {
  .stats .stat p { display: none; }
  .raw-block { max-height: none; }
}

/* =============================================================================
   🎨 Codex HTML Dark
   ============================================================================= */
:root{
  color-scheme:dark;
  --bg:#0b0f16; --surface:#111827; --surface-2:#122132; --surface-3:#0f1722; --ink:#e6edf3; --muted:#9aa4b2;
  --line:#223044; --accent:#38bdf8; --good:#22c55e; --warn:#f59e0b; --danger:#f87171; --violet:#8b5cf6; --cyan:#34d399;
  --shadow:0 18px 42px rgba(2,6,23,.42);
}
body{background:radial-gradient(1200px 600px at 5% -10%, rgba(56,189,248,.14), transparent 60%),radial-gradient(900px 500px at 95% -20%, rgba(52,211,153,.12), transparent 60%),var(--bg);color:var(--ink)}
a{color:var(--accent)}
code{background:#0f172a;border-color:#243248;color:var(--ink)}
.page-hero{background:linear-gradient(135deg, rgba(56,189,248,.14), rgba(52,211,153,.10));border-color:var(--line);box-shadow:0 18px 42px rgba(2,6,23,.42)}
.page-hero:after{background:radial-gradient(circle, rgba(56,189,248,.18), transparent 70%)}
.hero-desc,.intro,.card p,.gate-card p,.exercise-card p,.focus-card p,.template-card p,.tool-card p,.panel p{color:var(--muted)}
section{background:linear-gradient(180deg, rgba(17,24,39,.96), rgba(11,15,22,.98));border-color:var(--line);box-shadow:0 18px 42px rgba(2,6,23,.42)}
section h2{color:var(--accent);border-bottom:2px solid rgba(56,189,248,.35);padding-bottom:.25rem}
.card,.gate-card,.exercise-card,.focus-card,.template-card,.tool-card,.panel,.stat,.folder-list a,.output-card,.family-block,.kpi-chip,.anchor-list a,.output-links a,.nav-link,.badge,.doc-pill{background:rgba(17,24,39,.92);border-color:var(--line)}
.card h3,.gate-card h3,.exercise-card h3,.focus-card h3,.template-card h3,.tool-card h3,.panel h3{color:#34d399}
.nav-label{color:#7dd3fc}
.badge strong{color:#e6edf3}
.table-scroll{background:linear-gradient(180deg, rgba(18,33,50,.98), rgba(11,15,22,.92));box-shadow:inset 0 0 0 1px var(--line)}
thead th{background:#122132;color:var(--ink);border-top:1px solid var(--line);border-bottom:2px solid var(--line)}
tbody tr:nth-child(even) td{background:#0f1722}
tbody tr:hover td{background:rgba(56,189,248,.12)}
.svg-box,.d3-box{background:linear-gradient(180deg, rgba(17,24,39,.94), rgba(15,23,34,.88));border-color:var(--line)}
.quick-glossary .tooltip-term,.status-pill{background:#111827;border-color:var(--line)}
.status-pill.success{color:#22c55e;border-color:rgba(34,197,94,.55)}
.status-pill.warning{color:#f59e0b;border-color:rgba(245,158,11,.55)}
.status-pill.neutral{color:#cbd5e1;border-color:var(--line)}
.workpad{background:rgba(15,23,42,.72);border-color:#243248}
.site-footer{color:var(--muted)}



/* =============================================================================
   🧩 THÈME INDIGO  -  overrides spécifiques
   ============================================================================= */
.stats .stat p { margin: 8px 0 0; font-size: 12px; line-height: 1.45; }
.timeline { position: relative; display: grid; gap: 16px; margin: 0; }
.timeline-item { position: relative; padding-left: 22px; color: var(--ink); line-height: 1.6; }
.timeline-item::before { content: ''; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 6px rgba(96,165,250,.12); }
.timeline-item::after { content: ''; position: absolute; left: 4px; top: 18px; bottom: -16px; width: 2px; background: rgba(96,165,250,.2); }
.timeline-item:last-child::after { display: none; }
.tl-title { color: #fff; font-weight: 700; }
.note { margin-top: 18px; }
.tool-grid { align-items: start; }
.tool-card.full-span { grid-column: 1 / -1 !important; }
.raw-block { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; max-height: 720px; overflow: auto; }
.raw-block code { white-space: pre-wrap; }
.tool-card h3 { min-height: auto; }
.table-scroll table a { color: #bfdbfe; }
.badge strong { color: #fff; }
.page-hero h1 { max-width: 1300px; }
section > * + * { margin-top: 28px; }
section > h2 + .intro { margin-top: 20px; }
section > .intro { margin-bottom: 0; max-width: 78ch; }
section > .intro + * { margin-top: 34px; }
section > .intro + :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details) { margin-top: 36px; }
section > :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details)
  + :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details) { margin-top: 42px; }
section > :where(.svg-box,.note,.reference-layout,details)
  + :where(.table-scroll,.stats,.cards,.tool-grid,.d3-panel-grid,.svg-box,.gate-grid,.reference-layout,.timeline,.note,details) { margin-top: 46px; }
.cards .card p + p { margin-top: 10px; }
.d3-box[data-indigo-chart] .d3-host { min-height: 380px; }
.quick-glossary { margin-top: 14px; }
.quick-glossary .tooltip-term { display:inline-flex; align-items:center; padding:6px 10px; border:1px dashed var(--line); border-radius:999px; background:rgba(255,255,255,.03); }
.status-pill { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:rgba(255,255,255,.03); }
.status-pill.success { border-color:rgba(34,197,94,.5); color:#bbf7d0; }
.status-pill.warning { border-color:rgba(245,158,11,.5); color:#fde68a; }
.status-pill.neutral { border-color:rgba(148,163,184,.45); color:#cbd5e1; }
@media (max-width: 920px) {
  .stats .stat p { display: none; }
  .raw-block { max-height: none; }
}

/* =============================================================================
   🎨 HTML LIGHT  -  palette Codex pour le portail
   ============================================================================= */
:root{
  color-scheme:light;
  --bg:#edf4ff;
  --surface:#e3eefc;
  --surface-2:#dce9fb;
  --surface-3:#eaf2ff;
  --ink:#111c2e;
  --muted:#4f5c70;
  --line:#c3d0e3;
  --accent:#0284c7;
  --good:#16a34a;
  --warn:#d97706;
  --danger:#dc2626;
  --violet:#f59e0b;
  --cyan:#10b981;
  --shadow:0 18px 46px rgba(15,23,42,.10);
  --code:#f4f9ff;
  --code-border:#b9cbe3;
  --layer-1:rgba(2,132,199,0.20);
  --layer-2:rgba(59,130,246,0.12);
  --thead-bg:#dce9fb;
  --thead-fg:#111c2e;
  --row-alt:#eaf2ff;
  --row-hover:rgba(2,132,199,0.18);
  --nav-bg:rgba(255,255,255,.92);
  --card-bg:#ffffff;
  --panel-bg:#f8fbff;
  --chip-bg:rgba(255,255,255,.84);
  --tooltip-bg:rgba(255,255,255,.98);
  --workpad-bg:rgba(255,255,255,.84);
  --note-bg:rgba(217,119,6,0.14);
  --note-fg:#7c2d12;
}
body{background:radial-gradient(1200px 600px at 5% -10%, var(--layer-1), transparent 60%),radial-gradient(900px 500px at 95% -20%, var(--layer-2), transparent 60%),var(--bg);color:var(--ink)}
a{color:var(--accent)}
code{background:var(--code);border-color:var(--code-border);color:var(--ink)}
.page-hero{background:linear-gradient(135deg, var(--layer-1), var(--layer-2));border-color:var(--line);box-shadow:var(--shadow)}
.page-hero:after{background:radial-gradient(circle, var(--layer-1), transparent 70%)}
.page-hero h1,.tl-title,.badge strong,.card h3,.gate-card h3,.exercise-card h3,.focus-card h3,.template-card h3,.tool-card h3,.panel h3{color:var(--ink)}
.hero-desc,.intro,.card p,.gate-card p,.exercise-card p,.focus-card p,.template-card p,.tool-card p,.panel p,.breadcrumb,.site-footer,.muted{color:var(--muted)}
.site-nav{background:var(--nav-bg);border-color:var(--line);box-shadow:var(--shadow)}
.nav-label{color:var(--accent)}
.nav-link,.badge,.doc-pill,.status-pill,.anchor-list a,.output-links a,.folder-list a,.output-card,.family-block,.kpi-chip,.stat{background:var(--chip-bg);border-color:var(--line);color:var(--ink)}
.nav-link.active{border-color:var(--accent);background:var(--row-hover);color:var(--ink)}
section{background:linear-gradient(180deg, var(--surface-2), var(--surface));border-color:var(--line);box-shadow:var(--shadow)}
.card,.gate-card,.exercise-card,.focus-card,.template-card,.tool-card,.panel,.tool-group,.exercise-group,.workpad{background:var(--card-bg);border-color:var(--line)}
.tool-group summary,.exercise-group summary{background:var(--chip-bg);color:var(--ink)}
.table-scroll{background:linear-gradient(180deg, var(--surface-2), var(--surface));box-shadow:inset 0 0 0 1px var(--line)}
thead th{background:var(--thead-bg);color:var(--thead-fg);border-top:1px solid var(--line);border-bottom:2px solid var(--line)}
td{background:var(--card-bg);color:var(--ink)}
tbody tr:nth-child(even) td{background:var(--row-alt)}
tbody tr:hover td{background:var(--row-hover)}
.svg-box,.d3-box{background:linear-gradient(180deg, var(--card-bg), var(--panel-bg));border-color:var(--line)}
.d3-axis text,.d3-axis-label,.d3-annotation,.d3-value-label,.d3-caption,.d3-legend-item{fill:var(--muted);color:var(--muted)}
.d3-grid line{stroke:var(--line)}
.d3-domain{stroke:var(--line)}
.d3-quad-label{fill:var(--accent)}
.d3-label{fill:var(--ink)}
.d3-tooltip,.tt-box{background:var(--tooltip-bg);color:var(--ink);border-color:var(--line);box-shadow:var(--shadow)}
.filter-input{background:var(--code);border-color:var(--line);color:var(--ink)}
.quick-glossary .tooltip-term,.tt{color:var(--accent);border-bottom-color:var(--line)}
.quick-glossary .tooltip-term{background:var(--chip-bg);border-color:var(--line)}
.gate-id{background:var(--surface-3);color:var(--accent)}
.dashboard-grid strong,.mini-cols strong{color:var(--accent)}
.dashboard-grid span,.mini-cols p,.folder-list a span,.summary-list span{color:var(--muted)}
.summary-list strong,.output-card h3,.family-block h3{color:var(--ink)}
.note{background:var(--note-bg);color:var(--note-fg);border-left-color:var(--warn)}
.note strong{color:var(--ink)}
.workpad{background:var(--workpad-bg);color:var(--ink)}
.timeline-item::before{background:var(--accent);box-shadow:0 0 0 6px var(--layer-1)}
.timeline-item::after{background:var(--line)}
.ref-link,.path-link,.kpi-chip span,.table-scroll table a{color:var(--accent)}
.status-pill.success{color:var(--good);border-color:rgba(22,163,74,0.35)}
.status-pill.warning{color:var(--warn);border-color:rgba(217,119,6,0.35)}
.status-pill.neutral{color:var(--muted);border-color:var(--line)}

/* =============================================================================
   ♿ HTML LIGHT  -  corrections de contraste EPC
   ============================================================================= */
:root{
  --accent:#0369a1;
  --accent-strong:#075985;
  --chip-accent-bg:#dbeafe;
  --chip-accent-border:#bfdbfe;
  --stat-bg:linear-gradient(180deg, rgba(255,255,255,.98), rgba(234,242,255,.92));
}

a,
section h2,
.ref-link,
.path-link,
.kpi-chip span,
.table-scroll table a,
.quick-glossary .tooltip-term,
.tt{
  color:var(--accent-strong);
}

.stat{
  background:var(--stat-bg);
}

.stat strong{
  color:var(--accent-strong);
}

.stat span,
.stat p{
  color:var(--muted);
}

.kpi-chip strong,
.term-en,
.d3-tooltip strong{
  color:var(--ink);
}

.status-pill.success{
  color:#166534;
  border-color:rgba(22,101,52,0.24);
  background:rgba(220,252,231,0.92);
}

.status-pill.warning{
  color:#9a3412;
  border-color:rgba(154,52,18,0.24);
  background:rgba(255,237,213,0.92);
}

.status-pill.neutral{
  color:#475569;
  border-color:rgba(71,85,105,0.18);
  background:rgba(241,245,249,0.92);
}

.d3-focus-ring{
  stroke:var(--accent-strong);
}


/* =============================================================================
   🔢 TABLEAUX OFFRE EPC — colonnes numériques alignées à droite
   =============================================================================
   Objectif:
   - Uniformiser la lecture des colonnes Charge / Taux / Prix / Montant.
   - Stabiliser l’alignement des valeurs monétaires et volumétriques.
   - Conserver un rendu compact sans retour à la ligne sur les cellules chiffrées.
   ============================================================================= */
th.ta-right,
td.ta-right{
  text-align:right;
  font-variant-numeric:tabular-nums;
}

td.ta-right{
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
  hyphens:none;
}
