/* Boutique Wend-Panga — site de démonstration (aucune police externe : la page charge vite, même en 3G) */
:root {
  --bg: #f5f6f1; --surface: #ffffff; --ink: #1c2420; --muted: #5d6b64; --border: #dde3dd;
  --accent: #0d7a63; --accent-ink: #ffffff; --accent-soft: #e2f1ec; --wa: #128c4a;
  --ok: #157347; --ok-soft: #e4f4ea; --warn: #9a5b00; --warn-soft: #fbf0dc; --danger: #b42318;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 30, 25, .06), 0 8px 24px rgba(20, 30, 25, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1412; --surface: #161e1b; --ink: #e6eee9; --muted: #9fb0a8; --border: #26332e;
    --accent: #2bb58f; --accent-ink: #06231b; --accent-soft: #143329; --wa: #25d366;
    --ok: #4ad08a; --ok-soft: #12301f; --warn: #f0b04a; --warn-soft: #33270f; --danger: #ff7b6e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 8px; text-wrap: balance; }
h2 { font-size: 19px; line-height: 1.3; margin: 2px 0 6px; text-wrap: balance; }
p { margin: 0 0 10px; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
[hidden] { display: none !important; }

.top { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 800; letter-spacing: .5px; flex: none; }
.brand { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.brand small { color: var(--muted); font-size: 12.5px; }

main.wrap { padding-top: 22px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 16px; }
.intro p { color: var(--muted); }
.notice { background: var(--warn-soft); color: var(--ink); border-radius: var(--radius); padding: 10px 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.card.narrow { max-width: 440px; margin: 24px auto; }
.step { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 14px; font-weight: 600; }
input, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; height: 46px; padding: 0 12px; width: 100%; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.phone { display: flex; gap: 8px; }
.phone select { width: auto; flex: none; max-width: 46%; }
.phone input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.code-input { font-size: 24px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }

.btn { font: inherit; font-weight: 650; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); min-height: 46px; padding: 0 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.whatsapp { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: progress; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); flex-wrap: wrap; }
.seg button { flex: 1 1 auto; font: inherit; font-size: 14.5px; border: 0; border-radius: 9px; padding: 9px 10px; background: transparent; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--ink); font-weight: 650; box-shadow: var(--shadow); }

.zone { display: flex; flex-direction: column; gap: 12px; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.qr-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.qr { border-radius: 10px; background: #fff; padding: 6px; border: 1px solid var(--border); }
.msg { font-family: ui-monospace, Consolas, monospace; font-size: 14px; overflow-wrap: anywhere; margin: 0; }
.wait { color: var(--muted); margin: 0; }
.wait::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.success, .warn { display: flex; flex-direction: column; gap: 2px; border-radius: var(--radius); padding: 12px 14px; }
.success { background: var(--ok-soft); color: var(--ok); }
.success span, .warn span { color: var(--ink); }
.warn { background: var(--warn-soft); color: var(--warn); }
.ok-text { color: var(--ok); margin: 0; }
.error { color: var(--danger); margin: 0; }

pre { margin: 0; padding: 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); overflow-x: auto; font: 12.5px/1.55 ui-monospace, Consolas, monospace; white-space: pre; }

dialog { border: 1px solid var(--border); border-radius: 16px; padding: 20px; width: min(480px, calc(100vw - 24px)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(10, 16, 13, .5); }
.row-end { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.toast { position: fixed; left: 16px; right: 16px; bottom: 16px; margin: 0 auto; max-width: 480px; background: var(--ink); color: var(--bg); padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow); z-index: 20; }
.foot { color: var(--muted); font-size: 13px; padding-bottom: 28px; }
@media (prefers-reduced-motion: reduce) { .wait::before { animation: none; } }
.msg .muted { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
@media (max-width: 520px) { .top .btn { min-height: 38px; padding: 0 12px; font-size: 14px; } .brand small { font-size: 11.5px; } h1 { font-size: 23px; } }
