:root {
  --bg: #fdf7f8;
  --surface: #ffffff;
  --ink: #2b1a22;
  --muted: #86707b;
  --line: #f1e1e6;
  --brand: #c2185b;
  --brand-ink: #ffffff;
  --accent: #9c7424;
  --accent-soft: #fbeef2;
  --ok: #2f7d5b;
  --danger: #b23a3a;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(42, 26, 46, .08);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fraunces', Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1216; --surface: #251a20; --ink: #f6ecf0; --muted: #bba5af; --line: #3a2a32;
    --brand: #f06292; --brand-ink: #1f0f16; --accent: #e0b862; --accent-soft: #3a2630;
    --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

.announce { background: var(--brand); color: var(--brand-ink); text-align: center; font-size: 13px; font-weight: 600; padding: 7px 16px; }
.announce:empty { display: none; }

.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-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 22px; text-decoration: none; color: var(--brand); white-space: nowrap; }
.search { flex: 1; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { border: 0; outline: 0; background: none; height: 40px; width: 100%; min-width: 0; }
.search:focus-within { border-color: var(--brand); }
.cart-btn { position: relative; border: 0; background: none; padding: 8px; border-radius: 50%; }
.cart-btn svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge { position: absolute; top: 0; right: 0; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }

.hero { text-align: center; padding: 36px 16px 8px; }
.hero h1 { font-family: var(--display); font-size: clamp(30px, 6vw, 48px); margin: 0; color: var(--brand); letter-spacing: -.01em; }
.hero p { color: var(--muted); margin: 8px 0 0; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 12px; }
.section-head h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.carousel-nav button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 20px; line-height: 1; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 1fr); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.carousel::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .carousel { grid-auto-columns: calc((100% - 4 * 14px) / 5); } }
.mini { scroll-snap-align: start; border: 0; background: none; text-align: center; padding: 0; }
.mini .thumb { aspect-ratio: 4/5; border-radius: var(--radius); }
.mini b { display: block; font-weight: 600; font-size: 14px; margin-top: 8px; }
.mini span { color: var(--accent); font-weight: 700; font-size: 14px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 32px 0 8px; position: sticky; top: 64px; z-index: 5; background: var(--bg); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.results-info { color: var(--muted); font-size: 13px; margin: 8px 0 12px; min-height: 1em; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card .thumb { aspect-ratio: 1; cursor: pointer; border-radius: 0; }
.card-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .cat { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.card h3 { font-size: 15px; margin: 0; font-weight: 600; cursor: pointer; }
.price { font-weight: 700; color: var(--brand); }
.tier-hint { font-size: 12px; color: var(--ok); }
.card .btn { margin-top: auto; }
.card-tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.tag { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; }
.tag.dark { background: var(--ink); color: var(--bg); }
.tag.muted { background: #8a8090; }
.empty { grid-column: 1 / -1; text-align: center; padding: 48px 16px; color: var(--muted); }

.thumb { position: relative; background: var(--accent-soft); overflow: hidden; display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { font-family: var(--display); font-size: 42px; color: var(--accent); opacity: .7; }
.thumb .count { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 10px; }

.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 13px; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.footer { margin-top: 64px; padding: 32px 0; border-top: 1px solid var(--line); text-align: center; font-size: 14px; }
.footer strong { font-family: var(--display); font-size: 20px; color: var(--brand); }
.footer p { margin: 6px 0; }

.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #1f9d55; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(31,157,85,.4); z-index: 30; }
.wa-float svg { width: 30px; height: 30px; }

/* Fiche produit */
.modal { border: 0; padding: 0; border-radius: 20px; width: min(920px, calc(100% - 24px)); max-height: calc(100dvh - 24px); background: var(--surface); color: var(--ink); }
.modal::backdrop { background: rgba(20, 10, 22, .55); }
.pm { display: grid; grid-template-columns: 1fr; position: relative; }
@media (min-width: 760px) { .pm { grid-template-columns: 1.05fr 1fr; } }
.close { position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 22px; line-height: 1; }
.pm-gallery { position: relative; background: var(--accent-soft); }
.pm-main { aspect-ratio: 1; }
.pm-main .thumb { width: 100%; height: 100%; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #222; font-size: 22px; }
.gal-nav.prev { left: 10px; } .gal-nav.next { right: 10px; }
.pm-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.pm-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.6); }
.pm-dots i.on { background: #fff; width: 18px; border-radius: 4px; }
.pm-info { padding: 24px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.pm-info h2 { font-family: var(--display); font-size: 28px; margin: 0; line-height: 1.15; }
.pm-price { font-size: 22px; font-weight: 700; color: var(--accent); margin: 0; }
.pm-desc { color: var(--muted); margin: 0; white-space: pre-line; }
.pm-desc:empty { display: none; }
.pill { align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }
.tiers { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tiers li { font-size: 12px; font-weight: 600; color: var(--ok); border: 1px dashed var(--ok); border-radius: 8px; padding: 3px 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; width: 100%; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.field .req { color: var(--danger); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; width: max-content; }
.qty button { width: 38px; height: 38px; border: 0; background: var(--bg); font-size: 18px; }
.qty input { width: 54px; height: 38px; border: 0; text-align: center; background: var(--surface); -moz-appearance: textfield; padding: 0; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stock { font-size: 12px; font-weight: 700; color: var(--danger); text-transform: uppercase; margin: 0; }
.stock.ok { color: var(--ok); }
.line-total { margin: 0; font-size: 14px; color: var(--muted); }

/* Tiroir panier */
.drawer { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(20, 10, 22, .5); opacity: 0; transition: opacity .2s; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .25s ease; }
.drawer.open { pointer-events: auto; }
.drawer.open .drawer-backdrop { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); position: relative; }
.drawer-head h2 { margin: 0; font-family: var(--display); font-size: 22px; }
.drawer-head .close { position: static; box-shadow: none; background: var(--bg); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.drawer-foot:empty { display: none; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; }
.line .thumb { width: 64px; height: 64px; border-radius: 10px; }
.line .thumb .ph { font-size: 22px; }
.line h4 { margin: 0; font-size: 14px; }
.line small { color: var(--muted); display: block; }
.line .qty button { width: 30px; height: 30px; font-size: 15px; }
.line .qty input { width: 38px; height: 30px; }
.line-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.link-btn { border: 0; background: none; color: var(--danger); font-size: 12px; padding: 0; text-decoration: underline; }
.sum { display: flex; justify-content: space-between; font-size: 14px; }
.sum.total { font-size: 18px; font-weight: 700; }
.choices { display: flex; flex-direction: column; gap: 6px; }
.choice { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--accent-soft); }
.choice span { flex: 1; } .choice em { font-style: normal; color: var(--muted); font-size: 13px; }
.error { color: var(--danger); font-size: 13px; margin: 0; }
.success { text-align: center; padding: 24px 0; }
.success .check { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; font-size: 32px; margin: 0 auto 12px; }
.success h3 { font-family: var(--display); font-size: 24px; margin: 0 0 6px; }
.order-no { font-family: ui-monospace, monospace; background: var(--bg); padding: 4px 10px; border-radius: 6px; font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-size: 14px; opacity: 0; transition: .2s; z-index: 60; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 560px) {
  .topbar-inner { gap: 10px; }
  .logo { font-size: 18px; }
  .search input { height: 36px; font-size: 14px; }
  .card-body { padding: 10px; }
  .card h3 { font-size: 14px; }
}
