/* AlloXYZ — SVG animés */

.icon-anim {
  transform-origin: center;
  transform-box: fill-box;
}

/* Pulsation douce */
.icon-anim-pulse {
  animation: icon-pulse 3s var(--ease-breathe, ease-in-out) infinite;
}

@keyframes icon-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

/* Flottement */
.icon-anim-float {
  animation: icon-float 4s var(--ease-breathe, ease-in-out) infinite;
}

@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Anneaux téléphone */
.icon-anim-ring path:nth-of-type(2) {
  animation: icon-signal 2.2s ease-in-out infinite;
}
.icon-anim-ring path:nth-of-type(3) {
  animation: icon-signal 2.2s ease-in-out 0.4s infinite;
}

@keyframes icon-signal {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Horloge */
.icon-anim-tick {
  animation: icon-tick 4s linear infinite;
}

@keyframes icon-tick {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Éclair */
.icon-anim-flash {
  animation: icon-flash 2.5s ease-in-out infinite;
}

@keyframes icon-flash {
  0%, 100% { opacity: 1; filter: drop-shadow(0 0 0 transparent); }
  45% { opacity: 1; }
  50% { opacity: 0.5; filter: drop-shadow(0 0 6px rgba(26, 54, 104, 0.35)); }
  55% { opacity: 1; }
}

/* Lueur */
.icon-anim-glow {
  animation: icon-glow 3s ease-in-out infinite;
}

@keyframes icon-glow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 8px rgba(26, 54, 104, 0.35)); }
}

/* Trait dessiné */
.icon-anim-draw path,
.icon-anim-draw line,
.icon-anim-draw polyline,
.icon-anim-draw rect,
.icon-anim-draw polygon {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: icon-draw 1.8s var(--ease-organic, ease) forwards;
}

.reveal.visible .icon-anim-draw path,
.reveal.visible .icon-anim-draw line,
.reveal.visible .icon-anim-draw polyline,
.reveal.visible .icon-anim-draw rect,
.reveal.visible .icon-anim-draw polygon,
.card:hover .icon-anim-draw path,
.card:hover .icon-anim-draw line,
.card:hover .icon-anim-draw polyline,
.card:hover .icon-anim-draw rect,
.card:hover .icon-anim-draw polygon {
  stroke-dashoffset: 0;
}

@keyframes icon-draw {
  to { stroke-dashoffset: 0; }
}

/* Étoiles */
.icon-anim-twinkle {
  animation: icon-twinkle 2s ease-in-out infinite;
}

.testimonial-stars .icon-star:nth-child(1) { animation-delay: 0s; }
.testimonial-stars .icon-star:nth-child(2) { animation-delay: 0.2s; }
.testimonial-stars .icon-star:nth-child(3) { animation-delay: 0.4s; }
.testimonial-stars .icon-star:nth-child(4) { animation-delay: 0.6s; }
.testimonial-stars .icon-star:nth-child(5) { animation-delay: 0.8s; }

@keyframes icon-twinkle {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.7; }
}

/* Robot — clignement */
.icon-anim-blink path:nth-of-type(4),
.icon-anim-blink path:nth-of-type(5) {
  animation: icon-blink 3.5s ease-in-out infinite;
}

@keyframes icon-blink {
  0%, 45%, 55%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Hover : accélère légèrement */
.card:hover .icon-anim-float,
.stat-icon:hover .icon-anim-pulse {
  animation-duration: 2s;
}

@media (prefers-reduced-motion: reduce) {
  .icon-anim,
  .icon-anim path,
  .icon-anim line,
  .icon-anim polyline {
    animation: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
