/* Landing page — mobile d'abord. La couleur d'accent et le thème viennent du produit (base de données). */
:root {
  --accent: #e4572e;
  --bg: #fbf8f4;
  --card: #ffffff;
  --text: #1d1a17;
  --muted: #6d665f;
  --line: #e6dfd6;
  --ok: #1c7c4a;
  --err: #b3261e;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[data-theme="dark"] {
  --bg: #0e0d1a;
  --card: #181730;
  --text: #f1effa;
  --muted: #a7a3c4;
  --line: #2c2a4a;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.55; padding-bottom: 76px; }
img { max-width: 100%; display: block; }
.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* En-tête */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.brand { font-weight: 800; font-size: 1.15rem; letter-spacing: .01em; }
.brand::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .35em; border-radius: 50%; background: var(--accent); }

.state { text-align: center; color: var(--muted); padding: 4rem 1rem; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .85rem 1.3rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .08s, box-shadow .15s, background .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; font-size: 1.05rem; padding: 1rem; }
.btn[disabled] { opacity: .6; cursor: wait; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, white); outline-offset: 2px; }

/* Héros */
.hero { display: grid; gap: 1.5rem; padding-block: 1.25rem 2rem; }
.gallery-main { aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .ph { padding: 2rem; text-align: center; font-weight: 800; font-size: 1.6rem; color: #fff; width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #000)); }
.gallery-thumbs { display: flex; gap: .6rem; margin-top: .7rem; overflow-x: auto; padding-bottom: .2rem; }
.gallery-thumbs button { flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--card); cursor: pointer; opacity: .7; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--accent); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

h1 { font-size: clamp(1.6rem, 5.5vw, 2.4rem); line-height: 1.15; margin: 0 0 .4rem; }
.tagline { margin: 0 0 .8rem; color: var(--muted); font-size: 1.05rem; }
.price { font-size: 2rem; font-weight: 800; color: var(--accent); margin: .2rem 0 1rem; }
.desc p { margin: 0 0 .7rem; }
.desc ul { padding-left: 0; list-style: none; margin: 0 0 .9rem; }
.desc li { padding-left: 1.7rem; position: relative; margin-bottom: .45rem; }
.desc li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.trust { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .35rem; font-size: .95rem; color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }

/* Formulaire */
#commande { padding-bottom: 2rem; scroll-margin-top: 70px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; }
.form { max-width: 640px; margin-inline: auto; display: grid; gap: 1rem; }
.form h2 { margin: 0; font-size: 1.5rem; }
.form > .muted { margin: -.5rem 0 0; }
.grid2 { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; border: 0; padding: 0; margin: 0; font-weight: 600; font-size: .95rem; min-width: 0; }
.field legend, .label { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: .35rem; }
input, select { font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: .75rem .85rem; width: 100%; min-height: 48px; }
input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input.invalid, select.invalid { border-color: var(--err); }
select:disabled { opacity: .6; }
.hint { font-weight: 400; font-size: .82rem; color: var(--muted); min-height: 1.1em; }
.hint.ok { color: var(--ok); }
.hint.bad, .error { color: var(--err); }
.error { background: color-mix(in srgb, var(--err) 10%, transparent); border: 1px solid color-mix(in srgb, var(--err) 40%, transparent); padding: .7rem .9rem; border-radius: 10px; margin: 0; font-weight: 600; }

.choices { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.choice-body { display: grid; gap: .1rem; padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); transition: border-color .15s, background .15s; }
.choice-body small { color: var(--muted); font-weight: 500; }
.choice input:checked + .choice-body { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.choice input:focus-visible + .choice-body { outline: 3px solid color-mix(in srgb, var(--accent) 60%, white); outline-offset: 2px; }

.qty { display: grid; grid-template-columns: 48px 1fr 48px; gap: .4rem; }
.qty button { border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font-size: 1.4rem; border-radius: 10px; cursor: pointer; min-height: 48px; }
.qty button:hover { border-color: var(--accent); }
.qty input { text-align: center; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.promo { display: grid; grid-template-columns: 1fr auto; gap: .4rem; }
.promo .btn { padding: .5rem 1rem; min-height: 48px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.summary { background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; padding: .9rem 1rem; display: grid; gap: .4rem; }
.summary .row { display: flex; justify-content: space-between; gap: 1rem; }
.summary .row em { font-style: normal; color: var(--ok); }
.summary .total { border-top: 1px solid var(--line); padding-top: .55rem; margin-top: .15rem; font-size: 1.2rem; }
.summary .total b { color: var(--accent); }
.summary p { margin: .2rem 0 0; }

.footer { padding: 1.5rem 0 2rem; text-align: center; color: var(--muted); font-size: .9rem; }

/* Bouton appel de l'en-tête : visible seulement sur grand écran (sur mobile, la barre fixe le remplace) */
.topbar .btn-call-top { display: none; padding: .45rem .9rem; font-size: .9rem; }

/* Barre fixe mobile */
.sticky { position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: 1fr 1.4fr; gap: .6rem; padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.sticky .btn { padding: .75rem; }

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .sticky { display: none; }
  .topbar .btn-call-top { display: inline-flex; }
  .hero { grid-template-columns: 1.05fr 1fr; gap: 2.5rem; align-items: start; padding-block: 2rem 3rem; }
  .gallery { position: sticky; top: 76px; }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .card { padding: 2rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }

/* Page de confirmation */
.thanks { max-width: 560px; margin: 3rem auto; text-align: center; display: grid; gap: .9rem; }
.thanks .tick { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 2.2rem; color: #fff; background: var(--ok); }
.thanks h1 { margin: 0; }
.thanks .ref { font-weight: 800; font-size: 1.3rem; color: var(--accent); }
.thanks ul { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .5rem; text-align: left; }
.thanks li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
