:root {
  --pin: #0d2b24;
  --pin-line: #2a6a5b;
  --houx: #b3122d;
  --houx-dark: #8f0e24;
  --or: #e9b44c;
  --neige: #f3f7f6;
  --encre: #0f241f;
  --brume: #a9c2ba;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--pin); color: var(--neige); font: 400 1rem/1.5 var(--body); }
.wrap { width: min(1240px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Mise en page (empilée par défaut, un seul écran sur grand écran) ---------- */
.stage { position: relative; }
.page { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 5.2rem 0 1rem; }

h1 { margin: 0 0 1rem; font-family: var(--display); font-weight: 700; line-height: 1; }
.h1-big { display: block; font-size: clamp(3.4rem, 15vw, 5.2rem); letter-spacing: -0.02em; }
.h1-sub { display: block; margin-top: 0.6rem; font-size: clamp(1.05rem, 4vw, 1.35rem); font-weight: 400; line-height: 1.25; color: var(--or); }
.lead { max-width: 44ch; margin: 0 0 1.4rem; font-size: 1.1rem; color: #dcebe6; }
.hl { color: var(--or); white-space: nowrap; }
.count-label { margin: 0 0 0.2rem; color: var(--brume); font-size: 0.9rem; }

/* Compte à rebours : étiquettes cadeau suspendues à une ficelle */
.countdown { --drop: 1.8rem; position: relative; display: flex; gap: 0.8rem; max-width: 32rem; padding-top: calc(var(--drop) + 0.4rem); }
.countdown::before { content: ""; position: absolute; top: 0.3rem; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--or); }
.tag {
  position: relative; flex: 1; padding: 1.2rem 0.3rem 0.6rem; text-align: center;
  background: var(--neige); color: var(--encre); border-bottom: 0.4rem solid var(--houx); border-radius: 4px 4px 6px 6px;
  transform-origin: 50% calc((var(--drop) + 0.1rem) * -1); animation: swing 2.6s ease-out 1 both;
}
.tag:nth-child(2) { animation-delay: 0.12s; }
.tag:nth-child(3) { animation-delay: 0.24s; }
.tag:nth-child(4) { animation-delay: 0.36s; }
.tag::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 2px; height: calc(var(--drop) + 0.1rem); margin-left: -1px; background: var(--or); }
.tag::after { content: ""; position: absolute; top: 0.4rem; left: 50%; width: 0.6rem; height: 0.6rem; margin-left: -0.3rem; border-radius: 50%; background: var(--pin); }
.num { display: block; font: 700 clamp(1.9rem, 8vw, 2.6rem)/1 var(--display); font-variant-numeric: tabular-nums; }
.lbl { display: block; margin-top: 0.25rem; font-size: 0.8rem; color: #4a625b; }

@keyframes swing {
  0% { transform: rotate(9deg); }
  30% { transform: rotate(-6deg); }
  55% { transform: rotate(3.5deg); }
  80% { transform: rotate(-1.5deg); }
  100% { transform: rotate(0); }
}

/* Étapes */
.steps { counter-reset: step; list-style: none; display: grid; grid-template-columns: 1fr; gap: 0.7rem; margin: 1.4rem 0 0; padding: 0; }
.steps li { counter-increment: step; padding: 0.7rem 0.9rem; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--pin-line); border-radius: 0.7rem; }
.steps strong { display: flex; align-items: center; gap: 0.5rem; font-family: var(--display); font-size: 1rem; font-weight: 600; line-height: 1.2; color: var(--or); }
.steps strong::before {
  content: counter(step); flex: none; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--houx); color: #fff; font: 700 0.85rem/1.5rem var(--display); text-align: center;
}
.steps span { display: block; margin-top: 0.35rem; font-size: 0.88rem; line-height: 1.4; color: #dcebe6; }

h2 { margin: 0; font-family: var(--display); font-weight: 600; line-height: 1.15; }

/* ---------- Panneau d'inscription ---------- */
.panel { position: relative; z-index: 1; padding: clamp(1.1rem, 4vw, 1.6rem); background: var(--neige); color: var(--encre); border-top: 0.5rem solid var(--houx); border-radius: 0.9rem; }
.panel h2 { margin: 0 0 0.9rem; font-family: var(--display); font-size: 1.6rem; font-weight: 600; line-height: 1.15; }
.panel p { margin: 0 0 0.8rem; }
.muted { color: #4a625b; font-size: 0.9rem; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.field { margin-bottom: 0.8rem; }
.field label { display: block; margin-bottom: 0.2rem; font-size: 0.95rem; font-weight: 600; }
.field input {
  width: 100%; padding: 0.55rem 0.8rem; font: inherit; color: var(--encre);
  background: #fff; border: 1.5px solid #9db4ac; border-radius: 8px;
}
.field input:focus-visible, .check input:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.1rem 0 1rem; font-size: 0.95rem; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; accent-color: var(--houx); }

.panel button {
  width: 100%; padding: 0.7rem 1rem; font: 600 1.05rem var(--body); color: #fff;
  background: var(--houx); border: 0; border-radius: 8px; cursor: pointer;
}
.panel button:hover { background: var(--houx-dark); }
.panel button:focus-visible { outline: 3px solid var(--or); outline-offset: 3px; }
.panel form .muted { margin: 0.7rem 0 0; text-align: center; }

.alert { margin-bottom: 0.8rem; padding: 0.6rem 0.8rem; border-radius: 8px; font-size: 0.92rem; }
.alert-error { background: #fde8ea; color: #7a0d1f; border: 1px solid #e7a0aa; }
.alert-ok { background: #e3f4ec; color: #0d4a33; border: 1px solid #9bd3b8; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.with-holly { display: flex; align-items: center; gap: 0.6rem; }
.with-holly img { flex: none; width: 2.4rem; height: auto; }

/* ---------- Décors ---------- */
.snow { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.snow span { position: absolute; top: -10px; border-radius: 50%; background: #fff; opacity: 0.75; animation: fall linear infinite; }
@keyframes fall { to { transform: translate(var(--dx, 0), 110vh); } }

/* Guirlande lumineuse */
.lights { position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; height: 3.2rem; overflow: hidden; pointer-events: none; }
.lights i { position: relative; flex: 1; --c: #e0213d; }
.lights i:nth-child(3n + 2) { --c: #f2b63d; }
.lights i:nth-child(3n) { --c: #2fb577; }
.lights i:nth-child(7n) { --c: #59b8f4; }
.lights i::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1.1rem; height: 2.1rem;
  border: 2px solid #4d7a6d; border-top: 0; border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.lights i::after {
  content: ""; position: absolute; left: 50%; top: calc(1rem - 2px); width: 0.7rem; height: 1.05rem; margin-left: -0.35rem;
  border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%;
  background: linear-gradient(#35574c 0 0.22rem, var(--c) 0.22rem);
  box-shadow: 0 0 14px 3px var(--c); animation: twinkle 2.6s ease-in-out infinite;
}
.lights i:nth-child(3n)::after { animation-delay: -0.9s; }
.lights i:nth-child(3n + 1)::after { animation-delay: -1.8s; animation-duration: 2.1s; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (max-width: 640px) { .lights i:nth-child(even) { display: none; } }

/* Le père Noël regarde par-dessus le formulaire */
.panel-wrap { --w: 10rem; position: relative; align-self: center; margin-top: calc(var(--w) * 0.8); }
.santa-head, .santa-hands { position: absolute; right: 1.2rem; width: var(--w); height: auto; pointer-events: none; }
.santa-head { bottom: calc(100% - var(--w) * 0.1); z-index: 0; }
.santa-hands { bottom: calc(100% - var(--w) * 0.07); z-index: 2; }

/* Pied de page : congère, sapin et cadeaux */
.scene { position: relative; z-index: 2; margin-top: 6rem; padding: 0.9rem 0 1.2rem; background: var(--neige); color: var(--encre); text-align: center; font-size: 0.9rem; }
.drift { position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); display: block; width: 100%; height: 1.8rem; }
.scene-in { position: relative; }
.scene-in p { max-width: 60ch; margin: 0 auto; }
.scene-in .tree ~ p, .scene-in p { text-wrap: balance; }
.tree, .gifts { position: absolute; bottom: calc(100% + 0.3rem); height: auto; pointer-events: none; }
.tree { left: 0; width: 4.4rem; }
.gifts { right: 0; width: 8rem; }

.sim-banner { position: relative; z-index: 4; padding: 0.6rem 1.25rem; background: var(--or); color: var(--encre); font-size: 0.95rem; font-weight: 600; text-align: center; }

/* ---------- Grand écran : tout tient sur une page, sans ascenseur ---------- */
@media (min-width: 1000px) and (min-height: 600px) {
  html { font-size: clamp(12.5px, 2.15vh, 18px); }
  body.onepage { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
  .onepage .stage { flex: 1; min-height: 0; }
  .onepage .page { height: 100%; grid-template-columns: 1.12fr 0.88fr; align-items: center; gap: 3rem; padding: 3.4rem 0 5.4rem; }
  .onepage .h1-big { font-size: min(5.2rem, 7.4vw); }
  .onepage .h1-sub { font-size: 1.35rem; }
  .onepage .steps { grid-template-columns: repeat(3, 1fr); }
  .onepage .num { font-size: 2.6rem; }
  .onepage .panel-wrap { --w: 9rem; }
  .onepage .scene { flex: none; height: 3.4rem; margin-top: 0; padding: 0.9rem 0 0; }
  .onepage .scene-in p { max-width: none; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tag { animation: none; }
  .snow { display: none; }
  .lights i::after { animation: none; }
}