.custom-yt-player {
  position: relative;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 9;
  background: #22272B;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.custom-yt-player img.yt-thumb {
  width: 100%;
  height: 106%; /* Légère sur-hauteur pour rogner les bandes du haut et du bas */
  object-fit: cover;
  object-position: center;
  display: block;
  margin-top: -2%; /* Centre le rognage */
  transition: opacity 0.3s ease;
}

/* Le bouton de lecture personnalisé au centre */
.custom-yt-player .yt-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  /* On applique le dégradé directement, mais on le cache sous un fond noir semi-transparent */
  background: linear-gradient(135deg, #2691c4, #26b9c4);
  border: 3px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  z-index: 10;
}

/* On ajoute un calque interne ou une transition d'ombre/agrandissement ultra-fluide */
.custom-yt-player .yt-play-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #22272B;
  border-radius: 50%;
  transition: opacity 0.3s ease;
  z-index: 1;
}

/* On s'assure que l'icône SVG reste bien au-dessus du calque noir */
.custom-yt-player .yt-play-btn svg {
  position: relative;
  z-index: 2;
}

/* Au survol, on fait disparaître le fond noir en fondu pour révéler le dégradé en douceur */
.custom-yt-player:hover .yt-play-btn::before {
  opacity: 0;
}

/* Intégration de la vraie vidéo au clic */
.custom-yt-player iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
}