/* ============================================================
   STEPS LIGHTBOX — LUNANOVA (PERF SAFE)
   Objectif:
   - Flèches hors panel (desktop)
   - Dots sous le panel (desktop + mobile)
   - Mobile: pas de flèches, swipe + dots
   Notes perf Huawei P20 Lite:
   - Pas de backdrop-filter / blur GPU-killer
   - Transitions légères, pas d’effets lourds
============================================================ */

/* =========================
   OVERLAY + BACKDROP
========================= */

.steps-lightbox{
  position: fixed;
  inset: 0;

  /* IMPORTANT: doit passer au-dessus du header (3000) + burger (4000) */
  z-index: 12000;

  /* évite certains pièges de stacking context */
  isolation: isolate;
}

.steps-lightbox-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.62);
}

/* =========================
   STAGE (panel + dots)
   On centre tout et on réserve de la place aux dots
========================= */

.steps-lightbox-stage{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(980px, 94vw);
  height: min(94vh, calc(100vh - 28px));

  display: flex;
  flex-direction: column;
  align-items: stretch;

  gap: 10px;
  pointer-events: none; /* on réactive sur les vrais éléments */
}

/* =========================
   PANEL
========================= */

.steps-lightbox-panel{
  pointer-events: auto;

  flex: 1;
  min-height: 0;

  overflow: hidden;

  border-radius: 22px;
  border: 1px solid rgba(230,214,158,0.22);
  background: linear-gradient(180deg, rgba(52,30,18,0.98), rgba(18,8,4,0.99));
  box-shadow: 0 22px 56px rgba(0,0,0,0.36);
  color: var(--ln-white, #fffdf8);
}

/* Layout plein panel */
.steps-lightbox-layout{
  height: 100%;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
}

/* Colonne image: pleine hauteur */
.steps-lightbox-media{
  position: relative;
  background: #0d0704;
  height: 100%;
  min-height: 0;
}

.steps-lightbox-img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.steps-lightbox-vignette{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.00),
    rgba(0,0,0,0.22) 65%,
    rgba(0,0,0,0.52)
  );
  pointer-events: none;
}

/* Colonne texte: scroll interne */
.steps-lightbox-body{
  padding: 18px 18px 20px;
  height: 100%;
  min-height: 0;

  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.steps-lightbox-kicker{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.steps-lightbox-chip{
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ln-gold, #e6d69e);
  background: rgba(0,0,0,0.34);
  border: 1px solid rgba(230,214,158,0.28);
}

.steps-lightbox-count{
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.70);
  letter-spacing: 0.04em;
}

.steps-lightbox-title{
  margin: 0 0 10px;
  font-family: "Playfair Display", serif;
  font-weight: 400;
  font-size: 1.65rem;
  color: rgba(255,255,255,0.96);
}

/* div texte, accepte du HTML (p, ul, etc.) */
.steps-lightbox-text{
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 1.02rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.92);
}

.steps-lightbox-text p{
  margin: 0 0 12px;
}

.steps-lightbox-text p:last-child{
  margin-bottom: 0;
}

.steps-lightbox-hint{
  margin-top: 12px;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.60);
}

/* =========================
   CLOSE (fixé écran, hors panel)
========================= */

.steps-lightbox-close{
  position: fixed;
  top: 16px;
  right: 16px;

  /* au-dessus du header/burger et au-dessus du backdrop */
  z-index: 12030;

  width: 46px;
  height: 46px;
  border-radius: 999px;

  border: 1px solid rgba(230,214,158,0.30);
  background: rgba(0,0,0,0.45);
  color: var(--ln-gold, #e6d69e);

  cursor: pointer;
  display: grid;
  place-items: center;

  font-size: 1.6rem;
  line-height: 1;

  -webkit-tap-highlight-color: transparent;

  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.steps-lightbox-close:hover{
  transform: scale(1.07);
  background: rgba(230,214,158,0.14);
  border-color: rgba(230,214,158,0.65);
  color: rgba(230,214,158,1);
}

.steps-lightbox-close:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(230,214,158,0.22);
}

/* ============================================================
   FLÈCHES DE NAVIGATION — LUNANOVA (HORS PANEL)
   Perf: pas de blur, une seule shadow
============================================================ */

.ln-nav-arrow{
  position: fixed;
  top: 50%;
  transform: translateY(-50%);

  /* juste sous le close mais au-dessus du panel */
  z-index: 12020;

  width: 56px;
  height: 56px;
  border-radius: 50%;

  cursor: pointer;
  pointer-events: auto;

  background: rgba(18, 10, 0, 0.78);
  border: 1.5px solid rgba(230,214,158,0.42);
  color: #f5e6c4;

  display: flex;
  justify-content: center;
  align-items: center;

  transition: transform .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease, color .22s ease;
}

.ln-nav-arrow:hover{
  transform: translateY(-50%) scale(1.08);
  background: rgba(230,214,158,0.16);
  border-color: #e6d69e;
  color: #e6d69e;
  box-shadow: 0 8px 22px rgba(230,214,158,0.28);
}

.ln-nav-arrow svg{
  width: 28px;
  height: 28px;
  pointer-events: none;
}

/* Placement hors panel via calcul autour du stage centré */
.ln-prev{
  left: calc(50% - (min(980px, 94vw) / 2) - 72px);
}

.ln-next{
  right: calc(50% - (min(980px, 94vw) / 2) - 72px);
}

/* Sécurité: si la fenêtre est étroite, on évite de “sortir” trop */
@supports (left: max(0px, 1px)){
  .ln-prev{
    left: max(12px, calc(50% - (min(980px, 94vw) / 2) - 72px));
  }
  .ln-next{
    right: max(12px, calc(50% - (min(980px, 94vw) / 2) - 72px));
  }
}

/* ============================================================
   DOTS — Composant générique (hors panel)
============================================================ */

.ln-dots{
  pointer-events: auto;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;

  padding: 0 0 2px;
  user-select: none;
}

.ln-dot{
  width: 11px;
  height: 11px;
  border-radius: 50%;
  cursor: pointer;

  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(230, 214, 158, 0.45);

  transition: background .18s ease, transform .18s ease;
  flex-shrink: 0;

  -webkit-tap-highlight-color: transparent;
}

.ln-dot:hover{
  background: rgba(230, 214, 158, 0.45);
}

.ln-dot:active{
  transform: scale(1.1);
}

.ln-dot.is-active{
  background: var(--ln-gold, #e6d69e);
  transform: scale(1.35);
}

/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 820px){
  .steps-lightbox-layout{
    grid-template-columns: 1fr;
  }

  .steps-lightbox-stage{
    width: 96vw;
    height: min(96vh, calc(100vh - 18px));
    gap: 8px;
  }

  .steps-lightbox-panel{
    border-radius: 18px;
  }

  /* Sur mobile: image zone + texte scroll */
  .steps-lightbox-media{
    height: 42vh;
  }

  .steps-lightbox-close{
    top: 14px;
    right: 14px;
  }

  /* Flèches masquées sur mobile (swipe + dots) */
  .ln-nav-arrow{
    display: none;
  }
}