/* AI Showreel — design system. Consulting-grade, evidence-forward. Light + dark. */
:root {
  --bg: #f7f6f3; --surface: #ffffff; --ink: #14181f; --ink-soft: #4a5261; --ink-faint: #656d7a;
  --line: #e4e1d9; --line-soft: #eeece6;
  --accent: #1b4dff; --accent-soft: #eaefff;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --gA: #0e7a4f; --gA-bg: #e2f3ea; --gB: #1b4dff; --gB-bg: #e7ecff;
  --gC: #b8791b; --gC-bg: #f8efdb; --gD: #7a828f; --gD-bg: #eef0f2;
  --flow-edge: #b9c0cc; --shadow: 0 1px 2px rgba(20,24,31,.06), 0 8px 24px rgba(20,24,31,.05);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116; --surface: #161b23; --ink: #eef1f6; --ink-soft: #b3bcca; --ink-faint: #7b8494;
    --line: #262d38; --line-soft: #1e242e; --accent: #6d8bff; --accent-soft: #1a2540;
    --gA: #4cc38a; --gA-bg: #122b21; --gB: #6d8bff; --gB-bg: #1a2540;
    --gC: #e0a94a; --gC-bg: #2e2513; --gD: #9aa3b1; --gD-bg: #222833;
    --flow-edge: #3a434f; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1116; --surface: #161b23; --ink: #eef1f6; --ink-soft: #b3bcca; --ink-faint: #7b8494;
  --line: #262d38; --line-soft: #1e242e; --accent: #6d8bff; --accent-soft: #1a2540;
  --gA: #4cc38a; --gA-bg: #122b21; --gB: #6d8bff; --gB-bg: #1a2540;
  --gC: #e0a94a; --gC-bg: #2e2513; --gD: #9aa3b1; --gD-bg: #222833; --flow-edge: #3a434f;
}
:root[data-theme="light"] {
  --bg: #f7f6f3; --surface: #ffffff; --ink: #14181f; --ink-soft: #4a5261; --ink-faint: #656d7a;
  --line: #e4e1d9; --accent: #1b4dff; --accent-soft: #eaefff; --flow-edge: #b9c0cc;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1120px; margin: 0 auto; padding: 0 24px 80px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.005em; text-wrap: balance; }
p { text-wrap: pretty; }
/* longueur de ligne confortable pour les textes de lecture (~65-70 caracteres) */
.lede, .block p, .prose p, .section-head p, .card-pattern, .pattern, .callout p { max-width: 68ch; }

/* header */
.site-head {
  max-width: 1120px; margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.brand { color: var(--ink); font-weight: 700; font-size: 18px; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); }
.brand-sub { font-weight: 400; font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0; }
.site-head nav { display: flex; gap: 22px; font-size: 14.5px; font-weight: 500; }
.site-head nav a { color: var(--ink-soft); }

/* hero */
.hero { padding: 48px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 44px; }
.hero h1 { font-family: var(--serif); font-size: clamp(32px, 5.4vw, 58px); font-weight: 600; margin: 0 0 22px; max-width: 16ch; line-height: 1.08; }
.hero h1 em { color: var(--accent); font-style: italic; }
.lede { font-size: clamp(17px, 2.2vw, 21px); color: var(--ink-soft); max-width: 66ch; margin: 0 0 28px; line-height: 1.5; }
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.hero-stats div { font-size: 14px; color: var(--ink-faint); }
.hero-stats strong { display: block; font-family: var(--serif); font-size: 34px; color: var(--ink); font-weight: 600; }
.hero-pm h1 { color: var(--ink); }
.hero-pm { border-color: var(--gC); }

/* sections */
.section { margin: 56px 0; }
.section-head { margin-bottom: 24px; }
.section-head h2 { font-family: var(--serif); font-size: 30px; font-weight: 600; margin: 0 0 6px; }
.section-head p { color: var(--ink-soft); margin: 0; font-size: 15.5px; }

/* badges */
.grade { font-family: var(--mono); font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; letter-spacing: .02em; }
.grade-A { color: var(--gA); background: var(--gA-bg); }
.grade-B { color: var(--gB); background: var(--gB-bg); }
.grade-C { color: var(--gC); background: var(--gC-bg); }
.grade-D { color: var(--gD); background: var(--gD-bg); }
.vivant { font-size: 12px; font-weight: 500; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 6px; }
.vivant .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gD); }
.v-ok .dot { background: var(--gA); box-shadow: 0 0 0 3px var(--gA-bg); }
.v-warn .dot { background: var(--gC); box-shadow: 0 0 0 3px var(--gC-bg); }
.v-bad .dot { background: #c9432f; }
.echec-badge { font-size: 11.5px; font-weight: 600; color: #fff; background: var(--gC); padding: 3px 9px; border-radius: 6px; }

/* coverage matrix */
.matrix-wrap { overflow-x: auto; }
.matrix { border-collapse: separate; border-spacing: 4px; width: 100%; min-width: 560px; }
.matrix th { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); padding: 6px 10px; text-align: left; }
.matrix .col-h { text-align: center; }
.matrix .row-h { text-align: left; white-space: nowrap; }
.cell { width: 100px; height: 52px; border-radius: 8px; text-align: center; vertical-align: middle; }
.cell.empty { background: repeating-linear-gradient(45deg, var(--line-soft), var(--line-soft) 6px, transparent 6px, transparent 12px); border: 1px dashed var(--line); }
.cell.filled { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cell.filled a { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); display: block; line-height: 52px; }
.cell.filled a:hover { text-decoration: none; color: var(--accent); }
.cell.g-A { border-left: 3px solid var(--gA); }
.cell.g-B { border-left: 3px solid var(--gB); }
.cell.g-C { border-left: 3px solid var(--gC); }
.matrix-legend { font-size: 12.5px; color: var(--ink-faint); margin-top: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lg { display: inline-block; width: 22px; height: 14px; vertical-align: middle; }

/* brand logo (with monogram fallback) */
.brand-logo { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--surface); border: 1px solid var(--line); }
.logo-mono { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 600; font-size: 16px; color: #fff; background: hsl(var(--h), 42%, 45%); }
.logo-img { position: relative; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 5px; }
.brand-logo.big { width: 60px; height: 60px; border-radius: 13px; }
.brand-logo.big .logo-mono { font-size: 22px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease; display: block; }
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(20,24,31,.08), 0 16px 40px rgba(20,24,31,.1); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-badges { display: flex; gap: 8px; align-items: center; }
.card h3 { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.card-pattern { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-result { font-size: 14px; color: var(--ink); padding-top: 12px; border-top: 1px solid var(--line-soft); }
.card-result strong { font-family: var(--serif); font-size: 20px; color: var(--accent); }
.card-result strong.cr-long { font-family: var(--sans); font-size: 14.5px; font-weight: 700; }
.card-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12px; color: var(--ink-faint); }

/* fiche */
.fiche { max-width: 960px; margin: 0 auto; }
.back { font-size: 14px; color: var(--ink-soft); display: inline-block; margin: 8px 0 24px; }
.fiche-top { padding-bottom: 26px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; }
.fiche-top-main { min-width: 0; }
.headline-stat { flex-shrink: 0; text-align: right; max-width: 300px; padding: 20px 24px; background: var(--accent-soft); border-radius: var(--radius); }
.hs-val { font-family: var(--serif); font-size: clamp(28px, 4vw, 40px); font-weight: 600; color: var(--accent); line-height: 1.05; letter-spacing: -.02em; }
.hs-val.hs-long { font-family: var(--sans); font-size: clamp(19px, 2.6vw, 24px); font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.hs-metric { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 8px; }
.hs-src { font-size: 11.5px; color: var(--ink-faint); font-style: italic; margin-top: 8px; }
.hs-src a { font-family: var(--mono); font-size: 10px; font-style: normal; }
.headline-stat.hs-echec { background: var(--gC-bg); }
.headline-stat.hs-echec .hs-val { color: var(--gC); }
@media (max-width: 780px) { .fiche-top { flex-direction: column; } .headline-stat { text-align: left; max-width: none; width: 100%; } }
.badges { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.fiche-title { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.fiche-top h1 { font-family: var(--serif); font-size: clamp(30px, 5vw, 46px); font-weight: 600; margin: 0; }
.pattern { font-size: 18px; color: var(--ink-soft); margin: 0 0 20px; max-width: 64ch; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 12.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; color: var(--ink); display: inline-flex; gap: 6px; }
.chip-k { color: var(--ink-faint); }

.fiche-cols { display: grid; grid-template-columns: 1fr 300px; gap: 40px; margin-top: 36px; align-items: start; }
.block { margin-bottom: 40px; }
.block h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0 0 12px; }
.block p { color: var(--ink-soft); margin: 0 0 12px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { margin: 0; }
.grade-inline { font-size: 12px; vertical-align: middle; }

/* results */
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.result-val { font-family: var(--serif); font-size: 23px; font-weight: 600; color: var(--accent); line-height: 1.2; min-height: 56px; }
.result-val.rv-long { font-family: var(--sans); font-size: 16px; font-weight: 700; line-height: 1.35; letter-spacing: 0; }
.result-metric { font-size: 13.5px; color: var(--ink); margin: 4px 0 10px; font-weight: 500; }
.result-cite { font-size: 12px; color: var(--ink-faint); font-style: italic; margin-top: auto; padding-top: 8px; }
.result-cite a { font-style: normal; font-family: var(--mono); font-size: 11px; }
.preuve-just { font-size: 13.5px; color: var(--ink-faint); border-left: 2px solid var(--line); padding-left: 12px; }

/* flow */
.flow-mode { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; }
.flow-documente { color: var(--gA); background: var(--gA-bg); }
.flow-approche_type { color: var(--gC); background: var(--gC-bg); }
.approche-note { font-size: 13.5px; color: var(--gC); background: var(--gC-bg); padding: 10px 14px; border-radius: 10px; }
.flow-wrap { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); overflow-x: auto; }
.flow-svg { width: 100%; height: auto; display: block; min-width: 480px; }
.flow-node { filter: drop-shadow(0 1px 2px rgba(20, 24, 31, .05)) drop-shadow(0 6px 14px rgba(20, 24, 31, .08)); }
.flow-node rect { fill: var(--surface); stroke: var(--line); stroke-width: 1.25; }
.flow-accent { fill: var(--ink-faint); stroke: none; }
.flow-node.n-data-source .flow-accent { fill: var(--accent); }
.flow-node.n-modele-ia .flow-accent { fill: var(--gA); }
.flow-node.n-paid-platform .flow-accent { fill: var(--gB); }
.flow-node.n-crm .flow-accent, .flow-node.n-cdp .flow-accent { fill: var(--gC); }
.flow-node.n-humain .flow-accent { fill: var(--gD); }
.flow-label { fill: var(--ink); font-family: var(--sans); font-size: 12px; font-weight: 600; }
.flow-tool { fill: var(--ink-faint); font-family: var(--mono); font-size: 9.5px; }
.flow-edge-label { fill: var(--accent); font-family: var(--sans); font-size: 10px; font-style: italic; }

/* operational walkthrough */
.ops-tag { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 6px; }
.ops-meta { display: flex; gap: 30px; margin-bottom: 20px; flex-wrap: wrap; }
.ops-kv span { font-size: 12px; color: var(--ink-faint); display: block; }
.ops-kv strong { font-size: 14.5px; }
.ops-steps { list-style: none; margin: 0; padding: 0; }
.ops-steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.ops-steps li:first-child { border-top: none; }
.ops-num { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--ink); }
.ops-etape { font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ops-body p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.ops-acteur { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 5px; }
.act-ia .ops-acteur { color: var(--gA); background: var(--gA-bg); }
.act-ia .ops-num { border-color: var(--gA); color: var(--gA); }
.act-data .ops-acteur { color: var(--gB); background: var(--gB-bg); }
.act-data .ops-num { border-color: var(--gB); color: var(--gB); }
.act-mkt .ops-acteur { color: var(--gC); background: var(--gC-bg); }
.act-mkt .ops-num { border-color: var(--gC); color: var(--gC); }
.act-agence .ops-acteur, .act-client .ops-acteur, .act-autre .ops-acteur { color: var(--ink-soft); background: var(--line-soft); }
.ops-signal { margin-top: 16px; padding: 14px 16px; background: var(--bg); border-radius: 10px; border-left: 3px solid var(--ink-faint); }
.ops-signal span { font-size: 12px; font-weight: 600; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; }
.ops-signal p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink-soft); }

/* inference / post-mortem separation */
.block-infere { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.infere-tag { font-size: 11px; font-weight: 600; color: var(--ink-faint); background: var(--line-soft); padding: 4px 10px; border-radius: 6px; text-transform: uppercase; letter-spacing: .04em; }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; margin-bottom: 20px; }
.rep-grid h4 { font-size: 13px; margin: 0 0 8px; color: var(--ink); }
.rep-grid ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-soft); }
.rep-grid li { margin-bottom: 4px; }
.rep-foot { display: flex; gap: 30px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.rep-kv span { font-size: 12px; color: var(--ink-faint); display: block; }
.rep-kv strong { font-size: 15px; }
.rep-score { margin: 16px 0; display: grid; gap: 8px; }
.score-row { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 10px; font-size: 12.5px; }
.score-lbl { color: var(--ink-soft); }
.score-track { height: 7px; background: var(--line-soft); border-radius: 4px; overflow: hidden; }
.score-fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.score-num { font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); text-align: right; }
.rep-first { font-size: 14px; color: var(--ink); margin: 8px 0 0; }

.block-pm { background: var(--gC-bg); border: 1px solid var(--gC); border-radius: var(--radius); padding: 24px; }
.block-pm h4 { font-size: 14px; margin: 18px 0 6px; display: flex; align-items: center; gap: 8px; }
.block-pm h4:first-of-type { margin-top: 0; }
.block-pm p { color: var(--ink); }
.pm-tag { font-size: 11px; font-weight: 600; color: #fff; background: var(--gC); padding: 4px 10px; border-radius: 6px; }
.src-flag { font-size: 10px; font-weight: 600; color: var(--gA); background: var(--gA-bg); padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; }
.infere-flag { font-size: 10px; font-weight: 600; color: var(--ink-faint); background: var(--surface); padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: .03em; }
.pm-verdict { margin-top: 18px; padding: 16px; background: var(--surface); border-radius: 10px; border-left: 3px solid var(--accent); }
.pm-verdict span { font-size: 12px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
.pm-verdict p { margin: 6px 0 0; }

/* sidebar */
.fiche-side { display: grid; gap: 16px; position: sticky; top: 20px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; box-shadow: var(--shadow); }
.side-card h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin: 0 0 12px; font-weight: 600; }
.side-kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13.5px; }
.side-kv span { color: var(--ink-soft); }
.side-note { font-size: 12.5px; color: var(--ink-faint); margin: 10px 0 0; line-height: 1.5; }
.side-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.side-tags li { font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; color: var(--ink-soft); }
.side-tags.tools li.tool-chip { padding: 0; }
.side-tags.tools li.tool-chip:not(:has(a)) { padding: 4px 8px; }
.tool-chip a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; color: var(--ink); font-weight: 500; }
.tool-chip a:hover { text-decoration: none; color: var(--accent); }
.tool-chip img { width: 14px; height: 14px; border-radius: 3px; }

/* cross-industrie : le coeur du produit */
.cross-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--accent); border-radius: 10px; font-size: 13.5px; color: var(--ink); }
.cross-banner:hover { text-decoration: none; box-shadow: var(--shadow); }
.cb-proof strong { color: var(--accent); }
.cb-gap { color: var(--gC); font-weight: 500; }
.cb-arrow { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.related-gap { margin-top: 14px; font-size: 14px; color: var(--ink-soft); padding: 12px 16px; background: var(--gC-bg); border-radius: 10px; }
.related-gap strong { color: var(--gC); }

/* le radar / veille */
.veille-list { display: grid; gap: 6px; }
.veille-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.veille-row:hover { text-decoration: none; border-color: var(--accent); }
.vr-main { flex: 1; min-width: 0; }
.vr-marque { font-weight: 600; color: var(--ink); font-size: 15px; }
.vr-pattern { font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.vr-date { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); white-space: nowrap; }

/* résumé citable (GEO) */
.citable, .citable-lead { }
.citable-lead { font-size: 17px; color: var(--ink); background: var(--accent-soft); border-radius: var(--radius); padding: 16px 20px; margin: 0 0 24px; line-height: 1.55; }

/* "L'essentiel" : resume scannable en puces (lecture rapide, surtout mobile) */
.essentiel { margin: 4px 0 30px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.essentiel h2 { font-family: var(--sans); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin: 0 0 14px; }
.essentiel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.essentiel li { position: relative; padding-left: 24px; font-size: 16px; line-height: 1.5; color: var(--ink); }
.essentiel li::before { content: ''; position: absolute; left: 3px; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.report-tools { margin-top: 4px; }
.report-tools .tool-chip span { padding: 6px 12px; }
.report-tools b { color: var(--accent); font-family: var(--mono); font-size: 12px; }

/* page outils : la stack réelle */
.tool-bars { display: grid; gap: 8px; }
.tool-row { display: grid; grid-template-columns: 260px 1fr 40px; align-items: center; gap: 14px; }
.tool-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-name a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.tool-name a:hover { color: var(--accent); }
.tool-logo { width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; }
.tool-track { height: 12px; background: var(--line-soft); border-radius: 6px; overflow: hidden; }
.tool-fill { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.tool-count { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); text-align: right; }
.tool-matrix { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 640px; }
.tool-matrix th { font-size: 12px; font-weight: 600; color: var(--ink-soft); padding: 6px 8px; }
.tool-matrix .col-h { text-align: center; vertical-align: bottom; }
.tool-matrix .row-h { text-align: left; white-space: nowrap; font-weight: 500; color: var(--ink); }
.tool-matrix .row-h img { width: 14px; height: 14px; border-radius: 3px; vertical-align: middle; margin-right: 6px; }
.mcell { width: 90px; height: 40px; text-align: center; border-radius: 6px; font-family: var(--serif); font-weight: 600; font-size: 15px; color: var(--ink); background: color-mix(in srgb, var(--accent) calc(var(--i, 0) * 70%), var(--surface)); }
:root[data-theme="dark"] .mcell, :root:not([data-theme="light"]) .mcell { color: #fff; }
.mcell:empty { background: var(--line-soft); }

@media (max-width: 640px) { .tool-row { grid-template-columns: 150px 1fr 32px; } .tool-name { font-size: 12.5px; } }

/* media : le cas en action */
.media-tag { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 6px; }
.video-frame { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.media-img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.media-cap { font-size: 12.5px; color: var(--ink-faint); margin: 10px 0 0; }

/* couche perception */
.block-perception { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.percep-tag { font-size: 11px; font-weight: 600; color: var(--gA); background: var(--gA-bg); padding: 4px 10px; border-radius: 6px; }
.p-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.p-stat { background: var(--bg); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; }
.p-stat-val { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--accent); line-height: 1.1; }
.p-stat-label { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.p-stat-year { color: var(--ink-faint); }
.percep-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 14px 0; }
.percep-cols h4 { font-size: 13px; margin: 0 0 8px; }
.percep-cols ul { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-soft); }
.percep-cols li { margin-bottom: 4px; }
.percep-rouge h4 { color: #c9432f; }
.p-sources { font-size: 12px; color: var(--ink-faint); margin: 10px 0 0; }
.percep-more { font-size: 13px; margin: 12px 0 0; }
.pays-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pays-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.pays-card h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 10px; }
.pays-lecture { font-size: 13px; color: var(--ink-soft); }

/* page patterns */
.pattern-group { margin: 44px 0; padding-top: 26px; border-top: 1px solid var(--line); }
.pg-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.pg-head h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 0; }
.pg-stats { font-size: 13.5px; color: var(--ink-soft); }
.pg-stats strong { font-family: var(--serif); font-size: 18px; color: var(--accent); }
.pg-industries { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ind-chip { font-size: 12px; padding: 5px 11px; border-radius: 20px; }
.ind-chip.covered { background: var(--gA-bg); color: var(--gA); font-weight: 600; }
.ind-chip.open { background: repeating-linear-gradient(45deg, var(--line-soft), var(--line-soft) 5px, transparent 5px, transparent 10px); border: 1px dashed var(--line); color: var(--ink-faint); }
.pg-gap { font-size: 13.5px; color: var(--gC); margin: 0 0 16px; font-weight: 500; }
.pg-gap.pg-full { color: var(--gA); }

/* stack technique en détail */
.tech-detail { margin-top: 16px; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.tech-detail h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); margin: 0 0 10px; }
.tech-detail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tech-detail li { font-size: 13.5px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tech-detail a { color: var(--ink); }
.tech-detail a:hover strong { color: var(--accent); }
.tech-cat { font-family: var(--mono); font-size: 9.5px; font-weight: 600; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; background: var(--line-soft); color: var(--ink-soft); }
.tech-llm { background: var(--gA-bg); color: var(--gA); }
.tech-plateforme { background: var(--gB-bg); color: var(--gB); }
.tech-integrateur { background: var(--gC-bg); color: var(--gC); }
.tech-note { font-size: 12.5px; color: var(--ink-faint); }

/* playbook */
.playbook { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.playbook h4 { font-size: 13px; margin: 0 0 12px; }
.playbook ol { list-style: none; margin: 0; padding: 0; position: relative; }
.playbook ol::before { content: ''; position: absolute; left: 74px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.playbook li { display: grid; grid-template-columns: 64px 1fr; gap: 22px; padding: 8px 0; position: relative; }
.playbook li::after { content: ''; position: absolute; left: 70px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.pb-phase { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--accent); text-align: right; padding-top: 2px; }
.pb-body { font-size: 13.5px; }
.pb-body strong { display: block; color: var(--ink); }
.pb-livrable { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }

/* related pattern cards */
.block-related { border-top: 1px solid var(--line); padding-top: 26px; }
.related-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.side-ue .ue-flag { font-size: 14px; font-weight: 600; text-transform: capitalize; }
.side-ue.ue-oui .ue-flag { color: var(--gA); }
.side-ue.ue-oui_avec_adaptations .ue-flag { color: var(--gC); }
.side-ue.ue-non .ue-flag { color: #c9432f; }
.side-people .li-company { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 12px; }
.li-ic { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: #0a66c2; color: #fff; border-radius: 3px; font-size: 10px; font-weight: 700; font-family: var(--sans); }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.people li { font-size: 13.5px; }
.people a { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink); }
.people a:hover { color: var(--accent); }
.person-noli { font-weight: 600; color: var(--ink); }
.person-role { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 1px; margin-left: 25px; }
.person-src { font-family: var(--mono); font-size: 10px; color: var(--accent); background: var(--accent-soft); padding: 1px 5px; border-radius: 3px; }
.agences { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.agences-h { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-faint); display: block; margin-bottom: 10px; }
/* source reliability tiers */
.fiab { font-family: var(--mono); font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; margin-left: 6px; white-space: nowrap; }
.fiab-t1 { color: var(--gA); background: var(--gA-bg); }
.fiab-t2 { color: var(--gC); background: var(--gC-bg); }
.fiab-t3 { color: var(--ink-soft); background: var(--line-soft); }
.fiab-t4 { color: var(--ink-faint); background: var(--line-soft); }
.visual-pending { font-size: 12px; color: var(--ink-faint); background: var(--bg); border: 1px dashed var(--line); border-radius: 8px; padding: 20px; text-align: center; }
.side-visual img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }

/* sources */
.block-sources { border-top: 1px solid var(--line); padding-top: 30px; }
.sources { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.sources li { padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.src-ref { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 4px; margin-right: 8px; }
.src-meta { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 3px; }
.src-archive { font-family: var(--mono); font-size: 11px; margin-left: 8px; }
.src-archive.pending { color: var(--ink-faint); }

/* methodology prose */
.prose { max-width: 700px; margin: 0 auto; }
.prose h1 { font-family: var(--serif); font-size: clamp(32px, 5vw, 48px); font-weight: 600; margin: 30px 0 20px; line-height: 1.1; }
.prose h1 .is-product { color: var(--accent); font-style: italic; }
.prose h2 { font-family: var(--serif); font-size: 25px; font-weight: 600; margin: 40px 0 12px; }
.prose p { color: var(--ink-soft); line-height: 1.72; }
.grades-legend { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.grades-legend li { font-size: 14px; color: var(--ink-soft); }
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 20px 24px; margin: 30px 0; }
.callout p { color: var(--ink); margin: 0; }
.empty-note { color: var(--ink-faint); font-style: italic; }

/* feedback */
.feedback { max-width: 960px; margin: 10px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; background: var(--accent-soft); border-radius: var(--radius); padding: 22px 26px; }
.feedback h3 { font-size: 17px; margin: 0 0 6px; color: var(--ink); }
.feedback p { margin: 0; font-size: 13.5px; color: var(--ink-soft); max-width: 60ch; }
.feedback-btn { flex-shrink: 0; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: 8px; white-space: nowrap; }
.feedback-btn:hover { text-decoration: none; filter: brightness(1.08); }
.foot-links { font-size: 13px; margin: 0 0 8px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); max-width: 1120px; margin: 40px auto 0; padding: 30px 24px 60px; }
.site-foot p { font-size: 13px; color: var(--ink-soft); margin: 0 0 8px; max-width: 80ch; }
.foot-meta { font-size: 12px; color: var(--ink-faint); }

@media (max-width: 780px) {
  .fiche-cols { grid-template-columns: 1fr; }
  .fiche-side { position: static; }
  .site-head { padding: 16px; }
  .brand-sub { display: none; }
}

/* --- passe UI/UX (ui-ux-pro-max + usability-review + web-design-guidelines) 2026-07-13 --- */
/* accessibilite clavier : etat focus visible partout ou on peut cliquer/naviguer */
a:focus-visible, button:focus-visible, .card:focus-visible, .feedback-btn:focus-visible,
.veille-row:focus-visible, .cross-banner:focus-visible, .cell.filled a:focus-visible,
.tool-name a:focus-visible, .site-head nav a:focus-visible, .brand:focus-visible,
.back:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 5px; text-decoration: none;
}
::selection { background: var(--accent-soft); color: var(--ink); }
html { scroll-behavior: smooth; }

/* affordances de survol coherentes (feedback d'interaction) */
.site-head nav a { transition: color .12s ease; }
.site-head nav a:hover { color: var(--accent); }
.cell.filled { transition: transform .12s ease, box-shadow .12s ease; }
.cell.filled:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(20,24,31,.08), 0 12px 28px rgba(20,24,31,.1); }
.tool-row:hover .tool-name a { color: var(--accent); }

/* respect de la preference systeme "moins d'animation" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .card:hover, .cell.filled:hover { transform: none; }
}

/* --- passe templates (web-design-guidelines + design-principles) 2026-07-13 --- */
html { color-scheme: light dark; }
a, button, summary, [role="button"], [tabindex] { touch-action: manipulation; }
[id] { scroll-margin-top: 24px; }
/* skip-link clavier : hors ecran jusqu'au focus */
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); transition: top .16s ease; }
.skip:focus { top: 12px; text-decoration: none; }
main:focus, main:focus-visible { outline: none; }
/* onglet de nav actif : "vous etes ici" */
.site-head nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
/* cibles tactiles confortables sur mobile */
@media (max-width: 780px) {
  .site-head nav a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* filtre de la liste de cas (clic sur une case de la matrice) */
.cas-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.cf-btn { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.cf-btn:hover { border-color: var(--accent); color: var(--accent); }
.cf-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cf-count { margin-left: 4px; font-size: 13.5px; color: var(--ink-faint); }

/* ===== OPTIMISATION MOBILE (trafic ~80% mobile) ===== */
/* garde-fous globaux : jamais de scroll horizontal parasite, mots longs coupables */
html, body { overflow-x: hidden; }
body { overflow-wrap: break-word; }
.src-meta, .src-ref, .result-cite a, .hs-src a, .tech-detail a, .sources a, .vr-pattern, .card-pattern { overflow-wrap: anywhere; }
a, button { -webkit-tap-highlight-color: rgba(27, 77, 255, .12); }

@media (max-width: 780px) {
  main { padding: 0 16px 56px; }
  /* header en colonne + nav en bande scrollable (les 7 items restent atteignables au pouce) */
  .site-head { flex-direction: column; align-items: stretch; gap: 8px; padding: 14px 16px 0; }
  .site-head nav { width: 100%; min-width: 0; max-width: 100vw; gap: 22px; flex-wrap: nowrap; white-space: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; font-size: 15px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .site-head nav::-webkit-scrollbar { display: none; }
  .site-head nav a { flex: 0 0 auto; min-height: 40px; display: inline-flex; align-items: center; }
  /* titres et sections : moins d'espace perdu, tailles calibrees pour petit ecran */
  .hero { padding: 22px 0 18px; margin-bottom: 30px; }
  .section { margin: 42px 0; }
  .section-head h2 { font-size: 24px; }
  .section-head p { font-size: 15px; }
  .block h2 { font-size: 20px; }
  .fiche-top h1 { font-size: 28px; }
  .fiche-title { gap: 12px; }
  .pattern { font-size: 16px; }
  .prose h2 { font-size: 21px; }
  .hero-stats { gap: 24px; }
  .card-pattern { font-size: 14.5px; }
  /* CTA et filtre : empiles, bouton pleine largeur (cible tactile confortable) */
  .feedback { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px; }
  .feedback-btn { width: 100%; text-align: center; min-height: 46px; display: flex; align-items: center; justify-content: center; }
  .cas-filter { gap: 7px; }
  .cf-btn { padding: 8px 13px; font-size: 13.5px; }
  .site-foot { padding: 26px 16px 48px; }
}

@media (max-width: 640px) {
  /* matrice : cellules plus compactes -> plus de colonnes visibles avant scroll */
  .matrix { min-width: 452px; border-spacing: 3px; }
  .cell { width: 74px; height: 46px; }
  .cell.filled a { font-size: 18px; line-height: 46px; }
  .matrix th { font-size: 11.5px; padding: 4px 5px; }
  /* listes en une colonne, stats de fiche moins geantes */
  .cards { grid-template-columns: 1fr; }
  .results { grid-template-columns: 1fr 1fr; }
  .hs-val { font-size: 34px; }
}
