/* ==========================================================
   Angelo Guidet, portfolio (v2.1)
   Clair par défaut, sombre selon le système ou au choix.
   Deux polices : Bricolage (titres, chiffres), Geist (texte).
   Échelle typographique : rapport 1,25 à partir de 17px.
   Un seul accent (cobalt), un seul rayon (12px), pas d'ombre.
   Icônes : Phosphor (assets/img/icons.svg).
   Couches (z-index) : 1 médias, 2 bouton lecture, 3 erreur,
   10 en-tête.
   ========================================================== */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f3f4f2;
  --surface: #e9eae7;
  --text: #151617;
  --muted: #5c6066;
  --line: rgb(21 22 23 / 0.12);
  --accent: #2f55d4;
  --accent-text: #2447bd;
  --on-accent: #f7f8fa;
  --radius: 12px;
  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --measure: 68ch;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Bricolage", "Segoe UI", system-ui, sans-serif;
  --body: "Geist", "Segoe UI", system-ui, sans-serif;

  /* Échelle 1,25 (17 · 21 · 26,6 · 33,2 · 41,5 · 52 · 65 · 101,6px).
     Les grands pas rétrécissent sur petit écran. */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.328rem;
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.66rem);
  --step-3: clamp(1.66rem, 1.3rem + 1.6vw, 2.075rem);
  --step-4: clamp(1.9rem, 1.4rem + 2.6vw, 2.6rem);
  --step-5: clamp(2.2rem, 1.5rem + 3.8vw, 3.25rem);
  --step-6: clamp(2.6rem, 1.6rem + 5vw, 4.05rem);
  --step-8: clamp(4rem, 2rem + 8vw, 6.35rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111213;
    --surface: #1b1c1e;
    --text: #ecedee;
    --muted: #9a9da3;
    --line: rgb(236 237 238 / 0.12);
    --accent: #4265dd;
    --accent-text: #93a9f2;
    --on-accent: #f7f8fa;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111213;
  --surface: #1b1c1e;
  --text: #ecedee;
  --muted: #9a9da3;
  --line: rgb(236 237 238 / 0.12);
  --accent: #4265dd;
  --accent-text: #93a9f2;
  --on-accent: #f7f8fa;
  color-scheme: dark;
}

/* Bandes (inspirées d'Apple) : le changement de fond sépare les
   sections, sans trait ni ombre. Rythme de la page :
   accroche (fond) · vidéos (sombre) · avis (fond) · méthode (douce)
   · tarif (fond) · stage (douce) · contact (sombre). */
.tile-soft {
  --surface: #f3f4f2;
  background: #e9eae7;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tile-soft { --surface: #111213; background: #161719; }
}
:root[data-theme="dark"] .tile-soft { --surface: #111213; background: #161719; }

.tile-dark {
  --bg: #18191b;
  --surface: #242527;
  --text: #ecedee;
  --muted: #a0a3a8;
  --line: rgb(236 237 238 / 0.14);
  --accent: #4265dd;
  --accent-text: #93a9f2;
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tile-dark { --bg: #1d1e21; --surface: #28292c; }
}
:root[data-theme="dark"] .tile-dark { --bg: #1d1e21; --surface: #28292c; }

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
p, li, dd { max-width: var(--measure); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.035em;
  line-height: 1.02;
  text-wrap: balance;
}
h2 { font-size: var(--step-5); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; font-variation-settings: "opsz" 24; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* Icônes Phosphor : taille du texte, couleur du texte */
.i { width: 1.1em; height: 1.1em; flex: none; fill: currentColor; vertical-align: -0.15em; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 20;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: var(--radius); font-weight: 600;
}
.skip:focus { left: 8px; }

/* ---------- Boutons et liens ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font: 600 var(--step-0)/1 var(--body);
  text-decoration: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.btn:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn:active { transform: scale(0.95); }
.btn-small { min-height: 42px; padding: 0 16px; font-size: var(--step--1); gap: 8px; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1.5px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.link:hover { border-color: var(--accent); color: var(--accent-text); }
.link .arr { transition: transform 0.25s var(--ease); }
.link:hover .arr { transform: translateX(3px); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-family: var(--display); font-weight: 700; font-size: var(--step-1); letter-spacing: -0.03em; text-decoration: none; }
.nav { display: flex; gap: 28px; margin-left: auto; margin-right: 8px; }
.nav a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.nav a:hover, .nav a[aria-current] { color: var(--text); }
.nav a[aria-current] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.header-inner .btn { min-height: 42px; padding: 0 18px; }
.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  font: 600 var(--step--1)/1 var(--body);
  cursor: pointer;
}
.menu-toggle:active { transform: scale(0.95); }
@media (max-width: 767px) {
  .header-inner { gap: 10px; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .nav.open a { padding: 14px 0; font-size: var(--step-1); color: var(--text); }
  .nav.open a + a { border-top: 1px solid var(--line); }
}

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 7vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.hero h1 { font-size: var(--step-6); font-weight: 700; max-width: 12ch; }
.hero .lead { margin-top: 24px; font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 36ch; }
.hero-ctas { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.hero-aside { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); max-width: 44ch; font-size: var(--step--1); color: var(--muted); }
.hero-aside a { color: var(--accent-text); font-weight: 600; text-underline-offset: 3px; }

.hero-media { position: relative; padding: 0 0 12% 18%; }
.hero-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--surface); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.hero-clip {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 38%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  border: 5px solid var(--bg);
  z-index: 1;
}
.hero-clip video { width: 100%; height: 100%; object-fit: cover; }
.hero-clip.failed { display: none; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 460px; }
}

/* ---------- Chiffres ---------- */

.facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(24px, 4vw, 64px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.fact dt {
  display: block;
  font-family: var(--display);
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variation-settings: "opsz" 96;
  font-variant-numeric: tabular-nums;
}
.fact dd { margin: 12px 0 0; color: var(--muted); max-width: 30ch; }
@media (max-width: 767px) { .facts { grid-template-columns: 1fr; } }

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

.section { padding: clamp(72px, 9vw, 128px) 0; }
.section-tight { padding-top: 0; }
.section-title { max-width: 18ch; }
.section-intro { margin-top: 18px; color: var(--muted); max-width: 52ch; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; }
.section-head .section-intro { margin-top: 0; }
.section-head h2 { max-width: 18ch; }
.sub-title { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variation-settings: "opsz" 72; }

/* ---------- Vidéos ---------- */

.gallery {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
  align-items: start;
}
.clip { margin: 0; }

.player {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.player img, .player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player img { transition: transform 0.6s var(--ease); }
.clip:hover .player img { transform: scale(1.03); }
.player video { z-index: 1; background: #111; }
/* Aperçu muet au survol : la vidéo apparaît par-dessus l'affiche */
.player .preview { z-index: 1; opacity: 0; transition: opacity 0.3s var(--ease); }
.player.previewing .preview { opacity: 1; }
.player.previewing .play-btn { opacity: 0.85; }
.play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #151617;
}
.play-btn {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: rgb(247 248 250 / 0.92);
  transition: transform 0.3s var(--ease);
}
.play-btn .i { width: 26px; height: 26px; margin-left: 3px; }
.clip:hover .play-btn { transform: scale(1.08); }
.play:active .play-btn { transform: scale(0.96); }
.player.playing .play { display: none; }

/* Chargement : le bouton reste, légèrement estompé */
.player.loading .play-btn { opacity: 0.6; }

/* État vide : la vidéo ne se charge pas */
.player-error {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  color: var(--text);
}
.player-error > .i { width: 32px; height: 32px; color: var(--muted); }
.player-error p { font-size: var(--step--1); line-height: 1.5; color: var(--muted); }
.player-error p strong { display: block; color: var(--text); font-size: var(--step-0); margin-bottom: 4px; }
.player-error-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.player-error .link { font-size: var(--step--1); }

.clip figcaption { margin-top: 14px; }
.clip .meta { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.clip .meta .num { font-weight: 400; }
.clip h3 { margin-top: 4px; }
.clip h3 + p { margin-top: 6px; color: var(--muted); }

@media (max-width: 980px) {
  .gallery { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .gallery { grid-template-columns: 1fr; }
  .player { max-height: 78vh; aspect-ratio: 9 / 16; margin: 0 auto; }
}

/* ---------- Méthode ---------- */

.method {
  display: grid;
  grid-template-columns: minmax(0, 380px) 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.method figure { margin: 0; }
.method figure img { border-radius: var(--radius); width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.method figcaption { margin-top: 10px; font-size: var(--step--1); color: var(--muted); }
.steps { list-style: none; margin: 40px 0 0; padding: 28px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.steps strong { display: block; font-family: var(--display); font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.steps span { display: block; margin-top: 6px; color: var(--muted); }
@media (max-width: 860px) {
  .method { grid-template-columns: 1fr; }
  .method figure { max-width: 440px; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Tarif ---------- */

.pricing {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(32px, 5vw, 64px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
.price {
  font-size: var(--step-8);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
  font-variation-settings: "opsz" 96;
  font-variant-numeric: tabular-nums;
}
.price-note { margin-top: 18px; color: var(--muted); max-width: 34ch; }
.included { list-style: none; margin: 0; padding: 0; }
.included li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.included li + li { border-top: 1px solid var(--line); }
.included .i { color: var(--text); }
.pricing .actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.pricing .fine { margin-top: 16px; font-size: var(--step--1); color: var(--muted); }
.packs { margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); max-width: 420px; }
.packs dt { font-size: var(--step--1); color: var(--muted); }
.packs dd { margin: 4px 0 0; font-family: var(--display); font-size: var(--step-3); font-weight: 700; letter-spacing: -0.04em; line-height: 1; font-variation-settings: "opsz" 72; }
@media (max-width: 767px) { .pricing { grid-template-columns: 1fr; align-items: start; } }

/* ---------- Avis ---------- */

.quote-main { margin: clamp(40px, 5vw, 56px) 0 0; max-width: 980px; }
.quote-main blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}
.quote-main figcaption, .quotes figcaption { margin-top: 16px; color: var(--muted); }
.quote-main figcaption strong, .quotes figcaption strong { color: var(--text); font-weight: 600; }
.quotes { margin-top: clamp(48px, 6vw, 72px); display: grid; grid-template-columns: 1fr 1fr; gap: 32px clamp(32px, 5vw, 80px); max-width: 980px; }
.quotes figure { margin: 0; padding-top: 20px; border-top: 1px solid var(--line); }
.quotes blockquote { margin: 0; font-size: var(--step-1); line-height: 1.45; letter-spacing: -0.01em; }
@media (max-width: 767px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- Stage, parcours et YouTube ---------- */

.path { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.internship h2 { max-width: 14ch; }
.internship .details { display: flex; gap: 12px; margin-top: 24px; max-width: 42ch; }
.internship .details .i { margin-top: 0.3em; color: var(--muted); }
.internship .details + .details { margin-top: 12px; color: var(--muted); }
.internship .btn { margin-top: 32px; }
.path .sub-title { padding-bottom: 8px; }
.timeline { margin: 0; }
.timeline div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 18px 0; }
.timeline div + div { border-top: 1px solid var(--line); }
.timeline dt { color: var(--muted); font-size: var(--step--1); padding-top: 0.2em; font-variant-numeric: tabular-nums; }
.timeline dd { margin: 0; }
.timeline dd strong { display: block; font-weight: 600; }
.timeline dd span { display: block; margin-top: 4px; color: var(--muted); }
.extras { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; color: var(--muted); }
.extras strong { color: var(--text); font-weight: 600; }

.youtube { margin-top: clamp(64px, 8vw, 112px); padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
.youtube-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; }
.youtube-head p { color: var(--muted); max-width: 46ch; }
.channels { list-style: none; margin: clamp(32px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px clamp(24px, 3vw, 48px); }
.channel { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.channel strong {
  font-family: var(--display);
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variation-settings: "opsz" 96;
}
.channel:nth-child(n+3) strong { color: var(--muted); }
.channel span { color: var(--muted); }

@media (max-width: 980px) { .channels { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .path { grid-template-columns: 1fr; }
  .timeline div { grid-template-columns: 7.5rem 1fr; }
}
@media (max-width: 480px) { .channels { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */

.contact { padding-bottom: clamp(88px, 11vw, 144px); }
.contact h2 { max-width: 16ch; }
.mail {
  display: inline-block;
  margin-top: 32px;
  font-family: var(--display);
  font-size: var(--step-6);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-variation-settings: "opsz" 96;
  text-decoration: none;
  color: var(--accent-text);
  border-bottom: 3px solid currentColor;
  overflow-wrap: anywhere;
  transition: opacity 0.25s var(--ease);
}
.mail:hover { opacity: 0.75; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 32px; }
.mail-row .mail { margin-top: 0; }
.copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  font: 600 var(--step--1)/1 var(--body);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.copy:hover { border-color: var(--accent-text); color: var(--accent-text); }
.copy:active { transform: scale(0.95); }
.contact-more { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 36px; font-size: var(--step-1); }
.contact-more li { display: flex; align-items: center; gap: 10px; }
.contact-more .i { color: var(--muted); }
.contact-more a { font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--line); transition: border-color 0.25s var(--ease), color 0.25s var(--ease); }
.contact-more a:hover { color: var(--accent-text); border-color: currentColor; }

/* ---------- Visionneuse ---------- */

.viewer-open { overflow: hidden; }
.viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: max(16px, env(safe-area-inset-top, 0px)) var(--gutter) max(16px, env(safe-area-inset-bottom, 0px));
  border: 0;
  background: #0d0e0f;
  color: var(--text);
}
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; }
.viewer::backdrop { background: #0d0e0f; }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1100px; width: 100%; margin: 0 auto; }
.viewer-count { color: var(--muted); font-size: var(--step--1); }
.viewer-close, .viewer-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(236 237 238 / 0.06);
  color: var(--text);
  font: 600 var(--step--1)/1 var(--body);
  cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.viewer-close:hover, .viewer-nav:hover { background: rgb(236 237 238 / 0.14); }
.viewer-close:active, .viewer-nav:active { transform: scale(0.95); }
.viewer-nav { padding: 0; width: 52px; height: 52px; }
.viewer-nav .i { width: 22px; height: 22px; }
.viewer-stage { display: grid; grid-template-columns: auto auto auto; justify-content: center; align-items: center; gap: clamp(12px, 3vw, 40px); min-height: 0; }
.viewer-frame {
  position: relative;
  height: 100%;
  max-height: 100%;
  aspect-ratio: 9 / 16;
  max-width: calc(100vw - 2 * var(--gutter));
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.viewer-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.viewer-frame .player-error { background: var(--surface); }
.viewer-caption { max-width: 1100px; width: 100%; margin: 0 auto; text-align: left; }
.viewer-caption .meta { display: flex; gap: 12px; font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.viewer-caption .meta .num { font-weight: 400; }
.viewer-caption .meta span + span::before { content: "·"; margin-right: 12px; }
.viewer-caption h3 { margin-top: 4px; }
.viewer-caption .viewer-text { margin-top: 4px; color: var(--muted); }

@media (max-width: 640px) {
  .viewer-stage { grid-template-columns: 1fr; position: relative; }
  .viewer-frame { justify-self: center; }
  .viewer-nav { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); background: rgb(13 14 15 / 0.55); }
  .viewer-nav:active { transform: translateY(-50%) scale(0.95); }
  .viewer-nav[data-step="-1"] { left: 4px; }
  .viewer-nav[data-step="1"] { right: 4px; }
  .viewer-caption h3 { font-size: var(--step-0); }
}

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

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: var(--step--1); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.theme-switch span { text-decoration: underline; text-underline-offset: 3px; }
.theme-switch:hover { color: var(--text); }

/* ---------- Mentions légales ---------- */

.legal { padding: clamp(40px, 6vw, 80px) 0 80px; }
.legal h1 { font-size: var(--step-5); font-weight: 700; margin-top: 24px; }
.legal .intro { margin-top: 14px; color: var(--muted); }
.legal section { max-width: 760px; padding: 28px 0; border-top: 1px solid var(--line); }
.legal section:first-of-type { margin-top: 40px; }
.legal h2 { font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.legal p { color: var(--muted); }
.legal p + p { margin-top: 10px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent-text); }

/* ---------- Page introuvable (404) ---------- */

.not-found { padding: clamp(56px, 10vw, 140px) 0 clamp(72px, 10vw, 140px); }
.not-found .code { font-family: var(--display); font-size: var(--step-8); font-weight: 700; letter-spacing: -0.06em; line-height: 0.9; color: var(--muted); font-variant-numeric: tabular-nums; }
.not-found h1 { margin-top: 28px; font-size: var(--step-5); font-weight: 700; max-width: 16ch; }
.not-found p { margin-top: 18px; color: var(--muted); max-width: 46ch; }
.not-found .hero-ctas { margin-top: 32px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
