/* ================================================================
   ADONIS SACRA — single-product shop
   ================================================================ */

:root {
  --ground: #f6f2ea;
  --surface: #fffdf8;
  --ink: #1a1612;
  --on-ink: #f6f2ea;
  --ink-soft: #5a4d3f;
  --line: #d9cfbd;
  --accent: #6b2a1f;
  --on-accent: #ffffff;
  --gold: #8a651c;
  --ok: #2f6b3f;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #17110e;
    --surface: #1f1712;
    --ink: #f2ead9;
    --on-ink: #17110e;
    --ink-soft: #b8ac96;
    --line: #372c23;
    --accent: #e08a76;
    --on-accent: #17110e;
    --gold: #d4a85a;
    --ok: #6fbf85;
  }
}
:root[data-theme="dark"] {
  --ground: #17110e;
  --surface: #1f1712;
  --ink: #f2ead9;
  --on-ink: #17110e;
  --ink-soft: #b8ac96;
  --line: #372c23;
  --accent: #e08a76;
  --on-accent: #17110e;
  --gold: #d4a85a;
  --ok: #6fbf85;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  padding-inline: 20px;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1160px; margin: 0 auto; }
h1, h2 { font-family: var(--serif); font-weight: 500; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Header ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: env(safe-area-inset-top, 0px);
  background: var(--ground);
  z-index: 20;
}
.brand {
  font-family: var(--serif); font-size: 26px; font-weight: 500;
  letter-spacing: 0.02em; color: var(--ink); text-decoration: none;
}
.brand span { color: var(--accent); }
.links { display: flex; gap: 28px; font-size: 14px; }
.links a { color: var(--ink-soft); text-decoration: none; }
.links a:hover { color: var(--accent); }
.cart { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cart-badge {
  background: var(--accent); color: var(--on-accent);
  border-radius: 999px; padding: 1px 9px; font-size: 12px; font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) { .links { display: none; } }

/* ---------- Product ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  padding-block: 40px 72px;
  align-items: start;
}
.stage-col { position: sticky; top: 92px; }

.stage {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: calc(100vh - 130px);
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 65% 50% at 50% 40%, #4a3323 0%, rgba(74, 51, 35, 0) 70%),
    radial-gradient(ellipse 90% 70% at 50% 45%, #2a1c13 0%, #120c09 80%);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}
.stage.is-drag { cursor: grabbing; }
.stage:focus-visible { outline-offset: -3px; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.stage-ui { position: absolute; z-index: 2; }
.stage-top {
  top: 14px; left: 14px; right: 14px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap;
}
.seg { display: inline-flex; }
.seg button, .seg-single {
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.06em;
  padding: 10px 14px;
  color: #eadcc3;
  background: rgba(22, 14, 10, 0.62);
  border: 1px solid rgba(255, 236, 205, 0.22);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  backdrop-filter: blur(6px);
}
.seg button + button { border-left: 0; }
.seg button:hover, .seg-single:hover { background: rgba(60, 40, 28, 0.8); }
.seg button.is-on, .seg-single[aria-pressed="true"] { background: #eadcc3; color: #1a1210; }
.stage :focus-visible { outline-color: #eadcc3; }

.stage-hint, .stage-dim {
  bottom: 14px;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #cdbb9f;
  background: rgba(22, 14, 10, 0.55);
  padding: 7px 10px;
  pointer-events: none;
}
.stage-hint { left: 14px; max-width: calc(100% - 150px); transition: opacity 0.6s; }
.stage-hint.is-quiet { opacity: 0; }
.stage-dim { right: 14px; font-variant-numeric: tabular-nums; }
.stage-fallback {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  padding: 40px; color: #cdbb9f; font-family: var(--serif); font-size: 20px;
}

/* ---------- Photo gallery (real product photos) ---------- */
.stage-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 1; background: #120c09; }
.stage.show-photo { cursor: default; }
.stage.show-photo canvas, .stage.show-photo .stage-top, .stage.show-photo .stage-hint, .stage.show-photo .stage-dim { display: none; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumbs button {
  width: 68px; height: 68px; padding: 0; overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font: 500 12px/1 var(--sans); letter-spacing: 0.08em;
}
.thumbs button.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Panel ---------- */
.eyebrow {
  font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.panel h1 { font-size: clamp(38px, 5vw, 54px); line-height: 1.02; letter-spacing: -0.01em; margin-bottom: 18px; }
.ref { font-family: var(--sans); font-size: 12px; font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.lead { font-family: var(--serif); font-size: 20px; line-height: 1.4; color: var(--ink-soft); }
.price-row { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 22px 0 26px; }
.price { font-family: var(--serif); font-size: 40px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.tax { font-size: 12px; color: var(--ink-soft); }

.opt-group { margin-bottom: 22px; }
.opt-label {
  display: block; margin-bottom: 10px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft);
}
.opts { display: flex; flex-wrap: wrap; gap: 10px; }
.opt {
  font: 400 13px/1 var(--sans);
  padding: 12px 18px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 9px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.opt:hover { border-color: var(--accent); }
.opt.is-on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.opt-edge i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(128, 110, 90, 0.6); display: inline-block; }

.delivery { margin: 26px 0 20px; border-block: 1px solid var(--line); }
.delivery > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; font-size: 13px; }
.delivery > div + div { border-top: 1px solid var(--line); }
.delivery dt { color: var(--ink-soft); flex: none; }
.delivery dd { margin: 0; text-align: right; }
#eta { color: var(--ok); font-weight: 500; }

.btn {
  display: block; width: 100%;
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 18px;
  background: var(--ink); color: var(--on-ink);
  border: 0; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--accent); color: var(--on-accent); }
.added { min-height: 1.6em; margin: 12px 0 0; font-size: 13px; color: var(--ok); }

/* ---------- Content sections ---------- */
section h2 { font-size: clamp(30px, 4vw, 40px); margin-bottom: 20px; }
.story, .details, .faq { padding-block: 64px; border-top: 1px solid var(--line); }
.story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; }
.story p { max-width: 62ch; color: var(--ink-soft); font-size: 16px; }
.facts { margin: 0; align-self: start; border-top: 1px solid var(--line); }
.facts > div { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.facts dt { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); padding-top: 3px; }
.facts dd { margin: 0; }

.details table { border-collapse: collapse; width: 100%; max-width: 560px; }
.details th, .details td { text-align: left; padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.details th { color: var(--ink-soft); width: 40%; }

.faq details { max-width: 720px; border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 0; font-family: var(--serif); font-size: 21px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-family: var(--sans); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--ink-soft); margin: 0 0 18px; }

footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px;
  font-size: 12px; color: var(--ink-soft);
}
footer a { color: var(--ink-soft); text-decoration: none; margin-right: 16px; }
footer a:hover { color: var(--accent); }
.lang { display: flex; gap: 12px; }
.lang b { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .product { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 24px 48px; }
  .stage-col { position: static; }
  .stage { aspect-ratio: 1 / 1.05; max-height: none; }
  .story { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .stage-hint { max-width: calc(100% - 28px); bottom: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Additions: language links, skip link, cookie banner, swatches ---------- */
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--on-ink); padding: 10px 16px; font-size: 13px; text-decoration: none;
}
.skip:focus { top: calc(10px + env(safe-area-inset-top, 0px)); }

.lang a { color: var(--ink-soft); text-decoration: none; margin: 0; }
.lang a:hover { color: var(--accent); }
.lang a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.foot-links a { margin-right: 0; }
.linklike {
  font: inherit; color: var(--ink-soft); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.linklike:hover { color: var(--accent); }

/* wall colour swatches (no inline styles, so a strict CSP works) */
.opt-edge [data-x], .opt-edge i { background: var(--sw, #ccc); }
[data-wall="e6dccb"] { --sw: #e6dccb; }
[data-wall="9fae95"] { --sw: #9fae95; }
[data-wall="38352f"] { --sw: #38352f; }

/* cookie banner: Accept and Decline look the same on purpose (CNIL) */
.consent {
  position: fixed; z-index: 50;
  left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin-inline: auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 20px;
}
.consent strong { font-family: var(--serif); font-size: 22px; font-weight: 500; display: block; margin-bottom: 6px; }
.consent p { margin: 0 0 16px; font-size: 13px; color: var(--ink-soft); }
.consent-actions { display: flex; gap: 10px; }
.consent-btn {
  flex: 1; font: 500 13px/1 var(--sans); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 14px; cursor: pointer;
  background: var(--ink); color: var(--on-ink); border: 1px solid var(--ink);
}
.consent-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
