/* ---- Polices, hébergées sur le site (aucun appel à Google Fonts) ---------- */
@font-face { font-family: "Space Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/space-mono-400.woff2") format("woff2"); }
@font-face { font-family: "Space Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/space-mono-700.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/bricolage-grotesque-700.woff2") format("woff2"); }

/* ---- Jetons ------------------------------------------------------------ */
:root {
  --paper: #ffffff;
  --ink: #1c1a18;
  --muted: #7d7873;
  --rule: #e8e5e1;
  --mark: #c8412b;
  --mat: #f3f1ee;
  --fade: 600ms;
  --font: "Space Mono", "Courier New", ui-monospace, monospace;
  --size: 12.5px;
}
:root[data-theme="dark"] {
  --paper: #0f0f0e; --ink: #ecebe8; --muted: #8c8883; --rule: #262523; --mark: #e0553d; --mat: #181817;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: var(--size); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--fade), color var(--fade);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--mark); outline-offset: 3px; }
img { background: var(--mat); display: block; max-width: none; }
p { margin: 0 0 1.2em; }

/* ---- Barre haute --------------------------------------------------------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px; font-size: 12px; letter-spacing: 0.04em;
  /* Fond opaque, couleur du thème : le contenu qui défile passe dessous sans se mélanger aux onglets. */
  background: var(--paper); transition: background-color var(--fade);
}
.bar .name { font-family: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif; font-weight: 700; font-size: 15px; letter-spacing: 0; white-space: nowrap; }
.bar nav { display: flex; gap: 24px; align-items: center; }
.bar nav a { position: relative; padding-block: 2px; white-space: nowrap; }
.bar nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  border-bottom: 1px solid var(--ink); transition: right 300ms ease;
}
.bar nav a:hover::after, .bar nav a[aria-current="page"]::after { right: 0; }
#theme-toggle { display: grid; place-items: center; width: 24px; height: 24px; }
#theme-toggle svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; stroke-width: 1.2; stroke-linecap: round; }
#theme-toggle svg .disc { transition: fill 300ms ease; }
#theme-toggle[aria-pressed="true"] svg .disc { fill: var(--ink); }
.admin-bar .bar { top: 32px; }
@media (max-width: 782px) { .admin-bar .bar { top: 46px; } }

/* ---- Pages --------------------------------------------------------------- */
.page { animation: fadein var(--fade) ease both; }
@keyframes fadein { from { opacity: 0.15; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .page { animation: none; } * { transition: none !important; } }

/* Accueil : carrousel lent */
.home { height: 100svh; min-height: 480px; display: grid; grid-template-rows: 1fr auto; padding-top: 52px; }
.marquee { overflow: hidden; min-height: 0; display: flex; align-items: center; cursor: grab; user-select: none; touch-action: none; }
.marquee.dragging { cursor: grabbing; }
.marquee .strip { display: flex; align-items: center; gap: 3vw; will-change: transform; padding-inline: 3vw; }
.marquee figure { margin: 0; flex: 0 0 auto; position: relative; }
/* Hauteurs fixes en vh (un pourcentage serait ignoré ici : la figure n'a pas de hauteur définie).
   Un peu plus petites que la bande des séries, pour laisser la place au titre sous l'image. */
.marquee img { height: 48vh; width: auto; transition: opacity var(--fade); -webkit-user-drag: none; }
.marquee img.v { height: 60vh; }
.marquee figcaption {
  position: absolute; left: 0; right: 0; bottom: -28px;
  font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}
.marquee figcaption span { color: var(--muted); text-transform: none; margin-left: 12px; }
.marquee figcaption b { color: var(--mark); font-weight: 400; }

.marquee figure:hover img { opacity: 0.92; }
.home .foot-line {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px 24px; font-size: 11px; color: var(--muted); letter-spacing: 0.04em;
}
.home .foot-line a:hover { color: var(--ink); }

/* Séries : blocs */
.series { padding: 96px 24px 48px; min-height: 100svh; }
.series .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 48px 32px; }
.series .grid > a { display: grid; gap: 10px; }
.series .cover { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.series img { max-width: 100%; max-height: 100%; width: auto; height: auto; transition: opacity var(--fade); }
.series a:hover img { opacity: 0.92; }
.series .cap { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; letter-spacing: 0.04em; }
.series .cap .title { text-transform: uppercase; }
.series .cap .meta { color: var(--muted); white-space: nowrap; }
.series .cap .meta b { color: var(--mark); font-weight: 400; }

/* Vidéos : une colonne, grands lecteurs 16:9, titre discret au-dessus */
.videos { padding: 96px 24px 64px; max-width: 1200px; margin: 0 auto; display: grid; gap: 64px; }
.videos-intro { max-width: 46ch; }
.video { display: grid; gap: 10px; }
.video-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 12px; letter-spacing: 0.04em; }
.video-title { color: var(--ink); }
.video-date { color: var(--muted); white-space: nowrap; }
.video-frame {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  background: #000; cursor: pointer;
}
.video-frame img { width: 100%; height: 100%; object-fit: cover; transition: opacity var(--fade); }
.video-frame:hover img { opacity: 0.85; }
.video-frame .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 12px; letter-spacing: 0.04em; color: #fff; background: rgba(0, 0, 0, 0.6);
  padding: 10px 14px; transition: background 300ms ease;
}
.video-frame:hover .play { background: rgba(0, 0, 0, 0.85); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* Extrait muet au survol : recouvre la vignette en fondu */
.video-frame .preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 400ms ease; pointer-events: none; }
.video-frame.previewing .preview { opacity: 1; }
.video-frame.previewing img { opacity: 1; }
.videos-more { font-size: 12px; letter-spacing: 0.04em; color: var(--muted); margin: 0; }
.videos-more a { border-bottom: 1px solid var(--rule); }
.videos-more a:hover { color: var(--ink); border-color: var(--ink); }

/* Page série : bande horizontale */
.serie { height: 100svh; min-height: 480px; display: grid; grid-template-rows: 1fr auto; padding-top: 52px; }
.track {
  overflow-x: auto; overflow-y: hidden; min-height: 0;
  display: flex; align-items: center; gap: 8vw; padding: 12px 24px;
  scrollbar-width: none; cursor: grab; user-select: none;
}
.track.dragging { cursor: grabbing; }
.track::-webkit-scrollbar { display: none; }
.track figure { margin: 0; flex: 0 0 auto; height: 100%; display: flex; align-items: center; }
.track img { height: min(68vh, 100%); width: auto; -webkit-user-drag: none; }
.track img.v { height: min(86vh, 100%); }
.track .intro { flex: 0 0 auto; max-width: 34ch; align-self: center; cursor: auto; user-select: text; }
.track .intro p:last-child { margin-bottom: 0; }
.track .end { flex: 0 0 auto; padding-right: 24px; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; white-space: nowrap; }
.track .end a { color: var(--ink); border-bottom: 1px solid var(--ink); }
.serie .foot {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 16px;
  padding: 16px 24px 28px; font-size: 12px; letter-spacing: 0.04em;
}
.serie .foot .title { text-transform: uppercase; }
.serie .foot .title span { color: var(--muted); text-transform: none; margin-left: 16px; }
.serie .foot .nav { display: flex; gap: 20px; align-items: baseline; font-variant-numeric: tabular-nums; }
.serie .foot .nav button { font-size: 16px; line-height: 1; padding: 4px 6px; }
.serie .foot .nav button:hover { color: var(--mark); }
.serie .foot .counter { color: var(--muted); }
.serie .foot .counter b { color: var(--mark); font-weight: 400; }
.serie .foot .hint { color: var(--muted); text-align: right; }

/* À propos */
.about {
  min-height: 100svh; padding: 96px 24px 48px;
  display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 46ch); gap: 48px 64px; align-content: start;
}
.about .portrait { width: 100%; height: auto; }
.about p { max-width: 46ch; }
.label { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; margin-bottom: 8px; }
h1.label { font-size: 12px; font-weight: 400; margin: 0 0 8px; }
/* Titre présent pour les moteurs et les lecteurs d'écran, sans être affiché */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.about dl { margin: 32px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; font-size: 12px; }
.about dt { color: var(--muted); }
.about dd { margin: 0; }
.about dd a { border-bottom: 1px solid var(--rule); }
.about dd a:hover { border-color: var(--ink); }

/* Pied de page discret (toutes les pages sauf l'accueil, qui a le sien) */
.site-foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 20px 24px 24px; font-size: 11px; color: var(--muted); letter-spacing: 0.04em;
}
.site-foot a:hover { color: var(--ink); }

/* Pages de texte (mentions légales, 404) */
.text-page { min-height: 100svh; padding: 96px 24px 48px; max-width: 60ch; }
.text-page h2, .text-page h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; margin: 2em 0 0.6em; font-weight: 700; }
.text-page a { border-bottom: 1px solid var(--rule); }
.text-page a:hover { border-color: var(--ink); }

@media (max-width: 720px) {
  /* Barre sur une seule ligne, même sur un petit écran. */
  .bar { padding: 12px 14px; gap: 12px; } .bar nav { gap: 12px; font-size: 11px; }
  .marquee img { height: 36vh; } .marquee img.v { height: 46vh; }

  .series { padding: 80px 16px 40px; } .series .grid { gap: 32px 20px; }
  .videos { padding: 80px 16px 40px; gap: 40px; }
  .track { padding: 12px 16px; gap: 24px; } .track img { height: min(56vh, 100%); } .track img.v { height: min(70vh, 100%); }
  .track .intro { max-width: 80vw; }
  .serie .foot { padding: 12px 16px 24px; grid-template-columns: 1fr auto; } .serie .foot .hint { display: none; }
  .about { grid-template-columns: 1fr; padding: 80px 16px 40px; gap: 32px; }
  .text-page { padding: 80px 16px 40px; }
}
