.encart-video {
  width: 100%;
}

/* ===== ÉCRAN PRINCIPAL ===== */
.video-main-wrapper {
  width: 100%;
  height: 0;
  padding-top: 56.25%; /* 16:9 */
  position: relative;
  background: black;
  overflow: hidden;
  margin-bottom: 10px;
}

.video-main-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== MINIATURES ===== */
.video-thumbs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.thumb {
  display: flex;         /* vidéo + légende côte à côte */
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.thumb-video-wrapper {
  width: 130px;
  height: 80px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.thumb-video-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb .overlay {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: rgba(255,255,255,0.8);
  font-weight: bold;
  pointer-events: none;
  z-index: 10;
  background: none; /* <- important */
}

.thumb.active .overlay {
  display: block;
}

.thumb {
  display: flex;
  flex-direction: row; /* toujours côte à côte, desktop et mobile */
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.thumb span {
  display: inline-block;
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  text-align: left;
  line-height: 1.2;
}

/* ===== RESPONSIVE MOBILE & TABLETTE ===== */
@media (max-width: 992px) {
  .video-thumbs {
    flex-direction: column;
    gap: 12px;
  }

  .thumb {
    flex-direction: row;    /* reste côte à côte comme desktop */
    align-items: center;
    gap: 10px;
  }

  .thumb-video-wrapper {
    width: 130px;
    height: 80px;
  }

  .thumb-video-wrapper video, .thumb-video-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #mainLegend {
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .thumb-video-wrapper {
    width: 130px;  /* même taille que desktop */
    height: 80px;
  }

  .thumb-video-wrapper video, .thumb-video-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #mainLegend {
    font-size: 14px;
  }
}
