:root {
    --red: #d7262e;
    --red-dark: #b51d24;
    --ink: #1d1d1f;
    --muted: #6b6b70;
    --line: #e4e4e8;
    --bg: #f6f6f8;
    --card: #fff;
    --ok: #1a7f37;
    --ok-bg: #e9f6ec;
    --warn-bg: #fff8e1;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
body { min-height: 100vh; display: flex; flex-direction: column; }   /* pied de page en bas de l'écran */
.hero, .shop, .page { width: 100%; }   /* sinon les blocs centrés se rétrécissent dans le body en flex */
img { display: block; }
button, input { font: inherit; }
a { color: var(--red); }
.muted { color: var(--muted); font-size: 14px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.money { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* En-tête */
.test-banner { background: #fff1c2; color: #6b5200; text-align: center; font-weight: 700; font-size: 14px; padding: 8px 16px; border-bottom: 2px dashed #e0b400; }
.head { background: #fff; border-bottom: 1px solid var(--line); }
.head .in { max-width: 1180px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.head .logo { height: 34px; width: auto; }
.head .shokz { height: 30px; width: auto; }
.head-right { display: flex; align-items: center; gap: 20px; }
.account-menu { position: relative; outline: none; }
.account-btn { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; cursor: default; font-size: 14px; font-weight: 600; max-width: 260px; }
.account-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head-links { font-size: 13px; color: var(--muted); white-space: nowrap; }
.head-links a { color: inherit; }
.head-links a:hover { color: var(--ink); }
.account-pop { display: none; position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 14px 16px; font-size: 14px; }
.account-pop span, .account-pop strong, .account-pop a { display: block; margin-top: 3px; }
.account-pop a { margin-top: 10px; }
.account-menu:hover .account-pop, .account-menu:focus-within .account-pop { display: block; }

/* Pages simples */
.page { max-width: 820px; margin: 0 auto; padding: 32px 16px 48px; }
.page.narrow { max-width: 600px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; }
.panel h1 { margin: 0 0 14px; font-size: 24px; }
.panel .big { font-size: 18px; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.phone { font-size: 18px; font-weight: 700; margin: 4px 0 16px; }
.alert { background: #fdecea; color: #a4161a; border-radius: 8px; padding: 10px 14px; }
.link-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.link-form .row { display: flex; gap: 8px; flex-wrap: wrap; }
.link-form input { flex: 1 1 240px; padding: 11px 12px; border: 1px solid #c7c7cc; border-radius: 8px; }
.accounts { display: grid; gap: 10px; margin: 16px 0 20px; }
.acc { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; }
.acc:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.acc input { margin-top: 4px; accent-color: var(--red); }
.acc span span, .acc strong { display: block; }
.acc span span { color: var(--muted); font-size: 14px; }
.done-list { padding-left: 20px; }
.done-list li { margin: 6px 0; }
.mail-preview { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }

/* Bandeau de l'opération */
.hero { max-width: 1180px; margin: 0 auto; padding: 20px 16px 8px; }
.hero h1 { margin: 0 0 10px; font-size: 26px; letter-spacing: -.01em; }
.hero .banner { width: 100%; height: auto; border-radius: 10px; margin-bottom: 16px; }
.hero .info { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.hero .intro { max-width: 760px; margin: 0 0 14px; color: #3a3a3c; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.facts li { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 14px; }
.facts li b { font-weight: 600; }
.facts li.deadline { border-color: var(--red); color: var(--red-dark); }
.facts li.franco { border-color: var(--ok); color: var(--ok); }
.ship-rules { font-size: 13px; color: var(--muted); margin: 0; }
.delivery-note { font-size: 14px; font-weight: 600; margin: 0 0 4px; }

.shop { max-width: 1180px; margin: 0 auto; padding: 8px 16px 24px; }
.views { display: flex; gap: 0; align-items: center; justify-content: flex-end; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.views button { border: 1px solid #c7c7cc; background: #fff; padding: 5px 14px; cursor: pointer; color: var(--ink); margin-left: -1px; }
.views button:first-of-type { border-radius: 8px 0 0 8px; }   /* un seul bloc à 3 positions */
.views button:last-of-type { border-radius: 0 8px 8px 0; }
.views button.on { background: var(--ink); color: #fff; border-color: var(--ink); position: relative; }
.views span { margin-right: 8px; }

/* Commun aux présentations */
.was { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.op { color: var(--red-dark); font-weight: 700; }
.badge { display: inline-block; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 1px 6px; vertical-align: 1px; }
.tag { display: inline-block; border: 1px solid var(--line); color: var(--muted); font-size: 11px; border-radius: 4px; padding: 0 5px; }
.eco { display: block; font-size: 11px; color: var(--muted); }
.pvc { font-size: 13px; color: var(--muted); }
.thumb { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 6px; cursor: zoom-in; }
input.qty { width: 56px; padding: 6px 4px; border: 1px solid #c7c7cc; border-radius: 6px; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
input.qty::-webkit-outer-spin-button, input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.qty:focus { outline: 2px solid var(--red); outline-offset: -1px; }
input.qty.filled { border-color: var(--ink); font-weight: 700; background: #fffbe6; }
.step { display: inline-flex; align-items: stretch; }
.step button { width: 32px; border: 1px solid #c7c7cc; background: #fff; cursor: pointer; color: var(--ink); font-size: 18px; line-height: 1; }
.step button:first-child { border-radius: 6px 0 0 6px; border-right: 0; }
.step button:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.step input.qty { border-radius: 0; width: 46px; }
/* Tableau : + / − empilés à droite de la quantité */
.qarrows { display: inline-flex; align-items: stretch; }
.qarrows input.qty { border-radius: 6px 0 0 6px; width: 52px; }
.qarrows .arrows { display: flex; flex-direction: column; }
.qarrows .arrows button { flex: 1; width: 24px; padding: 0; border: 1px solid #c7c7cc; border-left: 0; background: #fff; color: var(--ink);
    font-size: 13px; line-height: 1; cursor: pointer; }
.qarrows .arrows button:first-child { border-radius: 0 6px 0 0; border-bottom: 0; }
.qarrows .arrows button:last-child { border-radius: 0 0 6px 0; }
.qarrows .arrows button:hover { background: var(--bg); }
.dl { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); flex: none; vertical-align: -2px; }

/* A — Tableau */
.tbl-wrap { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table.a { width: 100%; border-collapse: collapse; min-width: 860px; }
table.a th { background: #fafafa; font-size: 12px; color: var(--muted); text-align: left; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.a td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.a .num, table.a th.num { text-align: right; }
table.a .ctr, table.a th.ctr { text-align: center; }
table.a tr.fam td { background: var(--bg); font-weight: 700; font-size: 13px; letter-spacing: .04em; padding: 8px 10px; }
table.a .prod { display: flex; gap: 12px; align-items: center; }
table.a .ref { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); }
table.a tr.has td { background: #fffdf3; }

/* Sections « Produits en promotion » / « Offre permanente » (campagne qui mélange les deux) */
tr.section td, .section-title { background: var(--ink); color: #fff; padding: 12px 14px; font-size: 15px; }
tr.section.promo td, .section-title.promo { background: var(--red); }
tr.section td span, .section-title span { font-size: 13px; opacity: .85; margin-left: 8px; }
.section-title { border-radius: 10px; margin: 18px 0 12px; }
.section-title:first-child { margin-top: 0; }

/* B — Cartes */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card.has { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.card .pic { height: 170px; display: grid; place-items: center; background: #fff; border-bottom: 1px solid var(--line); }
.card .pic img { max-height: 150px; max-width: 80%; object-fit: contain; cursor: zoom-in; }
.card .body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card h3 { margin: 0; font-size: 16px; }
.card .ref { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--muted); }
.card .prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card .prices .op { font-size: 20px; }
.colors { border-top: 1px solid var(--line); margin-top: auto; padding-top: 8px; }
.colors .row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(var(--nd), 110px); gap: 8px; align-items: center; padding: 4px 0; }
.colors .row.hd { padding: 0; }
.colors .row.hd span { text-align: center; }
.colors .name { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: default; }

/* C — Saisie rapide */
table.c { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); font-size: 14px; }
table.c th { text-align: left; font-size: 12px; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); background: #fafafa; }
table.c td { padding: 3px 8px; border-bottom: 1px solid #f0f0f2; }
table.c tr.fam td { background: var(--bg); font-weight: 700; font-size: 12px; letter-spacing: .04em; padding: 6px 8px; }
table.c .num, table.c th.num { text-align: right; }
table.c .ctr, table.c th.ctr { text-align: center; }
table.c img { width: 28px; height: 28px; object-fit: contain; cursor: zoom-in; }
table.c input.qty { width: 52px; padding: 3px; }
table.c tr.has td { background: #fffdf3; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 8px; }

/* Barre de total */
.bar { position: sticky; bottom: 0; z-index: 20;   /* collée en bas pendant le scroll, posée avant le pied de page à la fin */
        background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.06); }
.bar .in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.bar .dlv { flex: 1 1 220px; font-size: 14px; }
.bar .dlv .t { font-weight: 700; }
.bar .dlv .s { color: var(--muted); font-size: 13px; }
.bar .dlv .franco { color: var(--ok); font-weight: 600; }
.bar .total { font-size: 14px; text-align: right; }
.bar .total b { display: block; font-size: 20px; }
.btn { display: inline-block; background: var(--red); color: #fff; border: 0; border-radius: 8px; padding: 12px 20px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--red-dark); }
.btn:disabled { background: #c7c7cc; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #c7c7cc; }

/* Récapitulatif et image agrandie */
dialog { border: 0; border-radius: 12px; padding: 0; width: min(720px, calc(100% - 24px)); max-height: calc(100% - 40px); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog .in { padding: 20px; }
dialog h2 { margin: 0 0 4px; }
dialog h3 { margin: 18px 0 6px; font-size: 15px; }
dialog table { width: 100%; border-collapse: collapse; font-size: 14px; }
dialog td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
dialog td.num { text-align: right; }
dialog .sum td { border: 0; font-weight: 600; }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; position: sticky; bottom: 0; background: #fff; padding: 12px 0 0; }
.lightbox { padding: 0; background: transparent; width: fit-content; max-width: 92vw; margin: auto; }
.lightbox::backdrop { background: rgba(0,0,0,.7); }
.lightbox:focus { outline: none; }
.lightbox img { max-width: 90vw; max-height: 85vh; background: #fff; border-radius: 10px; }
.lb-close { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border: 0; border-radius: 50%;
    background: rgba(0,0,0,.65); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.lb-close:hover { background: #000; }

.foot { margin-top: auto; text-align: center; font-size: 13px; color: var(--muted); padding: 24px 16px; }

@media (max-width: 640px) {
    .hero h1 { font-size: 21px; }
    .account-btn span { display: none; }
    .head-links { display: none; }
    .account-pop { width: min(300px, calc(100vw - 32px)); }
    .bar .total { flex: 1 1 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; }
    .bar .btn { width: 100%; }
    table.c .hide-s { display: none; }
    .step button { width: 28px; }
    .step input.qty { width: 38px; }
    .colors .row { grid-template-columns: minmax(0, 1fr) repeat(var(--nd), 94px); }
    .grid { grid-template-columns: 1fr; }
    .views span { display: none; }
}
