/* CréditSimulateur — feuille de style unique. Compact, minimal, accent cobalt.
   Polices auto-hébergées (licence OFL, aucune requête vers un tiers). */

@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/assets/fonts/bricolage-grotesque-wght.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #5f6368;
  --line: #e4e4e0;
  --accent: #0b3cd1;        /* cobalt */
  --accent-strong: #0829a0;
  --accent-soft: #e8edfb;
  --on-accent: #ffffff;
  --ok: #157347;
  --ok-soft: #e4f3ea;
  --ko: #b42318;
  --ko-soft: #fbe9e7;
  --warn: #8a4b00;
  --warn-soft: #fdf1dc;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Bricolage Grotesque", var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1120px;
  /* Séries des graphiques (validées : scripts/validate_palette.js, surface claire) — la couleur suit l'entité */
  --series-1: #2a78d6; /* capital / prix */
  --series-2: #eb6834; /* intérêts */
  --series-3: #1baf7a; /* assurance */
  --series-4: #eda100; /* frais */
  --series-5: #e87ba4;
  --grid: #ececea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121314;
    --surface: #1b1c1e;
    --text: #ececea;
    --muted: #a3a6ab;
    --line: #2d2f33;
    --accent: #6d8dff;
    --accent-strong: #8aa3ff;
    --accent-soft: #1d2642;
    --on-accent: #0a0f24;
    --ok: #4cc38a;
    --ok-soft: #14301f;
    --ko: #ff7b6b;
    --ko-soft: #3a1c18;
    --warn: #f0b45a;
    --warn-soft: #3a2a12;
    --shadow: none;
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --grid: #2a2c30;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h2 { font-size: 1.35rem; margin-top: 1.6em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small { font-size: .85em; color: var(--muted); }
code { font-family: var(--font-mono); font-size: .9em; }

.wrap { width: min(var(--wrap), 100% - 32px); margin: 0 auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: var(--on-accent); font-family: var(--font-mono); font-size: .95rem; }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 9px; border-radius: 6px; font-size: .9rem; font-weight: 500; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); background: var(--accent-soft); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; color: var(--text); font: inherit; }
@media (max-width: 1100px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; padding-bottom: 8px; }
  .nav.is-open { display: flex; }
}

main { padding: 28px 0 48px; }

/* Breadcrumb, lead, prose */
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 70ch; }
.prose { max-width: 72ch; margin-top: 2.2rem; }
.hint { font-size: .85rem; color: var(--muted); margin: .4rem 0 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 1rem 0 1.5rem; }

/* Hero (accueil) */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; margin-bottom: 2rem; }
.hero-rates { font-size: .9rem; color: var(--muted); }
.hero-rates span { white-space: nowrap; }
.hero-rates b { color: var(--text); font-weight: 600; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.hero-art { display: block; width: 100%; max-width: 520px; height: auto; margin-top: 18px; }
.hero-art-ground { stroke: var(--line); stroke-width: 2; }
.hero-art-house path, .hero-art-house rect { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.hero-art-house .hero-art-door { fill: var(--accent-soft); }
.hero-art-house .hero-art-window { fill: var(--surface); stroke-width: 3; }
.hero-art-knob { fill: var(--accent); }
@media (max-width: 860px) { .hero-art { display: none; } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.grid-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 1.5rem 0; }
@media (max-width: 1080px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .grid-cards { grid-template-columns: 1fr; } }
.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s; }
.card-link:hover { border-color: var(--accent); }
.card-link h2 { margin: 0; font-size: 1.1rem; }
.card-link p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.card-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.card-link:hover .card-icon { background: var(--accent); color: var(--on-accent); }
.icon { display: block; flex: none; }
.card-cta { color: var(--accent); font-weight: 600; font-size: .9rem; }

/* Formulaires */
.sim-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; margin-top: 1.2rem; }
@media (max-width: 860px) { .sim-layout { grid-template-columns: 1fr; } }
.calc { display: flex; flex-direction: column; gap: 14px; }
.calc h2 { margin-top: .4rem; font-size: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: .86rem; font-weight: 600; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 540px) { .field-row, .field-row-3 { grid-template-columns: 1fr; } }
.input-unit { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); overflow: hidden; }
.input-unit:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-unit input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 500 1rem var(--font-mono); padding: 9px 10px; outline: none; }
.input-unit span { padding: 0 10px; color: var(--muted); font-size: .85rem; border-left: 1px solid var(--line); align-self: stretch; display: flex; align-items: center; background: var(--surface); }
select { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; padding: 9px 10px; }
.calc-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.calc-inline .field { flex: 1 1 120px; }
.calc-wide { }
.table-form input { width: 100%; }
.row-label { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.btn-icon { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 6px; }
.btn-icon:hover { color: var(--ko); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px; font: 600 .95rem var(--font-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-secondary { background: var(--surface); color: var(--accent); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-block { width: 100%; }

/* Résultats */
.results { position: sticky; top: 72px; }
@media (max-width: 860px) { .results { position: static; } }
.result-main { display: flex; flex-direction: column; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.result-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.result-value { font-family: var(--font-mono); font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 500; color: var(--accent); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
.result-value small { font: 500 .45em var(--font-body); color: var(--muted); margin-left: 4px; }
.result-sub { font-size: .88rem; color: var(--muted); }
.calc-quick .result-main { border-top: 1px solid var(--line); padding-top: 12px; border-bottom: 0; margin-bottom: 0; }
.kv { display: grid; gap: 6px; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; border-bottom: 1px dashed var(--line); padding: 5px 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; font-family: var(--font-mono); font-size: .95rem; text-align: right; white-space: nowrap; }
.kv dd small { font-family: var(--font-body); white-space: normal; }
.verdict { font-weight: 600; }
.verdict-ok { color: var(--ok); }
.verdict-ko { color: var(--ko); }
.verdict-box { border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.verdict-box.verdict-ok { background: var(--ok-soft); color: inherit; }
.verdict-box.verdict-ko { background: var(--ko-soft); color: inherit; }
.verdict-box p { margin: 0 0 4px; }
.results-wide { margin-top: 16px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
.compare h2 { margin-top: 0; font-size: 1rem; color: var(--muted); }

/* Stats (pages programmatiques) */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 1.2rem 0; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat-value { font-family: var(--font-mono); font-size: 1.35rem; color: var(--accent); white-space: nowrap; }

/* Tableaux */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .5rem 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg); position: sticky; top: 0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-num td, .table-num th:not(:first-child) { text-align: right; }
.table-num td:first-child, .table-num th:first-child { text-align: left; }
.table-num td { font-family: var(--font-mono); font-size: .88rem; white-space: nowrap; }
.table-num td:first-child { font-family: var(--font-body); }
.table-dense th, .table-dense td { padding: 5px 10px; }
.row-year td { background: var(--accent-soft); }
.row-current td { background: var(--accent-soft); font-weight: 600; }
.table-form th, .table-form td { padding: 6px 8px; }

/* Partenaires */
.partners { margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.partners-head h2 { margin-top: 0; }
.partners-head p { color: var(--muted); max-width: 70ch; }
.partners-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.partner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.partner-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.partner h3 { margin: 0; }
.partner p { margin: 0; font-size: .9rem; color: var(--muted); flex: 1; }
.partner-unconfigured { outline: 2px dashed var(--ko); outline-offset: -2px; }
.badge { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; background: var(--accent-soft); color: var(--accent); padding: 3px 7px; border-radius: 999px; white-space: nowrap; }
.partners-note { font-size: .8rem; color: var(--muted); margin-top: 10px; }

/* FAQ */
.faq { margin-top: 2.4rem; max-width: 76ch; }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-family: var(--font-head); }
.faq details p { margin: 8px 0 0; color: var(--muted); }

/* Liens connexes */
.related { margin-top: 2rem; }
.link-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.link-grid a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-decoration: none; font-weight: 600; }
.link-grid small { font-family: var(--font-mono); font-weight: 400; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: .84rem; color: var(--muted); }
.site-footer p { max-width: 90ch; }
.legal-credit { color: var(--text); }
.footer-links a { color: var(--muted); }
.copyright { margin-top: 1rem; }

.error-page { max-width: 60ch; }

/* Impression */
@media print {
  .site-header, .site-footer, .partners, .faq, .toolbar, .calc, .breadcrumb, .btn { display: none !important; }
  main { padding: 0; }
  .table-scroll { border: 0; overflow: visible; }
  .table thead th { position: static; }
  body { background: #fff; color: #000; font-size: 11px; }
}


/* ---------- Ajouts : moteur exact, verdict, sources, accessibilité ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--font-mono); font-size: .88rem; }
.h3 { font-size: 1.05rem; margin: 1.2rem 0 .5rem; }
.ok { color: var(--ok); }
.ko { color: var(--ko); }
.sim-layout-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.field-group { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 14px; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.field-group legend { font-family: var(--font-head); font-weight: 700; font-size: .95rem; padding: 0 6px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.segmented label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; cursor: pointer; font-size: .92rem; }
.segmented label + label { border-left: 1px solid var(--line); }
.segmented label:has(input:checked) { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.segmented input { accent-color: var(--accent); }
.borrower { display: flex; flex-direction: column; gap: 10px; }
.borrower[hidden] { display: none; }
.borrower-title { margin: 0; font-weight: 600; font-size: .9rem; }
details.more { border-top: 1px dashed var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--accent); }
details.more[open] summary { margin-bottom: 10px; }
.kv .kv-strong dt { color: var(--text); font-weight: 600; }
.kv .kv-strong dd { font-weight: 600; }
.kv-small dt, .kv-small dd { font-size: .85rem; }
.usury { margin: 12px 0 0; font-size: .9rem; padding: 8px 10px; border-radius: 8px; }
.usury.ok { background: var(--ok-soft); color: inherit; }
.usury.ko { background: var(--ko-soft); color: inherit; }
.verdict-panel { margin-top: 16px; border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); }
.verdict-panel h2 { margin: 0 0 .3em; font-size: 1.15rem; }
.verdict-ok { border-left: 5px solid var(--ok); }
.verdict-warn { border-left: 5px solid var(--warn); }
.verdict-ko { border-left: 5px solid var(--ko); }
.verdict-panel.verdict-ok h2 { color: var(--ok); }
.verdict-panel.verdict-warn h2 { color: var(--warn); }
.verdict-panel.verdict-ko h2 { color: var(--ko); }
.findings, .levers { margin: .6em 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.finding { font-size: .92rem; padding: 6px 8px; border-radius: 6px; }
.finding-bloquant { background: var(--ko-soft); }
.finding-hors_norme, .finding-risque { background: var(--warn-soft); }
.finding-info { background: var(--bg); }
.levers li { font-size: .92rem; padding-left: 14px; position: relative; }
.levers li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.sources { margin-top: 2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 12px 16px; }
.sources summary { cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-family: var(--font-head); font-weight: 700; }
.sources-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; font-family: var(--font-body); }
.sources[open] summary { margin-bottom: 8px; }
.status { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.status-confirme { background: var(--ok-soft); color: var(--ok); }
.status-a_confirmer { background: var(--warn-soft); color: var(--warn); }
.status-estimation { background: var(--accent-soft); color: var(--accent); }
.table-sources td, .table-sources th { font-size: .84rem; vertical-align: top; }
.table-sources th[scope="row"] { font-weight: 500; }
.table-num th[scope="row"] { font-family: var(--font-body); font-weight: 500; text-align: left; }
.table-tall { max-height: 70vh; overflow-y: auto; }
[data-live-region].is-loading { opacity: .55; transition: opacity .15s; }
@media (max-width: 860px) { .sim-layout-wide { grid-template-columns: 1fr; } }
@media print { .sources { display: none; } .table-tall { max-height: none; overflow: visible; } }

.table-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Graphiques (HTML/CSS serveur, Charts.php) ---------- */
.chart { margin: 0 0 16px; }
.chart-plot { position: relative; }
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; padding: 0; font-size: .84rem; color: var(--text); }
.chart-legend li { display: inline-flex; align-items: center; gap: 6px; }
.chart-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.chart-caption { font-size: .8rem; color: var(--muted); margin-top: 6px; }
/* Colonnes empilées */
.chart-columns { height: 220px; margin-left: 46px; }
.chart-yaxis { position: absolute; inset: 0; }
.chart-gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--grid); }
.chart-gridline:first-child { border-top-color: var(--line); }
.chart-tick { position: absolute; right: calc(100% + 8px); top: -.6em; font: 500 11px/1.1 var(--font-body); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-cols { position: absolute; inset: 0; display: flex; align-items: stretch; }
.chart-cols .chart-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column-reverse; align-items: center; }
.chart-cols .chart-seg { width: min(24px, calc(100% - 2px)); flex: none; }
.chart-cols .chart-seg + .chart-seg { margin-bottom: 2px; }
.chart-cols .chart-seg:last-child { border-radius: 4px 4px 0 0; }
.chart-cols .chart-col:hover .chart-seg { filter: brightness(1.08); }
.chart-cols .chart-col:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.chart-xaxis { display: flex; margin-left: 46px; padding-top: 6px; font: 500 11px var(--font-body); color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-xaxis span { flex: 1 1 0; min-width: 0; text-align: center; }
@media (max-width: 640px) { .chart-xaxis .is-minor { visibility: hidden; } .chart-columns { height: 180px; } }
/* Courbes */
.chart-lines { height: 220px; margin-left: 52px; margin-right: 12px; }
.chart-linesvg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--surface); pointer-events: none; }
.chart-hitzone { position: absolute; top: 0; bottom: 0; }
.chart-hitzone:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.chart-xaxis-abs { position: relative; height: 22px; margin-left: 52px; margin-right: 12px; display: block; }
.chart-xaxis-abs span { position: absolute; transform: translateX(-50%); white-space: nowrap; flex: none; }
/* Barre 100 % */
.chart-breakdown { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.chart-title { font-size: .86rem; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.chart-title strong { color: var(--text); font-family: var(--font-mono); font-weight: 500; }
.chart-stackbar { display: flex; height: 22px; gap: 2px; }
.chart-stackbar .chart-seg { min-width: 2px; }
.chart-stackbar .chart-seg:last-child { border-radius: 0 4px 4px 0; }
.chart-stackbar .chart-seg:hover { filter: brightness(1.08); }
.chart-legend-values { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 10px 0 0; }
.chart-legend-values li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; }
.chart-legend-value { font: 500 .84rem var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.chart-legend-value small { color: var(--muted); font-family: var(--font-body); margin-left: 4px; display: inline-block; min-width: 3.2em; }
/* Info-bulle */
.chart-tip { position: absolute; z-index: 20; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); padding: 8px 10px; font-size: .8rem; line-height: 1.45; white-space: nowrap; transform: translate(-50%, calc(-100% - 8px)); }
.chart-tip b { display: block; font-weight: 600; margin-bottom: 2px; }
@media (forced-colors: active) { .chart-swatch, .chart-seg { forced-color-adjust: none; } }
@media print { .chart-tip { display: none; } .chart-seg, .chart-swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.param-value { font-size: .84rem; min-width: 18ch; max-width: 46ch; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* Chroniques */
.kicker { font-size: .82rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.prose-report .lead { color: var(--text); font-size: 1.12rem; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.row-total th, .row-total td { font-weight: 600; border-top: 2px solid var(--line); }
.report-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.report-list a { font-weight: 600; }

/* Widget intégrable et page d'intégration */
.widget-body { background: var(--surface); margin: 0; }
.widget { padding: 16px; max-width: 420px; }
.widget-form { display: grid; gap: 10px; }
.widget-result { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.widget-result .chart-breakdown { border-top: 0; margin-top: 8px; padding-top: 0; }
.widget-credit { font-size: .78rem; color: var(--muted); margin: 12px 0 0; }
.embed-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 2rem; }
@media (max-width: 860px) { .embed-layout { grid-template-columns: 1fr; } }
.code-box { width: 100%; font: 500 .8rem/1.5 var(--font-mono); border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); padding: 10px; resize: vertical; }
input[type="color"] { border: 0; background: transparent; width: 56px; height: 38px; padding: 4px; }
.intro-note { max-width: 70ch; color: var(--text); }
.brief { border-top: 2px solid var(--text); padding-top: 14px; margin: 2rem 0 1rem; max-width: 76ch; }
.brief-title { font-size: 1.5rem; line-height: 1.2; margin: 2px 0 8px; }
.brief-title a { color: var(--text); text-decoration: none; }
.brief-title a:hover { color: var(--accent); }
.brief p { margin: 0; }
.finding { display: flex; gap: 8px; align-items: baseline; }
.finding-mark { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--muted); transform: translateY(-1px); }
.finding-bloquant .finding-mark { background: var(--ko); }
.finding-hors_norme .finding-mark, .finding-risque .finding-mark { background: var(--warn); }
.chart-xaxis-abs .is-last { transform: translateX(-100%); }
.chart-xaxis-abs .is-first { transform: none; }
