/* ============================================================
   EASYPRINT — ANIMATIONS & KEYFRAMES
   Toutes les animations via IntersectionObserver
   Respecte prefers-reduced-motion
   ============================================================ */

/* ── KEYFRAMES ────────────────────────────────────────────── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0);     }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0);     }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0);    }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0);     }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0);    }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1);    }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes lineScan {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100vw);  }
}

@keyframes float {
  0%, 100% { transform: translateY(0px);    }
  50%       { transform: translateY(-20px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 32px rgba(255, 107, 53, 0.30); }
  50%       { box-shadow: 0 0 56px rgba(255, 107, 53, 0.55); }
}

@keyframes bounceArrow {
  0%, 100% { transform: translateY(0);   opacity: 0.5; }
  50%       { transform: translateY(8px); opacity: 1;   }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes drawLine {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes beamSweep {
  0%   { transform: translateX(-200px);  opacity: 0;   }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateX(calc(100vw + 200px)); opacity: 0; }
}

@keyframes radarBlink {
  0%, 100% { opacity: 0.9; r: 4; }
  50%       { opacity: 0.4; r: 3; }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CLASSES D'ANIMATION DE BASE ──────────────────────────── */

/* Éléments qui s'animent au load (hero) */
.animate-fadeInDown {
  opacity: 0;
  animation: fadeInDown var(--ep-duration-slow) var(--ep-ease-out) forwards;
  animation-delay: var(--delay, 0s);
}

.animate-fadeInUp {
  opacity: 0;
  animation: fadeInUp var(--ep-duration-slow) var(--ep-ease-out) forwards;
  animation-delay: var(--delay, 0s);
}

.animate-fadeInLeft {
  opacity: 0;
  animation: fadeInLeft var(--ep-duration-slow) var(--ep-ease-out) forwards;
  animation-delay: var(--delay, 0s);
}

/* ── SCROLL-TRIGGERED ANIMATIONS ─────────────────────────── */
/* Les éléments commencent invisibles et s'animent quand .is-visible est ajouté par JS */

.animate-on-scroll {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.6s;
  transition-timing-function: var(--ep-ease-out);
  transition-delay: var(--anim-delay, 0ms);
}

/* États initiaux par type d'animation */
.animate-on-scroll[data-animation="fadeInUp"] {
  transform: translateY(32px);
}

.animate-on-scroll[data-animation="fadeInLeft"] {
  transform: translateX(-32px);
}

.animate-on-scroll[data-animation="fadeInRight"] {
  transform: translateX(32px);
}

.animate-on-scroll[data-animation="slideInLeft"] {
  transform: translateX(-48px);
}

.animate-on-scroll[data-animation="scaleIn"] {
  transform: scale(0.92);
}

/* État activé — JS ajoute .is-visible */
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: none;
}

/* ── MICRO-INTERACTIONS ───────────────────────────────────── */

/* Underline animée gauche→droite sur les liens */
.link-animated {
  position: relative;
  display: inline-block;
}

.link-animated::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--ep-duration-normal) var(--ep-ease-out);
}

.link-animated:hover::after { width: 100%; }

/* ── TEXTE SHIMMER ────────────────────────────────────────── */
.text-shimmer {
  background: linear-gradient(
    90deg,
    var(--ep-electric) 0%,
    var(--ep-azur) 30%,
    var(--ep-cloud) 50%,
    var(--ep-azur) 70%,
    var(--ep-electric) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ── REDUCED MOTION ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-on-scroll,
  .animate-fadeInUp,
  .animate-fadeInDown,
  .animate-fadeInLeft {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .hero__orb,
  .hero__orb--secondary,
  .cta-final__orb {
    animation: none;
  }

  .stats-band__beam {
    display: none;
  }

  .marquee-track {
    animation: none;
    justify-content: center;
    flex-wrap: wrap;
  }

  .btn--pulse { animation: none; }

  .scroll-indicator__chevron { animation: none; }

  .radar-dot { animation: none; }

  .precision-map__badge-dot { animation: none; }

  canvas { display: none; }
}
