#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

#lightbox-img {
  max-width: 90vw;
  max-height: 70vh;
  border-radius: 8px;
}

/*#lightbox h4 {
  color: #fff;
  margin-bottom: 10px;
}*/
#lightbox-title {
  color: #fff;
  margin-bottom: 10px;
   opacity: 1;
}

#lightbox .close {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 22px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
}

#lightbox .close:hover {
  background: rgba(255,255,255,0.8);
  color: #000;
}

.lightbox-image-wrapper {
  position: relative; /* 🔑 référence */
  display: inline-block;
}

/* =======================
Gallerie
=========================== */
.gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.gallery img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* element qui glisse tout seul */


.slider-single {
  position: relative;
  width: 100%;
  max-width: 260px;   /* 🔒 largeur max du conteneur */
  height: 160px;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.slider-single img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slider-single img.active {
  opacity: 1;
}

.slider-single::after {
  content: "🔍";
  position: absolute;
  bottom: 6px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
}