/* Billetterie OBNL : design 2026. La couleur d'accent (--accent) est injectée par la page. */
:root {
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --ink: #111114;
  --ink-2: #2C2E33;
  --ink-3: #3F4148;
  --muted: #5E6068;
  --line: #E3E3E8;
  --line-strong: #D5D5DC;
  --soft: #EDEDF1;
  --night: #15151B;
  --night-2: #26262E;
  --night-line: #2E2E37;
  --night-muted: #C9C9D1;
  --accent: #C6F432;
  --coral: #FF6B3D;
  --violet: #8B7BFF;
  --ok: #138A43;
  --ok-soft: #E7F6EC;
  --ok-ink: #116330;
  --warn: #B5530A;
  --danger: #B42318;
  --danger-soft: #FDEBE6;
  --danger-ink: #A33A12;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: var(--ink); }
a:hover { color: var(--ink-3); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; margin: 0; line-height: 1.08; }
h1 { font-size: clamp(28px, 4vw, 36px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
code, .mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { color: var(--ink); border-color: var(--ink); }
.btn-accent { background: var(--accent); border-color: var(--accent); font-weight: 700; }
.btn-accent:hover { filter: brightness(.96); border-color: var(--accent); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.btn-dark:hover { color: #FFFFFF; background: var(--ink-3); }
.btn-danger { color: var(--danger-ink); border-color: #F1C3B5; }
.btn-danger:hover { color: var(--danger); border-color: var(--danger); }
.btn-lg { min-height: 54px; font-size: 16px; padding: 0 24px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; flex: none;
}
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
form.inline { display: inline; margin: 0; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.input, .field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  min-height: 48px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface);
  padding: 0 14px; font: inherit; font-weight: 400; font-size: 16px; color: var(--ink); width: 100%;
}
.field textarea { padding: 12px 14px; min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-3); line-height: 1.45; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--ink); flex: none; }
.grid-auto { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(var(--min, 180px), 1fr)); }

.alert { padding: 12px 16px; border-radius: 14px; background: var(--danger-soft); color: var(--danger-ink); font-size: 15px; }
.alert-info { background: #F1F8DA; color: #3D4A0D; }
.alert-ok { background: var(--ok-soft); color: var(--ok-ink); }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.card-tight { padding: 14px 16px; border-radius: 18px; }
.card-night { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.card-night .muted { color: var(--night-muted); }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--ink-3); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok-ink); }
.badge-danger { background: var(--danger-soft); color: var(--danger-ink); }
.badge-accent { background: var(--accent); color: var(--ink); }
.progress { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--ink); }

/* ---------- Affiche générée ---------- */
.cover { position: relative; overflow: hidden; border-radius: 28px; background: var(--night); aspect-ratio: 1 / 1; color: #FFFFFF; }
.cover .s1, .cover .s2, .cover .s3 { position: absolute; display: block; }
.cover-1 .s1 { width: 72%; height: 72%; border-radius: 999px; background: var(--accent); right: -20%; top: -17%; }
.cover-1 .s2 { width: 50%; height: 50%; border-radius: 999px; border: clamp(14px, 6%, 24px) solid var(--violet); left: -17%; bottom: -20%; }
.cover-1 .s3 { width: 18%; height: 18%; border-radius: 16px; background: var(--coral); left: 54%; top: 58%; transform: rotate(18deg); }
.cover-2 { background: var(--coral); }
.cover-2 .s1 { width: 64%; height: 64%; border-radius: 999px; border: clamp(16px, 7%, 30px) solid var(--ink); left: -18%; bottom: -22%; }
.cover-2 .s2 { width: 30%; height: 30%; border-radius: 999px; background: var(--accent); right: 8%; top: 10%; }
.cover-2 .s3 { width: 22%; height: 22%; background: #FFFFFF; right: 30%; top: 46%; border-radius: 6px; transform: rotate(-12deg); }
.cover-3 { background: var(--violet); }
.cover-3 .s1 { width: 46%; height: 46%; border-radius: 28px; background: #FFFFFF; right: -6%; top: 8%; transform: rotate(18deg); }
.cover-3 .s2 { width: 40%; height: 40%; border-radius: 999px; background: var(--ink); left: -10%; top: -12%; }
.cover-3 .s3 { width: 20%; height: 20%; border-radius: 999px; background: var(--accent); right: 18%; top: 52%; }
.cover-date {
  position: absolute; left: 6.5%; top: 6.5%; background: #FFFFFF; color: var(--ink); border-radius: 16px;
  padding: 10px 14px; text-align: center; line-height: 1; z-index: 1;
}
.cover-date b { display: block; font-size: 11px; letter-spacing: .08em; }
.cover-date strong { display: block; font-family: var(--display); font-size: 28px; font-weight: 800; margin-top: 2px; }
.cover-title {
  position: absolute; left: 6.5%; right: 6.5%; bottom: 7%; z-index: 1;
  font-family: var(--display); font-weight: 800; line-height: .92; letter-spacing: -.02em;
  font-size: var(--cover-size, 46px); overflow-wrap: anywhere;
}
.cover-2 .cover-title, .cover-3 .cover-title { color: var(--ink); }
.cover-title em { font-style: normal; color: var(--accent); }
.cover-2 .cover-title em { color: #FFFFFF; }
.cover-3 .cover-title em { color: #FFFFFF; }
.cover-mini { width: 52px; height: 52px; border-radius: 14px; aspect-ratio: auto; flex: none; }
.cover-mini .cover-title, .cover-mini .cover-date { display: none; }

/* ---------- Pages publiques ---------- */
.pub-header {
  max-width: 1120px; margin: 0 auto; padding: 18px 20px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 12px; background: var(--ink); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 14px; flex: none;
}
.pub-main { max-width: 1120px; margin: 0 auto; padding: 8px 20px 120px; }
.pub-narrow { max-width: 560px; margin: 0 auto; }
.demo-banner { background: #FFF3C4; color: #5C4400; text-align: center; font-size: 13px; padding: 6px 16px; }

.event-grid { display: grid; gap: 28px 40px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) {
  .event-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .event-grid .cover { position: sticky; top: 20px; }
}
.info-row { display: flex; gap: 12px; align-items: center; }
.info-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.tier { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tier-price { font-family: var(--display); font-weight: 700; font-size: 20px; white-space: nowrap; }
.tier-feature { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.tier-feature .muted { color: var(--night-muted); }
.prose { font-size: 16px; line-height: 1.6; color: var(--ink-2); white-space: pre-line; }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.sticky-cta .btn { flex: 1; max-width: 260px; }
.sticky-total { font-family: var(--display); font-weight: 800; font-size: 24px; }
.desktop-only { display: none; }
@media (min-width: 900px) {
  .sticky-cta.mobile-only { display: none; }
  .desktop-only { display: block; }
  .pub-main:has(.event-grid) { padding-bottom: 64px; }
}

/* Choix des billets */
.stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.stepper button {
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink);
}
.stepper button.plus { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper input {
  width: 34px; text-align: center; border: 0; background: transparent; font: inherit; font-weight: 700;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; padding: 0;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 8px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 15px; text-align: center;
  white-space: nowrap;
}
.chip input:checked + span { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Billet façon Wallet */
.wticket { background: var(--night); color: #FFFFFF; border-radius: 26px; overflow: hidden; }
.wticket-top { padding: 20px 22px 16px; display: flex; justify-content: space-between; gap: 12px; }
.wticket-org { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.wticket-title { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.05; margin-top: 4px; }
.wticket-dot { width: 54px; height: 54px; border-radius: 999px; background: var(--accent); flex: none; }
.wticket-cut { position: relative; height: 22px; }
.wticket-cut::before, .wticket-cut::after { content: ''; position: absolute; top: 0; width: 22px; height: 22px; border-radius: 99px; background: var(--bg); }
.wticket-cut::before { left: -11px; }
.wticket-cut::after { right: -11px; }
.wticket-cut span { position: absolute; left: 20px; right: 20px; top: 10px; border-top: 2px dashed #3A3A44; }
.wticket-body { padding: 12px 22px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.qr { background: #FFFFFF; padding: 12px; border-radius: 16px; width: min(230px, 70vw); }
.qr svg { display: block; width: 100%; height: auto; }
/* Bas du billet : trois colonnes (type, nom, numéro), chaque étiquette alignée sur sa valeur. */
.wticket-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 12px; width: 100%; font-size: 13px; }
.wticket-meta > div:nth-child(2) { text-align: center; }
.wticket-meta > div:last-child { text-align: right; }
.wticket-meta .k { color: #9A9AA6; }
.wticket-meta .v { font-weight: 600; }
.wticket.is-used .qr { opacity: .35; }

/* ---------- En-tête, pied de page, menus ---------- */
.pub-nav { display: flex; align-items: center; gap: 18px; font-size: 15px; font-weight: 500; }
@media (max-width: 640px) { .pub-nav { gap: 8px; } .pub-header .brand { font-size: 0; gap: 0; } .pub-header .brand-mark { font-size: 14px; } }
.pub-nav a:not(.btn) { text-decoration: none; color: var(--ink-3); }
.pub-nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 640px) { .hide-sm { display: none !important; } }
.pub-wide { max-width: 1200px; }
/* Pied de page collé en bas, même quand la page est courte. */
body.is-public { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.is-public > .pub-main { flex: 1 0 auto; width: 100%; }
body.is-public > .pub-header { width: 100%; }
.pub-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; }
.pub-footer-inner { max-width: 1120px; margin: 0 auto; padding: 36px 20px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.pub-footer-links { display: flex; flex-wrap: wrap; gap: 32px 48px; font-size: 14px; }
.pub-footer-links a { color: var(--ink-3); text-decoration: none; }
.pub-footer-links a:hover { color: var(--ink); text-decoration: underline; }
body:has(.sticky-cta.mobile-only) .pub-footer { padding-bottom: 90px; }
@media (min-width: 900px) { body:has(.sticky-cta.mobile-only) .pub-footer { padding-bottom: 0; } }

.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: 0 12px 32px rgba(17, 17, 20, .14);
  display: flex; flex-direction: column;
}
.menu-list a { padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 15px; }
.menu-list a:hover { background: var(--soft); }
.night .menu-list { background: #1B1B22; border-color: var(--night-line); }
.night .menu-list a:hover { background: #26262E; }

/* Cartes de billets cliquables */
a.tier { text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.tier:hover { border-color: var(--ink); color: inherit; }
a.tier-feature, a.tier-feature:hover { color: #FFFFFF; }
a.tier:active { transform: scale(.99); }
.tier-go { display: inline-flex; align-items: center; gap: 10px; }
.tier-go .chev { width: 32px; height: 32px; border-radius: 99px; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; }
.tier-feature .tier-go .chev { background: var(--accent); color: var(--ink); }

/* Accueil du site */
.hero { padding: 28px 0 8px; display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); padding: 48px 0 24px; } }
.hero h1 { font-size: clamp(36px, 6.4vw, 68px); line-height: .98; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; background: var(--accent); padding: 0 .12em; border-radius: .18em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero-lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink-3); max-width: 560px; }
.hero-art { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hero-art .cover:nth-child(2) { transform: translateY(28px); }
.event-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.event-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.event-card:hover h3 { text-decoration: underline; }
.event-card h3 { font-size: 20px; }
.event-card.is-past .cover { filter: grayscale(1); opacity: .55; }
.org-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.org-cards a:hover { border-color: var(--ink); }
.band { background: var(--ink); color: #FFFFFF; border-radius: 32px; padding: clamp(24px, 5vw, 56px); display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .band { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; } }
.band h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -.02em; }
.band .muted { color: var(--night-muted); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li > span:first-child { flex: none; width: 26px; height: 26px; border-radius: 99px; background: var(--accent); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.step { counter-increment: step; }
.step::before { content: counter(step); display: inline-flex; width: 36px; height: 36px; border-radius: 12px; background: var(--ink); color: var(--accent); font-family: var(--display); font-weight: 800; align-items: center; justify-content: center; margin-bottom: 12px; }
.section-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }

/* Pour les organismes */
.calc { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.calc-col.is-us { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.calc-col.is-us .muted { color: var(--night-muted); }
.calc-big { font-family: var(--display); font-weight: 800; font-size: 32px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.calc-col.is-us .calc-big { color: var(--accent); }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq details p { margin-top: 10px; color: var(--ink-3); }
.features { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Pages légales */
.legal { max-width: 760px; margin: 0 auto; }
.legal h2 { margin-top: 28px; margin-bottom: 8px; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.65; }
.legal ul { padding-left: 20px; }
.todo { background: #FFF3C4; padding: 0 4px; border-radius: 4px; }

/* ---------- Administration ---------- */
.admin-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidenav {
  flex: 1 1 220px; max-width: 100%; background: var(--ink); color: #FFFFFF; padding: 22px 14px;
  display: flex; flex-direction: column; gap: 4px;
}
@media (min-width: 900px) { .sidenav { max-width: 260px; min-height: 100vh; } }
.sidenav .brand { color: #FFFFFF; padding: 0 8px 18px; }
.sidenav .brand-mark { background: var(--accent); color: var(--ink); }
.sidenav a.nav-link {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 12px;
  color: var(--night-muted); text-decoration: none;
}
.sidenav a.nav-link:hover { color: #FFFFFF; background: #1D1D24; }
.sidenav a.nav-link.is-active { background: var(--night-2); color: #FFFFFF; font-weight: 600; }
.sidenav .nav-sub { padding-left: 24px; font-size: 14px; min-height: 38px; }
.sidenav-foot { margin-top: auto; border-top: 1px solid var(--night-line); padding: 16px 12px 0; font-size: 13px; color: var(--night-muted); display: flex; flex-direction: column; gap: 8px; }
.sidenav-foot form button { color: var(--night-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 99px; background: #4ADE80; display: inline-block; margin-right: 8px; }
.status-dot.off { background: #F59E0B; }

.admin-main { flex: 999 1 560px; min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 64px; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.kpi-label { font-size: 13px; color: var(--muted); }
.card-night .kpi-label { color: var(--night-muted); }
.kpi-value { font-family: var(--display); font-weight: 800; font-size: 34px; margin-top: 6px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 18px; color: var(--muted); font-weight: 600; }
.card-night .kpi-value { color: var(--accent); }
.kpi-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.card-night .kpi-sub { color: var(--night-muted); }
.split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.split > .wide { flex: 2 1 520px; min-width: 0; }
.split > .narrow { flex: 1 1 300px; min-width: 0; }

.chart { height: 220px; display: flex; align-items: flex-end; gap: 6px; border-bottom: 1px solid var(--line); padding-top: 24px; }
.chart-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.chart-col b { font-size: 12px; color: var(--ink-3); }
.chart-bar { width: 100%; min-height: 3px; border-radius: 8px 8px 3px 3px; background: var(--ink); }
.chart-bar.is-best { background: var(--accent); box-shadow: inset 0 0 0 1px var(--ink); }
.chart-labels { display: flex; gap: 6px; }
.chart-labels span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.hbar { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.hbar span { display: block; height: 100%; border-radius: 99px; background: var(--ink); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--soft); vertical-align: middle; font-size: 14px; }
th { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.is-selected td { background: #F7FBE8; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.avatar { width: 36px; height: 36px; border-radius: 99px; background: var(--soft); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.timeline li { display: flex; gap: 10px; }
.timeline .dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 99px; background: var(--ok-ink); flex: none; }
.timeline .dot.todo { background: transparent; border: 2px solid var(--line-strong); }
.timeline .dot.bad { background: var(--danger); }
.filter-chip[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.search-box { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); }
.search-box input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; background: transparent; color: var(--ink); min-width: 0; }

.tier-row { display: grid; gap: 10px; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(90px, 1fr)) 44px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.tier-row .full { grid-column: 1 / -2; }
.tier-row .net { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
@media (max-width: 700px) { .tier-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tier-row .full, .tier-row .net { grid-column: 1 / -1; } }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--soft); cursor: pointer; }
.switch { position: relative; flex: none; width: 52px; height: 32px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-strong); transition: background .15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 99px; background: #FFFFFF; transition: transform .15s, background .15s; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--accent); }
.switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.cover-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.cover-pick label { position: relative; width: 84px; cursor: pointer; }
.cover-pick input { position: absolute; opacity: 0; }
.cover-pick .cover { border-radius: 16px; border: 3px solid transparent; }
.cover-pick input:checked + .cover { border-color: var(--ink); }
.cover-pick input:focus-visible + .cover { outline: 2px solid var(--ink); outline-offset: 2px; }
.code-big { font-family: var(--mono); font-size: 20px; letter-spacing: .15em; font-weight: 600; background: var(--accent); padding: 4px 10px; border-radius: 10px; }
.break { word-break: break-all; }

/* ---------- Bénévoles (sombre, plein écran) ---------- */
.night { background: #0C0C10; color: #FFFFFF; min-height: 100vh; }
.night a { color: #FFFFFF; }
.night .muted { color: #9A9AA6; }
.scan { max-width: 520px; margin: 0 auto; padding: 18px 16px 32px; display: flex; flex-direction: column; gap: 16px; }
.scan-count { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; text-align: right; }
.scan-count small { font-size: 16px; color: #9A9AA6; font-weight: 600; }
.reader { position: relative; border-radius: 28px; background: #1B1B22; overflow: hidden; min-height: 300px; }
.reader video { display: block; width: 100% !important; }
.reader-msg { padding: 24px; text-align: center; color: var(--night-muted); font-size: 15px; }
.night .btn { background: #1B1B22; border-color: var(--night-line); color: #FFFFFF; }
.night .btn-light { background: #FFFFFF; border-color: #FFFFFF; color: var(--ink); }
.night .btn-accent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.night .input, .night .field input:not([type=checkbox]):not([type=radio]) { background: #1B1B22; border-color: var(--night-line); color: #FFFFFF; }
.night .field input:focus { outline-color: var(--accent); }
.night .card { background: #16161C; border-color: var(--night-line); color: #FFFFFF; }
.matches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.matches li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #16161C; border: 1px solid var(--night-line); border-radius: 14px; padding: 10px 12px 10px 14px; }
.result {
  position: fixed; inset: 0; z-index: 50; border: 0; width: 100%; color: #FFFFFF; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 32px; text-align: center;
}
.result-ok { background: var(--ok); }
.result-used { background: var(--warn); }
.result-invalid, .result-wrong_event, .result-refunded { background: var(--danger); }
.result-icon { width: 120px; height: 120px; }
.result-title { font-family: var(--display); font-weight: 800; font-size: clamp(36px, 10vw, 48px); line-height: 1; }
.result-name { font-size: 22px; font-weight: 600; }
.result-detail { font-size: 17px; opacity: .92; }
.result-hint { margin-top: 26px; font-size: 14px; opacity: .85; }
.result-handover { background: #FFFFFF; color: var(--ink); border-radius: 14px; padding: 10px 16px; font-size: 18px; font-weight: 700; }
.result-undo { position: fixed; z-index: 51; left: 50%; bottom: 32px; transform: translateX(-50%); background: rgba(0, 0, 0, .25) !important; border-color: rgba(255, 255, 255, .5) !important; color: #FFFFFF !important; }
.org-switch select { width: 100%; min-height: 40px; border-radius: 10px; background: var(--night-2); color: #FFFFFF; border: 1px solid var(--night-line); padding: 0 10px; font: inherit; margin-bottom: 8px; }
.night .stepper button { background: #1B1B22; border-color: var(--night-line); color: #FFFFFF; }
.night .stepper button.plus { background: #FFFFFF; color: var(--ink); border-color: #FFFFFF; }
.night .stepper input { color: #FFFFFF; }

/* ---------- Cellulaire : ajustements ---------- */
.pub-main { padding-bottom: 48px; }
@media (max-width: 899px) { body:has(.sticky-cta.mobile-only) .pub-main { padding-bottom: 120px; } }
.wticket-meta > div { min-width: 0; }
.wticket-meta .v { overflow-wrap: anywhere; }

@media (max-width: 640px) {
  /* Accueil et page d'organisme : liste compacte (affiche à gauche, infos à droite). */
  .event-cards { gap: 12px; }
  .event-card { flex-direction: row; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px; }
  .event-card > .cover { width: 104px; flex: none; border-radius: 14px; }
  .event-card > .cover .cover-date { left: 6px; top: 6px; padding: 5px 7px; border-radius: 9px; }
  .event-card > .cover .cover-date strong { font-size: 16px; }
  .event-card > .cover .cover-date b { font-size: 8px; }
  .event-card > .cover .cover-title { display: none; }
  .event-card h3 { font-size: 17px; }

  /* Tableau de bord : indicateurs sur deux colonnes. */
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis .card { padding: 14px; border-radius: 18px; }
  .kpi-value { font-size: 24px; }
  .kpi-value small { font-size: 14px; }

  /* Filtres : une bande qui défile au lieu de plusieurs lignes. */
  .filter-bar { flex-wrap: wrap; }
  .filter-bar .search-box { flex: 1 1 100%; }
  .chip-row { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
  .chip-row::-webkit-scrollbar { display: none; }
  .chip-row > * { flex: none; }

  /* Participants : chaque billet devient une carte. */
  table.cards-attendees thead, table.cards-team thead { display: none; }
  table.cards-attendees tr { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "num name status" "num type type"; gap: 2px 10px; padding: 12px 14px; border-bottom: 1px solid var(--soft); }
  table.cards-attendees td { padding: 0; border: 0; }
  table.cards-attendees .c-num { grid-area: num; align-self: center; }
  table.cards-attendees .c-name { grid-area: name; min-width: 0; }
  table.cards-attendees .c-status { grid-area: status; }
  table.cards-attendees .c-type { grid-area: type; font-size: 13px; color: var(--muted); }
  table.cards-attendees .c-chan { display: none; }

  /* Équipe : une carte par personne. */
  table.cards-team tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "person person" "duty duty" "role actions"; gap: 8px; padding: 14px; border-bottom: 1px solid var(--soft); }
  table.cards-team td { padding: 0; border: 0; }
  table.cards-team .c-person { grid-area: person; }
  table.cards-team .c-role { grid-area: role; }
  table.cards-team .c-duty { grid-area: duty; }
  table.cards-team .c-actions { grid-area: actions; align-self: center; }

  /* Formulaire d'événement : le bouton × en haut à droite de chaque billet. */
  .tier-row { position: relative; padding-top: 18px; }
  .tier-row > .field:first-of-type { grid-column: 1 / -1; padding-right: 44px; }
  .tier-row [data-remove-row] { position: absolute; top: 10px; right: 10px; margin: 0 !important; width: 36px; height: 36px; }
}


/* ---------- Impression ---------- */
@media print {
  .no-print, .demo-banner, .pub-header, .sticky-cta { display: none !important; }
  body { background: #FFFFFF; }
  .wticket { break-inside: avoid; margin-bottom: 16px; }
}

/* Affiche et code QR */
.qr-kit { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; }
.qr-box { background: #FFFFFF; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.qr-box svg { display: block; width: 100%; height: auto; }
.qr-url { word-break: break-all; background: var(--soft); padding: 8px 10px; border-radius: 8px; }
@media (max-width: 640px) {
  .qr-kit { grid-template-columns: 1fr; }
  .qr-box { max-width: 220px; }
}

/* Bulles d'aide « ? » */
.tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 4px; border-radius: 999px; background: var(--soft); color: var(--muted); font: 700 12px/1 var(--body); vertical-align: middle; cursor: help; flex: none; }
.tip:hover, .tip:focus { background: var(--ink); color: #FFFFFF; outline: none; }
.tip-text { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 60; width: max-content; max-width: 280px; padding: 9px 12px; border-radius: 12px; background: var(--night); color: #FFFFFF; font: 400 13px/1.45 var(--body); letter-spacing: 0; text-align: left; text-transform: none; white-space: normal; box-shadow: 0 10px 30px rgba(0,0,0,.18); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s; }
.tip:hover .tip-text, .tip:focus .tip-text { opacity: 1; visibility: visible; }
@media (max-width: 640px) {
  .tip-text { position: fixed; left: 16px; right: 16px; bottom: 16px; transform: none; width: auto; max-width: none; }
}

/* Pastilles de couleur */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.swatch > input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch > span:first-of-type { width: 36px; height: 36px; border-radius: 999px; border: 1px solid rgba(0,0,0,.12); display: block; }
.swatch input[type=color] { padding: 0; background: none; cursor: pointer; overflow: hidden; }
.swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch input[type=color]::-webkit-color-swatch { border: none; border-radius: 999px; }
.swatch > input[type=radio]:checked + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.swatch > input[type=radio]:focus-visible + span { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--violet); }
.swatch-label { font-size: 13px; color: var(--muted); }

/* Formes de code QR */
.qr-styles { display: flex; flex-wrap: wrap; gap: 10px; }
.qr-style { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 12px 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 600; }
.qr-style input { position: absolute; opacity: 0; }
.qr-style:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.qr-style:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--violet); }
.qr-box img { display: block; width: 100%; height: auto; }

/* Bouton Scanner toujours à portée de main */
.fab-scan { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 14px 20px; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 700; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.fab-scan:hover { transform: translateY(-1px); }
.admin-main { padding-bottom: 96px; }
@media print { .fab-scan { display: none !important; } }

/* Tableau « qui peut faire quoi » */
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-yes { color: var(--ok); font-weight: 700; }
.perm-no { color: var(--line-strong); }
/* « Autre » : un arc-en-ciel tant qu’aucune couleur personnelle n’est choisie */
.swatch-rainbow { background: conic-gradient(#FF4D4D, #FFD23F, #3DDC97, #5CC8FF, #8B7BFF, #FF8FC7, #FF4D4D); }
.swatch-panel { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); width: fit-content; }
.swatch-panel input[type=color][data-swatch-picker] { width: 56px; height: 40px; min-height: 0; padding: 2px; border-radius: 10px; cursor: pointer; }
.field > .field-title { display: inline-flex; align-items: center; }
.only-sm { display: none !important; }
@media (max-width: 640px) { .only-sm { display: flex !important; } }
/* Les textes pour lecteurs d'écran restent dans leur tableau (sinon la page déborde sur mobile). */
.table-wrap { position: relative; }
/* Bulle d'aide affichée par app.js (le CSS seul reste en secours sans JavaScript) */
.has-js .tip-text { display: none; }
.tip-pop { position: fixed; z-index: 1000; max-width: 280px; padding: 10px 13px; border-radius: 12px; background: var(--night); color: #FFFFFF; font: 400 13px/1.45 var(--body); box-shadow: 0 12px 34px rgba(0,0,0,.25); pointer-events: none; }
.tip-pop.is-sheet { left: 16px; right: 16px; bottom: 16px; top: auto; width: auto; max-width: none; font-size: 14px; padding: 14px 16px; }
/* « Qui peut faire quoi » replié sous les membres */
.perm-details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.perm-details > summary::-webkit-details-marker { display: none; }
.perm-details > summary::before { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.perm-details[open] > summary::before { transform: rotate(45deg); }
.perm-details > summary h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Lien de vente bien en vue sur le tableau de bord */
.sale-link { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px 12px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.sale-link-label { font-weight: 700; display: inline-flex; align-items: center; }
.sale-link-url { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; font-size: 14px; color: var(--ink); }
.sale-created h2 { font-size: 22px; }

/* ---------- Centre d'aide ---------- */
.help-hero { padding: 28px 0 8px; }
.help-hero h1 { font-size: clamp(30px, 5vw, 46px); }
.help-search { max-width: 620px; width: 100%; }
.help-search input { min-height: 54px; font-size: 17px; }
.help-groups { display: grid; gap: 34px; margin-top: 28px; }
.help-group h2 { font-size: 22px; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.help-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .12s, transform .12s; }
.help-card:hover { border-color: var(--ink); transform: translateY(-1px); }
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 12px; }
.help-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 8px; }
.help-side ul { list-style: none; margin: 6px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.help-side li a { display: block; padding: 7px 10px; border-radius: 10px; color: var(--ink-3); text-decoration: none; font-size: 14px; }
.help-side li a:hover { background: var(--soft); }
.help-side li a.is-active { background: var(--ink); color: #FFFFFF; font-weight: 600; }
.help-article { max-width: 720px; }
.help-article h1 { font-size: clamp(28px, 4.5vw, 40px); margin: 6px 0 10px; }
.help-lead { font-size: 18px; color: var(--muted); margin: 0 0 18px; }
.help-toc { padding: 14px 18px; border-radius: 16px; background: var(--soft); margin-bottom: 24px; }
.help-toc ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.8; }
.help-body { font-size: 16.5px; line-height: 1.7; }
.help-body h2 { font-size: 24px; margin: 34px 0 10px; scroll-margin-top: 20px; }
.help-body h3 { font-size: 18px; margin: 24px 0 6px; }
.help-body p { margin: 0 0 14px; }
.help-body ul, .help-body ol { margin: 0 0 16px; padding-left: 22px; }
.help-body li { margin: 4px 0; }
.help-body code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.help-callout { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-left: 4px solid var(--accent); }
.help-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.help-pager a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.help-pager a:hover { border-color: var(--ink); }
.help-link { align-self: flex-end; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-3); margin-bottom: -10px; }
@media (max-width: 860px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .help-side { position: static; }
  .help-side nav { display: none; }
}

/* ---------- Menu de l'espace organisme : groupes titrés ; sur téléphone, un bouton « Menu » ---------- */
.sidenav-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nav-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--night-line); background: transparent; color: #FFFFFF; font: 600 15px var(--body); cursor: pointer; }
.nav-groups { display: flex; flex-direction: column; gap: 18px; flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { padding: 0 12px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8E8E99; }
.sidenav .org-switch select { width: 100%; }
@media (max-width: 899px) {
  .sidenav { position: sticky; top: 0; z-index: 45; padding: 8px 12px; gap: 0; max-height: 100vh; overflow-y: auto; }
  .sidenav .brand { padding: 0; font-size: 15px; }
  .has-js .nav-toggle { display: inline-flex; }
  .has-js .nav-groups { display: none; padding: 14px 0 8px; }
  .has-js .nav-groups.is-open { display: flex; }
  .nav-groups { padding-top: 12px; }
  .sidenav-foot { margin-top: 4px; }
}

/* En-tête des pages d'un événement : retour, titre, onglets */
.event-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: -4px; }
.event-bar-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.event-bar-head > a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.event-bar-title { font-weight: 700; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--ink); }

/* Jour J */
.dayof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.dayof-action { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); min-height: 150px; transition: border-color .12s, transform .12s; }
.dayof-action:hover { border-color: var(--ink); transform: translateY(-1px); }
.dayof-action strong { font-size: 18px; }
.admin-main .checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.admin-main .checklist li { position: relative; padding-left: 28px; color: var(--ink-3); }
.admin-main .checklist li::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border: 2px solid var(--line-strong); border-radius: 5px; }

/* Accueil : guide de démarrage et prochain événement */
.setup-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.setup-steps li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--soft); }
.setup-steps li.is-done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.setup-check { flex: none; width: 24px; height: 24px; border-radius: 999px; border: 2px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; }
.setup-steps li.is-done .setup-check { background: var(--ok); border-color: var(--ok); color: #FFFFFF; }
.next-event.is-today { border: 2px solid var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent); }
.next-event .kpis { gap: 14px; }

/* Lien d'évitement (clavier, lecteur d'écran) */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--ink); font-weight: 700; }
.skip-link:focus { top: 12px; }
.admin-main:focus { outline: none; }

/* Barre du bas sur téléphone : Accueil · Événements · Scanner · Menu */
.bottom-nav { display: none; }
@media (max-width: 899px) {
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; justify-content: space-around; gap: 4px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--ink); border-top: 1px solid var(--night-line); }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 12px; border: 0; background: transparent; color: var(--night-muted); font: 600 12px var(--body); text-decoration: none; cursor: pointer; }
  .bottom-nav .is-active, .bottom-nav [aria-expanded="true"] { color: #FFFFFF; background: var(--night-2); }
  .bottom-nav .bottom-scan { background: var(--accent); color: var(--ink); }
  .fab-scan { display: none; }
  .is-admin .admin-main { padding-bottom: 110px; }
  .has-js .nav-groups.is-open { display: flex; position: fixed; left: 0; right: 0; top: 56px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 46; overflow-y: auto; padding: 18px 16px; background: var(--ink); }
  .sidenav { overflow: visible; max-height: none; }
}

/* Commandes */
.order-row { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.order-row:hover { border-color: var(--ink); }

/* Formulaire modifié : barre collée en bas pour ne pas oublier d'enregistrer */
.save-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; border-radius: 999px; background: var(--night); color: #FFFFFF; box-shadow: 0 12px 34px rgba(0,0,0,.28); max-width: calc(100% - 24px); }
.save-bar span { font-weight: 600; font-size: 14px; white-space: nowrap; }
.save-bar .btn { min-height: 40px; }
.is-dirty .fab-scan { display: none; }
@media (max-width: 899px) { .save-bar { bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media print { .save-bar, .bottom-nav { display: none !important; } }
/* Centre d'aide sur téléphone : recherche à hauteur normale, pas de catégorie en double */
.help-search { flex: none; }
@media (max-width: 860px) {
  .help-side .eyebrow, .help-side > a:last-child:not(:first-child) { display: none; }
}

/* Lien de langue FR / EN */
.lang-switch { font-weight: 700; letter-spacing: .04em; }
.lang-switch .lang-long { display: none; }
.pub-nav .lang-switch { background: transparent; border-color: transparent; }
.pub-nav .lang-switch:hover { border-color: var(--line-strong); }
.pub-footer .lang-switch .lang-long, .sidenav .lang-switch .lang-long { display: inline; }

/* Accueil : où va votre argent, une seule affiche, état vide */
.money-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.money-steps .kpi-value { font-size: 28px; }
.hero-art.is-single { grid-template-columns: 1fr; max-width: 360px; justify-self: end; }
.event-cards.is-single { grid-template-columns: minmax(0, 520px); }
.home-empty h3 { font-size: 20px; }
@media (max-width: 640px) { .money-steps { grid-template-columns: 1fr 1fr; } .money-steps .kpi-value { font-size: 22px; } }
.sidenav .lang-switch { color: var(--night-muted); text-decoration: none; font-size: 13px; }
.sidenav .lang-switch:hover { color: #FFFFFF; }

/* Grilles de champs : si une étiquette passe sur deux lignes, les champs restent alignés en bas */
.grid-auto > .field > :is(input, select, textarea):last-child { margin-top: auto; }

/* Images téléversées : affiche entière sur un fond flouté tiré d'elle-même, jamais déformée ni coupée */
.cover-image { background: var(--night); }
.cover-image .cover-blur { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; filter: blur(22px) saturate(1.2); opacity: .75; }
.cover-image .cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cover-image .cover-date { z-index: 1; }
.brand-logo { background: #FFFFFF !important; overflow: hidden; padding: 0; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.image-pick { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.image-preview { width: 200px; aspect-ratio: 1200 / 630; border-radius: 14px; border: 1px dashed var(--line-strong); background: var(--soft); display: grid; place-items: center; overflow: hidden; }
.image-preview.is-logo { width: 96px; aspect-ratio: 1; background: #FFFFFF; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }

/* Plateforme : forfait de chaque organisme */
.plan-form select { min-height: 34px; padding: 0 8px; }
.plan-form details summary { cursor: pointer; color: var(--muted); }

/* Formulaire d'événement : précision et visibilité (Public / Réservé) sur la 2e ligne d'un type de billet. */
.tier-row .tier-desc { grid-column: 1 / 3; }
.tier-row .tier-vis { grid-column: 3 / -1; }
@media (max-width: 700px) { .tier-row .tier-desc, .tier-row .tier-vis { grid-column: 1 / -1; } }

/* ---------- Écrans tactiles : normes mobiles ----------
   Cibles d'au moins 44 px (Apple HIG ; Material : 48 dp ; WCAG 2.2 : 24 px minimum en AA, 44 px en AAA),
   champs à 16 px (sinon iOS zoome à la saisie), rien sous l'encoche ni sous la barre d'accueil de l'iPhone. */
a, button, input, select, textarea, label, summary { touch-action: manipulation; -webkit-tap-highlight-color: rgba(17, 17, 20, .08); }
.pub-header, .pub-main, .pub-footer-inner { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.fab-scan { right: max(20px, env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); }
.cover-date b { font-size: max(11px, .7em); }
.menu-list a { display: flex; align-items: center; min-height: 44px; }
.search-box input { font-size: 16px; align-self: stretch; }

@media (pointer: coarse), (max-width: 640px) {
  .btn-sm { min-height: 44px; padding: 0 14px; font-size: 14px; }
  .icon-btn, .tier-row [data-remove-row] { width: 44px; height: 44px; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([readonly]), select, textarea:not([readonly]) { font-size: 16px; }
  .input, input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select { min-height: 44px; }
  /* Bulle d'aide : pastille de 18 px, mais zone de toucher de 44 px autour. */
  .tip::before { content: ""; position: absolute; inset: -13px; }
  .swatch > span:first-of-type { width: 44px; height: 44px; }
  .check { padding-block: 11px; }
  .faq summary, details > summary { min-height: 44px; display: flex; align-items: center; }
  .help-link, .event-bar-head > a, a.small[href] { display: inline-flex; align-items: center; min-height: 44px; }
  .brand-mark { width: 44px; height: 44px; }
  .pub-footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
  .stepper input { min-height: 44px; }
}

@media (max-width: 640px) {
  /* En-tête public : la marque, la langue, « Mes billets » et l'espace organisme en icône (les bénévoles et
     responsables y vont aussi depuis leur téléphone). */
  .pub-header .pub-admin { display: none; }
  .pub-header .pub-admin-icon { display: inline-flex; width: 44px; min-width: 44px; padding: 0; justify-content: center; }
  /* Pied de page : liens plus serrés, puisque chacun fait 44 px de haut. */
  .pub-footer-links { gap: 8px 32px; }
  .pub-footer-links > * { gap: 0 !important; }
  /* Les actions autour du billet : « Ajouter au calendrier » en pleine largeur, le reste par deux. */
  .ticket-actions > :first-child { grid-column: 1 / -1; }
  .ticket-actions .menu, .ticket-actions .menu > summary { width: 100%; }
  /* Actions principales des formulaires : en pleine largeur, à portée du pouce. */
  /* En-tête de page : ses boutons côte à côte, de même largeur, sans pousser le contenu vers le bas. */
  .page-head > .row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; gap: 8px; }
  .page-head > .row > .btn, .page-head > .row > form > .btn { width: 100%; padding: 0 10px; font-size: 14px; }
  .event-card > .cover .cover-date b { font-size: 11px; }
}
.btn svg, .icon-btn svg { flex: none; }
@media (max-width: 640px) {
  /* Accueil : les deux boutons du haut, même largeur, l'un sous l'autre. */
  .hero .btn { width: 100%; }
}
/* Options à précommander : nom, prix, précision ; sur téléphone, le nom en pleine largeur puis prix et précision. */
.tier-row.addon-row { grid-template-columns: minmax(0, 2fr) minmax(90px, 1fr) minmax(0, 2fr) 44px; }
@media (max-width: 700px) { .tier-row.addon-row { grid-template-columns: minmax(96px, 1fr) minmax(0, 2fr); } }
/* Haut de l'espace organisme : le nom de l'organisme mène à l'accueil, cible de 44 px. */
@media (pointer: coarse), (max-width: 640px) { .sidenav .brand { min-height: 44px; } }
/* Page d'événement : « Voir l'itinéraire » et le nom de l'organisme, cibles de 44 px sans changer la mise en page. */
@media (pointer: coarse), (max-width: 640px) {
  .info-row a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; }
}
/* Bas du menu de l'espace organisme : changer de langue et se déconnecter, cibles de 44 px. */
@media (pointer: coarse), (max-width: 899px) {
  .sidenav-foot .lang-switch, .sidenav-foot .linklike { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (pointer: coarse), (max-width: 640px) {
  /* Ligne « Paiement sécurisé… · Conditions » : le lien seul sur sa ligne, cible de 44 px. */
  .row.small.muted > a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; }
}

/* Téléphone, et surtout texte agrandi dans les réglages du téléphone : rien ne doit sortir de l'écran. */
@media (max-width: 640px) {
  /* Barre « Modifications non enregistrées » : le message en haut, Annuler et Enregistrer côte à côte en dessous. */
  .save-bar { left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); transform: none; max-width: none;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 12px; border-radius: 22px; }
  .save-bar span { grid-column: 1 / -1; white-space: normal; text-align: center; }
  .save-bar .btn { width: 100%; min-height: 44px; }
  /* Un bouton trop long passe sur deux lignes au lieu de déborder. */
  .btn { white-space: normal; text-align: center; line-height: 1.2; }
  .row > *, .spread > * { min-width: 0; }
}

/* Puces de filtre (Tous, Cette semaine…) : groupées, à côté de la recherche sur ordinateur. */
.chip-row { display: flex; gap: 8px; align-items: center; }

/* ---------- Logo BilletSVP : le billet à 4 trous et le nom, « SVP » surligné comme le titre d'accueil ---------- */
.brand-icon { width: 36px; height: 36px; flex: none; display: block; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -.02em; color: var(--ink); white-space: nowrap; }
.wordmark-hl { display: inline-block; margin-left: .12em; padding: 0 .18em; border-radius: .2em; background: var(--accent); color: var(--ink); transform: rotate(-3deg); }
@media (pointer: coarse), (max-width: 640px) { .brand { min-height: 44px; } }
@media (max-width: 640px) {
  .pub-header .brand { gap: 8px; }
  .pub-header .wordmark { font-size: 18px; }
}
/* Très petit écran : l'icône seule, pour laisser la place à « Mes billets ». */
@media (max-width: 360px) { .pub-header .wordmark { display: none; } }

/* ---------- Pied de page : colonnes sur ordinateur, menus dépliables sur téléphone ---------- */
.foot-brand { max-width: 340px; }
.foot-group > summary { list-style: none; font-weight: 700; color: var(--ink); }
.foot-group > summary::-webkit-details-marker { display: none; }
.foot-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.foot-bottom { align-items: center; padding-top: 0; }
@media (min-width: 641px) {
  /* Sur ordinateur, le titre d'un groupe n'est pas cliquable : les liens sont toujours visibles. */
  .foot-group > summary { pointer-events: none; }
}
@media (max-width: 640px) {
  .pub-footer-inner { gap: 20px; padding-top: 28px; padding-bottom: 20px; }
  .pub-footer-links { flex-direction: column; gap: 0 !important; width: 100%; }
  .foot-group { border-top: 1px solid var(--line); }
  .foot-group:last-child { border-bottom: 1px solid var(--line); }
  .foot-group > summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer; font-size: 15px; }
  .foot-group > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .15s; margin-right: 4px; }
  .foot-group[open] > summary::after { transform: rotate(-135deg); }
  .foot-list { gap: 0; margin: 0 0 8px; }
  .foot-bottom { justify-content: space-between; flex-wrap: nowrap; padding-top: 4px; }
}

/* ---------- Accueil pour les acheteurs : recherche dans le haut, puis les événements, puis 4 garanties ---------- */
.hero-search { flex-wrap: nowrap; gap: 8px; max-width: 560px; }
.hero-search .search-box { flex: 1 1 auto; min-height: 54px; }
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 48px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.trust-icon { flex: none; width: 36px; height: 36px; border-radius: 12px; background: var(--accent); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 899px) {
  /* Téléphone : les illustrations laissent la place aux vrais événements, juste sous la recherche. */
  .hero-art { display: none; }
  .hero { padding-top: 16px; }
}
@media (max-width: 640px) {
  .hero-search { flex-wrap: wrap; }
  .hero-search .search-box { flex-basis: 100%; }
  .hero-search .btn { width: 100%; }
  #evenements { margin-top: 32px !important; }
}
@media (max-width: 640px) {
  /* Accueil sur téléphone : le bandeau des organismes reste court (le détail est sur « Pour les organismes »). */
  .band .checklist { display: none; }
}

/* ---------- Billets en direct et paiement par code QR à la porte ---------- */
.live-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 70; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 999px; background: var(--night); color: #FFFFFF; font-weight: 600; box-shadow: 0 12px 34px rgba(0,0,0,.28); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.live-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.qr-pay { background: #FFFFFF; border-radius: 24px; padding: 18px; width: min(100%, 320px); margin: 0 auto; }
.qr-pay svg { display: block; width: 100%; height: auto; }
.qr-paid-mark { width: 84px; height: 84px; border-radius: 999px; background: var(--accent); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; margin: 0 auto; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; background: var(--accent); margin-right: 8px; vertical-align: middle; animation: live-pulse 1.4s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } .live-toast { transition: none; } }
/* Le billet du logo prend la couleur d'accent de la page (celle de l'organisme sur ses pages). */
.brand-icon { color: var(--accent); }

/* Liste d'attente : rang dans la file (« 3e sur 7 ») */
.wait-rank { margin: 4px 0 0; font-family: var(--font-display, inherit); line-height: 1; }
.wait-rank strong { font-size: 64px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.wait-rank span { font-size: 22px; color: var(--muted); font-weight: 600; }

/* Scanner : bandeau du mode hors ligne */
.scan-offline { margin: 0; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); color: var(--night-muted); text-align: center; }
.scan-offline.is-offline { background: #F5B82E; color: #15151B; font-weight: 600; }

/* Billet ouvert par un bénévole : « Faire entrer » */
.door-panel { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; padding: 18px; border-radius: 20px; background: var(--surface, #fff); border: 2px solid var(--accent); }
.door-panel strong { font-size: 26px; }
.door-ok { background: #1F9D55; border-color: #1F9D55; color: #fff; }
.door-used { background: #F5B82E; border-color: #F5B82E; color: #15151B; }
.door-ok a, .door-used a { color: inherit; }
.door-handover { font-weight: 700; padding: 6px 12px; border-radius: 999px; background: rgba(0, 0, 0, .18); }
.wticket-send .btn { width: 100%; }

/* Liste d'attente (espace organisme) : une carte par personne */
.wait-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wait-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.wait-row:first-child { border-top: 0; }
.wait-num { flex: none; width: 34px; height: 34px; border-radius: 999px; background: var(--ink); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.wait-who { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* Tableaux du centre d'aide et des guides */
.help-body .table-wrap { margin: 0 0 18px; }
.help-body table { width: 100%; border-collapse: collapse; font-size: 15px; }
.help-body th, .help-body td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.help-body th { font-weight: 700; background: var(--surface-2, #F5F5F7); }
.help-article { min-width: 0; }
.help-body .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.help-body table { min-width: 520px; }

/* Icône de l'espace organisme : seulement sur téléphone (le bouton texte s'affiche ailleurs). */
.pub-admin-icon { display: none; }
@media (max-width: 640px) { .pub-header .pub-admin-icon { display: inline-flex; } }
/* « Mes billets » sur une ligne dès 360 px (en dessous, le libellé peut passer sur deux lignes). */
@media (min-width: 360px) { .pub-nav .btn { white-space: nowrap; } }

/* Sélecteur « Espace organisme / Mes billets » (connexion et retrouver ses billets) */
.audience-switch { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2, #F0F0F3); border: 1px solid var(--line); }
.audience-switch a { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 999px; font-weight: 600; text-decoration: none; color: var(--muted); }
.audience-switch a[aria-current="page"] { background: var(--ink); color: #FFFFFF; }

/* Pages de compte (connexion, inscription…) au gabarit des pages publiques */
.account-wide { max-width: 640px; }
.account-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.account-divider::before, .account-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Codes de secours de la double authentification */
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: 17px; }
.recovery-codes span { padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; }

/* Console de la plateforme */
.console-badge { display: inline-flex; padding: 4px 8px; border-radius: 8px; background: var(--accent); color: #15151B; font-weight: 800; font-size: 13px; }
