/* Page de paiement — sobre, proche du checkout Shopify : fond blanc, texte noir, bordures gris clair,
   bandeau gris, police système. --accent (liens, focus) vient de BRAND_COLOR ; le bouton reste noir. */
:root {
  --ink: #000;
  --ink-2: #707070;
  --ink-3: #8f8f8f;
  --line: #dedede;
  --line-2: #e6e6e6;
  --bg-2: #f5f5f5;
  --accent: #000;
  --ok: #000;
  --err: #dd1d1d;
  --radius: 6px;
  --field: 5px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background: #fff;
  font: 400 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
img { display: block; max-width: 100%; }
svg { flex: none; }

/* ---------- chargement ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 28px; }
.boot-logo { height: 32px; width: auto; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink); animation: spin .8s linear infinite; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; }
.spinner.light { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { text-align: center; padding: 40px 20px; }

/* ---------- en-tête : logo centré, panier à droite ---------- */
.top { background: #fff; border-bottom: 1px solid var(--line); }
.top-in { max-width: 1120px; margin: 0 auto; height: 64px; padding: 0 16px; display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; }
.top-logo { justify-self: center; display: inline-flex; text-decoration: none; }
.top-logo img { height: 28px; width: auto; }
.top-name, .boot-name { font-weight: 600; font-size: 19px; color: var(--ink); text-decoration: none; }
.top-cart { justify-self: end; color: var(--ink); display: inline-flex; padding: 6px; }
.top-cart svg { width: 22px; height: 22px; }

/* ---------- bandeau « Order summary » (mobile) ---------- */
.sumbar {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px; background: var(--bg-2);
}
.sumbar-l { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.sumbar-l svg { width: 14px; height: 14px; transition: transform .2s; }
.sumbar[aria-expanded="true"] .sumbar-l svg { transform: rotate(180deg); }
.sumbar-r { font-weight: 600; font-size: 16px; }
.sumpanel { background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 4px 16px 18px; }

/* ---------- mise en page ---------- */
.wrap { max-width: 1120px; margin: 0 auto; }
.grid { display: block; }
.main { padding: 20px 16px 40px; max-width: 600px; margin: 0 auto; }
.side { display: none; }
@media (min-width: 1000px) {
  .sumbar, .sumpanel { display: none; }
  .grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; min-height: calc(100vh - 64px); }
  .main { padding: 38px 48px 56px 16px; max-width: 620px; margin: 0 0 0 auto; width: 100%; }
  .side { display: block; background: var(--bg-2); border-left: 1px solid var(--line); }
  .side-in { position: sticky; top: 0; padding: 38px 32px; }
}

/* ---------- sections ---------- */
.sec { margin: 0 0 28px; }
.sec h2 { font-size: 21px; font-weight: 600; margin: 0 0 14px; letter-spacing: -.01em; }
.sec .sub { margin: -8px 0 12px; color: var(--ink-2); font-size: 14px; }
.billing h3 { font-size: 16px; font-weight: 600; margin: 18px 0 12px; }
.hint { font-size: 13px; color: var(--ink-2); margin: 8px 2px 0; }
.muted-box { background: var(--bg-2); border-radius: var(--field); padding: 16px; color: var(--ink-2); font-size: 14px; }

/* ---------- champs (libellé flottant) ---------- */
.row { display: grid; gap: 12px; margin-bottom: 12px; }
.row.two { grid-template-columns: 1fr 1fr; }
.row.three { grid-template-columns: 1fr 1fr; }
@media (min-width: 520px) { .row.three { grid-template-columns: 1.3fr 1fr 1fr; } }
.row.three > .f:first-child { grid-column: 1 / -1; }
@media (min-width: 520px) { .row.three > .f:first-child { grid-column: auto; } }
.f { position: relative; display: block; }
.f input, .f select {
  width: 100%; height: 52px; padding: 21px 12px 5px; border-radius: var(--field);
  border: 1px solid var(--line); background: #fff; outline: none; font-size: 14px;
  transition: border-color .12s, box-shadow .12s; -webkit-appearance: none; appearance: none;
}
.f select { padding-right: 34px; cursor: pointer; }
.f .chev { position: absolute; right: 12px; top: 26px; width: 14px; height: 14px; transform: translateY(-50%); pointer-events: none; color: var(--ink-2); }
.f .chev svg { width: 14px; height: 14px; }
.f span.lab { position: absolute; left: 13px; top: 7px; font-size: 12px; color: var(--ink-2); pointer-events: none; }
.f input:placeholder-shown + span.lab { top: 16px; font-size: 14px; color: var(--ink-3); }
.f input:focus + span.lab { top: 7px; font-size: 12px; color: var(--ink-2); }
.f input::placeholder { color: transparent; }
.f input:focus, .f select:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.f.bad input, .f.bad select { border-color: var(--err); box-shadow: 0 0 0 1px var(--err); }
.f .msg { display: block; color: var(--err); font-size: 12.5px; margin: 6px 1px 0; }
.f .help { display: block; color: var(--ink-2); font-size: 12.5px; margin: 6px 1px 0; }
.f input:disabled, .f select:disabled { background: #fafafa; color: var(--ink-2); }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; margin: 12px 1px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

/* ---------- livraison ---------- */
.rates { border: 1px solid var(--line); border-radius: var(--field); overflow: hidden; }
.rate { display: flex; align-items: center; gap: 12px; padding: 15px 14px; cursor: pointer; border-top: 1px solid var(--line); }
.rate:first-child { border-top: 0; }
.rate.sel { background: #f6f6f6; box-shadow: inset 0 0 0 1px var(--ink); border-radius: var(--field); }
.rate input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.rate .t { flex: 1; font-size: 14px; }
.rate .p { font-weight: 600; font-size: 14px; }

/* ---------- paiement ---------- */
.paybox { border: 1px solid var(--line); border-radius: var(--field); padding: 14px; background: #fafafa; min-height: 110px; }
.paybox .loading { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 13.5px; }
.alert { margin-top: 14px; padding: 12px 14px; border-radius: var(--field); font-size: 13.5px; }
.alert.err { background: #fff1f1; color: #8f1414; border: 1px solid #f3c7c7; }
.alert.info { background: var(--bg-2); color: var(--ink); border: 1px solid var(--line); }
.linkbtn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font-weight: 600; }
.ts-box { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 50; }

/* ---------- « Add discount » ---------- */
.disc { margin: 4px 0 16px; }
.disc-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; }
.disc-pill svg, .chip svg, .tr.save svg { width: 15px; height: 15px; }
.code { display: flex; gap: 10px; }
.code .f { flex: 1; }
.code button { flex: none; height: 52px; padding: 0 18px; border-radius: var(--field); border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; font-weight: 600; color: var(--ink); }
.code button:disabled { color: var(--ink-3); cursor: default; }
.codemsg { font-size: 13px; color: var(--err); margin: 8px 1px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--field); background: #ececec; font-size: 13px; font-weight: 600; }
.chip button { border: 0; background: none; cursor: pointer; padding: 0; display: inline-flex; color: var(--ink-2); }
.chip button svg { width: 13px; height: 13px; }

/* ---------- ligne « Total » + bouton ---------- */
.totalrow { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 0; border: 0; border-top: 1px solid var(--line); background: none; cursor: pointer; text-align: left; }
.totalrow .tl { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.totalrow .tl strong { font-size: 17px; font-weight: 600; }
.totalrow .tl span { font-size: 13px; color: var(--ink-2); }
.totalrow .tv { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; font-weight: 600; white-space: nowrap; }
.totalrow .tv .cur { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.totalrow .tv svg { width: 14px; height: 14px; transition: transform .2s; }
.totalrow[aria-expanded="true"] .tv svg { transform: rotate(180deg); }
.totalpanel { padding: 0 0 8px; }
.pay {
  width: 100%; height: 54px; border: 0; border-radius: var(--radius); cursor: pointer; margin-top: 8px;
  background: #000; color: #fff; font-weight: 600; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: opacity .15s;
}
.pay:disabled { opacity: .45; cursor: default; }
.pay.sync:disabled { opacity: .75; }
.branding { margin-top: 14px; display: flex; justify-content: center; }

/* ---------- récapitulatif ---------- */
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.thumb { position: relative; flex: none; width: 64px; height: 64px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.thumb.sm { width: 44px; height: 44px; }
.qty { position: absolute; top: -8px; right: -8px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: #000; color: #fff; font-size: 11.5px; font-weight: 600; display: grid; place-items: center; }
.line .info { flex: 1; min-width: 0; }
.line .name { font-size: 14px; line-height: 1.35; }
.line .var { font-size: 12.5px; color: var(--ink-2); }
.line .price { text-align: right; font-size: 14px; white-space: nowrap; }
.line .was { display: block; font-size: 12px; color: var(--ink-3); text-decoration: line-through; }
.totals { margin-top: 10px; }
.tr { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.tr .l { display: inline-flex; align-items: center; gap: 6px; }
.tr.total { margin-top: 8px; font-size: 17px; font-weight: 600; }
.tr.total .r { font-size: 19px; }
.tr.total .cur { font-size: 12px; color: var(--ink-2); font-weight: 400; margin-right: 6px; }

/* ---------- conditions ---------- */
.foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; }
.foot-t { font-weight: 600; margin-bottom: 8px; }
.foot-l { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.foot a { color: var(--accent); }

/* ---------- états / merci ---------- */
.state { max-width: 520px; margin: 0 auto; padding: 48px 24px 64px; text-align: center; }
.state .icon { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--ink); }
.state .icon svg { width: 28px; height: 28px; }
.state h1 { font-size: 24px; font-weight: 600; margin: 0 0 10px; }
.state p { color: var(--ink-2); margin: 0 0 8px; }
.state .order { display: inline-block; margin: 6px 0 18px; padding: 6px 14px; border-radius: var(--field); background: var(--bg-2); font-weight: 600; }
.state .card { text-align: left; margin: 28px 0 0; padding: 16px 18px; border-radius: var(--field); background: var(--bg-2); border: 1px solid var(--line); }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 26px; border-radius: var(--radius); background: #000; color: #fff; text-decoration: none; font-weight: 600; margin-top: 24px; border: 0; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.sublink { display: block; margin-top: 16px; font-size: 13.5px; color: var(--ink-2); }
.errlist { text-align: left; margin: 18px 0 0; padding: 0; list-style: none; }
.errlist li { padding: 10px 14px; border-radius: var(--field); background: #fff1f1; color: #8f1414; font-size: 13.5px; margin-top: 8px; }
.alert.top { margin-top: 0; margin-bottom: 22px; }
