/* Spook Spook Park v2 : balade 3D au défilement, boutons autocollants, billet perforé.
   Couleurs : uniquement les jetons de maquette.css (contrastes déjà vérifiés en v1, revérifiés en v2 avec contraste.py). */

/* ---------- Balade : vue fixe par défaut (sans JS, sans WebGL, mouvement réduit) ---------- */
.ride { position: relative; padding-block: clamp(32px, 6vw, 72px); }
.ride-head { max-width: 40rem; margin-bottom: 24px; }
.ride-head h2 { font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.75rem); line-height: 1.1; margin: 0 0 8px; }
.ride-head p { margin: 0; }
.ride-stage { position: relative; overflow: hidden; margin-bottom: 24px; aspect-ratio: 16 / 9;
  border: 3px solid var(--ink); border-radius: 999px 999px 12px 12px; background: var(--surface); }
.ride-still { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 700ms ease; }
.ride-canvas, .ride-progress { display: none; }
.ride-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.ride-step { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: 3px 3px 0 var(--ink); transition: box-shadow 300ms ease, border-color 300ms ease; }
.ride-step h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-family: var(--font-display); font-size: 1.25rem; }
.ride-step p { margin: 0; }
.ride-step .ride-meta { margin-top: 8px; color: var(--muted); font-size: 0.9375rem; }
.ride-num { color: var(--pink-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.ride-cta { margin-top: 24px; }
[data-theme="night-pastel"] .ride-step { border-color: var(--border-control); box-shadow: 3px 3px 0 #06141A; }

/* ---------- Mode 3D : scène collante, cartes qui défilent par-dessus (défilement natif, aucun blocage) ---------- */
.ride-3d .ride-stage { position: sticky; top: var(--ride-top, 12px); height: calc(100svh - var(--ride-top, 12px) - 12px); aspect-ratio: auto; margin-bottom: 0;
  border-radius: 28px; background: var(--bg); }
.ride-3d .ride-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.ride-3d .ride-still { position: absolute; inset: 0; }
.ride-3d.ride-ready .ride-still { opacity: 0; }
.ride-3d .ride-steps { display: block; position: relative; margin-top: calc(-100svh + var(--ride-top, 12px) + 12px); padding: 55svh 16px 30svh; pointer-events: none; }
.ride-3d .ride-step { max-width: 22rem; margin: 0 0 75svh; pointer-events: auto; }
.ride-3d .ride-step:last-child { margin-bottom: 0; }
.ride-3d .ride-cta { position: relative; margin: 0; padding: 24px 16px 48px; text-align: center; }
.ride-3d .ride-step.is-active { border-color: var(--pink-text); box-shadow: 6px 6px 0 var(--pink-text); }
.ride-3d .ride-progress { display: block; position: absolute; left: 28px; right: 28px; bottom: 20px; height: 6px; border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 18%, transparent); }
.ride-3d .ride-progress span { display: block; height: 100%; border-radius: inherit; background: var(--brand);
  transform-origin: left; transform: scaleX(var(--ride-p, 0)); }
@media (min-width: 760px) {
  .ride-3d .ride-steps { padding-inline: 40px; }
  .ride-3d .ride-step:nth-child(even) { margin-left: auto; }
}
@media (max-width: 599px) {
  .ride-3d .ride-steps { padding-top: 62svh; }
  .ride-3d .ride-step { margin-inline: auto; }
}

/* ---------- Arches : la parallaxe remplace le flottement de la v1 (un effet de moins à l'écran) ---------- */
.park-gate:nth-child(1) { animation: none; }
.has-motion .park-gate .gate-img { scale: 1.12; transition: scale 400ms ease; }
.has-motion .park-gate:hover .gate-img, .has-motion .park-gate:focus-visible .gate-img { scale: 1.17; }

/* ---------- Boutons autocollants : se soulèvent en penchant, reflet brillant, s'aplatissent au clic ---------- */
.btn, .nav-cta { position: relative; isolation: isolate; overflow: hidden;
  transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 260ms ease; }
.btn::after, .nav-cta::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgb(250 252 248 / 0.34) 50%, transparent 65%) 130% 0 / 260% 100% no-repeat;
  transition: background-position 650ms ease; }
.btn:hover, .btn:focus-visible, .nav-cta:hover, .nav-cta:focus-visible { transform: translate(-2px, -2px) rotate(-1.5deg); box-shadow: 5px 5px 0 var(--ink); }
.btn:hover::after, .btn:focus-visible::after, .nav-cta:hover::after, .nav-cta:focus-visible::after { background-position: -30% 0; }
.btn:active, .nav-cta:active { transform: translate(2px, 2px) scale(0.98); box-shadow: 0 0 0 var(--ink); transition-duration: 90ms; }
[data-theme="night-pastel"] .btn:hover, [data-theme="night-pastel"] .btn:focus-visible { box-shadow: 5px 5px 0 #06141A; }

/* ---------- Billet : sort de la fente, puis la ligne de perforation se perce trou par trou ---------- */
.ticket { position: relative; padding-right: 92px; }
.ticket-perf { position: absolute; top: 10px; bottom: 10px; right: 66px; width: 8px;
  background: radial-gradient(circle, #14303A 0 2.5px, transparent 3px) center top / 8px 14px repeat-y; }
.ticket-stub { position: absolute; top: 0; bottom: 0; right: 0; width: 64px; display: grid; place-items: center;
  writing-mode: vertical-rl; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.875rem;
  color: #14303A; transform-origin: 0 100%; }
.ticket.is-punching { animation: ticket-print 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.ticket.is-punching .ticket-perf { animation: perf-punch 900ms steps(14, end) 600ms both; }
.ticket.is-punching .ticket-stub { animation: stub-tilt 520ms cubic-bezier(0.34, 1.56, 0.64, 1) 1500ms both; }
@keyframes ticket-print { from { clip-path: inset(0 0 100% 0); transform: translateY(-12px); } to { clip-path: inset(0); transform: none; } }
@keyframes perf-punch { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
@keyframes stub-tilt { 0% { transform: none; } 55% { transform: rotate(5deg) translateX(3px); } 100% { transform: rotate(2.5deg) translateX(2px); } }

/* ---------- Mouvement réduit : aucune animation, état final immédiat ---------- */
@media (prefers-reduced-motion: reduce) {
  .ticket.is-punching, .ticket.is-punching * { animation: none !important; }
  .btn, .nav-cta, .btn::after, .nav-cta::after, .ride-step, .ride-still { transition: none; }
  .btn:hover, .btn:focus-visible, .nav-cta:hover, .nav-cta:focus-visible { transform: none; }
}
