/* ==========================================================================
   PCR — LIGHTBOX UNIVERSELLE (PRO) — STRIP THUMBS + NO TITLES
   ========================================================================== */

.pcr-lb{
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(6,10,18,.88);
  backdrop-filter: blur(4px);
}

.pcr-lb.is-open{
  display: flex;
}

/* =========================================================
   INNER (image + strip)
   ========================================================= */
.pcr-lb__inner{
  position: relative;

  width: min(96vw, 1200px);
  max-height: min(92vh, 900px);

  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;

  align-items: center;
  justify-items: center;
}

/* =========================================================
   STAGE (image container)
   ========================================================= */
.pcr-lb__stage{
  position: relative;
  width: 100%;
  height: 100%;

  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 220px;
}

/* =========================================================
   IMAGE
   ========================================================= */
.pcr-lb__img{
  max-width: 100%;
  max-height: calc(min(92vh, 900px) - 90px);
  object-fit: contain;

  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);

  background: rgba(255,255,255,.04);
}

/* =========================================================
   THUMB STRIP
   ========================================================= */
.pcr-lb__strip{
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;
  padding-bottom: 2px;
}
.pcr-lb__strip::-webkit-scrollbar{ display:none; }

.pcr-lb__stripTrack{
  display:flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;

  justify-content: center;
}

.pcr-lb__thumb{
  appearance: none;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;

  width: 72px;
  height: 54px;

  flex: 0 0 auto;
  opacity: .78;
  transition: transform .12s ease, opacity .12s ease, border-color .12s ease, background-color .12s ease;
}

.pcr-lb__thumb:hover{
  opacity: .95;
  transform: translateY(-1px);
}

.pcr-lb__thumb[aria-current="true"]{
  opacity: 1;
  border-color: rgba(255,255,255,.38);
  background: rgba(255,255,255,.10);
}

.pcr-lb__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.pcr-lb__btn{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 44px;
  height: 44px;
  border-radius: 999px;

  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.pcr-lb__btn:hover{
  background: rgba(255,255,255,.22);
}

.pcr-lb__btn--prev{ left: -64px; }
.pcr-lb__btn--next{ right: -64px; }

.pcr-lb__close{
  position: absolute;
  top: -56px;
  right: 0;

  width: 40px;
  height: 40px;
  border-radius: 999px;

  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;

  cursor: pointer;
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 900px){
  .pcr-lb__btn--prev{ left: -52px; }
  .pcr-lb__btn--next{ right: -52px; }
}

@media (max-width: 768px){
  .pcr-lb__btn--prev,
  .pcr-lb__btn--next{
    display: none;
  }

  .pcr-lb__close{
    top: calc(env(safe-area-inset-top) + 10px);
    right: 10px;
  }

  .pcr-lb__inner{
    width: min(96vw, 1200px);
    max-height: min(92vh, 900px);
    gap: 12px;
  }

  .pcr-lb__thumb{
    width: 64px;
    height: 48px;
  }

  /* un peu plus de place pour l’image sur mobile */
  .pcr-lb__img{
    max-height: calc(min(92vh, 900px) - 86px);
  }
}


.pcr-lb__strip{
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;

  /* ✅ important : padding pour éviter la coupe à gauche/droite */
  padding: 0 12px 2px;
}
.pcr-lb__strip::-webkit-scrollbar{ display:none; }

.pcr-lb__stripTrack{
  display:flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;

  /* ✅ surtout pas center : sinon la première thumb “déborde” */
  justify-content: flex-start;

  /* ✅ la track prend la largeur de son contenu */
  width: max-content;
}

/* X de fermeture — ROUGE PRO */
.pcr-lb__close{
  color: var(--pcr-color-secondary);
  border: 1px solid var(--pcr-color-secondary-soft);
  background: rgba(255,255,255,.08);
  transition: background var(--pcr-dur-fast),
              color var(--pcr-dur-fast),
              transform var(--pcr-dur-fast);
}

.pcr-lb__close:hover{
  background: var(--pcr-color-secondary);
  color: #fff;
  transform: rotate(90deg);
}

.pcr-lb__close:focus-visible{
  outline: none;
  box-shadow: var(--pcr-focus-ring);
}