/* ==========================================================================
   Nouvel An 2027 · Invitation
   Scène 3D en plein écran, textes en surimpression, réponse sur un panneau
   de verre sombre.
   ========================================================================== */

:root {
  --nuit: #030508;
  --acier: #c8d3d9;
  --acier-clair: #eef4f7;
  --acier-sombre: #7c8b94;
  --brume: #93a3ab;
  --givre: #9fdcff;
  --givre-vif: #e0f5ff;
  --ligne: rgba(205, 225, 235, 0.14);
  --ligne-forte: rgba(205, 225, 235, 0.3);
  --champ: rgba(2, 5, 8, 0.55);
  --erreur: #f2a596;

  --f-titre: "Cinzel Decorative", "Cinzel", Georgia, serif;
  --f-cap: "Cinzel", Georgia, "Times New Roman", serif;
  --f-texte: "EB Garamond", Garamond, Georgia, serif;
  --f-runes: "Noto Sans Runic", "Segoe UI Historic", "Apple Symbols", sans-serif;

  --veil: 0;
  --marge: clamp(1.5rem, 7vw, 8rem);
}

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

html {
  background: var(--nuit);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--f-texte);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--acier);
  background: var(--nuit);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.gated { overflow: hidden; }

[hidden] { display: none !important; }

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

:focus-visible {
  outline: 2px solid var(--givre);
  outline-offset: 3px;
}

p { margin: 0 0 1rem; }
strong { color: var(--acier-clair); font-weight: 600; }
em { color: var(--acier-clair); }

/* ---------- Scène, fond et voile ---------- */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.8s ease;
}
#scene.is-ready { opacity: 1; }

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 45% at 22% 28%, rgba(120, 160, 190, 0.16), transparent 70%),
    radial-gradient(120% 90% at 50% 110%, #0b1216 0%, transparent 60%),
    linear-gradient(180deg, #05090c 0%, #030508 100%);
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: #010203;
  opacity: var(--veil);
}

/* ---------- Typographie commune ---------- */
.kicker {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin: 0 0 1.1rem;
  font-family: var(--f-cap);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--brume);
}
.kicker-center { justify-content: center; }

.rune {
  font-family: var(--f-runes);
  font-size: 1.2em;
  letter-spacing: 0;
  color: var(--givre);
  text-shadow: 0 0 10px rgba(159, 220, 255, 0.85), 0 0 22px rgba(159, 220, 255, 0.4);
}

.silver {
  color: var(--acier-clair);
}
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .silver {
    background: linear-gradient(180deg, #ffffff 8%, #dbe4e9 46%, #8d9da6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.85));
  }
}

.muted { color: var(--brume); }

/* ---------- Boutons ---------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  min-height: 3rem;
  padding: 0.8rem 1.6rem;
  border-radius: 2px;
  font-family: var(--f-cap);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--acier-clair);
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s, color 0.25s, transform 0.25s;
}
.btn:active { transform: translateY(1px); }

.btn-steel {
  border: 1px solid rgba(215, 232, 240, 0.38);
  background: linear-gradient(180deg, #3b4a51 0%, #1b242a 48%, #0e1418 52%, #1d272d 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 12px 30px rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6);
}
.btn-steel:hover {
  border-color: rgba(159, 220, 255, 0.75);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 28px rgba(159, 220, 255, 0.3);
}
.btn-steel .rune { font-size: 1.35em; }

.btn-ghost {
  border: 1px solid var(--ligne-forte);
  background: rgba(3, 6, 9, 0.4);
}
.btn-ghost:hover { border-color: rgba(159, 220, 255, 0.65); color: var(--givre-vif); }

.btn-quiet {
  min-height: 2.6rem;
  padding: 0.5rem 0.8rem;
  border: 0;
  background: none;
  color: var(--brume);
  letter-spacing: 0.14em;
  text-decoration: underline;
  text-underline-offset: 0.35em;
}
.btn-quiet:hover { color: var(--acier-clair); }

.btn-wide { width: 100%; }
.btn-big { min-height: 3.7rem; padding: 1rem 2.4rem; font-size: 0.86rem; }
.btn[disabled] { opacity: 0.7; cursor: progress; }

.link-quiet {
  appearance: none;
  padding: 0.3rem 0;
  border: 0;
  background: none;
  font: italic 1rem var(--f-texte);
  color: var(--brume);
  text-decoration: underline;
  text-decoration-color: rgba(147, 163, 171, 0.5);
  text-underline-offset: 0.3em;
  cursor: pointer;
}
.link-quiet:hover { color: var(--acier-clair); }

/* ---------- Panneaux de verre ---------- */
.glass {
  position: relative;
  border: 1px solid var(--ligne);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(13, 19, 24, 0.74), rgba(4, 7, 10, 0.8));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
}
.glass::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(205, 225, 235, 0.06);
  pointer-events: none;
}
.glass::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  opacity: 0.6;
  background:
    linear-gradient(var(--givre), var(--givre)) left top / 18px 1px no-repeat,
    linear-gradient(var(--givre), var(--givre)) left top / 1px 18px no-repeat,
    linear-gradient(var(--givre), var(--givre)) right top / 18px 1px no-repeat,
    linear-gradient(var(--givre), var(--givre)) right top / 1px 18px no-repeat,
    linear-gradient(var(--givre), var(--givre)) left bottom / 18px 1px no-repeat,
    linear-gradient(var(--givre), var(--givre)) left bottom / 1px 18px no-repeat,
    linear-gradient(var(--givre), var(--givre)) right bottom / 18px 1px no-repeat,
    linear-gradient(var(--givre), var(--givre)) right bottom / 1px 18px no-repeat;
}

/* ---------- Écran d'accueil ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  padding: 6vh var(--marge);
  transition: opacity 0.9s ease, visibility 0.9s;
}
.direct .gate { display: none; }
.gate.is-leaving { opacity: 0; visibility: hidden; }

.gate-card {
  width: min(29rem, 100%);
  padding: 2.6rem 2.4rem 2rem;
}
.gate-title {
  margin: 0 0 0.8rem;
  font-family: var(--f-cap);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--acier-clair);
}
.gate-hint { color: var(--brume); margin-bottom: 1.6rem; }
.gate-card .select { margin-bottom: 1rem; }
.gate-error { color: var(--erreur); font-size: 1rem; margin: -0.2rem 0 1rem; }
.gate-status {
  min-height: 1.4em;
  margin: 1rem 0 0;
  font-family: var(--f-cap);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--acier-sombre);
  text-align: center;
}

/* ---------- Listes déroulantes ---------- */
.select { position: relative; }
.select select {
  appearance: none;
  width: 100%;
  min-height: 3.2rem;
  padding: 0.8rem 2.8rem 0.8rem 1rem;
  border: 1px solid var(--ligne-forte);
  border-radius: 2px;
  background: var(--champ);
  font: inherit;
  font-size: 1.15rem;
  color: var(--acier-clair);
  cursor: pointer;
}
.select select:focus { outline: none; border-color: var(--givre); box-shadow: 0 0 0 3px rgba(159, 220, 255, 0.18); }
.select::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid var(--acier);
  border-bottom: 1.5px solid var(--acier);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.select-sm select { min-height: 2.9rem; font-size: 1.05rem; }
select option { background: #0b1115; color: var(--acier-clair); }

/* ---------- Chargement ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.5rem;
  transition: opacity 0.9s ease;
}
.loader.is-done { opacity: 0; pointer-events: none; }
.loader-blade {
  position: relative;
  width: 2px;
  height: 9rem;
  overflow: hidden;
  background: rgba(205, 225, 235, 0.12);
}
.loader-blade span {
  position: absolute;
  inset: 0 0 auto;
  height: var(--load, 6%);
  background: linear-gradient(var(--givre-vif), var(--givre));
  box-shadow: 0 0 12px var(--givre);
  transition: height 0.35s ease;
}
.loader-text {
  margin: 0;
  font-family: var(--f-cap);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brume);
}

/* ---------- Le récit : textes en surimpression ---------- */
.invitation { position: relative; z-index: 2; }
.story { position: relative; height: 780vh; }

.shot {
  position: fixed;
  z-index: 3;
  top: 50%;
  left: var(--marge);
  width: min(31rem, 38vw);
  translate: 0 -50%;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7), 0 2px 26px rgba(0, 0, 0, 0.8);
  will-change: opacity, transform;
}
.shot[data-side="right"] { left: auto; right: var(--marge); }
.shot.is-active { pointer-events: auto; }
.shot::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -45% -40%;
  background: radial-gradient(closest-side, rgba(1, 3, 5, 0.62), rgba(1, 3, 5, 0));
  pointer-events: none;
}
.shot h2 {
  margin: 0 0 1.1rem;
  font-family: var(--f-cap);
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  font-weight: 600;
  line-height: 1.06;
}
.shot > p { font-size: 1.22rem; }

.shot-title { width: min(40rem, 46vw); }
.hero-name {
  margin: 0 0 1.2rem;
  font-family: var(--f-titre);
  font-size: clamp(3.4rem, 9.5vw, 8.4rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}
.hero-name:focus { outline: none; }
.lede { font-size: clamp(1.25rem, 1.8vw, 1.55rem) !important; max-width: 30rem; }
.hero-message {
  max-width: 30rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(159, 220, 255, 0.5);
  font-style: italic;
  color: var(--acier-clair);
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.4rem 0 0;
  font-family: var(--f-cap);
  font-size: 0.68rem !important;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brume);
}
.scroll-cue::before {
  content: "";
  width: 1px;
  height: 2.8rem;
  background: linear-gradient(var(--givre), transparent);
  transform-origin: top;
  animation: goutte 2.6s ease-in-out infinite;
}
@keyframes goutte {
  0% { transform: scaleY(0); opacity: 0; }
  30% { opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

.days {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin: 1.3rem 0 1.2rem;
  padding: 0;
}
.days li {
  display: grid;
  justify-items: center;
  gap: 0.05rem;
  padding: 0.75rem 0.3rem 0.65rem;
  border: 1px solid var(--ligne);
  background: rgba(3, 6, 9, 0.5);
  text-shadow: none;
}
.days .is-eve {
  border-color: rgba(159, 220, 255, 0.5);
  box-shadow: inset 0 0 26px rgba(159, 220, 255, 0.12), 0 0 22px rgba(159, 220, 255, 0.1);
}
.d-wd, .d-tag {
  font-family: var(--f-cap);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.d-wd { color: var(--brume); }
.d-num { font-family: var(--f-cap); font-size: 1.9rem; line-height: 1.15; color: var(--acier-clair); }
.d-num sup { font-size: 0.45em; }
.d-mo { font-size: 0.9rem; color: var(--brume); }
.d-tag { margin-top: 0.35rem; color: var(--givre); }
.countdown { font-style: italic; color: var(--brume); }
.countdown strong { font-style: normal; }

.place {
  font-family: var(--f-cap);
  font-size: 1.25rem !important;
  letter-spacing: 0.06em;
  color: var(--acier-clair);
}
.place span {
  display: block;
  font-family: var(--f-texte);
  font-size: 1.05rem;
  letter-spacing: 0;
  color: var(--brume);
}
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.3rem 0 1.4rem; }
.engraving { font-size: 1.05rem !important; color: var(--brume); }
.runes-name {
  display: inline-block;
  font-family: var(--f-runes);
  font-size: 1.35em;
  letter-spacing: 0.12em;
  color: var(--givre-vif);
  text-shadow: 0 0 10px rgba(159, 220, 255, 0.9), 0 0 24px rgba(159, 220, 255, 0.5);
}

.stamp {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(159, 220, 255, 0.55);
  font-family: var(--f-cap);
  font-size: 0.86rem !important;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--givre-vif);
  box-shadow: inset 0 0 22px rgba(159, 220, 255, 0.14), 0 0 26px rgba(159, 220, 255, 0.12);
}

.shot-final {
  top: auto;
  bottom: 9vh;
  left: 50%;
  right: auto;
  width: min(38rem, 88vw);
  translate: -50% 0;
  text-align: center;
}
.shot-final .kicker { justify-content: center; }
.shot-final h2 { font-size: clamp(2rem, 4vw, 3.3rem); }

/* Fil des chapitres */
.rail {
  position: fixed;
  z-index: 4;
  right: 1.5rem;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  gap: 0.7rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.rail.is-visible { opacity: 1; pointer-events: auto; }
.rail button {
  position: relative;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.rail button::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid rgba(205, 225, 235, 0.5);
  transform: rotate(45deg);
  transition: all 0.3s ease;
}
.rail button.is-current::before {
  width: 0.55rem;
  height: 0.55rem;
  border-color: var(--givre);
  background: var(--givre);
  box-shadow: 0 0 10px var(--givre);
}
.rail button span {
  position: absolute;
  right: 2.1rem;
  white-space: nowrap;
  font-family: var(--f-cap);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acier);
  text-shadow: 0 1px 8px #000;
  opacity: 0;
  translate: 6px 0;
  transition: opacity 0.25s, translate 0.25s;
  pointer-events: none;
}
.rail button:hover span,
.rail button:focus-visible span { opacity: 1; translate: 0 0; }

/* ---------- La réponse ---------- */
.reponse {
  position: relative;
  z-index: 4;
  padding: 45vh clamp(1rem, 4vw, 3rem) 4rem;
}
.panel {
  max-width: 47rem;
  margin: 0 auto;
  padding: clamp(1.7rem, 5vw, 3.4rem);
  scroll-margin-top: 1.5rem;
}
.panel-title {
  margin: 0 0 1rem;
  font-family: var(--f-cap);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.1;
}
.panel-title:focus { outline: none; }
.panel-intro { color: var(--brume); margin-bottom: 2.2rem; }

.ornement {
  position: relative;
  height: 1px;
  margin: 2.3rem 0;
  background: linear-gradient(90deg, transparent, var(--ligne-forte) 20%, var(--ligne-forte) 80%, transparent);
}
.ornement::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(159, 220, 255, 0.7);
  background: var(--nuit);
  transform: translate(-50%, -50%) rotate(45deg);
}

.fs { margin: 0; padding: 0; border: 0; min-width: 0; }
.fs-legend {
  float: left;
  width: 100%;
  margin: 0 0 1rem;
  padding: 0;
  font-family: var(--f-cap);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--acier-clair);
}
.fs-legend + * { clear: both; }
.fs.is-invalid .fs-legend { color: var(--erreur); }
.fs.is-invalid .choice { border-color: rgba(242, 165, 150, 0.6); }
.fs-help { color: var(--brume); font-size: 1.05rem; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.choice-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice {
  position: relative;
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1rem 1rem 3rem;
  border: 1px solid var(--ligne-forte);
  background: rgba(2, 5, 8, 0.45);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.choice:hover { border-color: rgba(205, 225, 235, 0.5); }
.choice-mark {
  position: absolute;
  left: 1.15rem;
  top: 1.3rem;
  width: 0.85rem;
  height: 0.85rem;
  border: 1.5px solid var(--acier-sombre);
  transform: rotate(45deg);
  transition: all 0.2s;
}
.choice-title { font-family: var(--f-cap); font-weight: 600; letter-spacing: 0.04em; color: var(--acier-clair); }
.choice-sub { font-size: 0.98rem; color: var(--brume); }
.choice-input:checked + .choice {
  border-color: rgba(159, 220, 255, 0.75);
  background: rgba(22, 44, 58, 0.45);
  box-shadow: inset 0 0 0 1px rgba(159, 220, 255, 0.2), 0 0 28px rgba(159, 220, 255, 0.12);
}
.choice-input:checked + .choice .choice-mark {
  border-color: var(--givre);
  background: var(--givre);
  box-shadow: 0 0 12px var(--givre);
}
.choice-input:focus-visible + .choice { outline: 2px solid var(--givre); outline-offset: 2px; }
.choice-icon { padding-right: 4.2rem; }
.bed {
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 2.6rem;
  translate: 0 -50%;
  fill: none;
  stroke: var(--acier-sombre);
  stroke-width: 1.5;
}
.choice-input:checked + .choice .bed { stroke: var(--givre); }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--f-cap);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brume);
}
.field input[type="text"],
.field textarea,
.fallback textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--ligne-forte);
  border-radius: 2px;
  background: var(--champ);
  font: inherit;
  font-size: 1.08rem;
  color: var(--acier-clair);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea, .fallback textarea { resize: vertical; min-height: 5.5rem; }
.field input:focus, .field textarea:focus, .fallback textarea:focus {
  outline: none;
  border-color: var(--givre);
  box-shadow: 0 0 0 3px rgba(159, 220, 255, 0.16);
}
::placeholder { color: rgba(147, 163, 171, 0.6); font-style: italic; }

.partner { margin-top: 1rem; }

.note {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin: 1.1rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--givre);
  background: rgba(159, 220, 255, 0.05);
  font-size: 1.02rem;
}
.note svg { flex: none; width: 2rem; margin-top: 0.2rem; fill: none; stroke: var(--givre); stroke-width: 1.4; }

.meals { display: grid; gap: 0.75rem; }
.meal-day {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--ligne);
  background: rgba(2, 5, 8, 0.35);
}
.meal-day.is-eve { border-color: rgba(159, 220, 255, 0.4); }
.meal-date {
  display: grid;
  margin: 0;
  font-family: var(--f-cap);
  line-height: 1.15;
}
.meal-date .wd { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brume); }
.meal-date .num { font-size: 2rem; color: var(--acier-clair); }
.meal-date .num sup { font-size: 0.45em; }
.meal-date .mo { font-size: 0.85rem; color: var(--brume); }
.meal-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

.check { display: flex; align-items: flex-start; gap: 0.85rem; cursor: pointer; }
.check input {
  appearance: none;
  flex: none;
  display: grid;
  place-content: center;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0.2rem 0 0;
  border: 1.5px solid var(--acier-sombre);
  background: var(--champ);
  cursor: pointer;
}
.check input::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  transform: rotate(45deg) scale(0);
  background: var(--givre);
  box-shadow: 0 0 8px var(--givre);
  transition: transform 0.15s;
}
.check input:checked { border-color: var(--givre); }
.check input:checked::after { transform: rotate(45deg) scale(1); }

.restrictions { margin-top: 1.1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-block;
  padding: 0.45rem 1rem;
  border: 1px solid var(--ligne-forte);
  border-radius: 999px;
  background: rgba(2, 5, 8, 0.4);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.chip span:hover { border-color: rgba(205, 225, 235, 0.55); }
.chip input:checked + span {
  border-color: var(--givre);
  background: rgba(159, 220, 255, 0.12);
  color: var(--givre-vif);
}
.chip input:focus-visible + span { outline: 2px solid var(--givre); outline-offset: 2px; }

.form-foot { display: grid; justify-items: center; gap: 1rem; margin-top: 2.6rem; }
.form-error { margin: 0; color: var(--erreur); text-align: center; }
.btn.is-sending .rune { animation: lueur 1s ease-in-out infinite alternate; }
@keyframes lueur { from { opacity: 0.35; } to { opacity: 1; } }

/* Remerciements */
.thanks { text-align: center; }
.thanks:focus { outline: none; }
.thanks-emblem {
  display: block;
  width: 2.6rem;
  margin: 0 auto 1.4rem;
  filter: drop-shadow(0 0 14px rgba(159, 220, 255, 0.55));
}
.thanks-text { max-width: 34rem; margin: 1.2rem auto; font-size: 1.28rem; color: var(--acier-clair); }
.signature { margin: 1.6rem 0 0.4rem; font-family: var(--f-titre); font-size: 2rem; color: var(--acier-clair); }
.thanks-date { color: var(--brume); font-size: 0.98rem; }
.fallback { text-align: left; margin: 1.2rem 0; }
.fallback textarea { font-size: 0.98rem; line-height: 1.5; }
.fallback-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }

.colophon {
  position: relative;
  z-index: 4;
  padding: 1rem 1rem calc(2.5rem + env(safe-area-inset-bottom));
  text-align: center;
  font-family: var(--f-cap);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--acier-sombre);
}
.colophon p { margin: 0; }

/* ---------- Téléphones et écrans en hauteur ---------- */
@media (max-width: 760px), (orientation: portrait) and (max-width: 1024px) {
  body { font-size: 1.08rem; }
  .gate { align-items: flex-end; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
  .gate-card { width: 100%; padding: 1.8rem 1.4rem 1.2rem; }

  .story { height: 700vh; }
  .shot,
  .shot[data-side="right"],
  .shot-title,
  .shot-final {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    translate: none;
    padding: 5.5rem 1.35rem calc(2rem + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(2, 4, 6, 0.95) 0%, rgba(2, 4, 6, 0.86) 58%, rgba(2, 4, 6, 0) 100%);
    text-align: left;
  }
  .shot::before { display: none; }
  .shot-final .kicker { justify-content: flex-start; }
  .shot h2 { font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .shot > p { font-size: 1.1rem; }
  .hero-name { font-size: clamp(2.9rem, 15vw, 5rem); }
  .lede { font-size: 1.18rem !important; }
  .scroll-cue { margin-top: 1.4rem; }
  .days { gap: 0.35rem; }
  .d-num { font-size: 1.55rem; }
  .muted { display: none; }
  .rail { display: none; }
  .reponse { padding: 30vh 0.7rem 3rem; }
}

@media (max-width: 560px) {
  .choices, .row-2, .meal-slots { grid-template-columns: 1fr; }
  .meal-day { grid-template-columns: 1fr; gap: 0.6rem; }
  .meal-date { display: flex; align-items: baseline; gap: 0.5rem; }
  .meal-date .num { font-size: 1.5rem; }
}

/* ---------- Sans 3D (navigateur trop ancien ou scène indisponible) ---------- */
.sans-3d #scene { display: none; }
.sans-3d .story { height: auto; padding: 14vh 0 0; }
.sans-3d .shot,
.sans-3d .shot[data-side="right"],
.sans-3d .shot-title,
.sans-3d .shot-final {
  position: relative;
  inset: auto;
  translate: none;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
  width: min(40rem, 100%);
  margin: 0 auto 16vh;
  padding: 0 1.4rem;
  background: none;
  text-align: left;
}
.sans-3d .shot::before { display: none; }
.sans-3d .shot-final .kicker { justify-content: flex-start; }
.sans-3d .scroll-cue,
.sans-3d .rail { display: none; }
.sans-3d .reponse { padding-top: 2rem; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
