/* =====================================================
   LIGHTBOX TRESSES AFRO — Fix centrage vidéo + z-index bouton RDV
   À ajouter dans tresses-afro.css (ou via wp_add_inline_style)
===================================================== */

/* Le lightbox prend tout l'écran en flex centré */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lightbox.active {
  display: flex;
}

/* Bouton fermer — au-dessus de tout */
.lightbox .close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10002;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox .close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Footer lightbox — z-index au-dessus du swiper */
.lightbox-footer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001; /* ← au-dessus du swiper et des images */
  pointer-events: all;
  width: max-content;
}

.btn-rdv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: #d4af37;
  color: #000;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 40px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn-rdv:hover {
  background: #f0d060;
  transform: scale(1.05);
}

/* Le swiper doit s'arrêter AVANT le footer */
.lightbox-swiper {
  position: relative;
  z-index: 10000;
  width: 100%;
  /* Laisse de la place en bas pour le bouton RDV */
  height: calc(100vh - 90px);
  max-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-swiper .swiper-wrapper {
  align-items: center;
}

/* Chaque slide centré */
.lightbox-swiper .swiper-slide {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: calc(100vh - 90px);
  max-height: calc(100vh - 90px);
}

/* Image dans le lightbox */
.lightbox-swiper .swiper-slide img {
  max-width: 90vw;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

/* Vidéo dans le lightbox — fix centrage */
.lightbox-swiper .swiper-slide video,
.lightbox-swiper .swiper-zoom-container video {
  max-width: 90vw;
  max-height: calc(100vh - 160px);
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  background: #000;
}

/* Container zoom Swiper */
.lightbox-swiper .swiper-zoom-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  height: 100%;
}

/* Flèches navigation */
.lightbox-swiper .swiper-button-prev,
.lightbox-swiper .swiper-button-next {
  z-index: 10001;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  transition: background 0.2s;
}
.lightbox-swiper .swiper-button-prev::after,
.lightbox-swiper .swiper-button-next::after {
  font-size: 16px;
}
.lightbox-swiper .swiper-button-prev:hover,
.lightbox-swiper .swiper-button-next:hover {
  background: #d4af37;
  color: #000;
}

/* Mobile */
@media (max-width: 768px) {
  .lightbox-swiper .swiper-slide img,
  .lightbox-swiper .swiper-slide video,
  .lightbox-swiper .swiper-zoom-container video {
    max-width: 95vw;
    max-height: calc(100vh - 140px);
  }
  .lightbox-footer {
    bottom: 16px;
  }
}