/* Boutique en ligne — couleurs du thème dans /theme.css (--primary, --accent). */
:root {
  --primary: #0e9fc4;
  --accent: #0b2545;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #5f6b7a;
  --line: #e3e8ef;
  --ok: #1a7f4b;
  --warn: #b86e00;
  --bad: #c0392b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .06);
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; line-height: 1.25; margin: .6em 0 .4em; color: var(--accent); }
h2 { font-size: 1.2rem; color: var(--accent); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }

/* ── En-tête ── */
.announce { background: var(--accent); color: #fff; text-align: center; font-size: .9rem; padding: 7px 16px; }
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-row { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.logo img { height: 44px; width: auto; }
.search { flex: 1; display: flex; max-width: 560px; margin-left: auto; }
.search input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-right: 0; border-radius: 999px 0 0 999px; padding: 10px 16px; font: inherit; outline: none; background: var(--bg); }
.search input:focus { border-color: var(--primary); background: #fff; }
.search button { border: 0; background: var(--primary); color: #fff; border-radius: 0 999px 999px 0; padding: 0 16px; cursor: pointer; }
.search svg, .tel svg, .cart-btn svg, .btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.tel { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.cart-btn { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; }
.cart-btn:hover { text-decoration: none; filter: brightness(1.15); }
.cart-btn svg { width: 22px; height: 22px; }
.cart-count { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.cats { border-top: 1px solid var(--line); }
.cats .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cats .wrap::-webkit-scrollbar { display: none; }
.cats a { white-space: nowrap; padding: 10px 12px; color: var(--accent); font-weight: 500; font-size: .92rem; border-bottom: 2px solid transparent; }
.cats a:hover { text-decoration: none; border-bottom-color: var(--primary); color: var(--primary); }

main.wrap { padding-top: 16px; padding-bottom: 48px; min-height: 60vh; }
section { margin: 28px 0; }
.h { margin: 0 0 14px; font-size: 1.35rem; }

/* ── Bannières ── */
.hero { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--accent); box-shadow: var(--shadow); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 3 / 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide a { display: block; height: 100%; }
.slide-text { position: absolute; left: 0; bottom: 0; right: 0; padding: 28px 32px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.slide-text h2 { color: #fff; font-size: 1.8rem; margin: 0; }
.slide-text p { margin: 4px 0 0; font-size: 1.05rem; }
.dots { position: absolute; bottom: 12px; right: 16px; display: flex; gap: 6px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .5); cursor: pointer; padding: 0; }
.dots button.on { background: #fff; width: 24px; border-radius: 999px; }
.hero-plain { border-radius: var(--radius); padding: 48px 32px; color: #fff; background: linear-gradient(120deg, var(--accent), var(--primary)); }
.hero-plain h1 { color: #fff; margin: 0; font-size: 2.2rem; }
.hero-plain p { margin: 8px 0 0; font-size: 1.1rem; opacity: .9; }

/* ── Catégories ── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.cat-tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--accent); transition: transform .15s; }
.cat-tile:hover { text-decoration: none; transform: translateY(-2px); }
.cat-tile img, .cat-tile .noimg { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; background: var(--bg); }
.cat-tile span { font-weight: 600; margin-top: 8px; line-height: 1.25; }
.cat-tile small { color: var(--muted); }

/* ── Cartes produit ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.card-img { display: block; background: #fff; border-bottom: 1px solid var(--line); }
.card-img img, .card-img .noimg { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 10px; }
.noimg { display: grid; place-items: center; background: var(--bg); color: #c2cad5; }
.noimg svg { width: 38%; fill: currentColor; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.card h3 { font-size: .98rem; margin: 0; line-height: 1.3; flex: 1; }
.card h3 a { color: var(--text); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 700; color: var(--accent); font-size: 1.05rem; }
.price small { font-weight: 400; color: var(--muted); font-size: .72rem; margin-left: 4px; }
.price.big { font-size: 1.7rem; margin: 6px 0; }
.price.big small { font-size: .85rem; }
.badge { font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.ok { color: var(--ok); background: #e6f4ec; }
.badge.low { color: var(--warn); background: #fdf1dc; }
.badge.out { color: var(--bad); background: #fbe7e5; }

/* ── Boutons et champs ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--line); background: #fff; color: var(--accent); border-radius: 10px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; transition: filter .15s, background .15s; }
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.block { width: 100%; padding: 13px; font-size: 1.02rem; }
.btn.small { padding: 5px 10px; font-size: .85rem; }
.btn.add { width: 100%; margin-top: 4px; background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.add.done { background: var(--ok); border-color: var(--ok); }
label { display: block; font-weight: 600; font-size: .88rem; color: var(--accent); margin: 10px 0; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; font-weight: 400; color: var(--text); background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input.invalid { border-color: var(--bad); }

/* ── Listes ── */
.crumbs { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.list-head h1 { margin: .4em 0 0; }
.sort label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; }
.sort select { width: auto; margin: 0; }
.empty { color: var(--muted); padding: 32px 0; text-align: center; }

/* ── Fiche article ── */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-top: 12px; }
.gallery-main img, .gallery-main .noimg { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: #fff; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs button { flex: 0 0 72px; height: 72px; border: 2px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.thumbs button.on { border-color: var(--primary); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product-info h1 { margin-top: 0; }
.sub { color: var(--muted); margin: -4px 0 4px; }
.ref { font-size: .82rem; color: var(--muted); margin: 0; }
.note { color: var(--warn); font-weight: 600; }
.buy { display: flex; align-items: flex-end; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.buy label { margin: 0; }
.buy input { width: 110px; }
.buy .btn { padding: 11px 20px; }
.tiers { border-collapse: collapse; margin: 10px 0; font-size: .9rem; }
.tiers caption { text-align: left; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.tiers th, .tiers td { border: 1px solid var(--line); padding: 5px 12px; text-align: left; }
.tiers th { background: var(--bg); font-weight: 600; }
.perks { list-style: none; padding: 12px 16px; margin: 0; background: var(--bg); border-radius: 10px; font-size: .9rem; }
.perks li { padding: 3px 0; }
.perks li::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.desc { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 8px; }

/* ── Panier ── */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.cart-lines { display: flex; flex-direction: column; gap: 10px; }
.line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; }
.line img, .line .noimg { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; background: #fff; }
.line .noimg svg { width: 50%; }
.line-name { font-weight: 600; color: var(--text); }
.line-unit { font-size: .82rem; color: var(--muted); }
.line-problem { font-size: .82rem; color: var(--bad); font-weight: 600; }
.qty { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { border: 0; background: var(--bg); width: 32px; height: 36px; font-size: 1.1rem; cursor: pointer; color: var(--accent); }
.qty input { width: 56px; border: 0; margin: 0; text-align: center; padding: 6px 2px; border-radius: 0; box-shadow: none; }
.line-total { font-weight: 700; color: var(--accent); text-align: right; min-width: 100px; }
.line-remove { border: 0; background: none; color: var(--muted); font-size: .8rem; cursor: pointer; padding: 2px 0; text-decoration: underline; }
.box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.box h2 { margin: 0 0 10px; font-size: 1.1rem; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary .total { font-size: 1.2rem; color: var(--accent); font-weight: 700; border-top: 1px solid var(--line); padding-top: 8px; }
.cart-side { position: sticky; top: 140px; }
.modes { display: grid; gap: 8px; }
.mode { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; cursor: pointer; font-weight: 400; }
.mode:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, #fff); }
.mode input { width: auto; margin: 3px 0 0; }
.mode b { display: block; color: var(--accent); }
.mode small { color: var(--muted); }
.checkout h2 { margin-top: 18px; }
.checkout h2:first-child { margin-top: 0; }
.form-error { color: var(--bad); font-weight: 600; background: #fbe7e5; border-radius: 8px; padding: 8px 12px; }
.cart-empty { text-align: center; padding: 40px 0; }

/* ── Suivi de commande ── */
.order { max-width: 760px; }
.lead { font-size: 1.08rem; }
.steps { list-style: none; display: flex; padding: 0; margin: 20px 0; counter-reset: s; }
.steps li { flex: 1; text-align: center; position: relative; color: var(--muted); font-size: .88rem; counter-increment: s; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; background: var(--line); color: #fff; font-weight: 700; }
.steps li.done { color: var(--accent); font-weight: 600; }
.steps li.done::before { content: '✓'; background: var(--ok); }
table.lines { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 16px 0; }
.lines th, .lines td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.lines .num { text-align: right; white-space: nowrap; }
.lines tfoot th { font-size: 1.05rem; color: var(--accent); }
.message, .prose { max-width: 760px; margin: 24px auto; background: var(--card); padding: 24px 28px; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ── Pied de page ── */
.foot { background: var(--accent); color: #d7e2ee; padding: 36px 0 18px; margin-top: 24px; }
.foot a { color: #fff; }
.foot h4 { color: #fff; margin: 0 0 10px; }
.foot p { margin: 4px 0; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-logo { height: 40px; width: auto; background: #fff; border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; }
.social a { margin-right: 12px; }
.copy { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 24px; padding-top: 14px; font-size: .82rem; }

/* ── Notification ── */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--accent); color: #fff; padding: 12px 20px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); z-index: 50; max-width: calc(100% - 32px); }
.toast a { color: #fff; font-weight: 700; text-decoration: underline; margin-left: 8px; }

/* ── Petits écrans ── */
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .cart { grid-template-columns: 1fr; }
  .cart-side { position: static; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .top-row { flex-wrap: wrap; gap: 10px; }
  .logo img { height: 36px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .tel span { display: none; }
  .tel { margin-left: auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-body { padding: 10px; }
  .card h3 { font-size: .9rem; }
  .slide { aspect-ratio: 16 / 9; }
  .slide-text { padding: 16px; }
  .slide-text h2 { font-size: 1.25rem; }
  .hero-plain { padding: 32px 20px; }
  .line { grid-template-columns: 56px minmax(0, 1fr); }
  .line img, .line .noimg { width: 56px; height: 56px; }
  .line .qty, .line .line-total { grid-column: 2; }
  .line-total { text-align: left; }
  h1 { font-size: 1.4rem; }
}
