/* ========================================
   GALERIE SLIDER — Into the Winds
   À inclure dans ton main.css ou via
   <link rel="stylesheet" href="gallery-slider.css">
   ======================================== */

.itw-gallery {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 2rem auto;
  background: #000;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: pointer;
}

/* Piste des slides */
.itw-gallery__track {
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Chaque slide */
.itw-gallery__slide {
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}

.itw-gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s ease;
}

/* Léger zoom au survol (optionnel, désactiver si trop chargé) */
.itw-gallery:hover .itw-gallery__slide img {
  transform: scale(1.015);
}

/* Boutons latéraux */
.itw-gallery__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: transparent;
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  padding: 0;
  font-size: 0;
}

.itw-gallery__btn:hover,
.itw-gallery__btn:focus-visible {
  background: transparent;
}

.itw-gallery__btn svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.itw-gallery__btn--prev { left: 12px; }
.itw-gallery__btn--next { right: 12px; }

/* Indicateurs (points) */
.itw-gallery__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}

.itw-gallery__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.itw-gallery__dot--active {
  background: #fff;
  transform: scale(1.3);
}

/* Compteur discret en haut à droite */
.itw-gallery__counter {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.75);
  font-family: inherit;
  pointer-events: none;
}

/* Crédit photo */
.itw-gallery__credit {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #888;
  margin-top: 6px;
}

/* ===== LIGHTBOX ===== */
.itw-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

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

.itw-lightbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.itw-lightbox__track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.itw-lightbox__slide {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 72px;
  box-sizing: border-box;
}

.itw-lightbox__slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Boutons lightbox */
.itw-lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: transparent;
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  padding: 0;
}

.itw-lightbox__btn:hover,
.itw-lightbox__btn:focus-visible {
  background: transparent;
}

.itw-lightbox__btn svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.itw-lightbox__btn--prev { left: 16px; }
.itw-lightbox__btn--next { right: 16px; }

/* Fermer */
.itw-lightbox__close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 20;
  background: transparent;
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.itw-lightbox__close:hover,
.itw-lightbox__close:focus-visible {
  background: transparent;
}

.itw-lightbox__close svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

/* Compteur lightbox */
.itw-lightbox__counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  pointer-events: none;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 600px) {
  .itw-gallery__btn { width: 36px; height: 36px; }
  .itw-gallery__btn svg { width: 16px; height: 16px; }
  .itw-lightbox__slide { padding: 56px 44px 40px; }
  .itw-lightbox__btn { width: 38px; height: 38px; }
  .itw-lightbox__btn--prev { left: 6px; }
  .itw-lightbox__btn--next { right: 6px; }
}
