/* 
 * Animations CSS pour domain.com
 * Toutes les animations sans JavaScript
 */

/* ---------- ANIMATIONS DE FONDU ET GLISSEMENTS ---------- */
.animate-fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

.slide-up {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- ANIMATION DES SECTIONS AU SCROLL ---------- */
section {
  opacity: 1; /* Les sections sont visibles par défaut */
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Nous gardons ces classes pour une utilisation future avec JavaScript facultatif */
section.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animation spéciale pour les sections impaires */
section:nth-child(odd).visible {
  animation: fadeInLeft 0.8s ease forwards;
}

/* Animation spéciale pour les sections paires */
section:nth-child(even).visible {
  animation: fadeInRight 0.8s ease forwards;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ---------- ANIMATION DES STATISTIQUES ---------- */
.statistic-number {
  position: relative;
  display: inline-block;
}

.statistic-number::after {
  content: attr(data-count);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  white-space: nowrap;
}

.animate-count {
  counter-reset: count 0;
  animation: none;
}

.animate-count.visible {
  animation: count 2s ease-out forwards;
}

@keyframes count {
  from {
    counter-increment: count 0;
  }
  to {
    counter-increment: count attr(data-count);
  }
}

.animate-count::after {
  content: counter(count);
}

/* ---------- ANIMATION DES CARTES ---------- */
.service-card,
.audit-type-card,
.testimonial-card,
.blog-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover,
.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(10, 31, 68, 0.15);
}

.audit-type-card:hover,
.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(10, 31, 68, 0.1);
}

.benefit-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 15px rgba(10, 31, 68, 0.1);
}

/* ---------- ANIMATION DU MENU ---------- */
.menu-toggle span {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animation pour simuler le défilement des nombres avec CSS uniquement */
@property --num {
  syntax: "<integer>";
  initial-value: 0;
  inherits: false;
}

.statistic-number {
  animation: counter 2s ease-out forwards;
  counter-reset: num var(--num);
}

.statistic-number::after {
  content: counter(num);
}

@keyframes counter {
  from {
    --num: 0;
  }
  to {
    --num: attr(data-count integer);
  }
}
