/* Section En-tête */
.reasons {
  padding: 30px 0 20px 0;
  text-align: center;
  background-color: #f5f0e6; /* Douce couleur de fond optionnelle, s'accorde bien avec le reste */
}

.reasons__content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reasons__content h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  margin-top: 0;
}
.hero__content-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--secondary-color);

  font-style: italic;
}

/* Liste des icônes SVG */
.reasons__list {
  display: grid;
  grid-template-columns: repeat(
    4,
    1fr
  ); /* Force exactement 4 colonnes par ligne */
  gap: 30px; /* Espace entre les blocs */
  list-style: none;
  padding: 0;
  margin: 20px auto;
  max-width: 1000px; /* Ajustez selon la largeur souhaitée pour centrer le tout */
}

/* 2. Alignement et hauteur homogène pour chaque item */
.reasons__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* Optionnel : si vos icônes ont des hauteurs différentes, vous pouvez fixer une hauteur d'image ou un alignement du texte */
}

.reasons__icon-img {
  width: 60px;
  height: auto;
}

/* 3. Pour que les titres se calent bien au même niveau visuel */
.reasons__label {
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-top: 10px;
  min-height: 2.5em; /* Réserve un espace fixe de 2 lignes pour le titre, évitant les décalages si un titre est sur une ou deux lignes */
  display: flex;
  align-items: center;
  justify-content: center;
}

.reasons__desc {
  font-family: "Montserrat", sans-serif;
  font-size: 0.75rem;
}

.reasons__text {
  font-family: "Montserrat", sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
  margin: 20px 0;
}

/* ========================================== */
/* SECTION DES 3 CARDS CLIQUABLES             */
/* ========================================== */

.cards-section {
  background-color: var(--secondary-color);
  padding: 30px 0 80px 0;
}

.cards-section__title {
  text-align: center;
  font-size: 2.2rem;
  color: #d4b8b3;
  margin-bottom: 20px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Style de la card cliquable (balise <a>) */
.cards__item {
  background-color: #f5f0e6;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  overflow: hidden; /* Important : épouse les coins arrondis de la carte */
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

/* L'image sur toute la largeur tout en haut */
.cards__img {
  width: 100%;
  height: 160px; /* Ajustez cette hauteur selon vos préférences */
  object-fit: cover; /* S'assure que l'image remplit bien l'espace sans se déformer */
  display: block;
}

/* Contenu texte de la carte */
.cards__content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cards__item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
  border-color: var(--primary-color);
}

.cards__content h3 {
  text-align: center;
  font-size: 1.3rem;
  color: var(--secondary-color);
  font-weight: 500;
}

.cards__content p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
  margin-bottom: 20px;
}

.cards__link-text {
  text-align: end;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* ========================================== */
/* RESPONSIVE POUR LA SECTION REASONS        */
/* ========================================== */

/* Sur tablettes (ex: iPad Mini / jusqu'à 1024px) : on passe à 2 colonnes */
@media (max-width: 1024px) {
  .cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0 1rem;
  }
  .cards__item {
    width: 100%;
    max-width: 340px;
  }

  .cards-section__title {
    font-size: 1.8rem;
  }
}

/* 1. Pour les tablettes et petits écrans (ex: iPad Mini / 768px et moins) : 2 colonnes */
@media (max-width: 768px) {
  .reasons__list {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 1rem;
  }

  .reasons__item {
    display: flex;
    flex-direction: row; /* Icône à gauche, bloc de texte à droite */
    align-items: center;
    text-align: left;
    gap: 15px;
    padding: 12px 15px;
  }

  .reasons__icon-img {
    width: 60px;
    height: auto;
    flex-shrink: 0;
  }

  /* Le conteneur empile verticalement le titre et la description */
  .reasons__text-wrap {
    display: flex;
    flex-direction: column;
  }

  .reasons__label {
    text-transform: uppercase;
    font-size: 1.2rem;
    margin-top: 0;
    min-height: auto;
    justify-content: flex-start;
    font-weight: 600;
  }

  .reasons__desc {
    font-size: 1rem;
    color: #666;
    margin-top: 2px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 1.5rem;
  }

  .cards-section__title {
    font-size: 1.5rem;
  }
}
