@import url("https://fonts.googleapis.com/css?family=Montserrat:300,400,700,900");
 
*::-webkit-scrollbar {
  display: none !important;
}
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
 
html, body, * {
  box-sizing: border-box;
}
 
 
body {
  margin: 0;
  padding: 0;
  background-color: #000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: "Montserrat", sans-serif;
  color: #fff;
}

body.collection-gallery-open {
  overflow: hidden;
}

body.collection-gallery-open .navbar,
body.collection-gallery-open .footer {
  opacity: 0;
  pointer-events: none;
}
 
header {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  align-items: center;
  z-index: 100;
}
 
.slider {
  position: relative;
  width: 100vw;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  cursor: default;
  overflow: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.slider.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
 
 
.slider.cursor-right {
  cursor: url("https://res.cloudinary.com/dcqkn4bco/image/upload/v1744292332/image_gjo7vk.png"), auto;
}
.slider.cursor-left {
  cursor: url("https://res.cloudinary.com/dcqkn4bco/image/upload/v1744292363/image_1_szozrj.png"), auto;
}
 
.slider .background {
  position: absolute; top:0; left:0; width:100%; height:100%;
  z-index: -1; overflow: hidden; background: #000;
}
.slider .background-item {
  position: absolute;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.5s, opacity 0.5s;
}
.slider .background-item.active {
  opacity: 1;
  transform: translateX(0);
}
 
.slider .list {
  display: flex;
  transition: transform 0.5s;
  width: 100%;
  overflow: visible;
}
.slider .list .item {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.slider .list .item picture {
  display: block;
  width: 100%;
  height: 100%;
}

.slider .list .item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
}
.slider .list .item .content {
  position: absolute;
  left: 10%;
  top: 20%;
  width: 500px;
  max-width: 80%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 10px;
  border-radius: 5px;
  z-index: 1;
}
.slider .list .item.active {
  opacity: 1;
  z-index: 10;
}
 
.thumbnail {
  position: absolute;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  z-index: 10;
  max-width: calc(100vw - 32px);
  overflow-x: auto;
  padding: 5px 6px;
  background: rgba(0,0,0,0.5);
  overscroll-behavior-x: contain;
  scrollbar-color: rgba(255,255,255,0.45) transparent;
  scrollbar-width: thin;
}
.thumbnail::-webkit-scrollbar {
  display: block !important;
  height: 8px;
}
.thumbnail::-webkit-scrollbar-track {
  background: transparent;
}
.thumbnail::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.35);
  border-radius: 999px;
}
.thumbnail .item {
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s, transform 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 13px; 
}
.thumbnail .item:last-child {
  margin-right: 0;
}
.thumbnail .item img {
  height: 80px;
  aspect-ratio: 4/3;
  width: auto;
  object-fit: cover;
  border: none;
  box-shadow: none;
  background: none;
  box-sizing: border-box;
  transition: opacity 0.3s, transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.thumbnail .item.active {
  opacity: 1;
}
.thumbnail .item.active img {
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #fff;
  transform: scale(1.08);
}

.scroll-cue {
  position: absolute;
  right: clamp(18px, 3vw, 42px);
  bottom: clamp(140px, 21vh, 210px);
  z-index: 11;
  width: 34px;
  height: 62px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.56);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.26);
  opacity: 0.78;
  backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.scroll-cue::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  width: 4px;
  height: 9px;
  background: rgba(255,255,255,0.92);
  border-radius: 999px;
  transform: translateX(-50%);
  animation: scrollCue 1.8s ease-in-out infinite;
}

.scroll-cue::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -17px;
  width: 9px;
  height: 9px;
  border-right: 2px solid rgba(255,255,255,0.82);
  border-bottom: 2px solid rgba(255,255,255,0.82);
  filter: drop-shadow(0 2px 5px rgba(0,0,0,0.55));
  transform: translateX(-50%) rotate(45deg);
}

.scroll-cue:hover {
  background: rgba(0,0,0,0.38);
  opacity: 1;
  border-color: rgba(255,255,255,0.82);
}

@keyframes scrollCue {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 22px);
  }
}
 
.mosaic {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  background: #000;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.mosaic.visible {
  opacity: 1;
  visibility: visible;
}
.mosaic.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.return-carousel-cue {
  position: fixed;
  top: clamp(18px, 4vh, 36px);
  left: 50%;
  z-index: 130;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(10px);
}

.return-carousel-cue span {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  animation: returnCarouselCue 1.1s ease-in-out infinite;
}

.return-carousel-cue span::before,
.return-carousel-cue span::after {
  content: "";
  position: absolute;
  left: 3px;
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid rgba(255, 255, 255, 0.86);
  border-left: 2px solid rgba(255, 255, 255, 0.86);
  transform: rotate(45deg);
}

.return-carousel-cue span::before {
  top: 2px;
}

.return-carousel-cue span::after {
  top: 9px;
}

.return-carousel-cue.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes returnCarouselCue {
  0%, 100% {
    transform: translateY(2px);
  }
  50% {
    transform: translateY(-4px);
  }
}
#gallery {
  width: 100%;
}
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 18px;
  width: 100%;
  max-width: 1600px;
  min-height: 100vh;
  min-height: 100svh;
  margin: auto;
  box-sizing: border-box;
}
.mosaic-grid {
  isolation: isolate;
  position: relative;
}
/* Overlay sombre sur toute la grille au survol d'une photo — utilise un pseudo-élément
   pour éviter le repaint massif du box-shadow 100vw */
.mosaic-grid:has(.photo:hover)::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at var(--hover-x, 50%) var(--hover-y, 50%), rgba(255,255,255,0.08), transparent 22rem),
    rgba(0,0,0,0.68);
  z-index: 100;
  pointer-events: none;
  transition: opacity 0.28s ease, background 0.28s ease;
}
.photo {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  background-color: #fff;
  border: 10px solid #fff;
  position: relative;
  box-shadow: 0 6px 24px rgba(0,0,0,0.24);
  transform: translateZ(0);
  transition: transform 0.32s ease, box-shadow 0.32s ease, filter 0.32s ease;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  aspect-ratio: 16/9;
  transition: transform 0.42s ease, filter 0.32s ease;
  will-change: transform;
}
.mosaic-grid .photo:hover {
  z-index: 101;
  box-shadow: 0 22px 70px rgba(0,0,0,0.88);
  transform: translateY(-8px) scale(1.035);
}
.mosaic-grid .photo:hover img {
  filter: contrast(1.05) saturate(1.04);
  transform: scale(1.08);
}
 
@media (max-width: 1400px) {
  .slider { height: 80vh; }
  .mosaic-grid { grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); }
  .thumbnail .item img { height: 70px; }
}
@media (max-width: 900px) {
  header { max-width: 100vw; grid-template-columns: 40px 1fr 40px; }
  .slider {
    height: 100vh;
    height: 100svh;
    min-height: 400px;
  }
  .thumbnail {
    bottom: 34px;
    max-width: calc(100vw - 72px);
    padding: 4px;
  }
  .thumbnail .item img { height: 60px; }
  .scroll-cue {
    right: 18px;
    bottom: clamp(116px, 20svh, 156px);
    width: 31px;
    height: 56px;
  }
  .mosaic-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; padding: 8px; }
  .photo { border-width: 2px; }
  .slider .background {
    display: none !important;
  }
  .slider .list {
    width: 100%;
    overflow: visible;
  }
  .slider .list .item {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}
@media (max-width: 600px) {
  .slider {
    height: 100vh;
    height: 100svh;
    min-height: 320px;
  }
  .thumbnail {
    bottom: 28px;
    max-width: calc(100vw - 64px);
  }
  .thumbnail .item img { height: 40px; min-width: 28px; }
  .scroll-cue {
    right: 14px;
    bottom: 94px;
    width: 28px;
    height: 50px;
  }
  .mosaic-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px; padding: 8px; }
  .photo { border-width: 2px; }
}
 
@media (min-width: 1200px) {
  .slider {
    height: 100vh !important;
    height: 100svh !important;
    min-height: 100vh !important;
    min-height: 100svh !important;
    max-height: 100vh !important;
    max-height: 100svh !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
  }
  .mosaic-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 32px;
    max-width: 2000px;
  }
  .photo { border-width: 7px; }
}
 
.lightbox {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  height: 100svh;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.lightbox.hidden {
  display: none;
}
.lightbox-content {
  position: relative;
  cursor: default;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.lightbox-content img {
  max-width: min(86vw, 1500px);
  max-height: 84svh;
  display: block;
  margin: auto;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  color: #fff;
  background: none;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 5px;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-nav.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-nav.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.mosaic-grid .photo img,
.lightbox-close,
.lightbox-nav {
  cursor: pointer;
}

@media (max-width: 700px) {
  .lightbox-content img {
    max-width: 92vw;
    max-height: 78svh;
  }

  .lightbox-close,
  .lightbox-nav {
    font-size: 2rem;
  }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .lightbox-nav.lightbox-prev {
    left: 8px;
  }

  .lightbox-nav.lightbox-next {
    right: 8px;
  }
}

/* Final slider guard: stable carousel track, with controlled cropping. */
.slider .list {
  position: relative !important;
  z-index: 1;
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
}

.slider .list .item,
.slider .list .item picture,
.slider .list .item img {
  width: 100% !important;
  height: 100% !important;
}

.slider .list .item {
  flex: 0 0 100% !important;
}

.slider .list .item img {
  display: block !important;
  object-fit: cover !important;
  object-position: center center !important;
}

.slider .background {
  display: none !important;
}

.thumbnail {
  bottom: clamp(54px, 8vh, 76px) !important;
}

@media (max-width: 700px) {
  .slider {
    height: 100svh !important;
    min-height: 100svh !important;
    padding:
      calc(env(safe-area-inset-top, 0px) + 54px)
      10px
      calc(env(safe-area-inset-bottom, 0px) + 124px) !important;
    background: #000 !important;
    align-items: center !important;
  }

  .slider::before,
  .slider::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 8;
    width: 10px;
    background: #000;
    pointer-events: none;
  }

  .slider::before {
    left: 0;
  }

  .slider::after {
    right: 0;
  }

  .slider .list {
    position: relative !important;
    height: 100% !important;
    overflow: visible !important;
    will-change: transform;
    transform: translate3d(0, 0, 0);
  }

  .slider .list .item,
  .slider .list .item picture {
    height: 100% !important;
  }

  .slider .list .item {
    position: absolute !important;
    inset: 0;
    flex: none !important;
    min-width: 0 !important;
    max-width: none !important;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: opacity 0.26s ease, visibility 0.26s ease;
  }

  .slider .list .item.active {
    opacity: 1;
    visibility: visible;
  }

  .slider .list .item::before {
    content: "";
    position: absolute;
    inset: -26px;
    z-index: 0;
    background-image: var(--slide-bg);
    background-size: cover;
    background-position: center;
    filter: blur(22px);
    opacity: 0.32;
    transform: scale(1.05);
  }

  .slider .list .item picture {
    position: relative;
    z-index: 1;
  }

  .slider .list .item img {
    object-fit: contain !important;
    object-position: center center !important;
    background: transparent !important;
  }

  .thumbnail {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 58px) !important;
    transform: none !important;
    max-width: none !important;
    width: auto !important;
    padding: 5px !important;
    background: rgba(0, 0, 0, 0.62) !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0;
    scroll-snap-type: x proximity;
  }

  .thumbnail .item {
    margin-right: 8px;
    scroll-snap-align: center;
  }

  .thumbnail .item img {
    width: 58px;
    height: 58px;
    aspect-ratio: 1;
    object-fit: cover;
  }

  .thumbnail .item.active img {
    border-width: 2px;
    box-shadow: 0 0 0 2px #fff;
    transform: none;
  }

  .scroll-cue {
    right: 14px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 138px);
    width: 28px;
    height: 50px;
    background: rgba(0, 0, 0, 0.42);
  }
}
