/* ============================================
   ADDITIONS V2 — Lite Vimeo + Lightbox + Showreel WebP
   Fix conflits avec CSS existant (charte rose)
   ============================================ */

/* ===== SHOWREEL — Reset + nouveau styling ===== */
.showreel-item {
  position: relative !important;
  overflow: hidden !important;
  border: none !important;
  border-radius: 16px !important;
  background: #000 !important;
  padding: 0 !important;
}

.showreel-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Reset complet du placeholder existant */
.showreel-item .showreel-placeholder {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  padding: 0 !important;
  background: #000 !important;
  text-align: left !important;
  border-radius: inherit;
}

/* Masquer les anciens labels/hints (au cas où) */
.showreel-item .showreel-label,
.showreel-item .showreel-hint {
  display: none !important;
}

/* Image plein cadre */
.showreel-item .showreel-bg-img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: inherit;
  transition: transform 0.6s ease, filter 0.4s ease;
}

.showreel-item:hover .showreel-bg-img {
  transform: scale(1.04);
}

/* Overlay gradient pour lisibilité du titre */
.showreel-item .showreel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 30%, rgba(0, 0, 0, 0.05) 55%, transparent 70%);
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
}

/* Titre en overlay — Roboto cohérent avec body */
.showreel-item .showreel-title {
  position: absolute;
  bottom: 22px;
  left: 22px;
  right: 22px;
  z-index: 2;
  color: #fff;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  margin: 0;
  display: block;
}

.showreel-large .showreel-title {
  font-size: 1.55rem;
  font-weight: 900;
  bottom: 30px;
  left: 30px;
  right: 30px;
  letter-spacing: -0.015em;
}

@media (max-width: 768px) {
  .showreel-item .showreel-title {
    font-size: 1rem;
    bottom: 16px;
    left: 16px;
    right: 16px;
  }
  .showreel-large .showreel-title {
    font-size: 1.2rem;
  }
}

/* ===== LITE VIMEO/YOUTUBE EMBED ===== */
.video-thumb {
  position: relative;
  width: 100%;
  border: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: block;
  background: #000;
}

.visual-vertical.video-thumb {
  aspect-ratio: 9/16;
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  border-radius: inherit;
}

.video-thumb:hover .video-thumb-img {
  transform: scale(1.03);
  filter: brightness(0.85);
}

.video-thumb .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(244, 54, 171, 0.95);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, background 0.25s ease;
  z-index: 2;
}

.video-thumb:hover .play-btn {
  transform: translate(-50%, -50%) scale(1.1);
}

.video-thumb .play-btn svg {
  margin-left: 4px;
}

.video-thumb:focus-visible {
  outline: 3px solid #f436ab;
  outline-offset: 4px;
}

/* Masquer les anciens labels dans visual-placeholder */
.visual-placeholder.video-thumb .visual-label,
.visual-placeholder.video-thumb .visual-hint {
  display: none !important;
}

/* ===== LIGHTBOX YOUTUBE/VIMEO ===== */
.yt-lightbox[hidden] {
  display: none !important;
}

.yt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.yt-lightbox-inner {
  width: 100%;
  max-width: 1400px;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
}

.yt-lightbox-inner.is-vertical {
  aspect-ratio: 9 / 16;
  max-width: calc(90vh * 9 / 16);
  max-height: 90vh;
}

.yt-lightbox-inner.is-ultrawide {
  aspect-ratio: 12 / 5;
  max-width: 1600px;
}

.yt-lightbox-inner iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: background 0.25s ease;
}

.yt-close:hover {
  background: rgba(244, 54, 171, 0.95);
}

/* ===== FIX SHOWREEL-LARGE MOBILE ===== */
@media (max-width: 768px) {
  .showreel-item.showreel-large {
    aspect-ratio: 16/9 !important;
  }
}
