/* ==========================================================================
   Assiz — feuille de style
   Palette : blanc cassé chaud, encre presque noire, accent citron vert
   (repris des clips du produit). Tout est piloté par les variables ci-dessous.
   ========================================================================== */

:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --ink: #121314;
  --ink-2: #3b3d40;
  --muted: #74777b;
  --line: #e3e0d8;
  --accent: #c8f03c;
  --accent-ink: #121314;
  --accent-hover: #b9e52a;
  --tint: #edf6d3;
  --tint-ink: #2c3a08;
  --badge: var(--accent);
  --badge-ink: var(--accent-ink);
  --sel: rgba(200, 240, 60, .14);
  --danger: #b4322a;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(18, 19, 20, .04), 0 8px 24px rgba(18, 19, 20, .06);

  --font-head: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* Couleurs selon le modèle choisi (attribut data-theme posé sur <html> par main.js) */
[data-theme="pro-noir"] {
  --accent: #e6e8eb; --accent-ink: #121314; --accent-hover: #ffffff;
  --tint: #eceef1; --tint-ink: #23262b;
  --badge: #1d2024; --badge-ink: #ffffff;
  --sel: rgba(29, 32, 36, .045);
}
[data-theme="pro-rouge"] {
  --accent: #e2483c; --accent-ink: #ffffff; --accent-hover: #cc3a2f;
  --tint: #fbe8e5; --tint-ink: #6d1a14;
  --badge: #d23b30; --badge-ink: #ffffff;
  --sel: rgba(210, 59, 48, .07);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }


/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 10px; border: 0;
  background: var(--ink); color: #fff; font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { background: #000; }
.btn:active { transform: scale(.985); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { height: 40px; padding: 0 18px; font-size: .92rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Barre d'annonce + header ---------- */
.announce {
  background: var(--ink); color: #e9e9e6; font-size: .82rem; text-align: center; padding: 9px var(--gutter);
}
.announce span + span { margin-left: 28px; }

.header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245, 243, 238, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo { font-family: var(--font-head); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.04em; text-decoration: none; display: inline-flex; align-items: baseline; }
.logo i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 3px; box-shadow: 0 0 0 1.5px var(--ink); transition: background-color .35s ease; }
.nav { display: flex; gap: 30px; }
.nav a { text-decoration: none; font-size: .94rem; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }

/* ---------- Produit (au-dessus de la ligne de flottaison) ---------- */
.product { padding: clamp(20px, 4vw, 48px) 0 clamp(56px, 8vw, 96px); }
.product__grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(28px, 5vw, 72px); align-items: start; }

.gallery { position: sticky; top: 92px; display: grid; gap: 12px; }
.gallery__main {
  position: relative; aspect-ratio: 1 / 1; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; transition: opacity .25s ease; }
.gallery__main img.is-fading { opacity: 0; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.thumb {
  aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); opacity: .7; transition: opacity .2s ease, box-shadow .2s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.is-active { opacity: 1; box-shadow: inset 0 0 0 2px var(--ink); }

.buy { display: grid; gap: 22px; padding-top: 6px; }
.buy__lead { color: var(--ink-2); font-size: 1.06rem; max-width: 46ch; }
.price { display: flex; align-items: baseline; gap: 12px; }
.price__value { font-family: var(--font-head); font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; }
.price__note { color: var(--muted); font-size: .9rem; }

.label-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.label { font-weight: 600; font-size: .92rem; }
.label-hint { color: var(--muted); font-size: .85rem; }

.variants { display: grid; gap: 10px; border: 0; margin: 0; padding: 0; }
.variant {
  position: relative; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px;
  padding: 10px 16px 10px 10px; background: var(--surface); border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow .15s ease;
}
.variant:hover { box-shadow: inset 0 0 0 1px #c9c5ba; }
.variant input { position: absolute; opacity: 0; pointer-events: none; }
.variant:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.variant:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }
.variant__img { width: 56px; height: 56px; border-radius: 9px; background: #f2f1ed; object-fit: contain; }
.variant__name { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.variant__dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.variant__meta { color: var(--muted); font-size: .85rem; }
.variant__price { font-weight: 600; }
.variant__badge {
  font-size: .7rem; font-weight: 600; letter-spacing: .02em; padding: 3px 7px; border-radius: 4px;
  background: var(--badge); color: var(--badge-ink); transition: background-color .35s ease, color .35s ease;
}
.variant__badge--muted { background: #efede7; color: var(--ink-2); }

.purchase { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.qty { display: inline-flex; align-items: center; height: 52px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.qty button { width: 44px; height: 52px; border: 0; background: none; font-size: 1.2rem; color: var(--ink-2); }
.qty button:hover { color: var(--ink); }
.qty output { min-width: 22px; text-align: center; font-weight: 600; }

.delivery {
  display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--tint); color: var(--tint-ink); font-size: .92rem; transition: background-color .35s ease, color .35s ease;
}
.delivery svg { flex: none; }

.assurances { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.assurances li { display: grid; justify-items: center; gap: 8px; padding: 14px 8px; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--line); text-align: center; color: var(--ink-2); font-size: .85rem; font-weight: 500; }
.assurances svg { flex: none; color: var(--ink); }

.form-error { color: var(--danger); font-size: .9rem; min-height: 1.2em; }

/* ---------- Bandeau chiffres clés ---------- */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { padding: 28px 20px; text-align: center; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact strong { display: block; font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; letter-spacing: -0.03em; }
.fact span { color: var(--muted); font-size: .88rem; }

/* ---------- Sections génériques ---------- */
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section__head { display: grid; gap: 16px; max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section__head p { color: var(--ink-2); font-size: 1.06rem; }

/* Usages */
.uses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.use { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.use__img { aspect-ratio: 4 / 4.4; overflow: hidden; background: #fff; }
.use__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; transition: transform .6s ease, opacity .3s ease; }
.use__img img.is-fading, .statement__img img.is-fading { opacity: 0; }
.use:hover .use__img img { transform: scale(1.03); }
.use__body { padding: 22px 22px 26px; display: grid; gap: 8px; }
.use__body p { color: var(--ink-2); font-size: .95rem; }

/* Étapes */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 10px; align-content: start; }
.step::before {
  counter-increment: step; content: counter(step);
  font-family: var(--font-head); font-weight: 600; font-size: 2.4rem; line-height: 1; color: #c9c5ba; margin-bottom: 6px;
}
.step p { color: var(--ink-2); font-size: .95rem; }

/* Bloc sombre */
.statement { background: var(--ink); color: #f1f0ec; border-radius: calc(var(--radius) + 6px); overflow: hidden; display: grid; grid-template-columns: 1.1fr .9fr; }
.statement__text { padding: clamp(32px, 6vw, 72px); display: grid; gap: 20px; align-content: center; }
.statement__text h2 { color: #fff; }
.statement__text h2 em { font-style: normal; color: var(--accent); transition: color .35s ease; }
.statement__text p { color: #b9bab5; font-size: 1.04rem; max-width: 44ch; }
.statement__img { background: #fff; display: grid; place-items: center; min-height: 340px; }
.statement__img img { width: 100%; height: 100%; max-height: 520px; object-fit: contain; padding: 32px; transition: opacity .3s ease; }

/* Comparatif */
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: .96rem; }
.compare th, .compare td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { font-family: var(--font-head); font-size: 1.05rem; background: #faf9f6; }
.compare thead th small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .82rem; color: var(--muted); }
.compare tbody th { font-weight: 500; color: var(--muted); width: 34%; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare th[data-col], .compare td[data-col] { transition: background-color .35s ease, box-shadow .35s ease; }
.compare .is-sel { background: var(--sel); }
.compare thead th.is-sel { box-shadow: inset 0 3px 0 var(--badge); }

/* FAQ */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__list { display: grid; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background: linear-gradient(var(--ink), var(--ink)) center / 12px 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 1.5px 12px no-repeat;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 40px 22px 0; color: var(--ink-2); }

/* CTA final */
.final { text-align: center; display: grid; justify-items: center; gap: 22px; }
.final p { color: var(--ink-2); max-width: 48ch; font-size: 1.06rem; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: .9rem; color: var(--muted); }
.footer__grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer__bottom { margin-top: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Barre d'achat mobile */
.sticky-buy {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; display: none;
  align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px;
  background: rgba(18, 19, 20, .94); color: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transform: translateY(140%); transition: transform .3s ease;
}
.sticky-buy.is-visible { transform: none; }
.sticky-buy__info { display: grid; line-height: 1.25; font-size: .85rem; }
.sticky-buy__info strong { font-size: .98rem; }

/* Toast */
.toast {
  position: fixed; left: 50%; top: 84px; z-index: 60; transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; font-size: .92rem; transition: all .3s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* Révélation au scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0s !important; }
}

/* ---------- Pages simples (merci, légal) ---------- */
.page { padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 9vw, 112px); }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 12px; }
.page h2 { font-size: 1.35rem; margin: 40px 0 12px; letter-spacing: -0.015em; }
.page p, .page li { color: var(--ink-2); }
.page p + p { margin-top: 12px; }
.page ul { padding-left: 20px; }
.page .updated { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }
.todo { background: #fff3c4; padding: 0 4px; border-radius: 4px; font-weight: 500; color: #5c4800; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(24px, 4vw, 40px); }
.thanks { display: grid; gap: 18px; justify-items: start; }
.thanks__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); }
.summary { width: 100%; border-collapse: collapse; margin: 8px 0; }
.summary td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary td:last-child { text-align: right; font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.timeline li::before { content: ""; width: 12px; height: 12px; margin: 6px 0 0 6px; border-radius: 50%; background: var(--line); box-shadow: 0 0 0 4px var(--bg); }
.timeline li.is-done::before { background: var(--accent); box-shadow: 0 0 0 1.5px var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .product__grid { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .uses, .steps { grid-template-columns: 1fr; }
  .use { flex-direction: row; }
  .use__img { aspect-ratio: auto; width: 38%; flex: none; }
  .statement { grid-template-columns: 1fr; }
  .statement__img { min-height: 280px; max-height: 420px; }
  .faq { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 640px) {
  .gallery__thumbs { gap: 6px; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .use { flex-direction: column; }
  .use__img { width: 100%; aspect-ratio: 4 / 3; }
  .compare th, .compare td { padding: 13px 12px; font-size: .88rem; }
  .compare tbody th { width: 30%; }
  .announce span:nth-child(n+2) { display: none; }
  .sticky-buy { display: flex; }
  .footer__bottom { flex-direction: column; }
}
