/* 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: 8px;
  --field: 8px;
}
* { 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; }
/* Bureau : comme Shopify, moitié gauche blanche, moitié droite grise jusqu'au bord de la fenêtre et sur toute la
   hauteur ; le contenu de chaque colonne (520 px max) est collé vers la ligne centrale. */
@media (min-width: 1000px) {
  .sumbar, .sumpanel, .mobile-only { display: none; }
  .wrap.grid { max-width: none; display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 64px); }
  .main { padding: 38px 48px 56px 24px; max-width: 616px; margin: 0 0 0 auto; width: 100%; justify-self: end; }
  .side { display: block; background: var(--bg-2); border-left: 1px solid var(--line); }
  .side-in { position: sticky; top: 0; max-width: 608px; padding: 38px 24px 38px 48px; }
}

/* ---------- 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; }
.ship-sk { height: 54px; }
.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;
}
/* Toujours noir (jamais grisé, sinon la cliente croit à une rupture) : pendant une synchro, un petit spinner dedans. */
.pay[aria-busy="true"] { cursor: progress; }
.pay:hover { background: #1f1f1f; }
.card-msg { color: var(--err); font-size: 12.5px; margin: 8px 1px 0; }
.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; }

/* Page de remerciement (façon Shopify) */
.rc { padding-top: 22px; }
.rc-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 22px; }
.rc-check { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; }
.rc-check svg { width: 22px; height: 22px; }
.rc-num { font-size: 13.5px; color: var(--ink-2); }
.rc-head h1 { font-size: 23px; font-weight: 600; margin: 2px 0 0; letter-spacing: -.01em; }
.rc-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 6px; margin: 0 0 16px; }
.rc-box h2 { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
.rc-muted { color: var(--ink-2); margin: 0 0 12px; font-size: 14px; }
.rc-grid { display: grid; grid-template-columns: 1fr; gap: 4px 24px; }
.rc-grid h3 { font-size: 14px; font-weight: 600; margin: 8px 0 6px; }
.rc-v { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.55; word-break: break-word; }
.rc-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 26px 0 8px; font-size: 14px; }
.rc-foot a { color: var(--accent, #000); }
.rc-btn { margin-top: 0; color: #fff !important; }
@media (min-width: 640px) { .rc-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) { .rc-btn { width: 100%; } .rc-foot { flex-direction: column-reverse; align-items: stretch; text-align: center; } }

/* Squelette de chargement (affiché dès le 1er rendu, puis avec le récapitulatif) */
.sk { display: block; border-radius: var(--field); background: linear-gradient(90deg, #f1f1f1 25%, #e7e7e7 37%, #f1f1f1 63%); background-size: 400% 100%; animation: skel 1.3s ease infinite; }
.sk-field { height: 50px; margin: 0 0 12px; }
.sk-card { height: 132px; }
.sk-price { width: 70px; height: 18px; display: inline-block; vertical-align: middle; }
.sk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skel-boot .top-in { justify-items: center; }

/* Aide « ? » dans le champ, infobulle sombre (façon Shopify) */
.f.has-tip input { padding-right: 44px; }
.tip { position: absolute; right: 8px; top: 25px; transform: translateY(-50%); }
.tip-btn { width: 28px; height: 28px; border: 0; background: none; padding: 0; color: var(--ink-3, #8a8a8a); cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.tip-btn svg { width: 18px; height: 18px; }
.tip-btn:hover, .tip-btn:focus-visible { color: var(--ink); }
.tip-btn:focus-visible { outline: 2px solid var(--accent, #000); outline-offset: 1px; }
.tip-bubble { position: absolute; right: -4px; bottom: calc(100% + 8px); z-index: 20; width: max-content; max-width: 220px; padding: 8px 10px; border-radius: 6px;
  background: #1a1a1a; color: #fff; font-size: 12.5px; line-height: 1.35; box-shadow: 0 4px 14px rgba(0,0,0,.18); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s; }
.tip-bubble::after { content: ''; position: absolute; right: 12px; top: 100%; border: 6px solid transparent; border-top-color: #1a1a1a; }
.tip:hover .tip-bubble, .tip-btn:focus-visible + .tip-bubble, .tip.open .tip-bubble { opacity: 1; visibility: visible; }

/* Récapitulatif : économies totales, code promo à droite (bureau) */
.tr.savings { margin-top: 2px; font-size: 13px; font-weight: 600; letter-spacing: .02em; justify-content: flex-start; gap: 8px; }
.tr.savings svg { width: 14px; height: 14px; }
.disc-inline { margin: 16px 0 6px; }
.disc-inline .chips { margin-top: 10px; }
.disc-inline .codemsg { margin-top: 8px; }

/* Adresse assistée : liste sous le champ (façon Shopify), attribution Google */
.ac { position: relative; }
.ac-pop { position: absolute; left: 0; right: 0; top: 54px; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: var(--field); box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow: hidden; }
.ac-list { list-style: none; margin: 0; padding: 4px 0; }
.ac-item { padding: 10px 14px; font-size: 14px; cursor: pointer; line-height: 1.35; }
.ac-item.on, .ac-item:hover { background: var(--bg-2); }
.ac-sub { color: var(--ink-2); font-size: 13px; }
.ac-attr { padding: 6px 14px 8px; border-top: 1px solid var(--line-2); font: 400 12px/1.4 Roboto, -apple-system, "Segoe UI", Arial, sans-serif; color: #5E5E5E; text-align: right; white-space: nowrap; }
