/* Boutique en ligne */
:root {
  --bg: #FBFAF8;
  --surface: #FFFFFF;
  --ink: #1B1A1F;
  --muted: #615D6B;
  --line: #E7E3EC;
  --soft: #F4F1F6;
  --accent: #5B2A86;
  --accent-soft: #EFE7F6;
  --ok: #1E6B3A; --ok-soft: #E3F1E6;
  --warn: #8A5A00; --warn-soft: #FDF1D8;
  --danger: #B3261E; --danger-soft: #FBE4E2;
  --display: "Fraunces", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
html[lang="ar"] { --display: "Tajawal", "Manrope", sans-serif; --body: "Tajawal", system-ui, sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: clamp(24px, 3.4vw, 32px); }
h3 { font-size: 19px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
html[lang="ar"] .eyebrow { letter-spacing: 0; }

/* En-tête */
.head { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.head .wrap { display: flex; align-items: center; gap: 20px; min-height: 68px; flex-wrap: wrap; padding-block: 8px; }
.brand { font-family: var(--display); font-size: 24px; font-weight: 600; text-decoration: none; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; font-weight: 600; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a.on { color: var(--ink); }
.head .spacer { flex: 1; }
.head .tools { display: flex; align-items: center; gap: 10px; }
.langs { display: flex; gap: 4px; }
.langs a { text-decoration: none; font-size: 13px; font-weight: 700; padding: 6px 8px; border-radius: 8px; color: var(--muted); }
.langs a.on { background: var(--soft); color: var(--ink); }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 22px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Boutons et formulaires */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 24px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.wa { background: #1F7A47; border-color: #1F7A47; color: #fff; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .lbl { font-weight: 700; font-size: 14px; }
.field .err { color: var(--danger); font-size: 13px; font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 48px; border: 1px solid #D6D1DE; border-radius: 12px; padding: 10px 14px; font: inherit; background: var(--surface); color: var(--ink);
}
textarea { min-height: 96px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.form .full { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.flash { padding: 14px 18px; border-radius: 14px; font-weight: 600; margin-block: 16px 0; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--danger-soft); color: var(--danger); }
.flash ul { margin: 6px 0 0; padding-inline-start: 20px; font-weight: 500; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }

/* Accueil */
.hero { padding-block: 56px 40px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.hero p { font-size: 18px; color: var(--muted); max-width: 52ch; margin: 16px 0 24px; }
.hero .art { aspect-ratio: 4 / 5; max-height: 440px; width: 100%; max-width: 100%; border-radius: 28px; background: #EFE6DA; display: grid; place-items: center; overflow: hidden; }
.hero .art svg { width: 46%; height: auto; stroke: var(--ink); fill: none; stroke-width: .7; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; padding-block: 20px 40px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.step b { display: block; font-family: var(--display); font-size: 20px; margin-bottom: 6px; font-weight: 600; }
.section { padding-block: 32px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.promo-band { background: var(--accent); color: #fff; text-align: center; padding: 10px 16px; font-weight: 700; font-size: 14px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-block: 28px; } .hero .art { aspect-ratio: 16 / 10; } }

/* Cartes produit */
.grid-p { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.pcard { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.pcard .ph { aspect-ratio: 4 / 5; border-radius: 18px; background: var(--soft); overflow: hidden; display: grid; place-items: center; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph svg { width: 34%; stroke: var(--muted); fill: none; stroke-width: .8; }
.pcard .nm { font-family: var(--display); font-size: 19px; font-weight: 600; }
.pcard .meta { font-size: 14px; color: var(--muted); }
.pcard .pr { font-weight: 800; }
.pcard .was { text-decoration: line-through; color: var(--muted); font-weight: 500; margin-inline-start: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding-block: 16px; }
.filters .field { min-width: 160px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs a { text-decoration: none; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--line); font-weight: 700; font-size: 14px; background: var(--surface); }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Fiche produit */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding-block: 36px; }
.product .ph { aspect-ratio: 4 / 5; border-radius: 24px; background: var(--soft); overflow: hidden; display: grid; place-items: center; }
.product .ph img { width: 100%; height: 100%; object-fit: cover; }
.product .ph svg { width: 34%; stroke: var(--muted); fill: none; stroke-width: .8; }
.product .info { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.notes div { background: var(--soft); border-radius: 14px; padding: 12px; font-size: 14px; }
.notes b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; }
.pick span { display: inline-flex; flex-direction: column; align-items: center; min-width: 76px; padding: 10px 14px; border-radius: 14px; border: 1px solid #D6D1DE; background: var(--surface); font-weight: 700; cursor: pointer; }
.pick span small { font-weight: 600; color: var(--muted); font-size: 12px; }
.pick input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pick input:disabled + span { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.pick input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.price-big { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stars { color: #B7791F; letter-spacing: 2px; }
.review { border-top: 1px solid var(--line); padding-block: 14px; }
@media (max-width: 820px) { .product { grid-template-columns: 1fr; gap: 24px; padding-block: 20px; } .notes { grid-template-columns: 1fr; } }

/* Panier / commande */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: start; padding-block: 28px; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.cline { display: flex; gap: 14px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--line); }
.cline:last-child { border-bottom: none; }
.cline .th { width: 64px; height: 64px; border-radius: 12px; background: var(--soft); flex: none; overflow: hidden; }
.cline .th img { width: 100%; height: 100%; object-fit: cover; }
.cline .tx { flex: 1; min-width: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.tot { display: flex; justify-content: space-between; gap: 12px; padding-block: 4px; }
.tot.big { font-size: 22px; font-weight: 800; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #D6D1DE; border-radius: 14px; padding: 14px; cursor: pointer; }
.opt input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--accent); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.whish { background: var(--warn-soft); border-radius: 14px; padding: 14px; }
.whish .big { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Pied de page */
.foot { margin-top: 48px; background: var(--ink); color: #D9D6E3; padding-block: 36px; }
.foot .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.foot h3 { color: #fff; font-size: 18px; margin-bottom: 8px; }
.foot a { color: #fff; }
.wa-float { position: fixed; inset-inline-end: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 28px; background: #1F7A47; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); z-index: 30; }
.wa-float svg { width: 26px; height: 26px; }

/* Reçu */
.receipt { max-width: 460px; margin: 30px auto; }
