/* Feuille de style unique — aucune police ni ressource externe (respect de la vie privée, CSP stricte). */
:root {
  --ink: #15171C;
  --muted: #5B616B;
  --line: #E3E5E1;
  --soft: #F4F6F3;
  --accent: #0B6E4F;
  --accent-dark: #08513A;
  --accent-tint: #E4F2EA;
  --online: #1F3F99;
  --online-tint: #E8EEFB;
  --warn: #B4441C;
  --warn-tint: #FBEDE6;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--soft);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; line-height: 1.55; font-size: 16px; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1 { font-size: clamp(26px, 4vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 8px; }
h2, .h3 { font-size: 19px; line-height: 1.3; margin: 0 0 8px; }
.h4 { font-size: 16px; margin: 0; }
p { margin: 0 0 12px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.break { word-break: break-all; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.mainnav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 15px; }
.mainnav a { color: var(--ink); text-decoration: none; padding: 10px 2px; min-height: 44px; display: inline-flex; align-items: center; }
.mainnav a[aria-current="page"] { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.mainnav a.btn { color: #fff; padding: 10px 16px; box-shadow: none; }
.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; padding: 10px 2px; min-height: 44px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 20px 48px; flex: 1; }
.footer { border-top: 1px solid var(--line); background: #fff; font-size: 14px; color: var(--muted); }
.footer .container { padding: 18px 20px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

.narrow { max-width: 560px; margin: 0 auto; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.no-margin { margin: 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions.end { justify-content: flex-end; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 32px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.warn { color: var(--warn); font-weight: 600; }
.ok { color: var(--accent); font-weight: 600; }
.lead { font-size: 18px; color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); margin: 0; }
.step { font-size: 14px; font-weight: 700; color: var(--accent); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card-link { display: block; text-decoration: none; color: var(--ink); }
.card-link:hover { border-color: var(--accent); }
.is-muted { opacity: 0.55; }
.danger-zone { border-color: #F0C9B9; }

.hero { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 5vw, 56px); }
.hero-text { max-width: 720px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--soft); color: var(--ink); }
.btn-link { background: none; color: var(--muted); text-decoration: underline; }
.btn-danger { background: var(--warn); color: #fff; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #4A6FD8; outline-offset: 2px; }

.form > * + * { margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 200px; min-width: 0; }
.field-row { display: flex; flex-wrap: wrap; gap: 16px; }
label, .label { font-weight: 600; font-size: 15px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=number], input[type=date], input:not([type]), select, textarea {
  font: inherit; width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #CFD3CD; border-radius: 12px; background: #fff; color: var(--ink);
}
textarea { min-height: 96px; }
.hint { font-size: 13.5px; color: var(--muted); margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.check label { font-weight: 400; }
.check-list { padding-left: 30px; display: flex; flex-direction: column; gap: 6px; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input { width: auto; flex: 1 1 160px; }
.inline-form input[type=number] { flex: 0 0 110px; }

.flash { border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-success { background: var(--accent-tint); color: #08402E; }
.flash-error { background: var(--warn-tint); color: #7A2C10; }
.flash-info { background: #FFF6DA; color: #5C4300; }

.badge { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge-store, .badge-ok { background: var(--accent-tint); color: var(--accent); }
.badge-online { background: var(--online-tint); color: var(--online); }
.badge-pending { background: #FFF1CC; color: #6A4A00; }
.badge-refused { background: var(--warn-tint); color: var(--warn); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi span { color: var(--muted); font-size: 14px; }
.kpi strong { font-size: 30px; letter-spacing: -0.02em; line-height: 1.2; }
.kpi small { color: var(--muted); font-size: 13px; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px; border-bottom: 1px solid #EEF0EC; vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data .num, .num { text-align: right; }

.split { width: 100%; height: 14px; border-radius: 999px; display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.dot-store { background: var(--accent); }
.dot-online { background: #4A6FD8; }

/* Carte membre */
.member-card { background: var(--accent); color: #fff; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.member-card-brand { font-weight: 700; font-size: 18px; }
.member-card-label { font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.member-card .qr { background: #fff; border-radius: 16px; padding: 10px; width: min(100%, 300px); align-self: center; }
.member-card .qr svg { display: block; width: 100%; height: auto; }
.member-card-name { font-size: 18px; font-weight: 600; margin: 0; text-align: center; }
.member-card-hint { font-size: 14px; margin: 0; text-align: center; }
.manual { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: rgba(255, 255, 255, 0.14); border-radius: 12px; padding: 12px; }
.manual div { display: flex; flex-direction: column; }
.manual strong { font-size: 20px; letter-spacing: 0.08em; }
.member-card .small { margin: 0; text-align: center; }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.code-box strong { font-size: 17px; letter-spacing: 0.06em; word-break: break-all; }
.link-box { display: block; background: var(--soft); padding: 12px; border-radius: 10px; }

/* Partenaire */
.result-head { display: flex; align-items: center; gap: 14px; }
.offer-choice { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; font-weight: 400; }
.offer-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.offer-choice input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.offer-choice span { display: flex; flex-direction: column; }
.offer-choice small { color: var(--muted); }
.refusal { background: var(--warn-tint); border-color: #F0C9B9; }
.summary { margin: 0; padding: 6px 20px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; }
.scanner-video { width: 100%; border-radius: 14px; background: #1E2228; aspect-ratio: 1 / 1; object-fit: cover; }
pre.code { background: var(--soft); padding: 12px; border-radius: 10px; white-space: pre-wrap; word-break: break-all; }
details summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.prose ul { padding-left: 20px; }

@media (max-width: 640px) {
  .container { padding: 20px 16px 40px; }
  .mainnav { gap: 0 14px; }
  .card { padding: 16px; }
}
