/* [SUNCODE-PAGE-CAROUSEL-01 2026-09-29] Carrousel VISUEL de la page éditoriale /suncode/.
   Portage du carrousel validé de /precommande/ : mêmes 6 visuels (fichiers /precommande/img/ RÉUTILISÉS,
   aucune copie), mêmes comportements, AUCUNE logique commerciale. Classes propres .sc-gallery* / .sc-lightbox* :
   aucune règle de la home (orkyva-home.css, partagée) ni de /precommande/ n'est touchée.
   RATIO : chaque visuel est CONTENU (object-fit: contain), jamais rogné ni étiré ; la scène suit le format 3:4
   des visuels 1-3 (les 4-6, en 4:5, gardent une fine marge). Aucun filtre ni voile sur les visuels. */
.sc-gallery { display: block; width: 100%; max-width: 440px; margin: 1.2rem auto 1.6rem; }
.sc-gallery__stage {
  position: relative; width: 100%; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: var(--radius, 16px); border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: var(--bg-card, #10161A);
}
.sc-gallery__track {
  position: absolute; inset: 0; display: flex;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sc-gallery__track::-webkit-scrollbar { display: none; }
.sc-gallery__track:focus-visible { outline: 3px solid var(--accent, #3DDC84); outline-offset: -3px; }
.sc-gallery__slide {
  flex: 0 0 100%; width: 100%; height: 100%; margin: 0;
  scroll-snap-align: center; scroll-snap-stop: always;
}
.sc-gallery__slide picture { display: block; width: 100%; height: 100%; }
.sc-gallery__img {
  display: block; width: 100%; height: 100%; max-width: none;
  object-fit: contain; object-position: center; cursor: zoom-in;
}
.sc-gallery__nav,
.sc-gallery__zoom {
  position: absolute; z-index: 3; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px;
  background: rgba(10, 14, 12, 0.62); color: var(--ink, #F1F5F2); cursor: pointer;
  transition: background-color 0.2s var(--ease, ease);
}
.sc-gallery__nav { top: 50%; transform: translateY(-50%); }
.sc-gallery__nav--prev { left: 10px; }
.sc-gallery__nav--next { right: 10px; }
.sc-gallery__zoom { top: 10px; right: 10px; }
.sc-gallery__nav:hover, .sc-gallery__zoom:hover { background: rgba(10, 14, 12, 0.84); }
.sc-gallery__nav:focus-visible,
.sc-gallery__zoom:focus-visible { outline: 3px solid var(--accent, #3DDC84); outline-offset: 2px; }
.sc-gallery__nav svg,
.sc-gallery__zoom svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
/* compteur « n / 6 » : repère visuel ; l'annonce vocale passe par #scg-status */
.sc-gallery__counter {
  position: absolute; left: 10px; bottom: 10px; z-index: 3; margin: 0;
  padding: 2px 10px; border-radius: 999px; pointer-events: none;
  background: rgba(10, 14, 12, 0.72); color: var(--ink, #F1F5F2);
  font-family: var(--ff-heading, system-ui); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.04em; line-height: 1.7; font-variant-numeric: tabular-nums;
}
.sc-gallery__sr {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
/* Miniatures : 6 colonnes égales, jamais de retour à la ligne ni de défilement (aucun débordement).
   touch-action au défaut utile : le doigt parti d'une miniature fait défiler la page verticalement. */
.sc-gallery__thumbs {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px;
  margin: 10px 0 0; padding: 2px; touch-action: manipulation;
}
.sc-gallery__thumb {
  display: block; width: 100%; padding: 0; margin: 0; overflow: hidden; line-height: 0;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08)); border-radius: 10px;
  background: var(--bg-card, #10161A); cursor: pointer; opacity: 0.62;
  transition: opacity 0.2s var(--ease, ease), border-color 0.2s var(--ease, ease);
}
.sc-gallery__thumb picture { display: block; }
.sc-gallery__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: contain; }
.sc-gallery__thumb:hover { opacity: 0.9; }
.sc-gallery__thumb[aria-pressed="true"] {
  opacity: 1; border-color: var(--accent, #3DDC84); box-shadow: 0 0 0 2px rgba(61, 220, 132, 0.28);
}
.sc-gallery__thumb:focus-visible { outline: 3px solid var(--accent, #3DDC84); outline-offset: 2px; }

/* Lightbox : visuel COURANT en pleine taille ; fermeture par bouton, Échap ou clic hors image ; focus piégé. */
.sc-lightbox {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 64px 16px 24px; background: rgba(0, 0, 0, 0.92);
}
.sc-lightbox[hidden] { display: none; }
.sc-lightbox__img {
  display: block; width: auto; height: auto; max-width: min(92vw, 900px); max-height: calc(100vh - 96px);
  object-fit: contain; border-radius: 12px;
}
.sc-lightbox__close {
  position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px;
  background: rgba(10, 14, 12, 0.7); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.sc-lightbox__close:focus-visible { outline: 3px solid var(--accent, #3DDC84); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .sc-gallery__track { scroll-behavior: auto; }
  .sc-gallery__nav, .sc-gallery__zoom, .sc-gallery__thumb { transition: none; }
}
