/* ==========================================================================
   JD-SERVICES — FEUILLE D'ANIMATIONS (animations.css)
   Transitions fluides, flux réseau vectoriels et respect prefers-reduced-motion
   ========================================================================== */

/* 1. Particules & Flux Réseau (Câbles SVG) */
@keyframes packetFlow {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.network-cable-flow {
  stroke-dasharray: 6 12;
  animation: packetFlow 2s linear infinite;
}

.network-cable-flow-fast {
  stroke-dasharray: 4 8;
  animation: packetFlow 1.2s linear infinite;
}

.network-cable-flow-reverse {
  stroke-dasharray: 6 12;
  animation: packetFlow 2s linear infinite reverse;
}

/* 2. Pulse Lumineux */
@keyframes pulseLight {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.35);
    opacity: 0.6;
  }
}

@keyframes wifiWave {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  50% {
    opacity: 0.65;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

.wifi-wave {
  animation: wifiWave 2.8s ease-out infinite;
  transform-origin: center;
}

.wifi-wave:nth-child(2) {
  animation-delay: 0.7s;
}

.wifi-wave:nth-child(3) {
  animation-delay: 1.4s;
}

/* 3. Spinner de chargement */
@keyframes rotateSpinner {
  100% {
    transform: rotate(360deg);
  }
}

.spinner-icon {
  animation: rotateSpinner 0.85s linear infinite;
}

/* 4. Apparition progressive (Scroll Reveal) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Échelonnement (Stagger) */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* 5. Slide Up (Cookie & Modales) */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 6. Respect des préférences d'accessibilité (WCAG - 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;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  .custom-cursor, .custom-cursor-follower {
    display: none !important;
  }

  .network-cable-flow, .wifi-wave, .pulse-dot {
    animation: none !important;
  }
}
