/* Animations et transitions fluides pour tout le site */

/* Transitions générales */
* {
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Animations d'apparition */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Classes d'animation utilitaires */
.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.6s ease forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 0.6s ease forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.5s ease forwards;
}

/* Delays d'animation */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Effets de survol améliorés */
.btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Animations pour les cartes */
.card, .testimonial-card, .service-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover, .testimonial-card:hover, .service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Animations pour les images */
img {
  transition: transform 0.3s ease;
}

img:hover {
  transform: scale(1.05);
}

/* Animations pour les liens */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Animations pour les formulaires */
.form-group input,
.form-group select,
.form-group textarea {
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

/* Animations pour les quiz */
.quiz-option {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-option:hover {
  transform: translateX(8px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

/* Animations pour le planning */
.calendar-day {
  transition: all 0.3s ease;
}

.calendar-day:hover {
  transform: scale(1.1);
  z-index: 10;
}

.time-slot {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-slot:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

/* Animations pour les témoignages */
.star {
  transition: all 0.3s ease;
}

.star:hover {
  transform: scale(1.2) rotate(72deg);
}

/* Animations pour les sections */
section {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Loading animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .btn:hover::before {
    width: 200px;
    height: 200px;
  }
  
  .card:hover, .testimonial-card:hover, .service-card:hover {
    transform: translateY(-4px);
  }
}

/* Performance optimization */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
