/* Ben Démo — système commun (portail, admin, démos) : surface calme et monochrome (même esprit que Meeting Assistant) ;
   le rouge ne sert qu'à l'enregistrement en cours, les couleurs d'état restent douces et rares. Clair/sombre selon le système,
   mobile d'abord. Les démos ajoutent leurs composants propres dans leur propre feuille (@import de celle-ci). */
:root {
  --bg: #ffffff; --bg-soft: #f7f7f8; --surface: #ffffff; --surface-2: #f3f3f5; --surface-3: #ebebee;
  --line: #ececef; --line-strong: #dcdce1;
  --text: #111113; --text-2: #55555f; --text-3: #8b8b96;
  --accent: #ff3b30; --accent-soft: rgba(255, 59, 48, 0.1);
  --ink: #111113; --ink-text: #ffffff;
  --ok: #18864b; --ok-soft: rgba(24, 134, 75, 0.1);
  --warn: #b26b00; --warn-soft: rgba(178, 107, 0, 0.1);
  --bad: #d92d20; --bad-soft: rgba(217, 45, 32, 0.08);
  --info: #2f6fed; --info-soft: rgba(47, 111, 237, 0.1);
  --focus: #2f6fed;
  --shadow: 0 1px 2px rgba(16, 16, 20, 0.05), 0 8px 24px rgba(16, 16, 20, 0.08);
  --shadow-lg: 0 24px 64px rgba(16, 16, 20, 0.18), 0 2px 8px rgba(16, 16, 20, 0.06);
  --scrim: rgba(250, 250, 251, 0.82);
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, Menlo, monospace;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 18px; --gutter: 16px; --top: 56px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0d; --bg-soft: #111113; --surface: #151517; --surface-2: #1c1c1f; --surface-3: #252529;
    --line: #232327; --line-strong: #323238; --text: #f3f3f4; --text-2: #a5a5b0; --text-3: #6e6e7a;
    --accent: #ff453a; --accent-soft: rgba(255, 69, 58, 0.14); --ink: #f3f3f4; --ink-text: #0c0c0d;
    --ok: #3ecf7f; --ok-soft: rgba(62, 207, 127, 0.12); --warn: #f0b03f; --warn-soft: rgba(240, 176, 63, 0.12);
    --bad: #ff6b60; --bad-soft: rgba(255, 107, 96, 0.12); --info: #6b9bff; --info-soft: rgba(107, 155, 255, 0.14); --focus: #6b9bff;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6); --scrim: rgba(12, 12, 13, 0.84);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c0d; --bg-soft: #111113; --surface: #151517; --surface-2: #1c1c1f; --surface-3: #252529;
  --line: #232327; --line-strong: #323238; --text: #f3f3f4; --text-2: #a5a5b0; --text-3: #6e6e7a;
  --accent: #ff453a; --accent-soft: rgba(255, 69, 58, 0.14); --ink: #f3f3f4; --ink-text: #0c0c0d;
  --ok: #3ecf7f; --ok-soft: rgba(62, 207, 127, 0.12); --warn: #f0b03f; --warn-soft: rgba(240, 176, 63, 0.12);
  --bad: #ff6b60; --bad-soft: rgba(255, 107, 96, 0.12); --info: #6b9bff; --info-soft: rgba(107, 155, 255, 0.14); --focus: #6b9bff;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6); --scrim: rgba(12, 12, 13, 0.84);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--sans); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; } svg.i.lg { width: 22px; height: 22px; } svg.i.xl { width: 30px; height: 30px; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .mono { font-family: var(--mono); font-size: .9em; }
.tnum { font-variant-numeric: tabular-nums; } .grow { flex: 1; min-width: 0; } .hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ barre du haut */
.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 6px;
  padding: 0 calc(var(--gutter) - 6px); background: var(--scrim); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top h1 { font-size: 16px; font-weight: 650; margin: 0 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top .sub { color: var(--text-3); font-size: 13px; white-space: nowrap; }
.top .acts { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.page { max-width: 980px; margin: 0 auto; padding: 18px var(--gutter) 48px; }
.page.narrow { max-width: 720px; }
.section { margin: 26px 0 8px; display: flex; align-items: baseline; gap: 10px; }
.section h2 { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0; }
.section .faint { font-size: 12px; }

/* ------------------------------------------------------------------ boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 14px;
  border-radius: 10px; font-weight: 550; font-size: 14px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text); transition: background .15s, border-color .15s, transform .1s, opacity .15s; white-space: nowrap;
  text-decoration: none; user-select: none; -webkit-user-select: none; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--ink); color: var(--ink-text); border-color: transparent; }
.btn.primary:hover { opacity: .88; }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.iconbtn { width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--text-2);
  transition: background .15s, color .15s; flex: none; text-decoration: none; }
.iconbtn:hover { background: var(--surface-2); color: var(--text); }
.iconbtn.on { color: var(--text); background: var(--surface-2); }

/* contrôle segmenté (filtres, vues) */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: 11px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--text-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,16,20,.08); }
.seg .n { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* pastilles d'état */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px;
  font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text-2); font-size: 13px; text-align: left; line-height: 1.3; }
.chip:hover { color: var(--text); background: var(--surface-2); }

/* ------------------------------------------------------------------ listes */
.list { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-decoration: none; color: inherit; cursor: pointer;
  border-top: 1px solid var(--line); min-height: 56px; transition: background .12s; width: 100%; text-align: left; }
.item:first-child { border-top: 0; }
.item:hover { background: var(--bg-soft); }
.item .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.item .t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.item .s { color: var(--text-2); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.item .m { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12px; flex: none; }
.empty { padding: 28px 16px; text-align: center; color: var(--text-3); font-size: 14px; }

/* stat compacte */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 4px 0 16px; }
.stat { background: var(--bg-soft); border-radius: var(--radius); padding: 10px 12px; min-width: 0; }
.stat b { display: block; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--text-2); }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------------ champs */
.field { display: block; margin: 12px 0 0; }
.field > span { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; font-weight: 550; }
.input, select.input, textarea.input { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); outline: none; transition: border-color .15s; }
textarea.input { resize: vertical; line-height: 1.45; }
.input:focus { border-color: var(--text-3); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.search { position: relative; flex: 1; min-width: 0; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 36px; }

/* clé / valeur */
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 14px; font-size: 14px; margin: 14px 0; }
.kv > :nth-child(odd) { color: var(--text-3); }
.kv > :nth-child(even) { overflow-wrap: anywhere; }
@media (max-width: 420px) { .kv { grid-template-columns: 96px minmax(0, 1fr); } }
.pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; font-size: 13px;
  line-height: 1.55; white-space: pre-wrap; overflow: auto; max-height: 280px; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ feuille (détail) : bas d'écran sur téléphone,
   panneau centré sur grand écran */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 10, 12, .38); display: none; align-items: flex-end; justify-content: center; }
.scrim.show { display: flex; animation: fade .18s var(--ease); }
.sheet { background: var(--surface); width: 100%; max-width: 640px; max-height: 92vh; max-height: 92dvh; overflow: auto;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-lg); padding: 6px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  animation: up .24s var(--ease); overscroll-behavior: contain; }
.sheet .grab { width: 36px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 6px auto 10px; }
.sheet .head { display: flex; align-items: flex-start; gap: 10px; position: sticky; top: -6px; background: var(--surface); padding: 6px 0 10px; z-index: 1; }
.sheet h3 { font-size: 18px; margin: 0; line-height: 1.3; font-weight: 650; }
.sheet h4 { font-size: 13px; color: var(--text-2); font-weight: 600; margin: 22px 0 8px; }
.sheet .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
@media (min-width: 760px) { .scrim { align-items: center; } .sheet { border-radius: var(--radius-lg); padding-bottom: 24px; } .sheet .grab { display: none; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* onglets d'une feuille */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 4px 0 6px; overflow-x: auto; scrollbar-width: none; }
.tabs button { height: 38px; padding: 0 12px; font-size: 14px; font-weight: 550; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--text); border-bottom-color: var(--text); }

/* message furtif */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--ink-text); padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 32px); animation: up .2s var(--ease); }


/* ------------------------------------------------------------------ portail : marque, accueil, cartes de démo */
.marque { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); min-width: 0; }
.marque .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--ink-text); display: grid; place-items: center;
  font-weight: 750; font-size: 14px; letter-spacing: -0.04em; flex: none; }
.marque b { font-size: 16px; font-weight: 650; white-space: nowrap; }
.hero { padding: 26px 0 8px; }
.hero h2 { font-size: 28px; line-height: 1.15; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.025em; }
.hero p { margin: 0; color: var(--text-2); max-width: 560px; }
.pastille { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); margin-top: 14px; padding: 5px 10px;
  border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); }
.pastille .dot { color: var(--text-3); } .pastille.ok .dot { color: var(--ok); } .pastille.warn .dot { color: var(--warn); }
.demos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; margin-top: 10px; }
.demo-carte { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
  overflow: hidden; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .2s, transform .15s; }
.demo-carte:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.demo-carte:active { transform: scale(0.99); }
.demo-carte .visuel { height: 128px; background: var(--bg-soft); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.demo-carte .visuel svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.demo-carte .corps { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.demo-carte h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }
.demo-carte p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.demo-carte .pied { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; }
.demo-carte .ouvrir { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }
.pied-page { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; line-height: 1.6; }

/* lien à copier / partager */
.lien { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); min-width: 0; }
.lien code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; color: var(--text-2); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.lien code::-webkit-scrollbar { display: none; }

/* progression */
.barre { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.barre > i { display: block; height: 100%; width: var(--p, 0%); background: var(--ink); border-radius: 6px; transition: width .3s var(--ease); }
.etapes { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-3); }
.etapes li { display: flex; align-items: center; gap: 8px; } .etapes li.on { color: var(--text); font-weight: 550; } .etapes li.fait { color: var(--text-2); }
.etapes li .puce { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; flex: none; }
.etapes li.fait .puce { background: var(--ok); border-color: var(--ok); color: #fff; }
.etapes li.on .puce { border-color: var(--text); border-top-color: transparent; animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
