/* ============================================================
   Vorellis — direction D « Clarté × Pantagram »
   Système de design de l'interface. Remplace Pico CSS et l'ancien app.css.
   Jetons : docs/maquettes/assets/vorellis.css.
   ============================================================ */
:root {
  --vx-font-sans: "Urbanist", system-ui, sans-serif;
  --vx-font-mono: "JetBrains Mono", ui-monospace, monospace;
  --vx-h1: 56px;
  --vx-h2: 22px;
  --vx-kpi: 42px;
  --vx-body: 15px;
  --vx-small: 13px;
  --vx-mono-label: 11px;

  --vx-ink: #111111;
  --vx-ink-2: #1E1E1E;
  --vx-paper: #FFFFFF;
  --vx-muted: #5C5C57;
  --vx-subtle: #F1F1EF;
  --vx-border: #E6E6E2;
  --vx-dashed: #DADAD5;
  --vx-blue: #3D2BFF;
  --vx-blue-hover: #2F1FE0;
  --vx-yellow: #FFC93C;
  --vx-lilac: #E9E4F7;
  --vx-lilac-2: #C9C1FF;
  --vx-green: #3BD27A;
  --vx-orange: #FF4B1F;
  --vx-danger-text: #B3300A;
  --vx-sidebar-muted: #9A9A95;
  --vx-sidebar-text: #D6D6D2;

  --vx-radius-card: 24px;
  --vx-radius-field: 14px;
  --vx-radius-pill: 999px;
  --vx-radius-tag: 4px;

  --vx-sidebar-w: 248px;
  --vx-sidebar-w-collapsed: 76px;
  --vx-page-pad: 32px;
  --vx-gap: 16px;
  --vx-control-h: 42px;
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--vx-paper); color: var(--vx-ink);
  font-family: var(--vx-font-sans); font-size: var(--vx-body); font-weight: 500; line-height: 1.45;
}
a { color: var(--vx-ink); text-decoration: none; }
a:hover { color: var(--vx-blue); }
button { cursor: pointer; font: inherit; color: inherit; }
img, svg { vertical-align: middle; }
:focus-visible { outline: 3px solid var(--vx-blue); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
code, kbd, pre, .mono { font-family: var(--vx-font-mono); }
code { font-size: .9em; background: var(--vx-subtle); padding: 1px 5px; border-radius: 4px; }
pre { margin: 0; }
hr { border: 0; border-top: 1.5px solid var(--vx-border); margin: 0; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.vx-icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vx-icon--sm { width: 16px; height: 16px; }
.vx-icon--lg { width: 22px; height: 22px; }

/* ── Mise en page ─────────────────────────────────────────── */
.vx-app { display: flex; min-height: 100vh; }
.vx-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.vx-page {
  padding: 12px var(--vx-page-pad) 48px; display: flex; flex-direction: column; gap: 28px;
  max-width: 1240px; width: 100%;
}
.vx-page--wide { max-width: none; }

/* ── Barre latérale ───────────────────────────────────────── */
.vx-sb {
  position: sticky; top: 0; height: 100vh; flex: none; width: var(--vx-sidebar-w);
  background: var(--vx-ink); color: var(--vx-paper);
  padding: 20px 14px; display: flex; flex-direction: column; gap: 22px;
  overflow-y: auto; overflow-x: hidden; transition: width .2s ease, padding .2s ease;
  scrollbar-width: thin; scrollbar-color: #333 transparent;
}
.vx-sb-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 0 4px 0 10px; }
.vx-brand { display: flex; align-items: baseline; color: var(--vx-paper); }
.vx-brand:hover { color: var(--vx-paper); }
.vx-brand-word { font-weight: 900; font-size: 26px; letter-spacing: -0.04em; line-height: 1; }
.vx-brand-short { display: none; }
.vx-brand-dot { width: 8px; height: 8px; border-radius: 99px; background: var(--vx-blue); margin-left: 3px; }
.vx-sb-toggle {
  width: 36px; height: 36px; border: 0; border-radius: 999px; background: var(--vx-ink-2);
  color: var(--vx-sidebar-text); display: flex; align-items: center; justify-content: center; flex: none;
}
.vx-sb-toggle:hover { color: var(--vx-paper); }
.vx-sb-toggle .vx-icon { width: 18px; height: 18px; }
.vx-sb-toggle .when-collapsed { display: none; }
.vx-nav { display: flex; flex-direction: column; gap: 16px; }
.vx-nav-group { display: flex; flex-direction: column; gap: 3px; }
.vx-nav-label {
  font-family: var(--vx-font-mono); font-size: 11px; color: var(--vx-sidebar-muted);
  padding: 0 12px 6px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.vx-nav-sep { display: none; height: 1px; background: #2A2A2A; margin: 0 10px 8px; }
.vx-nav-link {
  position: relative; display: flex; align-items: center; gap: 11px; height: 42px; border-radius: 999px;
  font-size: 15px; font-weight: 700; padding: 0 12px; color: var(--vx-sidebar-text); white-space: nowrap;
}
.vx-nav-link:hover { color: var(--vx-paper); background: var(--vx-ink-2); }
.vx-nav-link.is-active { background: var(--vx-blue); color: var(--vx-paper); }
.vx-nav-text { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.vx-nav-count { font-size: 12px; font-weight: 800; background: var(--vx-yellow); color: var(--vx-ink); border-radius: 999px; padding: 1px 8px; }
.vx-nav-dot { display: none; position: absolute; top: 7px; right: 9px; width: 8px; height: 8px; border-radius: 99px; background: var(--vx-yellow); border: 2px solid var(--vx-ink); }
.vx-sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.vx-sb-profile {
  display: flex; align-items: center; gap: 10px; border-radius: 16px; padding: 12px; background: var(--vx-ink-2);
  color: var(--vx-paper); min-width: 0;
}
.vx-sb-profile:hover { color: var(--vx-paper); background: #262626; }
.vx-sb-avatar {
  width: 34px; height: 34px; border-radius: 999px; background: var(--vx-yellow); color: var(--vx-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 900; flex: none;
}
.vx-sb-who { display: flex; flex-direction: column; min-width: 0; }
.vx-sb-who b { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-sb-who small { font-family: var(--vx-font-mono); font-size: 11px; color: var(--vx-sidebar-muted); }
.vx-sb-logout {
  display: flex; align-items: center; gap: 11px; height: 38px; border: 0; border-radius: 999px; padding: 0 12px;
  background: transparent; color: var(--vx-sidebar-muted); font-size: 14px; font-weight: 700; width: 100%;
}
.vx-sb-logout:hover { color: var(--vx-paper); background: var(--vx-ink-2); }

/* Barre repliée (classe posée sur <html> avant le rendu) */
html.sidebar-collapsed .vx-sb { width: var(--vx-sidebar-w-collapsed); padding: 20px 0; }
html.sidebar-collapsed .vx-sb-head { flex-direction: column; padding: 0; }
html.sidebar-collapsed .vx-brand-word { display: none; }
html.sidebar-collapsed .vx-brand-short { display: inline; }
html.sidebar-collapsed .vx-sb-toggle .when-expanded { display: none; }
html.sidebar-collapsed .vx-sb-toggle .when-collapsed { display: block; }
html.sidebar-collapsed .vx-nav-label { display: none; }
html.sidebar-collapsed .vx-nav-sep { display: block; }
html.sidebar-collapsed .vx-nav-link { justify-content: center; width: 44px; padding: 0; margin: 0 auto; }
html.sidebar-collapsed .vx-nav-text,
html.sidebar-collapsed .vx-nav-count { display: none; }
html.sidebar-collapsed .vx-nav-dot { display: block; }
html.sidebar-collapsed .vx-sb-profile { width: 52px; padding: 9px; margin: 0 auto; justify-content: center; }
html.sidebar-collapsed .vx-sb-who { display: none; }
html.sidebar-collapsed .vx-sb-logout { width: 44px; padding: 0; margin: 0 auto; justify-content: center; }
html.sidebar-collapsed .vx-sb-logout span { display: none; }

/* ── Barre supérieure ─────────────────────────────────────── */
.vx-topbar { display: flex; align-items: center; gap: 10px; padding: 18px var(--vx-page-pad); flex-wrap: wrap; position: relative; }
.vx-search-btn {
  flex: 0 1 420px; height: 42px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border: 0;
  border-radius: 999px; background: var(--vx-subtle); color: var(--vx-muted); font-size: 15px; font-weight: 600;
}
.vx-search-btn:hover { color: var(--vx-ink); }
.vx-search-btn span { flex: 1; text-align: left; }
.vx-kbd { font-family: var(--vx-font-mono); font-size: 11px; background: var(--vx-paper); border-radius: 6px; padding: 2px 6px; color: var(--vx-ink); }
.vx-topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; position: relative; }
.vx-icon-btn {
  position: relative; width: 42px; height: 42px; border: 0; border-radius: 999px; background: var(--vx-subtle);
  color: var(--vx-ink); display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.vx-icon-btn:hover { background: var(--vx-border); color: var(--vx-ink); }
.vx-icon-btn-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 99px; background: var(--vx-orange); }
.vx-menu {
  position: absolute; top: 50px; right: 0; width: 260px; background: var(--vx-paper); border: 1.5px solid var(--vx-border);
  border-radius: 20px; box-shadow: 0 18px 40px rgba(17,17,17,.12); padding: 8px; z-index: 40; display: flex; flex-direction: column;
}
.vx-menu--wide { width: 340px; }
.vx-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 0 12px;
  border-radius: 12px; color: var(--vx-ink); font-weight: 700; font-size: 15px; border: 0; background: transparent; text-align: left; width: 100%;
}
.vx-menu-item:hover, .vx-menu-item:focus-visible { background: var(--vx-subtle); color: var(--vx-ink); }
.vx-menu-item kbd { font-family: var(--vx-font-mono); font-size: 11px; color: var(--vx-muted); }
.vx-menu-item small { display: block; font-family: var(--vx-font-mono); font-size: 11px; color: var(--vx-muted); font-weight: 400; }
.vx-menu-note { padding: 10px 12px; color: var(--vx-muted); font-size: 14px; }
.vx-menu-title { padding: 8px 12px 4px; font-family: var(--vx-font-mono); font-size: 11px; color: var(--vx-muted); text-transform: uppercase; }

/* Recherche globale */
.vx-dialog {
  border: 0; padding: 0; border-radius: var(--vx-radius-card); width: min(640px, calc(100vw - 32px));
  box-shadow: 0 30px 80px rgba(17,17,17,.25); color: var(--vx-ink); background: var(--vx-paper);
}
.vx-dialog::backdrop { background: rgba(17,17,17,.4); }
.vx-dialog--search { margin-top: 12vh; }
.vx-dialog-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.vx-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vx-search-field { display: flex; align-items: center; gap: 10px; padding: 0 18px; height: 56px; border-bottom: 1.5px solid var(--vx-border); }
.vx-search-field input[type="search"] { flex: 1; min-height: 0; border-radius: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 600; height: 100%; padding: 0; }
.vx-search-field input[type="search"]:focus { background: transparent; }
.vx-search-results { max-height: 60vh; overflow-y: auto; padding: 8px; }
.vx-search-group { padding: 6px 0; }
.vx-search-hit { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.vx-search-hit:hover, .vx-search-hit:focus-visible, .vx-search-hit.is-active { background: var(--vx-subtle); color: var(--vx-ink); }
.vx-search-hit b { font-weight: 700; }
.vx-search-hit .vx-meta { margin-left: auto; }

/* ── En-tête de page ──────────────────────────────────────── */
.vx-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.vx-head-main { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.vx-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vx-tag { font-family: var(--vx-font-mono); font-size: 12px; background: var(--vx-ink); color: var(--vx-paper); padding: 4px 9px; border-radius: var(--vx-radius-tag); }
.vx-h1 { margin: 0; font-weight: 900; font-size: var(--vx-h1); line-height: 1.05; letter-spacing: -0.045em; overflow-wrap: anywhere; }
.vx-h1--xl { font-size: 64px; line-height: 1.12; }
.vx-hl { background: var(--vx-yellow); padding: 0 14px 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.vx-lede { color: var(--vx-muted); font-size: 17px; max-width: 760px; }
.vx-back { font-weight: 700; font-size: 14px; color: var(--vx-muted); align-self: flex-start; }
.vx-back:hover { color: var(--vx-ink); }

/* ── Indicateurs ──────────────────────────────────────────── */
.vx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--vx-gap); }
.vx-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vx-kpi {
  border-radius: var(--vx-radius-card); padding: 22px; display: flex; flex-direction: column; gap: 10px;
  min-height: 172px; background: var(--vx-subtle); color: var(--vx-ink);
}
.vx-kpi--sm { min-height: 0; }
.vx-kpi--blue { background: var(--vx-blue); color: var(--vx-paper); }
.vx-kpi--yellow { background: var(--vx-yellow); }
.vx-kpi--ink { background: var(--vx-ink); color: var(--vx-paper); }
.vx-kpi--lilac { background: var(--vx-lilac); }
.vx-kpi--green { background: var(--vx-green); }
.vx-kpi--orange { background: var(--vx-orange); }
.vx-kpi--line { background: var(--vx-paper); border: 1.5px solid var(--vx-border); }
.vx-kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vx-kpi-label { font-weight: 700; }
.vx-kpi-pill { font-size: 12px; font-weight: 700; border: 1.5px solid currentColor; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.vx-kpi-value { margin-top: auto; font-weight: 900; font-size: var(--vx-kpi); letter-spacing: -0.04em; line-height: 1; white-space: nowrap; }
.vx-kpi--sm .vx-kpi-value { font-size: 34px; margin-top: 4px; }
.vx-kpi-value small { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.vx-kpi-note { font-family: var(--vx-font-mono); font-size: 12px; }
.vx-kpi--ink .vx-kpi-note { color: #C8C8C4; }
.vx-kpi-bar { height: 6px; border-radius: 99px; background: rgba(17,17,17,.15); overflow: hidden; }
.vx-kpi-bar > div { height: 100%; background: var(--vx-ink); }

/* ── Cartes ───────────────────────────────────────────────── */
.vx-card { border: 1.5px solid var(--vx-border); border-radius: var(--vx-radius-card); background: var(--vx-paper); min-width: 0; }
.vx-card--muted { background: var(--vx-subtle); border-color: transparent; }
.vx-card--pad { padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.vx-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 20px 22px 14px; }
.vx-card--pad > .vx-card-head { padding: 0; }
.vx-h2 { margin: 0; font-size: var(--vx-h2); font-weight: 900; letter-spacing: -0.03em; line-height: 1.15; }
.vx-h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.vx-card-foot { padding: 14px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--vx-subtle); }
.vx-list-row { display: flex; gap: 12px; padding: 10px 0; align-items: center; border-top: 1px solid var(--vx-subtle); min-width: 0; }
.vx-list-row--top { align-items: flex-start; }
.vx-card-body { padding: 0 22px 20px; display: flex; flex-direction: column; gap: 12px; }

/* ── Grilles utilitaires ──────────────────────────────────── */
.vx-grid-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--vx-gap); align-items: start; }
.vx-grid-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 20px; align-items: start; }
.vx-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--vx-gap); }
.vx-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--vx-gap); }
.vx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--vx-gap); align-content: start; }
.vx-stack { display: flex; flex-direction: column; gap: var(--vx-gap); min-width: 0; }
.vx-stack--sm { gap: 8px; }
.vx-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vx-row--between { justify-content: space-between; }
.vx-row--end { justify-content: flex-end; }
.vx-grow { flex: 1 1 auto; min-width: 0; }
.vx-muted { color: var(--vx-muted); }
.vx-meta { font-family: var(--vx-font-mono); font-size: 12px; color: var(--vx-muted); }
.vx-strong { font-weight: 800; }
.vx-num { text-align: right; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vx-danger { color: var(--vx-danger-text); }
.vx-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-pre { white-space: pre-wrap; }

/* ── Tableaux ─────────────────────────────────────────────── */
.vx-table-wrap { overflow-x: auto; }
.vx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vx-table th {
  font-family: var(--vx-font-mono); font-weight: 400; font-size: 11px; color: var(--vx-muted); text-transform: uppercase;
  padding: 8px 10px; border-bottom: 1.5px solid var(--vx-border); text-align: left; white-space: nowrap;
}
.vx-table td { padding: 12px 10px; border-bottom: 1px solid var(--vx-subtle); vertical-align: middle; }
.vx-table tr > :first-child { padding-left: 22px; }
.vx-table tr > :last-child { padding-right: 22px; }
.vx-table tbody tr:last-child td { border-bottom: 0; }
.vx-table tbody tr:hover td { background: #FAFAF8; }
.vx-table .vx-num, .vx-table th.vx-num { text-align: right; }
.vx-table td.mono, .vx-table .vx-ref { font-family: var(--vx-font-mono); font-size: 13px; color: var(--vx-muted); white-space: nowrap; }
.vx-table a.vx-ref:hover { color: var(--vx-blue); }
.vx-table .vx-actions { text-align: right; white-space: nowrap; }
.vx-table .vx-actions > * + * { margin-left: 6px; }
.vx-table tr.is-muted td { opacity: .55; }
.vx-cell-org { display: flex; align-items: center; gap: 10px; font-weight: 700; min-width: 0; }

/* ── Boutons ──────────────────────────────────────────────── */
.vx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--vx-control-h); padding: 0 18px;
  border: 0; border-radius: 999px; background: var(--vx-subtle); color: var(--vx-ink); font-size: 15px; font-weight: 700;
  white-space: nowrap; text-decoration: none; line-height: 1;
}
.vx-btn:hover { background: var(--vx-border); color: var(--vx-ink); }
.vx-btn:disabled, .vx-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.vx-btn--primary { background: var(--vx-blue); color: var(--vx-paper); }
.vx-btn--primary:hover { background: var(--vx-blue-hover); color: var(--vx-paper); }
.vx-btn--dark { background: var(--vx-ink); color: var(--vx-paper); }
.vx-btn--dark:hover { background: #2A2A2A; color: var(--vx-paper); }
.vx-btn--line { background: transparent; border: 1.5px solid var(--vx-border); }
.vx-btn--line:hover { border-color: var(--vx-ink); background: transparent; }
.vx-btn--white { background: var(--vx-paper); }
.vx-btn--white:hover { background: var(--vx-paper); box-shadow: inset 0 0 0 1.5px var(--vx-ink); }
.vx-btn--danger { background: transparent; color: var(--vx-danger-text); border: 1.5px solid var(--vx-border); }
.vx-btn--danger:hover { background: #FFF1EC; color: var(--vx-danger-text); border-color: var(--vx-orange); }
.vx-btn--sm { height: 34px; padding: 0 14px; font-size: 13px; }
.vx-btn--md { height: 38px; padding: 0 14px; font-size: 14px; }
.vx-btn--lg { height: 46px; padding: 0 22px; }
.vx-btn--icon { width: var(--vx-control-h); padding: 0; }
.vx-btn--sm.vx-btn--icon { width: 34px; }
.vx-btn--md.vx-btn--icon { width: 38px; }
.vx-btn--block { width: 100%; }
.vx-link { font-weight: 700; color: var(--vx-blue); }
.vx-link:hover { text-decoration: underline; }
.vx-inline-form { display: inline; margin: 0; }

/* ── Onglets / segments ───────────────────────────────────── */
.vx-seg { display: inline-flex; gap: 4px; background: var(--vx-subtle); border-radius: 999px; padding: 4px; flex-wrap: wrap; }
.vx-seg > a, .vx-seg > button, .vx-seg > label {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--vx-ink); font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.vx-seg > a:hover, .vx-seg > button:hover, .vx-seg > label:hover { background: rgba(17,17,17,.06); color: var(--vx-ink); }
.vx-seg > [aria-selected="true"], .vx-seg > [aria-checked="true"], .vx-seg > .is-active,
.vx-seg > label:has(input:checked) { background: var(--vx-ink); color: var(--vx-paper); }
.vx-seg > label input { position: absolute; opacity: 0; pointer-events: none; }
.vx-seg-count { font-family: var(--vx-font-mono); font-size: 11px; opacity: .7; }
.vx-seg--white { background: var(--vx-paper); }
.vx-seg--block { display: flex; }
.vx-seg--block > * { flex: 1; justify-content: center; }

.vx-tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--vx-border); overflow-x: auto; }
.vx-tabs > a, .vx-tabs > button {
  display: flex; align-items: center; gap: 6px; height: 46px; padding: 0 14px; border: 0; background: transparent;
  font-size: 15px; font-weight: 700; white-space: nowrap; margin-bottom: -1.5px; color: var(--vx-muted);
  border-bottom: 3px solid transparent;
}
.vx-tabs > a:hover, .vx-tabs > button:hover { color: var(--vx-ink); }
.vx-tabs > [aria-selected="true"] { color: var(--vx-ink); border-bottom-color: var(--vx-blue); }
.vx-tabs .vx-seg-count { color: var(--vx-muted); opacity: 1; }

/* ── Pastilles et étiquettes ──────────────────────────────── */
.vx-pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; border-radius: 999px;
  padding: 3px 10px; background: var(--vx-subtle); color: var(--vx-ink); white-space: nowrap; line-height: 1.35;
}
.vx-pill--lilac { background: var(--vx-lilac); }
.vx-pill--yellow { background: var(--vx-yellow); }
.vx-pill--green { background: var(--vx-green); }
.vx-pill--orange { background: var(--vx-orange); }
.vx-pill--gray { background: var(--vx-subtle); color: var(--vx-muted); }
.vx-pill--blue { background: var(--vx-blue); color: var(--vx-paper); }
.vx-pill--ink { background: var(--vx-ink); color: var(--vx-paper); }
.vx-pill--line { background: transparent; border: 1.5px solid var(--vx-border); }
.vx-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.vx-status::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--vx-dashed); flex: none; }
.vx-status--green::before { background: var(--vx-green); }
.vx-status--yellow::before { background: var(--vx-yellow); }
.vx-status--orange::before { background: var(--vx-orange); }
.vx-status--lilac::before { background: var(--vx-lilac-2); }
.vx-status--blue::before { background: var(--vx-blue); }
.vx-chip {
  display: inline-block; font-family: var(--vx-font-mono); font-size: 11px; background: var(--vx-ink); color: var(--vx-paper);
  border-radius: var(--vx-radius-tag); padding: 3px 7px; white-space: nowrap; text-transform: uppercase; line-height: 1.3;
}
.vx-chip--orange { background: var(--vx-orange); color: var(--vx-ink); }
.vx-chip--yellow { background: var(--vx-yellow); color: var(--vx-ink); }
.vx-chip--gray { background: var(--vx-subtle); color: var(--vx-muted); }
.vx-chip--line { background: transparent; color: var(--vx-muted); border: 1px solid var(--vx-border); }
.vx-chip--plain { text-transform: none; font-size: 12px; }

.vx-avatar {
  width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 13px; background: var(--vx-lilac); color: var(--vx-ink); flex: none; text-transform: uppercase;
}
.vx-avatar--0 { background: var(--vx-yellow); }
.vx-avatar--1 { background: var(--vx-lilac); }
.vx-avatar--2 { background: var(--vx-ink); color: var(--vx-paper); }
.vx-avatar--3 { background: var(--vx-green); }
.vx-avatar--4 { background: var(--vx-blue); color: var(--vx-paper); }
.vx-avatar--lg { width: 64px; height: 64px; border-radius: 20px; font-size: 24px; }
.vx-avatar--round { border-radius: 999px; }

/* ── Formulaires ──────────────────────────────────────────── */
.vx-form { display: flex; flex-direction: column; gap: 14px; }
.vx-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.vx-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vx-form-grid .is-full { grid-column: 1 / -1; }
.vx-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; min-width: 0; }
.vx-field-hint { font-size: 12px; font-weight: 500; color: var(--vx-muted); }
.vx-field-error { font-size: 12px; font-weight: 700; color: var(--vx-danger-text); }
.vx-fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.vx-fieldset > legend { font-size: 13px; font-weight: 700; padding: 0; margin-bottom: 8px; }
.vx-section-title { font-family: var(--vx-font-mono); font-size: 11px; color: var(--vx-muted); text-transform: uppercase; letter-spacing: .04em; }

.vx-input,
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="tel"], input[type="url"], input:not([type]),
select, textarea {
  width: 100%; min-height: 44px; border: 1.5px solid transparent; border-radius: var(--vx-radius-field); padding: 0 12px;
  font: inherit; font-size: 15px; font-weight: 500; background: var(--vx-subtle); color: var(--vx-ink); outline: 0;
}
textarea { padding: 10px 12px; resize: vertical; min-height: 88px; line-height: 1.45; }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
select[multiple] { background-image: none; padding: 8px 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--vx-blue); background-color: var(--vx-paper); }
input::placeholder, textarea::placeholder { color: #8A8A85; }
input[readonly], input:disabled, select:disabled, textarea:disabled { color: var(--vx-muted); cursor: not-allowed; }
.vx-card--muted input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.vx-card--muted select, .vx-card--muted textarea { background-color: var(--vx-paper); }
input.mono, .vx-input.mono { font-family: var(--vx-font-mono); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; margin: 0; accent-color: var(--vx-ink); flex: none; }
input[type="range"] { width: 100%; accent-color: var(--vx-blue); }
input[type="file"] { font: inherit; font-size: 14px; }
.vx-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.vx-input-icon { position: relative; display: flex; align-items: center; }
.vx-input-icon > .vx-icon { position: absolute; left: 14px; color: var(--vx-muted); pointer-events: none; }
.vx-input-icon > input { padding-left: 42px; border-radius: 999px; }

.vx-switch { position: relative; width: 46px; height: 28px; flex: none; }
.vx-switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.vx-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--vx-border); transition: background .15s; pointer-events: none; }
.vx-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 99px; background: var(--vx-paper); transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.vx-switch input:checked + span { background: var(--vx-blue); }
.vx-switch input:checked + span::after { transform: translateX(18px); }
.vx-switch input:focus-visible + span { outline: 3px solid var(--vx-blue); outline-offset: 2px; }

/* Choix en carte (radio) */
.vx-choice { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1.5px solid var(--vx-border); border-radius: 18px; cursor: pointer; background: var(--vx-paper); }
.vx-choice:has(input:checked) { border-color: var(--vx-blue); box-shadow: inset 0 0 0 1.5px var(--vx-blue); }
.vx-choice-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800; font-size: 15px; }
.vx-choice-desc { font-size: 13px; color: var(--vx-muted); font-weight: 500; }

/* ── Liste de définitions ─────────────────────────────────── */
.vx-dl { display: grid; grid-template-columns: minmax(90px, auto) minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.vx-dl dt { font-family: var(--vx-font-mono); font-size: 11px; color: var(--vx-muted); text-transform: uppercase; padding-top: 2px; }
.vx-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ── Alertes et états vides ───────────────────────────────── */
.vx-alert { border-radius: 18px; padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; font-weight: 600; background: var(--vx-subtle); }
.vx-alert--success { background: #DDF7E8; }
.vx-alert--error { background: #FFE3DA; color: #6B1A04; }
.vx-alert--warn { background: #FFF1CC; }
.vx-alert--info { background: var(--vx-lilac); }
.vx-alert b { font-weight: 800; }
.vx-alert-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.vx-banner { background: var(--vx-orange); color: var(--vx-ink); border-radius: var(--vx-radius-card); padding: 22px 24px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.vx-banner .vx-h2 { font-size: 24px; }
.vx-empty { border: 1.5px dashed var(--vx-dashed); border-radius: 18px; padding: 20px; color: var(--vx-muted); font-size: 14px; text-align: center; }
.vx-empty--left { text-align: left; }

/* ── Divers ───────────────────────────────────────────────── */
.vx-details > summary { list-style: none; cursor: pointer; }
.vx-details > summary::-webkit-details-marker { display: none; }
.vx-json { font-family: var(--vx-font-mono); font-size: 12px; line-height: 1.6; background: var(--vx-ink); color: #E8E8E3; border-radius: 18px; padding: 16px; overflow: auto; max-height: 520px; white-space: pre; }
.vx-progress { height: 8px; border-radius: 99px; background: var(--vx-subtle); overflow: hidden; display: flex; }
.vx-progress > span { height: 100%; }
.vx-score { display: flex; gap: 3px; }
.vx-score > span { flex: 1; height: 8px; border-radius: 99px; background: var(--vx-subtle); }
.vx-score > span.is-on { background: var(--vx-blue); }
.vx-score--low > span.is-on { background: var(--vx-orange); }
.vx-score--mid > span.is-on { background: var(--vx-yellow); }
.vx-score--high > span.is-on { background: var(--vx-green); }
.vx-gauge { display: flex; gap: 4px; width: 120px; }
.vx-gauge > span { flex: 1; height: 6px; border-radius: 99px; background: var(--vx-subtle); }
.vx-gauge > span.is-on { background: var(--vx-blue); }
.vx-gauge--done > span.is-on { background: var(--vx-green); }
.vx-gauge--error > span.is-on { background: var(--vx-orange); }
.vx-timeline { display: flex; flex-direction: column; }
.vx-timeline-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--vx-subtle); align-items: baseline; }
.vx-timeline-item:first-child { border-top: 0; }
.vx-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; align-items: end; height: 200px; }
.vx-chart-col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.vx-chart-bars { display: flex; gap: 3px; align-items: flex-end; height: 100%; width: 100%; justify-content: center; }
.vx-chart-bars > div { width: 42%; max-width: 22px; border-radius: 6px 6px 0 0; min-height: 0; }
.vx-chart-val { font-family: var(--vx-font-mono); font-size: 10px; color: var(--vx-muted); height: 14px; white-space: nowrap; }
.vx-chart-axis { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px; border-top: 1.5px solid var(--vx-border); padding-top: 8px; }
.vx-chart-axis span { font-family: var(--vx-font-mono); font-size: 11px; color: var(--vx-muted); text-align: center; }
.vx-chart-axis a { font-family: var(--vx-font-mono); font-size: 11px; color: var(--vx-muted); text-align: center; border-radius: 6px; }
.vx-chart-axis a:hover, .vx-chart-axis a.is-active { color: var(--vx-ink); background: var(--vx-yellow); }
.vx-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.vx-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.vx-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Kanban */
.vx-board { display: grid; grid-template-columns: repeat(5, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.vx-col { border-radius: var(--vx-radius-card); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 380px; background: var(--vx-subtle); }
.vx-col.is-over { box-shadow: inset 0 0 0 2px var(--vx-blue); }
.vx-col-head { display: flex; flex-direction: column; gap: 6px; padding: 4px 4px 6px; }
.vx-col-num { display: flex; justify-content: space-between; align-items: center; }
.vx-col-num > span:first-child { font-family: var(--vx-font-mono); font-size: 12px; }
.vx-col-total { font-weight: 800; font-size: 15px; }
.vx-opp { background: var(--vx-paper); border: 1.5px solid var(--vx-border); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: grab; }
.vx-opp:hover { border-color: var(--vx-ink); }
.vx-opp.is-dragging { opacity: .5; }
.vx-opp.is-closed { opacity: .65; }
.vx-opp-org { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--vx-muted); min-width: 0; }
.vx-opp-org .vx-avatar { width: 24px; height: 24px; border-radius: 8px; font-size: 10px; }
.vx-opp-money { display: flex; justify-content: space-between; align-items: center; }
.vx-opp-next { font-family: var(--vx-font-mono); font-size: 12px; color: var(--vx-muted); }
.vx-opp-next.is-warn { color: var(--vx-danger-text); }
.vx-drop { border: 1.5px dashed var(--vx-dashed); border-radius: 18px; padding: 22px 12px; text-align: center; color: var(--vx-muted); font-size: 13px; }

/* Ligne de tâche */
.vx-task { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--vx-subtle); flex-wrap: wrap; }
.vx-task:first-of-type { border-top: 0; }
.vx-task input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--vx-blue); }
.vx-task-title { flex: 1; min-width: 240px; font-weight: 800; font-size: 16px; }
.vx-task.is-done .vx-task-title { text-decoration: line-through; color: var(--vx-muted); }
.vx-task-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vx-quick-add { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 20px; border: 2px solid var(--vx-ink); border-radius: 999px; }
.vx-quick-add:focus-within { border-color: var(--vx-blue); }
.vx-quick-add input { flex: 1; border: 0 !important; outline: 0; font: inherit; font-size: 16px; font-weight: 600; background: transparent !important; padding: 0; min-height: 0; height: 100%; }

/* Lead */
.vx-lead { border: 1.5px solid var(--vx-border); border-radius: var(--vx-radius-card); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-height: 260px; background: var(--vx-paper); }
.vx-lead.is-closed { opacity: .6; }
.vx-lead-desc { color: var(--vx-muted); font-size: 14px; flex: 1; overflow-wrap: anywhere; }

/* Aperçu facture */
.vx-paper-doc { background: var(--vx-paper); border: 1.5px solid var(--vx-border); border-radius: var(--vx-radius-card); padding: 36px 40px; display: flex; flex-direction: column; gap: 26px; box-shadow: 0 18px 40px rgba(17,17,17,.06); min-width: 0; }
.vx-paper-doc .vx-table tr > :first-child { padding-left: 0; }
.vx-paper-doc .vx-table tr > :last-child { padding-right: 0; }
.vx-totals { display: flex; flex-direction: column; gap: 6px; margin-left: auto; min-width: 260px; }
.vx-totals > div { display: flex; justify-content: space-between; gap: 20px; font-size: 14px; }
.vx-totals > .is-total { background: var(--vx-yellow); border-radius: 12px; padding: 10px 14px; font-weight: 900; font-size: 18px; }

/* Éditeur — sections numérotées */
.vx-step { border: 1.5px solid var(--vx-border); border-radius: var(--vx-radius-card); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.vx-step-title { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 900; letter-spacing: -0.03em; }
.vx-step-num { font-family: var(--vx-font-mono); font-size: 12px; font-weight: 400; background: var(--vx-ink); color: var(--vx-paper); border-radius: 4px; padding: 3px 7px; letter-spacing: 0; }

/* ── Connexion ────────────────────────────────────────────── */
.vx-login { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; }
.vx-login-form { display: flex; flex-direction: column; justify-content: space-between; padding: 40px 56px; gap: 32px; }
.vx-login-form form { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 380px; }
.vx-login-art { position: relative; background: var(--vx-blue); color: var(--vx-paper); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 56px; gap: 18px; }
.vx-login-art p { font-weight: 900; font-size: 72px; line-height: 1.02; letter-spacing: -0.05em; position: relative; }
.vx-login-art .vx-hl { color: var(--vx-ink); }
.vx-login-shape { position: absolute; border-radius: 999px; }

/* ── Messages HTMX ────────────────────────────────────────── */
.htmx-request .vx-hide-on-request { display: none; }
.vx-spinner { display: none; }
.htmx-request .vx-spinner { display: inline-block; }

/* ── Adaptatif ────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .vx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vx-grid-main, .vx-grid-side { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  :root { --vx-page-pad: 18px; --vx-h1: 40px; }
  .vx-h1--xl { font-size: 44px; }
  .vx-app { flex-direction: column; }
  .vx-sb, html.sidebar-collapsed .vx-sb { position: static; height: auto; width: 100%; padding: 14px; gap: 12px; }
  .vx-sb-toggle { display: none; }
  .vx-nav, html.sidebar-collapsed .vx-nav { flex-direction: row; overflow-x: auto; gap: 4px; }
  .vx-nav-group { flex-direction: row; gap: 4px; }
  .vx-nav-label, .vx-nav-sep, html.sidebar-collapsed .vx-nav-sep { display: none; }
  .vx-nav-link, html.sidebar-collapsed .vx-nav-link { width: auto; padding: 0 12px; margin: 0; }
  html.sidebar-collapsed .vx-nav-text { display: inline; }
  .vx-sb-foot { display: none; }
  .vx-grid-2, .vx-grid-3, .vx-form-grid, .vx-form-grid--3, .vx-kpis--3 { grid-template-columns: minmax(0, 1fr); }
  .vx-login { grid-template-columns: 1fr; }
  .vx-login-art { display: none; }
  .vx-login-form { padding: 32px 22px; }
}
@media (max-width: 560px) {
  .vx-kpis { grid-template-columns: minmax(0, 1fr); }
  .vx-search-btn span, .vx-search-btn .vx-kbd { display: none; }
  .vx-search-btn { flex: 0 0 42px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.vx-popover { position: relative; }

/* ── Organisations ── */
.vx-org-toolbar { gap: 10px; }
.vx-org-filter { flex: 1 1 260px; display: flex; min-width: 220px; margin: 0; }
.vx-org-status { margin: 0; }
.vx-org-status select { min-height: 42px; border-radius: 999px; font-weight: 700; font-size: 14px; width: auto; }
.vx-org-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.vx-org-id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.vx-org-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.vx-org-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--vx-gap); }
.vx-org-kpi { background: var(--vx-subtle); border-radius: var(--vx-radius-card); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.vx-org-kpi--late { background: var(--vx-orange); }
.vx-org-kpi-value { font-weight: 900; font-size: 30px; letter-spacing: -0.04em; line-height: 1.1; white-space: nowrap; }
.vx-doc-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--vx-subtle); }
.vx-doc-row:first-child { border-top: 0; }
.vx-doc-row .vx-actions { display: flex; gap: 6px; justify-content: flex-end; }
.vx-org-side .vx-card--pad { gap: 10px; }
.vx-expand > summary { list-style: none; cursor: pointer; }
.vx-expand > summary::-webkit-details-marker { display: none; }
.vx-expand[open] > summary { margin-bottom: 12px; }
@media (max-width: 860px) {
  .vx-org-kpis { grid-template-columns: minmax(0, 1fr); }
  .vx-doc-row { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .vx-doc-row > .vx-doc-amount { grid-column: 2; }
  .vx-doc-row > .vx-actions { grid-column: 3; }
}

/* ── Finance ── */
.vx-period { display: inline-flex; align-items: center; gap: 2px; background: var(--vx-subtle); border-radius: 999px; padding: 4px; }
.vx-period-btn { width: 34px; height: 34px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; color: var(--vx-ink); }
.vx-period-btn:hover { background: rgba(17,17,17,.06); color: var(--vx-ink); }
.vx-period-btn[aria-disabled="true"] { opacity: .3; cursor: default; }
.vx-period-label { font-weight: 800; font-size: 15px; padding: 0 8px; white-space: nowrap; min-width: 48px; text-align: center; }
.vx-fin-kpi { min-height: 160px; gap: 8px; }
.vx-fin-kpi .vx-kpi-value { font-size: 38px; }
.vx-fin-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.vx-fin-chart { height: 170px; gap: 8px; }
.vx-fin-chart .vx-chart-bars > div { border-radius: 5px; width: 38%; max-width: 18px; }
.vx-fin-stack { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: var(--vx-subtle); }
.vx-fin-stack > span { height: 100%; }
.vx-doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 20px; align-items: start; }
.vx-doc-brand { font-weight: 900; font-size: 30px; letter-spacing: -0.04em; line-height: 1; }
.vx-doc-brand span { color: var(--vx-blue); }
.vx-doc-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.vx-doc-block { display: flex; flex-direction: column; gap: 4px; font-size: 14px; min-width: 0; }
.vx-doc-block .vx-section-title { margin-bottom: 2px; }
.vx-doc-title { font-weight: 900; font-size: 28px; letter-spacing: -0.03em; line-height: 1; }
.vx-doc-legal { font-size: 12px; color: var(--vx-muted); border-top: 1px solid var(--vx-subtle); padding-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.vx-pdp-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vx-pdp-action { border: 1.5px solid var(--vx-border); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.vx-pdp-action--danger { border-color: #FFC2B0; background: #FFF6F3; }
.vx-pdp-action form { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.vx-status-bar { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
@media (max-width: 1180px) { .vx-fin-grid, .vx-doc-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .vx-paper-doc { padding: 22px 18px; } .vx-totals { min-width: 0; width: 100%; } }
.vx-table .vx-actions form.vx-inline-form { display: inline-block; vertical-align: middle; }

/* ── Leads / Tâches / Pipeline ── */
select.vx-select-pill { width: auto; min-height: 38px; height: 38px; border-radius: 999px; font-size: 14px; font-weight: 700; padding-left: 14px; }
.vx-details[open] > summary .vx-meta { display: none; }
.vx-details > summary.vx-card-head:hover .vx-h3 { color: var(--vx-blue); }
.vx-lead h2 a:hover { color: var(--vx-blue); }
.vx-lead .vx-meta a { color: inherit; }
.vx-lead .vx-meta a:hover { color: var(--vx-blue); }
.vx-seg > label { position: relative; }

/* ── Administration ── (paramétrage, utilisateurs, clés d'API, profil, connexion) */
.vx-page--narrow { max-width: 1000px; }
.vx-adm-numbering { padding: 24px; display: flex; gap: 28px; flex-wrap: wrap; align-items: stretch; }
.vx-adm-numbering-form { flex: 1 1 340px; gap: 16px; }
.vx-adm-numbering-form .vx-h2 { font-size: 24px; }
.vx-adm-numbering input.mono { height: 46px; }
.vx-adm-next { flex: 1 1 260px; background: var(--vx-yellow); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-width: 0; }
.vx-adm-next-num { font-weight: 900; font-size: 52px; letter-spacing: -0.04em; line-height: 1; word-break: break-all; }
.vx-adm-user { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--vx-subtle); flex-wrap: wrap; }
.vx-adm-user-avatar { width: 44px; height: 44px; font-size: 18px; }
.vx-adm-identity { background: var(--vx-blue); color: var(--vx-paper); border-radius: var(--vx-radius-card); padding: 26px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.vx-adm-identity-avatar { width: 88px; height: 88px; border-radius: 999px; background: var(--vx-yellow); color: var(--vx-ink); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 40px; flex: none; }
.vx-adm-identity-name { font-weight: 900; font-size: 32px; letter-spacing: -0.03em; line-height: 1.1; overflow-wrap: anywhere; }
.vx-adm-pref { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--vx-border); }
.vx-adm-rules { background: var(--vx-ink); color: var(--vx-paper); border-radius: var(--vx-radius-card); padding: 22px 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.vx-adm-rules > div { display: flex; flex-direction: column; gap: 6px; line-height: 1.5; }
.vx-adm-rules code { background: #2A2A2A; color: var(--vx-paper); }
.vx-adm-rule-num { font-family: var(--vx-font-mono); font-size: 12px; color: var(--vx-yellow); }
.vx-adm-created { border-color: var(--vx-blue); border-width: 2px; }
.vx-adm-secret { display: flex; gap: 8px; align-items: center; }
.vx-adm-secret input { flex: 1; font-size: 14px; user-select: all; }
.vx-adm-family { border-top: 1px solid var(--vx-subtle); }
.vx-adm-family-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 22px; }
.vx-adm-family-head::before { content: "▸"; font-size: 12px; color: var(--vx-muted); transition: transform .15s; }
.vx-adm-family[open] > .vx-adm-family-head::before { transform: rotate(90deg); }
.vx-adm-family .vx-table td { padding-top: 8px; padding-bottom: 8px; }

.vx-auth { min-height: 100vh; display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; }
.vx-auth-form { flex: 1 1 420px; display: flex; flex-direction: column; padding: 32px 48px; }
.vx-auth-brand { color: var(--vx-ink); }
.vx-auth-brand .vx-brand-word { font-size: 30px; }
.vx-auth-form form { margin: auto 0; width: 100%; max-width: 400px; gap: 16px; padding: 40px 0; }
.vx-auth-title { font-size: 48px; line-height: 1; margin-bottom: 8px; }
.vx-auth-form input { height: 52px; border-radius: 16px; padding: 0 16px; font-size: 16px; }
.vx-auth-submit { height: 52px; font-size: 16px; margin-top: 6px; }
.vx-auth-art { flex: 1.2 1 480px; min-height: 560px; background: var(--vx-blue); border-radius: 28px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; padding: 48px; color: var(--vx-paper); }
.vx-auth-shape { position: absolute; }
.vx-auth-shape--sun { top: -80px; right: -60px; width: 320px; height: 320px; border-radius: 999px; background: var(--vx-yellow); }
.vx-auth-shape--moon { top: 170px; right: 180px; width: 120px; height: 120px; border-radius: 999px; background: var(--vx-lilac); }
.vx-auth-shape--square { top: 120px; left: 60px; width: 64px; height: 64px; border-radius: 16px; background: var(--vx-ink); }
.vx-auth-tag { position: relative; }
.vx-auth-claim { position: relative; margin-top: 14px; font-weight: 900; font-size: 72px; line-height: .95; letter-spacing: -0.05em; }
.vx-auth-claim span { background: var(--vx-paper); color: var(--vx-ink); padding: 0 14px 6px; }
@media (max-width: 860px) {
  .vx-adm-rules { grid-template-columns: minmax(0, 1fr); }
  .vx-adm-next-num { font-size: 40px; }
  .vx-auth-art { display: none; }
  .vx-auth-form { padding: 24px 12px; }
  .vx-adm-secret { flex-wrap: wrap; }
}
/* ── Organisations (alignement des lignes de documents) ── */
.vx-doc-row { grid-template-columns: 74px minmax(0, 1fr) 150px 100px minmax(120px, auto); }
.vx-doc-row > :nth-child(3) { justify-self: start; }
@media (max-width: 860px) { .vx-doc-row { grid-template-columns: 64px minmax(0, 1fr) auto; } }
.vx-pl-summary { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vx-pl-stat { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--vx-ink); font-size: 14px; font-weight: 700; white-space: nowrap; }
.vx-pl-stat .mono { font-weight: 500; }
.vx-pl-stat--alert { background: var(--vx-orange); border-color: var(--vx-orange); color: var(--vx-ink); }
.vx-pl-stat--ok { border-color: var(--vx-border); color: var(--vx-muted); }
.vx-pl-summary form { margin-left: auto; }
.vx-pboard { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.vx-pcol { display: flex; flex-direction: column; gap: 10px; min-height: 520px; border-radius: 22px; padding: 0 0 12px; transition: box-shadow .12s, background .12s; }
.vx-pcol.is-over { background: var(--vx-subtle); box-shadow: inset 0 0 0 2px var(--vx-blue); }
.vx-pcol-head { border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-height: 132px; }
.vx-pcol-head .vx-h2 { margin-top: auto; }
.vx-pcol-num { font-weight: 900; font-size: 44px; line-height: .9; letter-spacing: -0.05em; }
.vx-pcol--discovery .vx-pcol-head { background: var(--vx-blue); color: var(--vx-paper); }
.vx-pcol--proposal .vx-pcol-head { background: var(--vx-yellow); }
.vx-pcol--negotiation .vx-pcol-head { background: var(--vx-ink); color: var(--vx-paper); }
.vx-pcol--won .vx-pcol-head { background: var(--vx-green); }
.vx-pcol--lost .vx-pcol-head { background: var(--vx-subtle); }
.vx-pcol .vx-drop { font-weight: 700; font-size: 14px; border-width: 2px; }
.vx-pcol .vx-drop.is-hidden { display: none; }
.vx-opp:focus-within, .vx-opp:target { border-color: var(--vx-blue); box-shadow: 0 0 0 3px rgba(61,43,255,.15); }
.vx-opp-title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.vx-opp-amount { font-weight: 900; font-size: 22px; letter-spacing: -0.03em; }
.vx-opp-next { padding-top: 10px; border-top: 1px solid var(--vx-subtle); }
.vx-opp-foot { display: flex; gap: 6px; align-items: center; }
.vx-opp-foot select { min-height: 32px; height: 32px; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 0 30px 0 10px; background-position: right 8px center; background-size: 14px; }
.vx-opp[draggable="true"] { cursor: grab; }
.vx-forecast-bar { height: 8px; border-radius: 99px; background: var(--vx-subtle); overflow: hidden; display: flex; min-width: 120px; }
.vx-forecast-bar > span { display: block; height: 100%; }
@media (max-width: 860px) { .vx-pl-summary form { margin-left: 0; } }
/* Les .sr-only (position absolue) des en-têtes ne doivent pas s'échapper du conteneur défilant. */
.vx-table-wrap { position: relative; }
.vx-adm-fam-count { font-family: var(--vx-font-mono); font-size: 12px; color: var(--vx-muted); }

/* ── Éditeur devis / facture ─────────────────────────────── */
.vx-editor-page { gap: 20px; }
.vx-editor { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.vx-editor [x-cloak] { display: none !important; }
.vx-editor-title { font-size: 52px; line-height: 1; }
.vx-editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; background: var(--vx-subtle);
  border-radius: 18px; padding: 10px 14px; position: relative;
}
.vx-editor-toolbar select, .vx-editor-toolbar input:not([type="checkbox"]) { min-height: 36px; height: 36px; background-color: var(--vx-paper); font-size: 14px; }
.vx-editor-toolbar select { width: auto; min-width: 11rem; }
.vx-editor-inline { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.vx-editor-inline input { max-width: 100%; }
.vx-editor-status { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.vx-editor-status b { color: var(--vx-ink); font-weight: 700; }
.vx-editor-errors { position: relative; }
.vx-editor-errors ul {
  position: absolute; right: 0; top: 42px; z-index: 20; width: min(460px, 86vw); margin: 0; padding: 12px 16px 12px 30px;
  background: var(--vx-paper); border: 1.5px solid var(--vx-orange); border-radius: 18px; box-shadow: 0 18px 40px rgba(17,17,17,.12);
  font-size: 13px; color: var(--vx-danger-text); display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto;
}
.vx-editor-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.vx-editor.is-view-form .vx-editor-body,
.vx-editor.is-view-json .vx-editor-body,
.vx-editor.is-view-preview .vx-editor-body { grid-template-columns: minmax(0, 1fr); }
.vx-editor-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.vx-editor-left > .vx-seg { align-self: flex-start; }
.vx-editor-form { display: flex; flex-direction: column; gap: 12px; }
.vx-editor.is-view-form .vx-editor-form { max-width: 920px; }

.vx-step { gap: 0; padding: 0; }
.vx-step > :not(summary) { margin: 0 20px; }
.vx-step > :not(summary) + :not(summary) { margin-top: 12px; }
.vx-step[open] > :last-child { margin-bottom: 20px; }
.vx-step-summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 18px 20px; cursor: pointer; border-radius: var(--vx-radius-card); }
.vx-step-summary::-webkit-details-marker { display: none; }
.vx-step[open] > .vx-step-summary { padding-bottom: 14px; }
.vx-step-summary .vx-step-title { font-size: 18px; margin: 0; }
.vx-step-summary .vx-step-num { font-size: 11px; padding: 2px 6px; }
.vx-step-hint { font-size: 14px; color: var(--vx-muted); margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.vx-step-toggle {
  display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--vx-subtle);
  font-size: 13px; font-weight: 700; flex: none;
}
.vx-step-toggle::after { content: "Modifier"; }
.vx-step[open] > .vx-step-summary .vx-step-toggle::after { content: "Replier"; }
.vx-step-summary:hover .vx-step-toggle { background: var(--vx-border); }

.vx-editor-search {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border: 2px solid var(--vx-ink); border-radius: 999px;
}
.vx-editor-search:focus-within { border-color: var(--vx-blue); }
.vx-editor-search input[type="search"] { border: 0; background: transparent; min-height: 0; height: 100%; padding: 0; border-radius: 0; }
.vx-editor-search input[type="search"]:focus { background: transparent; }
.vx-editor-results { border: 1.5px solid var(--vx-border); border-radius: 18px; padding: 6px; display: flex; flex-direction: column; max-height: 320px; overflow: auto; }
.vx-editor-results > p { padding: 6px 12px; margin: 0; }
.vx-editor-results .vx-menu-item { min-height: 48px; padding: 6px 12px; }

.vx-lines-head, .vx-lines-row {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr) 38px; gap: 6px; align-items: center;
}
.vx-lines-head { font-family: var(--vx-font-mono); font-size: 11px; color: var(--vx-muted); padding: 0 4px; }
.vx-line { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px solid var(--vx-subtle); }
.vx-line:first-of-type { border-top: 0; }
.vx-lines-row input, .vx-lines-row select, .vx-lines-detail input, .vx-lines-detail textarea { min-height: 40px; border-radius: 10px; font-size: 14px; padding-left: 10px; }
.vx-lines-row select { padding-right: 26px; background-position: right 8px center; }
.vx-lines-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 4fr); gap: 6px; align-items: start; }
.vx-lines-detail textarea { min-height: 40px; padding-top: 9px; }
.vx-lines-detail .vx-line-extra { grid-column: 1 / -1; }
.vx-add-line {
  height: 40px; border: 2px dashed var(--vx-dashed); border-radius: 999px; background: transparent; font-size: 14px; font-weight: 700; color: var(--vx-ink);
}
.vx-add-line:hover { border-color: var(--vx-ink); }

.vx-editor-json textarea {
  width: 100%; height: calc(100vh - 300px); min-height: 480px; resize: vertical; border: 0; border-radius: 18px; padding: 16px;
  font-family: var(--vx-font-mono); font-size: 12.5px; line-height: 1.6; background: var(--vx-ink); color: #E8E8E3; tab-size: 2;
}
.vx-editor-json textarea:focus { background: var(--vx-ink); border: 0; outline: 3px solid var(--vx-blue); outline-offset: 2px; }

.vx-editor-preview {
  position: sticky; top: 16px; background: var(--vx-subtle); border-radius: var(--vx-radius-card); padding: 18px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.vx-editor-preview iframe {
  width: 100%; height: calc(100vh - 140px); min-height: 560px; border: 0; border-radius: 10px; background: var(--vx-paper);
  box-shadow: 0 1px 2px rgba(17,17,17,.06);
}
.vx-editor.is-view-preview .vx-editor-preview { position: static; }
.vx-editor.is-view-preview .vx-editor-preview iframe { max-width: 900px; margin: 0 auto; }

@media (max-width: 1100px) {
  .vx-editor-body { grid-template-columns: minmax(0, 1fr); }
  .vx-editor-preview { position: static; }
}
@media (max-width: 720px) {
  .vx-editor-title { font-size: 40px; }
  .vx-editor-status { margin-left: 0; }
  .vx-lines-head { display: none; }
  .vx-lines-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vx-lines-row > :first-child { grid-column: 1 / -1; }
  .vx-lines-row > button { justify-self: start; }
  .vx-lines-detail { grid-template-columns: minmax(0, 1fr); }
  .vx-step-hint { display: none; }
  .vx-editor-inline { flex-wrap: wrap; }
  .vx-editor-inline input { width: 100% !important; }
}
.vx-pdp-cycle { display: flex; flex-direction: column; gap: 6px; }
.vx-pdp-cycle-label { font-size: 13px; font-weight: 700; }
.vx-gauge--idle > span.is-on { background: var(--vx-dashed); }
.vx-pdp-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 14px; }
.vx-pdp-conn { background: var(--vx-ink); color: var(--vx-paper); border-radius: var(--vx-radius-card); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.vx-pdp-conn .vx-meta { color: #C8C8C4; }
.vx-pdp-conn-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; }
.vx-pdp-conn-state::before { content: ""; width: 10px; height: 10px; border-radius: 99px; background: var(--vx-green); }
.vx-pdp-conn-state.is-off::before { background: var(--vx-sidebar-muted); }
.vx-pdp-conn-state.is-error::before { background: var(--vx-orange); }
.vx-pdp-top .vx-kpi { min-height: 0; padding: 20px 22px; gap: 6px; }
.vx-pdp-top .vx-kpi-value { font-size: 40px; }
@media (max-width: 1180px) { .vx-pdp-top { grid-template-columns: repeat(3, minmax(0, 1fr)); } .vx-pdp-conn { grid-column: 1 / -1; } }
@media (max-width: 560px) { .vx-pdp-top { grid-template-columns: minmax(0, 1fr); } }
.vx-pdp-action .vx-btn { white-space: normal; text-align: center; height: auto; min-height: var(--vx-control-h); padding-top: 8px; padding-bottom: 8px; line-height: 1.2; }
@media (max-width: 560px) { .vx-fin-chart .vx-chart-val { display: none; } }
.vx-step-summary .vx-step-title { white-space: nowrap; }
@media (max-width: 720px) { .vx-step-summary .vx-step-title { white-space: normal; } }

/* ── Offre TPE : bandeau de démo, pages d'invitation et assistant ─────────── */
.vx-demo-band { background: var(--vx-ink, #111); color: #fff; font-weight: 700; font-size: 13px; text-align: center; padding: 8px 16px; }
.vx-wizard-logo { max-height: 64px; max-width: 220px; object-fit: contain; }
