/* Plateforme de dotation – NK Diffusion */
:root {
  --accent: #1f3a5f;
  --ink: #1d232b; --muted: #6a7480; --line: #e3e6ea; --bg: #f5f6f8; --card: #fff;
  --ok: #1e7a4a; --okbg: #e7f5ed; --err: #b42318; --errbg: #fdecea; --warn: #8a5a00; --warnbg: #fff4dc;
  --radius: 10px;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.45; }
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: .4em 0 .6em; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .4em; }
code { background: #eef0f3; padding: 1px 5px; border-radius: 4px; font-size: .9em; word-break: break-all; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.center { text-align: center; } .right { text-align: right; } .r { text-align: right; } .nowrap { white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .lead { font-size: 1.05rem; color: #3b4450; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.center { justify-content: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cols2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.scroll { overflow-x: auto; }
.inline { display: inline; }

/* Formulaires */
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld > span { font-size: .85rem; color: var(--muted); font-weight: 500; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid #cdd2d8; border-radius: 8px; background: #fff; color: inherit; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
input[type=color] { padding: 2px; height: 40px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.chk { display: flex; align-items: center; gap: 8px; }
.w-s { width: 140px; } .w-xs { width: 70px; } .num { width: 90px; text-align: right; } .qty { width: 72px; }
.copyfield { width: 100%; font-size: .85rem; background: #f8f9fb; }
.checklist { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 6px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 8px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: #fff; color: var(--accent); border-color: #cdd2d8; }
.btn-sm { padding: 7px 12px; font-size: .9rem; } .btn-xs { padding: 4px 9px; font-size: .82rem; font-weight: 500; }
.btn-block { width: 100%; }
.danger { color: var(--err) !important; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 6px; }

/* Messages */
.flash { padding: 12px 14px; border-radius: 8px; margin: 14px 0; white-space: normal; }
.flash-ok { background: var(--okbg); color: var(--ok); }
.flash-err { background: var(--errbg); color: var(--err); }
.flash-warn { background: var(--warnbg); color: var(--warn); }
.notice { background: #eef2f7; border-radius: 8px; padding: 12px 14px; margin: 12px 0; }
.notice.err { background: var(--errbg); color: var(--err); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .78rem; font-weight: 600; background: #eceff3; color: #47505c; vertical-align: middle; }
.st-validee { background: #e3edfb; color: #1d4f91; } .st-en_preparation { background: var(--warnbg); color: var(--warn); }
.st-expediee { background: #efe7fb; color: #5b2f9a; } .st-livree { background: var(--okbg); color: var(--ok); }
.st-annulee { background: var(--errbg); color: var(--err); } .st-attente_paiement { background: #fff0e0; color: #9a4b00; }
.pill { background: #fff; color: var(--accent); border-radius: 99px; padding: 0 7px; font-size: .78rem; }

/* Tableaux */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tfoot td { font-weight: 700; border-bottom: 0; }
.tbl tr.off td { opacity: .5; }
.tbl th.r { text-align: right; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: #f1f2f4; }

/* ---------- Portail salarié ---------- */
.topbar { background: var(--accent); color: #fff; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.brand img { height: 52px; width: auto; max-width: 160px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px 6px; }
@media (max-width: 600px) { .brand img { height: 42px; } }
.nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nav a, .nav span { color: #fff; text-decoration: none; font-weight: 500; }
.nav .muted { opacity: .75; color: #fff; }
.foot { padding: 30px 16px; color: var(--muted); font-size: .82rem; text-align: center; }
.hello { margin-top: 24px; }
.login-box { max-width: 400px; margin: 48px auto; text-align: center; }
.login-box form { text-align: left; }
.login-logo { display: block; max-width: 100%; max-height: 130px; margin: 0 auto 12px; object-fit: contain; }

.budget { padding: 16px 18px; }
.budget-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.budget-amount { font-size: 1.7rem; font-weight: 750; color: var(--accent); }
.budget-amount small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.gauge { height: 10px; background: #e8ebef; border-radius: 99px; margin-top: 10px; display: flex; overflow: hidden; }
.g-used { background: var(--accent); opacity: .35; } .g-cart { background: var(--accent); }
.over { color: var(--err); margin-top: 8px; font-weight: 600; }

.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.pcard:hover { box-shadow: 0 6px 22px rgba(20, 30, 45, .1); transform: translateY(-2px); }
.pimg { aspect-ratio: 1; background: #f3f4f6; display: flex; align-items: center; justify-content: center; }
.pimg img { width: 100%; height: 100%; object-fit: contain; }
.pbody { padding: 12px 14px; }
.pname { font-weight: 600; }
.pprice { font-weight: 700; color: var(--accent); margin-top: 6px; }
.pprice.big { font-size: 1.5rem; margin: 8px 0; }
.tag { display: inline-block; background: #eef2f7; border-radius: 6px; padding: 4px 10px; font-size: .88rem; }

.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.gmain { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gmain img { width: 100%; height: 100%; object-fit: contain; }
.gthumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gthumb { width: 64px; height: 64px; border: 2px solid var(--line); border-radius: 8px; padding: 0; background: #fff; cursor: pointer; overflow: hidden; }
.gthumb.on { border-color: var(--accent); }
.gthumb img { width: 100%; height: 100%; object-fit: cover; }
.opt { display: flex; flex-direction: column; gap: 6px; }
.opt-label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; min-width: 46px; text-align: center; padding: 8px 12px; border: 1.5px solid #cdd2d8; border-radius: 8px; cursor: pointer; background: #fff; font-weight: 500; }
.chip input:checked + span { border-color: var(--accent); background: var(--accent); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.cart { display: grid; gap: 4px; }
.cline { display: grid; grid-template-columns: 64px 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cline img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #f3f4f6; }
.ctot { font-weight: 700; min-width: 80px; text-align: right; }
.checkout { max-width: 520px; margin-left: auto; }
.sum { display: flex; justify-content: space-between; }
.sum.over { color: var(--err); }

/* ---------- Back-office ---------- */
body.admin { background: #f2f3f5; }
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: #16212e; color: #c9d2dc; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.side-brand { color: #fff; font-weight: 800; padding: 6px 10px 18px; letter-spacing: .02em; }
.side-brand small { display: block; font-weight: 500; color: #8e9bab; font-size: .78rem; }
.side a { color: #c9d2dc; text-decoration: none; padding: 9px 10px; border-radius: 7px; }
.side a:hover { background: #22303f; }
.side a.on { background: #2c3e52; color: #fff; font-weight: 600; }
.side .side-out { margin-top: auto; font-size: .82rem; color: #8e9bab; }
.admin-main { padding: 22px 28px 60px; min-width: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 9px 13px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a.on { color: var(--accent); border-color: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat-v { font-size: 1.9rem; font-weight: 800; color: var(--accent); }
.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .fld { min-width: 140px; }
.bulk { margin-bottom: 10px; }
.imgs-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.img-edit { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: grid; gap: 6px; }
.img-edit img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #f6f7f8; border-radius: 6px; }
.logo-prev { max-height: 70px; align-self: flex-start; }

/* ---------- Impression : fiches ---------- */
body.print-page { background: #fff; }
.noprint { padding: 16px; }
.prep { max-width: 780px; margin: 0 auto; padding: 24px 16px; page-break-after: always; break-after: page; }
.prep-head { display: flex; justify-content: space-between; border-bottom: 2px solid #222; padding-bottom: 10px; margin-bottom: 14px; }
.prep-head img { max-height: 44px; display: block; margin-bottom: 4px; }
.prep-ref { font-size: 1.4rem; font-weight: 800; }
.prep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.prep-name { font-size: 1.35rem; font-weight: 800; text-transform: uppercase; }
.prep-tbl td, .prep-tbl th { border: 1px solid #999; }
.chkcol { width: 34px; text-align: center; }
.box { display: inline-block; width: 16px; height: 16px; border: 1.5px solid #222; }
.prep-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.prep-sign div { border-top: 1px solid #999; padding-top: 6px; font-size: .85rem; height: 50px; }
.access-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 820px; margin: 0 auto; }
.access-card { border: 1px dashed #999; padding: 18px; break-inside: avoid; }
.access-card img { max-height: 40px; }
.access-card h3 { margin: 6px 0; }
.access-card .url { font-weight: 700; word-break: break-all; }
@media print {
  .noprint { display: none; }
  body { font-size: 12px; }
  .prep { padding: 0; }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .cols2, .product { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .side-brand { width: 100%; padding-bottom: 6px; }
  .side .side-out { margin-top: 0; }
  .admin-main { padding: 16px; }
}
@media (max-width: 560px) {
  .grid2 { grid-template-columns: 1fr; }
  .grid-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cline { grid-template-columns: 52px 1fr auto; }
  .cline img { width: 52px; height: 52px; }
  .cline .ctot { grid-column: 2; text-align: left; }
  .budget-amount { font-size: 1.4rem; }
  .access-cards { grid-template-columns: 1fr; }
  .nav { gap: 12px; font-size: .92rem; }
}

/* ---------- v2 : gratuités, catalogues, fiches ---------- */
.tag-free { display: inline-block; background: var(--okbg); color: var(--ok); border-radius: 4px; padding: 1px 7px; font-size: .78rem; font-weight: 700; }
.free { color: var(--ok); font-weight: 700; }
.infobox { background: #eef2f5; border-radius: 8px; padding: 10px 12px; font-size: .93rem; }
.infobox summary { cursor: pointer; font-weight: 700; }
.infobox ul { margin: 8px 0; padding-left: 18px; }
.sizeguide { margin: 2px 0 8px; }
.sizeguide .tbl td, .sizeguide .tbl th { padding: 6px 8px; }
.guide-img { max-width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; margin-top: 8px; }
.catswitch { align-items: center; margin: 4px 0 16px; }
.chip-link { display: inline-block; padding: 7px 14px; border: 1.5px solid #cdd2d8; border-radius: 99px; text-decoration: none; color: var(--ink); font-weight: 600; background: #fff; }
.chip-link.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.porteur-head { display: flex; justify-content: space-between; padding: 14px 0 4px; border-bottom: 2px solid var(--line); }
.porteur-head:first-child { padding-top: 0; }
.notice ul { margin: 6px 0 0; padding-left: 18px; }
.mini-chip { display: inline-block; padding: 3px 9px; margin: 2px; border: 1.5px solid #cdd2d8; border-radius: 99px; background: #fff; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--ink); }
.mini-chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.sg-table input { width: 72px; text-align: right; padding: 6px; }
.sg-table input.lbl { width: 190px; text-align: left; }
.thumb { min-width: 44px; }

/* Bandeau texte de présentation (sous le menu) */
.intro { background: #fff; border-bottom: 1px solid #dfe3e8; }
.intro .wrap { padding-top: 14px; padding-bottom: 14px; line-height: 1.55; }
.intro a { color: var(--accent); }

/* ---------- v6 : bandeau Vitrine, vignettes, mini-panier ---------- */
.intro.vitrine { --i1: #e30613; --i2: #16181b; position: relative; overflow: hidden; border: 0; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--i2) 82%, #fff) 0%, var(--i2) 55%), var(--i2); }
.intro.vitrine::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--i1); }
.vitrine .swoosh { position: absolute; right: -30px; bottom: -18px; width: min(58%, 620px); height: auto; color: var(--i1); opacity: .85; pointer-events: none; }
.vitrine .wrap { position: relative; z-index: 1; padding-top: 26px; padding-bottom: 24px; }
.vit-logo { position: absolute; top: 24px; right: max(16px, env(safe-area-inset-right, 0px)); background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.vit-logo img { display: block; height: 120px; width: auto; max-width: 260px; object-fit: contain; }
@media (min-width: 901px) { .vitrine.has-logo .wrap { padding-right: calc(max(16px, env(safe-area-inset-right, 0px)) + 310px); } }
@media (max-width: 900px) { .vit-logo { display: none; } }
.vit-title { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; }
.vit-title::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 2px; background: var(--i1); margin-top: 10px; }
.vit-lead { max-width: 64ch; margin: 12px 0 0; color: rgba(255,255,255,.84); font-size: 1.02rem; }
.vitrine .vit-lead b, .vitrine .vit-title b { color: #fff; background: linear-gradient(transparent 62%, color-mix(in srgb, var(--i1) 75%, transparent) 62%); }
.vit-steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; counter-reset: st; max-width: 900px; }
.vit-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13); }
.vit-steps li::before { counter-increment: st; content: counter(st); flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--i1); color: #fff; font-weight: 800; }
.vit-steps b { display: block; text-transform: uppercase; letter-spacing: .05em; font-size: .95rem; }
.vit-steps span { display: block; color: rgba(255,255,255,.78); font-size: .92rem; line-height: 1.4; }
.vit-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.vit-chips span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px; background: #fff; color: #16181b; font-weight: 600; font-size: .88rem; }
.vit-chips span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--i1); }
.vitrine a { color: #fff; text-decoration-color: var(--i1); }
.intro.vitrine.light { color: #15202b; }
.vitrine.light .vit-lead, .vitrine.light .vit-steps span { color: rgba(21,32,43,.78); }
.vitrine.light .vit-lead b, .vitrine.light .vit-title b, .vitrine.light a { color: #15202b; }
.vitrine.light .vit-steps li { background: rgba(255,255,255,.6); border-color: rgba(0,0,0,.08); }
.vitrine.light .vit-chips span { background: #15202b; color: #fff; }

.grid-products { --brand: var(--accent); --brand2: #16181b; gap: 18px; }
.pcard { border-radius: 12px; border-color: transparent; box-shadow: 0 1px 2px rgba(15,30,45,.06), 0 0 0 1px var(--line); transition: transform .18s, box-shadow .18s; }
.pcard:hover, .pcard:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15,30,45,.14), 0 0 0 2px var(--brand); outline: none; }
.pcard .pimg { position: relative; overflow: hidden; background: radial-gradient(75% 60% at 50% 42%, #fafbfc 0%, #eceff2 100%); }
.pcard .pimg img { transition: transform .25s ease; }
.pcard:hover .pimg img { transform: scale(1.05); }
.pc-tags { position: absolute; z-index: 2; top: 10px; left: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.pc-free, .pc-must { font-weight: 800; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; padding: 3px 9px; border-radius: 999px; color: #fff; }
.pc-free { background: var(--brand); } .pc-must { background: var(--brand2); }
.pcard .pbody { display: grid; gap: 3px; flex: 1; grid-template-rows: auto auto 1fr auto; padding: 12px 14px 14px; }
.pc-ref { font-size: .74rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.pcard .pname { font-weight: 700; line-height: 1.25; }
.pc-info { font-size: .82rem; color: var(--muted); }
.pc-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pc-price { font-weight: 800; font-size: 1.25rem; margin-right: auto; color: var(--ink); }
.pc-price small { font-weight: 600; font-size: .68rem; color: var(--muted); }
.swatches { display: flex; gap: 4px; }
.sw { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); display: inline-block; }
.pc-go { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand2); color: #fff; font-size: 1.2rem; font-weight: 600; line-height: 1; transition: background .18s, transform .18s; }
.pcard:hover .pc-go { background: var(--brand); transform: rotate(90deg); }
@media (max-width: 520px) { .pcard .pbody { padding: 10px; } .pc-go { width: 26px; height: 26px; } .pcard .swatches { display: none; } }

.cart-wrap { position: relative; display: inline-flex; }
.minicart { display: none; }
@media (hover: hover) and (min-width: 700px) {
  .minicart { --brand: #e30613; display: flex; flex-direction: column; position: absolute; top: calc(100% + 12px); right: -10px; z-index: 50;
    width: min(380px, calc(100vw - 32px)); max-height: min(72vh, 560px); background: #fff; color: var(--ink); text-align: left; font-weight: 400;
    border: 1px solid var(--line); border-top: 3px solid var(--brand); border-radius: 10px; box-shadow: 0 18px 44px rgba(15,30,45,.22);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .16s, transform .16s, visibility 0s .16s; }
  .minicart::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
  .minicart::after { content: ""; position: absolute; top: -9px; right: 30px; width: 12px; height: 12px; background: var(--brand); transform: rotate(45deg); z-index: -1; }
  .cart-wrap:hover .minicart, .cart-wrap:focus-within .minicart { opacity: 1; visibility: visible; transform: none; transition-delay: .08s, .08s, 0s; }
}
.nav .minicart span, .nav .minicart a.mc-btn { color: inherit; }
.mc-head { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.mc-head b { text-transform: uppercase; letter-spacing: .05em; }
.nav .minicart .muted { color: var(--muted); opacity: 1; }
.mc-empty { margin: 0; padding: 22px 16px; text-align: center; }
.mc-lines { overflow-y: auto; overscroll-behavior: contain; padding: 4px 0; min-height: 0; flex: 1 1 auto; }
.mc-who { position: sticky; top: 0; display: flex; justify-content: space-between; padding: 7px 16px 4px; background: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .8rem; }
.nav .minicart .mc-who span { color: var(--muted); }
.mc-line { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 6px 16px; }
.mc-pic { width: 44px; height: 44px; border-radius: 6px; background: #f1f3f5; overflow: hidden; }
.mc-pic img { width: 100%; height: 100%; object-fit: contain; }
.mc-txt { min-width: 0; display: grid; }
.mc-txt b { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .minicart .mc-txt span { font-size: .8rem; color: var(--muted); }
.mc-price { text-align: right; font-weight: 700; font-size: .92rem; display: grid; white-space: nowrap; }
.nav .minicart .free { color: var(--ok); }
.mc-foot { border-top: 1px solid var(--line); padding: 10px 16px 14px; background: #f7f8fa; border-radius: 0 0 10px 10px; }
.mc-foot .sum { padding: 2px 0; font-size: .9rem; }
.mc-foot .sum.total { font-weight: 700; font-size: 1rem; }
.nav .minicart .sum.over span { color: var(--err); font-weight: 700; }
.nav .minicart a.mc-btn { display: block; width: 100%; margin-top: 10px; text-align: center; background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-reduced-motion: reduce) { .pcard, .pcard .pimg img, .pc-go, .minicart { transition: none; } .pcard:hover, .pcard:hover .pimg img, .pcard:hover .pc-go { transform: none; } }

/* ===== v7 : visuels avec logo, fiche article en deux colonnes, paiement, pages légales ===== */
/* Visuel : photo + logo superposé, cadré au format de l'image */
.photo-vis { position: relative; display: block; width: 100%; height: 100%; container-type: size; }
.photo-vis .pfit { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(100cqw, calc(100cqh * var(--ar, 1))); aspect-ratio: var(--ar, 1); }
.photo-vis img { display: block; width: 100%; height: 100%; object-fit: contain; }
.photo-vis img.photo-mark { position: absolute; transform: translate(-50%, -50%); object-fit: contain; pointer-events: none; }
/* Vignettes blanches, pied séparé par un liseré de la couleur du client */
.pcard .pimg { background: #fff; padding: 6%; }
.pcard .pimg .photo-vis { transition: transform .25s ease; }
.pcard:hover .pimg .photo-vis { transform: scale(1.05); }
.pcard .pbody { border-top: 3px solid var(--brand, var(--accent)); background: #fff; }
.cpic { width: 64px; height: 64px; display: block; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.cline img { background: transparent; }
.mc-pic { background: #fff; border: 1px solid var(--line); }
.mc-pic .photo-vis img, .cpic .photo-vis img { border-radius: 0; }

/* Fiche article */
.pv-back { margin: 4px 0 10px; }
.pv { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 24px; }
.pv-left { background: #f6f7f9; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pv-stage { position: relative; aspect-ratio: 1; background: #fff; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.pv-pic { position: absolute; inset: 6% 6% 34px 6%; }
.pv-pic[hidden] { display: none; }
.pv-thumbs { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; max-height: calc(100% - 50px); overflow-y: auto; }
.pv-thumb { width: 48px; height: 48px; padding: 3px; border-radius: 9px; border: 2px solid transparent; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.14); cursor: pointer; }
.pv-thumb[aria-pressed="true"] { border-color: var(--brand, var(--accent)); }
.pv-views { position: absolute; top: 12px; right: 12px; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.14); z-index: 2; }
.pv-views:empty { display: none; }
.pv-view { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.pv-view[aria-pressed="true"] { background: var(--brand, var(--accent)); color: #fff; }
.pv-note { position: absolute; left: 0; right: 0; bottom: 8px; margin: 0; text-align: center; font-size: .78rem; color: var(--muted); }
.pv-info { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pv-tabs { display: flex; border-bottom: 1px solid var(--line); }
.pv-tab { flex: 1; border: 0; background: none; padding: 11px 8px; font: inherit; font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.pv-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--brand, var(--accent)); }
.pv-panel { padding: 12px 16px; font-size: .92rem; }
.pv-panel ul { margin: 0; padding-left: 18px; }
.pv-right { display: flex; flex-direction: column; min-width: 0; }
.pv-scroll { padding: 20px 22px; flex: 1; display: grid; gap: 16px; align-content: start; }
.pv-head h1 { margin: 2px 0 6px; font-size: 1.6rem; line-height: 1.15; }
.pv-ref { margin: 0; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pv-price { margin: 0; font-size: 1.35rem; font-weight: 800; } .pv-price small { font-size: .78rem; font-weight: 600; color: var(--muted); }
.pv-step { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.pv-step legend { font-weight: 700; padding: 0; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.pv-step legend i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: .78rem; }
.pv-step .sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.pv-input { width: 100%; padding: 10px 12px; border: 1.5px solid #cdd2d8; border-radius: 8px; font: inherit; }
.pv-buy { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 14px 22px; display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; box-shadow: 0 -6px 14px rgba(15,30,45,.06); }
.pv-packs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pack-btn { border: 1.5px solid var(--brand2, var(--accent)); color: var(--brand2, var(--accent)); background: #fff; border-radius: 999px; padding: 6px 13px; font: inherit; font-weight: 600; cursor: pointer; }
.pack-btn small { font-weight: 400; opacity: .8; margin-left: 2px; }
.pack-btn:hover, .pack-btn:focus-visible { background: var(--brand2, var(--accent)); color: #fff; }
.pack-btn:disabled { opacity: .4; cursor: not-allowed; background: #fff; color: var(--brand2, var(--accent)); }
.pack-hint { color: #b42318; font-weight: 600; }
.pack-rule { flex-basis: 100%; color: var(--ink); font-weight: 600; }
.pack-line { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; min-height: 1.2em; }
.pack-line .pack-reset { font-size: inherit; padding: 0; text-decoration: underline; color: var(--muted); }
.pv-qty { display: flex; align-items: center; border: 1.5px solid #cdd2d8; border-radius: 999px; overflow: hidden; }
.pv-qty .qstep { border: 0; background: none; width: 38px; height: 38px; font-size: 1.15rem; cursor: pointer; }
.pv-qty .qty { width: 64px; border: 0; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.pv-total { text-align: right; } .pv-total b { display: block; font-size: 1.35rem; }
.pv-btns { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pv-btns .btn { width: 100%; }
.pv-btns .btn:first-child { background: var(--brand, var(--accent)); border-color: var(--brand, var(--accent)); }
@media (max-width: 820px) {
  .pv { grid-template-columns: 1fr; }
  .pv-btns { grid-template-columns: 1fr; }
}

/* Paiement */
.pay { max-width: 460px; margin: 24px auto 10px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 50px rgba(10,20,30,.18); border: 1px solid var(--line); }
.pay-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #14202b; color: #fff; }
.pay-top b { display: block; } .pay-top span { font-size: .8rem; color: #b9c6d2; }
.pay-lock svg { width: 22px; height: 22px; display: block; }
.pay-demo { margin-left: auto; font: 700 .7rem ui-monospace, monospace; background: #f4b400; color: #14202b !important; padding: 3px 7px; border-radius: 4px; }
.pay-sum { padding: 14px 18px; background: #f3f5f7; display: grid; gap: 6px; border-bottom: 1px solid var(--line); }
.pay-sum > div { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; } .pay-sum span { color: var(--muted); }
.pay-amt { padding-top: 6px; border-top: 1px dashed var(--line); } .pay-amt b { font-size: 1.35rem; }
.pay-body { padding: 18px; display: grid; gap: 12px; }
.pay-fields { display: grid; gap: 10px; opacity: .75; } .pay-fields label span { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 4px; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-fake { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #f3f5f7; font-family: ui-monospace, monospace; color: var(--muted); }
.pay-note { font-size: .82rem; color: var(--muted); margin: 0; }
.pay-go { width: 100%; padding: 12px; font-size: 1rem; }
.pay-alt { display: flex; gap: 8px; justify-content: center; }
.pay-center { text-align: center; display: grid; justify-items: center; gap: 10px; }
.pay-spin { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: payspin .8s linear infinite; }
@keyframes payspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pay-spin { animation: none; } }

/* Back-office : logos et photos */
.logo-chip { display: inline-grid; place-items: center; height: 44px; min-width: 70px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.logo-chip.on-dark { background: #1d232b; } .logo-chip img { max-height: 30px; max-width: 140px; }
.logo-chip.mini { height: 26px; min-width: 0; padding: 2px 6px; vertical-align: middle; } .logo-chip.mini img { max-height: 18px; max-width: 60px; }
.imgs-edit { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.img-prev { aspect-ratio: 1; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px; }
.img-edit .img-prev img { aspect-ratio: auto; background: transparent; border-radius: 0; }
.mk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; } .mk-grid span { display: block; font-size: .72rem; color: var(--muted); } .mk-grid input { width: 100%; padding: 4px; }
.cols2 > .legal-form { grid-column: 1 / -1; }
.legal-form textarea { font-family: ui-monospace, monospace; font-size: .82rem; }

/* Pages légales */
.legal { max-width: 860px; margin: 10px auto 24px; padding: 26px 30px; }
.legal h2 { margin: 1.3em 0 .4em; font-size: 1.08rem; } .legal p { margin: .3em 0; } .legal ul { margin: .3em 0; padding-left: 20px; }
.foot a { color: inherit; }

/* v8 : mode prise de commande */
.kv { display: grid; grid-template-columns: minmax(130px, 200px) 1fr; gap: 8px 16px; margin: 0; }
.kv dt { color: var(--muted, #6b7280); font-size: .9em; }
.kv dd { margin: 0; }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }
.filters-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filters-inline .fld { min-width: 150px; flex: 1 1 150px; margin: 0; }
.tag-old { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #eef0f3; color: #5d6773; white-space: nowrap }
/* v8 : validation des commandes, utilisateurs par concession */
.st-a_valider { background: #fff4d6; color: #8a5a00; } .st-refusee { background: var(--errbg); color: var(--err); }
.nav .pill-warn { background: #e8a200; color: #fff; }
.who-bar { font-size: .82rem; color: var(--muted, #6b7782); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.who-bar select { font-size: .82rem; padding: 2px 6px; }
.valid-box { border-left: 4px solid #e8a200; }
.perm-list { display: grid; gap: 6px; }
.role-tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: #eef0f3; color: #47505c; }
.role-tag.v { background: #e3edfb; color: #1d4f91; }

/* Adresse de livraison au panier */
.ship { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; margin: 0; display: grid; gap: 8px; }
.ship legend { font-weight: 600; padding: 0 4px; font-size: .9rem; }
.ship-opt { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .9rem; line-height: 1.4; }
.ship-opt input { margin-top: 3px; }
.ship-other { padding-left: 24px; }
.ship-fixed { line-height: 1.45; }
.ship { min-width: 0; }
.checkout .grid2 > *, .ship .fld { min-width: 0; }
.checkout .fld input, .checkout .fld textarea { width: 100%; box-sizing: border-box; }

/* Fenêtre de confirmation */
.cfm-back { position: fixed; inset: 0; z-index: 1000; background: rgba(15,25,35,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cfm-back[hidden] { display: none; }
.cfm { background: #fff; border-radius: 14px; max-width: 460px; width: 100%; padding: 20px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.cfm h3 { margin: 0 0 8px; font-size: 1.08rem; }
.cfm-d { font-size: .92rem; color: var(--muted); }
.cfm-d ul { margin: 6px 0; padding-left: 18px; color: var(--ink); }
.cfm-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.btn-danger { background: #b42318; border-color: #b42318; color: #fff; }
.ol-qty { width: 70px; text-align: right; }
.ol-off td { opacity: .45; text-decoration: line-through; }
.danger-zone { border-color: #f1c7c3; }
