/* Animations avancées pour index.html */

/* Animation d'entrée échelonnée pour les éléments */
.stagger-animation {
  animation: fadeInUp 0.8s ease-out both;
}

.stagger-animation:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation:nth-child(4) { animation-delay: 0.4s; }

/* Animation de pulsation pour les éléments importants */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse-on-hover:hover {
  animation: pulse 0.6s ease-in-out;
}

/* Animation de rotation douce */
@keyframes gentleRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.gentle-rotate {
  animation: gentleRotate 20s linear infinite;
}

/* Animation de flottement pour les particules */
@keyframes floatUp {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(1);
    opacity: 0;
  }
}

.floating-particle {
  animation: floatUp 15s linear infinite;
}

/* Animation de scintillement */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

.twinkle {
  animation: twinkle 2s ease-in-out infinite;
}

/* Animation d'ondulation */
@keyframes wave {
  0% { transform: translateX(0) translateY(0) rotate(0deg); }
  25% { transform: translateX(5px) translateY(-5px) rotate(1deg); }
  50% { transform: translateX(0) translateY(-10px) rotate(0deg); }
  75% { transform: translateX(-5px) translateY(-5px) rotate(-1deg); }
  100% { transform: translateX(0) translateY(0) rotate(0deg); }
}

.wave-animation {
  animation: wave 4s ease-in-out infinite;
}

/* Animation de zoom doux */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.zoom-in {
  animation: zoomIn 0.8s ease-out;
}

/* Animation de slide depuis la gauche */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

/* Animation de slide depuis la droite */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* Animation de compteur */
@keyframes countUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.count-animation {
  animation: countUp 0.8s ease-out;
}

/* Animation de ligne qui se dessine */
@keyframes drawLine {
  from { width: 0; }
  to { width: 100%; }
}

.draw-line {
  animation: drawLine 1.5s ease-out;
}

/* Hover effects avancés */
.advanced-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.advanced-hover::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transition: all 0.6s ease;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.advanced-hover:hover::before {
  width: 300px;
  height: 300px;
}

/* Animation de chargement */
@keyframes loading {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  animation: loading 1s linear infinite;
}

/* Animation de texte qui apparaît lettre par lettre */
@keyframes typeWriter {
  from { width: 0; }
  to { width: 100%; }
}

.typewriter {
  overflow: hidden;
  white-space: nowrap;
  animation: typeWriter 3s steps(40, end);
}

/* Animation de bordure qui tourne */
@keyframes borderRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.rotating-border {
  background: linear-gradient(-45deg, var(--primary-green), var(--secondary-gold), var(--terracotta), var(--sage-green));
  background-size: 400% 400%;
  animation: borderRotate 4s ease infinite;
}
