@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400;500&family=DM+Sans:wght@400;500;700&display=swap");

:root {
  --base-100: #fff;
  --base-200: #999;
  --base-300: #343434;
  --base-400: #212121;
  --base-500: #000;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans";
  background: var(--base-100);
  overflow: hidden;
}

p {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.nav {
  position: absolute;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem;
  z-index: 2;
}

.nav p {
  text-transform: uppercase;
  font-family: "DM Mono";
}

.product-name {
  color: var(--base-200);
}

.gallery {
  position: absolute;
  width: 100%;
  height: 100svh;
  overflow: hidden;
}

.products {
  position: absolute;
  width: 450px;
  height: 450px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.products li {
  position: absolute;
  width: 450px;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.products li img {
  width: 400px;
  height: 400px;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.products li img:hover {
  transform: scale(1.05);
}

.controller {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 11rem;
  height: 11rem;
  user-select: none;
  cursor: pointer;
  z-index: 10;
}

.controller-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5rem;
  height: 5rem;
  background: var(--base-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: circle(40% at 50% 50%);
  will-change: clip-path;
  cursor: pointer;
  z-index: 1;
}

.close-icon {
  position: relative;
  width: 20px;
  height: 20px;
}

.close-icon span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--base-100);
  transform-origin: center;
}

.close-icon span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.close-icon span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.controller-outer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--base-400);
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  will-change: clip-path;
  z-index: -1;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.125rem;
  color: var(--base-100);
  will-change: opacity;
  cursor: pointer;
}

.nav-btn.prev {
  left: 1rem;
}

.nav-btn.next {
  right: 1rem;
}

.nav-btn.disabled {
  opacity: 0.25;
  pointer-events: none;
}

.product-banner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0;
  will-change: opacity;
}

.product-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.25);
}

.product-preview {
  position: absolute;
  top: 47.5%;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 30%;
  height: 75%;
  padding: 2rem 1rem;
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  z-index: 2;
}

.product-preview-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-preview-tag {
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  background-color: var(--base-500);
  color: var(--base-100);
}

.product-preview-tag p {
  text-transform: uppercase;
  font-family: "DM Mono";
  font-size: 0.75rem;
}

.product-preview-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.25rem;
  background-color: var(--base-100);
  overflow: hidden;
}

.product-preview-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-url .btn {
  background-color: var(--base-500);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 0.25rem;
}

.product-url .btn a {
  display: block;
  padding: 1rem 0;
  text-decoration: none;
  color: var(--base-100);
}

/* ===== MENU COLLECTIONS ===== */
.collections-menu {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2rem;
  z-index: 10;
}

.collections-menu button {
  background: none;
  border: none;
  color: var(--base-500);
  font-family: "DM Mono";
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  animation: floatText 4s ease-in-out infinite;
}

.collections-menu button:nth-child(1) { animation-delay: 0s; }
.collections-menu button:nth-child(2) { animation-delay: 0.8s; }
.collections-menu button:nth-child(3) { animation-delay: 1.6s; }

@keyframes floatText {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}


/* ====== RESPONSIVE MENU COLLECTIONS (version au-dessus de l'image) ====== */

@media (max-width: 900px) {
  .collections-menu {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    z-index: 1000;
  }

  .collections-menu button {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-family: "DM Mono";
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0.6rem 0.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
  }

  .collections-menu button:hover,
  .collections-menu button.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
  }

  /* Supprime les animations de flottement pour plus de lisibilité */
  .collections-menu button {
    animation: none;
  }

  /* Ajuste la taille globale du container */
  .container {
    padding-top: 4.5rem;
  }
}

/* Pour très petits écrans */
@media (max-width: 450px) {
  .collections-menu {
    width: 92%;
    gap: 0.4rem;
  }

  .collections-menu button {
    font-size: 0.68rem;
    padding: 0.5rem 0.2rem;
  }
}
/* ====== RESPONSIVE CONTROLLER (fix hauteur / taille mobile) ====== */
@media (max-width: 900px) {
  .controller {
    width: 6.8rem;
    height: 6.8rem;
    bottom: 4.5rem; /* 🔼 remonte le bouton de 4.5rem */
  }

  .controller-inner {
    width: 3rem;
    height: 3rem;
  }

  .controller-outer {
    border-radius: 50%;
  }

  .close-icon {
    width: 14px;
    height: 14px;
  }

  .close-icon span {
    height: 1.5px;
  }

  .nav-btn {
    font-size: 0.85rem;
  }

  .nav-btn.prev {
    left: 0.6rem;
  }

  .nav-btn.next {
    right: 0.6rem;
  }
}

/* ====== Ultra petits écrans (moins de 450px) ====== */
@media (max-width: 450px) {
  .controller {
    width: 5.8rem;
    height: 5.8rem;
    bottom: 8rem; /* 🔼 remonte encore plus */
  }

  .controller-inner {
    width: 2.6rem;
    height: 2.6rem;
  }

  .nav-btn {
    font-size: 0.75rem;
  }
}

