/* =========================================================
   CHEZ MOI — Design system
   ========================================================= */
:root {
  --cream: #FBF1E3;
  --cream-2: #F5E7D3;
  --paper: #FFF9F1;
  --ink: #23271F;
  --forest: #2C332F;
  --sage-dark: #3F5147;
  --olive: #716A56;
  --terracotta: #D06A4E;
  --safran: #EDB347;
  --lilas: #9C84E6;
  --sauge: #A9B79A;
  --brume: #9DB8CF;

  --bg: var(--cream);
  --bg-alt: var(--cream-2);
  --card: var(--paper);
  --fg: var(--ink);
  --muted: rgba(35, 39, 31, .62);
  --line: rgba(35, 39, 31, .12);
  --line-strong: rgba(35, 39, 31, .22);
  --btn: var(--forest);
  --btn-fg: #FFF9F1;

  --f-logo: "Kalnia", "Times New Roman", serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-sans: "DM Sans", system-ui, -apple-system, sans-serif;

  --r-s: 10px;
  --r-m: 18px;
  --r-l: 28px;
  --shadow-s: 0 1px 2px rgba(44, 51, 47, .06), 0 4px 14px rgba(44, 51, 47, .06);
  --shadow-m: 0 2px 6px rgba(44, 51, 47, .06), 0 18px 40px -12px rgba(44, 51, 47, .18);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --page: 1320px;
  --header-h: 76px;
}

body.night {
  --bg: #1F2421;
  --bg-alt: #262C28;
  --card: #2C332F;
  --fg: #F6EBDC;
  --muted: rgba(246, 235, 220, .62);
  --line: rgba(246, 235, 220, .12);
  --line-strong: rgba(246, 235, 220, .24);
  --btn: #F6EBDC;
  --btn-fg: #1F2421;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .6s var(--ease), color .6s var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input { font: inherit; color: inherit; }
::selection { background: var(--safran); color: var(--ink); }

.container { width: min(100% - 48px, var(--page)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Typo ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: currentColor; }
.display {
  font-family: var(--f-logo);
  font-weight: 500;
  font-variation-settings: "wdth" 100;
  letter-spacing: -.01em;
  line-height: .98;
  margin: 0;
}
.h1 { font-size: clamp(48px, 7.2vw, 108px); }
.h2 { font-size: clamp(38px, 4.6vw, 68px); }
.h3 { font-size: clamp(26px, 2.4vw, 34px); }
.serif-i { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.lead { font-size: clamp(17px, 1.35vw, 19px); color: var(--muted); max-width: 52ch; }

/* ---------- Logo ---------- */
.logo {
  font-family: var(--f-logo);
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  letter-spacing: .01em;
  display: inline-flex; align-items: baseline; gap: .02em;
  white-space: nowrap;
}
.logo span { display: inline-block; transition: transform .5s var(--ease); }
.logo .sp { width: .28em; }
.logo:hover span:nth-child(odd) { transform: translateY(-3px); }
.logo:hover span:nth-child(even) { transform: translateY(2px); }
.c1 { color: var(--terracotta); }
.c2 { color: var(--safran); }
.c3 { color: var(--lilas); }
.c4 { color: var(--sage-dark); }
body.night .c4 { color: var(--sauge); }

/* ---------- Buttons ---------- */
.btn {
  --h: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 28px;
  border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  background: var(--btn); color: var(--btn-fg);
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background-color .4s;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--terracotta);
  transform: translateY(101%); transition: transform .5s var(--ease);
  border-radius: inherit;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(44, 51, 47, .5); }
.btn:hover::after { transform: translateY(0); }
.btn:hover { color: #FFF9F1; }
.btn svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--ghost::after { background: var(--fg); }
.btn--ghost:hover { color: var(--bg); }
.btn--light { background: #FFF9F1; color: var(--ink); }
.btn--block { width: 100%; }
.btn--lg { --h: 62px; font-size: 16px; }

/* ---------- Announcement ---------- */
.announce {
  background: var(--forest); color: #F6EBDC;
  font-size: 13px; letter-spacing: .04em;
  overflow: hidden; white-space: nowrap; height: 38px; display: flex; align-items: center;
}
body.night .announce { background: #141815; }
.announce__track { display: inline-flex; gap: 48px; animation: marquee 75s linear infinite; padding-left: 48px; }
.announce:hover .announce__track { animation-play-state: paused; }
.announce__track span { display: inline-flex; align-items: center; gap: 48px; }
.announce__track span::after { content: "✦"; color: var(--safran); font-size: 10px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .6s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { height: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.nav { display: flex; gap: 30px; font-size: 14.5px; font-weight: 500; }
.nav a { position: relative; padding: 6px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  transition: background-color .3s;
}
.icon-btn:hover { background: var(--line); }
.icon-btn svg { width: 21px; height: 21px; }
.cart-count {
  position: absolute; top: 4px; right: 3px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--terracotta); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
  transform: scale(0); transition: transform .4s var(--ease);
}
.cart-count.has { transform: scale(1); }
.cart-count.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.45); } }
.menu-btn { display: none; }

/* Night switch (signature) */
.night-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: 6px 10px 6px 6px; border-radius: 999px; transition: background-color .3s;
}
.night-toggle:hover { background: var(--line); }
.mini-switch {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line-strong), 0 2px 4px rgba(0,0,0,.06);
  position: relative;
}
.mini-switch::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 11px;
  margin: -9px 0 0 -3px; border-radius: 3px; background: var(--fg);
  transform-origin: 50% 9px; transition: transform .45s var(--ease);
}
body.night .mini-switch::before { transform: rotate(180deg); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  padding: 100px 28px 40px; display: flex; flex-direction: column; gap: 6px;
  transform: translateY(-100%); transition: transform .6s var(--ease);
}
.mobile-menu.open { transform: none; }
.mobile-menu a { font-family: var(--f-logo); font-size: 44px; line-height: 1.2; }
.mobile-menu .close { position: absolute; top: 18px; right: 18px; }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: clamp(80px, 10vw, 150px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 56px; flex-wrap: wrap; }
.section-head .display { margin-top: 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100svh - var(--header-h) - 38px); display: flex; align-items: center; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: 70% center;
  transform: scale(1.06); animation: heroZoom 4.2s var(--ease) forwards;
  transition: opacity 0.85s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.85s;
}
.hero-img--off { opacity: 1; z-index: 1; }
.hero-img--on { opacity: 0; z-index: 2; }

/* Quand c'est allumé : l'image hero_on apparaît (le levier descend vers le bas !) */
body.night .hero-img--off { opacity: 0; }
body.night .hero-img--on { opacity: 1; }

@keyframes heroZoom { to { transform: scale(1); } }
.hero__media::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(90deg, rgba(251, 241, 227, .94) 0%, rgba(251, 241, 227, .72) 34%, rgba(251, 241, 227, 0) 62%);
  transition: background .85s;
}
body.night .hero-img { filter: brightness(.42) saturate(.8) sepia(.2); }
body.night .hero__media::after { background: linear-gradient(90deg, rgba(31, 36, 33, .96) 0%, rgba(31, 36, 33, .7) 40%, rgba(31, 36, 33, .1) 70%); }

/* Zone cliquable invisible directement sur l'interrupteur au mur */
.hero__wall-switch {
  position: absolute;
  z-index: 4;
  top: 36%;
  left: 63.5%;
  width: 140px;
  height: 150px;
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
  outline: none;
}
.hero__wall-switch:focus-visible {
  box-shadow: 0 0 0 3px var(--safran);
}

.hero__glow {
  position: absolute; right: 26%; top: 44%; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 120, .55), rgba(255, 196, 120, 0) 65%);
  opacity: 0; pointer-events: none; transition: opacity 1s; mix-blend-mode: screen;
  z-index: 3;
}
body.night .hero__glow { opacity: 1; }
.hero__content { position: relative; z-index: 5; padding: 80px 0; max-width: 680px; }
.hero__title { margin: 22px 0 26px; }
.hero__title .serif-i { color: var(--terracotta); font-size: 1.04em; }
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero__meta { display: flex; gap: 28px; margin-top: 44px; flex-wrap: wrap; align-items: center; }
.price-tag { display: flex; align-items: baseline; gap: 8px; }
.price-tag small { font-size: 13px; color: var(--muted); }
.price-tag strong { font-family: var(--f-logo); font-size: 36px; font-weight: 500; line-height: 1; }
.rating { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.stars { display: inline-flex; gap: 2px; color: var(--safran); }
.stars svg { width: 16px; height: 16px; }
.avatars { display: flex; }
.avatars i { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--bg); margin-left: -8px; display: block; }
.avatars i:first-child { margin-left: 0; }

.hero__hint {
  position: absolute; z-index: 3; right: 21.5%; top: 63%;
  display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  background: rgba(255, 249, 241, .92); padding: 8px 16px 8px 10px; border-radius: 999px;
  box-shadow: 0 4px 20px rgba(44, 51, 47, 0.15), var(--shadow-s); backdrop-filter: blur(10px);
  animation: float 6.5s ease-in-out infinite;
  cursor: pointer;
  transition: background-color .5s, color .5s, transform .35s var(--ease), box-shadow .4s;
}
.hero__hint:hover { transform: scale(1.04); box-shadow: 0 8px 24px rgba(44, 51, 47, 0.22); }
body.night .hero__hint {
  background: rgba(44, 51, 47, .94);
  color: #FFF9F1;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

/* Plaque interrupteur miniature */
.hint__switch {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--terracotta);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), 0 2px 5px rgba(0,0,0,0.18);
  position: relative;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.hint__switch::before {
  content: ""; position: absolute; inset: -4px;
  border-radius: 10px; border: 1.5px solid var(--terracotta);
  animation: ping 3.8s var(--ease) infinite;
  opacity: .7;
}

/* Levier cylindrique mécanique qui monte et descend */
.hint__lever {
  width: 5px; height: 12px; border-radius: 3px;
  background: #FFF9F1;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35);
  transform-origin: center bottom;
  /* État par défaut (Jour / Éteint) : le levier monte (pointé vers le haut / incliné vers le haut) */
  transform: translateY(-2px) scaleY(1.05);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.45s;
}

/* Quand c'est allumé (mode nuit / lumière allumée) : le levier descend ! */
body.night .hint__lever {
  /* Le levier bascule vers le bas */
  transform: translateY(3px) scaleY(0.95);
  background: var(--safran);
}
body.night .hint__switch {
  background: var(--sage-dark);
}
body.night .hint__switch::before {
  border-color: var(--safran);
}

@keyframes ping { from { opacity: .65; transform: scale(.8); } to { opacity: 0; transform: scale(1.38); } }
@keyframes float { 50% { transform: translateY(-4px); } }

/* ---------- Big marquee ---------- */
.big-marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 26px 0; white-space: nowrap; }
.big-marquee__track { display: inline-flex; align-items: center; gap: 46px; animation: marquee 95s linear infinite; }
.big-marquee:hover .big-marquee__track { animation-play-state: paused; }
.big-marquee__track span { font-family: var(--f-logo); font-size: clamp(36px, 5vw, 72px); line-height: 1; display: inline-flex; align-items: center; gap: 46px; }
.big-marquee__track span::after { content: ""; width: 34px; height: 34px; border-radius: 9px; background: var(--sw, var(--terracotta)); flex: none; box-shadow: inset 0 -3px 0 rgba(0,0,0,.12); }

/* ---------- Product cards ---------- */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pcard {
  background: var(--card); border-radius: var(--r-l); overflow: hidden;
  border: 1px solid var(--line); display: flex; flex-direction: column;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.pcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); }
.pcard__stage {
  aspect-ratio: 5 / 4; position: relative; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 30% 20%, #FFFDF8 0%, var(--cream-2) 100%);
  transition: background .6s;
}
body.night .pcard__stage { background: radial-gradient(120% 90% at 30% 20%, #333B36 0%, #232925 100%); }
.pcard__stage .js-card-svg { width: 100%; height: 100%; display: grid; place-items: center; }
.pcard__stage svg { width: 68%; max-height: 78%; height: auto; overflow: visible; transition: transform .8s var(--ease); }
.pcard:hover .pcard__stage svg { transform: scale(1.05) rotate(-2deg); }
.pcard__badge {
  position: absolute; top: 18px; left: 18px;
  font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; background: var(--forest); color: #F6EBDC;
}
.pcard__badge--alt { background: var(--safran); color: var(--ink); }
.pcard__body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.pcard__top { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.pcard__title { font-family: var(--f-logo); font-size: clamp(22px, 2vw, 27px); line-height: 1.1; margin: 0; font-weight: 500; }
.pcard__sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.pcard__price { font-family: var(--f-logo); font-size: 26px; line-height: 1; white-space: nowrap; }
.pcard__price small { display: block; text-align: right; font-family: var(--f-sans); font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.pcard__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: auto; }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  --s: 28px;
  width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--c); position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), inset 0 -3px 5px rgba(0, 0, 0, .1);
  transition: transform .3s var(--ease);
}
.swatch::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--fg); opacity: 0; transform: scale(.8); transition: all .35s var(--ease); }
.swatch:hover { transform: scale(1.1); }
.swatch.active::after { opacity: 1; transform: scale(1); }

/* ---------- Éditions Poétiques & Capsules Grid ---------- */
.capsules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
@media (max-width: 860px) {
  .capsules-grid {
    grid-template-columns: 1fr;
  }
}

.capsule-card {
  background: var(--card);
  border-radius: var(--r-l);
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .4s;
  box-shadow: var(--shadow-s);
}
.capsule-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-m);
  border-color: var(--line-strong);
}

.capsule-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-alt);
}
.capsule-card__media img:not(.capsule-thumb) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.capsule-card:hover .capsule-card__media img:not(.capsule-thumb) {
  transform: scale(1.04);
}

.capsule-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(44, 51, 47, 0.85);
  color: #FFF9F1;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 2;
}

.capsule-thumb-wrap {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 68px;
  height: 68px;
  border-radius: var(--r-s);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  border: 2px solid #FFF9F1;
  z-index: 2;
  transition: transform 0.3s ease;
}
.capsule-card:hover .capsule-thumb-wrap {
  transform: scale(1.08) rotate(-2deg);
}
.capsule-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.capsule-card__content {
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.capsule-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.capsule-title {
  font-family: var(--f-logo);
  font-size: 26px;
  line-height: 1.1;
  margin: 0;
  font-weight: 500;
}

.capsule-sub {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 4px;
}

.capsule-price {
  font-family: var(--f-logo);
  font-size: 26px;
  line-height: 1;
  white-space: nowrap;
  color: var(--fg);
}
.capsule-price small {
  display: block;
  text-align: right;
  font-family: var(--f-sans);
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.capsule-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.capsule-actions {
  margin-top: auto;
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.capsule-actions .btn {
  --h: 44px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  justify-content: center;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .capsule-actions {
    grid-template-columns: 1fr;
  }
}

/* ---------- Size teaser ---------- */
.teaser { background: var(--forest); color: #F6EBDC; border-radius: var(--r-l); overflow: hidden; display: grid; grid-template-columns: 1.05fr 1fr; }
body.night .teaser { background: #161A17; }
.teaser__copy { padding: clamp(40px, 6vw, 84px); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.teaser__copy .eyebrow { color: rgba(246, 235, 220, .6); }
.teaser__copy .lead { color: rgba(246, 235, 220, .7); }
.teaser__copy .btn { align-self: flex-start; }
.teaser__demo { position: relative; background: #354039; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 50px 40px; gap: 30px; min-height: 480px; }
.teaser__demo svg { width: 100%; max-width: 420px; height: auto; overflow: visible; }
.teaser__demo .range-wrap { width: 100%; max-width: 380px; }

/* ---------- Range (shared) ---------- */
.range-wrap { --pn: .5; position: relative; padding-top: 40px; }
.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: grab; position: relative; z-index: 2;
}
.range:active { cursor: grabbing; }
.range:focus { outline: none; }
.range-track {
  position: absolute; left: 0; right: 0; bottom: 11px; height: 6px; border-radius: 99px;
  background: var(--track, rgba(35, 39, 31, .12)); overflow: hidden; pointer-events: none;
}
.range-track::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: calc(14px + (100% - 28px) * var(--pn));
  background: linear-gradient(90deg, var(--safran), var(--terracotta));
  border-radius: inherit;
}
.range-ticks { position: absolute; left: 14px; right: 14px; bottom: -14px; display: flex; justify-content: space-between; pointer-events: none; }
.range-ticks i { width: 1px; height: 6px; background: var(--line-strong); }
.range-ticks i:nth-child(5n+1) { height: 10px; }
.range::-webkit-slider-runnable-track { height: 28px; background: transparent; }
.range::-moz-range-track { height: 28px; background: transparent; }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: #FFF9F1; border: 0;
  box-shadow: 0 0 0 6px rgba(208, 106, 78, .18), 0 0 0 1.5px var(--terracotta), 0 6px 14px rgba(0,0,0,.18);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.range::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%; background: #FFF9F1; border: 0;
  box-shadow: 0 0 0 6px rgba(208, 106, 78, .18), 0 0 0 1.5px var(--terracotta), 0 6px 14px rgba(0,0,0,.18);
}
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 10px rgba(208, 106, 78, .22), 0 0 0 1.5px var(--terracotta), 0 6px 14px rgba(0,0,0,.2); }
.range:active::-webkit-slider-thumb { transform: scale(1.12); }
.range-bubble {
  position: absolute; top: 0; left: calc(14px + (100% - 28px) * var(--pn));
  transform: translateX(-50%);
  background: var(--forest); color: #F6EBDC; font-weight: 700; font-size: 13px;
  padding: 4px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  }
.range-bubble::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 1px; }
.teaser .range-track { --track: rgba(246, 235, 220, .14); }
.teaser .range-bubble { background: #F6EBDC; color: var(--forest); }
.teaser .range-ticks i { background: rgba(246, 235, 220, .25); }
body.night .range-bubble { background: #F6EBDC; color: var(--forest); }

/* ---------- Palette ---------- */
.palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tint {
  aspect-ratio: 1 / 1.1; border-radius: var(--r-m); background: var(--c); color: var(--t, var(--ink));
  padding: 22px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; cursor: pointer;
  transition: transform .6s var(--ease), border-radius .6s var(--ease);
}
.tint:hover { transform: translateY(-6px) rotate(-1deg); border-radius: 34px; }
.tint__name { font-family: var(--f-logo); font-size: clamp(28px, 2.6vw, 40px); line-height: 1; }
.tint__mood { font-family: var(--f-serif); font-style: italic; font-size: 18px; opacity: .85; }
.tint__hex { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .6; font-weight: 600; }
.tint__lever {
  position: absolute; right: 22px; top: 22px; width: 14px; height: 30px; border-radius: 8px;
  background: rgba(0, 0, 0, .12); box-shadow: inset 0 -2px 0 rgba(0,0,0,.08);
}
.tint__lever::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 2px; height: 14px; border-radius: 6px;
  background: rgba(255, 255, 255, .55); transition: transform .5s var(--ease);
}
.tint:hover .tint__lever::after { transform: translateY(12px); }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.split__media { border-radius: var(--r-l); overflow: hidden; position: relative; aspect-ratio: 4 / 5; }
.split__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.split__media:hover img { transform: scale(1.04); }
.split__media .tag {
  position: absolute; left: 20px; bottom: 20px; background: rgba(255, 249, 241, .92); color: var(--ink);
  padding: 12px 16px; border-radius: 14px; font-size: 13px; display: flex; gap: 12px; align-items: center; backdrop-filter: blur(8px);
}
.split__media .tag b { display: block; font-size: 14px; }
.split__media .tag i { width: 34px; height: 34px; border-radius: 9px; background: var(--terracotta); }
.features { display: grid; gap: 26px; margin-top: 40px; }
.feature { display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start; padding-top: 26px; border-top: 1px solid var(--line); }
.feature__ico { width: 52px; height: 52px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; }
.feature__ico svg { width: 24px; height: 24px; }
.feature h4 { margin: 0 0 4px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 34px; position: relative; overflow: hidden; min-height: 290px; display: flex; flex-direction: column; }
.step__num { font-family: var(--f-logo); font-size: 96px; line-height: .8; color: var(--c); opacity: .9; }
.step h3 { font-family: var(--f-logo); font-weight: 500; font-size: 30px; margin: auto 0 10px; line-height: 1.05; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }
.step__time { position: absolute; top: 30px; right: 30px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px; background: var(--bg); }

/* ---------- Reviews ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); padding: 30px; display: flex; flex-direction: column; gap: 18px; }
.review blockquote { margin: 0; font-family: var(--f-serif); font-size: 23px; line-height: 1.3; }
.review footer { margin-top: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.review footer i { width: 40px; height: 40px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-style: normal; font-weight: 700; color: #fff; }
.review footer span { color: var(--muted); display: block; font-size: 13px; }
.reviews-summary { display: flex; align-items: center; gap: 18px; }
.reviews-summary strong { font-family: var(--f-logo); font-size: 64px; line-height: 1; font-weight: 500; }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 26px 0; display: flex; justify-content: space-between; gap: 20px; align-items: center; font-size: 19px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); position: relative; flex: none; transition: transform .4s var(--ease), background .3s; }
.faq summary .pm::before, .faq summary .pm::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.faq summary .pm::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .4s var(--ease); }
.faq details[open] summary .pm { background: var(--fg); color: var(--bg); }
.faq details[open] summary .pm::after { transform: translate(-50%, -50%) rotate(0); }
.faq .ans { color: var(--muted); padding: 0 60px 26px 0; font-size: 16px; }

/* ---------- Newsletter ---------- */
.news { background: var(--terracotta); color: #FFF4EA; border-radius: var(--r-l); padding: clamp(40px, 6vw, 80px); display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; position: relative; overflow: hidden; }
.news::before { content: ""; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 60px; background: rgba(255, 255, 255, .08); transform: rotate(18deg); }
.news .display { color: #FFF4EA; }
.news p { opacity: .85; margin: 14px 0 0; }
.news form { display: flex; gap: 8px; background: #FFF4EA; padding: 6px; border-radius: 999px; position: relative; }
.news input { flex: 1; border: 0; background: transparent; padding: 0 20px; font-size: 15px; outline: none; color: var(--ink); min-width: 0; }
.news .btn { --h: 50px; }

/* ---------- Footer ---------- */
.footer { padding: 90px 0 36px; border-top: 1px solid var(--line); margin-top: clamp(80px, 10vw, 140px); }
.footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.footer h5 { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.footer ul a:hover { color: var(--terracotta); }
.footer__brand p { color: var(--muted); max-width: 34ch; margin-top: 18px; }
.footer__mega { font-family: var(--f-logo); font-size: clamp(80px, 19vw, 300px); line-height: .8; text-align: center; margin: 80px 0 40px; letter-spacing: -.02em; white-space: nowrap; }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; color: var(--muted); flex-wrap: wrap; padding-top: 26px; border-top: 1px solid var(--line); }
.pay { display: flex; gap: 8px; }
.pay span { border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 700; letter-spacing: .04em; }

/* ---------- Cart drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 24, 21, .4); z-index: 95; opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); backdrop-filter: blur(2px); }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100; width: min(460px, 100%);
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .6s var(--ease);
  box-shadow: -20px 0 60px rgba(0,0,0,.15);
}
.drawer.open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.drawer__head h3 { font-family: var(--f-logo); font-weight: 500; font-size: 28px; margin: 0; }
.ship-bar { padding: 18px 26px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ship-bar__track { height: 6px; border-radius: 99px; background: var(--line); margin-top: 10px; overflow: hidden; }
.ship-bar__fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--safran), var(--terracotta)); transition: width .8s var(--ease); }
.drawer__items { flex: 1; overflow-y: auto; padding: 8px 26px; }
.citem { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); animation: fadeUp .5s var(--ease); }
.citem__img { width: 84px; height: 84px; border-radius: 14px; background: var(--card); display: grid; place-items: center; border: 1px solid var(--line); }
.citem__img svg { width: 70%; height: auto; overflow: visible; }
.citem h4 { margin: 0; font-size: 15.5px; }
.citem__meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.citem__price { font-weight: 700; text-align: right; }
.citem__remove { font-size: 12px; color: var(--muted); text-decoration: underline; margin-top: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; height: 36px; margin-top: 10px; }
.qty button { width: 34px; height: 100%; display: grid; place-items: center; font-size: 17px; }
.qty span { min-width: 22px; text-align: center; font-weight: 600; font-size: 14px; }
.drawer__empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.drawer__empty .display { font-size: 34px; color: var(--fg); margin-bottom: 12px; }
.drawer__foot { padding: 22px 26px 26px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.drawer__row { display: flex; justify-content: space-between; font-size: 15px; }
.drawer__row.total { font-size: 19px; font-weight: 700; }
.drawer__note { font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 120; transform: translate(-50%, 140%);
  background: var(--forest); color: #F6EBDC; padding: 14px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-m); transition: transform .6s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }
.toast i { width: 20px; height: 20px; border-radius: 50%; background: var(--sauge); display: grid; place-items: center; font-style: normal; font-size: 12px; color: var(--forest); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1.3s var(--ease), transform 1.3s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }
.split-line { display: block; overflow: hidden; }
.split-line > span { display: inline-block; transform: translateY(105%); animation: lineUp 1.35s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes lineUp { to { transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .header__inner { grid-template-columns: auto 1fr auto; }
  .header__inner .logo { justify-self: center; }
  .night-toggle .label { display: none; }
  .palette { grid-template-columns: repeat(2, 1fr); }
  .teaser, .split, .news { grid-template-columns: 1fr; }
  .steps, .reviews { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .hero__hint { display: none; }
}
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .container { width: min(100% - 32px, var(--page)); }
  .products { grid-template-columns: 1fr; }
  .logo { font-size: 24px; }
  .hero { align-items: flex-end; min-height: 88svh; }
  .hero__media img { object-position: 78% center; }
  .hero__media::after { background: linear-gradient(0deg, rgba(251, 241, 227, .97) 0%, rgba(251, 241, 227, .85) 45%, rgba(251, 241, 227, 0) 75%); }
  body.night .hero__media::after { background: linear-gradient(0deg, rgba(31, 36, 33, .97) 0%, rgba(31, 36, 33, .8) 50%, rgba(31, 36, 33, .1) 80%); }
  .hero__content { padding: 40px 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .pcard__body { padding: 22px; }
  .news form { flex-direction: column; border-radius: 22px; }
  .news input { padding: 14px 16px; }
  .faq .ans { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
  }
  .announce__track { animation: marquee 110s linear infinite !important; }
  .big-marquee__track { animation: marquee 130s linear infinite !important; }
  .hero__hint, .hint__switch::before { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .split-line > span { transform: none; animation: none !important; }
}

/* ---------- Modal Confirmation Commande & Génération 3D ---------- */
.order-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 24, 21, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.order-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.order-modal {
  width: min(580px, 100%);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-l);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.4s var(--ease);
  display: flex;
  flex-direction: column;
}

.order-modal-backdrop.open .order-modal {
  transform: translateY(0) scale(1);
}

.order-modal__header {
  padding: 24px 28px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.order-modal__header h3 {
  font-family: var(--f-logo);
  font-size: 24px;
  margin: 0;
}

.order-modal__body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 80vh;
  overflow-y: auto;
}

.order-success-hero {
  text-align: center;
  padding: 10px 0 16px;
}

.order-check-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #FFF9F1;
  display: inline-grid;
  place-items: center;
  font-size: 26px;
  margin-bottom: 14px;
  box-shadow: 0 6px 18px rgba(208, 106, 78, 0.3);
}

.order-success-hero h2 {
  font-family: var(--f-logo);
  font-size: 28px;
  margin: 0 0 6px;
}

.order-badge-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  color: var(--muted);
}

/* Zone récapitulatif commande client */
.order-client-summary {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-client-summary__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg);
}

.order-client-summary__items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.order-client-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: var(--r-s);
  background: var(--card);
  border: 1px solid var(--line);
}

.order-client-item__preview {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-client-item__preview svg {
  width: 100%;
  height: 100%;
}

.order-client-item__info {
  flex: 1;
  min-width: 0;
}

.order-client-item__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-client-item__meta {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.order-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.15);
}

.order-client-item__price {
  text-align: right;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  flex-shrink: 0;
}
.order-client-item__price span {
  font-size: 11px;
  color: var(--muted);
}
.order-client-item__price b {
  font-weight: 700;
  color: var(--fg);
}

.order-client-details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.order-detail-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.order-detail-line.total {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
}

.order-client-reassurance {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-s);
  background: color-mix(in srgb, var(--sauge) 15%, var(--card));
  border: 1px solid color-mix(in srgb, var(--sauge) 35%, transparent);
  font-size: 13px;
}
.order-client-reassurance .reassurance-icon {
  font-size: 20px;
  line-height: 1;
}
.order-client-reassurance b {
  display: block;
  font-weight: 600;
  color: var(--fg);
}
.order-client-reassurance p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Lien discret atelier dans le footer */
.footer-admin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px dashed var(--line);
  transition: all 0.25s;
}
.footer-admin-link:hover {
  opacity: 1;
  color: var(--fg);
  border-color: var(--terracotta);
  background: rgba(208, 106, 78, 0.08);
}

