/* Literie Store — démo
   Les couleurs et les polices vivent dans les jetons ci-dessous.
   Un thème saisonnier = un bloc [data-theme="..."] qui redéfinit ces jetons. */

:root {
  /* Charte 2026 */
  --orange: #e16f35;          /* Pantone 7579 C */
  --white: #ffffff;

  /* Ambiance showroom */
  --night: #14110f;           /* fond principal, noir chaud */
  --night-2: #1d1916;         /* un ton plus haut, pour séparer sans trait */
  --cream: #f3ede4;           /* texte sur fond sombre */
  --cream-soft: #b3a99c;      /* texte secondaire */
  --linen: #f4efe7;           /* fond clair des sections suivantes */
  --ink: #1a1613;

  --ground: var(--night);
  --text: var(--cream);
  --promo-bg: var(--orange);
  --promo-ink: var(--ink);

  /* Charte : Helvetica. Qui ne l'a pas voit Inter Tight, très proche. */
  --font: "Helvetica Neue", "Inter Tight", Helvetica, Arial, sans-serif;

  --gutter: 20px;
  --header-h: 68px;
  --logo: 52px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}
@media (min-width: 900px) {
  :root { --gutter: 40px; --header-h: 88px; --logo: 66px; }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
svg { display: block; }
h1, h2, p, ol { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px;
  border: 0; border-radius: 0;
  font: 500 16px/1 var(--font); letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease-out), background-color .25s, color .25s;
}
.btn--orange { background: var(--orange); color: var(--accent-ink, var(--white)); }
.btn--orange:hover { background: var(--accent-hover, var(--cream)); color: var(--accent-hover-ink, var(--ink)); }
.btn--orange:active { transform: scale(.98); }
.btn--lg { min-height: 58px; padding: 0 34px; font-size: 17px; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 0; border-radius: 999px; background: transparent; color: var(--cream);
  cursor: pointer; text-decoration: none;
  transition: background-color .2s;
}
.icon-btn:hover { background: var(--night-2); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Bandeau promo */
.promo { background: var(--promo-bg); color: var(--promo-ink); text-align: center; padding: 9px var(--gutter); font-size: 14px; }
.promo__more { display: none; }
@media (min-width: 700px) { .promo__more { display: inline; } }

/* En-tête */
.header { position: sticky; top: 0; z-index: 20; background: var(--ground); }
.header__bar {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h); padding: 0 var(--gutter);
}

/* Logo : carré orange, LITERIE en Helvetica Bold, STORE espacé dessous (charte 2026) */
.logo {
  flex: none;
  width: var(--logo); height: var(--logo);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--orange); color: var(--white);
  font-family: "Helvetica Neue", Helvetica, "Inter Tight", Arial, sans-serif;
  font-weight: 700; line-height: 1; text-decoration: none;
}
.logo__a { font-size: calc(var(--logo) * .205); letter-spacing: -.005em; }
.logo__b { font-size: calc(var(--logo) * .068); letter-spacing: .62em; margin: calc(var(--logo) * .045) 0 0 .62em; }

.nav { display: none; }
.header__actions { margin-left: auto; display: flex; gap: 2px; }
.icon-btn--hide-sm { display: none; }
.cart__count {
  position: absolute; top: 5px; right: 3px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--orange); color: var(--white);
  font: 700 10px/17px var(--font); text-align: center;
}
.cart__count.is-bump { animation: bump .5s var(--ease-out); }
@keyframes bump { 35% { transform: scale(1.45); } }

@media (min-width: 1100px) {
  .header__burger { display: none; }
  .header__bar { gap: 48px; }
  .nav { display: flex; gap: 30px; }
  .nav a { position: relative; font-size: 15px; font-weight: 400; color: var(--cream); text-decoration: none; padding: 6px 0; }
  .nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: var(--orange); transform: scaleX(0); transform-origin: left;
    transition: transform .35s var(--ease-out);
  }
  .nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
  .icon-btn--hide-sm { display: inline-grid; }
}

/* Recherche */
.search { display: flex; gap: 8px; padding: 0 var(--gutter) 16px; }
.search[hidden] { display: none; }
.search input {
  flex: 1; min-width: 0; height: 50px; padding: 0 18px;
  border: 0; border-radius: 0; background: var(--night-2); color: var(--cream);
  font: 400 16px var(--font);
}

/* Menu téléphone */
.drawer {
  position: fixed; inset: 0; top: var(--drawer-top, 0); z-index: 15;
  background: var(--ground); padding: 28px var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto;
}
.drawer[hidden] { display: none; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__nav a { font: 300 36px/1.2 var(--font); letter-spacing: -.03em; text-decoration: none; padding: 6px 0; }
.drawer__foot { margin-top: 24px; color: var(--cream-soft); font-size: 15px; }

/* ---------- LA SCÈNE : hero + anatomie du matelas ---------- */
.anatomy { position: relative; }
.anatomy__stage {
  position: relative;
  display: grid; gap: 28px;
  padding: 36px var(--gutter) 28px;
}
.anatomy__copy { position: relative; }

.intro__title {
  font-weight: 300;
  font-size: clamp(40px, 11vw, 120px);
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.intro__lead { margin-top: 20px; max-width: 34ch; font-size: 17px; color: var(--cream-soft); }
.intro__actions { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; }
.intro__from { font-size: 17px; color: var(--cream); text-decoration: none; }
.intro__from strong { font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.intro__from:hover { color: var(--orange); }

.layers-copy { list-style: none; padding: 0; display: grid; gap: 28px; margin-top: 40px; }
.lc__name { font-weight: 300; font-size: clamp(26px, 6.4vw, 52px); line-height: 1.05; letter-spacing: -.035em; }
.lc__text { margin-top: 12px; max-width: 38ch; color: var(--cream-soft); font-size: 17px; }
.lc .btn { margin-top: 24px; }

.anatomy__visual { margin: 0; }
.mattress { width: 100%; height: auto; overflow: visible; }
.anatomy__legal { font-size: 12px; color: var(--cream-soft); }

/* Avec le script et sans « réduire les animations » : la scène est tenue au défilement */
.is-scene .anatomy { height: 260vh; }
.is-scene .anatomy__stage {
  position: sticky; top: var(--header-h);
  height: calc(100svh - var(--header-h) - 38px);
  min-height: 560px;
  grid-template-rows: auto 1fr auto;
  gap: 0;
  padding-top: 28px; padding-bottom: 16px;
  overflow: hidden;
}
.is-scene .anatomy__copy { min-height: 260px; }
.is-scene .intro,
.is-scene .lc {
  position: absolute; inset: 0 0 auto 0;
  transition: opacity .6s var(--ease-out), transform .8s var(--ease-out);
}
.is-scene .layers-copy { margin: 0; display: block; position: static; }
.is-scene .lc { opacity: 0; transform: translateY(24px); pointer-events: none; }
.is-scene .lc.is-active { opacity: 1; transform: none; pointer-events: auto; }
.is-scene .intro.is-out { opacity: 0; transform: translateY(-32px); pointer-events: none; }
.is-scene .anatomy__visual { display: flex; align-items: center; justify-content: center; min-height: 0; }
.is-scene .mattress { max-height: 100%; width: auto; max-width: min(118%, 900px); }

/* Entrée de page */
.is-scene .intro > * { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.is-scene.is-loaded .intro > * { opacity: 1; transform: none; }
.is-scene.is-loaded .intro__lead { transition-delay: .08s; }
.is-scene.is-loaded .intro__actions { transition-delay: .16s; }

@media (min-width: 1000px) {
  .anatomy__stage { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 48px; }
  .anatomy__legal { grid-column: 1 / -1; }
  .is-scene .anatomy__stage { grid-template-rows: 1fr auto; padding-top: 0; }
  .is-scene .anatomy__copy { min-height: 420px; align-self: center; }
  .is-scene .intro, .is-scene .lc { inset: 50% 0 auto 0; translate: 0 -50%; }
  .intro__title { font-size: clamp(56px, 5.6vw, 104px); }
  .intro__lead { font-size: 19px; margin-top: 28px; }
  .intro__actions { margin-top: 40px; }
  .lc__text { font-size: 19px; }
  .is-scene .anatomy__visual { height: 100%; }
}

/* Section suivante (provisoire) */
.next { background: var(--linen); color: var(--ink); padding: 120px var(--gutter); }
.next h2 { font-weight: 300; font-size: clamp(32px, 5vw, 64px); letter-spacing: -.035em; }
.next p { margin-top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* ---------- GUIDE : bien choisir son matelas ---------- */
.guide {
  --g-bg: var(--linen);
  --g-ink: var(--ink);
  --g-soft: #6b6157;
  --g-tile: #ebe4d9;           /* un ton plus bas que le fond */
  --g-tile-hover: #e2d9cc;
  background: var(--g-bg); color: var(--g-ink);
  padding: 88px var(--gutter) 96px;
}
.guide__title { font-weight: 300; font-size: clamp(36px, 9vw, 96px); line-height: 1; letter-spacing: -.045em; text-wrap: balance; }
.guide__lead { margin-top: 16px; max-width: 40ch; color: var(--g-soft); font-size: 17px; }
.guide__body { margin-top: 40px; display: grid; gap: 28px; }
.guide__panel { scroll-margin-top: calc(var(--header-h) + 20px); }

/* Le lit à l'échelle + la jauge */
.guide__visual {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: end;
  background: var(--g-tile); padding: 20px;
}
.bedview__svg { width: 100%; height: auto; max-height: 190px; }
.bedview__frame { fill: #fff; stroke: none; transition: width .6s var(--ease-out), height .6s var(--ease-out), x .6s var(--ease-out); }
.bedview__pillow { fill: var(--g-tile-hover); transition: opacity .4s, transform .6s var(--ease-out); }
.bedview__size { margin-top: 10px; font-size: 15px; font-weight: 500; }
.firm__label { font-size: 15px; font-weight: 500; }
.firm__gauge { margin-top: 12px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.firm__gauge span { height: 10px; background: #d9d0c3; transition: background-color .4s var(--ease-out); }
.firm__gauge span.is-on { background: var(--orange); }
.firm__ends { margin-top: 8px; display: flex; justify-content: space-between; font-size: 13px; color: var(--g-soft); }

/* Les questions */
.q__left { font-size: 15px; color: var(--g-soft); }
.q__title { margin-top: 8px; font-weight: 300; font-size: clamp(28px, 7vw, 52px); line-height: 1.05; letter-spacing: -.035em; text-wrap: balance; }
.q__options { margin-top: 24px; display: grid; gap: 8px; }
.opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  width: 100%; padding: 18px 20px; min-height: 64px;
  border: 0; border-radius: 0; background: var(--g-tile); color: var(--g-ink);
  font: 500 18px/1.25 var(--font); text-align: left; cursor: pointer;
  transition: background-color .2s, transform .3s var(--ease-out);
}
.opt small { font-size: 15px; font-weight: 400; color: var(--g-soft); }
.opt:hover { background: var(--g-tile-hover); }
.opt:active { transform: scale(.99); }
.opt[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.opt[aria-pressed="true"] small { color: var(--cream-soft); }
.q__options--sizes { grid-template-columns: repeat(2, 1fr); }
.q__options--sizes .opt { align-items: center; text-align: center; }
.q__nav { margin-top: 20px; display: flex; gap: 16px; align-items: center; }
.linkbtn { border: 0; background: none; padding: 10px 0; font: 500 16px var(--font); color: var(--g-ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* Entrée de chaque écran du guide */
.q, .res { animation: qin .6s var(--ease-out); }
@keyframes qin { from { opacity: 0; transform: translateY(18px); } }

/* Le résultat */
.res__kicker { font-size: 15px; color: var(--g-soft); }
.res__name { margin-top: 8px; font-weight: 300; font-size: clamp(34px, 8vw, 64px); line-height: 1; letter-spacing: -.04em; }
.res__brand { margin-top: 10px; font-size: 16px; font-weight: 500; }
.res__why { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.res__why li { position: relative; padding-left: 22px; font-size: 17px; }
.res__why li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--orange); }
.res__buy { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.price { font-size: 34px; font-weight: 500; letter-spacing: -.02em; }
.price--old { font-size: 18px; color: var(--g-soft); text-decoration: line-through; }
.res__size { font-size: 15px; color: var(--g-soft); width: 100%; }
.res__actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--ink:hover { background: var(--orange); color: var(--white); }
.btn.is-done { background: var(--ink); color: var(--cream); }
.res__alts { margin-top: 40px; }
.res__alts h4 { margin: 0; font-size: 15px; font-weight: 500; color: var(--g-soft); }
.alt {
  margin-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: var(--g-tile); padding: 16px 20px; text-decoration: none;
  transition: background-color .2s;
}
.alt:hover { background: var(--g-tile-hover); }
.alt__name { font-size: 18px; font-weight: 500; }
.alt__meta { display: block; font-size: 14px; color: var(--g-soft); margin-top: 2px; }
.alt__price { font-size: 18px; font-weight: 500; white-space: nowrap; }
.res__note { margin-top: 20px; font-size: 13px; color: var(--g-soft); }

@media (min-width: 1000px) {
  .guide { padding: 160px var(--gutter) 160px; }
  .guide__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: end; }
  .guide__lead { font-size: 19px; }
  .guide__body { margin-top: 72px; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
  .guide__visual { grid-template-columns: 1fr; gap: 36px; padding: 40px; position: sticky; top: calc(var(--header-h) + 24px); }
  .bedview__svg { max-height: 320px; }
  .q__options { margin-top: 36px; }
  .q__options--sizes { grid-template-columns: repeat(3, 1fr); }
  .opt { padding: 22px 26px; font-size: 20px; }
}
