.religion {
  background: #fff;
  padding: 80px 100px;
}

.religion h2 {
  font-family: var(--avenir-font-family);
  font-size: 34px;
  margin-bottom: 40px;
  color: #39434C;
}

.religion .accent {
  display: inline-block;
  width: 6px;
  height: 24px;
  background: var(--jaune);
  margin-right: 10px;
  vertical-align: middle;
}

/* Grille uniforme */
.religion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: start; /* tous les items commencent au même niveau */
}

/* Carte */
.religion-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  height: 400px; /* hauteur fixe pour toutes les cards */
}

.religion-card img {
  flex: 1;
  width: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay texte */
.religion-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, #39434C, rgba(57, 67, 76, 0));
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* texte en haut */
  min-height: 50%; /* overlay visible */
}

.religion-card .overlay h3 {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2em;
  display: -webkit-box;
  -webkit-line-clamp: 2;       /* limite à 2 lignes */
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;             /* aucun espace */
  color: var(--vert);
}

.religion-card .overlay p {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;                   /* aucun espace */
  overflow: hidden;
}

/* ✅ Responsive */

/* Écrans larges (jusqu’à 1200px) */
@media (max-width: 1200px) {
  .religion {
    padding: 70px 60px;
  }

  .religion-grid {
    gap: 30px;
  }

  .religion-card {
    height: 380px;
  }
}

/* Tablettes (jusqu’à 992px) */
@media (max-width: 992px) {
  .religion {
    padding: 60px 40px;
  }

  .religion h2 {
    font-size: 30px;
    margin-bottom: 30px;
    text-align: center;
  }

  .religion-grid {
    grid-template-columns: 1fr; /* 1 colonne */
    gap: 30px;
  }

  .religion-card {
    height: 350px;
  }

  .religion-card .overlay h3 {
    font-size: 22px;
  }

  .religion-card .overlay p {
    font-size: 15px;
  }
}

/* Mobiles (jusqu’à 768px) */
@media (max-width: 768px) {
  .religion {
    padding: 40px 20px;
  }

  .religion h2 {
    font-size: 26px;
    margin-bottom: 25px;
  }

  .religion-card {
    height: 300px;
  }

  .religion-card .overlay h3 {
    font-size: 20px;
  }

  .religion-card .overlay p {
    font-size: 14px;
  }
}

/* Très petits smartphones (jusqu’à 480px) */
@media (max-width: 480px) {
  .religion {
    padding: 30px 15px;
  }

  .religion h2 {
    font-size: 22px;
  }

  .religion-card {
    height: 260px;
  }

  .religion-card .overlay {
    padding: 15px;
    min-height: 55%;
  }

  .religion-card .overlay h3 {
    font-size: 18px;
    /* height retirée pour coller le p dessous */
  }

  .religion-card .overlay p {
    font-size: 13px;
  }
}
