/**
 * Animations CSS personnalisées pour Magloire Generation Ministries
 */

/* Animation de chargement de page - optimisée */
body {
  opacity: 1; /* Afficher le contenu immédiatement */
}

/* Remplacer par une animation progressive des éléments */
.fade-in-element {
  animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.page-loaded {
  opacity: 1;
}

/* Animation de transition entre les pages */
body.page-transition {
  opacity: 1;
}

/* Animation de survol pour les cartes de service */
.service-box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-box.hovered {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Animation de pulsation pour les boutons */
.btn-get-started, .btn-services, .btn-contact, .btn-order, .btn-cta, .btn-cta-outline {
  position: relative;
  overflow: hidden;
}

.pulse {
  animation: pulse-animation 1s ease-in-out;
}

@keyframes pulse-animation {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Animation d'apparition progressive des images */
.reveal-image {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-image.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Animation de fond parallaxe */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: background-position 0.1s ease-out;
}

/* Animation de surlignage pour les titres */
.highlight-title {
  position: relative;
  display: inline-block;
}

.highlight-title::after {
  content: '';
  position: absolute;
  width: 0;
  height: 3px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.highlight-title:hover::after {
  width: 100%;
}

/* Animation de entrée pour les éléments de liste */
.animated-list li {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.animated-list.revealed li {
  opacity: 1;
  transform: translateX(0);
}

.animated-list.revealed li:nth-child(1) { transition-delay: 0.1s; }
.animated-list.revealed li:nth-child(2) { transition-delay: 0.2s; }
.animated-list.revealed li:nth-child(3) { transition-delay: 0.3s; }
.animated-list.revealed li:nth-child(4) { transition-delay: 0.4s; }
.animated-list.revealed li:nth-child(5) { transition-delay: 0.5s; }
.animated-list.revealed li:nth-child(6) { transition-delay: 0.6s; }

/* Animation de rotation pour les icônes */
.rotate-icon {
  transition: transform 0.3s ease;
}

.rotate-icon:hover {
  transform: rotate(360deg);
}

/* Animation de défilement pour les cartes */
.scroll-cards-container {
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.scroll-cards-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

/* Animation de fondu pour les témoignages */
.testimonial-fade {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.testimonial-fade.active {
  opacity: 1;
}

/* Animation de bordure pour les images */
.border-animation {
  position: relative;
}

.border-animation::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
}

.border-animation:hover::before {
  border-color: var(--accent-color);
}

/* Animation de zoom pour les images */
.zoom-effect {
  overflow: hidden;
}

.zoom-effect img {
  transition: transform 0.5s ease;
}

.zoom-effect:hover img {
  transform: scale(1.1);
}

/* Animation de déplacement pour les cartes */
.slide-in-card {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.slide-in-card.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Animation de compteur */
.counter-animation {
  display: inline-block;
  position: relative;
}

/* Animation de soulignement pour les liens de navigation */
.navmenu a {
  position: relative;
}

.navmenu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.navmenu a:hover::after,
.navmenu a.active::after,
.navmenu li.active > a::after {
  width: 100%;
}

/* Animation de flottement */
.float-animation {
  animation: float 6s ease-in-out infinite;
}

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

/* Animation de clignotement */
.blink-animation {
  animation: blink 2s infinite;
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Animation d'ombre pour les cartes */
.shadow-pulse {
  animation: shadow-pulse-animation 3s infinite;
}

@keyframes shadow-pulse-animation {
  0% {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
  }
  100% {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }
}

/* Animation de défilement pour les statistiques */
.stats-counter {
  transition: color 0.3s ease;
}

.stats-counter:hover {
  color: var(--accent-color);
}

/* Animation de défilement pour les images de fond */
.scroll-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.scroll-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.scroll-bg:hover::before {
  opacity: 1;
}
