/* ==========================================================================
   AL-NUR · page d'ouverture
   Une feuille crème quadrillée qui occupe toute la largeur. En haut, un rail
   discret. Au centre, le texte. En bas, l'arche dorée et l'eau, en panorama.
   Aucun cadre, aucune carte : tout est posé sur le papier.
   ========================================================================== */

.gate-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  color: var(--color-ink);
  background-color: var(--color-cream);
  background-image:
    linear-gradient(to right, rgb(35 32 27 / 0.038) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(35 32 27 / 0.038) 1px, transparent 1px);
  background-size: 68px 68px;
}

.gate-shell {
  min-height: 100%;
  min-height: 100dvh;
  width: 100%;
  max-width: 84rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.8rem 1.25rem 2.4rem;
}
@media (min-width: 768px) {
  .gate-shell { padding: 2.2rem 2.75rem 2.6rem; gap: 2rem; }
}

/* -------------------------------------------------------------------------- */
/* Rail du haut : la marque à gauche, la pastille à droite                    */
/* -------------------------------------------------------------------------- */
.gate-rail {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
@media (min-width: 768px) {
  .gate-rail { justify-content: space-between; }
}

.gate-brand {
  display: none;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-ink) 62%, transparent);
}
@media (min-width: 768px) {
  .gate-brand { display: inline-flex; }
}
.gate-brand svg {
  display: block;
  width: 14px;
  height: 14px;
  color: var(--color-terra);
}

.gate-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-terra) 32%, transparent);
  background: rgb(255 255 255 / 0.55);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-ink) 74%, transparent);
}
.gate-eyebrow svg {
  display: block;
  width: 13px;
  height: 13px;
  color: var(--color-terra);
}

/* -------------------------------------------------------------------------- */
/* Le corps : une seule colonne, large et aérée                                */
/* -------------------------------------------------------------------------- */
.gate-col {
  flex: 1 1 auto;
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gate-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
/* Quand on ouvre le formulaire, l'invitation doit vraiment disparaître :
   la règle ci-dessus reprendrait la main sur l'utilitaire générique. */
.gate-intro.hidden { display: none !important; }
.gate-form.hidden,
.gate-done.hidden { display: none !important; }

.gate-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.9rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--color-ink);
  text-wrap: balance;
}
.gate-title em {
  font-style: italic;
  color: var(--color-terra);
}

/* -------------------------------------------------------------------------- */
/* Le compteur d'inscrits                                                     */
/* -------------------------------------------------------------------------- */
.gate-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
  padding: 0.55rem 1.15rem 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-ink) 11%, transparent);
  background: rgb(255 255 255 / 0.55);
}

.gate-count-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: var(--color-teal);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-teal) 50%, transparent);
  animation: gate-count-pulse 2.6s ease-out infinite;
}

.gate-count-figure {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32rem;
}

.gate-count-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--color-terra-deep);
  font-variant-numeric: tabular-nums;
}

.gate-count-target {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: color-mix(in srgb, var(--color-ink) 40%, transparent);
}

.gate-count-label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-ink) 58%, transparent);
}

@keyframes gate-count-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-teal) 45%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* -------------------------------------------------------------------------- */
/* Le bouton : le point de mire                                               */
/* -------------------------------------------------------------------------- */
.gate-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  margin-top: 2.4rem;
}

.gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  border-radius: 999px;
  background: var(--color-ink);
  color: var(--color-cream);
  padding: 1.15rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.4s var(--ease-soft), transform 0.25s var(--ease-soft);
}
.gate-btn:hover { background: var(--color-terra); }
.gate-btn:active { transform: translateY(1px); }
.gate-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.gate-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-terra) 32%, transparent);
}
.gate-btn i { font-size: 1rem; }

/* -------------------------------------------------------------------------- */
/* Le bouton d'inscription : le seul endroit où l'on clique                   */
/* -------------------------------------------------------------------------- */
.gate-btn-hero {
  position: relative;
  width: 100%;
  max-width: 27rem;
  padding: 1.05rem 1.05rem 1.05rem 2rem;
  gap: 1rem;
  background: linear-gradient(176deg, #C86A42 0%, #B85C33 42%, #9C4726 100%);
  border: 1px solid color-mix(in srgb, var(--color-saffron) 52%, transparent);
  box-shadow:
    0 22px 34px -16px color-mix(in srgb, var(--color-terra-deep) 78%, transparent),
    0 42px 70px -34px color-mix(in srgb, var(--color-terra-deep) 62%, transparent),
    0 2px 0 rgb(255 255 255 / 0.24) inset,
    0 -10px 22px -14px rgb(90 35 12 / 0.5) inset;
  transition:
    background 0.45s var(--ease-soft),
    border-color 0.45s var(--ease-soft),
    transform 0.3s var(--ease-soft),
    box-shadow 0.45s var(--ease-soft);
}
.gate-btn-hero:hover {
  background: linear-gradient(176deg, #D97E52 0%, #C4693D 42%, #A94F2B 100%);
  border-color: color-mix(in srgb, var(--color-saffron) 92%, transparent);
  box-shadow:
    0 26px 40px -14px color-mix(in srgb, var(--color-terra-deep) 82%, transparent),
    0 48px 78px -32px color-mix(in srgb, var(--color-terra-deep) 66%, transparent),
    0 2px 0 rgb(255 255 255 / 0.32) inset;
}
.gate-btn-hero:active { transform: translateY(1px) scale(0.995); }

/* Une lueur dorée qui respire autour du bouton */
.gate-btn-hero::before {
  content: "";
  position: absolute;
  inset: -13px;
  border-radius: 999px;
  border: 13px solid color-mix(in srgb, var(--color-saffron) 42%, transparent);
  pointer-events: none;
  filter: blur(11px);
  animation: gate-cta-glow 3.4s ease-in-out infinite;
}

/* Le reflet qui traverse le bouton, toutes les cinq secondes */
.gate-btn-sheen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 999px;
  pointer-events: none;
}
.gate-btn-glow {
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(
    100deg,
    transparent 32%,
    rgb(255 255 255 / 0.12) 43%,
    rgb(255 249 235 / 0.62) 50%,
    rgb(255 255 255 / 0.12) 57%,
    transparent 68%
  );
  transform: translateX(-120%);
  animation: gate-sheen 4.4s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}

.gate-btn-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.36rem;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.gate-btn-label {
  font-size: 0.5625rem;
  letter-spacing: 0.28em;
  color: rgb(255 232 191 / 0.95);
  transition: color 0.4s var(--ease-soft);
}
.gate-btn-main {
  font-size: clamp(0.8125rem, 1.6vw, 0.9375rem);
  letter-spacing: 0.12em;
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgb(90 35 12 / 0.28);
}

/* La flèche, dans sa pastille crème */
.gate-btn-arrow {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFDF7 0%, #F6E9D2 100%);
  color: var(--color-terra-deep);
  box-shadow:
    0 8px 16px -8px rgb(90 35 12 / 0.55),
    0 1px 0 rgb(255 255 255 / 0.9) inset;
  transition: transform 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft);
}
.gate-btn-arrow i { font-size: 1.1rem; }
.gate-btn-hero:hover .gate-btn-arrow {
  transform: translateX(4px) scale(1.06);
  box-shadow:
    0 10px 20px -8px rgb(90 35 12 / 0.6),
    0 1px 0 rgb(255 255 255 / 0.95) inset;
}

/* L'anneau qui pulse, plus large et plus net */
.gate-btn-hero::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--color-saffron) 72%, transparent);
  pointer-events: none;
  animation: gate-halo 2.4s ease-out infinite;
}

@keyframes gate-sheen {
  0%, 42% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
@keyframes gate-cta-glow {
  0%, 100% { opacity: 0.4; filter: blur(11px); }
  50% { opacity: 1; filter: blur(16px); }
}

.gate-form:not(.hidden),
.gate-done:not(.hidden) {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 25rem;
  margin-top: 0.5rem;
  animation: gate-fade 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.gate-form-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-terra);
}

.gate-form-note {
  margin: 0.65rem 0 0;
  max-width: 21rem;
  font-size: 0.6875rem;
  font-weight: 300;
  line-height: 1.55;
  color: color-mix(in srgb, var(--color-ink) 46%, transparent);
}

.gate-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  width: 100%;
  margin-top: 1.05rem;
  text-align: left;
}
.gate-cell-wide { grid-column: 1 / -1; }

.gate-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.gate-cell-label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-ink) 50%, transparent);
  transition: color 0.35s var(--ease-soft);
}
.gate-cell:focus-within .gate-cell-label { color: var(--color-terra); }

.gate-cell-input {
  width: 100%;
  border-radius: 13px;
  border: 1px solid color-mix(in srgb, var(--color-ink) 15%, transparent);
  background: #FFFFFF;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--color-ink);
  transition: border-color 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
}
.gate-cell-input::placeholder { color: color-mix(in srgb, var(--color-ink) 30%, transparent); }
.gate-cell-input:focus {
  outline: none;
  border-color: var(--color-terra);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-terra) 15%, transparent);
}
.gate-cell-input.is-invalid {
  border-color: #B3261E;
  background: rgb(179 38 30 / 0.04);
}

.gate-msg {
  margin: 0.85rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-teal-deep);
}
.gate-msg.text-rose-700,
.gate-msg.text-rose-300 { color: #B3261E; }
.gate-msg.text-teal,
.gate-msg.text-teal-light { color: var(--color-teal-deep); }

.gate-btn-block {
  width: 100%;
  max-width: 21rem;
  align-self: center;
  padding: 1.3rem 2rem;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  margin-top: 1.5rem;
  background: linear-gradient(176deg, #C86A42 0%, #B85C33 42%, #9C4726 100%);
  border: 1px solid color-mix(in srgb, var(--color-saffron) 46%, transparent);
  box-shadow:
    0 20px 32px -16px color-mix(in srgb, var(--color-terra-deep) 76%, transparent),
    0 2px 0 rgb(255 255 255 / 0.22) inset;
}
.gate-btn-block:hover {
  background: linear-gradient(176deg, #D97E52 0%, #C4693D 42%, #A94F2B 100%);
  border-color: color-mix(in srgb, var(--color-saffron) 86%, transparent);
}
.gate-btn-block i { transition: transform 0.35s var(--ease-soft); }
.gate-btn-block:hover i { transform: translateX(4px); }

.gate-legal {
  margin: 0.9rem 0 0;
  font-size: 0.6875rem;
  font-weight: 300;
  line-height: 1.6;
  color: color-mix(in srgb, var(--color-ink) 44%, transparent);
}

/* -------------------------------------------------------------------------- */
/* Confirmation                                                               */
/* -------------------------------------------------------------------------- */
.gate-done-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.8vw, 2.7rem);
  line-height: 1.05;
  color: var(--color-ink);
}
.gate-done-title em {
  font-style: italic;
  color: var(--color-terra);
}

.gate-done-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: 1.3rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-teal) 34%, transparent);
  background: color-mix(in srgb, var(--color-teal) 8%, transparent);
  color: var(--color-teal-deep);
}
.gate-done-mark svg {
  display: block;
  width: 1.65rem;
  height: 1.65rem;
}

.gate-done-sub {
  margin: 1rem 0 0;
  max-width: 24rem;
  font-size: 0.875rem;
  font-weight: 300;
  line-height: 1.7;
  color: color-mix(in srgb, var(--color-ink) 66%, transparent);
}
/* Le retour discret vers l'inscription */
.gate-restart {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.8rem;
  padding: 0.55rem 0.4rem;
  border: 0;
  border-radius: 6px;
  background: none;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-ink) 46%, transparent);
  cursor: pointer;
  transition: color 0.35s var(--ease-soft);
}
.gate-restart i { font-size: 0.85rem; }
.gate-restart:hover { color: var(--color-terra); }
.gate-restart:focus-visible {
  outline: none;
  color: var(--color-terra);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-terra) 26%, transparent);
}

/* Les réseaux, au bas de la confirmation */
.gate-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.7rem;
}
.gate-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-ink) 14%, transparent);
  background: rgb(255 255 255 / 0.6);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-ink) 72%, transparent);
  transition: border-color 0.35s var(--ease-soft), color 0.35s var(--ease-soft), background-color 0.35s var(--ease-soft);
}
.gate-social-link i { font-size: 0.95rem; }
.gate-social-link:hover {
  border-color: color-mix(in srgb, var(--color-terra) 55%, transparent);
  background: rgb(255 255 255 / 0.95);
  color: var(--color-terra-deep);
}
.gate-social-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-terra) 28%, transparent);
}

/* -------------------------------------------------------------------------- */
/* La scène panoramique                                                       */
/* -------------------------------------------------------------------------- */
.gate-scene-wrap {
  position: relative;
  width: 100%;
  max-width: 62rem;
  margin-top: 2.2rem;
  isolation: isolate;
}

/* Les rayons de soleil : un éventail doré qui monte du bassin, derrière
   l'arche, et respire lentement. */
.gate-rays {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 142%;
  aspect-ratio: 3 / 2;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  pointer-events: none;
  z-index: 0;
  background: repeating-conic-gradient(
    from 252deg at 50% 100%,
    color-mix(in srgb, var(--color-saffron) 26%, transparent) 0deg,
    color-mix(in srgb, var(--color-saffron) 7%, transparent) 2.2deg,
    transparent 4.4deg,
    transparent 9deg,
    color-mix(in srgb, var(--color-saffron) 14%, transparent) 11.4deg,
    transparent 13.6deg,
    transparent 18deg
  );
  -webkit-mask-image: radial-gradient(ellipse 52% 100% at 50% 100%, #000 5%, rgba(0, 0, 0, 0.6) 34%, transparent 70%);
  mask-image: radial-gradient(ellipse 52% 100% at 50% 100%, #000 5%, rgba(0, 0, 0, 0.6) 34%, transparent 70%);
  animation: gate-rays 17s ease-in-out infinite;
}

.gate-scene {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

@keyframes gate-rays {
  0%, 100% { transform: translateX(-50%) rotate(-2.2deg) scale(0.98); opacity: 0.5; }
  50% { transform: translateX(-50%) rotate(2.2deg) scale(1.05); opacity: 0.95; }
}

/* -------------------------------------------------------------------------- */
/* L'eau : une suite de gouttes, pas un jet continu                           */
/* -------------------------------------------------------------------------- */
.stream-neck,
.jet,
.water-mist,
.water-pool,
.water-impact,
.water-spray,
.water-ripple {
  transform-box: fill-box;
  transform-origin: center;
}

.stream-neck {
  transform-origin: center top;
  animation: seal-neck 1.9s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.jet {
  opacity: 0;
  animation: seal-jet 1.9s linear infinite;
}
.jet.j1 { --tx: 0px; animation-delay: 0s; }
.jet.j2 { --tx: -5px; animation-delay: 0.19s; }
.jet.j3 { --tx: 4px; animation-delay: 0.38s; }
.jet.j4 { --tx: -8px; animation-delay: 0.57s; }
.jet.j5 { --tx: 7px; animation-delay: 0.76s; }
.jet.j6 { --tx: -3px; animation-delay: 0.95s; }
.jet.j7 { --tx: 8px; animation-delay: 1.14s; }
.jet.j8 { --tx: -6px; animation-delay: 1.33s; }
.jet.jx1 { --tx: -26px; animation-delay: 0.62s; animation-duration: 1.55s; }
.jet.jx2 { --tx: 25px; animation-delay: 1.48s; animation-duration: 1.7s; }

.water-mist { animation: seal-mist 5.2s ease-in-out infinite; }
.water-pool { animation: seal-pool 7s ease-in-out infinite; }
.water-impact { animation: seal-impact 1.9s ease-in-out infinite; }

.water-spray { opacity: 0; animation: seal-spray 1.9s ease-out infinite; }
.water-spray.sp1 { --sx: -12px; animation-delay: 0.05s; }
.water-spray.sp2 { --sx: 12px; animation-delay: 0.24s; }
.water-spray.sp3 { --sx: 0px; animation-delay: 0.43s; }
.water-spray.sp4 { --sx: -22px; animation-delay: 0.62s; }
.water-spray.sp5 { --sx: 22px; animation-delay: 0.81s; }
.water-spray.side1 { --sx: -34px; animation-delay: 1.05s; animation-duration: 2.2s; }
.water-spray.side2 { --sx: 34px; animation-delay: 1.45s; animation-duration: 2.2s; }

.water-ripple { opacity: 0; animation: seal-ripple 2.6s cubic-bezier(0.2, 0.7, 0.3, 1) infinite; }
.water-ripple.rr2 { animation-delay: 0.87s; }
.water-ripple.rr3 { animation-delay: 1.74s; }

@keyframes seal-neck {
  0% { transform: scaleY(0.4) scaleX(0.7); opacity: 0; }
  12% { transform: scaleY(0.9) scaleX(0.98); opacity: 0.9; }
  44% { transform: scaleY(1.2) scaleX(0.78); opacity: 0.95; }
  66% { transform: scaleY(1.36) scaleX(0.5); opacity: 0.5; }
  100% { transform: scaleY(1.42) scaleX(0.18); opacity: 0; }
}
@keyframes seal-jet {
  0% { transform: translate(var(--tx, 0px), -10px) scale(0.6, 0.75); opacity: 0; }
  10% { opacity: 1; }
  55% { transform: translate(var(--tx, 0px), 92px) scale(0.86, 1.14); opacity: 1; }
  86% { transform: translate(var(--tx, 0px), 168px) scale(0.98, 1.22); opacity: 0.95; }
  96% { transform: translate(var(--tx, 0px), 190px) scale(1.14, 0.7); opacity: 0.35; }
  100% { transform: translate(var(--tx, 0px), 197px) scale(1.2, 0.42); opacity: 0; }
}
@keyframes seal-mist {
  0%, 100% { opacity: 0.34; transform: scale(0.94); }
  50% { opacity: 0.8; transform: scale(1.08); }
}
@keyframes seal-pool {
  0%, 100% { transform: scaleX(1); opacity: 0.95; }
  50% { transform: scaleX(1.03); opacity: 1; }
}
@keyframes seal-impact {
  0%, 100% { transform: scale(0.82); opacity: 0.4; }
  30% { transform: scale(1.18); opacity: 1; }
  60% { transform: scale(0.95); opacity: 0.7; }
}
@keyframes seal-spray {
  0% { transform: translate(0, 0) scale(0.5); opacity: 0; }
  22% { opacity: 0.95; }
  100% { transform: translate(var(--sx, 0px), -26px) scale(0.2); opacity: 0; }
}
@keyframes seal-ripple {
  0% { transform: scale(0.24); opacity: 0; }
  12% { opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* -------------------------------------------------------------------------- */
/* Entrée                                                                     */
/* -------------------------------------------------------------------------- */
.gate-rise {
  opacity: 0;
  transform: translateY(16px);
  animation: gate-rise 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.gate-d1 { animation-delay: 0.05s; }
.gate-d2 { animation-delay: 0.16s; }
.gate-d3 { animation-delay: 0.28s; }
.gate-d4 { animation-delay: 0.4s; }
.gate-d5 { animation-delay: 0.5s; }

@keyframes gate-rise {
  to { opacity: 1; transform: none; }
}
@keyframes gate-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes gate-halo {
  0% { transform: scale(0.99); opacity: 0.95; }
  74% { transform: scale(1.1); opacity: 0; }
  100% { transform: scale(1.1); opacity: 0; }
}

/* -------------------------------------------------------------------------- */
/* Petits écrans                                                             */
/* -------------------------------------------------------------------------- */
@media (max-width: 479px) {
  .gate-title { font-size: clamp(2.3rem, 11vw, 2.9rem); }
  .gate-count { margin-top: 1.3rem; }
  .gate-scene-wrap { margin-top: 1.9rem; }
}

/* Sur mobile, la scène panoramique est recadrée sur l'arche pour rester lisible. */
@media (max-width: 767px) {
  .gate-scene-wrap { overflow: hidden; }
  .gate-scene {
    width: 155%;
    margin-left: -27.5%;
  }
}

/* Sur un ordinateur portable, tout doit tenir sur une seule hauteur. */
@media (min-width: 768px) and (max-height: 940px) {
  .gate-shell { padding-top: 1.5rem; padding-bottom: 1.8rem; gap: 1.3rem; }
  .gate-title { font-size: clamp(2.5rem, 4.4vw, 3.5rem); }
  .gate-count { margin-top: 1.1rem; }
  .gate-actions { margin-top: 1.5rem; }
  .gate-btn-hero { padding: 0.8rem 0.8rem 0.8rem 1.45rem; }
  .gate-scene-wrap { margin-top: 1.5rem; max-width: 48rem; }
}

/* Écrans très larges : l'arche prend de l'ampleur sans dépasser. */
@media (min-width: 1440px) and (min-height: 900px) {
  .gate-title { font-size: clamp(3.4rem, 4.6vw, 5.2rem); }
  .gate-scene-wrap { max-width: 68rem; margin-top: 2.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gate-rise,
  .gate-form:not(.hidden),
  .gate-done:not(.hidden) {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .gate-btn-hero::after { animation: none !important; opacity: 0.5 !important; }

  .gate-rays { animation: none !important; opacity: 0.7 !important; }
  .gate-count-dot { animation: none !important; }
  .gate-btn-glow { animation: none !important; opacity: 0 !important; }
  .gate-btn-hero::before { animation: none !important; opacity: 0.6 !important; }
  .gate-btn-hero:hover { transform: none !important; }
  .gate-btn-hero:active { transform: none !important; }

  .stream-neck { animation: none !important; opacity: 0 !important; }

  .jet { animation: none !important; opacity: 0 !important; }
  .jet.j1,
  .jet.j2,
  .jet.j3 { opacity: 0.9 !important; }
  .jet.j2 { opacity: 0.72 !important; }
  .jet.jx1,
  .jet.jx2 { opacity: 0.6 !important; }

  .water-mist,
  .water-pool,
  .water-impact,
  .water-spray,
  .water-ripple { animation: none !important; }
  .water-spray { opacity: 0 !important; }
  .water-ripple.rr1 { opacity: 0.5 !important; }
  .water-mist { opacity: 0.6 !important; }
}
