@charset "utf-8";

.youtube-player {
  max-width: 100%;
  background: #000;
  margin: 0px;
}


.youtube-player iframe {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: transparent;
}

.youtube-player img {
  object-fit: cover;
  display: block;
  left: 0;
  bottom: 0;
  margin: auto;
  max-width: 100%;
  width: 100%;
  position: absolute;
  right: 0;
  top: 0;
  border: none;
  height: auto;
  cursor: pointer;
  -webkit-transition: 0.4s all;
  -moz-transition: 0.4s all;
  transition: 0.4s all;
}

.youtube-player img:hover {
  -webkit-filter: brightness(75%);
  -moz-filter: brightness(75%);
  filter: brightness(75%);
}

/* 1. On s'assure que le bouton est toujours visible et au-dessus */
.youtube-player .play {
    height: 48px;
    width: 68px;
    left: 50% !important; /* Le !important force le centrage malgré le code HTML */
    top: 50% !important;
    margin-left: -34px !important;
    margin-top: -24px !important;
    position: absolute;
    background: url("video/youtubeplay.png") no-repeat;
    cursor: pointer;
    z-index: 999; /* Met le bouton tout en haut de la pile */
}

/* 2. On s'assure que le container de la miniature laisse passer le bouton */
.thumbnail-container {
    position: relative;
    width: 100%;
    height: 100%;
}
          <style>
                /* --- Structure de la carte vidéo --- */
                .video-card {
                    width: 100%;
                    max-width: 1200px;
                    margin: 0 auto 20px auto;
                    box-sizing: border-box;
                }

                .video-card .ratio {
                    width: 100%;
                    height: 0;
                    padding-bottom: 56.25%;
                    /* Ratio 16:9 */
                    position: relative;
                }

                /* --- Image miniature --- */
                .youtube-player img.thumbnail {
                    display: block;
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                    position: absolute;
                    /* Ajouté pour que l'image reste au fond */
                    top: 0;
                    left: 0;
                }

                /* --- LE SECRET DU CENTRAGE MOBILE --- */
                .youtube-player {
                    display: flex !important;
                    /* Force le mode Flexbox */
                    align-items: center;
                    /* Centre verticalement */
                    justify-content: center;
                    /* Centre horizontalement */
                    width: 100%;
                    height: 100%;
                    position: absolute;
                    top: 0;
                    left: 0;
                }

                /* --- Bouton de lecture --- */
                .youtube-player div.play {
                    width: 80px;
                    /* Un peu plus petit pour mieux s'adapter au mobile */
                    height: 80px;
                    background: url('video/youtubeplay.png') no-repeat center/contain;
                    position: relative;
                    /* On change absolute pour relative */
                    /* On enlève les top/left/transform qui causaient le bug */
                    cursor: pointer;
                    transition: transform 0.3s ease;
                    z-index: 5;
                }

                /* On garde la taille de 100px pour les écrans d'ordinateur */
                @media (min-width: 992px) {
                    .youtube-player div.play {
                        width: 100px;
                        height: 100px;
                    }
                }

                /* Effet de zoom au survol (simplifié car plus de translate) */
                .youtube-player div.play:hover {
                    transform: scale(1.1);
                }

                /* --- Info-bulle (Tooltip) --- */
                .youtube-player div.play:hover::after {
                    content: "Cliquez pour voir la vidéo";
                    position: absolute;
                    top: 110%;
                    left: 50%;
                    transform: translateX(-50%);
                    background-color: rgba(0, 0, 0, 0.85);
                    color: #ffc107;
                    padding: 6px 14px;
                    border-radius: 20px;
                    font-size: 14px;
                    font-family: Arial, sans-serif;
                    white-space: nowrap;
                    border: 1px solid #ffc107;
                    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.5);
                    pointer-events: none;
                    z-index: 10;
                }

            </style>
