/*
 * Animations pour la page Qui sommes-nous
 * Effets légers et professionnels pour site d'expertise immobilière
 */

/* ===== ANIMATIONS GLOBALES ===== */

/* Animation de fade-in avec décalage vertical */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation de fade-in avec décalage horizontal gauche */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation de fade-in avec décalage horizontal droit */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Animation de scale subtile */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== ANIMATION TIMELINE/ÉVOLUTION ===== */

/* Animation des cartes de la timeline */
.process-step {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.process-step.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Délais échelonnés pour les cartes de timeline */
.process-step:nth-child(2).animate-in { transition-delay: 0.1s; }
.process-step:nth-child(3).animate-in { transition-delay: 0.2s; }
.process-step:nth-child(4).animate-in { transition-delay: 0.3s; }
.process-step:nth-child(5).animate-in { transition-delay: 0.4s; }
.process-step:nth-child(6).animate-in { transition-delay: 0.5s; }

/* Animation spécifique pour les cartes de gauche et droite */
.process-step.left {
  transform: translateX(-30px);
}

.process-step.left.animate-in {
  transform: translateX(0);
}

.process-step.right {
  transform: translateX(30px);
}

.process-step.right.animate-in {
  transform: translateX(0);
}

/* Animation au hover des cartes de timeline */
.process-content {
  transition: all 0.3s ease;
  cursor: pointer;
}

.process-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* Animation des points de la timeline */
.process-dot {
  transition: all 0.3s ease;
  animation: fadeInScale 0.6s ease-out forwards;
}

.process-step:nth-child(2) .process-dot { animation-delay: 0.1s; }
.process-step:nth-child(3) .process-dot { animation-delay: 0.3s; }
.process-step:nth-child(4) .process-dot { animation-delay: 0.5s; }
.process-step:nth-child(5) .process-dot { animation-delay: 0.7s; }
.process-step:nth-child(6) .process-dot { animation-delay: 0.9s; }

.process-content:hover + .process-dot,
.process-step:hover .process-dot {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(225, 91, 72, 0.3);
}

/* ===== ANIMATION CARTES DE VALEURS ===== */

.value-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s ease-out;
}

.value-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Délais échelonnés pour les cartes de valeurs */
.value-card:nth-child(1).animate-in { transition-delay: 0.1s; }
.value-card:nth-child(2).animate-in { transition-delay: 0.2s; }
.value-card:nth-child(3).animate-in { transition-delay: 0.3s; }
.value-card:nth-child(4).animate-in { transition-delay: 0.4s; }

/* Effet hover subtil pour les cartes de valeurs */
.value-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

/* Animation des icônes de valeurs */
.value-icon {
  transition: all 0.3s ease;
}

.value-card:hover .value-icon {
  transform: scale(1.05);
  background-color: rgba(30, 58, 138, 0.1);
}

.value-card:hover .value-icon i {
  transform: scale(1.1);
}

/* ===== ANIMATION CARTES DE COMPÉTENCES ===== */

.skill-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.skill-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Délais échelonnés pour les cartes de compétences */
.skill-card:nth-child(1).animate-in { transition-delay: 0.05s; }
.skill-card:nth-child(2).animate-in { transition-delay: 0.1s; }
.skill-card:nth-child(3).animate-in { transition-delay: 0.15s; }
.skill-card:nth-child(4).animate-in { transition-delay: 0.2s; }
.skill-card:nth-child(5).animate-in { transition-delay: 0.25s; }
.skill-card:nth-child(6).animate-in { transition-delay: 0.3s; }
.skill-card:nth-child(7).animate-in { transition-delay: 0.35s; }

/* Effet hover professionnel pour les cartes de compétences */
.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  border-left: 4px solid var(--kodann-primary);
}

/* Animation des icônes de compétences */
.skill-icon {
  transition: all 0.3s ease;
}

.skill-card:hover .skill-icon {
  transform: scale(1.1);
  color: var(--kodann-secondary) !important;
}

/* Animation de la flèche du bouton "En savoir plus" */
.btn-arrow {
  transition: all 0.3s ease;
}

.btn-arrow::after {
  transition: transform 0.3s ease;
  display: inline-block;
}

.skill-card:hover .btn-arrow::after {
  transform: translateX(8px);
}

/* ===== ANIMATION SECTION ÉQUIPE ===== */

.team-card {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.8s ease-out;
}

.team-card.animate-in {
  opacity: 1;
  transform: scale(1);
  transition-delay: 0.2s;
}

/* Effet hover pour la carte équipe */
.team-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Animation de l'image de l'équipe */
.team-image {
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 1 !important; /* Force l'opacité pour s'assurer que l'image est visible */
}

.team-card:hover .team-image {
  transform: scale(1.02);
}

.team-image img {
  transition: transform 0.3s ease;
  opacity: 1 !important; /* Force l'opacité pour s'assurer que l'image est visible */
  display: block !important;
}

.team-card:hover .team-image img {
  transform: scale(1.05);
}

/* ===== ANIMATION STATISTIQUES ===== */

.stat-item {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s ease-out;
}

.stat-item.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.stat-item:nth-child(1).animate-in { transition-delay: 0.1s; }
.stat-item:nth-child(2).animate-in { transition-delay: 0.2s; }
.stat-item:nth-child(3).animate-in { transition-delay: 0.3s; }

/* Animation des icônes de statistiques */
.stat-icon {
  transition: all 0.3s ease;
}

.stat-item:hover .stat-icon {
  transform: scale(1.1);
  background-color: var(--kodann-primary);
}

.stat-item:hover .stat-icon i {
  color: white !important;
}

/* ===== ANIMATION SECTION INTRO ===== */

.about-intro h1 {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.about-intro h1.animate-in {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.2s;
}

.about-intro p {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.8s ease-out;
}

.about-intro p.animate-in {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.4s;
}

/* ===== ANIMATION PARTENAIRES ===== */

.partners-track:hover {
  animation-play-state: paused;
}

.partner-logo {
  transition: all 0.3s ease;
}

.partner-logo:hover {
  transform: scale(1.05);
}

/* ===== RÉDUCTION D'ANIMATION POUR ACCESSIBILITÉ ===== */

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

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  /* Réduction des délais d'animation sur mobile */
  .process-step,
  .value-card,
  .skill-card,
  .stat-item {
    animation-delay: 0s !important;
  }
  
  /* Réduction des effets hover sur mobile */
  .process-content:hover,
  .value-card:hover,
  .skill-card:hover,
  .team-card:hover {
    transform: none;
  }
}

/* ===== ANIMATION D'ENTRÉE DE LA LIGNE DE TEMPS ===== */

.process-line {
  opacity: 0;
  animation: fadeInScale 1s ease-out forwards;
  animation-delay: 0.5s;
}

/* Animation subtile pour les titres de section */
.section-title {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out;
}

.section-title.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

.section-subtitle {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out;
}

.section-subtitle.animate-in {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

/* ===== ANIMATION PARTENAIRES ===== */

.partners-track:hover {
  animation-play-state: paused;
}

.partner-logo {
  transition: all 0.3s ease;
}

.partner-logo:hover {
  transform: scale(1.05);
}

/* ===== RÉDUCTION D'ANIMATION POUR ACCESSIBILITÉ ===== */

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

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
  /* Réduction des délais d'animation sur mobile */
  .process-step,
  .value-card,
  .skill-card,
  .stat-item {
    animation-delay: 0s !important;
  }
  
  /* Réduction des effets hover sur mobile */
  .process-content:hover,
  .value-card:hover,
  .skill-card:hover,
  .team-card:hover {
    transform: none;
  }
}

/* ===== ANIMATION D'ENTRÉE DE LA LIGNE DE TEMPS ===== */

.process-line {
  opacity: 0;
  animation: fadeInScale 1s ease-out forwards;
  animation-delay: 0.5s;
}

/* ===== RÈGLES SPÉCIFIQUES POUR LES IMAGES ===== */

/* S'assurer que les images dans les cartes équipe restent visibles */
.team-image,
.team-image img {
  opacity: 1 !important;
  display: block !important;
}

/* Exception pour les images dans les cartes équipe lors des animations */
.team-card:not(.animate-in) .team-image,
.team-card:not(.animate-in) .team-image img {
  opacity: 1 !important;
  transform: none !important;
}