/* ============================================================
   L'HAVRAIS COM — animations.css
   Vagues SVG, étoiles, keyframes, transitions de page
   ============================================================ */

/* ----------------------------------------------------------
   1. Étoiles (fond animé)
   ---------------------------------------------------------- */
.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.55) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,.28) 1px, transparent 1px);
  background-size: 60px 60px, 90px 90px;
  background-position: 0 0, 30px 30px;
  animation: stars-drift 30s linear infinite;
  opacity: .35;
}

@keyframes stars-drift {
  from { background-position: 0 0, 30px 30px; }
  to   { background-position: 600px 0, 630px 30px; }
}

/* Version atténuée pour les placeholders (map, etc.) */
.stars--dim {
  opacity: .15;
}

/* ----------------------------------------------------------
   2. Vagues SVG (Hero)
   ---------------------------------------------------------- */
.waves-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  height: 200px;
}

.wave {
  animation: wave-move 8s ease-in-out infinite;
  transform-origin: center bottom;
}

.wave:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
  opacity: .55;
}

.wave:nth-child(3) {
  animation-delay: -5s;
  animation-duration: 12s;
  opacity: .32;
}

@keyframes wave-move {
  0%, 100% { transform: translateX(-2%) scaleY(1); }
  50%       { transform: translateX(2%)  scaleY(1.08); }
}

/* ----------------------------------------------------------
   3. Fade-in de page
   ---------------------------------------------------------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fade-up .7s var(--ease-out) both;
}

.animate-fade-up--d1 { animation-delay: .1s; }
.animate-fade-up--d2 { animation-delay: .25s; }
.animate-fade-up--d3 { animation-delay: .4s; }
.animate-fade-up--d4 { animation-delay: .55s; }

/* ----------------------------------------------------------
   4. Pulsation badge
   ---------------------------------------------------------- */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244,163,7,.3); }
  50%       { box-shadow: 0 0 0 8px rgba(244,163,7,0); }
}

.badge--pulse {
  animation: pulse-glow 2.5s ease-in-out infinite;
}

/* ----------------------------------------------------------
   5. Underline em (hero)
   ---------------------------------------------------------- */
.hero h1 em {
  position: relative;
  display: inline-block;
}

.hero h1 em::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--signal);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: underline-in .6s .8s var(--ease-out) forwards;
}

@keyframes underline-in {
  to { transform: scaleX(1); }
}

/* ----------------------------------------------------------
   6. Spinner (formulaire)
   ---------------------------------------------------------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ----------------------------------------------------------
   7. Timeline line pulse
   ---------------------------------------------------------- */
@keyframes line-grow {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

.step-connector.animate {
  animation: line-grow .5s var(--ease-out) forwards;
  transform-origin: top;
}
