/* Tokens : variables + @font-face. Importé en premier dans le bundle. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-var.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-var-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink:         #1A1814;
  --paper:       #FAF7F2;
  --paper-2:     #F3EEE4;
  --accent:      #8B2E2A;
  --accent-hi:   #A33C36;
  --board-dark:  #C8A574;
  --board-light: #F5E5C5;
  --muted:       #6B6358;
  --rule:        #E5DFD4;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-base:  18px;
  --fs-sm:    15px;
  --fs-meta:  14px;
  --fs-h1:    clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  --fs-h2:    clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  --fs-h3:    1.25rem;
  --fs-h4:    1.0625rem;
  --lh-body:  1.65;
  --lh-tight: 1.25;
  --lh-mono:  1.55;

  --measure: 65ch;

  --space-1:  8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-6:  48px;
  --space-8:  64px;

  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;

  --pad-mobile:  20px;
  --pad-desktop: 32px;

  --radius-sm: 2px;
  --radius:    4px;

  --rule-thin:    1px solid var(--rule);
  --rule-strong:  2px solid var(--ink);
}

@media (min-width: 768px) {
  :root {
    --fs-base: 19px;
  }
}
/* Reset minimal + typo de base + éléments markdown. */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: var(--fs-base);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: var(--lh-body);
  font-feature-settings: "liga" 1, "kern" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  margin: var(--space-6) 0 var(--space-3);
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: var(--fs-h1); font-weight: 700; margin-top: 0; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

h1 + h2, h2 + h3, h3 + h4 { margin-top: var(--space-3); }

/* Lecture longue : on ancre chaque H2 par un battement vertical et un
   petit filet bourgogne avant le titre. Effet "ouverture de chapitre". */
.prose h2 {
  margin-top: var(--space-8);
  position: relative;
  padding-top: var(--space-2);
}
.prose h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-bottom: var(--space-2);
}
.prose h2:first-of-type {
  margin-top: var(--space-6);
}

p {
  margin: 0 0 var(--space-2);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 80ms ease;
}
a:hover { color: var(--accent-hi); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul, ol {
  margin: 0 0 var(--space-2);
  padding-left: var(--space-4);
}
li { margin-bottom: var(--space-1); }
li > ul, li > ol { margin-top: var(--space-1); margin-bottom: 0; }

blockquote {
  margin: var(--space-3) 0;
  padding: var(--space-1) var(--space-3);
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--muted);
}
blockquote p:last-child { margin-bottom: 0; }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}
pre {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: var(--lh-mono);
  background: var(--paper-2);
  padding: var(--space-2);
  border-radius: var(--radius);
  overflow-x: auto;
  margin: var(--space-3) 0;
}
pre code { background: none; padding: 0; font-size: inherit; }

hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: var(--space-6) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-3) 0;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums lining-nums;
}
th, td {
  text-align: left;
  padding: var(--space-1) var(--space-2);
  border-bottom: var(--rule-thin);
}
th {
  font-family: var(--font-display);
  font-weight: 600;
  border-bottom: var(--rule-strong);
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

figure {
  margin: var(--space-4) 0;
}
figcaption {
  font-size: var(--fs-meta);
  color: var(--muted);
  font-style: italic;
  margin-top: var(--space-1);
  text-align: center;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

/* Notation algébrique : utiliser <span class="notation"> ou <code class="notation"> */
.notation {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  background: none;
  padding: 0;
}
/* Grille du site : header / main / footer + colonne lecture 65ch. */

.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  border-bottom: var(--rule-thin);
  padding: var(--space-2) var(--pad-mobile);
}
.site-footer {
  border-top: var(--rule-thin);
  padding: var(--space-4) var(--pad-mobile);
  margin-top: var(--space-8);
  font-size: var(--fs-meta);
  color: var(--muted);
}

.site-header__inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
}
.site-footer__inner {
  max-width: 80rem;
  margin: 0 auto;
}

.site-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.site-logo:hover { color: var(--accent); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-nav a {
  display: inline-block;
  padding: var(--space-1) 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.site-nav--footer {
  margin-bottom: var(--space-2);
}
.site-nav--footer a {
  font-size: var(--fs-meta);
  color: var(--muted);
}

.breadcrumbs {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-meta);
  color: var(--muted);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumbs li::after {
  content: "›";
  margin-left: var(--space-1);
  color: var(--rule);
}
.breadcrumbs li:last-child::after { content: ""; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current] span { color: var(--ink); }

.list__header {
  max-width: var(--measure);
  margin: 0 auto var(--space-6);
}
.list__header .breadcrumbs { margin-bottom: var(--space-3); }
.list__intro { color: var(--muted); }

.list section + section { margin-top: var(--space-6); }
.list section > h2 {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}

.site-main {
  flex: 1;
  padding: var(--space-4) var(--pad-mobile);
}

@media (min-width: 1024px) {
  .site-header,
  .site-footer,
  .site-main {
    padding-left: var(--pad-desktop);
    padding-right: var(--pad-desktop);
  }
  .site-main { padding-top: var(--space-6); }
}

/* Colonne de lecture : 65ch centré. Utilisée par single.html article. */
.prose {
  max-width: var(--measure);
  margin: 0 auto;
}

/* Bleed : permet à un enfant de sortir de la colonne sur les côtés.
   Utilisé par les diagrammes en mode "bleed à droite" sur desktop. */
@media (min-width: 1024px) {
  .prose .bleed-right {
    margin-right: -80px;
    float: right;
    margin-left: var(--space-3);
    margin-bottom: var(--space-2);
  }
}

/* Listings de section : grille fluide. */
.list {
  max-width: 80rem;
  margin: 0 auto;
}
.list__items {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
}
@media (min-width: 768px) {
  .list__items { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .list__items { grid-template-columns: repeat(3, 1fr); }
}

/* Slots monétisation : hauteur réservée pour CLS = 0 même quand vide. */
.ad-slot {
  display: block;
  margin: var(--space-4) auto;
  max-width: 728px;
  min-height: 90px;
  background: var(--paper-2);
  border: var(--rule-thin);
  text-align: center;
  font-size: var(--fs-meta);
  color: var(--muted);
}
.ad-slot--mid    { min-height: 250px; }
.ad-slot--mobile { min-height: 250px; max-width: 320px; }

@media (max-width: 767px) {
  .ad-slot { min-height: 250px; max-width: 320px; }
}
/* Composants génériques (boutons, badges, encarts).
   Composants signatures (cartouche ouverture, bandeau partie commentée) → signatures.css en phase 4. */

.btn {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 80ms ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--paper-2); color: var(--ink); }

/* Badges niveau (Débutant / Club / Avancé) — composant transversal réutilisé en phase 4 sur la fiche article. */
.niveau {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.niveau__dots {
  display: inline-flex;
  gap: 3px;
}
.niveau__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rule);
  border: 1px solid var(--muted);
}
.niveau__dot--on { background: var(--accent); border-color: var(--accent); }

/* Encart « Pour aller plus loin » (liens contextuels, dont affiliation). */
.encart {
  margin: var(--space-4) 0;
  padding: var(--space-3);
  background: var(--paper-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.encart > :first-child { margin-top: 0; }
.encart > :last-child  { margin-bottom: 0; }
.encart__titre {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}

/* Méta article (date, niveau, taxonomies) — sous le titre. */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  font-size: var(--fs-meta);
  color: var(--muted);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: var(--rule-thin);
}
.article-meta time { font-variant-numeric: tabular-nums; }

/* Carte d'item dans un listing (.list__items > .list-card). */
.list-card {
  list-style: none;
  padding: var(--space-3);
  background: var(--paper);
  border: var(--rule-thin);
  border-radius: var(--radius);
  transition: border-color 80ms ease;
}
.list-card:hover { border-color: var(--ink); }
.list-card h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--fs-h3);
}
.list-card h3 a {
  color: var(--ink);
  text-decoration: none;
}
.list-card h3 a:hover { color: var(--accent); }
.list-card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}
.list-card__date {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--fs-meta);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Ligne meta sous le titre/description : niveau + code ECO le cas échéant.
   Discrète, alignée gauche, séparateurs subtils. */
.list-card__meta {
  margin: var(--space-2) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-meta);
}
.niveau--mini {
  font-size: var(--fs-meta);
}
.niveau--mini .niveau__dot {
  width: 6px;
  height: 6px;
}
.list-card__eco {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding: 1px 6px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}

/* Paragraphe d'introduction sous le titre. */
.lede {
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--muted);
  font-family: var(--font-display);
  font-weight: 400;
  margin: 0 0 var(--space-4);
}

/* Liste de tags / taxonomies inline. */
.taxos {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  list-style: none;
  padding: 0;
  margin: 0;
}
.taxos li { margin: 0; }
.taxo-link {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
  padding: 2px var(--space-1);
  border: var(--rule-thin);
  border-radius: var(--radius-sm);
  font-size: var(--fs-meta);
  color: var(--muted);
  text-decoration: none;
}
.taxo-link:hover { color: var(--accent); border-color: var(--accent); }
.taxo-link--eco {
  font-family: var(--font-mono);
  font-size: 0.78em;
  letter-spacing: 0.04em;
  background: rgba(156, 42, 76, 0.06);
  border-color: rgba(156, 42, 76, 0.25);
  color: var(--accent);
}
.taxo-link--eco:hover {
  background: rgba(156, 42, 76, 0.12);
}
.taxo-link__count {
  font-variant-numeric: tabular-nums;
  font-size: 0.85em;
  opacity: 0.7;
}

/* Page taxonomy : liste verticale dense. */
.taxos--block {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-1);
  margin-top: var(--space-4);
}
.taxos--block .taxo-link {
  justify-content: space-between;
  padding: var(--space-1) var(--space-2);
}

/* Image hero d'article (champ frontmatter image:) */
.article-hero {
  margin-top: var(--space-3);
  margin-bottom: var(--space-6);
}
.article-hero img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* Lichess PGN Viewer : override couleurs et marges. */
.lpv-wrap {
  margin-top: var(--space-3);
  margin-bottom: var(--space-6);
  --c-lpv-bg: var(--paper);
  --c-lpv-bg-pane: var(--paper-2);
  --c-lpv-bg-controls: var(--paper-2);
  --c-lpv-bg-movelist: var(--paper);
  --c-lpv-bg-player: var(--paper-2);
  --c-lpv-bg-variation: var(--paper-2);
  --c-lpv-font: var(--ink);
  --c-lpv-font-bg: var(--paper);
  --c-lpv-font-shy: var(--muted);
  --c-lpv-accent: var(--accent);
  --c-lpv-accent-over: var(--paper);
  --c-lpv-current-move: var(--accent);
  --c-lpv-past-moves: var(--ink);
  --c-lpv-move-hover: var(--paper-2);
  --c-lpv-fbt-hover: var(--paper-2);
  --c-lpv-border: var(--rule);
  --c-lpv-side-border: var(--rule);
  --c-lpv-pgn-text: var(--ink);
}
.lpv-wrap .lpv {
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
}
.lpv-wrap .lpv__menu,
.lpv-wrap .lpv__controls {
  background: var(--paper-2);
}
.lpv-wrap .lpv__moves move.current,
.lpv-wrap .lpv__moves move.active {
  background: var(--accent);
  color: var(--paper);
}
/* Damier aux couleurs du site : pattern SVG 2x2 répété, cases claires dessinées
   sur fond --board-dark (cases sombres). */
.lpv-wrap cg-board {
  background-color: var(--board-dark);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><rect width="1" height="1" fill="%23F5E5C5"/><rect x="1" y="1" width="1" height="1" fill="%23F5E5C5"/></svg>');
  background-size: 25% 25%;
}

/* Outils interactifs : éditeur de position et générateur de diagramme.
   Layout 2 colonnes : board à gauche, sidebar de contrôles à droite. */
.chess-tool {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 280px);
  gap: var(--space-3);
  margin-top: var(--space-3);
  margin-bottom: var(--space-6);
  align-items: start;
}
@media (max-width: 720px) {
  .chess-tool { grid-template-columns: 1fr; }
}
.chess-tool__board .cg-wrap {
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--board-dark);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><rect width="1" height="1" fill="%23F5E5C5"/><rect x="1" y="1" width="1" height="1" fill="%23F5E5C5"/></svg>');
  background-size: 25% 25%;
}
.chess-tool__sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: 0.92em;
}
.chess-tool__sidebar fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 var(--space-1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chess-tool__sidebar fieldset legend {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink);
}
.chess-tool__sidebar label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.chess-tool__group {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: var(--space-1) var(--space-2);
  background: var(--paper-2);
}
.chess-tool__group summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 0;
}
.chess-tool__hint {
  font-size: 0.85em;
  color: var(--muted);
  margin: 4px 0 var(--space-1);
}
.chess-tool__palette {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.palette-piece {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 2px;
  cursor: pointer;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4em;
  font-weight: 700;
  color: var(--muted);
}
.palette-piece img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.palette-piece:hover { border-color: var(--accent); }
.palette-piece--active {
  border-color: var(--accent);
  background: var(--paper-2);
  box-shadow: 0 0 0 2px var(--accent);
}
.palette-piece--erase { color: var(--accent); }
.chess-tool__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chess-tool__actions button,
.chess-tool__sidebar > button {
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92em;
  color: var(--ink);
}
.chess-tool__actions button:hover,
.chess-tool__sidebar > button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.chess-tool__label {
  font-weight: 600;
  margin: var(--space-1) 0 4px;
  color: var(--ink);
}
.chess-tool__sidebar textarea,
.chess-tool__sidebar input[type=number] {
  width: 100%;
  font-family: var(--font-mono, monospace);
  font-size: 0.85em;
  padding: 6px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
  box-sizing: border-box;
}
.chess-tool__copied {
  font-size: 0.85em;
  color: var(--accent);
  margin: 0;
}
.chess-tool__error {
  border: 1px solid var(--accent);
  background: var(--paper);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.88em;
}
.chess-tool__error summary { cursor: pointer; color: var(--accent); }
.chess-tool__error p { margin: 4px 0 0; color: var(--ink); }

/* ==========================================================================
   Snapshot live sur les pages /actualites/ et /videos/
   ========================================================================== */

.snapshot__updated {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
  margin-top: var(--space-1);
  letter-spacing: 0.02em;
}

.snapshot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin: var(--space-4) 0 var(--space-6);
}
@media (max-width: 720px) {
  .snapshot { grid-template-columns: 1fr; gap: var(--space-3); }
}
.snapshot__panel {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: var(--space-3);
  border-radius: var(--radius);
}
.snapshot__panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--rule);
}
.snapshot__title {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0;
}
.snapshot__panel-date {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.snapshot__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}
.snapshot__table thead th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-meta);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--rule);
  padding: 4px 0;
}
.snapshot__table tbody td {
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
}
.snapshot__rank {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  width: 2em;
}
.snapshot__name { font-weight: 600; }
.snapshot__country {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--muted);
}
.snapshot__elo {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}
.snapshot__broadcasts {
  list-style: none;
  padding: 0;
  margin: 0;
}
.snapshot__broadcasts li {
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  line-height: 1.4;
}
.snapshot__broadcasts li:last-child { border: 0; }
.snapshot__broadcasts a { color: var(--ink); text-decoration: none; }
.snapshot__broadcasts a:hover { color: var(--accent); }
.snapshot__more {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-meta);
}
.snapshot__more a { color: var(--accent); text-decoration: none; }
.snapshot__more a:hover { text-decoration: underline; }

.snapshot__sections {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.snapshot__intro {
  max-width: var(--measure);
  margin-top: var(--space-4);
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: var(--fs-sm);
  border-top: 1px solid var(--rule);
  padding-top: var(--space-3);
}

/* === Coup d'éclat du mois (sur /actualites/) === */
.coup-declat {
  max-width: var(--measure);
  margin: var(--space-6) auto;
  padding: var(--space-4) var(--space-3);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}
.coup-declat h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0 0 var(--space-3);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--rule);
}
.coup-declat p {
  margin: var(--space-2) 0;
}
.coup-declat figure { margin: 0 auto var(--space-2); }

/* === Suivi régulier : cards avec icônes monoline === */
.follow-up {
  max-width: 80rem;
  margin: var(--space-6) auto var(--space-5);
}
.follow-up h2 {
  max-width: var(--measure);
  margin: 0 auto var(--space-3);
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.follow-up__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
}
.follow-up__card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 80ms ease, transform 100ms ease;
}
.follow-up__card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.follow-up__link {
  display: block;
  padding: var(--space-3);
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.follow-up__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: var(--space-2);
}
.follow-up__icon svg {
  width: 28px;
  height: 28px;
  display: block;
}
.follow-up__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--space-1);
}
.follow-up__card:hover .follow-up__title { color: var(--accent); }
.follow-up__desc {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

/* === Sources en pied de page === */
.actualites__sources {
  max-width: var(--measure);
  margin: var(--space-6) auto var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
  text-align: left;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Page /videos/ : rangée chaînes + dernières fiches
   ========================================================================== */

.videos-channels {
  max-width: var(--measure);
  margin: var(--space-4) auto;
}
.videos-channels h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}
.videos-channels__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  font-family: var(--font-display);
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.6;
}
.videos-channels__list li:not(:last-child)::after {
  content: " — ";
  color: var(--muted);
  font-weight: 400;
  margin: 0 var(--space-1);
}
.videos-channels__list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.videos-channels__list a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.videos-latest {
  max-width: var(--measure);
  margin-top: var(--space-5);
  margin-bottom: var(--space-5);
  margin-left: auto;
  margin-right: auto;
}
.videos-latest h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}
.videos-latest__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.videos-latest__item {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--rule);
}
.videos-latest__item:last-child { border-bottom: 0; }
.videos-latest__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1em;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 4px;
}
.videos-latest__title:hover { color: var(--accent); }
.videos-latest__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
  margin: 0;
}
.videos-latest__chaine { font-weight: 600; color: var(--ink); }

/* ==========================================================================
   Vidéothèque : grille de fiches 16:9 + filtre niveau
   ========================================================================== */

.video-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: var(--space-4) auto var(--space-3);
  max-width: 80rem;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 10;
}
.video-filter__btn {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  transition: all 80ms ease;
}
.video-filter__btn:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.video-filter__btn--active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3);
  max-width: 80rem;
  margin: var(--space-3) auto var(--space-6);
  padding: 0;
  list-style: none;
}

.video-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 80ms ease, transform 100ms ease;
}
.video-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.video-card[hidden] { display: none; }

.video-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
  overflow: hidden;
}
.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 200ms ease;
}
.video-card:hover .video-card__thumb img {
  transform: scale(1.03);
}
.video-card__duree {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(26, 24, 20, 0.85);
  color: var(--paper);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.78em;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}

.video-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: var(--space-2) var(--space-2) var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.3em);
}
.video-card:hover .video-card__title { color: var(--accent); }

.video-card__meta {
  margin: 0 var(--space-2) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  letter-spacing: 0.02em;
}
.video-card__chaine {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.video-card__niveau {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 2px;
  background: var(--paper-2);
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.video-card__niveau--debutant {
  background: var(--paper-2);
  color: var(--ink);
}
.video-card__niveau--club {
  background: var(--accent);
  color: var(--paper);
}
.video-card__niveau--amateur {
  background: var(--ink);
  color: var(--paper);
}

@media (max-width: 720px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--space-2); }
  .video-card__title { font-size: 0.92rem; }
}

/* === Brèves récentes sur /actualites/ === */
.breves-recentes,
.partie-recente {
  max-width: var(--measure);
  margin: var(--space-5) auto;
}
.breves-recentes__header,
.partie-recente__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin: 0 0 var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--rule);
}
.breves-recentes__header h2,
.partie-recente__header h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0;
}
.breves-recentes__more,
.partie-recente__more {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--accent);
  text-decoration: none;
}
.breves-recentes__more:hover,
.partie-recente__more:hover { text-decoration: underline; }

.breves-recentes__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.breves-recentes__item {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--rule);
}
.breves-recentes__item:last-child { border-bottom: 0; }
.breves-recentes__title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05em;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 2px;
}
.breves-recentes__title:hover { color: var(--accent); }
.breves-recentes__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
  letter-spacing: 0.02em;
}
.breves-recentes__meta time { font-variant-numeric: tabular-nums; }
.breves-recentes__desc { color: var(--muted); }

.partie-recente__card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.partie-recente__title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  margin: 0 0 var(--space-1);
}
.partie-recente__title a {
  color: var(--ink);
  text-decoration: none;
}
.partie-recente__title a:hover { color: var(--accent); }
.partie-recente__meta {
  margin: 0 0 var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.partie-recente__lede {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}
/* Composants signatures V1 : cartouche d'ouverture, bandeau partie commentée, diagrammes. */

/* === Diagramme statique ====================================================
   Wrapper figure pour {{< diagram >}}. SVG centré ou bleed-right desktop. */
.diagram {
  margin: var(--space-4) auto;
  text-align: center;
}
.diagram img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
}
.diagram figcaption {
  margin-top: var(--space-1);
  font-size: var(--fs-meta);
  color: var(--muted);
  font-style: italic;
}

@media (min-width: 1024px) {
  .diagram.bleed-right {
    float: right;
    margin: 0 calc(-1 * var(--space-4)) var(--space-3) var(--space-3);
    text-align: left;
  }
}


/* === Cartouche d'ouverture =================================================
   En-tête d'article ouverture : code ECO, nom (= H1 de l'article),
   ligne de coups d'introduction en mono, mini-diagramme. */
.cartouche {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  padding: var(--space-3);
  margin: 0 0 var(--space-6);
  background: var(--paper-2);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
@media (min-width: 640px) {
  .cartouche {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.cartouche__corps > :first-child { margin-top: 0; }
.cartouche__corps > :last-child  { margin-bottom: 0; }

.cartouche__eco {
  display: inline-block;
  padding: 2px var(--space-1);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
}

.cartouche__coups {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: var(--lh-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  word-spacing: 0.15em;
}

.cartouche__diagram {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  background: var(--board-light);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  display: block;
}

/* === Bandeau partie commentée ==============================================
   Tableau "coups en mono | commentaire en prose" sur deux colonnes desktop,
   empilé sur mobile. */
.partie {
  margin: var(--space-4) 0;
  padding: var(--space-3);
  background: var(--paper-2);
  border-radius: var(--radius);
  border: var(--rule-thin);
}
.partie__titre {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 var(--space-2);
}

.partie__lignes {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Chaque ligne est autonome : pas de grille globale qui crée un trou
   à droite quand certaines lignes n'ont pas de mini-diagramme. */
.partie__ligne {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-1);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--rule);
}
.partie__ligne:first-child { border-top: 0; padding-top: 0; }
.partie__ligne:last-child { padding-bottom: 0; }

@media (min-width: 640px) {
  .partie__ligne {
    grid-template-columns: minmax(140px, max-content) 1fr;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-3) 0;
  }
  .partie__ligne--diag {
    grid-template-columns: minmax(140px, max-content) 1fr 100px;
  }
}

/* Mobile : ordre lecture coups → mini-diagramme → commentaire,
   pour garder le lien coup ↔ position. */
@media (max-width: 639px) {
  .partie__coups { order: 1; }
  .partie__minidiag { order: 2; }
  .partie__commentaire { order: 3; }
}

.partie__minidiag {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  display: block;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  justify-self: start;
}

.partie__ligne {
  display: contents;
}
.partie__coups {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: var(--lh-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}
.partie__commentaire {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--ink);
}
.partie__commentaire em { color: var(--muted); }

/* Sur mobile, on sépare visuellement coups et commentaire. */
@media (max-width: 639px) {
  .partie__coups {
    padding-bottom: 2px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: var(--space-1);
  }
}

/* Bouton d'agrandissement appliqué à tous les diagrammes (mini-diag des
   parties commentées, cartouche d'ouverture, diagramme figure standard).
   Reset bouton natif, curseur zoom, focus visible. */
.diag-zoom-trigger {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: zoom-in;
  display: inline-block;
  border-radius: var(--radius-sm);
  line-height: 0;
}
.diag-zoom-trigger:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
/* Variantes positionnelles selon le contexte */
.partie__minidiag-btn {
  justify-self: start;
}
.partie__minidiag-btn:hover .partie__minidiag {
  border-color: var(--ink);
}
.cartouche__diagram-btn,
.diagram__btn {
  display: block;
}

/* Modale d'agrandissement (élément <dialog> natif, vivable sans JS sur les
   navigateurs récents — fallback gracieux : le clic ne fait rien si dialog
   non supporté, l'image reste lisible en mini). Largeur fixée explicitement
   car la SVG conserverait sinon sa taille intrinsèque de 100×100. */
.diag-zoom {
  border: 0;
  padding: 0;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  width: min(92vw, 92vh, 640px);
  height: auto;
  overflow: visible;
  position: fixed;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}
.diag-zoom::backdrop {
  background: rgba(26, 24, 20, 0.78);
}
.diag-zoom__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--radius);
}
.diag-zoom__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.diag-zoom__close:hover {
  background: var(--paper-2);
}
.diag-zoom__close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
/* Home page : grille large (1200px), respiration parchemin entre sections.
   Échappe à la colonne 65ch des articles, qui reste sacrée pour /article/. */

.home {
  max-width: 1200px;
  margin: 0 auto;
}

.home-section {
  padding: var(--space-6) 0;
}
.home-section + .home-section {
  border-top: var(--rule-thin);
}
@media (min-width: 1024px) {
  .home-section { padding: var(--space-8) 0; }
}

/* === Hero éditorial =========================================== */
.home-hero {
  text-align: center;
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
}
.home-hero__kicker {
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 var(--space-3);
}
.home-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 auto var(--space-4);
  max-width: 24ch;
  color: var(--ink);
  text-wrap: balance;
}
.home-hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.home-hero__lede {
  max-width: 50ch;
  margin: 0 auto;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.5;
}

/* === Article du moment, pleine largeur ====================== */
.home-feature__inner {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 768px) {
  .home-feature__inner {
    grid-template-columns: 1fr 320px;
    gap: var(--space-6);
  }
}
.home-feature__kicker {
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 var(--space-2);
}
.home-feature__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-3);
}
.home-feature__title a {
  color: var(--ink);
  text-decoration: none;
}
.home-feature__title a:hover { color: var(--accent); }

.home-feature__cartouche {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  flex-wrap: wrap;
}
.home-feature__cartouche .cartouche__eco {
  margin-right: var(--space-1);
}
.home-feature__cartouche .cartouche__coups {
  font-size: var(--fs-meta);
}

.home-feature__lede {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 var(--space-3);
}
.home-feature__excerpt {
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  margin: 0 0 var(--space-3);
}
.home-feature__link {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}
.home-feature__link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.home-feature__diagram {
  width: 100%;
  height: auto;
  max-width: 320px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  display: block;
  justify-self: center;
}

/* === Deux entrées secondaires =============================== */
.home-secondary {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .home-secondary {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}
.home-secondary__card {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: 1fr;
}
@media (min-width: 480px) {
  .home-secondary__card {
    grid-template-columns: 1fr 140px;
    align-items: start;
  }
}
.home-secondary__kicker {
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 var(--space-1);
}
.home-secondary__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 var(--space-2);
}
.home-secondary__title a {
  color: var(--ink);
  text-decoration: none;
}
.home-secondary__title a:hover { color: var(--accent); }
.home-secondary__excerpt {
  margin: 0;
  color: var(--ink);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
.home-secondary__diagram {
  width: 100%;
  max-width: 140px;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  display: block;
  justify-self: center;
}

/* === Glossaire en vitrine =================================== */
.home-glossary__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}
.home-glossary__title {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 600;
  margin: 0;
}
.home-glossary__more {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 1px;
}
.home-glossary__more:hover { color: var(--ink); border-bottom-color: var(--ink); }

.home-glossary__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-2) var(--space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .home-glossary__list { grid-template-columns: 1fr 1fr; }
}
.home-glossary__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px dotted var(--rule);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.home-glossary__term {
  font-family: var(--font-mono);
  font-weight: 600;
  font-style: normal;
  color: var(--ink);
  font-size: 0.95em;
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  padding-bottom: 1px;
}
.home-glossary__term:hover { color: var(--accent); }
.home-glossary__def {
  color: var(--muted);
  font-style: italic;
}

/* === Sommaire des rubriques ================================= */
.home-toc__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 var(--space-4);
}
.home-toc__list {
  display: grid;
  gap: var(--space-3) var(--space-6);
  grid-template-columns: 1fr;
  margin: 0;
}
@media (min-width: 768px) {
  .home-toc__list { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .home-toc__list { grid-template-columns: 1fr 1fr 1fr; }
}
.home-toc__list dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
}
.home-toc__list dt a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}
.home-toc__list dt a:hover {
  border-bottom-color: var(--accent);
  color: var(--accent);
}
.home-toc__list dd {
  font-size: var(--fs-sm);
  color: var(--muted);
  margin: 0 0 var(--space-2);
  line-height: 1.4;
}
.home-toc__upcoming dt,
.home-toc__upcoming dt a {
  color: var(--muted);
  font-style: italic;
}
.home-toc__upcoming dd {
  opacity: 0.6;
  font-style: italic;
}

/* === Note de l'éditeur ====================================== */
.home-note {
  max-width: 60ch;
  margin: 0 auto;
}
.home-note__kicker {
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 var(--space-2);
}
.home-note p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}
.home-note p.home-note__signature {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  font-size: var(--fs-sm);
  margin-top: var(--space-3);
  text-align: right;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Hero meta + Actualités du jour + Vidéothèque + Outils + Sommaire avec icônes
   ========================================================================== */

.home-hero__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--muted);
  margin-top: var(--space-2);
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
}

/* === Module Actualités du jour === */
.home-actu {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: var(--space-6) 0;
}
.home-actu__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--rule);
}
.home-actu__kicker {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0;
}
.home-actu__more {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--accent);
  text-decoration: none;
}
.home-actu__more:hover { text-decoration: underline; }
.home-actu__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 900px) {
  .home-actu__grid { grid-template-columns: 1fr; gap: var(--space-3); }
}
.home-actu__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.home-actu__col-title {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-display);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0;
}
.home-actu__col-icon {
  display: inline-flex;
  color: var(--accent);
}
.home-actu__col-icon svg { width: 20px; height: 20px; }
.home-actu__fide {
  list-style: none;
  padding: 0;
  margin: 0;
}
.home-actu__fide li {
  display: grid;
  grid-template-columns: 1.5em 1fr auto;
  gap: var(--space-1);
  padding: 4px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.home-actu__fide li:last-child { border-bottom: 0; }
.home-actu__rank {
  font-family: var(--font-mono);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.home-actu__name { font-weight: 600; }
.home-actu__elo {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
}
.home-actu__broadcasts {
  list-style: none;
  padding: 0;
  margin: 0;
}
.home-actu__broadcasts li {
  padding: 4px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95em;
  line-height: 1.4;
}
.home-actu__broadcasts li:last-child { border-bottom: 0; }
.home-actu__col-link {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--accent);
  text-decoration: none;
  margin-top: auto;
}
.home-actu__col-link:hover { text-decoration: underline; }
.home-actu__declat-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.home-actu__declat-link img {
  width: 100%;
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 0 var(--space-1);
}
.home-actu__declat-caption {
  font-size: var(--fs-sm);
  color: var(--muted);
  font-style: italic;
  margin: 0;
  line-height: 1.4;
}
.home-actu__declat-link:hover .home-actu__declat-caption {
  color: var(--accent);
}

/* === Vidéothèque · cette semaine === */
.home-videos {
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}
.home-videos__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--rule);
}
.home-videos__kicker {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0;
}
.home-videos__icon {
  display: inline-flex;
  color: var(--accent);
}
.home-videos__icon svg { width: 22px; height: 22px; }
.home-videos__more {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--accent);
  text-decoration: none;
}
.home-videos__more:hover { text-decoration: underline; }
.home-videos__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
@media (max-width: 900px) {
  .home-videos__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .home-videos__grid { grid-template-columns: 1fr; }
}
.home-videos__card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 80ms, transform 100ms;
}
.home-videos__card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.home-videos__link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.home-videos__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
  overflow: hidden;
}
.home-videos__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-videos__duree {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(26, 24, 20, 0.85);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 5px;
  border-radius: 2px;
}
.home-videos__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin: var(--space-1) var(--space-2) 4px;
  line-height: 1.3;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-videos__card:hover .home-videos__title { color: var(--accent); }
.home-videos__meta {
  margin: 0 var(--space-2) var(--space-1);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: var(--space-1);
}

/* === Outils en vitrine === */
.home-tools {
  margin-top: var(--space-6);
}
.home-tools__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--rule);
}
.home-tools__title {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin: 0;
}
.home-tools__more {
  font-family: var(--font-mono);
  font-size: var(--fs-meta);
  color: var(--accent);
  text-decoration: none;
}
.home-tools__more:hover { text-decoration: underline; }
.home-tools__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 720px) {
  .home-tools__grid { grid-template-columns: 1fr; }
}
.home-tools__card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  transition: border-color 80ms, transform 100ms;
}
.home-tools__card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.home-tools__card a {
  display: block;
  padding: var(--space-3);
  color: inherit;
  text-decoration: none;
}
.home-tools__icon {
  display: inline-flex;
  color: var(--accent);
  margin-bottom: var(--space-1);
}
.home-tools__icon svg { width: 28px; height: 28px; }
.home-tools__title-card {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  margin: 0 0 var(--space-1);
  color: var(--ink);
}
.home-tools__card:hover .home-tools__title-card { color: var(--accent); }
.home-tools__card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

/* === Sommaire avec icônes monoline === */
.home-toc__list dt {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.home-toc__icon {
  display: inline-flex;
  color: var(--accent);
  flex-shrink: 0;
}
.home-toc__icon svg { width: 20px; height: 20px; }

/* === Glossaire compact === */
.home-glossary__list--compact {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
@media (max-width: 720px) {
  .home-glossary__list--compact { grid-template-columns: 1fr; }
}
lite-youtube {
    background-color: #000;
    position: relative;
    display: block;
    contain: content;
    background-position: center center;
    background-size: cover;
    cursor: pointer;
    max-width: 720px;
}

/* gradient */
lite-youtube::before {
    content: attr(data-title);
    display: block;
    position: absolute;
    top: 0;
    /* Pixel-perfect port of YT's gradient PNG, using https://github.com/bluesmoon/pngtocss plus optimizations */
    background-image: linear-gradient(180deg, rgb(0 0 0 / 67%) 0%, rgb(0 0 0 / 54%) 14%, rgb(0 0 0 / 15%) 54%, rgb(0 0 0 / 5%) 72%, rgb(0 0 0 / 0%) 94%);
    height: 99px;
    width: 100%;
    font-family: "YouTube Noto",Roboto,Arial,Helvetica,sans-serif;
    color: hsl(0deg 0% 93.33%);
    text-shadow: 0 0 2px rgba(0,0,0,.5);
    font-size: 18px;
    padding: 25px 20px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

lite-youtube:hover::before {
    color: white;
}

/* responsive iframe with a 16:9 aspect ratio
    thanks https://css-tricks.com/responsive-iframes/
*/
lite-youtube::after {
    content: "";
    display: block;
    padding-bottom: calc(100% / (16 / 9));
}
lite-youtube > iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border: 0;
}

/* play button */
lite-youtube > .lty-playbtn {
    display: block;
    /* Make the button element cover the whole area for a large hover/click target… */
    width: 100%;
    height: 100%;
    /* …but visually it's still the same size */
    background: no-repeat center/68px 48px;
    /* YT's actual play button svg */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
    position: absolute;
    cursor: pointer;
    z-index: 1;
    filter: grayscale(100%);
    transition: filter .1s cubic-bezier(0, 0, 0.2, 1);
    border: 0;
}

lite-youtube:hover > .lty-playbtn,
lite-youtube .lty-playbtn:focus {
    filter: none;
}

/* Post-click styles */
lite-youtube.lyt-activated {
    cursor: unset;
}
lite-youtube.lyt-activated::before,
lite-youtube.lyt-activated > .lty-playbtn {
    opacity: 0;
    pointer-events: none;
}

.lyt-visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }
