/* ==========================================================
   LA CULTURE, C'EST RÉEL ! — styles
   ========================================================== */

:root {
  --paper: #ffffff;
  --ink: #0d0d0d;
  --red: #d0102f;
  --dim: #707070;
  --stroke: #d4d4d4;
  --red-ghost: rgba(208, 16, 47, .8);
  --mis-x: 0px;
  --mis-y: 0px;

  --f-cond: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
  --f-sans: 'Montserrat', system-ui, sans-serif;

  --gutter: 16px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);

  --z-bands: 0;
  --z-content: 2;
  --z-stamp: 80;
  --z-trail: 90;
  --z-grain: 95;
  --z-cursor: 100;
}

@media (min-width: 768px) {
  :root { --gutter: 4vw; }
}

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

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

body {
  margin: 0;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.has-cursor,
body.has-cursor * { cursor: none; }

p, h1, h2 { margin: 0; }

::selection { background: var(--red); color: var(--paper); }

/* ==========================================================
   01 — HERO
   ========================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 80px var(--gutter) 64px;
  overflow: hidden;
  isolation: isolate;
}

.bands {
  position: absolute;
  inset: -6% -25%;
  z-index: var(--z-bands);
  transform: rotate(-8deg);
  pointer-events: none;
}
.bands__skew {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10vh 0;
}
.band {
  white-space: nowrap;
  text-transform: uppercase;
  line-height: 1;
}
.band__track {
  display: inline-flex;
  will-change: transform;
}
.band__track > span { padding-right: .4em; }

.band--outline {
  font: 900 clamp(2.2rem, 7vw, 6rem)/1 var(--f-sans);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--stroke);
}
.band--tape {
  font: 400 clamp(1.8rem, 4.6vw, 3.6rem)/1 var(--f-cond);
  letter-spacing: .03em;
  color: #fff;
  padding: .3em 0;
}
.band--red { background: var(--red); transform: rotate(4deg); }
.band--ink { background: var(--ink); transform: rotate(-3deg); }

/* Bandeau noir en tête de la 2e section : entier, jamais rogné */
.band--cross {
  position: absolute;
  top: clamp(2.5rem, 6vw, 5rem);
  left: -10%;
  right: -10%;
  overflow: hidden;
  pointer-events: none;
}

.hero__title {
  position: relative;
  z-index: var(--z-content);
  font: 400 clamp(3.2rem, 14.5vw, 17rem)/.9 var(--f-cond);
  text-transform: uppercase;
  text-align: center;
  letter-spacing: -.005em;
}
.hero__line { display: block; white-space: nowrap; }
.hero__title em { font-style: normal; color: var(--red); }

.char {
  display: inline-block;
  will-change: transform;
}


/* ==========================================================
   02 — MANIFESTE
   ========================================================== */
.manifesto {
  position: relative;
  padding: clamp(9rem, 17vw, 14rem) var(--gutter) clamp(5rem, 14vw, 11rem);
  overflow: hidden;
}
.manifesto__text {
  font: 400 clamp(2.2rem, 9.2vw, 10rem)/.92 var(--f-cond);
  text-transform: uppercase;
}
.mline {
  display: block;
  white-space: nowrap;
  line-height: .96;
  will-change: transform;
}
.mline__in {
  position: relative;
  z-index: 0;
  display: inline-block;
}

.hot {
  position: relative;
  display: inline-block;
  font-weight: inherit;
  color: var(--red);
  transition: color .2s var(--ease-out);
}
.hot::before {
  content: '';
  position: absolute;
  inset: .04em -.08em -.02em;
  z-index: -1;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .28s var(--ease-out);
}
.hot.is-on { color: #fff; }
.hot.is-on::before { transform: scaleX(1); }

.censor {
  position: relative;
  display: inline-block;
}
.censor::after {
  content: '';
  position: absolute;
  inset: .1em -.06em .04em;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform .22s var(--ease-out);
}
.censor.is-on::after { transform: scaleX(1); }

/* ==========================================================
   03 — ÉCRAN (spotlight)
   ========================================================== */
.screen {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(5rem, 12vw, 9rem) var(--gutter);
  background: var(--ink);
  color: var(--dim);
  overflow: hidden;
}

.screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, .045) 2px 3px);
}
.screen .w {
  display: inline-block;
  transform-origin: 50% 60%;
  will-change: transform;
}
.screen__stage {
  position: relative;
  z-index: 1;
  max-width: 21ch;
  font: 800 clamp(1.45rem, 5.6vw, 4.6rem)/1.12 var(--f-sans);
  text-transform: uppercase;
  text-align: justify;
}
.screen__lit {
  position: absolute;
  inset: 0;
  color: #fff;
  clip-path: circle(var(--r, 0px) at var(--mx, 50%) var(--my, 50%));
  pointer-events: none;
}
.screen__lit mark,
.screen__lit .is-mark {
  background: none;
  color: var(--red);
}
.screen__q {
  display: block;
  margin-top: .5em;
  font: 400 1.7em/1 var(--f-cond);
  text-align: left;
}
.screen__lit .screen__q { color: var(--red); }

.is-reduced .screen__lit { clip-path: none; }

/* ==========================================================
   04 — SORS
   ========================================================== */
.out {
  position: relative;
  min-height: 115svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5rem, 12vw, 9rem) var(--gutter);
  overflow: hidden;
  isolation: isolate;
}
.out__diag {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 170vmax;
  transform: translate(-50%, -50%) rotate(-38deg);
  pointer-events: none;
}
.out__diag-in {
  font: 900 clamp(1.6rem, 4.4vw, 3.6rem)/1.08 var(--f-sans);
  text-transform: uppercase;
  text-align: justify;
  color: transparent;
  -webkit-text-stroke: 1px var(--stroke);
}
.out__title {
  font: 400 clamp(3.4rem, 18vw, 20rem)/.85 var(--f-cond);
  text-transform: uppercase;
  text-align: center;
}
.out__line { display: block; width: fit-content; margin-inline: auto; white-space: nowrap; }
.out__stack { position: relative; }

/* Minuteur : le cadre rouge se dessine pendant les 2 s avant la 2e phrase */
.out__timer {
  position: absolute;
  inset: -12px;
  width: calc(100% + 24px);
  height: calc(100% + 24px);
  overflow: visible;
  pointer-events: none;
  visibility: hidden;
}
.out__timer-rect {
  fill: none;
  stroke: var(--red);
  stroke-width: 8;
}
.out__swap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font: 400 clamp(3.4rem, 18vw, 20rem)/.85 var(--f-cond);
  text-transform: uppercase;
  text-align: center;
  visibility: hidden;
}
.out__swap em { font-style: normal; color: var(--red); }
.is-reduced .out__swap { display: none; }
.out__title .red { color: var(--red); }

/* ---------- Signature ---------- */
.sign {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  padding: clamp(4rem, 10vw, 8rem) var(--gutter) 48px;
  border-top: 10px solid var(--ink);
}
.sign__small {
  font: 400 clamp(1.15rem, 5.8vw, 2.8rem)/.98 var(--f-cond);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.sign__punch { color: var(--red); }
.sign__home {
  display: block;
  margin-left: auto;
  line-height: 0;
  transition: transform .2s var(--ease-out);
}
.sign__home img {
  display: block;
  width: auto;
  height: clamp(28px, 4vw, 44px);
}
.sign__home:hover { transform: rotate(-4deg) scale(1.06); }
.sign__home:focus-visible { outline: 3px solid var(--red); outline-offset: 6px; }
.has-cursor .sign__home { cursor: none; }


/* ---------- Défaut de repérage (piloté par la vitesse de la souris) ---------- */
.hero__title,
.manifesto__text,
.out__title {
  text-shadow: var(--mis-x) var(--mis-y) 0 var(--red-ghost);
}
.screen__stage {
  text-shadow: calc(var(--mis-x) * -.6) 0 0 var(--red-ghost);
}

/* Flash inversé au coup de tampon */
.is-flash #main { filter: invert(1) contrast(1.4); }

/* ==========================================================
   Interactions globales
   ========================================================== */
.trail-layer {
  position: fixed;
  inset: 0;
  z-index: var(--z-trail);
  pointer-events: none;
  overflow: hidden;
}
.trail {
  position: absolute;
  left: 0;
  top: 0;
  font: 400 clamp(1.6rem, 2.6vw, 2.6rem)/1 var(--f-cond);
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.trail--red { color: var(--red); }

.stamp {
  position: absolute;
  left: 0;
  top: 0;
  z-index: var(--z-stamp);
  pointer-events: none;
  padding: .06em .3em .02em;
  border: .16em solid currentColor;
  font: 400 clamp(1.8rem, 4.5vw, 3.6rem)/1 var(--f-cond);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--red);
  opacity: .93;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 2.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 2.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: var(--z-cursor);
  pointer-events: none;
  display: none;
}
.has-cursor .cursor { display: block; }
.cursor__dot {
  position: absolute;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--red);
}
.cursor__ring {
  position: absolute;
  width: 132px;
  height: 132px;
  margin: -66px 0 0 -66px;
  overflow: visible;
}
.cursor__ring text {
  font: 400 21px var(--f-cond);
  letter-spacing: .04em;
  fill: var(--ink);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 3px;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: .08;
  mix-blend-mode: multiply;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
  .hot, .hot::before, .censor::after { transition: none; }
}
