/* Mise en page claire et aérée : carrousel photo en tête, rayons en cartes photo colorées,
   grilles produits auto-fill, panier en tiroir à droite. Chaque rayon porte sa couleur (--c). */
:root {
  --bg: #F7F8FC; --surface: #FFFFFF; --ink: #161A2E; --muted: #5E6580; --line: #E4E7F1;
  --accent: #2F5BFF; --accent-ink: #FFFFFF; --accent-soft: #E8EDFF; --sun: #FFC93C;
  --sale: #E8364F; --ok: #0E9F6E; --star: #E9A100;
  --tile-a: 96%; --tile-b: 86%; --glyph-l: 38%;
  --veil: rgba(22, 26, 46, .45); --shadow: 0 24px 60px rgba(40, 52, 110, .16); --shadow-s: 0 6px 20px rgba(40, 52, 110, .08);
  --f-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --f-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --r: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1220; --surface: #181C2E; --ink: #EEF0F8; --muted: #A2A9C2; --line: #2A3048;
    --accent: #7C97FF; --accent-ink: #0B0E1A; --accent-soft: #222B55; --sun: #FFD25E;
    --sale: #FF6B81; --ok: #34D399; --star: #FFC94D;
    --tile-a: 24%; --tile-b: 16%; --glyph-l: 78%;
    --veil: rgba(0, 0, 0, .6); --shadow: 0 24px 60px rgba(0, 0, 0, .5); --shadow-s: 0 6px 20px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1220; --surface: #181C2E; --ink: #EEF0F8; --muted: #A2A9C2; --line: #2A3048;
  --accent: #7C97FF; --accent-ink: #0B0E1A; --accent-soft: #222B55; --sun: #FFD25E;
  --sale: #FF6B81; --ok: #34D399; --star: #FFC94D;
  --tile-a: 24%; --tile-b: 16%; --glyph-l: 78%;
  --veil: rgba(0, 0, 0, .6); --shadow: 0 24px 60px rgba(0, 0, 0, .5); --shadow-s: 0 6px 20px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.6 var(--f-body); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
img, svg { max-width: 100%; display: block; }

.wrap {
  max-width: 1280px; margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Bandeau d'info + en-tête */
.info { background: var(--ink); color: var(--bg); font-size: 13px; text-align: center; }
.info .wrap { padding-block: 8px; }
.info b { color: var(--sun); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.logo { font: 700 24px/1 var(--f-display); text-decoration: none; letter-spacing: -.03em; display: inline-flex; align-items: center; gap: 8px; }
.logo i { width: 26px; height: 26px; border-radius: 8px; background: conic-gradient(from 200deg, #2F6BFF, #D946EF, #F43F5E, #F59E0B, #10B981, #06B6D4, #2F6BFF); }
.nav { display: flex; gap: 6px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
.nav a { white-space: nowrap; text-decoration: none; padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 14.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.nav a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.nav a:hover { color: var(--ink); background: var(--bg); }
.nav a[aria-current="page"] { color: #fff; background: var(--c); }
.nav a[aria-current="page"]::before { background: #fff; }
.cart-btn { display: inline-flex; align-items: center; gap: 10px; border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 10px 18px; font-weight: 700; box-shadow: var(--shadow-s); }
.cart-btn:hover { filter: brightness(1.08); }
.badge { min-width: 24px; padding: 1px 7px; border-radius: 999px; background: var(--sun); color: #1A1A1A; font: 700 12px/22px var(--f-mono); text-align: center; }
@media (max-width: 820px) {
  .top-in { flex-wrap: wrap; row-gap: 10px; }
  .nav { order: 3; flex-basis: 100%; }
  .cart-btn { margin-left: auto; }
}

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 24px; font-weight: 700; text-decoration: none; background: var(--accent); color: var(--accent-ink); transition: transform .15s, filter .15s; }
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.light { background: #fff; color: #161A2E; }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.full { width: 100%; }

/* Carrousel */
.carousel { position: relative; margin-top: 28px; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: var(--ink); }
.track { display: flex; transition: transform .6s cubic-bezier(.22, .8, .25, 1); touch-action: pan-y; }
.slide { position: relative; flex: 0 0 100%; min-height: clamp(380px, 44vw, 540px); display: flex; align-items: center; }
.slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 92%, #000 8%) 0%, color-mix(in srgb, var(--c) 70%, transparent) 38%, transparent 68%); }
.slide-text { position: relative; z-index: 1; color: #fff; padding: 40px clamp(24px, 7vw, 96px); max-width: 640px; display: grid; gap: 14px; justify-items: start; }
.chip { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .22); backdrop-filter: blur(6px); font: 600 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.slide h2 { font: 700 clamp(28px, 4.4vw, 52px)/1.05 var(--f-display); letter-spacing: -.03em; text-shadow: 0 2px 20px rgba(0, 0, 0, .15); }
.slide p { margin: 0; font-size: 17px; opacity: .95; max-width: 40ch; }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #161A2E; font-size: 22px; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); }
.car-btn:hover { background: #fff; }
.car-btn.prev { left: 16px; } .car-btn.next { right: 16px; }
.dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .55); transition: width .3s, background .3s; }
.dots button[aria-current="true"] { width: 32px; background: #fff; }
@media (max-width: 640px) {
  .slide { align-items: flex-end; }
  .slide::after { background: linear-gradient(0deg, color-mix(in srgb, var(--c) 92%, #000 8%) 0%, color-mix(in srgb, var(--c) 60%, transparent) 50%, transparent 80%); }
  .slide-text { padding-bottom: 56px; }
  .car-btn { display: none; }
}

/* Sections */
.section { padding-block: 56px 8px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head h2 { font: 700 clamp(24px, 3vw, 32px)/1.15 var(--f-display); letter-spacing: -.03em; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.eyebrow { font: 600 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 10px; }

/* Rayons */
.rayons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 980px) { .rayons { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .rayons { grid-template-columns: 1fr; } }
.rayon { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; text-decoration: none; box-shadow: var(--shadow-s); transition: transform .2s, box-shadow .2s; }
.rayon:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.rayon .ph { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.rayon .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.rayon:hover .ph img { transform: scale(1.05); }
.rayon .ph .chip { position: absolute; left: 14px; top: 14px; background: var(--c); color: #fff; backdrop-filter: none; }
.rayon .txt { padding: 18px 20px 22px; display: grid; gap: 6px; }
.rayon h3 { font: 700 19px/1.2 var(--f-display); letter-spacing: -.02em; }
.rayon .meta { font: 12.5px/1.4 var(--f-mono); color: var(--muted); }
.rayon p { margin: 0; font-size: 14.5px; color: var(--muted); }
.rayon .go { margin-top: 6px; font-weight: 700; font-size: 14.5px; color: var(--c); }

/* Avantages */
.assur { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.assur div { background: var(--surface); border-radius: var(--r); padding: 22px; display: grid; gap: 4px; box-shadow: var(--shadow-s); }
.assur i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-style: normal; font-size: 20px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); margin-bottom: 8px; }
.assur b { font-size: 16px; }
.assur span { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .assur { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .assur { grid-template-columns: 1fr; } }

/* Vignette produit (illustration colorée) */
.tile { display: grid; place-items: center; aspect-ratio: 1; width: 100%; max-width: 100%; border: 0; padding: 0;
  background: radial-gradient(circle at 30% 25%, hsl(var(--h) 95% var(--tile-a)), hsl(calc(var(--h) + 35) 85% var(--tile-b)));
  color: hsl(var(--h) 70% var(--glyph-l)); }
.tile svg { width: 46%; height: 46%; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 6px 10px hsl(var(--h) 60% 40% / .18)); transition: transform .3s; }

/* Page rayon : bannière photo */
.banner { position: relative; margin-top: 24px; border-radius: 28px; overflow: hidden; min-height: 240px; display: flex; align-items: end; box-shadow: var(--shadow); }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 92%, #000 8%) 0%, color-mix(in srgb, var(--c) 55%, transparent) 50%, transparent 85%); }
.banner-text { position: relative; z-index: 1; color: #fff; padding: 32px clamp(22px, 4vw, 48px); display: grid; gap: 10px; max-width: 620px; }
.banner h1 { font: 700 clamp(30px, 4.5vw, 50px)/1.05 var(--f-display); letter-spacing: -.03em; }
.banner p { margin: 0; font-size: 16.5px; opacity: .95; }
.crumbs { font: 12.5px/1 var(--f-mono); opacity: .9; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 14px 16px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-s); margin: 28px 0 24px; }
.toolbar input[type="search"], .toolbar select { padding: 11px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--bg); }
.toolbar input[type="search"] { flex: 1 1 220px; min-width: 0; }
.toolbar label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.toolbar input[type="range"] { accent-color: var(--c); width: 140px; }
.toolbar output { font: 600 13px var(--f-mono); color: var(--ink); min-width: 74px; font-variant-numeric: tabular-nums; }
.toolbar input[type="checkbox"] { accent-color: var(--c); width: 17px; height: 17px; }
.count { font: 600 13px/1 var(--f-mono); color: var(--muted); margin-left: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-s); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card:hover .tile svg { transform: scale(1.08) rotate(-3deg); }
.card .tile { aspect-ratio: 4 / 3; cursor: pointer; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; min-width: 0; }
.ref { font: 11.5px/1.3 var(--f-mono); color: var(--muted); letter-spacing: .02em; }
.ref .lim { color: var(--sale); font-weight: 600; }
.card h3 { font: 700 15.5px/1.35 var(--f-body); }
.card h3 button { all: unset; cursor: pointer; }
.card h3 button:hover { color: var(--accent); }
.card h3 button:focus-visible { outline: 2px solid var(--accent); }
.spec { margin: 0; font-size: 13.5px; color: var(--muted); }
.stars { font-size: 13px; color: var(--muted); }
.stars b { color: var(--star); font-weight: 700; }
.buy { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin-top: auto; padding-top: 10px; }
.price { font: 700 19px/1.1 var(--f-mono); font-variant-numeric: tabular-nums; }
.price s { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.add { border: 0; border-radius: 999px; padding: 9px 16px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13.5px; white-space: nowrap; transition: background .15s, color .15s; }
.add:hover { background: var(--accent); color: var(--accent-ink); }
.promo { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: var(--sale); color: #fff; font: 700 12px/1.3 var(--f-mono); box-shadow: 0 4px 12px rgba(232, 54, 79, .3); }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); background: var(--surface); border-radius: var(--r); }

.others { display: flex; flex-wrap: wrap; gap: 10px; }
.others a { text-decoration: none; padding: 10px 18px; border-radius: 999px; background: var(--surface); font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-s); display: inline-flex; align-items: center; gap: 8px; }
.others a::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.others a:hover { color: var(--c); }

/* Fenêtre produit */
.veil { position: fixed; inset: 0; background: var(--veil); backdrop-filter: blur(3px); z-index: 40; }
.modal { position: fixed; z-index: 50; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(800px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1.1fr; }
.modal .tile { aspect-ratio: auto; min-height: 280px; height: 100%; }
.modal-body { padding: 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.modal-body h2 { font: 700 23px/1.2 var(--f-display); letter-spacing: -.02em; padding-right: 30px; }
.modal-body ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14.5px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { border: 0; background: transparent; width: 36px; height: 36px; font-size: 16px; }
.qty button:hover { background: var(--bg); }
.qty span { min-width: 30px; text-align: center; font: 600 14px var(--f-mono); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg); font-size: 18px; line-height: 1; }
@media (max-width: 640px) { .modal { grid-template-columns: 1fr; } .modal .tile { min-height: 180px; } }

/* Panier */
.drawer { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); padding-right: env(safe-area-inset-right, 0px); border-radius: 24px 0 0 24px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font: 700 19px/1.2 var(--f-display); }
.drawer-head .close { position: static; }
.drawer-main { flex: 1; overflow: auto; padding: 14px 22px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 18px 22px; display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line); }
.line .tile { border-radius: 12px; }
.line .tile svg { width: 60%; height: 60%; }
.line-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.line-sub { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.line .qty button { width: 28px; height: 28px; }
.line .qty span { min-width: 24px; font-size: 13px; }
.rm { border: 0; background: none; color: var(--muted); font-size: 12.5px; text-decoration: underline; padding: 0; }
.line-price { font: 700 14px var(--f-mono); font-variant-numeric: tabular-nums; }
.sum { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.sum b { font-family: var(--f-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.sum.total { font-size: 18px; color: var(--ink); font-weight: 700; }
.hint { font-size: 13px; color: var(--ok); margin: 0; font-weight: 600; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.form input { padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); }
.form .two { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.form fieldset { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0; display: grid; gap: 6px; }
.form fieldset label { display: flex; gap: 8px; align-items: center; color: var(--ink); font-size: 14px; }
.form legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.err { color: var(--sale); font-size: 13px; margin: 0; }
.done { text-align: center; padding: 36px 6px; display: grid; gap: 12px; justify-items: center; }
.done .num { font: 700 20px var(--f-mono); color: var(--accent); }
.note { font-size: 12.5px; color: var(--muted); margin: 0; }

/* Notification */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

footer { margin-top: 72px; background: var(--surface); border-top: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 28px; font-size: 13.5px; color: var(--muted); }
.foot .credit { flex-basis: 100%; font-size: 12px; }

@media (prefers-reduced-motion: reduce) { *, .track { transition: none !important; } }
