/*
Theme Name: CyberSDF V1
Theme URI: https://cybersdf.org/
Description: Thème de construction CyberSDF, Le Contrôleur éditorial. Intègre le candidat visuel v0.4.0 (intégration 2026-09-14, recette publique v1/design/visual-followup-20260914/integration/).
Version: 0.4.8
Text Domain: cybersdf-v1
*/

/* =========================================================================
 * Tokens : palette conservée, séparations renforcées
 * ========================================================================= */
:root {
  --cs-paper: #F1EFE7;
  --cs-paper-raised: #FFFFFF;
  --cs-paper-muted: #F4F2EA;
  --cs-paper-sunken: #E4E1D5;
  --cs-ink: #111714;
  --cs-ink-soft: #2A3530;
  --cs-control: #146F4E;
  --cs-control-deep: #0F5E42;
  --cs-signal: #F2C14E;
  --cs-signal-soft: #FBE6B0;
  --cs-line: #C8C2B0;
  --cs-line-soft: #DCD7C7;
  --cs-muted: #42524A;
  --cs-on-control: #FFFFFF;
  --cs-code-bg: #18221D;
  --cs-code-fg: #F1EFE7;
  --cs-focus: #111714;
  --cs-font-reading: "Iowan Old Style", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --cs-font-interface: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --cs-font-technical: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --cs-shell: 73.75rem;
  --cs-measure: 70ch;
  --cs-rail: 16.5rem;
  --cs-touch: 2.75rem;
  --cs-rhythm: 1.5rem;
  --cs-rhythm-lg: 2.5rem;
  --cs-rhythm-xl: 4rem;
  --cs-radius-card: 6px;
  --cs-radius-control: 4px;
}

/* =========================================================================
 * Base
 * ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cs-paper);
  color: var(--cs-ink);
  font-family: var(--cs-font-reading);
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
}
a {
  color: var(--cs-control);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  text-decoration-color: color-mix(in oklab, var(--cs-control) 70%, transparent);
  transition: color 140ms ease-out, text-decoration-color 140ms ease-out;
}
a:hover, a:focus-visible { color: var(--cs-control-deep); text-decoration-color: currentColor; }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 3px solid var(--cs-focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Page wrapper */
.cs-shell { width: min(100% - 2rem, var(--cs-shell)); margin-inline: auto; }

/* =========================================================================
 * Masthead + navigation (header)
 * ========================================================================= */
.cs-site-header {
  background: var(--cs-paper);
  border-bottom: 1px solid var(--cs-ink);
  padding: 1.5rem 0 0;
}
.cs-brand {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.cs-brand-link {
  align-items: center;
  color: var(--cs-ink);
  display: inline-flex;
  gap: 0.75rem;
  text-decoration: none;
}
.cs-brand-mark { display: block; flex: 0 0 auto; height: 2.75rem; width: 2.75rem; }
.cs-wordmark {
  color: var(--cs-ink);
  font-family: var(--cs-font-interface);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
}
.cs-tagline {
  margin: 0;
  color: var(--cs-ink-soft);
  font-family: var(--cs-font-interface);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
  max-width: 28ch;
}
.cs-tagline::before {
  content: "";
  display: inline-block;
  width: 0.6rem;
  height: 0.16rem;
  margin-right: 0.5rem;
  margin-bottom: 0.22rem;
  vertical-align: middle;
  background: var(--cs-signal);
}
.cs-nav { margin-top: 1.5rem; border-top: 1px solid var(--cs-line-soft); padding-top: 0.75rem; }
/* Repli du menu mobile : controle purement CSS (case a cocher masquee +
 * etiquette). Sur bureau les deux sont retires et la liste reste en ligne ;
 * sous 760 px l'etiquette ouvre la liste. Le <details> natif a ete ecarte :
 * sur bureau sa boite fermee ne contient pas son contenu (mesure : boite de
 * 13 px pour un contenu de 46 px), la navigation debordait sous le bandeau. */
.cs-nav-toggle, .cs-nav-toggle-label { display: none; }
.cs-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0 0 0.85rem;
  font: 600 0.92rem/1.3 var(--cs-font-interface);
}
.cs-nav a {
  color: var(--cs-ink);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  display: inline-block;
}
.cs-nav a:hover, .cs-nav a:focus-visible { color: var(--cs-ink); border-bottom-color: var(--cs-signal); }
.cs-nav .is-active > a, .cs-nav .current-menu-item > a {
  color: var(--cs-ink);
  border-bottom-color: var(--cs-control);
}
/* Le marqueur `cs-nav-pending` est retiré à l'intégration : la nav servie par
 * cybersdf_v1_nav_fallback() n'émet plus que des liens d'univers publiés.
 * Masquer un univers non publié par CSS était la réponse-symptôme refusée par
 * la critique indépendante (défaut n°8 de CRITIQUE_LIVE_20260914). */
/* Card link wrapper : makes the entire home card clickable. */
.cs-card-link { display: block; text-decoration: none; color: inherit; }
.cs-card-link:hover .cs-card,
.cs-card-link:focus-visible .cs-card { border-color: var(--cs-control); }

/* Recette 2026-09-14 : le gabarit servi n'émet pas de `.cs-card-link`, il
 * remplace la 3e carte par <a class="cs-card"> (cybersdf_v1_activate_automatiser_card).
 * Deux conséquences mesurées au rendu réel :
 *   1) la carte-lien héritait du `text-decoration: underline` global des liens,
 *      visiblement différente des 4 cartes statiques ;
 *   2) aucune règle ne neutralisait le liseré de survol pour les cartes non
 *      cliquables, qui promettaient donc une interaction inexistante.
 * Ci-dessous : mêmes intentions que .cs-card-link, appliquées au gabarit réel. */
.cs-card-list > a.cs-card { text-decoration: none; color: inherit; display: block; }

/* =========================================================================
 * Hero editorial (accueil + hub + article)
 * ========================================================================= */
.cs-eyebrow {
  font: 500 0.92rem/1.4 var(--cs-font-interface);
  letter-spacing: 0;
  text-transform: none;
  color: var(--cs-ink-soft);
  margin: 0 0 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.cs-eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  background: var(--cs-control);
}
.cs-eyebrow-sep { color: var(--cs-line); margin: 0 0.1rem; }

.cs-content {
  max-width: var(--cs-measure);
}
.cs-content h1, .cs-content h2, .cs-content h3, .cs-content h4 {
  font-family: var(--cs-font-interface);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-wrap: balance;
  color: var(--cs-ink);
}
.cs-content h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  margin: 0.4rem 0 1.25rem;
  max-width: 18ch;
}
.cs-content h2 {
  font-size: clamp(1.65rem, 2.4vw, 2.25rem);
  font-weight: 700;
  margin: 3rem 0 1rem;
}
.cs-content h3 {
  font-size: clamp(1.15rem, 1.4vw, 1.35rem);
  font-weight: 700;
  margin: 2rem 0 0.6rem;
}
.cs-content h2 + p, .cs-content h3 + p { margin-top: 0; }
.cs-content p { margin: 0 0 1.1rem; }
.cs-content ul, .cs-content ol { margin: 0 0 1.25rem; padding-left: 1.25rem; }
.cs-content li { margin-bottom: 0.35rem; }
.cs-content strong { font-weight: 700; color: var(--cs-ink); }

.cs-intro {
  font-size: clamp(1.2rem, 1.6vw, 1.4rem);
  line-height: 1.5;
  max-width: 56ch;
  color: var(--cs-ink-soft);
}

/* Signaux visibles de l’accueil : une date issue de WordPress et une
 * formulation conditionnelle sur les références réellement présentes. */
.cs-home-signals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin: 1.75rem 0 0;
  padding: 0.9rem 0;
  border-top: 1px solid var(--cs-ink);
  border-bottom: 1px solid var(--cs-line);
}
.cs-home-signal {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  font: 500 0.86rem/1.45 var(--cs-font-interface);
}
.cs-home-signal-label {
  color: var(--cs-control);
  font: 600 0.72rem/1.3 var(--cs-font-technical);
}
.cs-home-signal-value {
  color: var(--cs-ink);
}

/* Parcours d’entrée : une liste éditoriale, distincte des cartes de contenu. */
.cs-start-here {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cs-ink);
}
.cs-start-here h2 {
  margin: 0 0 0.45rem;
}
.cs-start-heading > p {
  max-width: 52ch;
  margin: 0 0 1.25rem;
  color: var(--cs-ink-soft);
}
.cs-start-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--cs-line);
}
.cs-start-list > li {
  margin: 0;
  border-bottom: 1px solid var(--cs-line);
}
.cs-start-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  color: var(--cs-ink);
  text-decoration: none;
}
.cs-start-list a::after {
  content: "→";
  color: var(--cs-control);
  font: 700 1.2rem/1 var(--cs-font-interface);
  transition: transform 160ms ease-out, color 160ms ease-out;
}
.cs-start-list strong {
  display: block;
  margin-bottom: 0.25rem;
  font: 700 1.05rem/1.2 var(--cs-font-interface);
  letter-spacing: -0.02em;
}
.cs-start-list span {
  display: block;
  color: var(--cs-ink-soft);
  font: 400 0.98rem/1.45 var(--cs-font-reading);
}
.cs-start-list a:hover strong,
.cs-start-list a:focus-visible strong { color: var(--cs-control-deep); }
.cs-start-list a:hover::after,
.cs-start-list a:focus-visible::after { color: var(--cs-control-deep); transform: translateX(0.25rem); }

@media (max-width: 760px) {
  .cs-start-list a {
    grid-template-columns: minmax(0, 1fr);
  }
  .cs-start-list a::after {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
  }
  .cs-start-list strong,
  .cs-start-list span { padding-right: 2rem; }
}

/* =========================================================================
 * Proof ribbon (article / hub)
 * ========================================================================= */
.cs-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  margin: 2rem 0 2.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--cs-ink);
  border-bottom: 1px solid var(--cs-line);
}.cs-proof-item { display: flex; flex-direction: column; gap: 0.35rem; }
.cs-proof-label {
  display: block;
  font: 600 0.78rem/1.4 var(--cs-font-technical);
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--cs-control);
}
.cs-proof-value {
  font: 600 0.95rem/1.45 var(--cs-font-technical);
  color: var(--cs-ink);
}
.cs-proof-empty { color: var(--cs-muted); font-style: italic; }

/* =========================================================================
 * Cards (univeres, ressources)
 * ========================================================================= */
.cs-card-list {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}
.cs-card {
  padding: 1.5rem 1.5rem 1.4rem;
  border: 1px solid var(--cs-line);
  border-radius: var(--cs-radius-card);
  background: var(--cs-paper-raised);
  position: relative;
  transition: border-color 160ms ease-out, transform 160ms ease-out;
}
.cs-card::before {
  content: "";
  position: absolute;
  top: 0; left: 1.5rem; right: 1.5rem;
  height: 2px;
  background: var(--cs-signal);
  opacity: 0.85;
}
.cs-card-list > a.cs-card:hover, .cs-card-list > a.cs-card:focus-visible,
.cs-card-link:hover .cs-card, .cs-card-link:focus-visible .cs-card { border-color: var(--cs-control); }
.cs-card-meta {
  font: 600 0.78rem/1.5 var(--cs-font-technical);
  color: var(--cs-muted);
  margin: 0 0 0.5rem;
}
.cs-card h2, .cs-card h3 {
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
  margin: 0 0 0.4rem;
  letter-spacing: -0.03em;
}
.cs-card h2 a, .cs-card h3 a { color: var(--cs-ink); text-decoration: none; }
.cs-card h2 a:hover, .cs-card h3 a:hover { color: var(--cs-control); text-decoration: underline; }
.cs-card-num {
  font: 600 0.78rem/1 var(--cs-font-technical);
  color: var(--cs-control);
  margin-bottom: 0.6rem;
  display: inline-block;
}

/* =========================================================================
 * Code, quotes, figures
 * ========================================================================= */
.cs-content pre, .cs-content code, .cs-article-body pre, .cs-article-body code { font-family: var(--cs-font-technical); }
.cs-content code:not(pre code), .cs-article-body code:not(pre code) {
  background: var(--cs-paper-muted);
  color: var(--cs-ink);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-size: 0.92em;
}
.cs-code-block {
  display: grid;
  min-width: 0;
  max-width: 100%;
  margin: 1.5rem 0;
}
.cs-code-copy {
  grid-column: 1;
  justify-self: end;
  position: sticky;
  top: 0.5rem;
  z-index: 1;
  min-width: var(--cs-touch);
  min-height: var(--cs-touch);
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--cs-line);
  border-radius: var(--cs-radius-control);
  background: var(--cs-paper-raised);
  color: var(--cs-ink);
  font: 700 0.85rem/1 var(--cs-font-interface);
  cursor: pointer;
  transition: background-color 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out;
}
.cs-code-copy:hover,
.cs-code-copy:focus-visible {
  border-color: var(--cs-signal);
  background: var(--cs-signal-soft);
  color: var(--cs-ink);
}
.cs-code-copy[data-copy-state="copied"] {
  border-color: var(--cs-control);
  background: var(--cs-control);
  color: var(--cs-on-control);
}
.cs-code-copy[data-copy-state="failed"] {
  border-color: var(--cs-signal);
}
.cs-content pre, .cs-article-body pre {
  grid-column: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: pre;
  background: var(--cs-code-bg);
  color: var(--cs-code-fg);
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--cs-signal);
  border-radius: 4px;
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0.5rem 0 0;
}
@media (max-width: 640px) {
  .cs-code-block {
    margin: 1.25rem 0;
  }
  .cs-content pre, .cs-article-body pre {
    padding: 1rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cs-code-copy {
    transition: none;
  }
}
.cs-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--cs-control);
  background: var(--cs-paper-muted);
  color: var(--cs-ink-soft);
  border-radius: 0 4px 4px 0;
}
.cs-content figure { margin: 2rem 0; }
.cs-content figure img { display: block; height: auto; max-width: 100%; border-radius: 4px; }
.cs-content figcaption {
  font: 600 0.82rem/1.5 var(--cs-font-technical);
  color: var(--cs-muted);
  margin-top: 0.6rem;
}
.cs-content img { height: auto; max-width: 100%; border-radius: 4px; }

/* =========================================================================
 * Layout : 2 colonnes au-dessus de 980 px, sinon empilé
 * ========================================================================= */
.cs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cs-rail);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  padding: var(--cs-rhythm-xl) 0;
}
.cs-layout--single { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 980px) {
  .cs-layout { grid-template-columns: minmax(0, 1fr); padding: 2.25rem 0; }
  .cs-rail { margin-top: 2.5rem; }
}

/* =========================================================================
 * Rail latéral (sSommaire, lecture contrôlée)
 * ========================================================================= */
.cs-rail {
  align-self: start;
  position: sticky;
  top: 1.5rem;
  border-top: 4px solid var(--cs-signal);
  padding-top: 1.1rem;
  font: 500 0.92rem/1.55 var(--cs-font-reading);
  color: var(--cs-ink-soft);
  background: var(--cs-paper-muted);
  padding: 1.25rem 1.25rem 1.4rem;
  border-top: 4px solid var(--cs-signal);
  border-radius: 0 4px 4px 0;
}
.cs-rail h2 {
  font: 700 0.82rem/1.3 var(--cs-font-interface);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cs-control);
  margin: 0 0 0.6rem;
}
.cs-rail ol, .cs-rail ul, .cs-toc-inline ol {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  counter-reset: cs-rail-toc;
}
.cs-rail-toc li {
  counter-increment: cs-rail-toc;
  margin: 0;
  padding: 0.35rem 0;
  border-bottom: 1px dotted var(--cs-line);
  font: 500 0.88rem/1.4 var(--cs-font-interface);
}
.cs-rail-toc li::before {
  content: counter(cs-rail-toc, decimal-leading-zero) " / ";
  color: var(--cs-muted);
  font-family: var(--cs-font-technical);
}
.cs-rail-toc a { color: var(--cs-ink); text-decoration: none; }
.cs-rail-toc a:hover, .cs-rail-toc a:focus-visible { color: var(--cs-control); text-decoration: underline; }
.cs-rail-note { font-size: 0.9rem; color: var(--cs-ink-soft); }

/* Sommaire mobile (.cs-toc-inline). Le theme le rend, replie, dans le flux de
 * l'article juste apres la premiere reponse ; sur bureau c'est le rail qui
 * porte le sommaire, donc la regle par defaut le masque. La requete responsive
 * plus bas le rend visible sous 760 px. */
.cs-toc-inline { display: none; }

/* =========================================================================
 * Hero editorial (Home, Hub, Article)
 * ========================================================================= */
.cs-home-hero { max-width: var(--cs-measure); padding: var(--cs-rhythm-xl) 0 0; }
.cs-home-hero h1 { font-size: clamp(2.75rem, 6vw, 5rem); margin-top: 0.5rem; }

.cs-home-univers { border-top: 1px solid var(--cs-ink); margin-top: var(--cs-rhythm-xl); padding-top: var(--cs-rhythm-lg); }
.cs-home-univers h2 { font-size: clamp(1.6rem, 2.2vw, 2rem); margin: 0 0 0.5rem; letter-spacing: -0.03em; }
.cs-home-univers-intro { max-width: 56ch; color: var(--cs-ink-soft); margin: 0 0 1.5rem; }

.cs-universe-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--cs-line);
  border-left: 1px solid var(--cs-line);
}
.cs-universe-list li { border-right: 1px solid var(--cs-line); border-bottom: 1px solid var(--cs-line); }
.cs-universe-list a {
  color: var(--cs-ink);
  display: block;
  min-height: 10rem;
  padding: 1.4rem 1.25rem 1.5rem;
  text-decoration: none;
  background: var(--cs-paper-raised);
  position: relative;
  transition: background-color 180ms ease-out, color 180ms ease-out;
}
.cs-universe-list a::after {
  content: "→";
  position: absolute;
  bottom: 1rem;
  right: 1.25rem;
  color: var(--cs-control);
  font-family: var(--cs-font-interface);
  font-weight: 600;
  transition: transform 180ms ease-out;
}
.cs-universe-list a:hover, .cs-universe-list a:focus-visible {
  background: var(--cs-ink);
  color: var(--cs-on-control);
}
.cs-universe-list a:hover::after, .cs-universe-list a:focus-visible::after {
  transform: translateX(4px);
  color: var(--cs-signal);
}
.cs-universe-num {
  display: block;
  font: 600 0.78rem/1 var(--cs-font-technical);
  color: var(--cs-control);
  margin-bottom: 0.8rem;
}
.cs-universe-list a:hover .cs-universe-num, .cs-universe-list a:focus-visible .cs-universe-num { color: var(--cs-signal); }
.cs-universe-list strong {
  display: block;
  font: 700 clamp(1.2rem, 1.6vw, 1.55rem)/1.15 var(--cs-font-interface);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.cs-universe-list span {
  display: block;
  font: 400 0.96rem/1.5 var(--cs-font-reading);
  color: var(--cs-ink-soft);
  max-width: 32ch;
}
.cs-universe-list a:hover span, .cs-universe-list a:focus-visible span { color: var(--cs-on-control); }

@media (prefers-reduced-motion: reduce) {
  /* La règle d'origine ne visait que `.cs-universe-list` (classe absente du
   * gabarit réellement servi) : la préférence n'était donc pas honorée par le
   * contrat CSS. Garde globale mesurée le 14/09 : transitions et animations
   * ramenées à 0.01 ms pour tous les éléments. */
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .cs-universe-list a, .cs-universe-list a::after { transition: none; }
}

/* =========================================================================
 * Cover image block (article hero)
 * ========================================================================= */
.cs-cover {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 2rem;
  border-radius: 4px;
  background: var(--cs-paper-muted);
  border: 1px solid var(--cs-line);
}
.cs-cover figcaption { color: var(--cs-muted); margin-top: 0.6rem; font-size: 0.85rem; }

/* The duplicate Gutenberg H1 is handled at DOM level by the inject script
 * (it converts the duplicate to a cs-lede paragraph). We do not hide it via
 * CSS : that would mask the structural issue. The remote template cleanup
 * is owned by t_462197d9. */
.cs-content .cs-lede {
  font: 400 clamp(1.15rem, 1.5vw, 1.35rem)/1.55 var(--cs-font-reading);
  color: var(--cs-ink-soft);
  max-width: 60ch;
  margin: 0 0 1.5rem;
}
.cs-content .cs-lede strong { color: var(--cs-ink); }

/* The live theme uses <p class="cs-proof"> for an uppercase eyebrow above
 * the article/hub title (the AI-scaffold pattern). We re-style it as a
 * phrase courte with a leading dash so it reads as context, not as a
 * kicker. The HTML markup stays unchanged; only the visual treatment
 * moves from "tag/uppercase" to "phrase courte". */
.cs-content > .cs-proof,
.cs-content > p.cs-proof {
  font: 500 0.95rem/1.4 var(--cs-font-interface);
  letter-spacing: 0;
  text-transform: none;
  color: var(--cs-ink-soft);
  margin: 0 0 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.cs-content > .cs-proof::before {
  content: "";
  display: inline-block;
  width: 1.75rem;
  height: 1px;
  background: var(--cs-control);
}
.cs-content > .cs-proof { border-bottom: 0; padding-bottom: 0; }

/* When cs-proof-grid is reused on the home page (feature block, not actual
 * proof data), present it as a simple horizontal summary, not as a proof
 * ribbon. Keep the proof-grid concept reserved for articles + hubs where it
 * carries real source/version/test/limit data. */
.cs-home .cs-proof-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem 1.5rem;
  padding: 0;
  margin: 2rem 0 3rem;
  border: 0;
}
.cs-home .cs-proof-item {
  background: transparent;
  border-left: 2px solid var(--cs-signal);
  padding: 0.4rem 0.85rem;
  min-height: 0;
}
.cs-home .cs-proof-label {
  font: 600 0.7rem/1.2 var(--cs-font-technical);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cs-muted);
  margin-bottom: 0.3rem;
}
.cs-home .cs-proof-value {
  font: 400 0.98rem/1.4 var(--cs-font-reading);
  color: var(--cs-ink);
}


/* =========================================================================
 * Footer
 * ========================================================================= */
.cs-site-footer {
  border-top: 1px solid var(--cs-ink);
  padding: 2.25rem 0 3rem;
  margin-top: var(--cs-rhythm-xl);
  font: 500 0.9rem/1.55 var(--cs-font-reading);
  color: var(--cs-ink-soft);
}
.cs-footer-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 0.75fr) minmax(0, 1.25fr);
  gap: 2rem 4rem;
  align-items: start;
}
.cs-footer-intro {
  max-width: 24rem;
}
.cs-footer-signature {
  margin: 0 0 0.85rem;
  color: var(--cs-ink);
  font-size: 1rem;
}
.cs-footer-signature strong {
  display: block;
  font: 800 clamp(1.35rem, 2vw, 1.8rem)/1.1 var(--cs-font-interface);
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}
.cs-site-footer a {
  color: var(--cs-control);
}
.cs-footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 2rem;
}
.cs-footer-group--archives {
  grid-column: 1 / -1;
  border-top: 1px solid var(--cs-line-soft);
  padding-top: 1.25rem;
}
.cs-footer-group h2 {
  margin: 0 0 0.65rem;
  color: var(--cs-ink);
  font: 700 0.8rem/1.25 var(--cs-font-interface);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.cs-footer-list {
  display: grid;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cs-footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
}

@media (max-width: 760px) {
  .cs-site-footer {
    padding: 1.75rem 0 2rem;
  }
  .cs-footer-layout,
  .cs-footer-nav {
    grid-template-columns: 1fr;
  }
  .cs-footer-nav {
    gap: 1.5rem;
  }
  .cs-footer-group--archives {
    grid-column: auto;
  }
  .cs-footer-list a {
    min-height: var(--cs-touch);
  }
}

/* =========================================================================
 * Responsive
 * ========================================================================= */
@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .cs-shell { width: min(100% - 1.25rem, var(--cs-shell)); }
  /* Bandeau : mesure du 15/09 a 390 x 844, 393 px de haut dont 258 px de
   * navigation deroulee, ce qui repoussait le H1 a 86 % de l'ecran. La marque
   * et l'accroche tiennent maintenant sur une ligne, le menu est replie. */
  .cs-site-header { padding-top: 0.85rem; }
  .cs-brand { align-items: center; flex-direction: row; gap: 0.4rem 0.75rem; }
  .cs-brand-mark { height: 2.25rem; width: 2.25rem; }
  .cs-wordmark { font-size: 1.35rem; }
  .cs-tagline { font-size: 0.85rem; line-height: 1.35; max-width: none; }
  .cs-nav { border-top: 1px solid var(--cs-line-soft); margin-top: 0.6rem; padding-top: 0; position: relative; }
  .cs-nav ul { display: none; gap: 0; padding: 0.5rem 0 0.75rem; }
  .cs-nav-toggle:checked ~ ul { display: grid; }
  .cs-nav-toggle {
    display: block;
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .cs-nav-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    justify-content: space-between;
    font: 700 0.95rem/var(--cs-touch) var(--cs-font-interface);
    min-height: var(--cs-touch);
    color: var(--cs-ink);
  }
  .cs-nav-toggle-label::after { content: "+"; font-size: 1.5rem; color: var(--cs-control); }
  .cs-nav-toggle:checked + .cs-nav-toggle-label::after { content: "−"; }
  .cs-nav-toggle:focus-visible + .cs-nav-toggle-label { outline: 3px solid var(--cs-focus); outline-offset: 4px; }
  .cs-nav a { display: block; min-height: var(--cs-touch); padding: 0.85rem 0; border-bottom: 1px solid var(--cs-line-soft); }
  .cs-layout { padding: 2.25rem 0; gap: 2rem; }
  .cs-content h1 { font-size: clamp(2.35rem, 9vw, 3rem); }
  .cs-proof-grid { grid-template-columns: 1fr; gap: 1rem; }
  /* Rail : sous 760 px il passe en position static, donc apres l'article.
   * Mesure du 15/09 : le sommaire s'y trouvait a 92 a 96 % d'une page de 24
   * ecrans, inutilisable. Un rail qui ne porte que le sommaire n'est pas
   * affiche ; le sommaire est rendu dans le flux (.cs-toc-inline). Un rail qui
   * porte une note reste affiche, cette note n'existe nulle part ailleurs. */
  .cs-rail { position: static; padding: 1rem 1rem 1.1rem; }
  .cs-rail--toc-only { display: none; }
  .cs-toc-inline {
    display: block;
    margin: 1.5rem 0;
    border-top: 1px solid var(--cs-line);
    border-bottom: 1px solid var(--cs-line);
  }
  .cs-toc-inline summary {
    display: flex;
    align-items: center;
    cursor: pointer;
    justify-content: space-between;
    font: 700 0.95rem/var(--cs-touch) var(--cs-font-interface);
    list-style: none;
    min-height: var(--cs-touch);
    color: var(--cs-control);
  }
  .cs-toc-inline summary::-webkit-details-marker { display: none; }
  .cs-toc-inline summary::after { content: "+"; font-size: 1.5rem; color: var(--cs-control); }
  .cs-toc-inline[open] summary::after { content: "−"; }
  .cs-home-hero { padding-top: 2rem; }
  .cs-home-hero h1 { font-size: clamp(2.5rem, 11vw, 3.25rem); }
  .cs-universe-list { grid-template-columns: 1fr; }
  .cs-universe-list a { min-height: 0; padding: 1.1rem 1.1rem 1.4rem; }
  .cs-universe-list a::after { right: 1.1rem; bottom: 0.85rem; }
}

/* Accessibility helpers */
.cs-sr-only {
  position: absolute;
  width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* =========================================================================
 * Intégration 2026-09-14 : compatibilité avec le gabarit réellement servi
 * =========================================================================
 * Le candidat v0.4.0 a été écrit contre un prototype où les rubriques de rail
 * étaient des <h2> et où la home portait un conteneur `.cs-home`. Le thème
 * réellement servi (front-page.php, page.php, 14/09) émet :
 *   <p class="cs-byline"><span class="cs-author">…</span> · <time>…</time></p>
 *   <figure class="cs-hero-figure cs-hero-figure--page"><img class="cs-hero-img" …>
 *   <aside class="cs-rail"><strong>…</strong><p>…</p></aside>
 *   <article class="cs-card"><h3>…</h3><p>…</p></article>   (sans lien)
 * Ces classes n'étaient stylées par AUCUNE feuille chargée (ni l'ancienne base
 * 0.1.0, ni assets/home.css). Les règles ci-dessous remplacent exactement ce
 * que l'ancienne base/`home.css` rendaient pour ces classes, avec les tokens
 * Direction A du candidat. Aucune nouvelle couleur, aucun nouveau token.
 * ========================================================================= */

/* Byline auteur + date, émis avant le H1 sur les hubs et les articles. */
.cs-byline {
  margin: 0.9rem 0 0.4rem;
  font: 500 0.9rem/1.5 var(--cs-font-interface);
  color: var(--cs-muted);
}
.cs-byline .cs-author { color: var(--cs-ink); font-weight: 600; }
.cs-byline time { font-variant-numeric: tabular-nums; }

/* Couverture éditoriale (image mise en avant du hub / de l'article). */
.cs-hero-figure { margin: 0 0 1.75rem; }
/* La couverture n'est plus le premier bloc de l'article : le gabarit la pose
 * apres le H1 et sa premiere reponse, pour que le titre tienne dans le premier
 * ecran a 390 px. Elle a donc besoin d'une respiration au-dessus d'elle. */
.cs-hero-figure--page,
.cs-hero-figure--article { margin-top: 1.75rem; }
.cs-hero-img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--cs-line);
  border-radius: 4px;
  background: var(--cs-paper-muted);
}

/* Libellé du rail : le gabarit émet <strong>, l'ancienne base le rendait
 * comme un bloc vert. Conservé en bloc, couleur de contrôle, sans uppercase. */
.cs-rail strong {
  display: block;
  margin: 0 0 0.6rem;
  font: 700 0.85rem/1.35 var(--cs-font-interface);
  letter-spacing: 0.01em;
  color: var(--cs-control);
}

/* home.css legacy tassait le dernier paragraphe des cartes : conservé. */
.cs-card p:last-child { margin-bottom: 0; }

/* Tables de contenu : NI l'ancienne base 0.1.0 NI assets/home.css ne stylaient
 * les <table> des articles, et une table de comparaison provoquait un
 * défilement horizontal de page à 390 px (mesuré le 14/09 : scrollWidth 452 px
 * pour un viewport de 390 px sur /linux/diagnostiquer-connexion/). Règles
 * ci-dessous : largeur bornée + césure des cellules, avec les tokens
 * Direction A. Aucun dépassement de page, la table reste lisible. */
.cs-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-family: var(--cs-font-interface);
  font-size: 0.95rem;
}
.cs-content th, .cs-content td {
  border: 1px solid var(--cs-line);
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.cs-content thead th { background: var(--cs-paper-muted); color: var(--cs-ink); }
.cs-content code { overflow-wrap: anywhere; }

/* Césure du texte courant : une URL nue de 63 caractères
 * (https://www.freedesktop.org/wiki/Software/systemd/resolved/) faisait
 * déborder la page à 390 px (mesuré : scrollWidth 452 px). */
.cs-content p, .cs-content li, .cs-content figcaption { overflow-wrap: anywhere; }
.cs-content a { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .cs-byline { margin-top: 0.75rem; }
}

/* =========================================================================
 * Listes de contenus : accueil « Derniers ajouts » et « Dans cette rubrique »
 * =========================================================================
 * Mêmes cartes et mêmes jetons que le bloc d'univers : aucune nouvelle
 * couleur, aucun nouveau composant. Deux ajouts seulement :
 *   - une variante de grille `.cs-card-list--grid` (2 colonnes dans la mesure
 *     de lecture, 1 colonne sous 760 px) ;
 *   - une vignette `.cs-card-thumb` (taille `cybersdf_card`).
 * Le sélecteur `.cs-content ul.cs-card-list` neutralise la puce et le retrait
 * que `.cs-content ul` applique à toute liste de contenu.
 * ========================================================================= */
.cs-content ul.cs-card-list {
  margin: 1.75rem 0 0;
  padding-left: 0;
}
.cs-card-list--grid {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.cs-card-list > .cs-card-item { margin-bottom: 0; }
.cs-card-list > .cs-card-item > .cs-card-link { display: block; height: 100%; }
.cs-card-list > .cs-card-item > .cs-card-link > .cs-card { height: 100%; }
.cs-card-thumb {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 0.9rem;
  border: 1px solid var(--cs-line);
  border-radius: var(--cs-radius-control);
  background: var(--cs-paper-muted);
}
.cs-card-meta time { font-variant-numeric: tabular-nums; }
.cs-card-list--grid .cs-card p { font-size: 0.98rem; line-height: 1.5; }
/* ============================================================
 * Blocs de contenu : direction A "Le Contrôleur éditorial"
 * Tokens existants uniquement. Aucune nouvelle couleur, aucun
 * nouveau token, aucune police nouvelle. Forme distinctive par
 * variante, pas seulement par couleur.
 *
 * Date : 2026-09-15. Mission : t_1dc19661 (run 234).
 * ============================================================ */

/* --- Blocs d'appel (callout) -------------------------------- */
/* Forme distincte par variante :
 *   --decision : filet latéral épais à gauche + label "Décision"
 *   --warning  : bandeau supérieur épais + label "Attention"
 *   --note     : fond neutre, filet supérieur fin + label "Note"
 * Le label visible distingue la variante même en daltonien. */

.cs-callout {
  position: relative;
  margin: 1.75rem 0;
  padding: 1.1rem 1.4rem 1.15rem 1.4rem;
  border-radius: 4px;
  background: var(--cs-paper-raised);
  color: var(--cs-ink);
}
.cs-callout > :first-child { margin-top: 0; }
.cs-callout > :last-child  { margin-bottom: 0; }

.cs-callout--decision {
  border-left: 4px solid var(--cs-control);
  background: var(--cs-paper-raised);
  padding-left: 1.5rem;
}
.cs-callout--decision::before {
  content: "Décision";
  display: inline-block;
  margin: 0 0 0.55rem 0;
  padding: 0.1rem 0.45rem;
  font: 700 0.72rem/1.3 var(--cs-font-interface);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-control);
  border: 1px solid var(--cs-control);
  border-radius: 2px;
  background: var(--cs-paper);
}

.cs-callout--warning {
  border-top: 4px solid var(--cs-ink);
  background: var(--cs-paper-muted);
}
.cs-callout--warning::before {
  content: "Attention";
  display: inline-block;
  margin: -0.2rem 0 0.55rem 0;
  padding: 0.1rem 0.45rem;
  font: 700 0.72rem/1.3 var(--cs-font-interface);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-ink);
  border: 1px solid var(--cs-ink);
  border-radius: 2px;
  background: var(--cs-paper);
}

.cs-callout--note {
  border-top: 1px solid var(--cs-line);
  background: var(--cs-paper);
}
.cs-callout--note::before {
  content: "Note";
  display: inline-block;
  margin: -0.05rem 0 0.55rem 0;
  padding: 0.1rem 0.45rem;
  font: 600 0.72rem/1.3 var(--cs-font-interface);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-muted);
  border: 1px solid var(--cs-line);
  border-radius: 2px;
  background: var(--cs-paper-raised);
}

/* --- Liste de contrôle (checklist) --------------------------- */
/* Cases dessinées en CSS pur, non cochées (l'état coché n'est
 * pas un livrable V1 : la page sert au lecteur, pas à signer). */

.cs-checklist {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.cs-checklist > li {
  position: relative;
  padding: 0.55rem 0 0.55rem 2.2rem;
  margin: 0;
  border-bottom: 1px solid var(--cs-line);
}
.cs-checklist > li:last-child { border-bottom: 0; }
.cs-checklist > li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.85rem;
  width: 1.1rem;
  height: 1.1rem;
  border: 1.5px solid var(--cs-ink);
  border-radius: 2px;
  background: var(--cs-paper);
}

/* --- Procédure numérotée (steps) ----------------------------- */
/* Compteur CSS pour donner aux étapes un statut différent des
 * <ol> nus. Le label visible ("Étape N") reste en français. */

.cs-steps {
  counter-reset: cs-step;
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.cs-steps > li {
  position: relative;
  padding: 0.25rem 0 1rem 3.25rem;
  margin: 0;
  counter-increment: cs-step;
  min-height: 2.5rem;
}
.cs-steps > li::before {
  content: counter(cs-step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.1rem;
  font: 700 0.95rem/1.2 var(--cs-font-technical);
  letter-spacing: 0.04em;
  color: var(--cs-control);
  min-width: 2.5rem;
  padding-right: 0.5rem;
  text-align: right;
  border-right: 2px solid var(--cs-line);
}
.cs-steps > li:last-child { padding-bottom: 0; }

/* --- Comparaison à deux colonnes ----------------------------- */
/* Tableau "avant / après" lisible à 390 px sans défilement
 * horizontal. Empilage vertical sous 560 px, sinon deux
 * colonnes fixes. */

.cs-compare {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font: 500 0.92rem/1.5 var(--cs-font-interface);
  table-layout: fixed;
}
.cs-compare th,
.cs-compare td {
  border: 1px solid var(--cs-line);
  padding: 0.7rem 0.85rem;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cs-compare th {
  background: var(--cs-paper-muted);
  color: var(--cs-ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cs-compare caption {
  caption-side: bottom;
  font: 500 0.82rem/1.4 var(--cs-font-interface);
  color: var(--cs-muted);
  padding-top: 0.5rem;
  text-align: left;
}

/* --- Schémas HTML lisibles ----------------------------------- */
/* Encadré neutre + grille horizontale + libellé de chaque
 * bloc. Pas d'image générée : le texte reste sélectionnable. */

.cs-schema {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 2rem 0;
  padding: 1.25rem 1.25rem 0.5rem 1.25rem;
  border: 1px solid var(--cs-line);
  border-radius: 4px;
  background: var(--cs-paper-raised);
}
.cs-schema-title {
  display: block;
  margin: 0 0 1rem 0;
  font: 700 0.78rem/1.3 var(--cs-font-interface);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cs-muted);
}
.cs-schema-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem 0;
  border-top: 1px solid var(--cs-line);
}
.cs-schema-row:first-of-type { border-top: 0; padding-top: 0.25rem; }
.cs-schema-row:last-of-type { padding-bottom: 0.5rem; }

.cs-schema-num {
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 0.95rem/1 var(--cs-font-technical);
  letter-spacing: 0.02em;
  color: var(--cs-paper);
  background: var(--cs-ink);
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  margin-top: 0.05rem;
}
.cs-schema-body { min-width: 0; }
.cs-schema-body > :first-child { margin-top: 0; }
.cs-schema-body > :last-child  { margin-bottom: 0.25rem; }
.cs-schema-body code {
  font-family: var(--cs-font-technical);
  font-size: 0.9em;
  background: var(--cs-paper-muted);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
}
.cs-schema-arrow {
  display: flex;
  justify-content: flex-start;
  padding: 0.25rem 0 0.25rem 1.55rem;
  font: 700 1rem/1 var(--cs-font-interface);
  color: var(--cs-control);
}

/* À 390 px, les blocs restent lisibles sans défilement
 * horizontal : la grille 3.5rem / 1fr tient dans 390 px
 * (3.5rem = 56 px + 0.75rem gap + reste). */

@media (max-width: 760px) {
  .cs-callout { padding: 1rem 1rem 1.05rem 1rem; }
  .cs-callout--decision { padding-left: 1.15rem; }
  .cs-schema-row { grid-template-columns: 2.5rem 1fr; gap: 0.6rem; }
  .cs-schema-num { width: 1.65rem; height: 1.65rem; font-size: 0.85rem; }
}

/* --- Chart barres horizontales (cs-chart-bars) --------------- */
/* Une barre horizontale par ligne. Valeur affichée à droite en
 * texte (lisible sans couleur). Largeur = valeur / max. */

.cs-chart-bars {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  font: 500 0.92rem/1.4 var(--cs-font-interface);
}
.cs-chart-bars > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--cs-line);
}
.cs-chart-bars > li:last-child { border-bottom: 0; }
.cs-chart-bars .cs-chart-label {
  display: block;
  color: var(--cs-ink);
  font-weight: 500;
}
.cs-chart-bars .cs-chart-track {
  display: block;
  position: relative;
  height: 0.65rem;
  background: var(--cs-paper-muted);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.2rem;
}
.cs-chart-bars .cs-chart-fill {
  display: block;
  height: 100%;
  background: var(--cs-control);
  border-radius: 2px;
}
.cs-chart-bars .cs-chart-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--cs-ink);
  white-space: nowrap;
}

/* prefers-reduced-motion : aucune animation déclarée, donc rien à
 * neutraliser. Le bloc est compatible par construction. */
