/* ============================================================
   INFIDÉLITÉ — dossier PDF de Nvidia
   dark · vert Nvidia · typo poster
   ============================================================ */

:root {
  --bg: #05070a;
  --bg-2: #080b09;
  --panel: #0a0f0b;
  --ink: #eef3ea;
  --muted: #8a9482;
  --line: rgba(118, 185, 0, 0.16);
  --line-soft: rgba(255, 255, 255, 0.07);
  --nv: #76b900;
  --nv-bright: #a3ff12;
  --nv-glow: rgba(118, 185, 0, 0.45);
  --hot: #ff2e5b;
  --warm: #ffb300;
  --radius: 16px;
  --ease: cubic-bezier(0.2, 0.9, 0.2, 1);
  --font-display: 'Anton', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', 'JetBrains Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
}
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- couches d'ambiance ---------- */
.fx-noise,
.fx-scan,
.fx-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.fx-noise {
  z-index: 90;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.fx-scan {
  z-index: 91;
  opacity: 0.22;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.06) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: soft-light;
}

.fx-ambient {
  z-index: 0;
  inset: -20%;
  background-size: cover;
  background-position: center;
  filter: blur(90px) saturate(1.6) brightness(0.55);
  opacity: 0;
  transition: opacity 0.9s var(--ease);
  transform: scale(1.1);
}
.fx-ambient.on { opacity: 0.55; }

/* ============================================================
   GATE
   ============================================================ */
.gate {
  position: relative;
  z-index: 40;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: max(22px, env(safe-area-inset-top)) 20px max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 70% at 80% -10%, rgba(118, 185, 0, 0.14), transparent 60%),
    radial-gradient(90% 60% at 10% 110%, rgba(118, 185, 0, 0.07), transparent 65%),
    var(--bg);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.gate-marquee {
  position: absolute;
  top: 46%;
  left: -10%;
  width: 120%;
  transform: rotate(-4deg);
  border-block: 1px solid var(--line);
  padding: 7px 0;
  overflow: hidden;
  opacity: 0.5;
  z-index: 0;
}
.gate-marquee span {
  display: inline-block;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--nv);
  animation: marquee 26s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.gate-inner {
  position: relative;
  z-index: 1;
  grid-row: 2;
  align-self: center;
  max-width: 560px;
  width: 100%;
  margin-inline: auto;
}

.gate-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--nv-bright);
  box-shadow: 0 0 12px var(--nv-bright);
  animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.gate-title {
  font-family: var(--font-display);
  font-size: clamp(58px, 17.5vw, 132px);
  line-height: 0.82;
  letter-spacing: -0.01em;
  margin: 0;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  text-wrap: balance;
}
.gate-title::after {
  content: attr(data-glitch);
  position: absolute;
  inset: 0;
  color: var(--nv);
  clip-path: polygon(0 30%, 100% 18%, 100% 34%, 0 46%);
  transform: translate(2px, -2px);
  opacity: 0.5;
  mix-blend-mode: screen;
  animation: glitch 6.5s steps(1) infinite;
  pointer-events: none;
}
@keyframes glitch {
  0%, 90%, 100% { transform: translate(2px, -2px); opacity: 0.45; }
  91% { transform: translate(-5px, 1px); opacity: 0.8; }
  92% { transform: translate(6px, -3px); opacity: 0.3; }
  93% { transform: translate(-2px, 2px); opacity: 0.7; }
  94% { transform: translate(2px, -2px); opacity: 0.45; }
}

.gate-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nv);
  margin: 14px 0 0;
}
.gate-tag em { font-style: normal; }

.gate-pitch {
  margin: 22px 0 0;
  font-size: 15px;
  color: var(--muted);
  max-width: 36ch;
}

.gate-form { margin-top: 30px; }
.gate-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.gate-field {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.gate-field input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 0 16px;
  height: 58px;
  font-size: 17px;
  letter-spacing: 0.01em;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.gate-field input::placeholder { color: #586055; }
.gate-field input:focus {
  outline: none;
  border-color: var(--nv);
  background: rgba(118, 185, 0, 0.07);
  box-shadow: 0 0 0 4px rgba(118, 185, 0, 0.13);
}
.btn-go {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--nv);
  color: #04140a;
  display: grid;
  place-items: center;
  transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s;
  box-shadow: 0 10px 30px -12px var(--nv-glow);
}
.btn-go:hover { background: var(--nv-bright); }
.btn-go:active { transform: scale(0.94); }

.gate-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: #98a294;
  max-width: 42ch;
}

.gate-foot {
  position: relative;
  z-index: 1;
  grid-row: 3;
  align-self: end;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #626b60;
}

/* ============================================================
   HUD
   ============================================================ */
.hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  padding: max(10px, env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(to bottom, rgba(5, 7, 10, 0.94) 30%, rgba(5, 7, 10, 0));
  pointer-events: none;
}
.hud > * { pointer-events: auto; }

.hud-progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.07);
}
.hud-progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--nv), var(--nv-bright));
  box-shadow: 0 0 12px var(--nv-glow);
  transition: width 0.45s var(--ease);
}

.hud-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 640px;
  margin-inline: auto;
}

.hud-brand { display: flex; flex-direction: column; line-height: 1; }
.hud-name {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.hud-sub {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--nv);
  margin-top: 3px;
}

.hud-right { display: flex; align-items: center; gap: 6px; }

.hud-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--muted);
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.2s, border-color 0.2s;
}
.hud-icon[aria-pressed="false"] { color: #4d554b; }
.hud-icon[aria-pressed="false"] .wave { opacity: 0.15; }
.hud-icon:active { transform: scale(0.92); }

.hud-me {
  max-width: 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
}

.ring { position: relative; width: 44px; height: 44px; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring-bg { stroke: rgba(255, 255, 255, 0.09); }
.ring-fg {
  stroke: var(--nv);
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
  transition: stroke-dashoffset 0.55s var(--ease), stroke 0.3s;
  filter: drop-shadow(0 0 5px var(--nv-glow));
}
.ring.done .ring-fg { stroke: var(--nv-bright); }
.ring b {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.ring.pulse { animation: ringPulse 0.5s var(--ease); }
@keyframes ringPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

/* ============================================================
   FEED / SLIDES
   ============================================================ */
.feed {
  position: relative;
  z-index: 10;
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  outline: none;
}

.slide {
  position: relative;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 560px;
  margin-inline: auto;
  padding: max(62px, calc(env(safe-area-inset-top) + 56px)) 18px max(16px, env(safe-area-inset-bottom));
}

.slide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--nv);
  background: rgba(118, 185, 0, 0.06);
}
.tag.ghost {
  color: #9aa593;
  border-color: var(--line-soft);
  background: none;
}

.stage {
  display: grid;
  place-items: center;
  min-height: 0;
  position: relative;
}

.frame {
  position: relative;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(118, 185, 0, 0.26);
  box-shadow:
    0 40px 90px -40px rgba(118, 185, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transform: scale(0.965);
  opacity: 0.55;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), box-shadow 0.5s;
}
.slide.is-active .frame {
  transform: scale(1);
  opacity: 1;
  box-shadow:
    0 50px 110px -40px rgba(118, 185, 0, 0.6),
    0 0 0 1px rgba(118, 185, 0, 0.18) inset;
}
.frame::before,
.frame::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-color: var(--nv);
  opacity: 0.75;
  z-index: 4;
  pointer-events: none;
}
.frame::before { top: 9px; left: 9px; border-left: 2px solid; border-top: 2px solid; }
.frame::after { bottom: 9px; right: 9px; border-right: 2px solid; border-bottom: 2px solid; }

.poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.15) brightness(0.9);
  z-index: 2;
  transition: opacity 0.55s var(--ease);
}
.frame.playing .poster { opacity: 0; }
.frame.embed .poster { opacity: 0; }
.player { position: absolute; inset: 0; z-index: 1; }
.player iframe,
.player video {
  width: 100%; height: 100%;
  border: 0; display: block;
}
.player video { object-fit: cover; background: #000; }

.shield {
  position: absolute;
  inset: 0;
  z-index: 4;
  touch-action: pan-y;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 32%);
}

.sound-pill {
  position: absolute;
  z-index: 5;
  left: 11px;
  bottom: 11px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(5, 7, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}
.sound-pill.on { color: var(--nv-bright); border-color: rgba(118, 185, 0, 0.55); }

.fallback {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: none;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(5, 7, 10, 0.82);
  border: 1px solid rgba(118, 185, 0, 0.55);
  color: var(--nv-bright);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  backdrop-filter: blur(6px);
}
.frame.failed .fallback { display: inline-flex; }
.frame.pending .poster { opacity: 1; }
.tag.ghost.pending {
  color: var(--nv-bright);
  border-color: rgba(118, 185, 0, 0.4);
  animation: blink 2s ease-in-out infinite;
}
.modal-pending {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.meta { min-height: 44px; }
.vtitle {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.vsub {
  margin: 5px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #6f7a6c;
  text-transform: uppercase;
}
.vsub b { color: var(--nv); font-weight: 500; }

/* ---------- notation ---------- */
.rate {
  --p: 0.5;
  padding-top: 4px;
  position: relative;
}

/* ---------- « note pour continuer » ---------- */
.rate.needs-vote::before {
  content: 'note pour continuer ↓';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(118, 185, 0, 0.14);
  border: 1px solid rgba(118, 185, 0, 0.55);
  color: var(--nv-bright);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: hintFloat 1.7s ease-in-out infinite;
  pointer-events: none;
}
.rate.needs-vote .thumb {
  background: #f2f7ee;
  border-color: var(--nv);
  opacity: 1;
  animation: demoDrag 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.rate.needs-vote .track {
  box-shadow: 0 0 0 4px rgba(118, 185, 0, 0.12), 0 0 22px -2px rgba(118, 185, 0, 0.55);
  animation: trackGlow 1.7s ease-in-out infinite;
}
.rate.denied .track { animation: shakeX 0.45s ease; }
.rate.needs-vote .rate-state { opacity: 0; }

@keyframes demoDrag {
  0%, 8% { left: 0%; }
  46%, 54% { left: 100%; }
  92%, 100% { left: 0%; }
}
@keyframes trackGlow {
  0%, 100% { box-shadow: 0 0 0 4px rgba(118, 185, 0, 0.08), 0 0 16px -4px rgba(118, 185, 0, 0.4); }
  50% { box-shadow: 0 0 0 7px rgba(118, 185, 0, 0.16), 0 0 26px 0 rgba(118, 185, 0, 0.65); }
}
@keyframes hintFloat {
  0%, 100% { transform: translate(-50%, 0); opacity: 0.85; }
  50% { transform: translate(-50%, -4px); opacity: 1; }
}
@keyframes shakeX {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}
.rate-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.rate-score {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--font-display);
  line-height: 0.9;
}
.rate-score .n {
  font-size: 34px;
  color: var(--ink);
  transition: color 0.2s;
}
.rate-score .n.empty { color: #3b4238; }
.rate-score i {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  color: #5d655b;
}
.rate-state {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5d655b;
  transition: color 0.2s;
}
.rate-state.saved { color: var(--nv); }

.track {
  position: relative;
  height: 6px;
  margin: 12px 13px 6px;
  pointer-events: auto;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--hot) 0%, var(--warm) 46%, var(--nv) 100%);
  cursor: pointer;
  touch-action: none;
}
.track::before {
  content: '';
  position: absolute;
  inset: -20px 0;
  border-radius: 999px;
}
.track::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 18px -4px rgba(118, 185, 0, 0.55);
  pointer-events: none;
}
.track-stops {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 0;
  pointer-events: none;
}
.track-stops i {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
}
.thumb {
  position: absolute;
  top: 50%;
  left: calc(var(--p) * 100%);
  width: 30px; height: 30px;
  margin: 0;
  border-radius: 50%;
  background: #f2f7ee;
  border: 4px solid var(--nv);
  box-shadow: 0 0 0 5px rgba(118, 185, 0, 0.14), 0 10px 24px -8px var(--nv-glow);
  transform: translate(-50%, -50%);
  transition: left 0.24s var(--ease), transform 0.16s var(--ease), box-shadow 0.2s;
  pointer-events: none;
}
.rate.untouched .thumb {
  opacity: 0.6;
  background: transparent;
  border-color: rgba(118, 185, 0, 0.5);
  box-shadow: 0 0 0 5px rgba(118, 185, 0, 0.06);
}
.rate.untouched .ends { opacity: 0.9; }
.rate.dragging .thumb {
  transition: transform 0.1s;
  transform: translate(-50%, -50%) scale(1.16);
  box-shadow: 0 0 0 8px rgba(118, 185, 0, 0.18), 0 10px 28px -6px var(--nv-glow);
}
.track:focus-visible {
  outline: 2px solid var(--nv);
  outline-offset: 10px;
  border-radius: 999px;
}

.ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ends .l { color: rgba(255, 46, 91, 0.85); }
.ends .r { color: rgba(163, 255, 18, 0.85); }

.score-pop { animation: scorePop 0.42s var(--ease); }
@keyframes scorePop {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ---------- entrée en scène ---------- */
.meta, .rate {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.slide.is-active .meta { opacity: 1; transform: none; transition-delay: 0.05s; }
.slide.is-active .rate { opacity: 1; transform: none; transition-delay: 0.12s; }

/* ============================================================
   BOARD
   ============================================================ */
.slide.board {
  display: block;
  min-height: 100dvh;
  height: auto;
  padding-top: max(74px, calc(env(safe-area-inset-top) + 66px));
  padding-bottom: 60px;
  scroll-snap-stop: normal;
}

.board-head { text-align: center; }
.board-kicker {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--nv);
}
.board-title {
  font-family: var(--font-display);
  font-size: clamp(44px, 14vw, 76px);
  line-height: 0.85;
  letter-spacing: 0.01em;
  margin: 0;
  text-transform: uppercase;
}
.board-sub {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6f7a6c;
}
.board-sub b { color: var(--ink); }

.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 8px;
  margin: 26px 0 6px;
}
.pod {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: none;
  padding: 0;
  text-align: center;
}
.pod-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #0b100c;
  position: relative;
}
.pod-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pod-1 .pod-thumb { border-color: rgba(118, 185, 0, 0.6); box-shadow: 0 0 0 1px rgba(118, 185, 0, 0.35), 0 24px 50px -28px var(--nv-glow); }
.pod-rank {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  color: #4f574d;
}
.pod-1 .pod-rank { color: var(--nv-bright); font-size: 34px; }
.pod-empty .pod-thumb {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.015);
}
.pod-q { font-family: var(--font-display); font-size: 26px; color: #333a31; }
.pod-empty .pod-avg, .pod-empty .pod-name { color: #3f473d; }
.pod-avg {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.02em;
}
.pod-avg small { font-family: var(--font-mono); font-size: 9px; color: #6f7a6c; }
.pod-name {
  font-size: 10px;
  line-height: 1.3;
  color: #96a091;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  border-top: 1px solid var(--line-soft);
}
.row {
  width: 100%;
  display: grid;
  grid-template-columns: 22px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), background 0.2s;
}
.board.revealed .row { opacity: 1; transform: none; }
.row:active { background: rgba(118, 185, 0, 0.07); }
.row-rank {
  font-family: var(--font-display);
  font-size: 15px;
  color: #5d655b;
}
.row-top .row-rank { color: var(--nv-bright); }
.row-thumb {
  width: 42px; height: 56px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #0b100c;
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-body { min-width: 0; }
.row-title {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-sub {
  margin: 3px 0 0;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8d978a;
}
.row-sub b { color: var(--nv); font-weight: 500; }
.row-score { text-align: right; }
.row-score b {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
}
.row-score small {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: #8d978a;
  letter-spacing: 0.1em;
}
.row-mine {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: #04140a;
  background: var(--nv);
  border-radius: 4px;
  padding: 1px 4px;
}

.addcard {
  margin-top: 30px;
  padding: 18px;
  border: 1px dashed rgba(118, 185, 0, 0.35);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(118, 185, 0, 0.05), transparent);
}
.addcard h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.addcard p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.addcard form { display: flex; flex-direction: column; gap: 8px; }
.addcard input,
.sheet-card input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.03);
  font-size: 14px;
}
.addcard input:focus,
.sheet-card input:focus {
  outline: none;
  border-color: var(--nv);
  box-shadow: 0 0 0 3px rgba(118, 185, 0, 0.12);
}
.addcard button,
.sheet-card button[type="submit"] {
  height: 48px;
  border-radius: 10px;
  background: var(--nv);
  color: #04140a;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.15s;
}
.addcard button:hover,
.sheet-card button[type="submit"]:hover { background: var(--nv-bright); }
.addcard button:active,
.sheet-card button[type="submit"]:active { transform: scale(0.98); }

.board-foot {
  margin-top: 26px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6f7a6c;
}

/* ============================================================
   FAB + SHEET + MODAL + TOAST
   ============================================================ */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(2, 4, 3, 0.7);
  backdrop-filter: blur(3px);
}
.sheet-card {
  width: 100%;
  max-width: 520px;
  background: var(--panel);
  border-top: 1px solid rgba(118, 185, 0, 0.28);
  border-radius: 20px 20px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  animation: sheetIn 0.3s var(--ease);
}
@keyframes sheetIn {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.sheet-grab {
  width: 38px; height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  margin: 4px auto 16px;
}
.sheet-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.sheet-sub { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.sheet-sub b { color: var(--nv); }
.sheet-card form { display: flex; flex-direction: column; gap: 8px; }
.sheet-msg {
  margin: 12px 0 0;
  min-height: 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: #8a9482;
}
.sheet-msg.err { color: #ff6b86; }
.sheet-msg.ok { color: var(--nv); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 4, 3, 0.86);
  backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  width: min(460px, 100%);
  max-height: 94dvh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid rgba(118, 185, 0, 0.22);
  border-radius: 18px;
  padding: 14px;
  animation: modalIn 0.26s var(--ease);
  scrollbar-width: none;
}
.modal-card::-webkit-scrollbar { display: none; }
@keyframes modalIn {
  from { transform: scale(0.97) translateY(10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 3;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(5, 7, 10, 0.7);
  border: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 14px;
}
.modal-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  height: min(52dvh, 400px);
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(118, 185, 0, 0.2);
}
.modal-player { position: absolute; inset: 0; }
.modal-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-body { padding: 14px 4px 4px; }
.modal-body h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.modal-sub {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6f7a6c;
}
.modal-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nv);
  text-decoration: none;
  border-bottom: 1px solid rgba(118, 185, 0, 0.35);
  padding-bottom: 2px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  z-index: 200;
  max-width: min(88vw, 380px);
  padding: 11px 16px;
  border-radius: 999px;
  background: #0b120c;
  border: 1px solid rgba(118, 185, 0, 0.45);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.confetti {
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
}

/* ---------- état vide ---------- */
.empty-box {
  text-align: center;
  padding: 30px 18px;
  border: 1px dashed rgba(118, 185, 0, 0.3);
  border-radius: var(--radius);
  max-width: 340px;
}
.empty-box .board-title { font-size: clamp(30px, 9vw, 44px); }
.empty-box .board-sub { margin-top: 10px; }


/* ---------- vidéo plein écran (slide vidéo) ---------- */
.slide[data-kind="video"] {
  display: block;
  padding: 0;
  height: 100dvh;
  min-height: 100dvh;
}
.slide[data-kind="video"] .slide-top {
  position: absolute;
  top: max(60px, calc(env(safe-area-inset-top) + 52px));
  left: 16px;
  right: 16px;
  z-index: 7;
}
.slide[data-kind="video"] .stage { position: absolute; inset: 0; display: block; }
.slide[data-kind="video"] .frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  opacity: 1;
  background: #05070a;
}
.slide[data-kind="video"] .frame::before,
.slide[data-kind="video"] .frame::after { display: none; }
.slide[data-kind="video"] .poster {
  z-index: 0;
  filter: blur(26px) brightness(0.55) saturate(1.7);
  transform: scale(1.25);
  opacity: 1;
}
.slide[data-kind="video"] .frame.playing .poster,
.slide[data-kind="video"] .frame.embed .poster { opacity: 1; }
.slide[data-kind="video"] .player { z-index: 1; }
.slide[data-kind="video"] .player video {
  object-fit: contain;
  background: transparent;
}
.slide[data-kind="video"] .shield {
  z-index: 4;
  background: none;
}
.slide[data-kind="video"] .sound-pill {
  left: auto;
  right: 16px;
  bottom: auto;
  top: calc(max(60px, calc(env(safe-area-inset-top) + 52px)) + 34px);
  z-index: 7;
}
.slide[data-kind="video"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 7, 10, 0.97) 8%, rgba(5, 7, 10, 0.72) 46%, rgba(5, 7, 10, 0) 100%);
}
.slide[data-kind="video"] .meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: calc(108px + env(safe-area-inset-bottom));
  z-index: 6;
}
.slide[data-kind="video"] .rate {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 6;
}
.slide[data-kind="video"] .meta,
.slide[data-kind="video"] .rate { opacity: 1; transform: none; }
.slide[data-kind="video"] .vtitle { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }

.swipe-hint {
  position: absolute;
  left: 50%;
  bottom: calc(200px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(238, 243, 234, 0.82);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.9);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.swipe-hint .chev {
  font-size: 22px;
  display: block;
  line-height: 1;
  color: var(--nv-bright);
  animation: swipeUp 1.9s ease-in-out infinite;
}
.swipe-hint .swipe-txt {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(5, 7, 10, 0.55);
  border: 1px solid rgba(118, 185, 0, 0.35);
  backdrop-filter: blur(4px);
}
.swipe-hint.gone { opacity: 0; transform: translate(-50%, 14px); }
@keyframes swipeUp {
  0% { transform: translateY(10px); opacity: 0.35; }
  50% { transform: translateY(-6px); opacity: 1; }
  100% { transform: translateY(-14px); opacity: 0.35; }
}

/* ---------- responsive ---------- */
@media (min-width: 720px) {
  .slide { max-width: 620px; padding-inline: 24px; }
  .vtitle { font-size: 17px; }
  .row { grid-template-columns: 26px 46px minmax(0, 1fr) auto; }
  .row-thumb { width: 46px; height: 62px; }
  .row-title { font-size: 13.5px; }
}

@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;
  }
}
