﻿@font-face {
  font-family: "Jurassic Park";
  src: url("../assets/fonts/Jurassic_Park.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #b80d00;
  --red-press: #8f0a00;
  --black: #000000;
  --yellow: #ffc000;
  --yellow-soft: #dccc45;
  --green: #a2920e;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --surface: #ffffff;
  --text: #000000;
  --text-muted: #4a4a4a;
  --text-soft: #201d00;
  --line: #d0d0d0;
  --accent: var(--red);
  --accent-press: var(--red-press);
  --danger: var(--red);
  --gap: 8px;
  --pad: 10px;
  --radius: 6px;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-display: "Jurassic Park", fantasy;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--green);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
}

body {
  min-height: 100dvh;
  overflow: hidden;
}

body.is-invite {
  overflow: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: none;
  touch-action: pan-y;
}

html.is-intro .gate__input,
html.is-intro .gate__btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(28px);
}

html.is-intro .gate__input.is-in,
html.is-intro .gate__btn.is-in {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#app {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  background: transparent;
}

/* ---- Decor herbes ---- */

.decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.decor__side {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: min(9vw, 48px);
  height: 100%;
  background-repeat: repeat-y;
  background-size: 100% auto;
}

.decor__side--left {
  left: 0;
  background-image: url("../assets/img/herbes_gauche.svg");
  background-position: left top;
}

.decor__side--right {
  right: 0;
  background-image: url("../assets/img/herbes_droite.svg");
  background-position: right top;
}

.decor__corner {
  position: absolute;
  z-index: 2;
  width: min(28vw, 130px);
  height: auto;
  display: block;
  opacity: 1;
}

.decor__corner--tl {
  top: 0;
  left: 0;
}

.decor__corner--tr {
  top: 0;
  right: 0;
}

.decor__corner--bl {
  bottom: 0;
  left: 0;
  width: min(30vw, 140px);
  height: auto;
  aspect-ratio: 257 / 357;
}

.decor__corner--bl .decor__herbe {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  display: block;
}

.decor__herbe--move {
  opacity: 0;
  transform-origin: 30% 100%;
}

.decor__corner--bl.is-moved .decor__herbe--base {
  opacity: 0;
}

.decor__corner--bl.is-moved .decor__herbe--move {
  opacity: 1;
  animation: herbe-rustle 2.2s ease forwards;
}

.decor__corner--br {
  bottom: 0;
  right: 0;
  width: min(30vw, 140px);
}

.decor__bottom {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  height: min(18vw, 110px);
  background-image: url("../assets/img/herbe_bas_centre.svg");
  background-repeat: repeat-x;
  background-position: bottom center;
  background-size: auto 100%;
}

.invite__raptor {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  width: min(32vw, 150px);
  max-height: calc(min(32vw, 150px) * 357 / 257);
  height: auto;
  display: block;
  object-fit: contain;
  object-position: left bottom;
  transform: translate(-105%, 0);
  transition: transform 2.2s cubic-bezier(0.22, 0.7, 0.28, 1);
}

.invite__raptor.is-in {
  transform: translate(0, 0);
}

.invite__raptor.is-leaving {
  transition-duration: 0.85s;
  transition-timing-function: cubic-bezier(0.4, 0.1, 0.6, 1);
}

.invite__raptor[hidden] {
  display: none;
}

@keyframes herbe-rustle {
  0% {
    transform: rotate(0deg);
  }
  12% {
    transform: rotate(-1deg);
  }
  28% {
    transform: rotate(0.8deg);
  }
  45% {
    transform: rotate(-0.7deg);
  }
  62% {
    transform: rotate(0.5deg);
  }
  80% {
    transform: rotate(-0.3deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

@media (min-width: 720px) {
  .decor__side {
    width: min(8vw, 72px);
  }

  .decor__corner {
    width: min(24vw, 200px);
  }

  .decor__corner--bl,
  .decor__corner--br {
    width: min(27vw, 230px);
  }

  .decor__bottom {
    height: min(14vw, 160px);
  }

  .invite__raptor {
    width: min(27vw, 230px);
    max-height: calc(min(27vw, 230px) * 357 / 257);
  }

  .invite__runner {
    width: min(28vw, 170px);
  }

  .invite__cigale {
    width: min(12vw, 74px);
    bottom: 60px;
  }
}

/* Tres petit mobile */
@media (max-width: 400px), (max-height: 700px) {
  .decor__side {
    width: min(7vw, 30px);
  }

  .decor__corner {
    width: min(20vw, 84px);
  }

  .decor__corner--bl,
  .decor__corner--br {
    width: min(24vw, 96px);
  }

  .decor__bottom {
    height: min(16vw, 78px);
  }

  .invite__raptor {
    width: min(26vw, 108px);
    max-height: calc(min(26vw, 108px) * 357 / 257);
  }

  .invite__runner {
    width: min(26vw, 96px);
  }

  .invite__cigale {
    width: min(12vw, 44px);
    bottom: 34px;
  }
}

/* ---- Accueil ---- */

.gate {
  position: relative;
  min-height: 100dvh;
  min-height: 100svh;
  max-height: 100dvh;
  max-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  padding-bottom: calc(var(--pad) + env(safe-area-inset-bottom, 0));
  gap: 5px;
  background: transparent;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.gate.is-leaving {
  position: absolute;
  inset: 0;
  width: 100%;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate__top {
  flex: 0 0 auto;
  text-align: center;
  padding: 5px 0;
  margin-top: -18px;
}

.gate__camp {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 8.5vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.05;
  color: #fff;
  text-transform: none;
  white-space: nowrap;
  display: inline-block;
  opacity: 0;
  transform: rotate(-4deg) scale(0);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.gate__camp.is-in {
  opacity: 1;
  transform: rotate(-4deg) scale(1);
}

.gate__invite {
  margin: 4px 0 0;
  min-height: 2.4em;
  font-family: var(--font);
  font-size: clamp(1.5rem, 6.5vw, 1.8rem);
  font-weight: 700;
  color: var(--yellow-soft);
  line-height: 1.15;
}

.gate__invite-line {
  display: block;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.gate__invite-line.is-in {
  opacity: 1;
  transform: translateY(0);
}

.gate__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 11vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--yellow);
  text-transform: uppercase;
}

.gate__visual {
  flex: 0 1 auto;
  display: flex;
  width: 100%;
  max-height: min(42vh, 320px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate__visual.is-shown {
  opacity: 1;
  visibility: visible;
}

.gate__image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: min(42vh, 320px);
  margin: 0 auto;
  border-radius: var(--radius);
  background: transparent;
  overflow: visible;
  perspective: 900px;
}

/* Pendant le zoom, ne pas couper le logo aux bords de la page */
.gate:has(#gate-logo.is-shown:not(.is-idle)) {
  overflow: visible;
}

.gate__image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  /* Repos à taille normale — le zoom est UNIQUEMENT dans @keyframes logo-land */
  transform: scale(1);
  transform-origin: center center;
  will-change: transform;
}

.gate__logo-blink {
  opacity: 0;
  pointer-events: none;
}

.gate__visual.is-blink .gate__logo-blink {
  opacity: 1;
}

/* Zoom d'arrivée (pendant is-landed, avant idle) */
.gate__visual.is-shown.is-landed:not(.is-idle) .gate__image img:not(.gate__logo-blink) {
  animation: logo-land 0.95s cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}

/*
  Idle sur le conteneur, PAS sur l'img :
  sinon retirer logo-land fait un flash scale(3.6) le temps du swap d'anim.
*/
.gate__visual.is-idle .gate__image img:not(.gate__logo-blink) {
  transform: scale(1);
  animation: none;
}

.gate__visual.is-idle .gate__image {
  transform-origin: center center;
  animation: logo-idle 3s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .gate__visual.is-shown .gate__image img:not(.gate__logo-blink) {
    transform: scale(1);
    animation: none;
  }

  .gate__visual.is-idle .gate__image {
    animation: none;
  }
}

@keyframes logo-land {
  0% {
    transform: scale(3.6);
  }
  72% {
    transform: scale(0.92);
  }
  86% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes title-land {
  0% {
    transform: scale(3.2);
    opacity: 1;
  }
  72% {
    transform: scale(0.92);
  }
  86% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes logo-idle {
  0%,
  23%,
  100% {
    transform: scale(1) rotate(0deg) translate(0, 0);
  }
  6% {
    transform: scale(1.01) rotate(-0.35deg) translate(-0.5px, 0.5px);
  }
  12% {
    transform: scale(0.995) rotate(0.3deg) translate(0.5px, -0.5px);
  }
  18% {
    transform: scale(1.008) rotate(-0.2deg) translate(0, 0.5px);
  }
}

.gate__form {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding-top: 0;
  background: transparent;
  padding-bottom: 2px;
}

.gate__input {
  width: 88%;
  max-width: 300px;
  min-height: 52px;
  padding: 10px 12px;
  font-size: 1.15rem;
  border: 2px solid var(--yellow);
  border-radius: 2px;
  background: #111;
  color: var(--green);
  outline: none;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease,
    transform 0.4s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.gate__input::placeholder {
  color: #888;
}

.gate__input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(231, 0, 0, 0.35);
}

.gate__input.is-invalid {
  border-color: var(--danger);
  animation: shake 0.35s ease;
}

.gate__error {
  margin: 0;
  width: 88%;
  max-width: 300px;
  min-height: 1.2em;
  padding: 6px 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #000;
  text-align: center;
  background: #00000059;
  border: 1px solid #d6c21d;
  border-radius: 2px;
  box-sizing: border-box;
}

.gate__error[hidden] {
  display: none;
}

.gate__btn {
  width: 88%;
  max-width: 300px;
  min-height: 54px;
  padding: 6px;
  border: 2px solid var(--yellow);
  border-radius: 2px;
  background: var(--black);
  color: var(--red);
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease,
    transform 0.4s ease,
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.gate__btn:hover,
.gate__btn:focus-visible,
.gate__btn:active {
  color: #fff;
}

.gate__btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

/* ---- Invit ---- */

.invite {
  display: none;
  position: relative;
  z-index: 2;
  flex-direction: column;
  background: transparent;
  overflow-x: hidden;
}

.invite.is-open {
  display: flex;
  animation: fade-in 0.45s ease;
}

.invite__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  min-height: var(--app-vh, 100dvh);
  height: var(--app-vh, 100dvh);
  max-height: var(--app-vh, 100dvh);
  padding: max(24px, env(safe-area-inset-top, 0px)) var(--pad) max(28px, env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: transparent;
}

/* Camp Gallus : ciel derriere les herbes (comme le vert d'origine) */
body.is-camp-sky {
  background: linear-gradient(180deg, #000205 20%, var(--green) 38%);
  background-attachment: fixed;
}

#invite-camp .invite__stars {
  z-index: 0;
}

#invite-camp .invite__inner,
#invite-camp > .invite__nav {
  position: relative;
  z-index: 2;
}

#invite-camp .invite__closing {
  color: var(--black);
}

.invite__runner {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  width: min(30vw, 130px);
  pointer-events: none;
  transform: translateX(-130%);
  opacity: 0;
  will-change: transform;
}

.invite__runner.is-run {
  opacity: 1;
  animation: invite-runner-cross 2.1s linear forwards;
}

@keyframes invite-runner-cross {
  from {
    transform: translateX(-130%);
  }
  to {
    transform: translateX(calc(100% + 100vw));
  }
}

/* Frames empilees : plus fiable que swap src (WebView Google / mobile) */
.invite__sprite-frame {
  display: block;
  width: 100%;
  height: auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.invite__sprite-frame:not(.is-show) {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
}

.invite__sprite-frame.is-show {
  position: relative;
  z-index: 1;
  visibility: visible;
  opacity: 1;
}

.invite__cigale {
  position: absolute;
  left: 0;
  bottom: 48px;
  z-index: 1;
  width: min(14vw, 58px);
  pointer-events: none;
  opacity: 0;
  transform: translate(-40%, 20%);
  will-change: transform, opacity;
}

.invite__cigale.is-fly {
  opacity: 1;
  animation: cigale-fly 3.4s linear forwards;
}

@keyframes cigale-fly {
  0% {
    transform: translate(-35%, 18%) rotate(-18deg) scale(0.45);
    opacity: 0;
    animation-timing-function: cubic-bezier(0.45, 0, 0.85, 0.35);
  }
  3% {
    opacity: 1;
    animation-timing-function: cubic-bezier(0.45, 0, 0.85, 0.35);
  }
  12% {
    transform: translate(22vw, -18vh) rotate(22deg) scale(0.7);
    animation-timing-function: cubic-bezier(0.45, 0, 0.9, 0.4);
  }
  22% {
    transform: translate(45vw, -28vh) rotate(-14deg) scale(1.05);
    animation-timing-function: cubic-bezier(0.5, 0, 0.95, 0.45);
  }
  32% {
    transform: translate(68vw, -34vh) rotate(16deg) scale(1.2);
    animation-timing-function: cubic-bezier(0.55, 0, 1, 0.5);
  }
  38% {
    transform: translate(84vw, -36vh) rotate(-4deg) scale(1.25);
    animation-timing-function: cubic-bezier(0.6, 0, 1, 0.55);
  }
  42% {
    transform: translate(93vw, -36vh) rotate(2deg) scale(1.18, 0.92);
    animation-timing-function: cubic-bezier(0.2, 0.8, 0.3, 1);
  }
  48% {
    transform: translate(80vw, -32vh) rotate(-35deg) scale(0.95, 1.1);
    animation-timing-function: ease-in-out;
  }
  54% {
    transform: translate(76vw, -36vh) rotate(90deg) scale(1);
    animation-timing-function: ease-in-out;
  }
  60% {
    transform: translate(74vw, -40vh) rotate(200deg) scale(1.05);
    animation-timing-function: ease-in-out;
  }
  66% {
    transform: translate(70vw, -46vh) rotate(-135deg) scale(0.95);
    animation-timing-function: cubic-bezier(0.05, 0.6, 0.2, 1);
  }
  78% {
    transform: translate(42vw, -72vh) rotate(-145deg) scale(0.7);
    animation-timing-function: cubic-bezier(0.05, 0.55, 0.15, 1);
  }
  90% {
    transform: translate(18vw, -98vh) rotate(-155deg) scale(0.48);
    animation-timing-function: cubic-bezier(0.05, 0.5, 0.1, 1);
  }
  96% {
    opacity: 1;
    transform: translate(4vw, -114vh) rotate(-160deg) scale(0.36);
    animation-timing-function: ease-out;
  }
  100% {
    opacity: 0;
    transform: translate(-10vw, -130vh) rotate(-165deg) scale(0.26);
  }
}

.invite__burst {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.invite__tracks {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.invite__tracks-print {
  position: absolute;
  width: clamp(26px, 7.5vw, 42px);
  height: auto;
  display: block;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  will-change: opacity, transform;
  /* Arrive a 100%, reste, puis disparait */
  animation: track-print-life 2.2s ease forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes track-print-life {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(0.6);
  }
  8% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1);
  }
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.invite__tracks-flower {
  position: absolute;
  z-index: 1;
  width: var(--size, 22px);
  height: auto;
  display: block;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(0.85);
  will-change: opacity, transform;
  animation: track-flower-bloom 0.7s ease forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes track-flower-bloom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(0.85);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .invite__tracks-print {
    animation: none;
    opacity: 1;
  }

  .invite__tracks-flower {
    animation: none;
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1);
  }
}

.invite__burst-bit {
  position: absolute;
  left: 50%;
  top: 42%;
  width: var(--size, 32px);
  height: auto;
  display: block;
  opacity: 0;
  will-change: transform, opacity;
  animation: var(--anim, farm-burst-a) var(--dur, 5.4s) linear forwards;
  animation-delay: var(--delay, 0ms);
}

@keyframes farm-burst-a {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.12) rotate(0deg);
  }
  5% {
    opacity: 1;
  }
  14% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1) rotate(var(--spin));
  }
  26% {
    transform: translate(
        calc(-50% + var(--dx) + var(--sway)),
        calc(-50% + var(--dy) + 8vh)
      )
      scale(1)
      rotate(calc(var(--spin) + 20deg));
  }
  40% {
    transform: translate(
        calc(-50% + var(--dx) - var(--sway) * 0.9),
        calc(-50% + var(--dy) + 20vh)
      )
      scale(0.98)
      rotate(calc(var(--spin) + 48deg));
  }
  55% {
    opacity: 1;
    transform: translate(
        calc(-50% + var(--dx) + var(--sway) * 0.7),
        calc(-50% + var(--dy) + 34vh)
      )
      scale(0.95)
      rotate(calc(var(--spin) + 82deg));
  }
  70% {
    opacity: 0.85;
    transform: translate(
        calc(-50% + var(--dx) - var(--sway) * 0.5),
        calc(-50% + var(--dy) + 48vh)
      )
      scale(0.92)
      rotate(calc(var(--spin) + 118deg));
  }
  84% {
    opacity: 0.45;
    transform: translate(
        calc(-50% + var(--dx) + var(--sway) * 0.3),
        calc(-50% + var(--dy) + 60vh)
      )
      scale(0.88)
      rotate(calc(var(--spin) + 155deg));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 72vh))
      scale(0.82)
      rotate(calc(var(--spin) + 190deg));
  }
}

@keyframes farm-burst-b {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1) rotate(0deg);
  }
  6% {
    opacity: 1;
  }
  15% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.05) rotate(var(--spin));
  }
  30% {
    transform: translate(
        calc(-50% + var(--dx) - var(--sway)),
        calc(-50% + var(--dy) + 6vh)
      )
      scale(1)
      rotate(calc(var(--spin) - 18deg));
  }
  45% {
    transform: translate(
        calc(-50% + var(--dx) + var(--sway) * 1.1),
        calc(-50% + var(--dy) + 18vh)
      )
      scale(0.97)
      rotate(calc(var(--spin) - 42deg));
  }
  58% {
    opacity: 1;
    transform: translate(
        calc(-50% + var(--dx) - var(--sway) * 0.6),
        calc(-50% + var(--dy) + 32vh)
      )
      scale(0.94)
      rotate(calc(var(--spin) - 70deg));
  }
  72% {
    opacity: 0.75;
    transform: translate(
        calc(-50% + var(--dx) + var(--sway) * 0.4),
        calc(-50% + var(--dy) + 46vh)
      )
      scale(0.9)
      rotate(calc(var(--spin) - 105deg));
  }
  86% {
    opacity: 0.35;
    transform: translate(
        calc(-50% + var(--dx) - var(--sway) * 0.2),
        calc(-50% + var(--dy) + 58vh)
      )
      scale(0.86)
      rotate(calc(var(--spin) - 140deg));
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--dx) * 0.85),
        calc(-50% + var(--dy) + 70vh)
      )
      scale(0.8)
      rotate(calc(var(--spin) - 175deg));
  }
}

@keyframes farm-burst-c {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.15) rotate(0deg);
  }
  4% {
    opacity: 1;
  }
  12% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.95) rotate(var(--spin));
  }
  24% {
    transform: translate(
        calc(-50% + var(--dx) + var(--sway) * 0.5),
        calc(-50% + var(--dy) + 4vh)
      )
      scale(1)
      rotate(calc(var(--spin) + 12deg));
  }
  38% {
    transform: translate(
        calc(-50% + var(--dx) - var(--sway)),
        calc(-50% + var(--dy) + 14vh)
      )
      scale(0.98)
      rotate(calc(var(--spin) + 35deg));
  }
  52% {
    opacity: 1;
    transform: translate(
        calc(-50% + var(--dx) + var(--sway) * 1.2),
        calc(-50% + var(--dy) + 28vh)
      )
      scale(0.95)
      rotate(calc(var(--spin) + 68deg));
  }
  66% {
    opacity: 0.8;
    transform: translate(
        calc(-50% + var(--dx) - var(--sway) * 0.8),
        calc(-50% + var(--dy) + 42vh)
      )
      scale(0.91)
      rotate(calc(var(--spin) + 108deg));
  }
  80% {
    opacity: 0.4;
    transform: translate(
        calc(-50% + var(--dx) + var(--sway) * 0.35),
        calc(-50% + var(--dy) + 55vh)
      )
      scale(0.87)
      rotate(calc(var(--spin) + 145deg));
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--dx) * 1.1),
        calc(-50% + var(--dy) + 68vh)
      )
      scale(0.78)
      rotate(calc(var(--spin) + 190deg));
  }
}

.invite__stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.invite__stars.is-on {
  opacity: 1;
}

.invite__star {
  position: absolute;
  width: var(--size, 4px);
  height: var(--size, 4px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 3px rgba(255, 255, 255, 0.9),
    0 0 8px rgba(255, 255, 255, 0.45);
  opacity: 0.55;
}

.invite__star--fixed {
  opacity: var(--glow, 0.65);
}

.invite__star--twinkle {
  opacity: 0;
  animation: star-twinkle var(--dur, 5s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.invite__star--cross {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.invite__star--cross::before,
.invite__star--cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.75);
  transform: translate(-50%, -50%);
}

.invite__star--cross::before {
  width: 100%;
  height: 2px;
}

.invite__star--cross::after {
  width: 2px;
  height: 100%;
}

@keyframes star-twinkle {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  4% {
    opacity: 1;
    transform: scale(1.5);
  }
  10% {
    opacity: 0;
    transform: scale(0.6);
  }
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
}

.invite__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.invite__screen > .invite__inner {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 0;
  max-height: calc(100% - 92px);
  padding-block: 6px;
  overflow: hidden;
}

.invite__nav {
  position: relative;
  left: auto;
  top: auto;
  bottom: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 36px;
  margin: 0;
  border-radius: 4px;
  background: rgba(162, 146, 14, 0.72);
  color: var(--black);
  text-decoration: none;
  z-index: 6;
  transition: background 0.18s ease;
}

.invite__nav:hover,
.invite__nav:focus-visible {
  background: rgba(212, 196, 60, 0.92);
}

.invite__nav--up,
.invite__nav--down {
  top: auto;
  bottom: auto;
}

@media (min-width: 800px) {
  .invite__inner {
    max-width: 600px;
  }
}

.invite__hero {
  text-align: center;
  overflow-x: hidden;
  overflow-y: hidden;
}

.invite__reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.48s ease, transform 0.48s ease;
}

.invite__reveal.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.invite__reveal--hero {
  opacity: 0;
  transform: scale(3.2);
  transition: none;
}

.invite__logo.invite__reveal--hero.is-in,
.invite__title.invite__reveal--hero.is-in,
.invite__tagline.invite__reveal--hero.is-in {
  opacity: 1;
  transform: scale(3.2);
  animation: title-land 0.95s cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}

.invite__logo {
  width: min(100%, 340px);
  margin: 0 auto;
}

.invite__logo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-height: min(34vh, 260px);
  margin: 0 auto;
  overflow: hidden;
}

.invite__logo-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.invite__logo-blink {
  opacity: 0;
  pointer-events: none;
}

.invite__logo.is-blink .invite__logo-blink {
  opacity: 1;
}

.invite__reveal--soft {
  transform: translateY(8px);
  transition-duration: 0.55s;
}

.invite__reveal--quick {
  transform: translateY(6px);
  transition-duration: 0.32s;
}

.invite__reveal.invite__reveal--grow {
  opacity: 0;
  transform: scale(0.08);
  transition: none;
}

.invite__reveal.invite__reveal--grow.is-in {
  opacity: 1;
  transform: scale(1);
  animation: reveal-grow 0.7s cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}

@keyframes reveal-grow {
  0% {
    opacity: 0;
    transform: scale(0.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.invite__reveal.invite__reveal--story {
  opacity: 0;
  visibility: hidden;
  transform: none;
  transition: none;
}

.invite__reveal.invite__reveal--story.is-in {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.invite__reveal--story:not(.is-in) .invite__word {
  opacity: 0;
}

.invite__word {
  display: inline-block;
  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

.invite__word.is-in {
  opacity: 1;
  transform: translateX(0);
}

.invite__eyebrow {
  margin: 0 0 5px;
  font-family: var(--font);
  font-size: clamp(1rem, 4.2vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
}

.invite__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 14vw, 4.6rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--yellow);
}

.invite__tagline {
  margin: -5px auto 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6.5vw, 2.3rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--red);
}

.invite__punch {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invite__punch p {
  margin: 0;
  font-family: var(--font);
  line-height: 1.35;
  color: var(--black);
}

.invite__punch p.invite__punch-setup,
.invite__punch-setup {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-soft);
}

.invite__punch-beat {
  font-size: clamp(1.05rem, 4vw, 1.2rem);
  font-weight: 600;
}

.invite__punch-end {
  font-size: clamp(1.2rem, 4.8vw, 1.4rem);
  font-weight: 700;
}

.invite__nav.invite__reveal,
.invite__nav.invite__reveal--soft {
  opacity: 0;
  transform: none;
  transition: opacity 0.4s ease, background 0.18s ease;
  pointer-events: none;
}

.invite__nav.invite__reveal:not(.is-in) {
  opacity: 0;
  pointer-events: none;
}

.invite__nav.invite__reveal:not(.is-in) .invite__nav-icon {
  animation: none;
}

.invite__nav.invite__reveal.is-in {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.invite__nav-icon {
  display: block;
  width: 14px;
  height: 14px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
}

.invite__nav--down .invite__nav-icon {
  transform: rotate(45deg);
  animation: invite-nudge-down 1.6s ease-in-out infinite;
}

.invite__nav--up .invite__nav-icon {
  transform: rotate(-135deg);
  animation: invite-nudge-up 1.6s ease-in-out infinite;
}

.invite__block .invite__inner {
  text-align: center;
}

.invite__block p {
  margin: 0;
  font-family: var(--font);
  color: var(--black);
}

.invite__block p.invite__ps,
.invite__ps {
  margin-top: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  font-style: italic;
  color: var(--text-soft);
}

.invite__picore {
  position: relative;
  margin: 8px auto 5px;
  width: min(36vw, 140px);
  aspect-ratio: 281 / 291;
  overflow: visible;
}

.invite__picore .invite__sprite-frame {
  width: 100%;
}

.invite__moustique {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 11%;
  aspect-ratio: 86 / 166;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: left, top, transform;
}

.invite__moustique[hidden] {
  display: none;
}

.invite__moustique.is-flip {
  transform: translate(-50%, -50%) scaleX(-1);
}

.invite__moustique .invite__sprite-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.invite__block .invite__accent {
  color: var(--red);
}

.invite__heading {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 11vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--yellow);
}

/* Ecran 7 : seulement les notes (pas les titres) */
#invite-services .invite__note {
  font-size: 0.75rem;
  font-weight: 600;
}

.invite__tente {
  position: relative;
  margin: 0 auto 8px;
  width: min(42vw, 160px);
  z-index: 1;
}

.invite__tente img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}

.invite__zzz {
  position: absolute;
  left: -6%;
  top: 30%;
  z-index: 2;
  width: 1.2em;
  height: 1.2em;
  pointer-events: none;
}

.invite__z {
  position: absolute;
  left: 0;
  bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.2vw, 1.1rem);
  font-weight: 400;
  line-height: 1;
  color: var(--text-soft);
  opacity: 0;
}

.invite__tente.is-in .invite__z {
  animation: zzz-rise 2.6s ease-out infinite;
}

.invite__tente.is-in .invite__z:nth-child(1) {
  animation-delay: 0s;
  font-size: clamp(1rem, 2.8vw, 1.05rem);
}

.invite__tente.is-in .invite__z:nth-child(2) {
  animation-delay: 0.85s;
  font-size: clamp(1rem, 3.4vw, 1.15rem);
}

.invite__tente.is-in .invite__z:nth-child(3) {
  animation-delay: 1.7s;
  font-size: clamp(1.05rem, 4vw, 1.3rem);
}

@keyframes zzz-rise {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
  }
  18% {
    opacity: 0.85;
  }
  70% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translate(14px, -42px) scale(1.65);
  }
}

@media (prefers-reduced-motion: reduce) {
  .invite__tente.is-in .invite__z {
    animation: none;
    opacity: 0;
  }
}

.invite__lead {
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
}

.invite__block .invite__lead--yellow {
  color: var(--yellow);
}

.invite__accent {
  font-family: var(--font);
  font-size: clamp(1.45rem, 6vw, 1.85rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--red);
}

.invite__strike {
  font-size: clamp(1.55rem, 6.5vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--black);
}

.invite__line {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-soft);
}

.invite__block p.invite__line {
  color: var(--text-soft);
}

.invite__line--white,
.invite__block p.invite__line--white {
  color: #fff;
}

.invite__body {
  margin-top: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-soft);
}

.invite__block p.invite__body {
  color: var(--text-soft);
}

.invite__aside {
  margin-top: 4px;
  font-size: clamp(1.1rem, 4.2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
}

.invite__aside--red,
.invite__block p.invite__aside--red {
  color: var(--red);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.invite__camp-label {
  display: block;
}

.invite__camp-label--white {
  color: #fff;
}

.invite__plumes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#invite-camp .invite__aside {
  margin-bottom: 16px;
}

.invite__plumes img {
  display: block;
  width: clamp(20px, 5.5vw, 28px);
  height: auto;
}

.invite__closing {
  margin-top: 4px;
  font-size: clamp(1.2rem, 4.8vw, 1.4rem);
  font-weight: 700;
  line-height: 1.3;
}

.invite__closing--red,
.invite__block p.invite__closing--red {
  color: var(--red);
}

.invite__block p.invite__date,
.invite__date {
  margin-top: 8px;
  font-size: clamp(1.15rem, 4.5vw, 1.35rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--black);
}

.invite__date-hl {
  color: var(--red);
}

.invite__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.invite__list li {
  position: relative;
  padding-left: 0;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-soft);
}

.invite__list li::before {
  content: none;
}

.invite__quote {
  font-size: clamp(1.35rem, 5.5vw, 1.7rem);
  font-weight: 700;
  line-height: 1.2;
  font-style: italic;
}

.invite__block .invite__quote--yellow {
  color: var(--yellow);
}

.invite__checks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.invite__checks li {
  position: relative;
  padding-left: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 3.5vw, 1.1rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--black);
}

.invite__checks li::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 6px;
  vertical-align: -0.15em;
  background: url("../assets/img/5plumes.svg") center / contain no-repeat;
}

.invite__note {
  display: block;
  margin-top: 0px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-soft);
  opacity: 1;
}

.invite__kit-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  width: 100%;
}

.invite__kit {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  flex: 1 1 auto;
  max-width: 62%;
  min-width: 0;
}

.invite__kit-bag {
  position: relative;
  flex: 0 0 auto;
  align-self: center;
  width: min(38vw, 150px);
  margin-left: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  user-select: none;
}

.invite__kit-bag:focus,
.invite__kit-bag:focus-visible {
  outline: none;
}

.invite__kit-bag img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

.invite__kit-bag::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 5;
  width: max-content;
  max-width: min(220px, 58vw);
  padding: 5px 8px;
  border-radius: 2px;
  background: #111;
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.invite__kit-bag::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: calc(100% + 1px);
  z-index: 5;
  border: 5px solid transparent;
  border-top-color: #111;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.invite__kit-bag:hover::after,
.invite__kit-bag:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.invite__kit-bag:hover::before,
.invite__kit-bag:focus-visible::before {
  opacity: 1;
}

.invite__kit label {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 5px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--black);
}

.invite__kit label span {
  flex: 1 1 auto;
  text-align: left;
}

.invite__kit input {
  flex: 0 0 auto;
  width: 1.05em;
  height: 1.05em;
  margin-top: 0.15em;
  accent-color: var(--red);
}

.invite__kit input:checked + span {
  text-decoration: line-through;
  opacity: 0.65;
  font-weight: 400;
}

.invite__screen.invite__block--panneaux {
  justify-content: flex-start;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.invite__screen > .invite__inner.invite__inner--games {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 0;
  max-height: none;
  padding-top: 6px;
  padding-bottom: 8px;
  max-width: min(420px, calc(100% - 16px));
  overflow: hidden;
  text-align: center;
}

.minigames-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: min(42vw, 160px);
  margin: 0 auto;
}

.minigame-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: auto;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 8px 6px 6px;
  border: 2px solid var(--red);
  border-radius: 4px;
  background: var(--black);
  color: #fff;
  cursor: pointer;
  overflow: visible;
  transform: scale(1);
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.minigame-card__img {
  display: block;
  width: 58%;
  max-height: 78px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  flex: 0 0 auto;
  pointer-events: none;
  transition: transform 0.18s ease;
}

.minigame-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  color: var(--red);
  transition: color 0.18s ease;
  flex: 0 0 auto;
}

.minigame-card__last {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
}

.minigame-card__last-label {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--yellow);
}

.minigame-card__last-value {
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--green);
}

.minigame-card__last[hidden] {
  display: none;
}

.minigame-card:hover,
.minigame-card:focus-visible {
  border-color: var(--yellow);
  transform: scale(1.04);
  box-shadow: 0 0 0 1px rgba(255, 192, 0, 0.35);
  outline: none;
}

.minigame-card:hover .minigame-card__title,
.minigame-card:focus-visible .minigame-card__title {
  color: var(--yellow);
}

.minigame-card:hover .minigame-card__img,
.minigame-card:focus-visible .minigame-card__img {
  transform: scale(1.06);
}

.minigame-card:active {
  border-color: var(--yellow);
  transform: scale(0.97);
  box-shadow: none;
}

.minigame-card:active .minigame-card__img {
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .minigame-card,
  .minigame-card__img,
  .minigame-card__title {
    transition: none;
  }

  .minigame-card:hover,
  .minigame-card:focus-visible,
  .minigame-card:active {
    transform: none;
  }

  .minigame-card:hover .minigame-card__img,
  .minigame-card:focus-visible .minigame-card__img,
  .minigame-card:active .minigame-card__img {
    transform: none;
  }
}

.invite__panneaux-row {
  position: relative;
  z-index: 3;
  display: block;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  min-height: min(38vh, 220px);
  margin: 0;
  margin-top: auto;
  padding: 0;
  pointer-events: none;
}

.invite__panneau {
  display: block;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
  pointer-events: none;
}

.invite__panneau img {
  display: block;
  width: auto;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  pointer-events: none;
}

.invite__panneau-hit {
  position: absolute;
  top: 2%;
  left: 50%;
  z-index: 2;
  width: 72%;
  height: 40%;
  transform: translateX(-50%);
  cursor: pointer;
  pointer-events: auto;
}

.invite__panneau:focus-visible .invite__panneau-hit {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.invite__panneau--left {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  height: min(25vh, 150px);
  max-width: 36vw;
}

.invite__panneau--right {
  position: absolute;
  right: 0;
  bottom: 64px;
  z-index: 1;
  height: min(30vh, 190px);
  max-width: 40vw;
}

.invite__panneau--mid {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 1;
  height: min(36vh, 210px);
  max-width: 42vw;
  transform: translateX(-50%);
}

.invite__panneaux-sac-wrap {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 4;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
}

.invite__panneaux-sac-wrap:focus,
.invite__panneaux-sac-wrap:focus-visible {
  outline: none;
}

.invite__panneaux-sac-wrap::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 5;
  width: max-content;
  max-width: min(180px, 46vw);
  padding: 5px 8px;
  border-radius: 2px;
  background: #111;
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.invite__panneaux-sac-wrap::before {
  content: "";
  position: absolute;
  right: 18px;
  bottom: calc(100% + 1px);
  z-index: 5;
  border: 5px solid transparent;
  border-top-color: #111;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.invite__panneaux-sac-wrap:hover::after,
.invite__panneaux-sac-wrap:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.invite__panneaux-sac-wrap:hover::before,
.invite__panneaux-sac-wrap:focus-visible::before {
  opacity: 1;
}

.invite__panneaux-sac {
  display: block;
  width: auto;
  height: 150px;
  object-fit: contain;
  object-position: bottom right;
  margin: 0;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 800px) {
  .invite__panneaux-row {
    min-height: min(40vh, 240px);
  }

  .invite__panneau--left {
    bottom: 0;
    height: min(30vh, 190px);
  }

  .invite__panneau--right {
    bottom: 64px;
    height: min(30vh, 190px);
  }

  .invite__panneau--mid {
    bottom: 0;
    height: min(40vh, 240px);
    max-width: 38vw;
  }

  .invite__panneaux-sac {
    height: 160px;
  }
}

/* ---- DEV nav ecrans ---- */

.dev-screens {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.dev-screens a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #111;
  color: var(--red);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  overflow: visible;
  transition: color 0.15s ease, background 0.15s ease;
}

.dev-screens__tip {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 40;
  width: max-content;
  max-width: 140px;
  padding: 5px 8px;
  border-radius: 2px;
  background: #111;
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: normal;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.dev-screens a::before {
  content: "";
  position: absolute;
  top: calc(100% + 1px);
  left: 50%;
  z-index: 40;
  border: 5px solid transparent;
  border-bottom-color: #111;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.dev-screens a:hover,
.dev-screens a:focus-visible {
  color: var(--yellow);
  outline: none;
  z-index: 41;
}

.dev-screens a.is-active {
  color: #fff;
  background: #1a1a1a;
}

.dev-screens a.is-active:hover,
.dev-screens a.is-active:focus-visible {
  color: #fff;
}

.dev-screens a:hover .dev-screens__tip,
.dev-screens a:focus-visible .dev-screens__tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.dev-screens a:hover::before,
.dev-screens a:focus-visible::before {
  opacity: 1;
  visibility: visible;
}

/* ---- Le saviez-vous ? ---- */

.fact-wrap {
  position: fixed;
  top: calc(48px + env(safe-area-inset-top, 0));
  left: calc(8px + env(safe-area-inset-left, 0));
  right: auto;
  z-index: 5;
  pointer-events: none;
}

.fact-wrap[hidden] {
  display: none;
}

.fact-btn {
  pointer-events: auto;
  margin: 0;
  padding: 6px 8px;
  border: 2px solid var(--red);
  border-radius: 2px;
  background: rgba(133, 121, 20, 0.35);
  color: var(--red);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.15;
  cursor: pointer;
  transform: rotate(-8deg);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.12);
}

.fact-btn:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.fact {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 6;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.fact[hidden] {
  display: none;
}

.fact.is-open {
  display: flex;
}

.fact__backdrop {
  pointer-events: auto;
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.fact__bubble {
  pointer-events: auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100% - 16px));
  max-height: min(88vh, 720px);
  overflow: hidden;
  padding: 0;
  border: 2px solid var(--yellow);
  border-radius: 4px;
  background: #f4f4f2;
  color: var(--black);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  transform-origin: center center;
  animation: fact-bubble 0.28s ease;
}

.fact__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--red);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.fact__head {
  flex: 0 0 auto;
  padding: 16px 40px 12px 16px;
  background: var(--black);
  border-bottom: 2px solid var(--yellow);
}

.fact__kicker {
  margin: 0 0 6px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
}

.fact__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 5.5vw, 1.9rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--red);
}

.fact__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fact__body {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid var(--red);
  background: #fff;
  font-family: var(--font);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--black);
}

.fact__body:nth-of-type(even) {
  background: #ecece8;
}

.fact__aside {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--yellow);
  background: #fff8e0;
  font-family: var(--font);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-soft);
}

.fact__closing {
  margin: 0;
  padding: 10px 12px;
  background: var(--black);
  border: 1px solid var(--yellow);
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--yellow);
}

@keyframes fact-bubble {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---- Plein ecran (dans la barre actions) ---- */

.sheets-bar__btn--icon.fs-btn {
  color: var(--red);
}

.sheets-bar__btn--icon.fs-btn.is-fullscreen {
  color: #fff;
}

.fs-btn__icon {
  display: block;
  width: clamp(14px, 4.5vw, 20px);
  height: clamp(14px, 4.5vw, 20px);
  fill: currentColor;
  pointer-events: none;
}

.fs-btn.is-fullscreen .fs-btn__icon--enter {
  display: none;
}

.fs-btn.is-fullscreen .fs-btn__icon--exit {
  display: block;
}

.fs-btn:not(.is-fullscreen) .fs-btn__icon--exit {
  display: none;
}

body.is-minigame .sheets-bar {
  display: none;
}

/* Accueil code : uniquement plein ecran */
body:not(.is-invite) #sheets-menu-btn,
body:not(.is-invite) #sheets-menu {
  display: none !important;
}

/* ---- Fiches d'observation ---- */

.sheets-bar {
  position: fixed;
  left: auto;
  right: calc(6px + env(safe-area-inset-right, 0));
  top: calc(6px + env(safe-area-inset-top, 0));
  bottom: auto;
  transform: none;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: auto;
  max-width: min(320px, calc(100vw - 12px));
  padding: 0;
  overflow: visible;
}

.sheets-bar[hidden] {
  display: none;
}

.sheets-bar__menu-btn {
  position: relative;
  flex: 0 0 auto;
  width: clamp(28px, 8vw, 36px);
  height: clamp(28px, 8vw, 36px);
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sheets-bar__menu-btn[hidden] {
  display: none;
}

.sheets-bar__menu-btn:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.sheets-bar__menu-lines {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 14px;
}

.sheets-bar__menu-lines span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.sheets-bar__menu-btn[aria-expanded="true"] .sheets-bar__menu-lines span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.sheets-bar__menu-btn[aria-expanded="true"] .sheets-bar__menu-lines span:nth-child(2) {
  opacity: 0;
}

.sheets-bar__menu-btn[aria-expanded="true"] .sheets-bar__menu-lines span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.sheets-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(320px, calc(100vw - 20px));
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  background: rgba(12, 12, 12, 0.94);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.sheets-menu[hidden] {
  display: none;
}

.sheets-menu__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sheets-bar__btn {
  flex: 1;
  min-height: 34px;
  margin: 0;
  padding: 6px 5px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
  cursor: pointer;
}

.sheets-bar__btn:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.sheets-menu__actions .sheets-bar__btn--icon {
  width: clamp(34px, 9vw, 42px);
  height: clamp(34px, 9vw, 42px);
  padding: 6px;
}

.sheets-menu__actions .sheets-bar__btn--icon img {
  width: clamp(18px, 5.2vw, 24px);
  height: clamp(18px, 5.2vw, 24px);
}

.sheets-menu__actions #games-btn img {
  width: clamp(20px, 6vw, 28px);
  height: clamp(20px, 6vw, 28px);
}

.sheets-bar__btn--icon {
  position: relative;
  flex: 0 0 auto;
  width: clamp(28px, 8vw, 36px);
  height: clamp(28px, 8vw, 36px);
  min-height: 0;
  padding: 5px;
  border: none;
  border-radius: 50%;
  background: #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.sheets-bar__btn--icon::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  width: max-content;
  max-width: 140px;
  padding: 5px 8px;
  border-radius: 2px;
  background: #111;
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.sheets-bar__btn--icon::before {
  content: "";
  position: absolute;
  top: calc(100% + 1px);
  right: 12px;
  z-index: 6;
  border: 5px solid transparent;
  border-bottom-color: #111;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.sheets-bar__btn--icon:hover::after,
.sheets-bar__btn--icon:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.sheets-bar__btn--icon:hover::before,
.sheets-bar__btn--icon:focus-visible::before {
  opacity: 1;
}

.sheets-bar__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
  margin-left: 0;
}

.sheets-bar__btn--icon img {
  display: block;
  width: clamp(14px, 4.5vw, 20px);
  height: clamp(14px, 4.5vw, 20px);
}

#games-btn img {
  width: clamp(18px, 5.8vw, 26px);
  height: clamp(18px, 5.8vw, 26px);
}

.sheets-bar__btn--icon[hidden] {
  display: none;
}

.sheet-panel {
  z-index: 25;
  padding: calc(52px + env(safe-area-inset-top, 0px)) 12px
    calc(12px + env(safe-area-inset-bottom, 0px));
  align-items: center;
  justify-content: center;
}

.sheet-panel__bubble {
  width: min(520px, calc(100% - 8px));
  max-height: min(72vh, calc(100dvh - 88px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 2px solid var(--yellow);
  border-radius: 4px;
  background: #f4f4f2;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.sheet-panel__bubble .fact__close {
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  color: var(--red);
  font-size: 1.5rem;
  z-index: 2;
}

#sheet-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  font-size: 17px;
  overflow: hidden;
}

.sheet__head {
  flex: 0 0 auto;
  padding: 12px 36px 8px 12px;
  background: var(--black);
  border-bottom: 2px solid var(--yellow);
}

.sheet__kicker {
  margin: 0 0 6px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yellow);
}

.sheet__name {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 2.6rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--red);
}

.sheet__latin {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.8);
}

.sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sheet__row {
  margin: 0;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 3px solid var(--red);
  background: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-soft);
}

.sheet__row:nth-child(even) {
  background: #ecece8;
}

.sheet__row strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
}

.sheet__row > span {
  color: var(--black);
}

.sheet__plumes {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

.sheet__plume {
  display: block;
  width: 1.15em;
  height: 1.15em;
  object-fit: contain;
}

.sheet__plume--off {
  opacity: 0.22;
  filter: grayscale(1);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes invite-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes invite-nudge-down {
  0%,
  100% {
    transform: rotate(45deg) translate(0, 0);
  }
  50% {
    transform: rotate(45deg) translate(2px, 2px);
  }
}

@keyframes invite-nudge-up {
  0%,
  100% {
    transform: rotate(-135deg) translate(0, 0);
  }
  50% {
    transform: rotate(-135deg) translate(2px, 2px);
  }
}

@media (min-width: 720px) {
  .gate {
    max-width: 420px;
    margin: 0 auto;
  }
}

/* Petits ecrans / hauteur reduite */
@media (max-height: 740px) {
  .invite__screen {
    gap: 6px;
    padding-top: max(24px, env(safe-area-inset-top, 0px));
    padding-bottom: max(32px, env(safe-area-inset-bottom, 0px));
  }

  .invite__screen.invite__block--panneaux {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .invite__screen > .invite__inner {
    gap: 6px;
    justify-content: center;
    padding-block: 4px;
    max-height: calc(100% - 84px);
  }

  .invite__heading {
    margin-bottom: 4px;
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .invite__logo-frame {
    max-height: min(28vh, 200px);
  }

  .invite__checks {
    gap: 6px;
  }

  .invite__kit-row {
    align-items: flex-start;
    margin-top: 2px;
  }

  .invite__kit {
    gap: 2px;
  }

  .invite__kit-bag {
    width: min(32vw, 110px);
  }

  .invite__tente {
    width: min(34vw, 120px);
    margin-bottom: 4px;
  }

  .invite__plumes img {
    width: clamp(16px, 4.5vw, 22px);
  }

  .gate {
    justify-content: center;
    padding-top: calc(var(--pad) + env(safe-area-inset-top, 0));
    gap: 4px;
  }

  .gate__top {
    margin-top: 0;
  }

  .gate__camp {
    font-size: clamp(2.8rem, 12vw, 4rem);
  }

  .gate__visual,
  .gate__image {
    max-height: min(28vh, 160px);
  }
}

@media (max-height: 620px) {
  .invite__screen > .invite__inner {
    justify-content: center;
  }

  .invite__heading {
    font-size: clamp(2rem, 9.5vw, 2.6rem);
  }

  .invite__logo-frame {
    max-height: min(22vh, 150px);
  }

  .invite__closing,
  .invite__lead,
  .invite__aside {
    font-size: clamp(1rem, 3.2vw, 1.1rem);
  }
}

/* Paysage uniquement : compact, sans toucher au portrait */
@media (orientation: landscape) and (max-height: 500px) {
  .gate {
    gap: 2px;
    padding: 5px;
    padding-bottom: calc(5px + env(safe-area-inset-bottom, 0));
    justify-content: center;
  }

  .gate__top {
    margin-top: 0;
    padding: 0;
  }

  .gate__camp {
    font-size: clamp(1.5rem, 8vh, 2.4rem);
  }

  .gate__invite {
    margin-top: 2px;
    min-height: 0;
    font-size: clamp(1rem, 4vh, 1.1rem);
  }

  .gate__visual,
  .gate__image {
    max-height: min(34vh, 140px);
  }

  .gate__input,
  .gate__btn,
  .gate__error {
    max-width: 220px;
  }

  .gate__input {
    min-height: 34px;
    padding: 5px 8px;
    font-size: 1rem;
  }

  .gate__btn {
    min-height: 34px;
    padding: 3px;
    font-size: clamp(1.1rem, 5vh, 1.5rem);
  }

  .gate__error {
    min-height: 1em;
    font-size: 1rem;
  }

  .decor__side {
    width: min(9vw, 42px);
  }

  .decor__corner {
    width: min(14vw, 64px);
  }

  .decor__corner--bl,
  .decor__corner--br {
    width: min(16vw, 74px);
  }

  .invite__raptor {
    width: min(16vw, 74px);
    max-height: calc(min(16vw, 74px) * 357 / 257);
  }
}

