:root {
  --medium-green-color: #224a3e;
  --dark-green-color: #1c3d33;
  --gold-color: #F6C55B;
  --red-color: #E23A3A;
  --text-color: #ffffff;

  --gutter: clamp(16px, 5vw, 24px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  position: relative;
  display: flex;
  flex-direction: column;
  background: none;
  font-family: "Inter", sans-serif;
  color: var(--text-color);
  min-height: 100vh;
}

body::before{
  content: "";
  position: fixed;
  background: linear-gradient(to bottom, var(--medium-green-color), var(--dark-green-color));
  background-repeat: no-repeat;
  background-size: 100% 100dvh;
  pointer-events: none;
  inset: 0;
  z-index: -1;
}

.hidden { display: none !important; }

.hp-wrap{
  position: absolute !important;
  left: -100vw;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.hp-wrap input{
  pointer-events: none;
}

/* Accessibilité : masquer visuellement mais lisible au lecteur d'écran */
.sr-only {
  position: absolute !important;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
}

.container {
  flex: 1 0 auto;
  position: relative;
  text-align: center;
  max-width: 64rem; /* ~1024px */
  margin-inline: auto;
  padding-top: 2rem;
  padding-bottom: 0;
  padding-left:  calc(var(--gutter) + env(safe-area-inset-left));
  padding-right: calc(var(--gutter) + env(safe-area-inset-right));
  z-index: 1;
}

.gold { color: var(--gold-color); }

#logo {
  display: block;
  width: auto;
  height: clamp(7rem, 9vw, 10rem);
  margin: 0 auto 1.5rem auto;
}

h1 {
  display: inline-block;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: .25rem 0 0 0;
}

h1.sparkle { position: relative; }

h1.sparkle::after{
  content: "";
  position: absolute;
  background:
    radial-gradient(6px 6px at 10% 30%, rgba(255, 255, 255, .9), transparent 60%) 0 0 / 120px 120px,
    radial-gradient(4px 4px at 70% 50%, rgba(255, 255, 255, .8), transparent 60%) 0 0 / 140px 140px,
    radial-gradient(3px 3px at 40% 80%, rgba(255, 255, 255, .7), transparent 60%) 0 0 / 160px 160px;
  inset: -.6rem -1rem;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: sparkle-move 10s linear infinite;
  opacity: .55;
}
@keyframes sparkle-move {
  0% { transform: translate3d(0, 0, 0) }
  50% { transform: translate3d(6px, -4px, 0) }
  100% { transform: translate3d(0, 0, 0) }
}
@media (prefers-reduced-motion: reduce) {
  h1.sparkle::after { animation: none; }
}

.lead {
  color: rgba(255, 255, 255, .92);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  max-width: 46rem;
  margin: 1.25rem auto 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  color: rgba(255, 255, 255,.9);
  font-size: clamp(.9rem, 1.4vw, 1rem);
  font-weight: 600;
  margin-top: .9rem;
  padding: .35rem .85rem;
}

form { max-width: 40rem; margin: clamp(1.25rem, 2.5vw, 2rem) auto 0; }

.form-row {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
@media (min-width: 640px) {
  .form-row { flex-direction: row; align-items: center; }
}

input[type="email"] {
  flex: 0 0 auto;
  background:#fff;
  border: 2px solid transparent;
  border-radius: 12px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .05), 0 6px 18px rgba(0, 0, 0, .12);
  color:#111;
  font-size: 1rem;
  height: 3rem;
  width: 100%;
  padding: 0 .9rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
@media (min-width: 640px){
  input[type="email"]{
    flex: 1 1 auto;   /* s’étire en largeur */
    min-width: 0;     /* évite les overflow en flex */
  }
}
input::placeholder { color: #6b7280; }
input:focus { outline: none; border-color: rgba(246, 197, 91, .8); box-shadow: 0 0 0 3px rgba(246, 197, 91, .35);
}

button {
  background: var(--red-color);
  border: 0;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  transition: filter .2s ease, transform .02s ease;
  white-space: nowrap;
  height: 3rem;
  padding: 0 1.5rem 0 1.1rem;
}
button:hover { filter: brightness(1.1); }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 3px solid var(--brand-gold); outline-offset: 2px; }

.nowrap { white-space: nowrap; }

.hint { margin-top: .6rem; font-size: .82rem; color: rgba(255, 255, 255, .75); }
.hint.small { margin-top:.5rem; font-size: .75rem; color: rgba(255, 255, 255, .6); }

.hint a,
.hint-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .2em;
  text-decoration-color: rgba(255,255,255,.6);
  transition: color .15s ease, text-decoration-color .15s ease;
}
.hint a:hover,
.hint-link:hover {
  text-decoration-color: #fff;
}

footer {
  position: relative;
  color: rgba(255, 255, 255, .75);
  font-size: clamp(.8rem, 1.2vw, .95rem);
  margin-top: auto;
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  padding-left:  calc(var(--gutter) + env(safe-area-inset-left));
  padding-right: calc(var(--gutter) + env(safe-area-inset-right));
  z-index: 1;
}
.footer-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  max-width: 80rem;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .footer-wrap { flex-direction: row; }
}
.footer-links { display: flex; gap: 1rem; align-items: center; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.dot { opacity: .5; }

/* Neige */
.snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
    
.snow span {
  position: absolute; 
  top: -2rem;
  width: var(--size, 6px); 
  height: var(--size, 6px);
  background: rgba(255, 255, 255, .9);
  border-radius: 999px;
  opacity: var(--alpha, .9);
  filter: blur(var(--blur, .6px));
  transform: translate3d(var(--x, 0), var(--start, -10vh), 0) scale(var(--scale, 1));
  animation: snow-fall var(--dur, 16s) linear var(--delay, 0s) infinite;
  will-change: transform;
}

@keyframes snow-fall {
  0% { transform: translate3d(var(--x, 0), var(--start, -10vh), 0) scale(var(--scale, 1)); }
  100% { transform: translate3d(calc(var(--x, 0) + var(--drift, 24px)), 110vh, 0) scale(var(--scale, 1)); }
}

@media (prefers-reduced-motion: reduce) { .snow { display:none; } }

/* Focus visibilité global */
:is(input, button, a):focus-visible {
  outline: 3px solid var(--gold-color);
  outline-offset: 2px;
}

/* Bouton musique */
.music-btn {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top));
  right: calc(1rem + env(safe-area-inset-right));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: rgba(255, 255, 255, .85);
  width: 2.8rem;
  height: 2.8rem;
  padding: .75rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .2s ease;
  z-index: 50;
}
.music-btn:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.music-btn:focus-visible { outline: 3px solid var(--gold-color); outline-offset: 2px; }

/* Toast container */
.toast-root{
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top));
  right: calc(1rem + env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: .5rem;
  z-index: 1000;
}

/* Toast */
.toast{
  pointer-events: auto;
  border-radius: 12px;
  padding: .75rem 1rem;
  background: #fff;
  color: #111;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
  display: flex; align-items: center; gap: .75rem;
}
.toast.show{ transform: translateY(0); opacity: 1; }

/* Variantes (accents en bord gauche) */
.toast.info{    border-left: 4px solid rgba(0,0,0,.2); }
.toast.error{   border-left: 4px solid var(--red-color); }

/* Succès "gold" (fond or + texte sombre pour le contraste) */
.toast.success{
  background: var(--gold-color);            /* #F6C55B */
  color: var(--toast-success-fg, #1c3d33);  /* ton vert sombre */
  border: 1px solid rgba(0,0,0,.08);
  border-left: 4px solid var(--dark-green-color);
  box-shadow: 0 12px 28px rgba(0,0,0,.30);
}

/* Bouton de fermeture */
.toast .toast-close{
  all: unset;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: .25rem .4rem;
  border-radius: 6px;
  color: inherit;            /* hérite (sombre sur gold, foncé sur blanc) */
  opacity: .8;
}
.toast .toast-close:hover{ opacity: 1; }
.toast .toast-close:focus-visible{
  outline: 3px solid var(--gold-color);
  outline-offset: 2px;
}

/* Bouton submit en chargement */
button[data-loading="true"]{ opacity: .7; pointer-events: none; }

@media (prefers-reduced-motion: reduce){
  .toast{ transition: none; }
}
