/* Ancelade Game — hero « Le choc » : scène vidéo explorable */

.clash {
  position: relative;
  height: 190vh; /* le hero reste épinglé pendant le début du défilement */
  background: #000;
}
.clash-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  cursor: none;
}
@media (hover: none) {
  .clash-pin {
    cursor: auto;
  }
}

/* ---------- Scène ---------- */
.clash {
  --p: 0; /* progression du défilement 0 → 1, posée par clash.js */
}
.clash-stage {
  --sx: 50%;
  --sy: 45%;
  position: absolute;
  inset: 0;
  z-index: 0;
  clip-path: inset(calc(var(--p) * 7%) calc(var(--p) * 9%) calc(var(--p) * 12%) round calc(var(--p) * 36px));
  transform: scale(calc(1 - var(--p) * 0.06));
  will-change: clip-path, transform;
}
.clash-zoom {
  position: absolute;
  inset: 0;
  transform-origin: var(--sx) var(--sy);
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}
.clash.is-focus .clash-zoom {
  transform: scale(1.09);
}
.clash-video,
.clash-loopcover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.clash-loopcover {
  opacity: 0;
  transition: opacity 0.45s linear;
  pointer-events: none;
}
.clash-loopcover.is-on {
  opacity: 1;
}

/* Projecteur : assombrit tout sauf le personnage survolé */
.clash-spot {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at var(--sx) var(--sy),
    transparent 0 9vmax,
    rgba(3, 5, 12, 0.55) 17vmax,
    rgba(3, 5, 12, 0.82) 40vmax
  );
  transition: opacity 0.5s;
}
.clash.is-focus .clash-spot {
  opacity: 1;
}
.clash-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(3, 5, 12, 0.94) 0%, rgba(3, 5, 12, 0.55) 26%, rgba(3, 5, 12, 0) 50%),
    linear-gradient(90deg, rgba(3, 5, 12, 0.7) 0%, rgba(3, 5, 12, 0) 45%),
    linear-gradient(180deg, rgba(3, 5, 12, 0.65) 0%, rgba(3, 5, 12, 0) 16%);
}
.clash-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Points chauds : un par personnage / jeu ---------- */
.hotspots {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.hs {
  --c: var(--lime);
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  opacity: 0;
}
.hs-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: none;
}
.hs-dot::before,
.hs-dot::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}
.hs-dot::before {
  width: 12px;
  height: 12px;
  background: var(--c);
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.6),
    0 0 18px var(--c);
}
.hs-dot::after {
  inset: 6px;
  border: 2px solid var(--c);
  animation: hs-ping 2.2s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.hs:nth-child(3n) .hs-dot::after {
  animation-delay: -0.7s;
}
.hs:nth-child(3n + 1) .hs-dot::after {
  animation-delay: -1.4s;
}
@media (hover: none) {
  .hs-dot {
    cursor: pointer;
  }
}

.hs-card {
  position: absolute;
  left: 26px;
  top: -18px;
  width: max-content;
  max-width: 260px;
  padding: 12px 14px 14px;
  border: 2px solid #000;
  border-radius: 14px;
  background: rgba(8, 11, 24, 0.96);
  box-shadow: 5px 5px 0 var(--c);
  opacity: 0;
  transform: translateY(8px) scale(0.92) rotate(-2deg);
  transform-origin: 0 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.35s var(--ease-pop);
}
.hs.is-left .hs-card {
  left: auto;
  right: 26px;
  transform-origin: 100% 0;
}
.hs.is-on .hs-card {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.hs-game {
  display: block;
  font: 500 11px var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c);
}
.hs-verb {
  display: block;
  margin: 2px 0 6px;
  font: 800 30px/0.95 var(--display);
  text-transform: uppercase;
  color: #fff;
}
.hs-price {
  display: block;
  font-size: 13px;
  color: var(--muted);
}
.hs-price b {
  color: #fff;
}
.hs-go {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--c);
  color: #05070d;
  font: 700 13px var(--ui);
  text-decoration: none;
}

/* ---------- Réticule (curseur) ---------- */
.reticle {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 30;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  pointer-events: none;
  opacity: 0;
  transition:
    width 0.25s var(--ease-pop),
    height 0.25s var(--ease-pop),
    margin 0.25s var(--ease-pop),
    opacity 0.2s;
}
.reticle::before,
.reticle::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  mask: conic-gradient(
    #000 0 20%,
    transparent 0 25%,
    #000 0 45%,
    transparent 0 50%,
    #000 0 70%,
    transparent 0 75%,
    #000 0 95%,
    transparent 0
  );
}
.reticle::after {
  inset: 19px;
  border: 0;
  background: var(--lime);
  mask: none;
}
.clash-pin:hover .reticle {
  opacity: 1;
}
.reticle.is-locked {
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
}
.reticle.is-locked::before {
  border-color: var(--lime);
  animation: spin 3s linear infinite;
}
.reticle-label {
  position: absolute;
  left: 100%;
  top: 50%;
  margin-left: 8px;
  white-space: nowrap;
  font: 500 11px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  transform: translateY(-50%);
}
@media (hover: none) {
  .reticle {
    display: none;
  }
}

/* ---------- Texte ---------- */
.clash-copy {
  position: absolute;
  left: max(16px, calc((100vw - 1240px) / 2));
  bottom: 13vh;
  z-index: 10;
  width: min(760px, 100% - 32px);
  pointer-events: none;
  transform: translateY(calc(var(--p) * -60px));
  opacity: calc(1 - var(--p) * 1.6);
}
.clash-copy a,
.clash-copy button {
  pointer-events: auto;
  cursor: pointer;
}
.clash-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.84;
  letter-spacing: -0.01em;
}
.ct-line {
  display: block;
  font-size: clamp(46px, 6.4vw, 104px);
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.6);
}
.ct-game {
  --c: var(--lime);
  font-size: clamp(72px, 12vw, 200px);
  color: var(--c);
  text-shadow:
    5px 5px 0 #000,
    0 0 60px color-mix(in srgb, var(--c) 45%, transparent);
  white-space: nowrap;
}
.ct-word {
  display: inline-block;
  position: relative;
}
.ct-word.is-glitch {
  animation: glitch 0.42s steps(2) both;
}
.ct-word.is-glitch::before,
.ct-word.is-glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.ct-word.is-glitch::before {
  color: var(--cyan);
  clip-path: inset(0 0 55% 0);
  transform: translate(-6px, -2px);
}
.ct-word.is-glitch::after {
  color: var(--magenta);
  clip-path: inset(55% 0 0 0);
  transform: translate(6px, 2px);
}
.clash-lead {
  max-width: 34em;
  margin: 18px 0 0;
  color: #dbe1fb;
  font-size: clamp(15px, 1.25vw, 18px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.clash-copy .cta {
  margin: 26px 0 18px;
}
.clash-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 500 12px var(--mono);
  letter-spacing: 0.08em;
  color: #c9d1f2;
}
.hint-reticle {
  width: 18px;
  height: 18px;
  border: 2px solid var(--lime);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px #000;
  background: var(--lime);
  animation: hs-ping 2s infinite;
}

/* Stickers repositionnés pour la scène */
.clash .st-setup {
  left: auto;
  right: 6%;
  top: 22%;
}
.clash .st-ddos {
  right: 18%;
  top: 13%;
}

/* ---------- Ruban (« tape ») ---------- */
.tape {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 2.5vh;
  z-index: 9;
  height: 46px;
  overflow: hidden;
  background: var(--lime);
  border-block: 3px solid #000;
  transform: rotate(-1.6deg);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.5);
}
.tape-track {
  display: flex;
  width: max-content;
  height: 100%;
  align-items: center;
  animation: tape 28s linear infinite;
}
.tape-track span {
  padding: 0 22px;
  font: 800 24px/1 var(--display);
  text-transform: uppercase;
  color: #0b0f00;
  white-space: nowrap;
}
.tape-track span::after {
  content: '✦';
  margin-left: 44px;
  color: var(--roi);
}

/* ---------- Intro : la réalité se fissure puis éclate ---------- */
.shatter {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.shatter.is-done {
  display: none;
}
.crack {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}
.crack polyline {
  fill: none;
  stroke: #9fd8ff;
  vector-effect: non-scaling-stroke;
  stroke-width: 3px;
  filter: drop-shadow(0 0 8px #3de0ff) drop-shadow(0 0 22px #1e48ff);
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation:
    crack-draw 0.55s 0.25s cubic-bezier(0.7, 0, 0.3, 1) forwards,
    crack-out 0.3s 1s forwards;
}
.shard {
  position: absolute;
  inset: 0;
  background: #03050c;
  animation: shard-fly 1.15s 0.85s cubic-bezier(0.6, 0, 0.2, 1) forwards;
}
/* Six éclats qui partagent l'écran le long de la fissure */
.s1 {
  clip-path: polygon(0 0, 40% 0, 35% 44%, 22% 61%, 14% 52%, 0 58%);
  --tx: -30vw;
  --ty: -25vh;
  --r: -24deg;
}
.s2 {
  clip-path: polygon(40% 0, 76% 0, 74% 27%, 63% 41%, 55% 33%, 47% 50%, 35% 44%);
  --tx: 4vw;
  --ty: -45vh;
  --r: 14deg;
}
.s3 {
  clip-path: polygon(76% 0, 100% 0, 100% 22%, 86% 34%, 74% 27%);
  --tx: 30vw;
  --ty: -30vh;
  --r: 30deg;
}
.s4 {
  clip-path: polygon(0 58%, 14% 52%, 22% 61%, 30% 100%, 0 100%);
  --tx: -35vw;
  --ty: 30vh;
  --r: 18deg;
}
.s5 {
  clip-path: polygon(22% 61%, 35% 44%, 47% 50%, 55% 33%, 63% 41%, 70% 100%, 30% 100%);
  --tx: -2vw;
  --ty: 50vh;
  --r: -12deg;
}
.s6 {
  clip-path: polygon(63% 41%, 74% 27%, 86% 34%, 100% 22%, 100% 100%, 70% 100%);
  --tx: 34vw;
  --ty: 28vh;
  --r: -26deg;
}

/* ---------- Animations ---------- */
@keyframes hs-in {
  from {
    opacity: 0;
    scale: 0.3;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
@keyframes hs-ping {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}
@keyframes spin {
  to {
    rotate: 360deg;
  }
}
@keyframes glitch {
  0% {
    transform: translateX(-8px) skewX(-12deg);
    filter: hue-rotate(60deg);
  }
  50% {
    transform: translateX(6px) skewX(8deg);
  }
  100% {
    transform: none;
    filter: none;
  }
}
@keyframes tape {
  to {
    transform: translateX(-50%);
  }
}
@keyframes crack-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes crack-out {
  to {
    opacity: 0;
  }
}
@keyframes shard-fly {
  to {
    transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(0.85);
    opacity: 0;
  }
}

/* ---------- Petits écrans ---------- */
@media (max-width: 720px) {
  .clash {
    height: 150vh;
  }
  .clash-copy {
    bottom: 11vh;
  }
  .clash .stickers {
    display: none;
  }
  .clash-video,
  .clash-loopcover {
    object-position: 30% 50%;
  }
  .hs-card {
    max-width: 200px;
  }
  .tape {
    height: 38px;
  }
  .tape-track span {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shatter {
    display: none;
  }
  .clash {
    height: auto;
  }
  .clash-pin {
    position: relative;
  }
}

/* ---------- Deux temps : bande-annonce puis exploration ---------- */
.clash-trailer {
  z-index: 1;
  transition: opacity 0.9s ease;
}
.clash.is-explore .clash-trailer {
  opacity: 0;
}
.clash:not(.is-explore) .hotspots {
  visibility: hidden;
}
.clash.is-explore .hs {
  animation: hs-in 0.5s var(--ease-pop) var(--d, 0s) forwards;
}
.replay {
  margin-left: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.6);
  color: #fff;
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
}
.replay:hover {
  border-color: var(--lime);
  color: var(--lime);
}
