/* ==========================================================================
   animations.css — Keyframes + classes d'animation (entrées, flottements,
   dégradés animés, marquee, brillances, barre de scroll, retour en haut).
   ========================================================================== */

/* ----------------------------- Keyframes ----------------------------- */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-18px); }
}
@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50%      { transform: translate(20px, -24px) rotate(8deg); }
}
@keyframes blob {
  0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  50%      { border-radius: 58% 42% 38% 62% / 62% 56% 44% 38%; }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes shimmer {
  0%   { transform: translateX(-120%) skewX(-20deg); }
  100% { transform: translateX(220%) skewX(-20deg); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 12px 40px rgba(2,132,199,.35); }
  50%      { box-shadow: 0 18px 60px rgba(20,184,166,.55); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes bounceIn {
  0%   { transform: scale(.6); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes barGrow {
  from { width: 0; }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes seaDrift {
  0%, 100% { transform: scale(1.06) translate(0, 0); }
  50%      { transform: scale(1.12) translate(-14px, -8px); }
}

/* ------------------- Apparitions au scroll (directionnelles) ------------------- */
.reveal { opacity: 0; transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
.reveal[data-reveal="up"],    .reveal:not([data-reveal]) { transform: translateY(36px); }
.reveal[data-reveal="left"]  { transform: translateX(-44px); }
.reveal[data-reveal="right"] { transform: translateX(44px); }
.reveal[data-reveal="scale"] { transform: scale(.9); }
.reveal[data-reveal="zoom"]  { transform: scale(1.05); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ------------------------- Hero animé ------------------------- */
.hero { background-size: 180% 180%; animation: gradientShift 16s ease infinite; }

/* Formes flottantes décoratives dans le hero */
.hero__blob {
  position: absolute;
  z-index: 0;
  filter: blur(8px);
  opacity: .55;
  pointer-events: none;
  animation: blob 14s ease-in-out infinite, floatSlow 18s ease-in-out infinite;
}
.hero__blob--1 { width: 320px; height: 320px; top: -80px; right: 8%; background: radial-gradient(circle at 30% 30%, #7dd3fc, transparent 70%); }
.hero__blob--2 { width: 260px; height: 260px; bottom: -90px; left: -40px; background: radial-gradient(circle at 30% 30%, #5eead4, transparent 70%); animation-delay: -6s; }
.hero__blob--3 { width: 180px; height: 180px; top: 40%; left: 45%; background: radial-gradient(circle at 30% 30%, #ec4899, transparent 70%); opacity:.35; animation-delay: -3s; }

.hero__grid { z-index: 2; }
.hero__visual { animation: floatY 7s ease-in-out infinite, pulseGlow 6s ease-in-out infinite; }

/* Mouvement de houle du fond marin */
.sea-layer { animation: seaDrift 22s ease-in-out infinite; }

/* Petites entrées en cascade du contenu hero au chargement */
.hero h1            { animation: fadeInDown .8s var(--ease) both; }
.hero .eyebrow      { animation: fadeInDown .6s var(--ease) both; }
.hero__lead         { animation: fadeInDown .8s var(--ease) .15s both; }
.hero__actions      { animation: fadeInDown .8s var(--ease) .3s both; }
.hero__stats        { animation: fadeInDown .8s var(--ease) .45s both; }
.hero__bars div     { animation: barGrow 1.2s var(--ease) both; }

/* ------------------------- Bouton avec brillance ------------------------- */
.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  transform: translateX(-120%) skewX(-20deg);
}
.btn--primary:hover::after { animation: shimmer .9s ease; }

/* ------------------------- Marquee (bande de confiance) ------------------------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; gap: var(--space-7); width: max-content; animation: marquee 28s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ------------------------- Animations icônes / cartes ------------------------- */
.card { will-change: transform; }
.step__num { transition: transform var(--t-base), box-shadow var(--t-base); }
.step:hover .step__num { transform: scale(1.12) rotate(-6deg); animation: pulseGlow 2.5s ease-in-out infinite; }

.value__icon { transition: transform var(--t-base); }
.value:hover .value__icon { transform: translateY(-6px) scale(1.1); }

/* ------------------------- Barre de progression de scroll ------------------------- */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--gradient-brand);
  z-index: 100;
  transition: width .1s linear;
}

/* ------------------------- Bouton retour en haut ------------------------- */
.to-top {
  position: fixed;
  right: var(--space-5); bottom: var(--space-5);
  width: 50px; height: 50px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  color: #fff;
  display: grid; place-items: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-glow);
  z-index: 60;
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-4px) scale(1.06); }

/* ------------------------- Compteurs ------------------------- */
.counted { font-variant-numeric: tabular-nums; }

/* Respect de prefers-reduced-motion : tout se fige proprement */
@media (prefers-reduced-motion: reduce) {
  .hero, .hero__blob, .hero__visual, .hero h1, .hero .eyebrow, .hero__lead,
  .hero__actions, .hero__stats, .hero__bars div, .marquee__track, .sea-layer {
    animation: none !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
