/* Manuel – carrousels par chapitre + lightbox (clic) */

/* Layout : image à gauche, liste à droite */
.uu-chapter-row{
  display:flex;
  gap: 22px;
  align-items: flex-start;
  margin-top: 14px;
}

.uu-chapter-left{ flex: 0 0 46%; min-width: 320px; }
.uu-chapter-right{ flex: 1 1 auto; min-width: 260px; }

/* Carrousel */
.uu-carousel{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.uu-carousel-stage{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: transparent;
}

.uu-carousel-slides{
  aspect-ratio: 16 / 9;
  background: transparent;
}

.uu-carousel-slides img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:none;
  cursor: zoom-in;      /* loupe */
  user-select: none;
}

.uu-carousel-slides img.is-active{ display:block; }

/* Dots centrés en bas */
.uu-carousel-dots{
  position:absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  display:flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  justify-content: center;
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.10);
}

.uu-carousel-dots[hidden]{
  display: none;
}

.uu-dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.35);
  padding: 0;
  cursor: pointer;
}

.uu-dot[aria-current="true"]{
  background: rgba(255,255,255,.95);
}

/* Responsive */
@media (max-width: 980px){
  .uu-chapter-row{ flex-direction: column; }
  .uu-chapter-left{ flex-basis: auto; width: 100%; min-width: 0; }
  .uu-chapter-right{ width: 100%; min-width: 0; }
}

/* Lightbox (clic sur l'image) */
.uu-lightbox{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.uu-lightbox.is-open{ display:flex; }

.uu-lightbox-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.70);
  backdrop-filter: blur(2px);
}

.uu-lightbox-content{
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 92vh;
}

.uu-lightbox-img{
  display:block;
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  cursor: zoom-out; /* clic = fermer */
}

.uu-lightbox-caption{
  margin-top: 12px;
  text-align: center;
  color: rgba(255,255,255,.85);
  font-size: 16px;
  line-height: 1.5;
}

.uu-lightbox-caption.is-empty{
  display: none;
}

/* Flèches gauche/droite */
.uu-lightbox-nav{
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.95);
  font-size: 26px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
}

.uu-lightbox-nav:hover{
  background: rgba(0,0,0,.55);
}

.uu-lightbox-prev{ left: 16px; }
.uu-lightbox-next{ right: 16px; }

@media (max-width: 520px){
  .uu-lightbox-nav{ width: 40px; height: 40px; font-size: 24px; }
  .uu-lightbox-prev{ left: 10px; }
  .uu-lightbox-next{ right: 10px; }
}

.uu-noscroll{ overflow:hidden; }

/* Bouton fermer (croix) dans la lightbox */
.uu-lightbox-close{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.95);
  font-size: 28px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
}

.uu-lightbox-close:hover{
  background: rgba(0,0,0,.55);
}

@media (max-width: 520px){
  .uu-lightbox-close{ width: 40px; height: 40px; font-size: 26px; }
}
