/* Literie Store — démo : fiche produit et panneau « Complétez votre nuit » */

/* ---------- FICHE PRODUIT ---------- */
.pdp { background: var(--linen); color: var(--ink); padding: 20px var(--gutter) 96px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: #6b6157; }
.crumbs a { color: inherit; }
.pdp__top { margin-top: 16px; display: grid; gap: 32px; }

/* Galerie */
.gallery { position: relative; }
.gallery__stage {
  position: relative; background: var(--night); color: var(--cream);
  aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden;
}
.gallery__mattress, .gallery__scale { width: 88%; height: 88%; }
.gallery__mattress[hidden], .gallery__scale[hidden] { display: none; }
.scale__bed { fill: var(--cream); transition: x .6s var(--ease-out), y .6s var(--ease-out), width .6s var(--ease-out), height .6s var(--ease-out); }
.scale__w, .scale__l { fill: var(--cream-soft); font: 500 12px var(--font); text-anchor: middle; }
.scale__l { text-anchor: start; }
.gallery__zoom { position: absolute; top: 10px; right: 10px; }
.gallery__layers {
  position: absolute; left: 14px; bottom: 14px; margin: 0; padding: 0; list-style: none;
  display: none; flex-direction: column; gap: 4px;
}
.gallery[data-view="coupe"] .gallery__layers { display: flex; }
.gallery__layers button {
  border: 0; background: var(--night-2); color: var(--cream-soft); padding: 8px 12px;
  font: 500 13px var(--font); text-align: left; cursor: pointer; transition: background-color .25s, color .25s;
}
.gallery__layers button.is-active, .gallery__layers button:hover { background: var(--orange); color: var(--white); }
.gallery__views { margin-top: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.view {
  border: 0; background: #ebe4d9; color: var(--ink); min-height: 48px;
  font: 500 15px var(--font); cursor: pointer; transition: background-color .2s, color .2s;
}
.view:hover { background: #e2d9cc; }
.view[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.gallery.is-zoomed { position: fixed; inset: 0; z-index: 40; background: var(--night); display: flex; flex-direction: column; padding: 16px; }
.gallery.is-zoomed .gallery__stage { flex: 1; aspect-ratio: auto; }
.gallery.is-zoomed .gallery__views { margin-top: 12px; }

/* Achat */
.buy__brand { font-size: 15px; font-weight: 500; color: #6b6157; }
.buy__name { margin-top: 6px; font-weight: 300; font-size: clamp(36px, 9vw, 72px); line-height: 1; letter-spacing: -.045em; }
.buy__thin { margin-top: 10px; font-size: 17px; color: #6b6157; }
.buy__price { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.buy__price .price { font-size: 40px; }
.buy__off { background: var(--orange); color: var(--white); font-size: 14px; font-weight: 500; padding: 4px 8px; }
.sizes, .deliv { margin: 28px 0 0; padding: 0; border: 0; min-width: 0; }
.sizes legend, .deliv legend { padding: 0; font-size: 15px; font-weight: 500; }
.sizes__grid { margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.size {
  border: 0; background: #ebe4d9; color: var(--ink); padding: 12px 6px; min-height: 60px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font: 500 16px var(--font); cursor: pointer; transition: background-color .2s, color .2s;
}
.size small { font-size: 13px; font-weight: 400; color: #6b6157; }
.size:hover { background: #e2d9cc; }
.size[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.size[aria-pressed="true"] small { color: var(--cream-soft); }
.buy__firm { margin-top: 28px; }
.buy__firm .firm__gauge { margin-top: 10px; }
.facts { margin: 28px 0 0; display: grid; gap: 2px; }
.facts div { display: flex; justify-content: space-between; gap: 16px; background: #ebe4d9; padding: 14px 16px; }
.facts dt { color: #6b6157; }
.facts dd { margin: 0; font-weight: 500; text-align: right; }
.deliv__opt { margin-top: 8px; display: flex; gap: 12px; align-items: flex-start; background: #ebe4d9; padding: 14px 16px; cursor: pointer; }
.deliv__opt input { margin-top: 4px; accent-color: var(--orange); width: 18px; height: 18px; }
.deliv__opt span { display: flex; flex-direction: column; }
.deliv__opt small { color: #6b6157; font-size: 14px; }
.deliv__shop { display: block; margin-top: 8px; }
.deliv__shop[hidden] { display: none; }
.deliv__shop select { width: 100%; height: 50px; padding: 0 12px; border: 0; background: var(--white); color: var(--ink); font: 400 16px var(--font); }

/* Bouton d'ajout : le texte glisse, « Ajouté » arrive */
.btn--add { margin-top: 28px; width: 100%; position: relative; overflow: hidden; }
.btn--add span { transition: transform .45s var(--ease-out), opacity .3s; }
.btn--add__b { position: absolute; inset: 0; display: grid; place-items: center; transform: translateY(100%); opacity: 0; }
.btn--add.is-added { background: var(--ink); color: var(--cream); }
.btn--add.is-added .btn--add__a { transform: translateY(-100%); opacity: 0; }
.btn--add.is-added .btn--add__b { transform: none; opacity: 1; }

.points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.points li { position: relative; padding-left: 22px; }
.points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--orange); }

/* Dans le matelas */
.inside { margin-top: 96px; }
.inside__title { font-weight: 300; font-size: clamp(32px, 7vw, 64px); letter-spacing: -.04em; line-height: 1; }
.inside__list { margin-top: 28px; padding: 0; list-style: none; display: grid; gap: 4px; }
.inside__item { background: #ebe4d9; padding: 20px; }
.inside__item h3 { margin: 0; font-size: 20px; font-weight: 500; }
.inside__item p { margin-top: 6px; color: #4b433c; }
.pdp__legal { margin-top: 48px; font-size: 13px; color: #6b6157; }

@media (min-width: 1000px) {
  .pdp { padding: 28px var(--gutter) 160px; }
  .pdp__top { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
  .gallery { position: sticky; top: calc(var(--header-h) + 20px); }
  .gallery__stage { aspect-ratio: 5 / 4; }
  .sizes__grid { grid-template-columns: repeat(5, 1fr); }
  .inside { margin-top: 160px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; }
  .inside__list { margin-top: 0; }
}

/* ---------- PANNEAU « COMPLÉTEZ VOTRE NUIT » ---------- */
.cn { position: fixed; inset: 0; z-index: 50; }
.cn[hidden] { display: none; }
.cn__scrim { position: absolute; inset: 0; background: rgba(10, 8, 7, .55); opacity: 0; transition: opacity .35s; }
.cn__sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92svh;
  background: var(--linen); color: var(--ink);
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .5s var(--ease-out);
}
.cn.is-open .cn__scrim { opacity: 1; }
.cn.is-open .cn__sheet { transform: none; }
.cn__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gutter) 6px; }
.cn__title { font-weight: 300; font-size: 32px; letter-spacing: -.035em; line-height: 1.05; }
.cn__close { color: var(--ink); flex: none; }
.cn__close:hover { background: #ebe4d9; }
.cn__body { overflow-y: auto; padding: 8px var(--gutter) 16px; }
.cn__added { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.cn__check { flex: none; width: 22px; height: 22px; background: var(--orange); position: relative; }
.cn__check::after { content: ""; position: absolute; left: 7px; top: 3px; width: 6px; height: 11px; border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cn__sub { margin-top: 8px; color: #6b6157; font-size: 15px; }
.cn__pack { margin-top: 16px; display: flex; gap: 12px; align-items: flex-start; background: var(--ink); color: var(--cream); padding: 14px 16px; cursor: pointer; font-size: 15px; }
.cn__pack input { margin-top: 3px; accent-color: var(--orange); width: 18px; height: 18px; flex: none; }
.cn__list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.cn__group { margin-top: 12px; font-size: 14px; font-weight: 500; color: #6b6157; }
.item {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  background: #ebe4d9; padding: 12px 12px 12px 16px; transition: background-color .25s;
}
.item.is-on { background: #e0d4c2; }
.item__name { display: block; font-weight: 500; font-size: 16px; }
.item__detail { display: block; font-size: 13px; color: #6b6157; margin-top: 2px; }
.item__price { text-align: right; font-weight: 500; white-space: nowrap; }
.item__price s { display: block; font-size: 13px; font-weight: 400; color: #6b6157; }
.item__add {
  width: 44px; height: 44px; border: 0; background: var(--white); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; transition: background-color .2s, transform .3s var(--ease-out);
}
.item__add svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.item__add:hover { transform: scale(1.06); }
.item__add[aria-pressed="true"] { background: var(--orange); color: var(--white); }
.cn__foot { padding: 14px var(--gutter) 18px; background: #ebe4d9; }
.cn__total { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.cn__total strong { font-size: 28px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cn__actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cn__actions .btn { padding: 0 12px; font-size: 15px; }

@media (min-width: 800px) {
  .cn__sheet { left: auto; top: 0; width: 520px; max-height: none; transform: translateX(100%); }
  .cn__head { padding: 28px 32px 8px; }
  .cn__body { padding: 8px 32px 20px; flex: 1; }
  .cn__foot { padding: 18px 32px 24px; }
  .cn__title { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) { .cn__sheet, .cn__scrim { transition: none; } }
