
/* ============================= */
/*          CAROUSELS            */
/* ============================= */

.carousel-container {
  position: relative;
  margin-top: 20px;
  overflow: hidden;
}

.carousel {
  display: flex;
  gap: 20px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.carousel-track {
  display: flex;
  gap: 20px;
}

.carousel-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.carousel-item img {
  display: block;
  height: 200px; /* Hauteur standard des miniatures */
  width: auto;
}

/* Boutons du carousel */
.carousel-btn { 
    position: absolute; 
    background: none; 
    border: none; 
    color: #7dc8e5; 
    font-size: 2rem; 
    font-weight: bold; 
    cursor: pointer; 
    z-index: 10; 
    top: 0; bottom: 0; 
    margin: auto; 
    height: 200px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

/* Flèches standard */
.carousel-btn.left { left: 10px; }
.carousel-btn.right { right: 10px; }

/* ============================= */
/*          LIGHTBOX             */
/* ============================= */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.lightbox img {
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 8px;
}

.lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.close-btn { top: 20px; right: 20px; }
.prev-btn { left: 20px; top: 50%; transform: translateY(-50%); }
.next-btn { right: 20px; top: 50%; transform: translateY(-50%); }


/* ============================= */
/*      TABLETTE ET MOBILE       */
/* ============================= */

@media (max-width: 992px) {

  /* Scroll tactile carousel et suppression flèches */
  .carousel { overflow-x: auto; }
  .carousel::-webkit-scrollbar { display: none; }
  .carousel-btn { display: none !important; }

  /* Eviter débordement */
  .carousel-track, .carousel-item {
    min-width: auto;
    flex: 0 0 auto;
  }
}

@media (max-width: 600px) {

  /* Scroll tactile carousel et suppression flèches */
  .carousel { overflow-x: auto; }
  .carousel::-webkit-scrollbar { display: none; }
  .carousel-btn { display: none !important; }

  .carousel-track, .carousel-item {
    min-width: auto;
    flex: 0 0 auto;
  }
}

/* ============================= */
/*       DESKTOP (scroll caché)  */
/* ============================= */
@media (min-width: 1025px) {
  .carousel { overflow-x: hidden; }
}
