/* Champs lexicaux : une page de graphiques dense, fond clair, noir et gris, un seul accent.
   Les quatre couleurs de bloc (--b-*) sont les seules autres teintes. Pas de dégradé, pas d'ombre. */
.cf { padding-block: 24px 72px; font-variant-numeric: tabular-nums; }
.cf h1, .cf h2, .cf h3, .cf h4 { text-wrap: balance; }
.cf-head { border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.cf-title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 14px; }
.cf-bar { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.cf-tabs { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.cf-tabs a { text-decoration: none; padding: 8px 0; font-weight: 700; color: var(--gray); border-bottom: 3px solid transparent; min-height: 40px; }
.cf-tabs a:hover { color: var(--ink); }
.cf-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.cf-week { display: flex; align-items: center; gap: 6px; }
.cf-week button { width: 40px; height: 40px; background: none; border: 1px solid var(--ref); cursor: pointer; font-size: 18px; }
.cf-week button:hover:not(:disabled) { border-color: var(--ink); }
.cf-week button:disabled { opacity: .3; cursor: default; }
.cf-week select { height: 40px; font: inherit; padding: 0 10px; border: 1px solid var(--ref); background: var(--paper); }
.cf-demo { margin-top: 12px; padding: 8px 12px; background: var(--accent-wash); color: #7a240f; font-size: var(--t-small); border-left: 3px solid var(--accent); }
.cf-empty { color: var(--gray); margin-top: 24px; }
.cf-chip { margin-top: 14px; font-size: var(--t-small); color: var(--gray); }
.cf-chip b { color: var(--ink); }

/* figure : titre descriptif, sous-titre, graphique, source ------------------------------------ */
.cf-fig { margin-top: 32px; min-width: 0; }
.cf-fig h2 { font-size: 20px; line-height: 1.2; letter-spacing: -0.015em; border-top: 1px solid var(--ink); padding-top: 8px; max-width: 70ch; }
.cf-fig h3 { font-size: var(--t-body); margin: 18px 0 8px; }
.cf-fig h4 { font-size: var(--t-small); margin: 14px 0 4px; text-transform: none; }
.cf-sub { font-size: var(--t-small); color: var(--ink-2); margin: 4px 0 12px; max-width: 78ch; }
.cf-src { font-size: 12px; color: var(--gray); margin-top: 10px; max-width: 100ch; line-height: 1.4; }
.cf-fig .chart { margin-top: 6px; }
.cf-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); }
.cf-two-wide { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.cf-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--t-small); color: var(--ink-2); margin: 10px 0 0; }
.cf-legend .dot { margin-right: 4px; }
.cf-legend i { display: inline-block; vertical-align: middle; margin-right: 5px; }
.lg-c { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.lg-o { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); opacity: .3; }
.lg-l { width: 16px; height: 0; border-top: 2px solid var(--ref); }
.lg-n { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); }

/* contrôles ------------------------------------------------------------------------------------ */
.cf-btn { display: inline-block; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); padding: 0 16px; min-height: 40px; line-height: 38px; font-weight: 700; cursor: pointer; text-decoration: none; margin-top: 12px; }
.cf-btn:hover { background: #2a2a2a; color: var(--paper); }
.cf-btn.ghost { background: none; color: var(--ink); }
.cf-btn.ghost:hover { background: var(--band); color: var(--ink); }
.cf-links { display: flex; flex-wrap: wrap; gap: 0 10px; }
.cf-ok { margin-left: 10px; font-size: var(--t-small); color: #1f6b3a; }
.cf-seg { display: inline-flex; border: 1px solid var(--ink); margin: 4px 0 8px; }
.cf-seg button { background: none; border: 0; padding: 0 14px; min-height: 36px; cursor: pointer; font-weight: 700; }
.cf-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.cf-fig :focus-visible, .cf-head :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 1. grappes ------------------------------------------------------------------------------------ */
.cf-table { margin-top: 4px; }
.cf-rows { list-style: none; padding: 0; margin: 0; }
.cf-row { display: grid; grid-template-columns: 2rem minmax(0, 1.5fr) minmax(150px, 1.5fr) 4.6rem 5.6rem 6.6rem minmax(100px, 1fr); gap: 0 14px; align-items: center; padding: 7px 0 7px 6px; border-top: 1px solid var(--ref); }
.cf-row.cf-hd { border-top: 0; font-size: 12px; color: var(--gray); padding-block: 4px; align-items: end; line-height: 1.2; }
.cf-rows .cf-row { cursor: pointer; border-left: 3px solid transparent; }
.cf-rows .cf-row:hover { background: var(--band); }
.cf-rows .cf-row.sel { border-left-color: var(--accent); background: var(--band); }
.cf-row .r { text-align: right; }
.cf-row .rk { font-weight: 700; color: var(--gray); }
.cf-row .nm { min-width: 0; display: grid; }
.cf-pick { all: unset; cursor: pointer; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.cf-pick:hover { text-decoration: underline; }
.cf-pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cf-row small { color: var(--gray); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-row .sc svg { display: block; overflow: visible; }
.cf-base { stroke: var(--ink); stroke-width: 1; }
.cf-err line { stroke: var(--ink); stroke-width: 1.5; }
.stt { font-size: var(--t-small); white-space: nowrap; }
.stt i { font-style: normal; font-size: 10px; }
.stt.s-nouveau { color: var(--accent-ink); font-weight: 700; }
.stt.s-montant { font-weight: 700; }
.stt.s-déclinant, .stt.s-stable { color: var(--gray); }
.bl { display: flex; height: 8px; gap: 1px; background: var(--paper); }
.bl i { display: block; height: 100%; min-width: 0; }
.cf-detail { border-top: 0; }
.cf-detail > h2 { border-top: 2px solid var(--ink); }
.cf-words { max-width: 60ch; }
.cf-words .nw { font-weight: 700; color: var(--accent-ink); }
.cf-words sup { font-size: 10px; }
.cf-mini { width: 100%; max-width: 480px; font-size: var(--t-small); margin-top: 8px; }
.cf-mini th, .cf-mini td { padding: 4px 10px 4px 0; font-weight: 400; }
.cf-mini thead th { color: var(--gray); }
.cf-mini .num, .cf-tbl .num { text-align: right; }
.cf-yaml { margin: 0; background: var(--band); color: var(--ink); border: 1px solid var(--ref); white-space: pre-wrap; overflow-wrap: anywhere; }

/* 2. toile --------------------------------------------------------------------------------------- */
.cf-toile { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 var(--gap); align-items: start; }
.cf-net svg { display: block; overflow: visible; background: var(--paper); }
.cf-edge { stroke: var(--ref); stroke-linecap: round; }
.cf-edge.hot { stroke: var(--ink); }
.cf-node { cursor: pointer; outline: none; }
.cf-node circle:not(.selring) { fill: var(--ink); stroke: var(--paper); stroke-width: 1; }
.cf-node text { font-size: 12px; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; stroke-linejoin: round; font-weight: 400; }
.cf-node.is-new circle { stroke: var(--accent); stroke-width: 3; }
.cf-node.is-new text { font-weight: 700; }
.cf-node.sel text { font-weight: 700; text-decoration: underline; }
.cf-node .selring { display: none; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 2; }
.cf-node.sel .selring { display: block; }
.cf-node:focus-visible circle { stroke: var(--accent); stroke-width: 4; }
.cf-side { min-width: 0; }
.cf-side .cf-fig { margin-top: 32px; }
.cf-side h2:focus { outline: none; }
.cf-new { font-size: 11px; font-weight: 700; color: var(--accent-ink); border: 1px solid var(--accent); padding: 0 5px; vertical-align: middle; letter-spacing: 0; }
.cf-split { display: flex; height: 10px; gap: 1px; margin-top: 6px; }
.cf-split i { display: block; height: 100%; }
.cf-bloc-tw { border-top: 4px solid var(--c); margin-top: 14px; padding-top: 2px; }
.cf-cand { margin-top: 8px; }
.cf-who { display: flex; align-items: center; gap: 8px; font-size: var(--t-small); }
.cf-who small { color: var(--gray); }
.cf-tw { margin: 6px 0 0; padding: 6px 0 6px 12px; border-left: 2px solid var(--ref); }
.cf-tw p { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.cf-tw footer { font-size: 12px; color: var(--gray); margin-top: 3px; }

/* tableaux ----------------------------------------------------------------------------------------- */
.cf-tbl { font-size: var(--t-small); }
.cf-tbl th, .cf-tbl td { padding: 6px 12px 6px 0; font-weight: 400; }
.cf-tbl thead th { color: var(--gray); font-size: 12px; }
.cf-tbl tbody th { font-weight: 700; }
.cf-heat { font-size: var(--t-small); border-collapse: separate; border-spacing: 0 2px; }
.cf-heat th { padding: 4px 10px 4px 0; font-weight: 700; white-space: nowrap; }
.cf-heat thead th { color: var(--gray); font-weight: 400; font-size: 12px; text-align: right; }
.cf-heat thead th:first-child { text-align: left; }
.cf-heat tr.sel th { border-left: 3px solid var(--accent); padding-left: 6px; }
.hc { text-align: right; padding: 6px 10px; min-width: 76px; color: var(--ink); }
.hc.dk { color: var(--paper); }
.cf-heat td.hc { border-left: 2px solid var(--paper); }
.cf-lex .zc { white-space: nowrap; }
.zb { display: inline-block; width: 70px; height: 8px; background: var(--band); vertical-align: middle; margin-right: 8px; }
.zb i { display: block; height: 100%; background: var(--gray); }
.cf-lex .zc .num { display: inline-block; min-width: 2.4em; }
.cf-data { margin-top: 10px; font-size: var(--t-small); }
.cf-data summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.cf-data .cf-tbl { white-space: nowrap; }

/* tendances ---------------------------------------------------------------------------------------- */
.cf-ln path { fill: none; }
.cf-grid { stroke: #e9e8e4; }
.cf-axis { stroke: var(--ink); }
.cf-now { stroke: var(--ink); stroke-dasharray: 2 3; }
.cf-lab text { font-size: 12px; cursor: default; }
.cf-lab.emph text { font-weight: 700; }
.cf-lab[role="button"] { cursor: pointer; outline: none; }
.cf-lab[role="button"]:hover text { text-decoration: underline; }
.cf-lab[role="button"]:focus-visible text { text-decoration: underline; fill: var(--accent-ink); }
.cf-newlist { list-style: none; padding: 0; margin: 0; }
.cf-newlist li { padding: 6px 0; border-top: 1px solid var(--ref); display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
.cf-newlist li:first-child { border-top: 0; }
.cf-newlist li span { color: var(--gray); font-size: var(--t-small); }
.cf-newlist .dot { align-self: center; }

/* blocs --------------------------------------------------------------------------------------------- */
.cf-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.cf-colbloc { border-top: 5px solid var(--c); min-width: 0; }
.cf-colbloc h3 { margin: 6px 0 0; font-size: 17px; }
.cf-colbloc .cf-sub { margin: 0 0 8px; }
.cf-wl { list-style: none; padding: 0; margin: 0; font-size: var(--t-small); }
.cf-wl li { display: grid; grid-template-columns: minmax(0, 1fr) 2.2em; gap: 0 6px; padding: 4px 0 3px; border-top: 1px solid #ecebe7; }
.cf-wl .t { font-weight: 700; overflow-wrap: anywhere; }
.cf-wl .n { text-align: right; color: var(--gray); }
.cf-wl .b { grid-column: 1 / -1; height: 3px; background: var(--band); }
.cf-wl .b i { display: block; height: 100%; background: var(--c); }

/* porosité ------------------------------------------------------------------------------------------- */
.cf-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: 8px; }
.cf-kpis > div { border-top: 5px solid var(--c); padding-top: 6px; display: grid; gap: 2px; }
.cf-kpis .k { font-size: var(--t-small); color: var(--ink-2); }
.cf-kpis b { font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.03em; line-height: 1.05; }
.cf-kpis .dl { font-size: 12px; color: var(--gray); }

@media (max-width: 1100px) {
  .cf-toile { grid-template-columns: minmax(0, 1fr); }
  .cf-two-wide { grid-template-columns: minmax(0, 1fr); }
  .cf-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
}
@media (max-width: 860px) {
  .cf-row { grid-template-columns: 1.6rem minmax(0, 1fr) auto auto; grid-template-areas: "rk nm stt stt" ". sc sc sc" ". st sh bl"; gap: 4px 10px; padding-block: 10px; }
  .cf-row.cf-hd { display: none; }
  .cf-row .rk { grid-area: rk; } .cf-row .nm { grid-area: nm; } .cf-row .stt { grid-area: stt; justify-self: end; }
  .cf-row .sc { grid-area: sc; } .cf-row .st { grid-area: st; text-align: left; } .cf-row .sh { grid-area: sh; text-align: left; } .cf-row .bl { grid-area: bl; align-self: center; min-width: 90px; }
  .cf-row .st::before { content: "Stabilité "; color: var(--gray); }
  .cf-row .sh::before { content: "Part "; color: var(--gray); }
  .cf-row .st, .cf-row .sh { font-size: var(--t-small); }
  .cf-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cf { padding-top: 16px; }
  .cf-cols { grid-template-columns: minmax(0, 1fr); }
  .cf-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 16px; }
  .cf-fig h2 { font-size: 18px; }
  .cf-week { width: 100%; }
  .cf-week select { flex: 1; min-width: 0; }
  .cf-tabs { gap: 2px 14px; }
  .cf-lex .zb { width: 36px; }
  .cf-lex th, .cf-lex td { padding-right: 8px; }
  .hc { min-width: 0; padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) { .cf * { transition: none !important; } }

/* barre du haut : quatre vues tiennent à 360 px */
@media (max-width: 520px) {
  .views { margin-left: 0; width: 100%; flex-wrap: wrap; gap: 2px; }
  .views a { padding: 6px 9px; }
}
body:has(#view-fields:not([hidden])) .weeknav { display: none; }
@media (max-width: 520px) { .wk-select { min-width: 0; width: 0; } }

/* ===== page Semaine ============================================================================
   Échelle : le mot (display) > titres de section (26 px) > titres de repli (20 px) > texte (16 px) > notes (13 px).
   Un seul accent (--accent). Les quatre couleurs de bloc ne servent qu'aux blocs. */
.sw { padding-block: 20px 72px; font-variant-numeric: tabular-nums; }
.sw h1, .sw h2, .sw h3 { text-wrap: balance; }
.sw-meta { font-size: var(--t-small); color: var(--gray); }
.sw-meta b { color: var(--ink); }
.sw-warn { color: var(--accent-ink); font-weight: 700; }
.sw-ok { color: var(--gray); }
.sw-word { padding: clamp(20px, 4vw, 48px) 0 clamp(28px, 4vw, 56px); border-bottom: 2px solid var(--ink); }
.sw-origin { font-weight: 700; display: flex; gap: 10px; align-items: baseline; }
.sw-origin::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; transform: translateY(-1px); align-self: center; }
.sw-tag { font-size: 11px; font-weight: 700; color: var(--accent-ink); border: 1px solid var(--accent); padding: 0 5px; }
.sw-mot { font-size: clamp(56px, 12vw, 176px); font-weight: 700; letter-spacing: -0.05em; line-height: .92; margin: clamp(8px, 1.5vw, 20px) 0 clamp(14px, 2vw, 28px) -0.04em; text-wrap: nowrap; }
.sw-mot .part { display: inline-block; white-space: nowrap; }
.sw-mot-small { font-size: clamp(40px, 7vw, 96px); }
.sw-why { font-size: var(--t-lead); line-height: 1.3; max-width: 44ch; text-wrap: pretty; }
.sw-conf { margin-top: 10px; font-size: var(--t-body); }
.sw-conf b { border: 1px solid currentColor; padding: 0 7px; margin-right: 8px; font-size: var(--t-small); letter-spacing: .02em; }
.conf-solid { color: #1f6b3a; }
.conf-tight { color: var(--ink); }
.conf-weak { color: var(--accent-ink); }
.sw-actions { display: flex; flex-wrap: wrap; gap: 0 10px; margin-top: 8px; }
.sw-yaml { margin-top: 14px; max-width: 70ch; }
.sw-yaml .cf-sub { margin-top: 6px; }
.sw-field, .sw-others, .sw-more { margin-top: clamp(32px, 4vw, 56px); }
.sw h2 { font-size: clamp(22px, 2.2vw, 26px); letter-spacing: -0.02em; line-height: 1.15; }
.sw-field .cf-sub, .sw-others .cf-sub { margin: 4px 0 14px; }
.sw-field-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 var(--gap); align-items: start; }
.sw-field-grid .cf-side .cf-fig { margin-top: 0; }
.sw-hint { margin-top: 0; }
.sw-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: var(--t-small); }
.sw-bars li { display: grid; grid-template-columns: 6.5em minmax(40px, 1fr) 3.6em 4em; gap: 8px; align-items: center; }
.sw-bars .b { height: 8px; background: var(--band); }
.sw-bars .b i { display: block; height: 100%; background: var(--c); }
.sw-bars .v { text-align: right; font-weight: 700; }
.sw-bars .d { color: var(--gray); text-align: right; }
#sw-blocs h3 { font-size: var(--t-small); margin: 20px 0 8px; color: var(--ink-2); }
.cf-row.compact { grid-template-columns: 2rem minmax(0, 1.3fr) minmax(150px, 1.5fr) 6.6rem; }
.sw-list { border-bottom: 1px solid var(--ref); }

/* sections repliées */
.sw-more { border-top: 2px solid var(--ink); }
.sw-fold { border-bottom: 1px solid var(--ref); }
.sw-fold > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 16px 0 16px 4px; align-items: baseline; min-height: 56px; position: relative; padding-right: 32px; }
.sw-fold > summary::-webkit-details-marker { display: none; }
.sw-fold > summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px; font-weight: 400; line-height: 1; color: var(--ink); }
.sw-fold[open] > summary::after { content: "−"; }
.sw-fold > summary:hover .t { text-decoration: underline; text-underline-offset: 4px; }
.sw-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sw-fold .t { font-size: 20px; letter-spacing: -0.015em; grid-column: 1; }
.sw-fold .s { grid-column: 1; font-size: var(--t-small); color: var(--gray); max-width: 90ch; line-height: 1.35; }
.sw-fold-body { padding: 0 0 28px; }
.sw-fold-body .cf-fig { margin-top: 24px; }
.sw-fold-body .cf-fig h2 { font-size: var(--t-lead); }
.sw-fold-body > div > .cf-fig:first-child { margin-top: 8px; }
.sw-method p { max-width: 70ch; margin-top: 8px; }
.sw-fold-body .why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.sw-fold-body .blocs { margin-top: 8px; }
.sw-fold-body .stories { margin-top: 8px; }
.sw-fold-body .story h3 { font-size: 22px; }
.sw-fold-body .method p { max-width: 70ch; }
.sw-fold-body .why h3 { font-size: var(--t-body); }
.sw-fold-body .big-num { font-size: clamp(36px, 4vw, 56px); }
.sw-fold-body .controls { margin-block: 8px; }
.cf-explore-nav { padding-top: 16px; }
.cf-explore-nav .cf-tabs { border-bottom: 2px solid var(--ink); }

@media (max-width: 1100px) { .sw-field-grid { grid-template-columns: minmax(0, 1fr); } .sw-field-grid .cf-side { margin-top: 20px; } }
@media (max-width: 860px) {
  .cf-row.compact { grid-template-columns: 1.6rem minmax(0, 1fr) auto; grid-template-areas: "rk nm stt" ". sc sc"; }
  .sw-fold-body .why { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .top { position: static; }
  .sw { padding-top: 12px; }
  .sw-bars li { grid-template-columns: 5.2em minmax(30px, 1fr) 3.4em; }
  .sw-bars .d { display: none; }
  .sw-actions .cf-btn { width: 100%; text-align: center; }
  .sw-fold .t { font-size: 18px; }
}
.sw-empty { border-bottom: 0; }
.cf-node text.lab-hidden { display: none; }
.sw-hint-h { font-size: var(--t-body); margin: 0 0 4px; }
.sw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-chips button { background: none; border: 1px solid var(--ink); padding: 0 12px; min-height: 36px; cursor: pointer; font-weight: 700; }
.sw-chips button:hover { background: var(--band); }
.sw-chips small { font-weight: 400; color: var(--gray); margin-left: 4px; }
.sw-mot { font-size: clamp(56px, 11vw, 150px); }
