/* ALMA Plateforme — feuille de style unique.
   Jetons en tête ; tout le reste les utilise. Clair / sombre selon le système (ou le choix mémorisé). */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --brand: #008cce; --brand-strong: #0072a8; --brand-soft: #e5f3fa; --brand-ring: rgb(0 140 206 / .28);
  --ink: #0f172a; --ink-2: #1e293b; --text: #334155; --muted: #64748b; --faint: #94a3b8;
  --bg: #f4f6f9; --card: #ffffff; --card-2: #f8fafc; --line: #e2e8f0; --line-strong: #cbd5e1;
  --ok: #0e8a5f; --ok-soft: #e6f6ef; --warn: #a76a0c; --warn-soft: #fdf4e3; --bad: #c8382d; --bad-soft: #fdecea; --info: #4f46e5; --info-soft: #eef0ff;
  --shadow-1: 0 1px 2px rgb(15 23 42 / .05), 0 1px 1px rgb(15 23 42 / .03);
  --shadow-2: 0 8px 24px -8px rgb(15 23 42 / .14), 0 2px 6px rgb(15 23 42 / .05);
  --shadow-3: 0 24px 60px -12px rgb(15 23 42 / .30);
  --r-s: 8px; --r: 12px; --r-l: 16px;
  --fast: 140ms; --ease: cubic-bezier(.2, .8, .2, 1);
  --side: 252px; --target: 40px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #2aa8e6; --brand-strong: #59bdee; --brand-soft: #0d2a3b; --brand-ring: rgb(42 168 230 / .35);
  --ink: #f1f5f9; --ink-2: #e2e8f0; --text: #cbd5e1; --muted: #94a3b8; --faint: #64748b;
  --bg: #0a101c; --card: #101828; --card-2: #0d1523; --line: #1e293b; --line-strong: #334155;
  --ok: #34d399; --ok-soft: #0b2b22; --warn: #fbbf24; --warn-soft: #2e230b; --bad: #f87171; --bad-soft: #341414; --info: #a5b4fc; --info-soft: #1c1f3d;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 10px 30px -10px rgb(0 0 0 / .6); --shadow-3: 0 30px 70px -10px rgb(0 0 0 / .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14.5px/1.55 "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01", "tnum" 0; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-strong); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -.02em; }
h1 { font-size: 26px; font-weight: 700; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14.5px; font-weight: 650; }
p { margin: 0; }
code, .mono { font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace; font-size: .92em; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; border-radius: 6px; }

/* ——— Cadre ——— */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; background: var(--card);
  border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.wordmark { font-weight: 850; font-size: 25px; letter-spacing: -.01em; line-height: 1; position: relative; }
.wordmark i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); bottom: 4px; }
.wordmark i:nth-of-type(1) { left: 5.5px; } .wordmark i:nth-of-type(2) { right: 5.5px; }
.brand small { display: block; font-size: 9.5px; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin-top: 5px; font-weight: 500; }
.nav-group { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 14px 12px 6px; display: flex; align-items: center; gap: 7px; }
.nav-group::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); opacity: .8; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 10px; color: var(--text); font-weight: 500;
  min-height: 38px; transition: background var(--fast) var(--ease), color var(--fast) var(--ease); }
.nav a:hover { text-decoration: none; }
.nav a .icon { color: var(--muted); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); font-weight: 600; }
.nav a[aria-current="page"] .icon { color: var(--brand); }
.nav a .soon { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--faint); border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #1e293b); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.me b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.me span { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 32px; background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color var(--fast); }
.top.scrolled { border-bottom-color: var(--line); }
.search-btn { flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--muted); font: inherit; cursor: pointer; box-shadow: var(--shadow-1); }
.search-btn kbd { margin-left: auto; }
kbd { font: 600 11px/1 "Inter", sans-serif; color: var(--muted); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; background: var(--card-2); }
.top .spacer { flex: 1; }
.menu-btn { display: none; }
.content { padding: 8px 32px 64px; max-width: 1320px; width: 100%; }

/* ——— En-tête de page ——— */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 18px 0 22px; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 70ch; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ——— Boutons ——— */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--target); padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: 600 14px/1 "Inter", sans-serif; cursor: pointer; white-space: nowrap; user-select: none; text-decoration: none !important;
  transition: background var(--fast) var(--ease), border-color var(--fast), box-shadow var(--fast), transform var(--fast) var(--ease); }
.btn:active, .btn.is-pressed { transform: scale(.975); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgb(255 255 255 / .2) inset, 0 6px 16px -6px var(--brand); }
.btn-ghost { background: var(--card); color: var(--ink-2); border-color: var(--line); box-shadow: var(--shadow-1); }
.btn-quiet { background: transparent; color: var(--text); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger-ghost { background: var(--card); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: var(--target); padding: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--brand-strong); }
  .btn-ghost:hover { border-color: var(--line-strong); background: var(--card-2); }
  .btn-quiet:hover { background: var(--card-2); }
  .btn-danger-ghost:hover { background: var(--bad-soft); }
  .nav a:hover { background: var(--card-2); color: var(--ink); }
  .nav a[aria-current="page"]:hover { background: var(--brand-soft); color: var(--brand-strong); }
  .row-link:hover { background: var(--card-2); }
  .search-btn:hover { border-color: var(--line-strong); }
  .tile-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); }
}

/* ——— Cartes ——— */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card + .card, .stack > * + * { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }

/* Tuiles chiffres */
.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi .label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .label .icon { width: 16px; height: 16px; color: var(--brand); }
.kpi .value { font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi::after { content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: var(--brand-soft); opacity: .7; }
.kpi > * { position: relative; z-index: 1; }

/* ——— Tableaux ——— */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--card-2); white-space: nowrap; position: sticky; top: 0; }
.t th:first-child { border-top-left-radius: var(--r-l); } .t th:last-child { border-top-right-radius: var(--r-l); }
.t td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t td.right, .t th.right { text-align: right; }
.row-link { cursor: pointer; transition: background var(--fast); }
.cell-main { color: var(--ink); font-weight: 600; }
.cell-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 6px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* Badges d'état */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px 3px 8px; border-radius: 99px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok { color: var(--ok); background: var(--ok-soft); }
.b-warn { color: var(--warn); background: var(--warn-soft); }
.b-bad { color: var(--bad); background: var(--bad-soft); }
.b-info { color: var(--info); background: var(--info-soft); }
.b-off { color: var(--muted); background: var(--card-2); border: 1px solid var(--line); }

/* Barre de durée */
.meter { height: 6px; background: var(--card-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--ok); transform-origin: left; animation: grow .6s var(--ease); }
.meter.warn > span { background: var(--warn); } .meter.bad > span { background: var(--bad); }
@keyframes grow { from { transform: scaleX(0); } }

/* ——— Formulaires ——— */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label, .label-like { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); font-weight: 500; display: flex; gap: 6px; align-items: center; }
.input, select.input, textarea.input { width: 100%; min-height: var(--target); padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card);
  color: var(--ink); font: inherit; transition: border-color var(--fast), box-shadow var(--fast); }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.input.invalid { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 10px 10px 0; background: var(--card-2); color: var(--muted); font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
input[type="color"].input { padding: 4px; width: 56px; }

/* Choix en cartes (modèle économique, modules) */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.choice { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
  background: var(--card); transition: border-color var(--fast), box-shadow var(--fast), background var(--fast); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .icon-wrap { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--card-2); color: var(--muted); transition: inherit; }
.choice b { color: var(--ink); font-weight: 650; font-size: 14px; }
.choice span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.choice:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 55%, var(--card)); box-shadow: 0 0 0 3px var(--brand-ring); }
.choice:has(input:checked) .icon-wrap { background: var(--brand); color: #fff; }
.choice:has(input:focus-visible) { outline: 3px solid var(--brand-ring); outline-offset: 2px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; background: var(--card); transition: all var(--fast); }
.toggle input { accent-color: var(--brand); width: 16px; height: 16px; margin: 0; }
.toggle:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }
.seg { display: inline-flex; padding: 3px; background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; gap: 2px; }
.seg label { padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted); }
.seg input { position: absolute; opacity: 0; }
.seg label:has(input:checked) { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); }
[data-show-when] { display: none; }
[data-show-when].shown { display: grid; }

/* ——— Clé de licence ——— */
.keybox { display: flex; gap: 10px; align-items: stretch; }
.keybox code { flex: 1; min-width: 0; display: block; padding: 12px 14px; background: var(--card-2); border: 1px dashed var(--line-strong); border-radius: 10px; font-size: 12px; line-height: 1.55;
  color: var(--ink-2); word-break: break-all; max-height: 92px; overflow: auto; user-select: all; }

/* ——— Fiche ——— */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.facts > div { background: var(--card); padding: 14px 16px; }
.facts dt { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.facts dd { margin: 0; color: var(--ink); font-weight: 600; }
.hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.hero-mark { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent, var(--brand)); color: #fff; box-shadow: 0 10px 24px -10px var(--accent, var(--brand)); }
.hero-mark .icon { width: 24px; height: 24px; }

/* Fil des événements */
.timeline { list-style: none; margin: 0; padding: 4px 0; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 9px 22px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 35px; top: 34px; bottom: -6px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .ti { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); }
.timeline .ti .icon { width: 14px; height: 14px; }
.timeline b { color: var(--ink); font-weight: 600; font-size: 13.5px; }
.timeline small { display: block; color: var(--muted); font-size: 12px; }

/* ——— Vides, alertes ——— */
.empty { text-align: center; padding: 48px 24px; }
.empty .art { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty .art .icon { width: 28px; height: 28px; }
.empty h3 { font-size: 16px; }
.empty p { color: var(--muted); margin: 6px auto 18px; max-width: 46ch; }
.note { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--info-soft); color: var(--ink-2); border: 1px solid color-mix(in srgb, var(--info) 22%, transparent); font-size: 13.5px; }
.note .icon { color: var(--info); margin-top: 1px; }
.note.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); } .note.warn .icon { color: var(--warn); }
.note.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 25%, transparent); } .note.bad .icon { color: var(--bad); }
.note.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 25%, transparent); } .note.ok .icon { color: var(--ok); }

/* Étapes de démarrage */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.steps a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 500; }
.steps a:hover { background: var(--card-2); text-decoration: none; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-strong); font-size: 12px; font-weight: 700; color: var(--muted); flex: none; }
.steps .done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps .done span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }

/* Barres horizontales */
.bars { display: grid; gap: 12px; padding: 18px 22px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 36px; gap: 12px; align-items: center; font-size: 13.5px; }
.bar-row .track { height: 10px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 99px; background: var(--accent, var(--brand)); animation: grow .7s var(--ease); transform-origin: left; }
.bar-row b { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Filtres */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filters .input { width: auto; min-height: 36px; padding: 6px 10px; }
.filters .grow { flex: 1; min-width: 220px; }
.pill-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.pill-tabs a { padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid transparent; }
.pill-tabs a:hover { text-decoration: none; background: var(--card-2); }
.pill-tabs a[aria-current="true"] { background: var(--ink-2); color: var(--card); }

/* ——— Fenêtres (modales) et palette ——— */
dialog { border: 0; padding: 0; border-radius: 18px; background: var(--card); color: var(--text); box-shadow: var(--shadow-3); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgb(10 16 28 / .45); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg-head { padding: 20px 22px 4px; display: flex; gap: 14px; align-items: flex-start; }
.dlg-head .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.dlg-head .ic.bad { background: var(--bad-soft); color: var(--bad); }
.dlg-head p { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.dlg-body { padding: 16px 22px; display: grid; gap: 14px; }
.dlg-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.palette { width: min(640px, calc(100vw - 32px)); margin-top: 12vh; }
.palette .p-input { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.palette .p-input input { flex: 1; border: 0; outline: 0; font: 500 16px "Inter", sans-serif; background: transparent; color: var(--ink); }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow: auto; }
.palette li a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.palette li a:hover, .palette li a.active { background: var(--brand-soft); text-decoration: none; }
.palette li .t { font-size: 11px; font-weight: 700; color: var(--brand-strong); text-transform: uppercase; letter-spacing: .05em; width: 64px; flex: none; }
.palette li b { color: var(--ink); font-weight: 600; } .palette li small { color: var(--muted); display: block; font-size: 12px; }
.palette .p-foot { padding: 10px 18px; border-top: 1px solid var(--line); display: flex; gap: 16px; font-size: 12px; color: var(--muted); }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 100; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px; padding: 12px 14px 12px 16px; border-radius: 12px; background: var(--ink-2); color: var(--card);
  box-shadow: var(--shadow-3); animation: toast-in .28s var(--ease); font-weight: 500; }
:root[data-theme="dark"] .toast { background: #e2e8f0; color: #0f172a; }
.toast .icon { color: #34d399; } .toast.error .icon { color: #f87171; }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 4px; }
.toast.out { animation: toast-out .2s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ——— Connexion ——— */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-art { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 10% 110%, rgb(0 140 206 / .55), transparent 60%), radial-gradient(800px 500px at 110% -10%, rgb(0 140 206 / .35), transparent 55%), #0f172a;
  color: #e2e8f0; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art .wordmark { color: #fff; font-size: 34px; }
.auth-art h2 { color: #fff; font-size: 34px; line-height: 1.15; font-weight: 700; max-width: 14ch; letter-spacing: -.03em; }
.auth-art p { color: #94a3b8; margin-top: 14px; max-width: 42ch; }
.auth-art .grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgb(255 255 255 / .04) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .04) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); pointer-events: none; }
.auth-art > * { position: relative; }
.auth-panel { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.auth-card { width: min(400px, 100%); }
.auth-card h1 { font-size: 24px; }
.auth-card .sub { color: var(--muted); margin: 8px 0 26px; }
.otp { letter-spacing: .5em; text-align: center; font: 600 24px/1 ui-monospace, monospace !important; padding: 14px !important; }
.qr { width: 196px; height: 196px; padding: 12px; background: #fff; border-radius: 14px; border: 1px solid var(--line); margin: 0 auto; }
.qr svg { width: 100%; height: 100%; display: block; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px; background: var(--card-2); border: 1px dashed var(--line-strong); border-radius: 12px; font: 600 15px ui-monospace, monospace; color: var(--ink); text-align: center; }

/* ——— Erreur ——— */
.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.error-page .code { font-size: 80px; font-weight: 800; letter-spacing: -.05em; color: var(--line-strong); line-height: 1; }

/* ——— Téléphone et tablette ——— */
@media (max-width: 1080px) { .split { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 60; inset: 0 auto 0 0; width: 280px; transform: translateX(-105%); transition: transform .24s var(--ease); box-shadow: var(--shadow-3); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgb(10 16 28 / .4); z-index: 50; }
  .menu-btn { display: inline-flex; }
  .top { padding: 10px 16px; } .content { padding: 4px 16px 80px; }
  .search-btn kbd { display: none; }
  .g2, .g3, .row2, .row3 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; }
  h1 { font-size: 22px; }
  .t .hide-sm { display: none; }
  .bar-row { grid-template-columns: 100px 1fr 30px; }
}
@media (pointer: coarse) { :root { --target: 46px; } .input { font-size: 16px; } .btn-sm { min-height: 40px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .side, .top, .actions, .toasts { display: none !important; } .shell { display: block; } .card { box-shadow: none; } }
.palette .p-empty { padding: 14px 12px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ——— Ajustements après revue des captures ——— */
.wordmark { display: inline-block; }
.wordmark i { bottom: 3px; width: 5px; height: 5px; }
.wordmark i:nth-of-type(1) { left: 6px; } .wordmark i:nth-of-type(2) { right: 6px; left: auto; }
.auth-art .wordmark { align-self: flex-start; }
.auth-art .wordmark i { width: 7px; height: 7px; bottom: 4px; }
.auth-art .wordmark i:nth-of-type(1) { left: 8px; } .auth-art .wordmark i:nth-of-type(2) { right: 8px; }
.top .menu-btn { display: none; }
.kpi { display: flex; flex-direction: column; }
.kpi .value { line-height: 1.1; }
.kpi .hint { margin-top: 6px; }
a.kpi, a.kpi:hover { text-decoration: none; color: inherit; }
.seg { justify-self: start; }
.choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
h1.mono { font-size: 24px; letter-spacing: -.01em; }
h2.mono { font-size: 16px; }
.facts { background: transparent; gap: 0; }
.facts > div { box-shadow: inset -1px -1px 0 var(--line); }
.search-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tile-link { transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast) var(--ease); color: inherit; }
.tile-link:hover { text-decoration: none; }
@media (max-width: 1080px) { .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .top .menu-btn { display: inline-flex; }
  .choices { grid-template-columns: 1fr; }
  .top .btn-primary span { display: none; }
  .top .btn-primary { width: var(--target); padding: 0; }
}
.grid > .card + .card, .split > .card + .card { margin-top: 0; }
dl.facts { margin: 0; }
/* Logo officiel ALMA (alma-agency.com) : traits en couleur du texte, points bleus */
.logo { display: block; height: 30px; width: auto; color: var(--ink); }
.brand small { margin-top: 8px; }
.auth-logo { color: #fff; align-self: flex-start; } .auth-logo .logo { height: 44px; color: #fff; }

/* ——— Espace clients (1.3.0) : mêmes jetons, quelques pièces en plus ——— */
.small { font-size: 12.5px; }
.center { text-align: center; }
.spacer { flex: 1; }
.narrow { max-width: 560px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--text); cursor: pointer; }
.check input { accent-color: var(--brand); width: 17px; height: 17px; margin: 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-panel { position: relative; }
.lang-switch { position: absolute; top: 20px; right: 24px; display: flex; gap: 4px; align-items: center; }
.lang-switch a { padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang-switch a[aria-current="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.lang-switch a:hover { text-decoration: none; color: var(--ink); }
.auth-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 18px; }
.auth-icon .icon { width: 24px; height: 24px; }
.auth-icon.bad { background: var(--bad-soft); color: var(--bad); }
.auth-alt { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 8px; }
.auth-legal { position: absolute; bottom: 18px; font-size: 12px; color: var(--faint); }
.auth-legal a { color: var(--muted); }
.art-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.art-points li { display: flex; gap: 12px; align-items: center; color: #cbd5e1; font-weight: 500; }
.art-points .icon { color: #59bdee; }
.support-bar { position: sticky; top: 0; z-index: 70; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px;
  background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-weight: 600; font-size: 13.5px; }
.support-bar .icon { color: var(--warn); }
.switcher { display: flex; align-items: center; gap: 10px; margin: 0 4px 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); color: var(--ink); }
.switcher:hover { text-decoration: none; border-color: var(--line-strong); }
.switcher > .icon { color: var(--muted); }
.switcher span { flex: 1; min-width: 0; }
.switcher b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher small { display: block; font-size: 11.5px; color: var(--muted); }
.top-title { font-weight: 650; color: var(--ink); display: none; }
.foot { display: flex; gap: 18px; flex-wrap: wrap; padding: 18px 32px 28px; font-size: 12.5px; color: var(--muted); margin-top: auto; }
.foot a { color: var(--muted); }
.hero-mark.sm { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.hero-mark.sm .icon { width: 19px; height: 19px; }
.lic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.lic-card { display: grid; gap: 16px; padding: 20px; color: var(--text); transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast) var(--ease); }
.lic-card:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.lic-card.is-off { opacity: .66; }
.lic-top { display: flex; gap: 12px; align-items: center; }
.lic-name { flex: 1; min-width: 0; }
.lic-name b { display: block; color: var(--ink); font-size: 15.5px; font-weight: 650; }
.lic-name small { color: var(--muted); font-size: 12.5px; }
.lic-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.lic-facts dt { font-size: 11.5px; color: var(--muted); }
.lic-facts dd { margin: 2px 0 0; color: var(--ink); font-weight: 600; font-size: 13.5px; }
.lic-more { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; color: var(--brand-strong); border-top: 1px solid var(--line); padding-top: 12px; }
.lic-more > span:last-child { display: inline-flex; gap: 4px; align-items: center; }
.help-card { display: flex; gap: 16px; align-items: center; margin-top: 18px; }
.help-card .hero-mark { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.keybox-actions { display: grid; gap: 8px; align-content: start; }
.mod-list { list-style: none; margin: 0; padding: 8px 22px 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 18px; }
.mod-list li { display: grid; grid-template-columns: 20px 1fr; gap: 0 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.mod-list li .icon { grid-row: span 2; width: 18px; height: 18px; margin-top: 2px; }
.mod-list li.on .icon { color: var(--ok); }
.mod-list li.off { color: var(--faint); }
.mod-list li.on span { color: var(--ink); font-weight: 600; }
.mod-list small { font-size: 12px; color: var(--muted); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); }
.choices.one-col { grid-template-columns: 1fr; }
.sec-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.sec-row:last-of-type { border-bottom: 0; }
.sec-row .ti { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); }
.sec-row b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.sec-row small { color: var(--muted); font-size: 12.5px; }
.dev { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.howto { margin: 0 0 18px; padding-left: 20px; display: grid; gap: 6px; color: var(--text); }
.qr + p { margin: 12px 0 18px; }
.choose-list { display: grid; gap: 10px; max-width: 560px; }
.choose-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 16px 18px; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.choose-item span:not(.hero-mark) { flex: 1; }
.choose-item b { display: block; color: var(--ink); font-size: 15px; }
.choose-item small { color: var(--muted); }
.choose-item.current { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.dlg-foot .spacer { flex: 1; }
@media (max-width: 860px) {
  .top-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .foot { padding: 16px 16px 90px; }
  .lic-grid { grid-template-columns: 1fr; }
  .keybox { flex-direction: column; }
  .keybox-actions { grid-auto-flow: column; }
  .lang-switch { top: 12px; right: 12px; }
  .auth-legal { position: static; margin-top: 28px; text-align: center; }
  .sec-row { grid-template-columns: 34px 1fr; } .sec-row > :last-child { grid-column: 2; justify-self: start; }
}
.note.inset { margin: 14px 22px 0; } .note .actions { margin-top: 8px; }
.lic-grid > .card, .choose-list .card { margin-top: 0; } .lic-grid { align-items: stretch; }
.me .avatar { display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; max-width: none; overflow: visible; }
