/* Police Montserrat (reprise du thème Landerz – Colorlib) */
@font-face { font-family: Montserrat; font-weight: 300; font-display: swap; src: url(fonts/montserrat-latin-300-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: Montserrat; font-weight: 300; font-display: swap; src: url(fonts/montserrat-latin-ext-300-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Montserrat; font-weight: 400; font-display: swap; src: url(fonts/montserrat-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: Montserrat; font-weight: 400; font-display: swap; src: url(fonts/montserrat-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(fonts/montserrat-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: Montserrat; font-weight: 700; font-display: swap; src: url(fonts/montserrat-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f3f8f7;
  --card: #ffffff;
  --text: #666666;
  --heading: #000000;
  --muted: #8a8f8e;
  --border: #e3e9e8;
  --primary: #00756a;
  --accent: #00d2b5;
  --danger: #d63c3c;
  --success: #00756a;
  --radius: 20px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  accent-color: var(--primary);
}
.container { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
.narrow { max-width: 560px; }
header.top { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
header.top a { color: var(--primary); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
h1, h2 { color: var(--heading); font-weight: 700; line-height: 1.3; }
h1 { font-size: 1.6rem; margin: 0 0 4px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
.muted { color: var(--muted); }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -15px rgba(0, 117, 106, .15);
}
label { display: block; font-weight: 700; font-size: .85rem; color: var(--heading); margin: 14px 0 6px; }
input[type=text], input[type=tel], input[type=date], input[type=time], input[type=number], textarea {
  width: 100%;
  height: 43px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 300;
  color: var(--heading);
  background: #fff;
}
textarea { height: auto; padding: 12px 20px; border-radius: 20px; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=number] { padding: 0 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 43px;
  padding: 8px 24px;
  border: 2px solid var(--border);
  border-radius: 30px;
  background: #fff;
  color: var(--heading);
  font-family: inherit; font-size: .9rem; font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 20px -5px rgba(0, 210, 181, .4); }
.btn.primary:hover { background: transparent; color: #000; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); }
.btn.block { width: 100%; padding: 12px 30px; font-size: 1rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.error { color: var(--danger); font-weight: 700; margin-top: 12px; }
.badge { display: inline-block; padding: 2px 12px; border-radius: 30px; font-size: .78rem; font-weight: 700; }
.badge.open { background: #ddf7f2; color: var(--primary); }
.badge.closed { background: #fde8e8; color: var(--danger); }

/* Consentement */
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: .88rem; font-weight: 300; color: var(--text); }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 2px; }

/* Signature */
.sig-wrap { position: relative; border: 2px dashed var(--accent); border-radius: 20px; background: #fff; }
.sig-wrap canvas { display: block; width: 100%; height: 200px; touch-action: none; cursor: crosshair; }
.sig-wrap .hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #b5bccb; pointer-events: none; }
.sig-wrap.signed .hint { display: none; }

/* Organisateur */
.share { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center; }
.share img { width: 100%; border: 1px solid var(--border); border-radius: 8px; }
@media (max-width: 640px) { .share { grid-template-columns: 1fr; } .share img { max-width: 260px; margin: 0 auto; display: block; } }
.link-box { display: flex; gap: 8px; }
.link-box input { font-family: ui-monospace, monospace; font-size: .8rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
td img.sig { height: 44px; max-width: 140px; object-fit: contain; }
.table-wrap { overflow-x: auto; }
.meeting-list a { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.meeting-list a:last-child { border-bottom: 0; }
.meeting-list a:hover { color: var(--primary); }
.meeting-list a { color: var(--heading); }

.success-box { text-align: center; padding: 40px 20px; }
.success-box .check { font-size: 3rem; color: var(--success); }

/* Impression : feuille d'émargement */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .card { border: 0; padding: 0; }
  .container { max-width: none; padding: 0; }
  table { font-size: 10pt; }
  th, td { border: 1px solid #999; padding: 6px; }
  td img.sig { height: 40px; }
  tr { page-break-inside: avoid; }
}

/* Logo de l'entreprise */
.logo { display: block; max-height: 64px; max-width: 220px; object-fit: contain; margin-bottom: 14px; }
.logo-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.logo-field img { max-height: 48px; max-width: 160px; object-fit: contain; border: 1px solid var(--border); border-radius: 10px; padding: 4px; background: #fff; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Barre du haut et navigation */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--border); }
.topbar .brand { display: flex; align-items: center; gap: 10px; color: var(--heading); text-decoration: none; font-weight: 700; min-width: 0; }
.topbar .brand img { height: 36px; max-width: 120px; object-fit: contain; }
.topbar .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 640px) { .hide-sm { display: none; } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { border: 0; background: transparent; padding: 10px 18px; border-radius: 30px; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }
.tab:hover { color: var(--primary); }
.tab.active { background: var(--primary); color: #fff; }
.back { display: inline-block; margin-bottom: 12px; color: var(--primary); text-decoration: none; font-weight: 700; }
.card-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.card-head h2 { margin: 0; }
.btn.small { min-height: 34px; padding: 4px 14px; font-size: .8rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.filters > * { flex: 1 1 200px; width: auto; }
input[type=search], input[type=email], input[type=password], select {
  width: 100%; height: 43px; padding: 0 20px; border: 1px solid var(--border); border-radius: 30px;
  font: inherit; font-weight: 300; color: var(--heading); background: #fff;
}
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2300756a' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 18px center; padding-right: 40px; }
input[type=search]:focus, input[type=email]:focus, input[type=password]:focus, select:focus { outline: none; border-color: var(--accent); }
a { color: var(--primary); }
.small { font-size: .78rem; }
.nowrap { white-space: nowrap; }
.chip { display: inline-block; padding: 1px 10px; margin: 2px 0; border-radius: 30px; background: #ddf7f2; color: var(--primary); font-size: .78rem; font-weight: 700; }
.org-cell { display: flex; align-items: center; gap: 10px; }
.org-cell img { height: 32px; max-width: 80px; object-fit: contain; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f3f8f7; }
.notice { border-color: var(--accent); background: #effcf9; }
.notice code { background: #fff; padding: 2px 8px; border-radius: 6px; font-size: .9rem; color: var(--heading); }
dialog { border: 0; border-radius: var(--radius); padding: 24px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(0, 40, 36, .45); }

/* Affiche QR */
.poster-thumb { cursor: zoom-in; box-shadow: 0 6px 20px -8px rgba(0,0,0,.25); }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 10; cursor: zoom-out; padding: 16px; }
.overlay img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 6px; }

/* ================= Application avec menu latéral ================= */
.app { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px; padding: 20px 14px;
  background: #0b2e2a; color: #cfe6e2;
}
.sidebar .sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; text-decoration: none; font-weight: 700; }
.sidebar .sb-brand img { height: 36px; max-width: 110px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }
.sidebar .sb-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .sb-section { margin: 14px 10px 4px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #7fa9a3; font-weight: 700; }
.sidebar .sb-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: #cfe6e2; text-decoration: none; font-size: .92rem; font-weight: 400; border: 0; background: none; font-family: inherit; cursor: pointer; text-align: left;
}
.sidebar .sb-link svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.sidebar .sb-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar .sb-link.active { background: #00756a; color: #fff; font-weight: 700; }
.sidebar .sb-link.cta { background: var(--accent); color: #062b27; font-weight: 700; margin: 6px 0; }
.sidebar .sb-link.cta:hover { background: #2fe0c6; }
.sidebar .sb-count { margin-left: auto; font-size: .72rem; background: rgba(255, 255, 255, .12); padding: 1px 8px; border-radius: 99px; }
.sidebar .sb-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sidebar .sb-user { padding: 6px 12px 8px; font-size: .78rem; color: #8fb9b3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { min-width: 0; padding: 26px clamp(16px, 3vw, 36px) 48px; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.main-head h1 { margin: 0; font-size: 1.6rem; }
.main-head .crumb { font-size: .82rem; color: var(--muted); margin-bottom: 2px; }
.main-head .crumb a { text-decoration: none; }
.mobile-bar { display: none; }
.sb-backdrop { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 20; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .sb-backdrop.open { display: block; position: fixed; inset: 0; z-index: 19; background: rgba(0, 30, 27, .45); }
  .mobile-bar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 5; padding: 10px 16px; background: #0b2e2a; color: #fff; font-weight: 700; }
  .mobile-bar button { background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
  .main { padding-top: 18px; }
}

/* ================= Tableau de bord ================= */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; }
.kpi .k-label { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.kpi .k-value { font-size: 2rem; font-weight: 700; color: var(--heading); line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: .8rem; color: var(--muted); }
.kpi .k-sub .up { color: #0a7a4d; font-weight: 700; }
.kpi .k-sub .down { color: #b42318; font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.grid-2 > .card { margin-bottom: 0; }
.stack { display: grid; gap: 16px; }
.chart-wrap { position: relative; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -100%); margin-top: -8px;
  background: #0b2e2a; color: #fff; padding: 6px 10px; border-radius: 8px; font-size: .78rem; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr; align-items: center; gap: 10px; font-size: .86rem; }
.hbar .hb-label { color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .hb-track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar .hb-fill { height: 14px; min-width: 2px; background: var(--primary); border-radius: 0 4px 4px 0; }
.hbar .hb-val { font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; font-size: .8rem; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: .88rem; }
.list li:last-child { border-bottom: 0; }
.list .l-main { min-width: 0; }
.list .l-main strong, .list .l-main a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); text-decoration: none; }
.list .l-main a:hover { color: var(--primary); }
.list .l-side { flex: none; text-align: right; color: var(--muted); font-size: .8rem; }
.empty-note { color: var(--muted); font-size: .88rem; padding: 8px 0; }

/* ================= Audit ================= */
.integrity { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; font-size: .8rem; font-weight: 700; }
.integrity.ok { background: #ddf7f2; color: #00564e; }
.integrity.ko { background: #fde8e8; color: #b42318; }
.audit-list { list-style: none; margin: 0; padding: 0; }
.audit-item { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.audit-item:last-child { border-bottom: 0; }
.audit-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #eef5f4; color: var(--primary); }
.audit-ico svg { width: 18px; height: 18px; }
.audit-ico.c-attendee { background: #e7f0ff; color: #2456c7; }
.audit-ico.c-auth { background: #f1f1f4; color: #555a6b; }
.audit-ico.c-export { background: #fff3e0; color: #a75a00; }
.audit-ico.c-danger { background: #fde8e8; color: #b42318; }
.audit-title { font-size: .9rem; color: var(--heading); }
.audit-title strong { font-weight: 700; }
.audit-meta { font-size: .78rem; color: var(--muted); }
.audit-when { font-size: .78rem; color: var(--muted); text-align: right; white-space: nowrap; }
.changes { margin: 6px 0 0; padding: 8px 12px; background: #f6faf9; border-radius: 10px; font-size: .8rem; display: grid; gap: 2px; }
.changes del { color: #b42318; text-decoration: line-through; }
.changes ins { color: #0a7a4d; text-decoration: none; font-weight: 700; }
.reason { font-size: .8rem; color: var(--text); margin-top: 4px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 14px; font-size: .85rem; }

/* ================= Divers ================= */
.badge.edited { background: #fff3e0; color: #a75a00; cursor: help; }
.badge.type { background: #eef1ff; color: #3446a8; }
.receipt { font-family: ui-monospace, monospace; font-size: .78rem; color: var(--heading); letter-spacing: .03em; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text); cursor: pointer; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.icon-btn svg { width: 16px; height: 16px; }
dialog.wide { width: min(640px, calc(100vw - 32px)); }
dialog h2 { margin-top: 0; }
.template-report { display: grid; gap: 6px; font-size: .86rem; }
.template-report .ok { color: #0a7a4d; font-weight: 700; }
.template-report .miss { color: var(--muted); }
.col-map { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.col-map span { border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px; font-size: .8rem; background: #fff; }
.col-map span b { color: var(--primary); }
.col-map span.unmapped { color: var(--muted); border-style: dashed; }
.receipt-box { margin: 18px auto 10px; padding: 14px; max-width: 320px; border: 2px dashed var(--accent); border-radius: 14px; }
.receipt-code { font-family: ui-monospace, monospace; font-size: 1.6rem; font-weight: 700; color: var(--heading); letter-spacing: .08em; margin: 4px 0; }
.btn svg { width: 16px; height: 16px; flex: none; }
.integrity svg { width: 16px; height: 16px; flex: none; }
.mobile-bar button svg { width: 22px; height: 22px; display: block; }

/* Tableau de bord : 6 indicateurs sans trou (6, 3 ou 2 par ligne) et grille de 6 colonnes */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: flex; flex-direction: column; }
.kpi .k-sub { margin-top: auto; }
.dash-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.dash-grid .span-2 { grid-column: span 2; }
.dash-grid .span-3 { grid-column: span 3; }
.dash-grid .span-4 { grid-column: span 4; }
.dash-grid .span-6 { grid-column: span 6; }
.dash-card { margin: 0; display: flex; flex-direction: column; }
.dash-card .card-head { margin-bottom: 12px; }
/* Le contenu occupe toute la hauteur du bloc : barres réparties, état vide centré */
.dash-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.dash-body .hbars { flex: 1; align-content: space-evenly; }
.dash-body:has(> .list) { justify-content: flex-start; }
.dash-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); font-size: .85rem; font-weight: 700; text-decoration: none; }
.dash-foot:hover { text-decoration: underline; }
.dash-body .empty-note { text-align: center; margin: auto 0; }
@media (max-width: 1100px) {
  .dash-grid .span-2, .dash-grid .span-4 { grid-column: span 6; }
}
@media (max-width: 800px) {
  .dash-grid .span-3 { grid-column: span 6; }
}

/* Pré-remplissage IA / invitation */
.assist { border-color: #bfeee6; background: linear-gradient(180deg, #f2fdfa 0%, #fff 60%); }
.assist-result { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--border); font-size: .88rem; display: grid; gap: 6px; }
.assist-result .warn { margin: 0; padding-left: 4px; list-style: none; color: #8a5300; }
@keyframes aiFlash { from { background: #d9fbf4; border-color: var(--accent); } to { background: #fff; } }
.ai-filled { animation: aiFlash 2.4s ease-out; border-color: var(--accent) !important; }
.cal-help { margin: 10px 0; padding-left: 18px; display: grid; gap: 4px; }

/* ---------- Passeport participant ---------- */
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.passport-card { border: 2px solid var(--accent); }
.passport-head { display: flex; gap: 14px; align-items: center; }
.passport-head strong { color: var(--heading); font-size: 1.1rem; }
.passport-ico { font-size: 2rem; line-height: 1; }
.passport-sig { display: block; max-width: 100%; max-height: 110px; margin-top: 6px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.passport-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: .88rem; }
.passport-offer { background: #effcf9; border-radius: 14px; padding: 12px; }
.passport-show { text-align: center; }
.passport-qr { display: block; width: min(300px, 100%); margin: 18px auto 12px; border-radius: 14px; border: 1px solid var(--border); }
.passport-history { list-style: none; margin: 8px 0 0; padding: 0; }
.passport-history li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.passport-history li:first-child { border-top: 0; }
.passport-history .receipt { white-space: nowrap; }
.passport-dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 10px 0 0; }
.passport-dl dt { font-weight: 700; color: var(--heading); }
.passport-dl dd { margin: 0; overflow-wrap: anywhere; }
.passport-chip { display: inline-block; margin-bottom: 8px; padding: 4px 14px; border-radius: 30px; background: #ddf7f2; color: var(--primary); font-weight: 700; font-size: .85rem; }
.offline-banner { margin-bottom: 14px; padding: 10px 14px; border-radius: 12px; background: #fff3e0; color: #a75a00; font-weight: 700; font-size: .88rem; }
.badge.passport { background: #ddf7f2; color: var(--primary); }
.badge.offline { background: #eef1ff; color: #3446a8; cursor: help; }

/* ---------- Borne d'émargement ---------- */
.kiosk-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--border); }
.kiosk-logo { height: 44px; max-width: 90px; object-fit: contain; }
.kiosk-title { flex: 1; min-width: 0; line-height: 1.35; }
.kiosk-title strong { display: block; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kiosk-status { text-align: right; line-height: 1.3; }
.net-pill { display: inline-block; padding: 2px 12px; border-radius: 30px; font-size: .78rem; font-weight: 700; background: #eee; }
.net-pill.online { background: #ddf7f2; color: var(--primary); }
.net-pill.offline { background: #fff3e0; color: #a75a00; }
.net-pill.syncing { background: #eef1ff; color: #3446a8; }
.net-pill.auth { background: #fde8e8; color: var(--danger); }
.notice.warn { border: 1px solid #f3c27a; background: #fff3e0; color: #7a4300; padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; }
.kiosk-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
@media (max-width: 520px) { .kiosk-choices { grid-template-columns: 1fr; } }
.kiosk-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; border: 2px solid var(--border); border-radius: var(--radius); background: #fff; font: inherit; color: var(--heading); cursor: pointer; text-align: center; }
.kiosk-choice:hover, .kiosk-choice:focus-visible { border-color: var(--accent); }
.kiosk-ico { font-size: 2.4rem; line-height: 1; }
.center { text-align: center; }
.kiosk-recent, .kiosk-meetings { list-style: none; margin: 6px 0 0; padding: 0; }
.kiosk-recent li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.kiosk-recent li:first-child { border-top: 0; }
.kiosk-meetings li a { display: flex; flex-direction: column; padding: 10px 0; border-top: 1px solid var(--border); color: var(--heading); text-decoration: none; }
.sync-tag { flex-shrink: 0; padding: 2px 10px; border-radius: 30px; font-size: .75rem; font-weight: 700; }
.sync-tag.wait { background: #fff3e0; color: #a75a00; }
.sync-tag.ok { background: #ddf7f2; color: var(--primary); }
.sync-tag.warn { background: #eef1ff; color: #3446a8; }
.sync-tag.err { background: #fde8e8; color: var(--danger); }
.scan-box { position: relative; overflow: hidden; border-radius: 16px; background: #000; aspect-ratio: 4 / 3; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; inset: 18%; border: 3px solid var(--accent); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35); }
.radio-row { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-weight: 400; cursor: pointer; }
.radio-row input { margin-top: 6px; width: auto; }

/* Signature de la plateforme */
.powered { margin: 18px 0 0; text-align: center; font-size: .75rem; color: var(--muted); }
.powered strong { color: var(--primary); }
.powered a, .sidebar .sb-powered a { color: inherit; font-weight: 700; text-decoration: none; }
.powered a:hover, .sidebar .sb-powered a:hover { text-decoration: underline; }
.sidebar .sb-powered { padding: 10px 12px 0; font-size: .7rem; color: #8fb9b3; }
.sidebar .sb-powered strong { color: #fff; }

/* Envoi de la liste aux participants */
.mail-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: #effcf9; font-size: .88rem; }
.mail-tag { display: inline-block; padding: 0 8px; border-radius: 20px; font-size: .7rem; font-weight: 700; cursor: help; white-space: nowrap; }
.mail-tag.ok { background: #ddf7f2; color: var(--primary); }
.mail-tag.err { background: #fde8e8; color: var(--danger); }

/* Double authentification */
.mfa-dialog { max-width: 520px; }
.mfa-state { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.mfa-state svg { width: 20px; height: 20px; }
.mfa-state.on { color: var(--primary); }
.mfa-facts { margin: 8px 0 4px; padding-left: 18px; }
.mfa-steps { padding-left: 20px; }
.mfa-steps li { margin-bottom: 14px; }
.mfa-qr { display: block; width: 200px; height: 200px; margin: 10px 0 6px; border: 1px solid var(--border); border-radius: 12px; }
.mfa-secret { font-family: ui-monospace, monospace; font-size: .85rem; word-break: break-all; background: #f3f8f7; padding: 2px 6px; border-radius: 6px; color: var(--heading); }
input.mfa-code { font-family: ui-monospace, monospace; font-size: 1.4rem; letter-spacing: .3em; max-width: 220px; }
.mfa-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; list-style: none; padding: 14px; margin: 12px 0; border: 2px dashed var(--accent); border-radius: 14px; }
.mfa-codes code { font-family: ui-monospace, monospace; font-size: 1rem; color: var(--heading); letter-spacing: .05em; }
.sec-badge { display: inline-block; padding: 0 8px; border-radius: 20px; font-size: .7rem; font-weight: 700; margin-left: 4px; }
.sec-badge.ok { background: #ddf7f2; color: var(--primary); }
.sec-badge.off { background: #f1f1f1; color: var(--muted); }
.sec-badge.lock { background: #fde8e8; color: var(--danger); }

/* SaaS : structure active, bandeaux, abonnement, membres */
.sidebar .sb-switch { width: 100%; margin: 0 0 6px; padding: 6px 8px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); color: #fff; font: inherit; font-size: .8rem; }
.sidebar .sb-switch option { color: #000; }
.sidebar .sb-plan { padding: 0 10px 8px; font-size: .72rem; color: #8fb9b3; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: #effcf9; border: 1px solid #b9e9e0; color: var(--heading); font-size: .9rem; }
.banner.warn { background: #fff3e0; border-color: #f3c27a; color: #7a4300; }
.banner.ok { background: #ddf7f2; border-color: #9fe3d6; color: var(--primary); font-weight: 700; }
.usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.usage .u { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.usage .u .v { font-size: 1.4rem; font-weight: 700; color: var(--heading); }
.usage .bar { height: 6px; border-radius: 6px; background: #e3e9e8; margin-top: 6px; overflow: hidden; }
.usage .bar span { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.usage .bar span.full { background: var(--danger); }
.plan-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.plan-pick .pp { border: 2px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.plan-pick .pp.current { border-color: var(--primary); }
.plan-pick .pp h3 { margin: 0; font-size: 1.05rem; }
.plan-pick .pp .price { font-weight: 700; color: var(--heading); margin: 4px 0 8px; }
.role-select { padding: 4px 8px; border-radius: 8px; }
.tag-soon { display: inline-block; padding: 0 8px; border-radius: 20px; background: #fff3e0; color: #8a4b00; font-size: .7rem; font-weight: 700; }
.plain-list { list-style: none; padding: 0; margin: 8px 0 0; } .plain-list li { padding: 6px 0; border-top: 1px solid var(--border); }

/* Onglets (Paramètres) */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; border-bottom: 2px solid var(--border); }
.tabs button { border: 0; background: none; font: inherit; font-weight: 700; font-size: .92rem; color: var(--muted); padding: 10px 16px; margin-bottom: -2px; border-bottom: 3px solid transparent; cursor: pointer; }
.tabs button:hover { color: var(--heading); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
@media (max-width: 600px) { .tabs { flex-wrap: nowrap; overflow-x: auto; } .tabs button { white-space: nowrap; } }
.pro-tag { display: inline-block; padding: 1px 9px; border-radius: 20px; background: #eef1ff; color: #3446a8; font-size: .7rem; font-weight: 700; vertical-align: middle; }
.actions-table input, .actions-table select { width: 100%; min-width: 120px; margin: 0; }
.actions-table td:first-child { min-width: 240px; }
#notesBox summary { cursor: pointer; margin-bottom: 8px; }

/* Éditeur de modèle PDF / image */
.ov-editor { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 20px; margin-top: 16px; align-items: start; }
@media (max-width: 1000px) { .ov-editor { grid-template-columns: 1fr; } }
.ov-stage { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; user-select: none; touch-action: none; background: #fff; }
.ov-stage img { display: block; width: 100%; height: auto; }
.ov-table { position: absolute; border: 2px solid var(--primary); background: rgba(0, 210, 181, .08); cursor: move; box-sizing: border-box; }
.ov-table canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ov-handle { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 2px solid #fff; cursor: nwse-resize; }
.ov-field { position: absolute; white-space: nowrap; font-family: Helvetica, Arial, sans-serif; font-weight: 700; color: #111; background: rgba(255, 243, 224, .85); outline: 1px dashed #f0a43a; padding: 0 3px; cursor: move; line-height: 1.1; }
.ov-col { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ov-col select { flex: 1; min-width: 0; margin: 0; }
.ov-col input { width: 70px; margin: 0; }
.ov-col span { flex: 1; font-size: .88rem; }

/* Back-office : promotions, aperçu d'e-mail */
.inline-check { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px 0 0; font-weight: 400; font-size: .85rem; }
.inline-check input { width: auto; height: auto; margin: 0; }
#promoRows input[type=text] { min-width: 160px; }
#promoRows input[type=number] { display: inline-block; height: 36px; }
.mail-preview { width: 100%; height: 420px; margin-top: 10px; border: 1px solid var(--border); border-radius: 12px; background: #f3f8f7; }

/* Espace structure : organisateurs supplémentaires (sélecteur − / +) et promotion */
.stepper-field { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 4px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 16px; }
.stepper-field .lbl { flex: 1; min-width: 200px; }
.stepper-field .lbl strong { display: block; color: var(--heading); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 30px; overflow: hidden; background: #fff; }
.stepper button { width: 40px; height: 40px; border: 0; background: #f3f8f7; color: var(--primary); font: inherit; font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.stepper button:hover { background: #ddf7f2; }
.stepper button:disabled { color: #b5bccb; cursor: default; background: #f6f7f7; }
.stepper input[type=number] { width: 56px; height: 40px; border: 0; border-radius: 0; padding: 0; text-align: center; font-weight: 700; color: var(--heading); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.billing-field { max-width: 320px; }
.promo-banner { margin: 12px 0 0; padding: 12px 16px; border-radius: 14px; background: #fff3e0; border: 1px solid #f3c27a; color: #7a4300; font-size: .9rem; }
.inline-range { display: flex; align-items: center; gap: 8px; }
.inline-range input { width: 110px; }
#rcFloors input, #rcFloors select { margin: 0; min-width: 140px; }

/* Ateliers sur plusieurs jours */
.check-line { display: flex; gap: 10px; align-items: center; margin: 14px 0 4px; font-weight: 600; cursor: pointer; }
.check-line input { width: 18px; height: 18px; flex: none; margin: 0; }
.multi-days { padding: 12px 14px; border-radius: 14px; background: #f3f8f7; border: 1px solid var(--border); margin-top: 6px; }
.series-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.series-bar .day-chip { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--border);
  font-size: .8rem; font-weight: 700; color: var(--text); text-decoration: none; background: #fff; }
.series-bar .day-chip.today { border-color: var(--primary); }
.series-bar .day-chip.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.series-bar .day-chip.closed { color: var(--muted); }
.matrix td.mark, .matrix th.mark { text-align: center; padding-left: 4px; padding-right: 4px; }
.matrix td.mark .yes { color: var(--primary); font-weight: 700; }
.matrix td.mark .no { color: #c9cfce; }
.matrix th.mark small { display: block; font-weight: 400; color: var(--muted); }
.rate { display: inline-block; min-width: 44px; text-align: right; font-weight: 700; }
.rate.low { color: var(--danger); }
.upgrade-note { margin: 8px 0 4px; padding: 10px 14px; border-radius: 12px; background: #eef1ff; color: #2b3a8f; font-size: .88rem; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Évaluation des participants */
.fb-stars span { color: #d5dcdb; } .fb-stars span.on { color: #f5b301; }
.fb-grid { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 24px; margin-top: 12px; }
@media (max-width: 720px) { .fb-grid { grid-template-columns: 1fr; } }
.fb-score { text-align: center; padding: 16px; border-radius: 16px; background: #f3f8f7; }
.fb-big { font-size: 2.6rem; font-weight: 700; color: var(--heading); line-height: 1.1; }
.fb-big small { font-size: 1rem; color: var(--muted); font-weight: 400; }
.fb-score .fb-stars { font-size: 1.3rem; }
.fb-dist { margin-top: 10px; display: grid; gap: 4px; font-size: .78rem; }
.fb-dist div, .fb-row { display: grid; grid-template-columns: 34px 1fr 24px; gap: 8px; align-items: center; }
.fb-row { grid-template-columns: minmax(140px, 1.2fr) 2fr 36px 56px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.fb-dist i, .fb-row i { display: block; height: 8px; border-radius: 4px; background: #e6eeec; overflow: hidden; }
.fb-dist b, .fb-row b { display: block; height: 100%; background: #f5b301; border-radius: 4px; }
.fb-row b { background: var(--primary); }
.fb-comments { list-style: none; padding: 0; margin: 8px 0 0; }
.fb-comments li { padding: 12px 0; border-top: 1px solid var(--border); }
.fb-comments p { margin: 4px 0; }
