/* Billetterie JIF — feuille de style unique, mobile d'abord, sans dépendance externe. */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/montserrat-latin-800-normal.woff2") format("woff2"); }
:root {
  /* Charte graphique officielle JIF 2026 : Orange Famille #E5843B, Bleu Éducation #0688C4,
     Jaune Communauté #E4D84D, Marine #0B2545, Encre #1E2A3A, Gris #6B7785, Nuage #F4F6F8,
     Crème #FFF4EA ; typographie Montserrat (titres Bold, textes Regular). */
  --ink: #1e2a3a;
  --muted: #5b6774;
  --paper: #f4f6f8;
  --card: #ffffff;
  --line: #dde3ea;
  --brand: #0b2545;
  --brand-2: #0577ac;
  --blue: #0688c4;
  --accent: #e5843b;
  --accent-hover: #d6732a;
  --accent-ink: #0b2545;
  --gold: #e4d84d;
  --cream: #fff4ea;
  --ok: #1f7a4d;
  --ok-bg: #e2f3ea;
  --warn: #9a5b00;
  --warn-bg: #fff1d6;
  --danger: #b42318;
  --danger-bg: #fde7e4;
  --info-bg: #e8f4fb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 37, 69, .06), 0 4px 16px rgba(11, 37, 69, .06);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-title: "Montserrat", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.5; font-size: 16px; }
a { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-family: var(--font-title); font-weight: 700; color: var(--brand); }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.small { font-size: .85rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.break { word-break: break-word; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.wrap.narrow { max-width: 460px; }
.wrap.wide { max-width: 1180px; }

/* En-têtes */
.sim-banner { background: repeating-linear-gradient(-45deg, #ffcf70, #ffcf70 12px, #ffd98a 12px, #ffd98a 24px); color: #4a2a00; text-align: center; padding: 8px 12px; font-size: .9rem; }
.site-header, .admin-header { background: var(--brand); color: #fff; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-center { display: flex; justify-content: center; margin-bottom: 18px; color: var(--brand); }
.brand-mark { background: var(--accent); color: var(--accent-ink); font-weight: 800; border-radius: 10px; padding: 6px 8px; font-size: .95rem; letter-spacing: .5px; }
.site-header, .admin-header { border-bottom: 4px solid var(--accent); }
.site-header { background: #fff; color: var(--brand); box-shadow: 0 1px 0 var(--line); }
.site-header .brand-text small { color: var(--muted); opacity: 1; }
.brand-logo { height: 52px; width: auto; display: block; }
.brand-logo.on-dark { height: 52px; }
.auth .brand-logo { height: 64px; }
.edition-tag { display: inline-block; background: var(--gold); color: var(--brand); font-weight: 700; font-size: .72rem; border-radius: 6px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.site-footer { border-top: 1px solid var(--line); background: var(--brand); color: #d6dde6; }
.site-footer a { color: #fff; }
.brand-text { display: flex; flex-direction: column; font-weight: 700; line-height: 1.1; font-family: var(--font-title); }
.brand-text small { font-family: var(--font); }
.brand-text small { font-weight: 400; opacity: .8; font-size: .78rem; }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px 40px; }


/* Cartes et blocs */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.notice { text-align: center; }
.hero { padding: 20px 4px 8px; }
.hero h1 { font-size: 2rem; color: var(--blue); }
.hero h1::after { content: ""; display: block; width: 64px; height: 5px; border-radius: 3px; background: var(--accent); margin-top: 10px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; color: var(--accent-hover); font-weight: 700; margin-bottom: .4em; }
.lead { font-size: 1.08rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.facts div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.facts dt { font-size: .75rem; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.facts dd { margin: 0; font-weight: 600; }
.prose { max-width: 65ch; }
.draft-note { background: var(--warn-bg); color: var(--warn); padding: 8px 12px; border-radius: 8px; font-size: .88rem; }
.step { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .85rem; margin-right: 6px; vertical-align: 2px; }

/* Billets à choisir */
.ticket-list { display: grid; gap: 10px; }
.ticket-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.ticket-row.is-disabled { opacity: .55; }
.ticket-info h3 { margin-bottom: .2em; }
.ticket-info .muted { font-size: .9rem; margin-bottom: .3em; }
.price { font-weight: 700; color: var(--brand); margin: 0; }
.qty select { font-size: 1.1rem; padding: 8px 10px; min-width: 72px; }
.attendees { grid-column: 1 / -1; display: grid; gap: 6px; }
.attendee { display: grid; gap: 2px; font-size: .85rem; color: var(--muted); }
.total-line { font-size: 1.1rem; text-align: right; margin-top: 12px; }
.hint { color: var(--muted); font-size: .88rem; margin-top: 10px; }

/* Formulaires */
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field label { font-weight: 600; font-size: .92rem; }
.field label small { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; color: inherit; border: 1px solid #cfc8ba; border-radius: 10px; padding: 11px 12px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(6, 136, 196, .3); border-color: var(--brand-2); }
input[type=checkbox], input[type=radio] { width: auto; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; font-size: .95rem; }
.check input { margin-top: 4px; transform: scale(1.2); }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; }
.form-grid { display: grid; gap: 4px 16px; grid-template-columns: 1fr; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters input, .filters select { width: auto; flex: 1 1 200px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 160px; padding: 7px 10px; }
.danger-zone { border-top: 1px dashed var(--line); padding-top: 10px; }

/* Moyens de paiement */
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.method { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 12px; padding: 14px 12px; cursor: pointer; position: relative; }
.method:has(input:checked) { border-color: var(--brand); background: #f1f7f5; }
.method-name { font-weight: 700; }
.method-wave .method-name { color: #1a8fd8; }
.method-orange_money .method-name { color: #e86b00; }
.method-sim { position: absolute; top: 4px; right: 8px; font-size: .68rem; color: var(--warn); text-transform: uppercase; }
.methods-inline { display: grid; gap: 10px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; border-radius: 12px; padding: 12px 18px; border: 2px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-block { width: 100%; margin-top: 8px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--brand); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.admin-header .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-sm { padding: 7px 12px; font-size: .88rem; border-radius: 9px; }
.btn-method.method-wave { background: #1a8fd8; color: #fff; }
.btn-method.method-orange_money { background: #e86b00; color: #fff; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.linklike { background: none; border: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; padding: 0; }

/* Messages */
.flash { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.flash ul { margin: .3em 0 0; padding-left: 1.2em; }
.flash-success { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--danger-bg); color: var(--danger); }
.flash-info { background: var(--info-bg); color: #1f3d6b; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #ece8df; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.status { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #ece8df; white-space: nowrap; }
.status-paid, .status-succeeded { background: var(--ok-bg); color: var(--ok); }
.status-pending, .status-initiated { background: var(--warn-bg); color: var(--warn); }
.status-refund_due, .status-failed, .status-mismatch, .status-cancelled { background: var(--danger-bg); color: var(--danger); }

/* Commande */
h1.status-ok, .status-ok { color: var(--ok); }
.spinner-line { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.summary { width: 100%; border-collapse: collapse; }
.summary td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.summary .total td { font-weight: 800; border-bottom: 0; padding-top: 10px; }
.num { text-align: right; white-space: nowrap; }
.tickets { margin-top: 8px; }
.ticket { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; display: grid; gap: 12px; justify-items: center; text-align: center; box-shadow: var(--shadow); border-top: 6px solid var(--brand); }
.ticket-void { opacity: .5; }
.family-pass { text-align: center; border-top: 6px solid var(--accent); background: linear-gradient(var(--cream), #fff 120px); display: grid; gap: 10px; justify-items: center; }
.family-pass p { text-align: left; margin: 0; }
.ticket-test { background: var(--warn-bg); color: var(--warn); font-weight: 800; padding: 4px 10px; border-radius: 8px; margin: 0; font-size: .85rem; }
.qr { width: 220px; height: 220px; image-rendering: pixelated; background: #fff; }
.center-block { display: block; margin: 0 auto 8px; width: 200px; height: 200px; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .8rem; color: var(--muted); word-break: break-all; }

/* Simulateur */
body.simulator { background: #2b2b2b; }
.sim-frame { background: #fff; border-radius: 16px; overflow: hidden; margin-top: 24px; border: 4px dashed #ffb020; }
.sim-warning { background: #ffb020; color: #3a2400; padding: 12px 16px; display: grid; gap: 2px; text-align: center; }
.sim-body { padding: 18px; }
.sim-amount { font-size: 2rem; font-weight: 800; margin: 0; }
.sim-actions { margin: 12px 0; }
.sim-advanced { margin-top: 10px; }
.sim-advanced summary { cursor: pointer; color: var(--muted); }
.mini { width: 100%; font-size: .78rem; border-collapse: collapse; }
.mini td, .mini th { border-bottom: 1px solid var(--line); padding: 4px; text-align: left; }

/* Authentification */
.auth-card { background: #fff; border-radius: var(--radius); padding: 24px 20px; margin-top: 32px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.recovery { columns: 2; list-style: none; padding: 0; font-size: 1.05rem; }
.secret { word-break: break-all; }

/* Administration */
.admin-nav { display: flex; gap: 4px; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 6px 10px; scrollbar-width: thin; }
.admin-nav a { white-space: nowrap; padding: 8px 12px; border-radius: 9px; text-decoration: none; color: var(--ink); font-size: .92rem; }
.admin-nav a[aria-current=page] { background: var(--brand); color: #fff; }
.page-title { margin-top: 8px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: grid; }
.kpi-label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 1.9rem; font-weight: 800; color: var(--brand); }
.kpi-sub { font-size: .8rem; color: var(--muted); }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.card .table-wrap { border: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #faf8f3; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table.compact td, .table.compact th { padding: 6px 8px; }
.row-void td { opacity: .55; }
.actions { display: flex; gap: 4px; flex-wrap: wrap; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.grid-2 { display: grid; gap: 16px; }
.narrow-card { max-width: 520px; }
.export-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.plain { padding-left: 1.2em; }
progress { width: 100%; height: 10px; accent-color: var(--brand); }
.logout { margin: 0; }

/* Contrôle des entrées */
body.checkin { background: #0b2545; color: #fff; }
body.checkin h1, body.checkin h2, body.checkin h3 { color: #fff; }
.scan-app { max-width: 560px; margin: 0 auto; padding: 12px; min-height: 100vh; }
.scan-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.scan-top > div:first-child { display: grid; }
.scan-count { font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.scan-count small { font-size: .75rem; color: #cfd8d5; font-weight: 400; }
.scan-gate { display: grid; gap: 4px; margin-bottom: 10px; font-size: .85rem; }
.scan-gate input { background: #13335c; border-color: #2c4f7c; color: #fff; }
.scan-video-wrap { position: relative; aspect-ratio: 1 / 1; background: #000; border-radius: 16px; overflow: hidden; display: grid; place-items: center; }
.scan-video-wrap video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid rgba(244, 184, 96, .9); border-radius: 18px; pointer-events: none; }
#start-cam { position: relative; z-index: 2; }
.scan-result { position: fixed; inset: 0; z-index: 10; display: grid; place-content: center; text-align: center; padding: 24px; gap: 8px; }
.scan-result[hidden] { display: none; }
.scan-ok { background: #138a4f; }
.scan-already { background: #d97706; }
.scan-invalid, .scan-cancelled, .scan-test, .scan-error { background: #b42318; }
.scan-result-title { font-size: 2.6rem; font-weight: 900; margin: 0; letter-spacing: .02em; }
.scan-result-msg { font-size: 1.2rem; }
.scan-result-detail { font-size: 1.05rem; opacity: .95; }
.scan-manual { margin-top: 16px; background: #13335c; border-radius: 16px; padding: 14px; }
.scan-manual form { display: flex; gap: 8px; }
.scan-manual input { background: #0b2545; border-color: #2c4f7c; color: #fff; }
.search-results { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.search-results li { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #0b2545; border-radius: 10px; padding: 8px 10px; font-size: .9rem; }
.search-results li.done { opacity: .5; }
.scan-nav { display: flex; justify-content: space-between; margin: 18px 0; font-size: .9rem; }
.scan-nav a { color: #cfd8d5; }

@media (min-width: 720px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.6rem; }
  .ticket { grid-template-columns: auto 1fr; text-align: left; justify-items: start; align-items: center; }
  .ticket-test { grid-column: 1 / -1; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
  .grid-2 { grid-template-columns: 3fr 2fr; }
  .methods-inline { grid-template-columns: 1fr 1fr; }
}
@media print {
  .site-header, .site-footer, .sim-banner, .btn, form { display: none !important; }
  .ticket { break-inside: avoid; box-shadow: none; }
}

/* Guichet / hotline */
.staff-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .staff-grid { grid-template-columns: 3fr 2fr; } }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.qty-row input { width: 80px; }
.pay-choice { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.pay-choice label { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--line); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-weight: 600; }
.big-total { font-size: 1.6rem; font-weight: 800; }
.wa-box { white-space: pre-wrap; background: #f4f8f2; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: .92rem; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-weight: 700; font-size: .85rem; background: #eee; }
.status-pill.paid { background: #d8f0e0; color: #135d34; }
.status-pill.pending { background: #fff3cd; color: #7a5a00; }
/* Impression guichet (ticket 80 mm / A6) */
.print-sheet { max-width: 80mm; margin: 0 auto; font-family: Arial, sans-serif; color: #000; }
.print-sheet .slip { border-bottom: 2px dashed #999; padding: 6mm 0; text-align: center; break-after: page; }
.print-sheet .slip:last-child { break-after: auto; }
.print-sheet img { width: 48mm; height: 48mm; }
.print-sheet h2 { font-size: 15px; margin: 2px 0; }
.print-sheet p { margin: 2px 0; font-size: 12px; }
.print-actions { text-align: center; margin: 12px; }
@media print { .print-actions, .sim-banner { display: none !important; } body { background: #fff; } }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.actions-row form { margin: 0; }

.formula { font-size: .85rem; color: var(--brand-2); font-weight: 600; margin: 2px 0 6px; }
/* Tickets repas : couleurs distinctes et non interchangeables (charte JIF) */
.meals { margin-top: 8px; }
.meal-group { border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.meal-group h3 { margin: 0 0 4px; }
.meal-breakfast { background: #fbf6cf; border: 3px solid var(--gold); }
.meal-breakfast h3 { color: #6a5d00; }
.meal-lunch { background: #e3f2fa; border: 3px solid var(--blue); }
.meal-lunch h3 { color: #045a82; }
.meal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.meal-card { background: #fff; border-radius: 10px; padding: 8px; text-align: center; font-size: .78rem; }
.meal-card img { width: 130px; height: 130px; }
.meal-card .meal-badge { display: block; font-weight: 800; letter-spacing: .04em; border-radius: 6px; padding: 3px 4px; margin-bottom: 4px; }
.meal-breakfast .meal-badge { background: var(--gold); color: var(--brand); }
.meal-lunch .meal-badge { background: var(--blue); color: #fff; }
.meal-card.is-served { opacity: .45; }

/* Tickets repas imprimés (imprimante thermique noir et blanc : formes distinctes, pas seulement la couleur) */
.slip-type { font-size: 20px; font-weight: 800; letter-spacing: 1px; padding: 6px 4px; margin-bottom: 4px; }
.slip-breakfast .slip-type { background: #000; color: #fff; }
.slip-lunch .slip-type { border: 4px double #000; }
@media screen { .slip-breakfast .slip-type { background: #e4d84d; color: #0b2545; } .slip-lunch .slip-type { background: #0688c4; color: #fff; border-color: #0b2545; } }
/* Point repas : couleur du service en cours */
.meal-app.svc-breakfast .scan-top { border-bottom: 6px solid var(--gold); }
.meal-app.svc-lunch .scan-top { border-bottom: 6px solid var(--blue); }
.meal-service select { width: 100%; font-weight: 700; margin-bottom: 8px; }
.scan-result.scan-wrong_type, .scan-result.scan-not_active, .scan-result.scan-out_of_window { background: #b42318; color: #fff; }
.scan-extra { display: grid; gap: 8px; justify-items: center; margin: 6px 0; }
.scan-student { background: var(--gold); color: var(--brand); font-weight: 800; padding: 6px 12px; border-radius: 8px; margin: 0; }

/* Choix de la formule (bouton radio) puis options */
.formula-list { display: grid; gap: 10px; }
.formula-card { border: 2px solid var(--line); border-radius: 14px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.formula-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(229, 132, 59, .15); }
.formula-card.is-disabled { opacity: .55; }
.formula-head { display: flex; gap: 12px; align-items: flex-start; padding: 14px; cursor: pointer; }
.formula-head input[type=radio] { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.formula-body { display: grid; gap: 2px; flex: 1; }
.formula-name { font-weight: 700; font-size: 1.1rem; color: var(--brand); }
.formula-price { font-weight: 700; color: var(--ink); }
.formula-panel { border-top: 1px dashed var(--accent); background: var(--cream); padding: 6px 14px 12px; border-radius: 0 0 12px 12px; }
.formula-panel[hidden] { display: none; }
.step-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.step-row:last-child { border-bottom: 0; }
.step-row .attendees { grid-column: 1 / -1; }
.step-label { display: grid; gap: 2px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.stepper input { width: 46px; text-align: center; border: 0; font-size: 1.05rem; font-weight: 700; padding: 8px 0; -moz-appearance: textfield; background: transparent; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.step-btn { width: 40px; height: 40px; border: 0; background: transparent; font-size: 1.3rem; font-weight: 700; color: var(--brand); cursor: pointer; }
.step-btn:hover { background: var(--paper); }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; }
fieldset.field legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
fieldset.field .check { display: flex; gap: 8px; align-items: center; margin: 4px 0; }

/* Crédit de conception, discret en bas de page */
.site-footer .site-credit { margin-top: 10px; font-size: .72rem; letter-spacing: .02em; opacity: .65; }

/* Badges bénévoles / intervenants / invités / presse */
.badge-thumb { width: 48px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.badge-actions .inline-form input[type=file] { max-width: 210px; font-size: .8rem; }
.tag.badge-kind-benevole { background: var(--accent); color: var(--accent-ink); }
.tag.badge-kind-intervenant { background: var(--blue); color: #fff; }
.tag.badge-kind-invite { background: var(--gold); color: var(--brand); }
.tag.badge-kind-presse { background: var(--brand); color: #fff; }
.scan-badge-photo { width: 150px; height: 190px; object-fit: cover; border-radius: 10px; border: 4px solid #fff; background: #fff; }
.scan-badge-kind { background: #fff; color: var(--brand); font-weight: 800; padding: 6px 14px; border-radius: 8px; margin: 0; letter-spacing: .05em; }
@page badge { size: A4 portrait; margin: 0; }
.badge-page { page: badge; width: 210mm; height: 297mm; margin: 0 auto 10mm; display: grid; grid-template-columns: 105mm 105mm; grid-template-rows: 148.5mm 148.5mm; background: #fff; break-after: page; font-family: Arial, Helvetica, sans-serif; color: #0b2545; }
.badge-page:last-of-type { break-after: auto; }
.badge-card { box-sizing: border-box; border: 1px dashed #9aa4ae; padding: 6mm 7mm 4mm; display: flex; flex-direction: column; overflow: hidden; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.badge-head { display: flex; align-items: center; gap: 3mm; height: 13mm; }
.badge-logo { height: 12mm; width: auto; }
.badge-event { font-size: 8.5pt; line-height: 1.25; }
.badge-band { margin: 2mm -7mm 3mm; padding: 2.2mm 0; text-align: center; font-size: 19pt; font-weight: 800; letter-spacing: 2px; }
.badge-benevole .badge-band { background: #e5843b; color: #0b2545; }
.badge-intervenant .badge-band { background: #0688c4; color: #fff; }
.badge-invite .badge-band { background: #e4d84d; color: #0b2545; }
.badge-presse .badge-band { background: #0b2545; color: #fff; }
.badge-body { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 0; }
.badge-photo { width: 30mm; height: 38mm; object-fit: cover; border-radius: 2mm; border: 0.6mm solid #0b2545; }
.badge-initials { display: flex; align-items: center; justify-content: center; font-size: 26pt; font-weight: 800; background: #eef2f6; color: #0b2545; }
.badge-name { margin-top: 2.5mm; font-size: 15pt; font-weight: 800; line-height: 1.1; max-height: 12mm; overflow: hidden; }
.badge-team { margin-top: 1mm; font-size: 10.5pt; color: #0577ac; font-weight: 700; }
.badge-foot { display: flex; align-items: center; gap: 3mm; margin-top: 2mm; }
.badge-qr { width: 30mm; height: 30mm; flex: none; }
.badge-rights { font-size: 8pt; line-height: 1.25; }
.badge-rights p { margin: 0 0 1.5mm; }
.badge-code { color: #5b6774; font-family: monospace; }
.badge-legal { text-align: center; font-size: 7pt; color: #5b6774; margin-top: 1mm; }
@media print { body.print { margin: 0; } .badge-page { margin: 0; } }
@media screen { body.print .badge-page { box-shadow: 0 2px 10px rgba(0,0,0,.15); } }
/* Moyens de paiement supplémentaires (MaliaPay) */
.method-mtn .method-name { color: #8a6d00; }
.method-djamo .method-name { color: #5b3cc4; }
.method-card .method-name { color: var(--brand); }
.method-peyapay .method-name { color: #0f7a55; }
.btn-method.method-mtn { background: #f5c400; color: #111; }
.btn-method.method-djamo { background: #5b3cc4; color: #fff; }
.btn-method.method-card { background: var(--brand); color: #fff; }
.btn-method.method-peyapay { background: #0f7a55; color: #fff; }
.pay-tips { padding-left: 18px; margin: 8px 0; }
.pay-tips li { margin-bottom: 4px; }
.total-detail { font-size: .9rem; color: var(--muted); margin-bottom: 0; }

/* Espace exposants */
.pack-card { display: block; }
.pack-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(229, 132, 59, .15); }
.pack-card .formula-body { display: flex; flex-direction: column; gap: 4px; }
.bank-details { background: #fff4ea; border-radius: 10px; padding: 12px; }

/* Dons */
.donation-box { border: 2px dashed var(--line); border-radius: 14px; padding: 12px 14px; margin: 14px 0; background: #fffaf3; }
.donation-box summary { cursor: pointer; color: var(--brand); }
.donation-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.chip { border: 2px solid var(--line); background: var(--card); border-radius: 99px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.chip:hover, .chip:focus-visible { border-color: var(--accent); }
.chip.is-on { border-color: var(--accent); background: #fff1e4; }
.donate-hero h1 { color: var(--brand); }
.amis-list { columns: 2; column-gap: 18px; list-style: none; padding: 0; margin: 8px 0 0; }
.amis-list li { break-inside: avoid; padding: 4px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.support-link { display: block; text-align: center; margin: 10px 0 0; font-weight: 700; }

/* Équipes */
.team-badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-weight: 800; font-size: .9rem; letter-spacing: .01em; }
.team-line { margin: 10px 0; }
.scan-team { font-size: 1.3rem; font-weight: 900; text-align: center; padding: 10px; border-radius: 12px; margin: 10px 0 0; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.team-grid .team-cell { border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.team-grid .team-cell small { display: block; font-weight: 600; opacity: .9; }

/* Tableau de bord : chiffres clés */
.summary-board { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
.sum-card, .sum-total { border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 2px; align-content: start; box-shadow: var(--shadow); }
.sum-card { background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--accent); }
.sum-tickets { border-top-color: #1F6FD1; }
.sum-dons { border-top-color: #E5843B; }
.sum-expo { border-top-color: #2E9E44; }
.sum-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sum-count { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.sum-amount { font-size: 1.9rem; font-weight: 800; color: var(--brand); line-height: 1.15; }
.sum-sub { font-size: .8rem; color: var(--muted); }
.sum-total { background: var(--brand); color: #fff; border: 0; }
.sum-total .sum-title, .sum-total .sum-sub { color: rgba(255, 255, 255, .8); }
.sum-total .sum-amount { color: #fff; font-size: 2.3rem; }
.dash-more { margin-bottom: 16px; }
.dash-more > summary { cursor: pointer; font-weight: 700; color: var(--brand); padding: 8px 0; }
.dash-more .kpis { margin-top: 10px; }
@media (min-width: 720px) {
  .summary-board { grid-template-columns: repeat(3, 1fr); }
  .sum-total { grid-column: 1 / -1; }
}
.sum-pending { display: grid; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #f1f3f6; color: var(--muted); text-decoration: none; font-size: .85rem; }
.sum-pending strong { color: var(--ink); }
.sum-pending.is-on { background: #fff4e0; color: #8a5a00; }
.sum-pending.is-on strong { color: #8a5a00; }
