/* --- Animations pour la section Why --- */

@keyframes fadeInUpShort {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Titre principal "Pourquoi nous choisir ?" */
.why-title {
  opacity: 0;
  animation: fadeInUpShort 0.6s ease-out forwards;
}

/* Sous-titre + séparateur */
.why-subtitle,
.why-separator {
  opacity: 0;
  animation: fadeInUpShort 0.6s 0.1s ease-out forwards;
}

/* Conteneur blanc global */
.why-white-container {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUpShort 0.6s 0.2s ease-out forwards;
}

/* Cartes individuelles – décalage progressif */
.why-card:nth-child(1) { opacity: 0; animation: fadeInUpShort 0.5s 0.3s ease-out forwards; }
.why-card:nth-child(2) { opacity: 0; animation: fadeInUpShort 0.5s 0.4s ease-out forwards; }
.why-card:nth-child(3) { opacity: 0; animation: fadeInUpShort 0.5s 0.5s ease-out forwards; }
.why-card:nth-child(4) { opacity: 0; animation: fadeInUpShort 0.5s 0.6s ease-out forwards; }
.why-card:nth-child(5) { opacity: 0; animation: fadeInUpShort 0.5s 0.7s ease-out forwards; }

/* Maintenir le layout fluide sur petits écrans */
@media (max-width: 768px) {
  .why-card {
    animation-delay: 0.3s !important; /* uniformiser l’entrée en mobile pour fluidité */
  }
}

.why-section {
  position: relative;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  box-sizing: border-box;
  padding-bottom: 100px;
}

/* Primary background */
.why-primary-bg {
  margin-top: 150px;
  background-color: var(--color-primary); 
  padding: 60px 20px 60px;
  width: 100%;
  height: 450px;
  text-align: center;
}

.why-text {
  max-width: 800px;
  margin: 0 auto;
}

.why-title {
  font-size: 3rem;
  font-weight: 700;
  font-family: 'MomoTrustSans', sans-serif;
  color: var(--color-white);
  margin-bottom: 40px;
  line-height: 1.2;
}

.why-subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  font-family: 'MomoTrustSans', sans-serif;
  color: var(--color-white);
  line-height: 1.4;
  margin: 0 auto;
  text-align: left;
  margin-bottom: 20px;
  max-width: 800px;
}

.why-separator {
  width: 80px;
  height: 10px;
  background-color: var(--color-white);
  margin: 0 auto 40px;
  border-radius: 25px;
}

/* White big container*/
.why-white-container {
  position: relative;
  background-color: var(--color-white);
  border-radius: 48px;
  padding: 60px 40px;
  width: calc(100% - 100px);
  margin: -10% auto 0 auto;
  box-shadow: 0 4px 20px rgba(10, 36, 78, 0.3);
  z-index: 10
}

.why-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 30px;
  align-items: stretch;
}

.why-card {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  text-align: center;
  justify-items: center;
  padding: 20px;
}

.why-card-icon {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 64px;
  height: 64px;
}


.why-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'MomoTrustSans', sans-serif;
  color: var(--color-primary);
  margin-bottom: 25px;
  line-height: 1.3;
}

.why-card-text {
  font-size: 1rem;
  font-weight: 400;
  font-family: 'MomoTrustSans', sans-serif;
  color: var(--color-gray);
  line-height: 1.5;
  text-align: left;
}

/* --- Responsive --- */

@media (max-width: 768px) {
  .why-primary-bg {
    padding: 60px 20px 40px;
  }

  .why-title {
    font-size: 2rem;
    margin-bottom: 30px;
  }

  .why-subtitle {
    font-size: 1.2rem;
  }

  .why-white-container {
    margin: -120px auto 0 auto;
    border-radius: 20px;
    padding: 80px 20px 40px 20px;
    width: calc(100% - 20px);
    max-width: 380px;
  }

  .why-cards {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .why-card {
    max-width: 100%;
    width: 100%;
  }
  
  .why-card-title {
    margin-bottom: 20px;
  }
}