/* Charte « Silver & Black », reprise du CRM ANEVSYS : argenté, sobre, thème sombre par défaut. */
:root {
  --bg: #16171a;
  --bg-elevated: #1c1d20;
  --surface: #1f2023;
  --surface-2: #27282c;
  --surface-hover: #2c2d32;
  --border: #313236;
  --border-strong: #3d3e44;
  --text: #e7e7e9;
  --text-muted: #9a9ba1;
  --text-faint: #68696e;

  --accent: #cccccc;
  --accent-strong: #d1d5db;
  --accent-dim: rgba(204, 204, 204, 0.14);
  --accent-border: rgba(204, 204, 204, 0.45);
  --accent-ink: #1a1a1a;

  --success: #7fae8e;
  --warning: #d8ab6b;
  --danger: #c97b7b;

  --radius: 10px;
  --font: "Inter", "Roboto", "Helvetica Neue", system-ui, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f4f5;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f0f1;
  --surface-hover: #e7e7e9;
  --border: #d9d9dc;
  --border-strong: #c4c4c8;
  --text: #1a1b1e;
  --text-muted: #55565c;
  --text-faint: #8a8b90;
  --accent: #3d3e44;
  --accent-strong: #26272b;
  --accent-dim: rgba(61, 62, 68, 0.10);
  --accent-border: rgba(61, 62, 68, 0.45);
  --accent-ink: #ffffff;
  --success: #2f7a4a;
  --warning: #9a6a1c;
  --danger: #b04545;
  color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; min-height: 100vh; }
.hidden { display: none !important; }
a { color: var(--accent-strong); }
a:hover { color: var(--accent); }
h1 { font-size: 20px; margin: 0 0 8px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-size: 12px; }

/* Barre du haut */
.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--bg-elevated); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .02em; color: var(--text); text-decoration: none; }
.brand img { height: 34px; width: auto; display: block; }
/* Deux versions du logo : texte blanc sur fond sombre, texte foncé sur fond clair. */
.brand img.logo-on-light { display: none; }
:root[data-theme="light"] .brand img.logo-on-dark { display: none; }
:root[data-theme="light"] .brand img.logo-on-light { display: block; }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.container { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.container.narrow, .narrow { max-width: 640px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 16px 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }

/* Formulaires */
label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=datetime-local],
input[type=password], input[type=url], input:not([type]), select, textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 10px 12px; font: inherit; font-size: 14px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-border); }
input[type=checkbox], input[type=radio] { margin-right: 6px; accent-color: var(--accent); }
ul[id^=id_] { list-style: none; padding: 0; margin: 0; }
p.field, .field-box, form p { margin: 0 0 16px; }  /* .field-box : un <div> (un <p> ne peut pas contenir les listes de choix, qui sont des <div>) */
form .grid p { margin: 0 0 4px; }

/* Boutons */
.btn, button.primary {
  display: inline-flex; align-items: center; gap: 7px; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; border-radius: 8px;
  padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2;
}
.btn .ico { width: 17px; height: 17px; margin: 0; }
.btn.secondary .ico, .chip .ico { opacity: .9; }
.btn:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn.secondary:hover { background: var(--surface-hover); color: var(--text); }
button.link, .icon-btn { background: transparent; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit; font-size: 13px; }
button.link:hover, .icon-btn:hover { background: var(--surface-hover); }
form.inline { display: inline; }

/* Tableaux */
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
tbody tr:hover { background: var(--surface-hover); }
tbody tr:last-child td { border-bottom: 0; }

/* Messages */
.alert { padding: 10px 14px; border-radius: 8px; margin: 12px 0; background: var(--accent-dim); border: 1px solid var(--accent-border); }
.alert.success { border-color: var(--success); color: var(--success); background: transparent; }
.alert.error { border-color: var(--danger); color: var(--danger); background: transparent; }
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: 4px 0; font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 16px; }
.grid .wide { grid-column: 1 / -1; }
.privacy { background: var(--surface-2); border-left: 3px solid var(--accent); padding: 4px 14px; margin: 16px 0; border-radius: 6px; }
.chip { display: inline-block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 12px; font-size: 12px; margin-right: 4px; text-decoration: none; color: var(--text); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.cat-color input[type=color] { width: 44px; height: 34px; padding: 2px; cursor: pointer; }

/* Éditeur de badges */
.badge-editor .be-toolbar { margin-top: 0; }
.be-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; }
.be-row p { margin: 0 0 8px; }
.be-row input[type=text] { min-width: 200px; }
.be-size input { width: 90px; }
.be-layout-field select { min-width: 320px; }
.be-page-image { align-items: center; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.be-pageimg-note { flex: 1 1 320px; margin: 0; }
.be-row label.check.small { display: inline-flex; margin-left: 8px; font-size: 12px; }
.be-zone { position: absolute; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px dashed #4a90e2; background: rgba(74,144,226,.10); color: #1d4f91; font: 600 13px Arial; pointer-events: none; }
.be-zone-p { border-color: #f39c12; background: rgba(243,156,18,.12); color: #8a5a00; }
.be-diagram { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.be-diagram svg { background: #fff; border-radius: 3px; }
.be-actions { align-items: center; }
.be-actions p { margin: 0; }
.be-spacer { flex: 1; }
.be-add { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.be-add .chip, .be-sides .chip { cursor: pointer; font: inherit; font-size: 13px; }
.be-sides .chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.be-main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.be-stage-wrap { overflow: auto; padding: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; min-height: 300px; }
.be-stage { position: relative; display: inline-block; box-shadow: 0 2px 14px rgba(0,0,0,.4); outline: none; touch-action: none; user-select: none; overflow: hidden; }
.be-el { position: absolute; box-sizing: border-box; cursor: move; }
.be-el:hover { outline: 1px dashed #4a90e2; }
.be-el.selected { outline: 2px solid #4a90e2; }
.be-el svg, .be-el img { display: block; width: 100%; height: 100%; pointer-events: none; }
.be-placeholder { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; background: #e5e7eb; color: #6b7280; font: 12px Arial; }
.be-el-qr, .be-el-barcode, .be-el-vcard { background: #fff; }
.be-handle { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: #4a90e2; border: 2px solid #fff; border-radius: 3px; cursor: nwse-resize; }
.be-panel { position: sticky; top: 12px; margin: 0; }
.be-geo { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.be-field { margin-bottom: 8px; }
.be-field label { margin-bottom: 2px; }
.be-field input[type=number], .be-field select, .be-field textarea { padding: 6px 8px; }
.be-checks { display: flex; gap: 12px; flex-wrap: wrap; }
.small-btn { padding: 5px 10px; font-size: 13px; cursor: pointer; }
.be-save { gap: 10px; flex-wrap: wrap; }
.be-save select { width: auto; max-width: 280px; }
.be-dialog { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 12px; width: min(760px, 94vw); }
.be-dialog::backdrop { background: rgba(0,0,0,.55); }
.be-dialog iframe { width: 100%; height: 70vh; border: 0; margin-top: 8px; background: #fff; }
@media (max-width: 960px) { .be-main { grid-template-columns: 1fr; } .be-panel { position: static; } }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Éditeur d'emails */
.email-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.email-editor .card { margin: 0; }
.email-editor textarea { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
/* Éditeur visuel */
.wysiwyg { margin-bottom: 16px; }
.wy-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px; background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0; border-radius: 8px 8px 0 0; }
.wy-toolbar[hidden], .wy-area[hidden], .wy-source[hidden] { display: none; }
.wy-toolbar .icon-btn { min-width: 32px; padding: 4px 8px; font-size: 13px; }
.wy-toolbar .icon-btn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.wy-toolbar .icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.wy-sep { width: 1px; height: 20px; background: var(--border-strong); margin: 0 4px; }
.wy-spacer { flex: 1; }
/* Zone d'édition : fond blanc et texte foncé, comme dans l'email reçu, quel que soit le thème. */
.wy-area { min-height: 280px; max-height: 520px; overflow: auto; padding: 14px 16px; background: #ffffff; color: #1a1b1e; border: 1px solid var(--border); border-radius: 0 0 8px 8px; font: 15px/1.6 Arial, Helvetica, sans-serif; }
.wy-area:focus { outline: none; border-color: var(--accent-border); }
.wy-area p { margin: 0 0 16px; }
.wy-area h2 { margin: 0 0 12px; font-size: 20px; line-height: 1.3; }
.wy-area h3 { margin: 0 0 10px; font-size: 17px; line-height: 1.3; }
.wy-area ul, .wy-area ol { margin: 0 0 16px; padding-left: 22px; }
.wy-area a { color: #26272b; text-decoration: underline; }
.wy-area a.btn-mail { display: inline-block; background: #26272b; color: #ffffff; padding: 8px 16px; border-radius: 6px; text-decoration: none; font-weight: bold; }
.wy-dialog { border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 20px; width: min(420px, 92vw); }
.wy-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.wy-dialog h3 { margin: 0 0 12px; text-transform: none; font-size: 16px; color: var(--text); letter-spacing: 0; }
.wy-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
#email-body.wy-source, .wysiwyg textarea { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.toolbar { display: flex; gap: 6px; margin: 4px 0 8px; }
.vars summary { cursor: pointer; color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.var-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.var-list .chip { cursor: pointer; font: inherit; font-size: 12px; }
.preview { position: sticky; top: 12px; }
#preview-frame { width: 100%; height: 560px; border: 1px solid var(--border); border-radius: 8px; background: #f4f4f5; }
@media (max-width: 1100px) { .email-editor { grid-template-columns: 1fr; } .preview { position: static; } }

/* Page de confirmation : tuiles d'action carrées, de même taille */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, 148px); gap: 12px; margin-top: 12px; }
.tile {
  width: 148px; height: 148px; padding: 14px 12px; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px;
  text-align: center; text-decoration: none; cursor: pointer; font: inherit;
  /* Fond noir et texte clair, quel que soit le thème. */
  color: #f4f4f5; background: #111214; border: 1px solid #111214; border-radius: var(--radius);
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tile:hover, .tile.active { background: #26272b; color: #ffffff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.tile:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.tile svg { width: 28px; height: 28px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile-title { font-size: 13px; font-weight: 600; line-height: 1.25; }
.tile-text { font-size: 11px; line-height: 1.3; color: #b4b5ba; }
/* Sur fond sombre (back office), un fin contour garde la tuile visible. */
:root[data-theme="dark"] .tile { border-color: #3d3e44; }
.invite-panel { margin-top: 14px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.invite-panel[hidden], .invite-options [hidden] { display: none; }
.invite-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.invite-options .chip { cursor: pointer; font: inherit; font-size: 13px; }

/* Statuts d'inscription et décisions */
.status { display: inline-block; font-size: 12px; padding: 1px 10px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-muted); white-space: nowrap; }
.status-confirmed { color: var(--success); border-color: var(--success); }
.status-pending { color: var(--warning); border-color: var(--warning); }
.status-rejected, .status-cancelled, .status-blacklisted { color: var(--danger); border-color: var(--danger); }
.side-link em.badge { color: var(--warning); border-color: var(--warning); font-size: 11px; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; position: sticky; bottom: 8px; }
.danger-btn { color: var(--danger); border-color: var(--danger); }
.danger-btn:hover { background: transparent; color: var(--danger); opacity: .85; }

/* Mise en page avec menu latéral */
.app-layout { display: block; }
.app-layout.with-sidebar { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 53px); }
.content { padding: 24px; max-width: 1040px; width: 100%; }
.app-layout:not(.with-sidebar) .content { margin: 24px auto; }
.sidebar { background: var(--bg-elevated); border-right: 1px solid var(--border); padding: 12px 10px 24px; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin: 18px 10px 6px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-title:first-child { margin-top: 6px; }
.side-link { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text-muted); text-decoration: none; font-size: 14px; }
.side-link:hover { background: var(--surface-hover); color: var(--text); }
.side-link.active { background: var(--surface-2); color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.side-link.sub { padding-left: 24px; font-size: 13px; }
/* Sous-menus de 2e niveau enroulables */
.side-row { display: flex; align-items: center; }
.side-row .side-link { flex: 1; min-width: 0; }
.side-caret { flex: 0 0 auto; width: 28px; height: 28px; margin-left: 2px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; position: relative; color: var(--text-muted); }
.side-caret:hover { background: var(--surface-hover); color: var(--text); }
.side-caret::before { content: ""; position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; margin: -5px 0 0 -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s ease; }
.side-group.open .side-caret::before { transform: rotate(45deg); margin-top: -7px; }
.side-sub { display: none; margin: 2px 0 4px 10px; padding-left: 4px; border-left: 1px solid var(--border); }
.side-group.open .side-sub { display: block; }
.side-link.disabled { color: var(--text-faint); cursor: default; }
.side-link.disabled:hover { background: transparent; color: var(--text-faint); }
.side-link em { font-size: 11px; font-style: normal; border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.org-name { padding-left: 12px; border-left: 1px solid var(--border); }
.menu-toggle { display: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat strong { display: block; font-size: 24px; line-height: 1.2; }
.stat span { color: var(--text-muted); font-size: 12px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.filters input, .filters select { width: auto; min-width: 180px; }
@media (max-width: 820px) {
  .app-layout.with-sidebar { display: block; }
  .menu-toggle { display: inline-block; }
  .sidebar { display: none; position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar.open { display: block; }
  .content { padding: 16px; }
  .hide-mobile, .org-name { display: none; }
}

/* Éditeur de formulaire */
.field-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; }
.field-card:focus-within { border-color: var(--accent-border); }
.field-card.hidden-card { display: none; }
.fc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fc-move { display: flex; flex-direction: column; gap: 2px; }
.fc-move .icon-btn { padding: 0 8px; line-height: 1.3; }
.fc-label { flex: 1 1 220px; min-width: 180px; }
.fc-label p, .fc-type p { margin: 0; }
.fc-type { flex: 0 0 170px; }
.fc-required, label.check { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-size: 13px; margin: 0; white-space: nowrap; }
.icon-btn.danger { color: var(--danger); border-color: var(--danger); }
.icon-btn.danger:hover { background: transparent; opacity: .8; }
.fc-choices { margin-top: 12px; }
.fc-more { margin-top: 10px; }
.fc-more summary, details.card summary { cursor: pointer; color: var(--text-muted); font-size: 13px; }
.fc-more .grid { margin-top: 10px; }
.add-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.add-bar .chip { cursor: pointer; font: inherit; font-size: 12px; }
.add-bar .chip:hover { background: var(--surface-hover); }
.save-bar { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--border); }

/* Page publique : bandeau d'en-tête pleine largeur et bandeau de pied de page */
body.public { display: flex; flex-direction: column; min-height: 100vh; }
body.public main { flex: 1 0 auto; width: 100%; }
.event-banner { width: 100%; line-height: 0; background: var(--surface-2); }
.event-banner img { display: block; width: 100%; height: auto; max-height: 360px; object-fit: cover; }
/* Bandeau publicitaire latéral (facultatif) : à droite du formulaire, sous le formulaire sur petit écran */
.container.with-aside { max-width: 1020px; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.page-aside { position: sticky; top: 16px; width: 300px; }
.page-aside img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.page-aside a { display: block; }
.aside-label { margin: 0 0 6px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
@media (max-width: 900px) {
  .page-grid { grid-template-columns: 1fr; }
  .page-aside { position: static; width: 100%; max-width: 360px; margin: 8px auto 0; }
}

/* Modification d'une fiche : blocs du formulaire côte à côte dans une même page */
.edit-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 16px 4px; margin: 0 0 14px; background: var(--surface-2); }
.edit-block legend { font-weight: 600; padding: 0 8px; }
/* Page de modification d'une fiche : champs sur deux colonnes pour limiter le défilement */
.edit-title { margin: 2px 0 10px; font-size: 22px; }
.edit-form { padding: 14px 16px 0; margin-top: 0; }
.edit-form .required-note { margin: 0 0 10px; }
.edit-form .edit-block { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; padding: 6px 14px 4px; margin: 0 0 10px; }
.edit-form .edit-block legend { grid-column: 1 / -1; }
.edit-form .edit-block > .muted, .edit-form .edit-block > .info-text, .edit-form .edit-block > .sessions-field,
.edit-form .edit-block > .field.wide { grid-column: 1 / -1; }
.edit-form .edit-block .field-box { margin: 0 0 10px; }
.edit-form .edit-block textarea { min-height: 0; }
.edit-form .save-bar { margin: 0 -16px; padding: 10px 16px; }
.edit-form .session-day { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.edit-form .session-day-title { grid-column: 1 / -1; margin: 8px 0 4px; }
.edit-form .session-item { padding: 8px 10px; margin: 0 0 8px; }
@media (max-width: 760px) { .edit-form .edit-block, .edit-form .session-day { grid-template-columns: 1fr; } }
.edit-block.hidden { display: none; }

/* Texte réservé aux lecteurs d'écran */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Astérisque des champs obligatoires */
.req { color: var(--danger); font-weight: 700; }
.required-note { margin: 0 0 12px; }

/* Éditeur : carte de bloc (étape) */
.field-card.is-section { border-left: 4px solid var(--accent); background: var(--surface-2); margin-top: 22px; }
.field-card.is-section .fc-required, .field-card.is-section .js-choices-box, .field-card.is-section .js-sensitive { display: none; }
.field-card.is-section .js-label { font-weight: 600; }
.chip-block { border-style: dashed; }
.field-card.is-info { border-left: 4px solid var(--text-muted); }
.field-card.is-info .fc-required, .field-card.is-info .js-sensitive, .field-card.is-info .js-help { display: none; }
.fc-conds { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.fc-conds-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.fc-conds-head select { width: auto; }
.cond-row { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.cond-row select, .cond-row input { width: auto; min-width: 150px; flex: 1 1 150px; }
.info-text { background: var(--surface-2, rgba(127,127,127,.12)); border-left: 4px solid var(--accent, #888); padding: 10px 14px; border-radius: 6px; }
.info-text p { margin: 4px 0 0; }

/* Choix de sessions (formulaire d'inscription) */
.sessions-field { margin: 14px 0; }
/* Statistiques : jauges */
.gauge { height: 10px; border-radius: 999px; background: var(--surface-2, rgba(127,127,127,.2)); overflow: hidden; min-width: 80px; }
.gauge-fill { height: 100%; border-radius: 999px; background: var(--accent, #4a8); transition: width .3s; }
.gauge-ok .gauge-fill { background: #3aa76d; }
.gauge-warn .gauge-fill { background: #e0a030; }
.gauge-full .gauge-fill { background: #d8514b; }
.gauge-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.gauge-line .gauge { flex: 1 1 220px; height: 14px; }
.gauge-text { flex: 0 0 auto; }
.session-gauge { padding: 10px 0; border-top: 1px solid var(--border); }
.session-gauge:first-of-type { border-top: 0; }
.table-scroll { overflow-x: auto; }

/* Fiche d'un inscrit : deux colonnes (réponses et sessions / billet, statut) pour éviter de faire défiler */
.detail-head h1 { margin: 2px 0 0; font-size: 22px; }
.detail-head .detail-meta { margin: 2px 0 10px; }
.detail-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.detail-grid .card.compact { padding: 14px 16px; margin: 0 0 14px; }
.detail-grid .card.compact h2 { margin: 0 0 8px; font-size: 15px; }
.detail-grid p { margin: 0 0 8px; }
.detail-grid textarea { min-height: 0; }
.detail-grid label { font-size: 13px; }
table.answers th { width: 38%; text-align: left; font-weight: 500; color: var(--text-muted); vertical-align: top; }
table.answers th, table.answers td { padding: 5px 8px; }
.ticket-line { font-size: 15px; }
.status-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.status-actions .btn { padding: 6px 10px; font-size: 13px; }
.status-help { margin-top: 8px; }
.detail-notes p { margin: 0 0 6px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.nowrap { white-space: nowrap; }

/* Événement en cours, toujours visible dans le bandeau du haut */
.current-event { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; max-width: 560px; padding: 5px 12px; border-radius: 999px; text-decoration: none; color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.current-event:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); }
.event-switch { position: relative; min-width: 0; flex: 0 1 auto; max-width: 560px; }
.event-switch > summary { list-style: none; cursor: pointer; }
.event-switch > summary::-webkit-details-marker { display: none; }
.ce-caret { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); flex: 0 0 auto; opacity: .7; }
.event-switch[open] .ce-caret { transform: rotate(225deg) translateY(-2px); }
.event-menu { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; min-width: 320px; max-width: min(520px, 92vw); max-height: 70vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong, var(--border)); border-radius: 12px; padding: 6px; box-shadow: 0 10px 28px rgba(0, 0, 0, .3); display: grid; gap: 2px; }
.event-menu a { display: grid; gap: 1px; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.event-menu a:hover, .event-menu a:focus-visible { background: var(--surface-hover); }
.event-menu a.is-current { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.em-name { font-weight: 600; overflow-wrap: anywhere; }
.em-meta { font-size: 12px; color: var(--text-muted); }
.em-more { padding: 6px 12px; font-size: 12px; color: var(--text-muted); }
.event-menu a.em-all { display: flex; align-items: center; gap: 8px; margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; padding-top: 10px; }
.ce-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); flex: 0 0 auto; }
.ce-name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ce-status { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border-strong, var(--border)); color: var(--text-muted); flex: 0 0 auto; }
.ce-published { color: var(--success); border-color: var(--success); }
.ce-draft { color: var(--warning); border-color: var(--warning); }
@media (max-width: 820px) { .ce-label, .ce-status { display: none; } .current-event { padding: 4px 10px; } }
.info-grid.users-grid { grid-template-columns: minmax(0, 1.7fr) minmax(250px, 1fr); }
/* Liste des comptes : des lignes qui s'adaptent à la largeur (jamais de barre de défilement horizontale) */
.user-list { list-style: none; margin: 0; padding: 0; }
.user-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 8px 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.user-row:first-child { border-top: 0; }
.user-row.is-off { opacity: .65; }
.u-id { overflow-wrap: anywhere; min-width: 0; }
.u-role { min-width: 0; }
.u-role select { width: 100%; max-width: 230px; }
.u-actions { justify-content: flex-end; }
@media (max-width: 1280px) {
  .info-grid.users-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .user-row { grid-template-columns: minmax(0, 1fr) auto; }
  .u-role { grid-column: 1 / -1; order: 3; }
}
.users-table select { width: auto; min-width: 140px; padding: 4px 8px; }
.row-actions form.inline { display: inline-flex; }
.rights-list { padding-left: 18px; margin: 6px 0 0; }
.scope-mode { border: 0; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.scope-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-strong, var(--border)); border-radius: 10px; cursor: pointer; margin: 0; }
.scope-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.scope-choice input { width: auto; margin-top: 4px; }
.scope-picker.is-off { opacity: .45; pointer-events: none; }
.scope-event-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; grid-column: 1 / -1; }
.scope-summary { font-weight: 600; margin: 4px 0 0; }
.scope-item { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.scope-item input { width: auto; }
.rights-list li { margin: 0 0 4px; }
.icon-action svg + *, .btn .ico { margin-right: 4px; }

/* Page « Informations » de l'événement : sections sur deux colonnes */
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.info-col .card.compact { padding: 14px 16px 6px; margin: 0 0 14px; }
.info-col .card.compact h2 { margin: 0 0 10px; font-size: 15px; }
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.two-cols .wide { grid-column: 1 / -1; }
.info-form .field-box { margin: 0 0 12px; }
.info-form label { font-size: 13px; }
.info-form textarea { min-height: 0; }
.info-form .check { display: flex; gap: 8px; align-items: center; }
.info-form .check input { width: auto; }
@media (max-width: 900px) { .info-grid, .two-cols { grid-template-columns: 1fr; } }

/* Pictogrammes (jeu Tabler, trait fin) en pastilles teintées : la couleur porte le sens (info, ok, attente, danger).
   Le texte reste disponible au survol (title) et pour les lecteurs d'écran (aria-label / sr-only). */
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; flex-shrink: 0; }
.icon-action, .icon-btn:has(.ico) {
  --tone: var(--text);
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; margin: 0;
  border-radius: 50%; cursor: pointer; text-decoration: none; color: var(--tone);
  border: 1px solid color-mix(in srgb, var(--tone) 26%, transparent);
  background: color-mix(in srgb, var(--tone) 12%, transparent);
  transition: background .15s, border-color .15s;
}
.icon-action:hover, .icon-action:focus-visible, .icon-btn:has(.ico):hover, .icon-btn:has(.ico):focus-visible {
  background: color-mix(in srgb, var(--tone) 24%, transparent); border-color: color-mix(in srgb, var(--tone) 55%, transparent); color: var(--tone);
}
.icon-action.ok { --tone: var(--success); }
.icon-action.danger, .icon-btn.danger:has(.ico) { --tone: var(--danger); }
.icon-action.warn { --tone: var(--warning); }
.icon-action.info { --tone: #6aa5ff; }
.fc-move .icon-btn:has(.ico) { width: 30px; height: 30px; padding: 0; }
.row-actions { display: flex; gap: 6px; }
.status-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border-radius: 50%;
  background: color-mix(in srgb, currentColor 14%, transparent); border-color: color-mix(in srgb, currentColor 35%, transparent); }
.link-btn { background: none; border: 0; padding: 0; margin: 0; color: var(--accent, #4a8); font: inherit; text-decoration: underline; cursor: pointer; }
.organizer-banner { border-left: 4px solid #e0a030; margin-bottom: 14px; }
.stats-table .num { text-align: right; white-space: nowrap; }
.stats-table .share { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.stats-table .share .gauge { flex: 1; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: baseline; }
.dt-split { display: flex; gap: 8px; flex-wrap: wrap; }
.dt-split { flex-wrap: nowrap; }
.dt-split input[type=date] { flex: 1 1 110px; width: auto; min-width: 0; }
.dt-split select { flex: 0 0 92px; width: auto; }
.session-day-title { margin: 14px 0 6px; font-size: 14px; color: var(--text-muted); font-weight: 600; }
.session-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 0 6px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: var(--surface); }
.session-item[hidden] { display: none; }
.session-item input[type=checkbox] { width: auto; margin-top: 4px; flex: 0 0 auto; }
.session-item:has(input:checked) { border-color: var(--accent); }
.session-item.is-full, .session-item.is-clash { opacity: .6; cursor: not-allowed; }
.s-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.s-title { font-weight: 600; }
.session-list { list-style: none; margin: 0; padding: 0; }
.session-list li { padding: 8px 0; border-top: 1px solid var(--border); }
.session-list li:first-child { border-top: 0; }
form.inline { display: inline; }
.field-card.is-sessions .js-choices-box, .field-card.is-sessions .js-sensitive, .field-card.is-sessions .js-depends-box, .field-card.is-sessions .js-help { display: none; }
.field-card.is-sessions { border-left: 4px solid var(--accent); }

/* Formulaire en blocs repliables (étapes) */
.step.stepped { border: 1px solid var(--border); border-radius: var(--radius); margin: 0 0 10px; background: var(--surface); }
.step.stepped.open { border-color: var(--accent-border); }
.step-head { margin: 0; font-size: inherit; }
.step-toggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: transparent; border: 0; color: var(--text); font: inherit; font-weight: 600; font-size: 15px; text-align: left; cursor: default; }
.wizard .step.done .step-toggle, .wizard .step.open ~ .step.done .step-toggle { cursor: pointer; }
.step-num { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-muted); }
.step.open .step-num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.done .step-num { background: var(--success); border-color: var(--success); color: #fff; }
.step-title { flex: 1; }
.step-state { font-weight: 400; }
.step-inner { padding: 4px 16px 16px; }
.step-nav { display: flex; gap: 10px; margin-top: 8px; }
.step.stepped .privacy { margin-top: 8px; }
/* Sans JavaScript, tous les blocs sont déployés ; avec JavaScript, un seul à la fois, avec une transition douce. */
.wizard .step-collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.wizard .step.open .step-collapse { grid-template-rows: 1fr; }
.wizard .step-collapse > .step-inner { overflow: hidden; min-height: 0; padding-top: 0; padding-bottom: 0; transition: padding .28s ease, visibility .28s; visibility: hidden; }
.wizard .step.open .step-collapse > .step-inner { padding-top: 4px; padding-bottom: 16px; visibility: visible; }
@media (prefers-reduced-motion: reduce) { .wizard .step-collapse, .wizard .step-collapse > .step-inner { transition: none; } }
.step.hidden { display: none; }
.stepped .step-head { border-radius: var(--radius); }

/* Trait de transition entre le bandeau et la page, avec un léger dégradé d'ombre vers le contenu. */
.banner-line { height: 4px; width: 100%; box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .18); }
body.public .card { box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.color-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.color-field label.check { margin: 0; }
.event-footer { flex-shrink: 0; margin-top: 32px; padding: 24px 0; }
.event-footer .container { margin: 0 auto; }
.event-footer .legal { font-size: 13px; line-height: 1.6; }
.event-footer a { color: inherit; text-decoration: underline; }
.event-footer .powered { margin: 12px 0 0; opacity: .75; }
.banner-preview { max-width: 100%; max-height: 120px; border-radius: 8px; border: 1px solid var(--border); margin: 4px 0 8px; }
input[type=color] { width: 64px; height: 38px; padding: 2px; cursor: pointer; }

/* Connexion */
.login-card { max-width: 380px; margin: 10vh auto 0; }
.login-logo { display: block; width: 240px; max-width: 80%; height: auto; margin: 0 auto 12px; }
.login-logo.logo-on-light { display: none; }
:root[data-theme="light"] .login-logo.logo-on-dark { display: none; }
:root[data-theme="light"] .login-logo.logo-on-light { display: block; }
.login-card h1 { text-align: center; }
.login-card .subtitle { text-align: center; color: var(--text-muted); margin: 0 0 24px; }
.login-card .btn { width: 100%; padding: 11px; }

footer { margin-top: 32px; text-align: center; }


/* ---- Thème clair : boutons plus voyants (bordure marquée, fond teinté, relief léger) ---- */
:root[data-theme="light"] .btn { box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
:root[data-theme="light"] .btn:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, .3); }
:root[data-theme="light"] .btn.secondary,
:root[data-theme="light"] button.link {
  background: #e9ecf1; border: 1px solid #7d808a; color: #1b1c20; box-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}
:root[data-theme="light"] .btn.secondary:hover,
:root[data-theme="light"] button.link:hover { background: #d9dde5; border-color: #3f4148; color: #000; }
:root[data-theme="light"] .btn.danger-btn { background: #fdecea; border-color: #c9372f; color: #a8201a; }
:root[data-theme="light"] .btn.danger-btn:hover { background: #f9d6d3; border-color: #a8201a; color: #8a1712; opacity: 1; }
:root[data-theme="light"] .icon-action, :root[data-theme="light"] .icon-btn:has(.ico) { --tone: #2b2d33; border-color: color-mix(in srgb, var(--tone) 40%, transparent); background: color-mix(in srgb, var(--tone) 10%, #ffffff); }
:root[data-theme="light"] .icon-action.ok { --tone: #0f6a3a; }
:root[data-theme="light"] .icon-action.danger, :root[data-theme="light"] .icon-btn.danger:has(.ico) { --tone: #b3261e; }
:root[data-theme="light"] .icon-action.warn { --tone: #8a5a00; }
:root[data-theme="light"] .icon-action.info { --tone: #1d4ed8; }
:root[data-theme="light"] .chip { background: #e9ecf1; border-color: #8d909a; color: #1b1c20; }
:root[data-theme="light"] a.chip:hover, :root[data-theme="light"] button.chip:hover { background: #d9dde5; border-color: #3f4148; }
:root[data-theme="light"] .status { border-color: currentColor; font-weight: 600; }
:root[data-theme="light"] .status-confirmed { color: #0f6a3a; background: #e3f4ea; }
:root[data-theme="light"] .status-pending { color: #8a5a00; background: #fff3d6; }
:root[data-theme="light"] .status-rejected, :root[data-theme="light"] .status-cancelled, :root[data-theme="light"] .status-blacklisted { color: #a8201a; background: #fdecea; }

/* ---- Contrôle d'accès : écran de l'agent (une seule vue, sans défilement, pensé pour le téléphone) ---- */
.access { max-width: 640px; margin: 0 auto; }
body:has(.access) .content { padding: 10px 12px; }
.acc-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.acc-title { flex: 1 1 auto; min-width: 0; line-height: 1.2; }
.acc-title h1 { margin: 0; font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-counters { display: flex; align-items: baseline; gap: 4px; font-size: 20px; white-space: nowrap; }
.acc-counters span { color: var(--muted, inherit); }
.acc-inside { font-size: 13px; margin-left: 8px; }
.acc-inside strong { font-size: 16px; }
.scan-card { margin: 0 0 8px; }
.scan-form { display: flex; gap: 8px; }
.scan-form input { flex: 1 1 auto; min-width: 0; font-size: 20px; padding: 12px 14px; }
.scan-form .btn { padding: 0 16px; min-width: 52px; display: inline-flex; align-items: center; justify-content: center; }
.mode-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 8px; }
.mode-bar[hidden] { display: none; }
.mode-bar button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; font-size: 14px; border: 1px solid var(--border-strong, var(--border)); border-radius: 10px; background: var(--surface); color: inherit; cursor: pointer; }
.mode-bar button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-dim); font-weight: 600; }
.mode-bar svg { width: 18px; height: 18px; }
.scan-form[hidden] { display: none; }
.direction { display: flex; gap: 6px; margin: 0 0 8px; }
.direction label { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border: 1px solid var(--border-strong, var(--border)); border-radius: 10px; cursor: pointer; margin: 0; }
.direction label:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); font-weight: 600; }
.direction input { width: auto; }
.camera-box { margin-top: 8px; display: grid; gap: 6px; }
.camera-box[hidden], .v-person[hidden], .v-actions[hidden], .scan-form [hidden], .acc-panel[hidden] { display: none; }
.camera-box video { width: 100%; height: 30vh; min-height: 160px; object-fit: cover; border-radius: 12px; background: #000; }
.camera-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.verdict { border-radius: 14px; padding: 10px 14px; margin: 0 0 8px; border: 3px solid transparent; min-height: 84px; }
.verdict[hidden] { display: none; }
.verdict-idle { border-color: var(--border); background: var(--surface); }
.verdict-idle .v-icon { background: var(--border-strong, #888); }
.v-title { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.v-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; font-size: 22px; font-weight: 700; flex: 0 0 auto; color: #fff; }
.v-name { font-size: 20px; font-weight: 700; margin-top: 6px; overflow-wrap: anywhere; }
.v-meta { font-size: 15px; margin: 2px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.v-category { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.v-sessions { margin: 4px 0 0; padding-left: 18px; font-size: 13px; max-height: 3.6em; overflow: auto; }
.v-sessions:empty { display: none; }
.v-message { font-size: 15px; margin: 6px 0 0; }
.v-message:empty { display: none; }
.v-actions { margin-top: 8px; }
.verdict-ok { background: color-mix(in srgb, #1f9d5c 18%, var(--surface)); border-color: #1f9d5c; }
.verdict-ok .v-icon { background: #1f9d5c; }
.verdict-warn, .verdict-degraded { background: color-mix(in srgb, #e0a030 20%, var(--surface)); border-color: #e0a030; }
.verdict-warn .v-icon, .verdict-degraded .v-icon { background: #c98a12; }
.verdict-denied { background: color-mix(in srgb, #d8514b 20%, var(--surface)); border-color: #d8514b; }
.verdict-denied .v-icon { background: #d8514b; }
.degraded-banner { display: flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; padding: 8px 12px; margin: 0 0 8px; border-radius: 12px; font-size: 14px;
  background: #b3261e; color: #fff; border: 2px solid #ffb4ab; }
.degraded-banner[hidden] { display: none; }
.degraded-banner .btn.secondary { background: #fff; color: #7a1410; border-color: #fff; padding: 6px 10px; }
body.is-degraded .topbar { box-shadow: inset 0 -4px 0 #d8514b; }
.acc-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 0 0 8px; }
.acc-tabs button { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 9px 4px; font-size: 13px; border: 1px solid var(--border-strong, var(--border)); border-radius: 10px; background: var(--surface); color: inherit; cursor: pointer; }
.acc-tabs button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-dim); font-weight: 600; }
.acc-tabs svg { width: 16px; height: 16px; flex: 0 0 auto; }
.acc-panel { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 0 0 8px; max-height: 38vh; overflow: auto; background: var(--surface); }
.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.recent li { padding: 6px 10px; border-radius: 8px; border-left: 4px solid var(--border-strong, var(--border)); font-size: 14px; }
.recent-ok { border-left-color: #1f9d5c !important; }
.recent-warn, .recent-degraded { border-left-color: #e0a030 !important; }
.recent-denied { border-left-color: #d8514b !important; }
.search-row .btn { padding: 7px 12px; font-size: 14px; }
.search-results { margin-top: 8px; }
@media (min-width: 700px) { .access { max-width: 720px; } .v-title { font-size: 26px; } .v-name { font-size: 24px; } }

.point-tile{display:block;text-decoration:none;color:inherit}
.point-tile:hover{border-color:var(--accent,#2563eb)}
.point-tile.is-degraded{border-color:#d97706}
.point-tile h2{margin-top:0}

.ended-banner{background:#b45309;color:#fff}
.ended-banner .btn.secondary{color:#7c2d12}

/* ---- Mobile : bandeau épuré, actions de compte dans le menu sandwich ---- */
.side-mobile { display: none; }
.side-btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; }
.side-switch summary { list-style: none; }
.side-switch summary::-webkit-details-marker { display: none; }
.side-user { margin: 0 0 6px; padding: 0 10px; overflow-wrap: anywhere; }
.side-install { display: block; }
.side-install[hidden], .js-install[hidden] { display: none; }
@media (max-width: 820px) {
  body.has-sidebar .topbar nav, body.has-sidebar .event-switch { display: none; }
  .side-mobile { display: block; }
}
@media (display-mode: standalone) { .js-install-help { display: none; } }

/* ---- Photo (visage) : champ de formulaire, fiche, espace participant, contrôle d'accès ---- */
.photo-current, .photo-preview { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); margin: 6px 0; background: var(--surface); }
.photo-preview[hidden] { display: none; }
.photo-detail { width: 72px; height: 72px; flex: 0 0 auto; margin: 0 12px 0 0; }
.photo-field input[type=file] { max-width: 100%; }
.photo-box { display: grid; gap: 8px; justify-items: start; margin: 0 0 12px; }
.v-head { display: flex; gap: 12px; align-items: center; }
.v-photo { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 2px solid var(--border-strong, var(--border)); flex: 0 0 auto; background: #000; }
.v-photo[hidden] { display: none; }
.v-text { min-width: 0; }
.search-photo { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; margin-right: 8px; flex: 0 0 auto; }
.photo-tools { display: grid; gap: 8px; justify-items: start; margin: 6px 0; }
.photo-tools [hidden] { display: none; }
.photo-editor { display: grid; gap: 6px; justify-items: start; }
.photo-canvas { width: 240px; height: 300px; max-width: 100%; border-radius: 12px; border: 2px solid var(--border-strong, var(--border)); background: #000; touch-action: none; cursor: grab; }
.photo-adjust { display: flex; gap: 8px; }
.photo-zoom-label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.photo-camera { display: grid; gap: 6px; }
.photo-camera video { width: 240px; max-width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; background: #000; transform: scaleX(-1); }
.photo-camera-bar { display: flex; gap: 8px; }
/* Cadre de centrage : un ovale au milieu de la photo (le visage doit s'y inscrire) ; le reste est assombri. */
.photo-frame { position: relative; width: 240px; max-width: 100%; line-height: 0; }
.photo-frame::after { content: ""; position: absolute; left: 50%; top: 46%; width: 62%; height: 68%; transform: translate(-50%, -50%); border: 2px dashed rgba(255,255,255,.95);
  border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.38); pointer-events: none; }
.photo-frame { overflow: hidden; border-radius: 12px; }
.photo-frame video { width: 100%; }

/* ---- Espace du gestionnaire de la plateforme ---- */
.platform-banner { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin: 0; border-radius: 0; background: #7c2d12; color: #fff; border: 0; border-bottom: 3px solid #fdba74; }
.platform-banner .btn.secondary { background: #fff; color: #7c2d12; border-color: #fff; padding: 6px 12px; }
.plat-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
