/* Portfolio de Loïc Barthélémy.
   Page unique qui défile, palette sobre noir / gris / blanc, typographie Poppins
   (légère pour les titres), et une fiche projet qui se superpose à la page
   (la page recule derrière, comme une feuille iOS). */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-Bold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-Light.woff") format("woff");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-Regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-Medium.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --display: "Outfit", "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;   /* titres */
  --bg: #0d0d0d;
  --raised: #1a1a1a;
  --sheet: #141414;
  --text: #f2f2f2;
  --text-soft: #c2c2c2;
  --muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.10);
  --focus: #ffffff;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 56px;
  scrollbar-gutter: stable;
  background: var(--bg);
}
html.sheet-open { overflow: hidden; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 650px at 88% -8%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 62%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 56px; padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.solid, .nav.open {
  background: rgba(13, 13, 13, 0.78);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
  border-bottom-color: var(--line);
}
.nav-name { font-weight: 400; letter-spacing: 0.01em; font-size: 0.9rem; transition: opacity 0.15s, transform 0.15s; }
.nav-name.swap { opacity: 0; transform: translateY(-5px); }
.nav-links { display: flex; gap: clamp(18px, 3vw, 36px); font-size: 0.8125rem; font-weight: 400; letter-spacing: 0.01em; }
.nav-links a { color: var(--muted); transition: color 0.2s; }
.nav-links a:hover, .nav-links a.on { color: var(--text); }
.nav-toggle { display: none; }

@media (max-width: 720px) {
  .nav-toggle {
    display: block; position: relative; width: 44px; height: 44px; margin-right: -10px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span {
    position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text);
    transition: transform 0.3s var(--ease), top 0.3s var(--ease);
  }
  .nav-toggle span:first-child { top: 18px; }
  .nav-toggle span:last-child { top: 25px; }
  .nav.open .nav-toggle span:first-child { top: 21.5px; transform: rotate(45deg); }
  .nav.open .nav-toggle span:last-child { top: 21.5px; transform: rotate(-45deg); }
  .nav-links {
    position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px;
    background: rgba(13, 13, 13, 0.97); border-bottom: 1px solid var(--line);
    font-size: 1.15rem; font-weight: 400;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav.open .nav-links { visibility: visible; opacity: 1; transform: none; }
  .nav-links a { padding: 14px 0; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
}

/* ---------- Page (recule quand une fiche est ouverte) ---------- */
.page {
  transform-origin: 50% calc(var(--sy, 0px) + 50vh);
  transition: transform 0.55s var(--ease);
}
.sheet-open .page { transform: scale(0.94); }

/* ---------- Accueil : nom, diaphragme animé au scroll, présentation ---------- */
.stage-wrap { position: relative; }
.stage {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto;
  padding: 84px var(--gutter) clamp(28px, 4vw, 56px);
}
.has-iris .stage { position: sticky; top: 0; }
.has-iris .stage-spacer { height: 170vh; height: 170svh; }
.stage h1 {
  position: relative; z-index: 3;
  font-family: var(--display);
  font-size: clamp(2.1rem, 6.6vw, 5.4rem);
  line-height: 1; letter-spacing: -0.022em; font-weight: 700; white-space: nowrap;
}
.stage .handle {
  position: relative; z-index: 3;
  margin-top: clamp(10px, 1.4vw, 20px);
  font-family: var(--display); font-size: clamp(1rem, 1.6vw, 1.3rem); font-weight: 400; letter-spacing: 0.03em; color: var(--muted);
}
.intro-text {
  position: relative; z-index: 3;
  margin-top: clamp(18px, 2.6vw, 34px);
  font-size: clamp(1.25rem, 2.7vw, 2.15rem); line-height: 1.4; letter-spacing: -0.015em;
  font-weight: 300; color: var(--text); max-width: 34em; text-wrap: pretty;
  white-space: pre-line;   /* les retours à la ligne écrits dans l'admin sont respectés */
}
.has-iris .intro-text { opacity: 0; }

/* Diaphragme : vit derrière le nom, placé et dimensionné par le JS */
.iris-area { display: none; }
.has-iris .iris-area {
  position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none;
  display: grid; place-items: center;
}
.iris-wrap { position: relative; display: grid; place-items: center; will-change: transform, opacity; }
.iris-glow {
  position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 185, 255, 0.2), rgba(79, 143, 247, 0));
  filter: blur(18px);
}
.iris-wrap svg { position: relative; width: 100%; height: 100%; display: block; overflow: visible; }

/* Évite l'affichage furtif des textes par défaut avant le chargement des réglages */
.wait-settings .js-text { visibility: hidden; }

/* ---------- Catégories ---------- */
.cat {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(64px, 9vw, 128px) var(--gutter);
  border-top: 1px solid var(--line);
}
.cat h2 { font-family: var(--display); font-size: clamp(2rem, 4.6vw, 3.75rem); line-height: 1.05; letter-spacing: -0.03em; font-weight: 400; }

.cat-intro { margin-top: clamp(14px, 2vw, 24px); max-width: 52ch; color: var(--text-soft); font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 300; line-height: 1.6; white-space: pre-line; }

.grid {
  margin-top: clamp(36px, 6vw, 72px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4.5vw, 64px) clamp(16px, 2.4vw, 32px);
}
@media (max-width: 720px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.note { color: var(--muted); grid-column: 1 / -1; }

.card { display: block; }
.card-media { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--raised); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.card:hover .card-media img { transform: scale(1.025); }
.card-head { margin-top: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.card h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; }
.card-year { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.card-role { margin-top: 2px; color: var(--muted); font-size: 0.9rem; }
.card-sum { margin-top: 10px; color: var(--text-soft); font-size: 0.9rem; max-width: 52ch; }

/* ---------- Ils m'ont fait confiance ---------- */
.clients {
  margin-top: clamp(36px, 6vw, 72px);
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 22px);
}
@media (max-width: 1000px) { .clients { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .clients { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px)  { .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.client {
  position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: clamp(16px, 2vw, 26px); background: var(--raised);
  border: 1px solid var(--line);
}
.client img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
a.client:hover img { transform: scale(1.04); }
.client-initial { position: absolute; inset: 0; display: grid; place-items: center; font-size: 3rem; font-weight: 300; color: var(--muted); }
.client-name {
  position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
  padding: 6px 13px; border-radius: 12px;
  font-size: clamp(0.72rem, 1.1vw, 0.85rem); font-weight: 500; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.client-go {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0.85; transition: opacity 0.2s;
}
a.client:hover .client-go { opacity: 1; }

/* ---------- Montages : catégories + vidéos ---------- */
.grid.grid-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
@media (max-width: 900px) { .grid.grid-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gcard-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--raised);
  border-radius: clamp(16px, 2vw, 26px); border: 1px solid var(--line);
}
.gcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.gcard:hover .gcard-media img { transform: scale(1.04); }
.gcard-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 50%); }
.gcard-name {
  position: absolute; z-index: 1; left: 12px; bottom: 12px; max-width: calc(100% - 24px);
  padding: 8px 16px; border-radius: 14px; color: #fff; font-weight: 500; font-size: clamp(0.85rem, 1.3vw, 1rem);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
}
.gcard-count { margin-top: 10px; color: var(--muted); font-size: 0.85rem; }

.vgrid {
  margin-top: clamp(28px, 4vw, 48px); padding-inline: clamp(20px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 16px;
}
.vgrid.is-vertical { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vgrid:last-child { padding-bottom: clamp(40px, 6vw, 72px); }
@media (max-width: 820px) { .vgrid, .vgrid.is-vertical { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .vgrid { grid-template-columns: minmax(0, 1fr); } }
.vnote { padding-inline: clamp(20px, 5vw, 64px); margin-top: 28px; }
.vmedia { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--raised); cursor: pointer; }
.vmedia.is-vertical { aspect-ratio: 9 / 16; }
.vmedia.playing { cursor: default; }
.vmedia img, .vmedia iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.vmedia .play { width: 52px; height: 52px; }
.vmedia .play svg { width: 20px; height: 20px; }
.vtitle { min-height: 1.4em; margin-top: 10px; font-size: 0.92rem; line-height: 1.4; color: var(--text-soft); }

/* ---------- Lecteur vidéo (fiches) ---------- */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: var(--raised); overflow: hidden; }
.player img, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.player::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 45%);
}
.player.playing::after { display: none; }
.play {
  position: absolute; z-index: 2; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.2); cursor: pointer;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  display: grid; place-items: center; transition: transform 0.3s var(--ease), background 0.3s;
}
.play:hover { transform: scale(1.06); background: rgba(255, 255, 255, 0.3); }
.play svg { margin-left: 3px; }

/* ---------- Pied de page ---------- */
.footer {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) 40px;
  border-top: 1px solid var(--line);
}
.footer h2 { font-family: var(--display); font-size: clamp(1.8rem, 4.4vw, 3.4rem); letter-spacing: -0.03em; font-weight: 400; line-height: 1.12; text-wrap: balance; }
.mail {
  display: inline-block; margin-top: clamp(20px, 3vw, 36px);
  font-size: clamp(1.05rem, 2.6vw, 1.8rem); font-weight: 300; letter-spacing: -0.015em;
  border-bottom: 1px solid var(--muted); padding-bottom: 4px; overflow-wrap: anywhere;
  transition: border-color 0.2s;
}
.mail:hover { border-bottom-color: var(--text); }
.socials { margin-top: clamp(40px, 6vw, 72px); display: flex; flex-wrap: wrap; gap: 12px 32px; font-weight: 400; }
.socials a { color: var(--muted); transition: color 0.2s; }
.socials a:hover { color: var(--text); }
.legal { margin-top: clamp(48px, 8vw, 96px); color: var(--muted); font-size: 0.8rem; }

/* ---------- Fiche projet (superposée à la page) ---------- */
.sheet-root { position: fixed; inset: 0; z-index: 100; }
.sheet-root[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); opacity: 0; transition: opacity 0.5s var(--ease); }
.sheet {
  position: absolute; left: 50%; bottom: 0; top: clamp(20px, 5vh, 48px);
  width: min(1100px, 100%);
  display: flex; overflow: hidden; outline: 0;
  background: var(--sheet); border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 100%);
  transition: transform 0.55s var(--ease);
}
.sheet-root.open .sheet { transform: translate(-50%, 0); }
.sheet-root.open .sheet-backdrop { opacity: 1; }
.sheet-scroll { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-close {
  position: absolute; z-index: 5; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(26, 26, 26, 0.85); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: background 0.2s;
}
.sheet-close:hover { background: #262626; }

.sheet-body { padding: clamp(24px, 5vw, 56px) clamp(20px, 5vw, 64px) 0; max-width: 820px; }
.sheet-body h2 { font-family: var(--display); font-size: clamp(1.9rem, 4.4vw, 3.2rem); line-height: 1.06; letter-spacing: -0.03em; font-weight: 400; text-wrap: balance; }
.facts { margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 14px 40px; }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: 0.8rem; }
.facts dd { margin: 2px 0 0; font-weight: 500; font-size: 0.95rem; }
.lead { margin-top: clamp(28px, 4vw, 44px); font-size: clamp(1.1rem, 1.9vw, 1.4rem); font-weight: 300; line-height: 1.5; letter-spacing: -0.01em; max-width: 38ch; }
.story { margin-top: 1.1em; max-width: 62ch; color: var(--text-soft); font-size: 1rem; line-height: 1.75; white-space: pre-line; }
.lead + .story { margin-top: clamp(24px, 3vw, 36px); }

.gallery { margin-top: clamp(36px, 6vw, 72px); padding-inline: clamp(20px, 5vw, 64px); columns: 2; column-gap: 12px; }
.gallery img { width: 100%; height: auto; margin-bottom: 12px; border-radius: 10px; break-inside: avoid; background: var(--raised); }
@media (max-width: 560px) { .gallery { columns: 1; } }

.sheet-next {
  margin: clamp(32px, 5vw, 64px) clamp(20px, 5vw, 64px) 0; padding: 24px 0 clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.sheet-next span { color: var(--muted); font-size: 0.85rem; }
.next-btn { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-size: clamp(1.2rem, 2.6vw, 1.75rem); font-weight: 400; letter-spacing: -0.02em; }
.next-btn:hover { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.sheet-body:last-child { padding-bottom: clamp(40px, 6vw, 72px); }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .sheet-open .page { transform: none; }
}

/* =====================================================================
   Décor : timeline façon Premiere Pro, marqueurs, viseur, grain
   (le comportement est dans js/extras.js)
   ===================================================================== */

:root { --ax: 14px; --pr: #4f8ff7; }   /* position de l'axe de la timeline, bleu « Premiere Pro » */
@media (max-width: 720px) { :root { --ax: 5px; } }

.cat, .footer { position: relative; }
.page { position: relative; z-index: 1; }   /* le trait blanc de la tête de lecture passe derrière le contenu */

/* Grain de pellicule très léger */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 45; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Timeline à gauche ---------- */
.tl {
  position: fixed; left: 0; top: 72px; bottom: 28px; width: 28px; z-index: 40;
  pointer-events: none; transition: opacity 0.4s;
}
.sheet-open .tl, .sheet-open .hud, .sheet-open .tl-line { opacity: 0; visibility: hidden; }
.tl-axis { position: absolute; left: 14px; top: 0; bottom: 0; width: 1px; background: var(--tl-axis, rgba(255, 255, 255, 0.18)); }
/* graduations : leur couleur (blanc → bleu) est pilotée par js/extras.js selon l'avancée du diaphragme */
.tl-ticks {
  position: absolute; left: 15px; top: 0; bottom: 0; width: 5px; color: var(--tl-tick, rgba(255, 255, 255, 0.2));
  background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 10px);
}
.tl-ticks-major {
  width: 10px; color: var(--tl-major, rgba(255, 255, 255, 0.38));
  background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 50px);
}

/* Marqueurs (cliquables) */
.tl-mark {
  position: absolute; left: 14px; top: 0; transform: translateY(-50%);
  display: flex; align-items: center; gap: 8px; color: var(--muted);
  pointer-events: auto; transition: color 0.3s;
}
.tl-mark.on { color: var(--pr); filter: drop-shadow(0 0 3px rgba(79, 143, 247, 0.6)); }
.tl-flag { display: block; width: 11px; height: 9px; background: currentColor; clip-path: polygon(0 0, 62% 0, 100% 50%, 62% 100%, 0 100%); }
.tl-label { display: none; font-size: 0.7rem; letter-spacing: 0.02em; white-space: nowrap; }

/* Tête de lecture (blanche) */
.tl-head { position: absolute; left: 0; top: 0; width: 100%; height: 0; will-change: transform; transition: filter 0.45s; }
.tl-head::before {
  content: ""; position: absolute; left: 1px; top: -6px; width: 12px; height: 12px; background: #fff; transition: background 0.45s;
  clip-path: polygon(0 0, 60% 0, 100% 50%, 60% 100%, 0 100%);
}
/* Son trait blanc, qui s'estompe, passe derrière le contenu de la page */
.tl-line {
  position: fixed; left: var(--ax); top: 0; z-index: 0; pointer-events: none;
  width: min(34vw, 420px); height: 1px; will-change: transform; transition: filter 0.45s;
}
.tl-line::before, .tl-line::after { content: ""; position: absolute; inset: 0; transition: opacity 0.45s; }
.tl-line::before { background: linear-gradient(to right, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)); }
.tl-line::after { background: linear-gradient(to right, rgba(79, 143, 247, 0.85), rgba(79, 143, 247, 0)); opacity: 0; }
.tl-tc {
  position: absolute; left: 34px; top: -11px; display: none; z-index: 2;
  padding: 2px 8px; border-radius: 6px; font-size: 0.7rem; line-height: 1.5; color: #fff;
  font-variant-numeric: tabular-nums; letter-spacing: 0.03em;
  background: rgba(13, 13, 13, 0.82); border: 1px solid rgba(255, 255, 255, 0.2); transition: border-color 0.45s;
}

/* Quand on est dans une section : la timeline passe en bleu « Premiere Pro », avec une lueur très légère */
.in-cat .tl-head { filter: drop-shadow(0 0 4px rgba(79, 143, 247, 0.65)); }
.in-cat .tl-head::before { background: var(--pr); }
.in-cat .tl-tc { border-color: rgba(79, 143, 247, 0.55); }
.in-cat .tl-line { filter: drop-shadow(0 0 3px rgba(79, 143, 247, 0.55)); }
.in-cat .tl-line::before { opacity: 0; }
.in-cat .tl-line::after { opacity: 1; }

@media (min-width: 1440px) {
  .tl-label, .tl-tc { display: block; }
}
@media (max-width: 720px) {
  .tl { width: 12px; top: 64px; }
  .tl-axis { left: 5px; }
  .tl-ticks { left: 6px; width: 3px; }
  .tl-ticks-major { width: 6px; }
  .tl-mark { display: none; }   /* sur téléphone : pas de marqueurs, seulement le curseur */
  .tl-head::before { left: 0; top: -4px; width: 8px; height: 8px; }
  .tl-line { width: 90px; }
}

/* ---------- Marqueurs posés sur la ligne de chaque section ---------- */
.cat-meta {
  position: absolute; left: 0; right: 0; top: 0; transform: translateY(-50%);
  padding-inline: var(--gutter); display: flex; justify-content: space-between; align-items: center;
  pointer-events: none; font-size: 0.7rem; letter-spacing: 0.04em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cat-meta > span { background: var(--bg); }
.cat-flag { display: flex; align-items: center; gap: 10px; padding-right: 14px; transition: color 0.3s; }
.cat-flag i { display: block; width: 9px; height: 11px; background: currentColor; clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%); }
.cat-count { padding-left: 14px; }
.cat-meta.on .cat-flag { color: #fff; }
.footer .cat-count { display: none; }

/* ---------- Viseur sur l'accueil ---------- */
.hud {
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  color: rgba(255, 255, 255, 0.66); font-size: 0.7rem; letter-spacing: 0.08em; font-variant-numeric: tabular-nums;
  transition: opacity 0.2s;
}
html:not(.has-iris) .hud { display: none; }
.hud-c { position: absolute; display: none; width: 22px; height: 22px; border: 1px solid rgba(255, 255, 255, 0.32); }
.hud-c.c1 { top: 64px; left: 52px; border-right: 0; border-bottom: 0; }
.hud-c.c2 { top: 64px; right: 52px; border-left: 0; border-bottom: 0; }
.hud-c.c3 { bottom: 26px; left: 52px; border-right: 0; border-top: 0; }
.hud-c.c4 { bottom: 26px; right: 52px; border-left: 0; border-top: 0; }
@media (min-width: 1100px) { .hud-c { display: block; } }
.hud-rec, .hud-info { position: absolute; bottom: 34px; display: flex; align-items: center; gap: 12px; }
.hud-rec { left: max(var(--gutter), 20px); }
.hud-info { right: max(var(--gutter), 20px); gap: 14px; }
@media (min-width: 1100px) { .hud-rec { left: 88px; } .hud-info { right: 88px; } }
/* assez large pour avoir la timeline avec ses noms : le viseur se décale vers l'intérieur */
@media (min-width: 1440px) {
  .hud-c.c1, .hud-c.c3 { left: 140px; } .hud-c.c2, .hud-c.c4 { right: 140px; }
  .hud-rec { left: 176px; } .hud-info { right: 176px; }
}
.hud-dot {
  display: block; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30;
  box-shadow: 0 0 9px rgba(255, 59, 48, 0.75); animation: rec 1.4s steps(1, end) infinite;
}
@keyframes rec { 50% { opacity: 0.12; box-shadow: none; } }
@media (max-width: 480px) {
  .hud-rec { gap: 8px; letter-spacing: 0.05em; }
  .hud-info { gap: 8px; letter-spacing: 0.04em; }
}

@media (prefers-reduced-motion: reduce) {
  .hud-dot { animation: none; }
  .nav-name { transition: none; }
}


/* ---------- Téléphone : plus d'air autour des vidéos, éléments un peu plus petits ---------- */
@media (max-width: 720px) {
  .grid, .clients { margin-inline: 10px; }
  .grid.grid-groups { gap: 14px 12px; }
  .vgrid { padding-inline: 34px; gap: 22px 14px; }
  .vgrid:not(.is-vertical) { padding-inline: 30px; }
  .vgrid.is-vertical { padding-inline: 40px; }
  .vnote, .gallery, .sheet-next { margin-inline: 30px; padding-inline: 0; }
  .gallery { padding-inline: 30px; margin-inline: 0; }
  .sheet-body { padding-inline: 30px; }
}
@media (max-width: 480px) {
  .vgrid:not(.is-vertical) { padding-inline: 34px; }
  .vgrid.is-vertical { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 44px; }
}
