/* ═══════════════════════════════════════════════════════
   REGIONS.CSS — chargé uniquement sur les pages d'accueil régionales
   Section "Fraternité près de chez vous" (cartes cantons/fraternités)
   + bloc "Comment cela se passe" (.description).
   ═══════════════════════════════════════════════════════ */

.regions-section {
  position: relative;
  padding: 40px 32px;
  margin: 40px;
  border-radius: 16px;
  overflow: hidden;
  background: #6b5a42;
  scroll-margin-top: 110px;
}

/* Image de fond floutée */
.regions-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8a7a5f 0%, #6b5a42 100%);
  background-size: cover;
  background-position: center;
  filter: blur(0px);
  transition: filter 0.5s ease;
  z-index: 0;
}

.regions-section:hover::before {
  filter: blur(6px);
}

/* Titre de la section */
.regions-section > p {
  position: relative;
  z-index: 1;
  font-family: "Poppins", sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #ffffff;
}

.regions-section > p::after {
  content: "";
  position: relative;
  z-index: 1;
  display: block;
  width: 48px;
  height: 3px;
  background: #f0d9ae;
  border-radius: 2px;
  margin-top: 10px;
  margin-bottom: 16px;
}

/* Conteneur des cartes */
.cartes-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ───── CARTES ───── */
.vaud,
.valais,
.fribourg,
.jura,
.jeunesse {
  border-radius: 14px;
  flex: 1;
  min-width: 110px;
  height: 180px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.vaud:hover,
.valais:hover,
.fribourg:hover,
.jura:hover,
.jeunesse:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.vaud::before,
.valais::before,
.fribourg::before,
.jura::before,
.jeunesse::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(0px);
  transition: filter 0.5s ease;
  z-index: 0;
}

.vaud:hover::before,
.valais:hover::before,
.fribourg:hover::before,
.jura:hover::before,
.jeunesse:hover::before {
  filter: blur(6px);
}

.vaud::before {
  background-image: url(../img/Aigle-Castle-Vineyards-Vaud-Switzerland.png);
}

.valais::before {
  /* Remplacer par l'URL de l'image Valais */
  background-image: url(../img/suisse-valais-sion-tourisme.png);
}

.fribourg::before {
  /* Remplacer par l'URL de l'image Fribourg */
  background-image: url(../img/Panorama_Fribourg_107.png);
}

.jura::before {
  /* Remplacer par l'URL de l'image Jura */
  background-image: url(../img/adobestock_170157926.jpeg.png);
}

.jeunesse::before {
  /* Image Jeunesse */
  background-image: url(../img/jeunesse.jpg);
}

/* ── Titre de chaque carte (le <p>) ── */
.vaud > p,
.valais > p,
.fribourg > p,
.jura > p,
.jeunesse > p {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  top: 50%;
  width: max-content;
  max-width: calc(100% - 24px);

  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  margin: 0;
  z-index: 1;

  background: rgba(0, 0, 0, 0.5);
  padding: 4px 14px;
  border-radius: 6px;

  transition:
    top 0.35s ease 0.25s,
    transform 0.35s ease 0.25s;
}

/* Hover : titre monte EN PREMIER */
.vaud:hover > p,
.valais:hover > p,
.fribourg:hover > p,
.jura:hover > p,
.jeunesse:hover > p {
  top: 16px;
  transform: translateX(-50%) translateY(0);
  transition:
    top 0.35s ease 0s,
    transform 0.35s ease 0s;
}

/* ── Contenu de chaque carte ── */
.card-content {
  position: absolute;
  top: 60px;
  left: 18px;
  right: 18px;
  opacity: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 1;

  /* Au survol : disparaît en premier, sans délai */
  transition: opacity 0.2s ease 0s;
}

/* Survol : le contenu apparaît après le titre (délai = durée du titre) */
.vaud:hover .card-content,
.valais:hover .card-content,
.fribourg:hover .card-content,
.jura:hover .card-content,
.jeunesse:hover .card-content {
  opacity: 1;
  transition: opacity 0.3s ease 0.35s;
}

.card-content span {
  font-size: 16px;
  color: #ffffff;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.card-content span:hover {
  font-size: 16px;
  color: #daaa67;
}

.card-line {
  height: 1px;
  background: #e2c396;
  border-radius: 2px;
  margin: 2px 0;
}

.fraternite-item {
  color: #ffffff;
  cursor: default;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* ───── Bloc "Comment cela se passe" ───── */
.description {
  background: #6b5a42;
  transition: filter 0.5s ease;
  position: relative;
  padding: 40px 32px;
  margin: 40px;
  border-radius: 16px;
  overflow: hidden;
}

.titre h2 {
  position: relative;
  z-index: 1;
  font-family: "Poppins", sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #ffffff;
}

.titre h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: #f0d9ae;
  border-radius: 2px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.texte p {
  position: relative;
  font-family: Merriweather;
  z-index: 1;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 24px;
  color: #ffffff;
}

@media (max-width: 700px) {
  .regions-section,
  .description {
    margin: 20px;
    padding: 28px 20px;
  }

  .cartes-wrapper {
    flex-direction: column;
  }

  .vaud,
  .valais,
  .fribourg,
  .jura,
  .jeunesse {
    min-width: 100%;
    height: 160px;
  }
}
