/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
  overflow-x: clip;
  width: 100%;
  touch-action: manipulation;
}

* {
  scrollbar-width: none; /* Firefox */
}

*::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

body {
    /* font-family: 'Montserrat', sans-serif; */
    font-family: 'Jost', sans-serif;
    background-color: #e6e5e5;
    color: rgba(0, 0, 0, 0.85);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

.logo-glow {
    position: fixed;
    top: -400px;                    /* ← ajuste cette valeur pour placer le halo */
    left: 50%;
    transform: translateX(-50%);
    padding-bottom: 500px;
    margin-bottom: -150px;

    width: 100vw;
    height: 500px;
    background: radial-gradient(
        ellipse at 50% 100%,       /* centre en bas → effet demi-cercle supérieur */
        rgba(146, 70, 73, 0.48) 5%,
        rgba(205, 30, 30, 0.116) 35%,
        transparent 65%
    );
    filter: blur(100px);        /* plus tu augmentes, plus le halo est large et doux */
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
    overflow: visible;
}

ul {
  list-style: none;
  padding: 0;
}

a {
  text-decoration: none;
  color: rgba(0, 0, 0, 0.9)!important;
}

.container-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 5px;                 /* espace entre Histoire et Boutique */
    list-style: none;
    margin: 10px;
    padding: 0;
}

.hidden {
  display: none!important;
}

.nav-list li a {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: color 0.2s ease;
}

.nav-list li a:hover {
    color: #353535 !important;
}

.nav-list li a.active {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 200;
  transition: transform 0.35s ease, backdrop-filter 0.4s ease, background 0.4s ease;
}

.header--scrolled {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(230, 229, 229, 0.55);
}

.header--hidden {
  transform: translateY(-100%);
}

.logo {
    height: 85px;
    width: auto;
    flex-shrink: 0;
    margin: 0 20px;        /* espace à gauche et à droite du logo */
}

.cart-icon {
    height: 50px;
    width: auto;
    margin-right: 10px;
    flex-shrink: 0;
    cursor: pointer;
    pointer-events: none;
    -webkit-touch-callout: none;
    user-select: none;
}
.cart-icon:hover {
    transform: scale(1.1);
}


/* Main Styling */


.main {
  height: auto;
  min-height: 80vh;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.main.page-exit {
  opacity: 0;
}

.hero {
  width: 75%;
  margin: auto;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: flex-start;
  align-content: flex-start;
  row-gap: 5rem;
  padding: 2rem 0;
}

.article {
  animation: fade-up 0.6s ease both;
  align-items: center;
  position: relative;
  width: clamp(20rem, 35vw, 40rem);
  height: auto;
  padding: 0;
  margin: 0;
  background: none;
  /* z-index: -1; */
  text-align: center;           /* Centre le texte */
  display: flex;
  flex-direction: column;
  align-items: center;          /* Centre horizontalement tout le contenu */
  /* backdrop-filter: blur(200px); */
  overflow:visible;
}

.article::before {
  content: '';
  position: absolute;
  width: clamp(400px, 40vw, 700px);
  height: clamp(400px, 40vw, 700px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.2) 50%, transparent 72%);
  z-index: -1;
  pointer-events: none;
}

.article:nth-child(1) { animation-delay: 0s; }
.article:nth-child(2) { animation-delay: 0.15s; }
.article:nth-child(3) { animation-delay: 0.30s; }
.article:nth-child(4) { animation-delay: 0.45s; }

.swatches {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
  pointer-events: auto;
}

.swatch {
  width: clamp(34px, 3vw, 50px);
  height: clamp(34px, 3vw, 50px);
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swatch:hover { transform: scale(1.1); }

.swatch.active {
  border-color: #111110;
  scale: 1.05;
}
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  width: 36px;
  height: 52px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s, background 0.25s;
  z-index: 10;
  color: rgba(0, 0, 0, 0.75);
}

.arrow svg {
  width: 18px;
  height: 18px;
}

.arrow:hover {
  background: rgba(255, 255, 255, 0.45);
  transform: translateY(-50%) scale(1.06);
}

.article-image--alt {
  width: 400px;
}

.article-slider {
  position: relative;
  width: 100%;
}

.article-slider:hover .arrow { opacity: 1; }
.arrow-left { left: 0.6rem; }
.arrow-right { right: 0.6rem; }

.article-dots-menu {
  display: flex;
  gap: 6px;
  cursor: pointer;
  justify-content: center;
}

.article-dots-menu span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: solid 2px #333;
}

.article-dot--filled {
  background-color: #333;
}


.article-title {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.75em;
  letter-spacing: 0.01em;
}

.article-title--link {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.article-title--link:hover {
  opacity: 0.6;
}

.article-color {
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.38);
  margin-top: 0.2em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-price {
  font-size: 1.2rem;
  font-weight: 300;
  margin-top: 0.5em;
  letter-spacing: 0.03em;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.article-image-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.article-image-wrap.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  border: 2.5px solid rgba(0,0,0,0.12);
  border-top-color: rgba(0,0,0,0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: spin 0.75s linear infinite;
  z-index: 5;
}

.article-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

img[data-src] {
  color: transparent;
}

/* Footer Styling */
.footer {
  min-height: 10vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem 2rem;
  gap: 0.5rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.5) !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: rgba(0, 0, 0, 0.85) !important;
}

.footer-divider {
  width: 1px;
  height: 20px;
  background: rgba(0, 0, 0, 0.25);
}

.footer-instagram {
  display: flex;
  position: relative;
  color: rgba(0, 0, 0, 0.5);
  transition: transform 0.25s ease;
}

.footer-instagram:hover {
  transform: scale(1.025);
}

.footer-ig-outline {
  width: 26px;
  height: 26px;
  transition: opacity 0.25s ease;
}

.footer-ig-color {
  position: absolute;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.footer-instagram:hover .footer-ig-outline {
  opacity: 0;
}

.footer-instagram:hover .footer-ig-color {
  opacity: 1;
}



#embers {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2; /* derrière tout le contenu */
}

/* ── Responsive intermédiaire: petits laptops + iPad Pro paysage (≤1400px) ── */
@media (min-width: 1025px) and (max-width: 1400px) {
  .nav-list li a {
    font-size: 1.5rem;
  }

  .hero {
    width: 90%;
  }

  .article {
    width: clamp(18rem, 30vw, 32rem);
    height: auto;
  }

  /* Halo réduit pour éviter le chevauchement */
  .article::before {
    width: clamp(350px, 34vw, 550px);
    height: clamp(350px, 34vw, 550px);
  }

  body::before {
    opacity: 0.32;
  }
}

@media (min-width: 1025px) and (max-width: 1200px) {
  body::before {
    opacity: 0.2;
  }
}

/* ── Responsive intermédiaire: tablettes (≤1024px) ── */
@media (min-width: 1025px) and (max-width: 1024px) {
  .nav-list li a {
    font-size: 1.2rem;
  }

  .hero {
    width: 95%;
    gap: 1.5rem;
    padding: 1.5rem 0.75rem 1rem;
  }

  .article {
    width: clamp(14rem, 26vw, 20rem);
    height: auto;
  }

  .article::before {
    display: none;
  }

  body::before {
    opacity: 0.1;
  }
}

/* ── Responsive mobile ────────────────────────────────── */
@media (max-width: 1024px) {

  /* Header */
  .logo {
    height: 55px;
    margin: 0 10px;
  }

  .cart-icon {
    height: 36px;
    margin-right: 0;
  }

  .header .container-flex {
    padding-right: 12px;
  }

  .header .nav-list {
    flex: 1;
  }

  #cart-btn {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  .nav-list {
    margin: 6px;
    gap: 2px;
  }

  .nav-list li a {
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.35) !important;
  }

  .nav-list li a.active {
    color: #000 !important;
    text-decoration: none;
  }


  /* Suppression des layers GPU fixes sur mobile */
  body::before,
  .logo-glow {
    display: none;
  }

  #embers {
    display: none;
  }

  /* Hero — 1 article par ligne */
  .hero {
    width: 100%;
    flex-direction: column;
    align-items: center;
    align-content: center;
    justify-content: flex-start;
    gap: 2rem;
    padding: 2rem 0.75rem 1rem;
  }

  .article {
    width: 85%;
    height: auto;
    margin: 0 auto;
  }

  .article::before {
    display: none;
  }

  /* Swatches — sortis de l'image, en ligne horizontale */
  .swatches {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-top: 0.6rem;
    gap: 8px;
  }

  .swatch {
    width: 32px;
    height: 32px;
  }

  .swatch.active {
    border-width: 1px;
  }

  /* Dots plus petits et blancs dans le cadre */
  .article-dots-menu span {
    width: 6px;
    height: 6px;
    border-color: rgba(255, 255, 255, 0.75);
  }

  /* Textes sous l'image */
  .article-title {
    font-size: 0.9rem;
  }

  .article-price {
    font-size: 1rem;
  }

  /* Slider = encadré carte */
  .article-slider {
    display: block;
    position: relative;
    padding-bottom: 1.8rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
  }

  .article-slider .article-image-wrap {
    flex: unset;
    min-width: unset;
    width: 100%;
    border-radius: 0;
  }

  /* Flèches rondes blanches — zone de clic 44px, visuel 28px */
  .article-slider .arrow {
    isolation: isolate;
    position: absolute;
    top: calc(50% - 0.9rem);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0.65;
    color: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .article-slider .arrow::before {
    content: '';
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.88);
    z-index: -1;
  }

  .arrow-left { left: -6px; }
  .arrow-right { right: -6px; }

  .article-slider:hover .arrow {
    opacity: 0.65;
  }

  /* Dots en bas du cadre, en blanc */
  .article-slider .article-dots-menu {
    position: absolute;
    bottom: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    cursor: default;
  }

  .article-dot--filled {
    background-color: rgba(255, 255, 255, 0.75);
  }
}