.em-team-list {
  margin: 2em 0;
}

.em-section-title {
  margin-bottom: .5em;
  /* couleur, font-family, text-align et font-size injectés inline */
}

.em-section-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  /* justify-content injecté inline */
}

.em-card {
  text-align: center;
}

/* Conteneur image */
.em-card-img {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Ratio 1:1 */
  overflow: hidden;
  border-radius: 8px; /* Optionnel : coins arrondis */
}

/* Image de fond - couche séparée pour le flou */
.em-card-img::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: filter .3s ease-in-out;
  z-index: 1;
}

/* Effet de flou uniquement sur l'image de fond */
.em-card-img:hover::before {
  filter: blur(4px);
}

/* Overlay texte - au-dessus de l'image */
.em-card-overlay {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease-in-out;
  z-index: 20; /* Z-index plus élevé que l'image */
  pointer-events: none;
}

.em-card-img:hover .em-card-overlay {
  opacity: 1;
}

/* Conteneur du texte overlay avec support HTML enrichi */
.em-card-overlay > div {
  /* couleur, font-family et font-size injectés inline */
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 4px;
  /* Le background est appliqué sur .em-card-overlay depuis PHP */
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8); /* Ombre pour améliorer la lisibilité */
  max-width: 90%;
  word-wrap: break-word;
}

/* Support des balises HTML dans l'overlay */
.em-card-overlay strong {
  font-weight: bold;
}

.em-card-overlay em {
  font-style: italic;
}

.em-card-overlay u {
  text-decoration: underline;
}

.em-card-overlay mark {
  background: rgba(255, 255, 0, 0.7);
  padding: 2px 4px;
  border-radius: 2px;
}

.em-card-overlay br {
  line-height: 1.5;
}

/* Label sous la carte */
.em-card-label {
  margin-top: .5em;
  /* couleur, font-family et font-size injectés inline */
}

/* Responsive */
@media (max-width: 768px) {
  .em-section-cards {
    justify-content: center !important;
  }
  
  .em-card {
    max-width: 150px;
  }
  
  .em-card-overlay > div {
    font-size: 12px !important;
    padding: 6px 8px;
  }
}