/* Le Brunch Épicé – Acte 2 · charte : vert jardin, rouge piment, or pagne */
:root {
  --bg: #FBF6EE; --surface: #FFFFFF; --ink: #1E2A1F; --muted: #5E6A5C; --line: #E6DCCB;
  --green: #1F3A24; --red: #C0261B; --gold: #B8892B; --gold-soft: #F4E7CC;
  --ok: #1E7B3A; --ok-bg: #E3F4E8; --ko: #B3261E; --ko-bg: #FBE4E1; --warn: #9A6100; --warn-bg: #FFF1D6;
  --display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 14px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121A13; --surface: #1B261C; --ink: #F1EBDF; --muted: #A9B3A6; --line: #2E3D2F;
    --green: #9CC79F; --red: #F0806F; --gold: #E0B95E; --gold-soft: #3A3120;
    --ok: #7FD89A; --ok-bg: #173A22; --ko: #FF9C8F; --ko-bg: #46201C; --warn: #F2C26B; --warn-bg: #3D2F12; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 980px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; text-wrap: balance; margin: 0; }
a { color: var(--red); }
.demo { background: var(--warn-bg); color: var(--warn); font-size: 13px; text-align: center; padding: 8px 16px; font-weight: 600; }

.hero { background: var(--green); color: #FBF6EE; position: relative; overflow: hidden; }
.hero .wrap { padding-block: 40px 44px; display: grid; gap: 14px; }
.hero .kicker { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #E0B95E; font-weight: 700; }
.hero h1 { font-size: clamp(40px, 8vw, 72px); color: #FFFFFF; }
.hero h1 em { font-style: normal; color: #F0806F; }
.hero .acte { font-family: var(--display); font-size: clamp(22px, 4vw, 30px); color: #E0B95E; }
.hero .infos { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; font-size: 15px; }
.hero .infos span { display: inline-flex; gap: 6px; align-items: center; }
.hero .bomba { display: inline-block; width: fit-content; border: 1px solid #E0B95E; color: #F7E7C4; padding: 4px 12px; border-radius: 999px; font-size: 14px; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(224,185,94,.35) 0 6px, transparent 6px 16px); pointer-events: none; }

.grid { display: grid; gap: 24px; grid-template-columns: 1.15fr .85fr; align-items: start; margin-top: 28px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; min-width: 0; }
.card h2 { font-size: 26px; margin-bottom: 14px; }

.formules { display: grid; gap: 10px; }
.formule { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 14px; cursor: pointer; background: var(--surface); }
.formule input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; }
.formule .nom { font-weight: 700; }
.formule .prix { font-weight: 800; color: var(--red); font-variant-numeric: tabular-nums; white-space: nowrap; }
.formule .det { grid-column: 2 / 4; color: var(--muted); font-size: 14px; }
.formule .reste { grid-column: 2 / 4; font-size: 12px; color: var(--gold); font-weight: 700; }
.formule:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent); }
.formule.ferme { opacity: .5; cursor: not-allowed; }

label.f { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.champs { display: grid; gap: 14px; margin-top: 18px; }
.ligne2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .ligne2 { grid-template-columns: 1fr; } }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
input:focus-visible, select:focus-visible, button:focus-visible, .formule:focus-within { outline: 3px solid color-mix(in srgb, var(--gold) 60%, transparent); outline-offset: 2px; }
.aide { font-size: 13px; color: var(--muted); font-weight: 400; }

.btn { font: 700 16px var(--body); border: 0; border-radius: 12px; padding: 15px 20px; cursor: pointer; background: var(--red); color: #fff; width: 100%; }
.btn:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn.sec { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.vert { background: #1F3A24; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; border-top: 1px dashed var(--line); margin-top: 6px; }
.total b { font-size: 24px; font-variant-numeric: tabular-nums; }
.msg { border-radius: 10px; padding: 12px 14px; font-weight: 600; font-size: 14px; }
.msg.ko { background: var(--ko-bg); color: var(--ko); }
.msg.ok { background: var(--ok-bg); color: var(--ok); }
.msg.att { background: var(--warn-bg); color: var(--warn); }

.menu dt { font-weight: 700; color: var(--green); margin-top: 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.menu dd { margin: 4px 0 0; }
.paiement { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.paiement span { font-size: 12px; font-weight: 700; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); }
.sur { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; }
.sur li { padding-left: 22px; position: relative; }
.sur li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* Billet */
.billets { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.billet { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: grid; }
.billet .haut { background: var(--green); color: #FBF6EE; padding: 16px 18px; }
.billet .haut h3 { font-size: 22px; color: #fff; }
.billet .haut small { color: #E0B95E; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
.billet .qr { display: grid; place-items: center; padding: 18px; border-bottom: 2px dashed var(--line); background: #fff; }
.billet .qr svg { max-width: 100%; height: auto; }
.billet .bas { padding: 14px 18px 18px; display: grid; gap: 4px; font-size: 14px; }
.billet .code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .04em; word-break: break-all; color: var(--muted); }
.pill { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; width: fit-content; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.ko { background: var(--ko-bg); color: var(--ko); } .pill.att { background: var(--warn-bg); color: var(--warn); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.actions .btn { width: auto; text-decoration: none; display: inline-block; text-align: center; }

/* Contrôle */
.scan { max-width: 520px; margin: 0 auto; }
#lecteur { width: 100%; border-radius: 14px; overflow: hidden; background: #000; min-height: 260px; }
.verdict { border-radius: 16px; padding: 22px; text-align: center; display: grid; gap: 6px; margin-top: 16px; }
.verdict b { font-size: 26px; font-family: var(--display); font-weight: 400; }
.verdict.valide { background: #1E7B3A; color: #fff; } .verdict.deja, .verdict.annule { background: #C77700; color: #fff; }
.verdict.faux, .verdict.inconnu { background: #B3261E; color: #fff; }

/* Admin */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.kpi span { color: var(--muted); font-size: 13px; } .kpi b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.barre { height: 8px; background: var(--gold-soft); border-radius: 99px; overflow: hidden; margin-top: 6px; } .barre i { display: block; height: 100%; background: var(--red); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lien-btn { background: none; border: 0; color: var(--red); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
footer.pied { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .demo, .actions, footer.pied { display: none; } body { background: #fff; } }
