/* Afficheur Léger Cotation — feuille de style unique. Aucune dépendance externe. */

@font-face {
  font-family: "Archivo Narrow";
  src: url("../fonts/archivo-narrow-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo Narrow";
  src: url("../fonts/archivo-narrow-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #14181d;
  --ink-soft: #3b444f;
  --muted: #6b7684;
  --line: #dfe4ea;
  --line-strong: #c6ced8;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --surface-3: #eceff3;
  --up: #07845a;
  --up-strong: #06674a;
  --up-wash: rgba(7, 132, 90, 0.08);
  --down: #b3301f;
  --focus: #1f6feb;
  --shadow: 0 1px 2px rgba(20, 24, 29, 0.05);
  --shadow-lift: 0 8px 24px rgba(20, 24, 29, 0.09);
  --radius: 4px;
  --tone: #4a5563;
  --tone-wash: rgba(74, 85, 99, 0.08);
  --sans: "Archivo Narrow", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1220px;
}

.tone-0 { --tone: #07845a; --tone-wash: rgba(7, 132, 90, 0.09); }
.tone-1 { --tone: #2c6590; --tone-wash: rgba(44, 101, 144, 0.09); }
.tone-2 { --tone: #8a6108; --tone-wash: rgba(138, 97, 8, 0.1); }
.tone-3 { --tone: #6c4a85; --tone-wash: rgba(108, 74, 133, 0.09); }
.tone-4 { --tone: #4a5563; --tone-wash: rgba(74, 85, 99, 0.09); }

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

img { display: block; }

a { color: var(--up-strong); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sans);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.005em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.1rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.1em; }

.mono,
.eyebrow,
.chip,
.card-date,
.card-rank {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
  letter-spacing: 0.12em;
}

.container {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 0.85rem;
  transition: top 0.15s ease;
}

.skip-link:focus { top: 12px; color: #fff; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Boutons, liens, puces ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 11px 18px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.button:hover {
  background: var(--up-strong);
  border-color: var(--up-strong);
  color: #fff;
  transform: translateY(-1px);
}

.button .icon { width: 17px; height: 17px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}

.text-link:hover { color: var(--up-strong); border-bottom-color: var(--up); }
.text-link .icon { width: 16px; height: 16px; transition: transform 0.15s ease; }
.text-link:hover .icon { transform: translateX(3px); }

.icon { width: 18px; height: 18px; flex: none; }

.chip {
  display: inline-block;
  text-transform: uppercase;
  color: var(--tone);
  background: var(--tone-wash);
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 2px 7px;
  text-decoration: none;
  white-space: nowrap;
}

.chip:hover { border-color: var(--tone); color: var(--tone); }

/* ---------- Formulaires ---------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
}

input:focus,
textarea:focus { border-color: var(--up); outline-offset: 1px; }

.search-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.search-form input[type="search"] { flex: 1 1 auto; min-width: 0; }

.search-form button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 0 16px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
}

.search-form button:hover { background: var(--up-strong); border-color: var(--up-strong); }

/* ---------- Bandeau supérieur ---------- */

.ribbon {
  background: var(--ink);
  color: #c8cfd8;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.ribbon-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 36px;
  flex-wrap: wrap;
}

.ribbon-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-transform: uppercase;
}

.ribbon .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 0 3px rgba(7, 132, 90, 0.25);
}

.ribbon-text { flex: 1 1 auto; color: #9aa5b1; }
.ribbon-feed { color: #c8cfd8; text-decoration: none; display: inline-flex; gap: 5px; }
.ribbon-feed:hover { color: #fff; }

/* ---------- En-tête ---------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
}

.branding { margin-right: auto; }
.branding img { max-height: 48px; width: auto; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}

.wordmark-mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  display: grid;
  place-items: center;
}

.wordmark-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.wordmark-bars i {
  width: 4px;
  background: var(--muted);
  border-radius: 1px;
}

.wordmark-bars i:nth-child(1) { height: 8px; }
.wordmark-bars i:nth-child(2) { height: 13px; }
.wordmark-bars i:nth-child(3) { height: 18px; background: var(--up); }

.wordmark-text { display: flex; flex-direction: column; line-height: 1.15; }

.wordmark-text strong {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
}

.wordmark-text small {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.wordmark:hover .wordmark-text strong { color: var(--up-strong); }

/* ---------- Navigation ---------- */

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li { position: relative; }

.nav-menu a {
  display: block;
  padding: 8px 11px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius);
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu a[aria-current] {
  color: var(--ink);
  background: var(--surface-3);
}

.nav-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  min-width: 200px;
}

@media (min-width: 981px) {
  .nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    z-index: 30;
  }
  .nav-menu li:hover > .sub-menu,
  .nav-menu li:focus-within > .sub-menu { display: block; }
}

.header-search { position: relative; }

.header-search summary {
  list-style: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink-soft);
}

.header-search summary::-webkit-details-marker { display: none; }
.header-search summary:hover { border-color: var(--ink); color: var(--ink); }
.header-search summary .icon:nth-child(2) { display: none; }
.header-search[open] summary .icon:nth-child(1) { display: none; }
.header-search[open] summary .icon:nth-child(2) { display: block; }

.header-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: min(84vw, 380px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  padding: 12px;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 8px 13px;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  cursor: pointer;
}

.menu-lines,
.menu-lines::before,
.menu-lines::after {
  display: block;
  width: 17px;
  height: 2px;
  background: currentColor;
  content: "";
}

.menu-lines { position: relative; }
.menu-lines::before { position: absolute; top: -5px; }
.menu-lines::after { position: absolute; top: 5px; }

@media (max-width: 980px) {
  .menu-toggle { display: inline-flex; order: 3; }
  .header-search { order: 2; }
  .primary-nav {
    order: 4;
    flex-basis: 100%;
    display: none;
    border-top: 1px solid var(--line);
    padding: 10px 0 14px;
  }
  .primary-nav.is-open { display: block; }
  .header-inner { flex-wrap: wrap; padding-block: 12px; }
  .nav-menu { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-menu a { padding: 11px 12px; }
  .nav-menu .sub-menu { border: 0; box-shadow: none; padding: 0 0 0 14px; }
  html:not(.js) .primary-nav { display: block; }
  html:not(.js) .menu-toggle { display: none; }
}

/* ---------- Bandeau des compartiments ---------- */

.tape {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tape-inner {
  display: flex;
  align-items: stretch;
  gap: 14px;
}

.tape-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 10px 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-right: 1px solid var(--line);
  padding-right: 16px;
}

.tape-label .icon { width: 15px; height: 15px; color: var(--up); }

.tape-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.tape-list::-webkit-scrollbar { height: 3px; }
.tape-list::-webkit-scrollbar-thumb { background: var(--line-strong); }

.tape-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  text-decoration: none;
  border-right: 1px solid var(--line);
  white-space: nowrap;
}

.tape-list li:first-child a { padding-left: 0; }
.tape-list a:hover { background: var(--surface-2); }

.tape-code {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--tone);
}

.tape-name {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
}

.tape-value {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 8px;
}

@media (max-width: 720px) {
  .tape-label { display: none; }
  .tape-name { display: none; }
  .tape-list li:first-child a { padding-left: 0; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(40px, 5vw, 68px); }
.section--tinted { background: var(--surface-3); border-block: 1px solid var(--line); }

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 26px;
  border-bottom: 2px solid var(--ink);
}

.section-heading h2 { margin: 0; }
.section-note { margin: 0; color: var(--muted); }
.section-title { margin: 0 0 22px; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }

.page-heading {
  padding-bottom: 16px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--ink);
}

.page-heading h1 { margin: 0; }

/* ---------- Tableau d’ouverture ---------- */

.board {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(32px, 4.5vw, 60px) clamp(28px, 4vw, 48px);
  background-image:
    linear-gradient(var(--surface-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--surface-2) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
}

.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: start;
}

.board-copy h1 { margin-bottom: 0.35em; }

.board-text {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 54ch;
}

.board-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.indicators {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.indicator {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.indicator:last-child { border-right: 0; }

.indicator dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.indicator dd { margin: 0; }

.indicator-value {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.3rem + 1.6vw, 2.6rem);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.indicator-value--date { font-size: clamp(1.4rem, 1rem + 1.2vw, 1.9rem); }

.indicator-note {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.indicator:first-child .indicator-value { color: var(--up-strong); }

@media (max-width: 900px) {
  .board-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 540px) {
  .indicators { grid-template-columns: minmax(0, 1fr); }
  .indicator { border-right: 0; border-bottom: 1px solid var(--line); }
  .indicator:last-child { border-bottom: 0; }
}

/* ---------- Courbes décoratives ---------- */

.spark { display: block; width: 100%; height: 100%; }
.spark-line { stroke: var(--tone); stroke-width: 1.6px; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--tone-wash); }
.spark.is-up .spark-line { stroke: var(--up); }
.spark.is-up .spark-area { fill: rgba(7, 132, 90, 0.1); }
.spark.is-down .spark-line { stroke: var(--down); }
.spark.is-down .spark-area { fill: rgba(179, 48, 31, 0.08); }

/* ---------- Fiches ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.card-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.card-media img { width: 100%; height: 100%; object-fit: cover; }

.placeholder {
  position: absolute;
  inset: 0;
  display: block;
  background:
    linear-gradient(var(--surface-3) 1px, transparent 1px) 0 0 / 100% 25%,
    var(--surface-2);
}

.placeholder .spark { position: absolute; inset: auto 0 0 0; height: 68%; }

.placeholder-code {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--tone);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  position: relative;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
}

.card-time { display: inline-flex; align-items: center; gap: 4px; }
.card-time .icon { width: 13px; height: 13px; }

.card-title {
  font-size: 1.16rem;
  line-height: 1.22;
  margin: 0;
}

.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--up-strong); }

.card-excerpt {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.6;
}

.card-date { color: var(--muted); margin-top: auto; }

.card--lead .card-media { aspect-ratio: 16 / 9; }
.card--lead .card-title { font-size: clamp(1.4rem, 1.1rem + 1vw, 1.85rem); }
.card--lead .card-body { padding: 20px; gap: 10px; }
.card--lead .card-excerpt { font-size: 1.02rem; }

.card--compact {
  flex-direction: row;
  align-items: stretch;
}

.card--compact .card-media {
  flex: 0 0 104px;
  aspect-ratio: auto;
  border-bottom: 0;
  border-right: 1px solid var(--line);
}

.card--compact .card-body { padding: 12px 14px; gap: 6px; }
.card--compact .card-title { font-size: 1rem; }
.card--compact .card-excerpt { display: none; }

.card--text {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  flex-direction: row;
}

.card--text:hover { transform: none; box-shadow: none; }
.card--text .card-body { padding: 12px 0 12px 42px; gap: 5px; }
.card--text .card-title { font-size: 1.02rem; }

.card-rank {
  position: absolute;
  left: 0;
  top: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--line-strong);
}

.card--text:hover .card-rank { color: var(--tone); }

/* ---------- Grilles ---------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
}

.post-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.lead-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.seance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(22px, 3vw, 40px);
  align-items: start;
}

.palmares {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px 6px;
  position: sticky;
  top: 92px;
}

.palmares-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
}

.palmares-head h3 { margin: 0; font-size: 1.08rem; }

.palmares-head .mono {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--up-strong);
  text-transform: uppercase;
}

.palmares-head .icon { width: 13px; height: 13px; }

.palmares-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}

.palmares-list li:last-child .card--text { border-bottom: 0; }

@media (max-width: 1040px) {
  .seance-layout { grid-template-columns: minmax(0, 1fr); }
  .palmares { position: static; }
}

@media (max-width: 760px) {
  .post-grid--two,
  .lead-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Compartiments ---------- */

.compartiment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 14px;
}

.compartiment {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-top: 3px solid var(--tone);
  padding: 14px 16px 0;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.compartiment:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }

.compartiment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
}

.compartiment-code { color: var(--tone); font-weight: 600; }
.compartiment-share { color: var(--muted); }

.compartiment-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.16rem;
  line-height: 1.15;
}

.compartiment-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.compartiment-count small {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.compartiment-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.compartiment-bar {
  display: block;
  height: 4px;
  margin: 12px -16px 0;
  background: var(--surface-3);
}

.compartiment-bar i {
  display: block;
  height: 100%;
  background: var(--tone);
}

/* ---------- Carnets par compartiment ---------- */

.desk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 32px);
}

.desk { display: flex; flex-direction: column; gap: 12px; }

.desk-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--tone);
}

.desk-head h2 { margin: 0; font-size: 1.32rem; flex: 1 1 auto; }
.desk-code { color: var(--tone); font-weight: 600; letter-spacing: 0.1em; }
.desk-head .text-link { font-size: 0.9rem; border-bottom: 0; }

@media (max-width: 900px) {
  .desk-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- États vides ---------- */

.board-blank {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: grid;
}

.board-blank-label {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.board-blank .spark { position: absolute; inset: auto 0 0 0; height: 62%; }

.board-blank-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.board-blank-grid span { border-right: 1px solid var(--surface-3); }
.board-blank-grid span:last-child { border-right: 0; }

.spark--blank { --tone: var(--muted); }

.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 44px);
  text-align: left;
  max-width: 640px;
}

.empty-state h2,
.empty-state h3 { margin-top: 0; }
.empty-state p:last-of-type { margin-bottom: 0; }
.empty-state .search-form { margin-top: 18px; }

.empty-state--soft {
  grid-column: 1 / -1;
  border-style: dashed;
  background: var(--surface-2);
  padding: 22px;
}

/* ---------- Bandeau de recherche ---------- */

.search-band {
  background: var(--ink);
  color: #fff;
  padding-block: clamp(34px, 4.5vw, 58px);
}

.search-band-inner { max-width: 760px; }
.search-band .eyebrow { color: #8f9aa6; }

.search-band h2 {
  color: #fff;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  margin-bottom: 20px;
}

.search-band input[type="search"] {
  background: #1d232b;
  border-color: #333c47;
  color: #fff;
}

.search-band input[type="search"]::placeholder { color: #8f9aa6; }

.search-band button {
  background: var(--up);
  border-color: var(--up);
}

.search-band button:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* ---------- En-tête d’archive ---------- */

.archive-heading {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(28px, 3.5vw, 46px);
  margin-bottom: clamp(28px, 3.5vw, 44px);
  border-top: 3px solid var(--tone);
}

.archive-heading-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.archive-heading h1 { margin: 0; }
.archive-description { color: var(--ink-soft); max-width: 62ch; margin-top: 12px; }
.archive-heading .search-form { margin-top: 18px; max-width: 460px; }

.archive-figure {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 2px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.archive-code { color: var(--tone); font-weight: 600; letter-spacing: 0.12em; font-size: 0.78rem; }

.archive-count {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--up-strong);
}

.archive-figure .mono { color: var(--muted); text-transform: uppercase; font-size: 0.72rem; }

/* ---------- Article ---------- */

.reading-progress {
  position: sticky;
  top: 72px;
  z-index: 35;
  height: 3px;
  background: var(--surface-3);
}

.reading-progress span {
  display: block;
  height: 100%;
  background: var(--up);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.single-main { max-width: 1220px; }

.single-main > article,
.single-main .post-navigation,
.single-main .related,
.single-main .comments {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3.2vw, 48px);
  margin-bottom: 24px;
}

.single-main > article { border-top: 3px solid var(--tone); }

.article-heading { max-width: 760px; }

.article-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.article-code { color: var(--muted); letter-spacing: 0.12em; }
.article-heading h1 { margin-bottom: 0.3em; }

.article-standfirst {
  font-size: 1.16rem;
  line-height: 1.6;
  color: var(--ink-soft);
  border-left: 3px solid var(--tone);
  padding-left: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  text-transform: uppercase;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.article-avatar { border-radius: 50%; }
.article-author { color: var(--ink); font-weight: 600; }

.article-cover {
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.article-cover img { width: 100%; }

.article-cover figcaption {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.entry-content {
  max-width: 720px;
  font-size: 1.06rem;
  line-height: 1.78;
}

.entry-content > * { margin-block: 0 1.15em; }
.entry-content h2 { margin-top: 1.6em; font-size: 1.62rem; }
.entry-content h3 { margin-top: 1.4em; font-size: 1.3rem; }
.entry-content a { color: var(--up-strong); }
.entry-content ul,
.entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.4em; }

.entry-content blockquote {
  margin-inline: 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--up);
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.entry-content code,
.entry-content kbd {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-3);
  padding: 1px 5px;
  border-radius: 2px;
}

.entry-content pre {
  background: var(--ink);
  color: #e6ebf0;
  padding: 16px;
  border-radius: var(--radius);
  overflow-x: auto;
}

.entry-content pre code { background: none; color: inherit; }

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 0.96rem;
}

.entry-content th,
.entry-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.entry-content th { background: var(--surface-2); font-family: var(--sans); }

.entry-content figcaption {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
}

.entry-content .alignwide { max-width: min(100%, 1000px); margin-inline: auto; }
.entry-content .alignfull { max-width: none; }

.article-footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; }

.article-tags a {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 3px 9px;
  text-decoration: none;
}

.article-tags a:hover { border-color: var(--up); color: var(--up-strong); }

.share {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.share-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.share a,
.copy-link {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px 12px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.share a:hover,
.copy-link:hover { border-color: var(--ink); background: var(--surface-2); }
.copy-link .icon { width: 15px; height: 15px; }
.copy-link.is-done { border-color: var(--up); color: var(--up-strong); }

.post-navigation .nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.post-navigation a {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.25;
  color: var(--ink);
  text-decoration: none;
}

.post-navigation a:hover { color: var(--up-strong); }

.post-navigation .mono {
  display: block;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 6px;
}

.post-navigation .nav-next { text-align: right; }

@media (max-width: 640px) {
  .post-navigation .nav-links { grid-template-columns: minmax(0, 1fr); }
  .post-navigation .nav-next { text-align: left; }
}

/* ---------- Pagination ---------- */

.pagination { margin-top: 32px; }

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}

.page-numbers:hover { border-color: var(--ink); color: var(--ink); }
.page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.page-numbers.dots { border-color: transparent; background: none; }

/* ---------- Commentaires ---------- */

.comment-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.comment-list ol.children {
  list-style: none;
  margin: 0;
  padding-left: clamp(14px, 3vw, 34px);
  border-left: 1px solid var(--line);
}

.comment-body {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.comment-author { display: inline-flex; align-items: center; gap: 9px; }
.comment-author img { border-radius: 50%; }
.comment-author .fn { font-style: normal; font-weight: 600; color: var(--ink); }
.comment-metadata a { color: var(--muted); }
.comment-content { font-size: 1rem; }
.comment-content p:last-child { margin-bottom: 0; }
.reply { font-family: var(--mono); font-size: 0.78rem; }
.comments-closed { color: var(--muted); font-family: var(--mono); font-size: 0.86rem; }

.comment-form { display: grid; gap: 14px; max-width: 700px; }
.comment-form p { margin: 0; }

.comment-form label {
  display: block;
  font-family: var(--mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 5px;
}

.comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 9px;
}

.comment-form .comment-form-cookies-consent label {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--body);
  font-size: 0.92rem;
  margin: 0;
}

.comment-form .submit { justify-self: start; }
.comment-notes, .form-allowed-tags { font-size: 0.88rem; color: var(--muted); }
.comment-reply-title { font-size: 1.24rem; }

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(22px, 3.5vw, 46px);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3.5vw, 48px);
  margin-bottom: 30px;
}

.not-found-figure {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.not-found-code {
  position: absolute;
  top: 12px;
  left: 14px;
  z-index: 2;
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--line-strong);
  letter-spacing: 0.04em;
}

.not-found-figure .spark { position: absolute; inset: auto 0 0 0; height: 60%; }
.not-found h1 { margin-bottom: 0.4em; }
.not-found .search-form { margin: 20px 0; max-width: 460px; }

@media (max-width: 720px) {
  .not-found { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Pied de page ---------- */

.site-footer {
  background: var(--ink);
  color: #b9c2cc;
  padding-top: clamp(34px, 4vw, 54px);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 40px);
  padding-bottom: 32px;
}

.site-footer .wordmark { color: #fff; margin-bottom: 14px; }
.site-footer .wordmark-mark { background: #1d232b; border-color: #333c47; }
.site-footer .wordmark-bars i { background: #6b7684; }
.site-footer .wordmark-bars i:nth-child(3) { background: var(--up); }
.site-footer .wordmark-text small { color: #8f9aa6; }
.footer-about p { font-size: 0.96rem; }
.footer-note { font-size: 0.82rem; color: #8f9aa6; }

.footer-col h2 {
  font-size: 0.78rem;
  font-family: var(--mono);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8f9aa6;
  padding-bottom: 9px;
  margin-bottom: 12px;
  border-bottom: 1px solid #2a323b;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { padding: 5px 0; }
.footer-col a { color: #dfe4ea; text-decoration: none; font-size: 0.97rem; }
.footer-col a:hover { color: #fff; text-decoration: underline; }

.footer-terms li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #22292f;
}

.footer-terms .mono { color: #8f9aa6; font-variant-numeric: tabular-nums; }
.footer-terms li:hover .mono { color: var(--up); }

.footer-search input[type="search"] { background: #1d232b; border-color: #333c47; color: #fff; }
.footer-search input[type="search"]::placeholder { color: #7d8794; }
.footer-search button { background: var(--up); border-color: var(--up); }
.footer-search button:hover { background: #fff; border-color: #fff; color: var(--ink); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-block: 16px;
  border-top: 1px solid #2a323b;
  font-size: 0.82rem;
  color: #8f9aa6;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Accessibilité et impression ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover,
  .button:hover,
  .compartiment:hover { transform: none; }
}

@media print {
  .ribbon,
  .tape,
  .site-header,
  .site-footer,
  .search-band,
  .palmares,
  .share,
  .reading-progress,
  .post-navigation,
  .related,
  .comments { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .single-main > article { border: 0; padding: 0; }
  .entry-content a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
}

/* ---------- Mode sombre : le tableau de bord en salle de marché ---------- */

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8edf2;
    --ink-soft: #b3bdc8;
    --muted: #8b95a1;
    --line: #262d35;
    --line-strong: #3a434d;
    --surface: #171c22;
    --surface-2: #10141a;
    --surface-3: #1e242b;
    --up: #2fb37f;
    --up-strong: #45c893;
    --up-wash: rgba(47, 179, 127, 0.12);
    --down: #e0614c;
    --focus: #6ea8ff;
    --shadow-lift: 0 10px 28px rgba(0, 0, 0, 0.45);
  }

  .tone-0 { --tone: #2fb37f; --tone-wash: rgba(47, 179, 127, 0.14); }
  .tone-1 { --tone: #6aa9d8; --tone-wash: rgba(106, 169, 216, 0.14); }
  .tone-2 { --tone: #d4a439; --tone-wash: rgba(212, 164, 57, 0.14); }
  .tone-3 { --tone: #ad8ec6; --tone-wash: rgba(173, 142, 198, 0.14); }
  .tone-4 { --tone: #9aa5b1; --tone-wash: rgba(154, 165, 177, 0.14); }

  body { background: var(--surface-2); }
  .ribbon { background: #0b0e12; border-bottom: 1px solid var(--line); }
  .ribbon-date { color: #fff; }
  .button { background: var(--up); border-color: var(--up); color: #0b0e12; }
  .button:hover { background: #fff; border-color: #fff; color: #0b0e12; }
  .search-form button { background: var(--up); border-color: var(--up); color: #0b0e12; }
  .search-form button:hover { background: #fff; border-color: #fff; color: #0b0e12; }
  .skip-link { background: var(--up); color: #0b0e12; }
  .skip-link:focus { color: #0b0e12; }

  .board {
    background-image:
      linear-gradient(var(--surface-3) 1px, transparent 1px),
      linear-gradient(90deg, var(--surface-3) 1px, transparent 1px);
  }

  .section-heading,
  .section-title,
  .page-heading,
  .palmares-head { border-bottom-color: var(--line-strong); }

  .search-band { background: #0b0e12; border-block: 1px solid var(--line); }
  .search-band input[type="search"] { background: #171c22; border-color: var(--line-strong); }
  .search-band button:hover { background: #fff; border-color: #fff; color: #0b0e12; }

  .site-footer { background: #0b0e12; border-top: 1px solid var(--line); color: var(--ink-soft); }
  .site-footer .wordmark-mark { background: #171c22; border-color: var(--line-strong); }
  .footer-col h2 { border-bottom-color: var(--line); color: var(--muted); }
  .footer-col a { color: var(--ink); }
  .footer-terms li { border-bottom-color: var(--line); }
  .footer-search input[type="search"] { background: #171c22; border-color: var(--line-strong); }
  .footer-search button:hover { background: #fff; border-color: #fff; color: #0b0e12; }
  .footer-bottom { border-top-color: var(--line); }

  .comment-list ol.children { border-left-color: var(--line); }
  .entry-content pre { background: #0b0e12; border: 1px solid var(--line); }
  .entry-content th { background: var(--surface-3); }
  .spark.is-up .spark-area { fill: rgba(47, 179, 127, 0.16); }
  .spark.is-down .spark-area { fill: rgba(224, 97, 76, 0.14); }
}

/* ---------- Ossature de page ---------- */

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

#main-content { flex: 1 0 auto; }

.home-editor-content .entry-content { max-width: 760px; }

/* Ombres de débordement du bandeau des compartiments (ajoutées par theme.js). */
.tape-list.has-start { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px); mask-image: linear-gradient(90deg, transparent 0, #000 22px); }
.tape-list.has-end { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent 100%); }
.tape-list.has-start.has-end { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%); }

.board-lead { min-width: 0; }
.board-lead .card { box-shadow: var(--shadow); }
