/* ==========================================================================
   NEXORA 2 — Design system
   Charte : noir · blanc · vert. Accent personnalisable par utilisateur (--accent).
   Thèmes : clair / sombre / système. Densité : confortable / compacte.
   ========================================================================== */

@font-face { font-family: 'Geist'; src: url('../fonts/GeistVF.woff2') format('woff2-variations'), url('../fonts/GeistVF.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('../fonts/GeistMonoVF.woff2') format('woff2-variations'), url('../fonts/GeistMonoVF.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --accent: #5EAC31;
  --accent-fg: #0B0C0B;
  --accent-ink: color-mix(in oklab, var(--accent) 70%, #000);
  --accent-hover: color-mix(in oklab, var(--accent) 88%, #000);
  --accent-soft: color-mix(in oklab, var(--accent) 13%, transparent);
  --accent-softer: color-mix(in oklab, var(--accent) 7%, transparent);
  --accent-line: color-mix(in oklab, var(--accent) 35%, transparent);
  --ring: 0 0 0 3px color-mix(in oklab, var(--accent) 26%, transparent);

  --bg: #F5F6F5;
  --bg-glow: radial-gradient(1200px 600px at 100% -10%, color-mix(in oklab, var(--accent) 7%, transparent), transparent 60%);
  --surface: #FFFFFF;
  --surface-2: #F9FAF9;
  --surface-3: #F2F4F2;
  --surface-hover: #F4F6F4;
  --overlay: rgba(8, 10, 8, .52);
  --border: #E5E8E5;
  --border-strong: #D2D8D3;
  --text: #0B0D0B;
  --text-2: #3A423D;
  --muted: #69726C;
  --faint: #9AA39D;
  --inverse: #0B0C0B;
  --inverse-fg: #FFFFFF;

  --success: #16A34A; --success-soft: color-mix(in oklab, #16A34A 12%, transparent);
  --warning: #D97706; --warning-soft: color-mix(in oklab, #D97706 13%, transparent);
  --danger: #DC2626;  --danger-soft: color-mix(in oklab, #DC2626 11%, transparent);
  --info: #2563EB;    --info-soft: color-mix(in oklab, #2563EB 11%, transparent);
  --violet: #9333EA;  --violet-soft: color-mix(in oklab, #9333EA 11%, transparent);
  --gray-soft: color-mix(in oklab, #64748B 12%, transparent);

  --shadow-xs: 0 1px 1px rgba(11, 13, 11, .04);
  --shadow-sm: 0 1px 2px rgba(11, 13, 11, .05), 0 1px 1px rgba(11, 13, 11, .03);
  --shadow-md: 0 6px 18px -6px rgba(11, 13, 11, .10), 0 2px 4px rgba(11, 13, 11, .04);
  --shadow-lg: 0 28px 64px -16px rgba(11, 13, 11, .22), 0 10px 24px -10px rgba(11, 13, 11, .12);
  --shadow-pop: 0 18px 48px -12px rgba(11, 13, 11, .22), 0 0 0 1px rgba(11, 13, 11, .06);

  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 18px; --r-2xl: 24px; --r-full: 999px;

  /* Barre latérale (sombre par défaut, quel que soit le thème) */
  --sb-w: 264px;
  --sb-w-collapsed: 72px;
  --sb-bg: #0A0B0A;
  --sb-bg-2: #0F110F;
  --sb-border: #1B1E1B;
  --sb-text: #E9EDEA;
  --sb-muted: #848D87;
  --sb-faint: #5A625D;
  --sb-hover: #151815;
  --sb-active: color-mix(in oklab, var(--accent) 17%, #0A0B0A);
  --sb-active-text: #FFFFFF;

  --topbar-h: 60px;
  --pad: 24px;
  --gap: 16px;
  --ctl-h: 38px;
  --ctl-h-sm: 32px;
  --row-h: 48px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

html[data-theme="dark"] {
  --accent-ink: color-mix(in oklab, var(--accent) 78%, #fff);
  --accent-hover: color-mix(in oklab, var(--accent) 86%, #fff);
  --accent-soft: color-mix(in oklab, var(--accent) 17%, transparent);
  --accent-softer: color-mix(in oklab, var(--accent) 9%, transparent);
  --bg: #080908;
  --bg-glow: radial-gradient(1100px 560px at 100% -10%, color-mix(in oklab, var(--accent) 9%, transparent), transparent 60%);
  --surface: #101210;
  --surface-2: #141614;
  --surface-3: #1A1D1A;
  --surface-hover: #171A17;
  --overlay: rgba(0, 0, 0, .66);
  --border: #222622;
  --border-strong: #2E332F;
  --text: #F0F3F1;
  --text-2: #C5CCC7;
  --muted: #8C9590;
  --faint: #5F6863;
  --inverse: #F0F3F1;
  --inverse-fg: #0B0C0B;
  --success-soft: color-mix(in oklab, #22C55E 16%, transparent);
  --warning-soft: color-mix(in oklab, #F59E0B 16%, transparent);
  --danger-soft: color-mix(in oklab, #EF4444 16%, transparent);
  --info-soft: color-mix(in oklab, #3B82F6 16%, transparent);
  --violet-soft: color-mix(in oklab, #A855F7 16%, transparent);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 22px -8px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 70px -16px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .04);
  --shadow-pop: 0 20px 50px -12px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
  --sb-bg: #060706;
  --sb-bg-2: #0B0C0B;
  --sb-border: #161916;
  color-scheme: dark;
}

/* Barre latérale claire (préférence « auto » en thème clair) */
html[data-theme="light"][data-sidebar="auto"] {
  --sb-bg: #FFFFFF; --sb-bg-2: #F7F8F7; --sb-border: #E5E8E5; --sb-text: #1B201C; --sb-muted: #6D7670; --sb-faint: #A2AAA4;
  --sb-hover: #F2F4F2; --sb-active: var(--accent-soft); --sb-active-text: var(--text);
}

html[data-density="compact"] { --pad: 18px; --gap: 12px; --ctl-h: 34px; --ctl-h-sm: 28px; --row-h: 40px; }

/* --------------------------------------------------------------------------
   Base
   ----------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font-sans); font-size: 14px; line-height: 1.5; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; font-feature-settings: 'ss01', 'cv11';
}
a { color: inherit; text-decoration: none; }
a.link, .link { color: var(--accent-ink); font-weight: 500; cursor: pointer; }
a.link:hover, .link:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; color: var(--text); }
h1 { font-size: 22px; letter-spacing: -.025em; }
h2 { font-size: 18px; letter-spacing: -.02em; }
h3 { font-size: 15px; }
h4 { font-size: 14px; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .92em; }
::selection { background: color-mix(in oklab, var(--accent) 30%, transparent); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.nx-icon { flex: none; width: 18px; height: 18px; stroke-width: 1.75; }
.i-xs { width: 13px; height: 13px; } .i-sm { width: 15px; height: 15px; } .i-md { width: 18px; height: 18px; } .i-lg { width: 22px; height: 22px; } .i-xl { width: 28px; height: 28px; }

/* Défilement fin et discret */
.scroll, .nx-scroll { overflow: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: color-mix(in oklab, var(--muted) 35%, transparent) transparent; }
.scroll::-webkit-scrollbar, .nx-scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.scroll::-webkit-scrollbar-thumb, .nx-scroll::-webkit-scrollbar-thumb { background: color-mix(in oklab, var(--muted) 30%, transparent); border-radius: 9px; border: 2px solid transparent; background-clip: padding-box; }
.scroll::-webkit-scrollbar-thumb:hover { background-color: color-mix(in oklab, var(--muted) 50%, transparent); }
.scroll-x { overflow-x: auto; overflow-y: hidden; }

/* --------------------------------------------------------------------------
   Coquille de l'application
   ----------------------------------------------------------------------- */
.app { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); height: 100vh; height: 100dvh; overflow: hidden; transition: grid-template-columns .22s var(--ease); }
html[data-sidebar-collapsed="1"] .app { grid-template-columns: var(--sb-w-collapsed) minmax(0, 1fr); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-glow), var(--bg); }

/* Barre latérale */
.sidebar { position: relative; z-index: 40; display: flex; flex-direction: column; min-height: 0; background: var(--sb-bg); color: var(--sb-text); border-right: 1px solid var(--sb-border); }
.sb-head { display: flex; align-items: center; gap: 11px; height: var(--topbar-h); padding: 0 16px; flex: none; }
.sb-logo { width: 34px; height: 34px; border-radius: 50%; flex: none; background: #fff; object-fit: cover; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent); }
.sb-brand { min-width: 0; line-height: 1.1; }
.sb-brand b { display: block; font-size: 14px; font-weight: 800; letter-spacing: .32em; color: var(--sb-text); }
.sb-brand span { display: block; font-size: 10.5px; color: var(--sb-muted); letter-spacing: .06em; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-toggle {
  position: absolute; top: 20px; right: -13px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); z-index: 45;
  transition: transform .22s var(--ease), background .15s, color .15s;
}
.sb-toggle:hover { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.sb-toggle .nx-icon { width: 14px; height: 14px; transition: transform .22s var(--ease); }
html[data-sidebar-collapsed="1"] .sb-toggle .nx-icon { transform: rotate(180deg); }

.sb-company { margin: 4px 12px 8px; flex: none; }
.sb-company-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--sb-bg-2); border: 1px solid var(--sb-border); color: var(--sb-text); text-align: left; transition: border-color .15s, background .15s; }
.sb-company-btn:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--sb-border)); }
.sb-company-mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--accent-fg); background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 55%, #000)); flex: none; overflow: hidden; }
.sb-company-mark img { width: 100%; height: 100%; object-fit: cover; }
.sb-company-meta { min-width: 0; flex: 1; }
.sb-company-meta b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-company-meta span { display: block; font-size: 11px; color: var(--sb-muted); }

.sb-nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 6px 10px 16px; scrollbar-width: none; }
.sb-nav::-webkit-scrollbar { display: none; }
.sb-group { margin-top: 14px; }
.sb-group:first-child { margin-top: 4px; }
.sb-group-label { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 4px 10px 6px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--sb-faint); background: none; border: 0; }
.sb-group-label:hover { color: var(--sb-muted); }
.sb-group-label .nx-icon { width: 12px; height: 12px; transition: transform .2s; }
.sb-group.closed .sb-group-label .nx-icon { transform: rotate(-90deg); }
.sb-group.closed .sb-items { display: none; }
.sb-items { display: grid; gap: 2px; }
.sb-link {
  position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 10px;
  color: var(--sb-muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: background .14s, color .14s;
}
.sb-link .nx-icon { width: 18px; height: 18px; color: var(--sb-muted); transition: color .14s; }
.sb-link:hover { background: var(--sb-hover); color: var(--sb-text); }
.sb-link:hover .nx-icon { color: var(--sb-text); }
.sb-link.active { background: var(--sb-active); color: var(--sb-active-text); }
.sb-link.active .nx-icon { color: var(--accent); }
.sb-link.active::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.sb-link .sb-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sb-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--accent); color: var(--accent-fg); }
.sb-badge.muted { background: var(--sb-hover); color: var(--sb-muted); }
.sb-foot { flex: none; padding: 10px; border-top: 1px solid var(--sb-border); }
.sb-user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 12px; border: 0; background: transparent; color: var(--sb-text); text-align: left; }
.sb-user:hover { background: var(--sb-hover); }
.sb-user-meta { min-width: 0; flex: 1; }
.sb-user-meta b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-meta span { display: block; font-size: 11.5px; color: var(--sb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

html[data-sidebar-collapsed="1"] .sb-brand,
html[data-sidebar-collapsed="1"] .sb-company-meta,
html[data-sidebar-collapsed="1"] .sb-company-btn > .nx-icon,
html[data-sidebar-collapsed="1"] .sb-label,
html[data-sidebar-collapsed="1"] .sb-badge,
html[data-sidebar-collapsed="1"] .sb-group-label span,
html[data-sidebar-collapsed="1"] .sb-group-label .nx-icon,
html[data-sidebar-collapsed="1"] .sb-user-meta,
html[data-sidebar-collapsed="1"] .sb-user > .nx-icon { display: none; }
html[data-sidebar-collapsed="1"] .sb-head { justify-content: center; padding: 0; }
html[data-sidebar-collapsed="1"] .sb-company { margin: 4px 10px 8px; }
html[data-sidebar-collapsed="1"] .sb-company-btn { justify-content: center; padding: 8px 0; }
html[data-sidebar-collapsed="1"] .sb-link { justify-content: center; padding: 0; }
html[data-sidebar-collapsed="1"] .sb-group-label { justify-content: center; padding: 6px 0; }
html[data-sidebar-collapsed="1"] .sb-group-label::after { content: ''; width: 18px; height: 1px; background: var(--sb-border); }
html[data-sidebar-collapsed="1"] .sb-group.closed .sb-items { display: grid; }
html[data-sidebar-collapsed="1"] .sb-user { justify-content: center; }
html[data-sidebar-collapsed="1"] .sb-link[data-count]::after { content: ''; position: absolute; top: 7px; right: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--sb-bg); }

/* Barre supérieure */
.topbar { position: relative; z-index: 30; display: flex; align-items: center; gap: 12px; height: var(--topbar-h); padding: 0 var(--pad); flex: none; border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--surface) 82%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); }
.tb-menu { display: none; }
.tb-title { min-width: 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.crumbs a:hover { color: var(--text); }
.crumbs .nx-icon { width: 12px; height: 12px; color: var(--faint); }
.tb-title h1 { font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.tb-search { display: flex; align-items: center; gap: 10px; width: min(360px, 32vw); height: 36px; padding: 0 10px 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: 13px; transition: border-color .15s, background .15s; }
.tb-search:hover { border-color: var(--border-strong); background: var(--surface); }
.tb-search span { flex: 1; text-align: left; }
.tb-actions { display: flex; align-items: center; gap: 6px; }
.tb-btn { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); transition: background .14s, border-color .14s, color .14s; }
.tb-btn:hover { background: var(--surface-3); color: var(--text); }
.tb-btn .dot { position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.tb-lang { height: 30px; padding: 0 8px; border-radius: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); }
.tb-avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }

/* Zone de contenu : seuls les listes, tableaux et panneaux défilent. */
.content { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: var(--pad); overflow: hidden; }
.content.legacy { overflow: auto; display: block; }
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap); width: 100%; max-width: 1760px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex: none; flex-wrap: wrap; }
.page-head .ph-text { min-width: 0; }
.page-head h2 { font-size: 22px; font-weight: 700; letter-spacing: -.028em; }
.page-head p { color: var(--muted); margin-top: 4px; font-size: 13.5px; }
.ph-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--gap); }
.fill { flex: 1; min-height: 0; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }

.impersonation-bar { flex: none; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 7px 16px; font-size: 13px; font-weight: 500; background: repeating-linear-gradient(-45deg, #F59E0B, #F59E0B 12px, #FBBF24 12px, #FBBF24 24px); color: #1C1404; }
.impersonation-bar button { border: 0; border-radius: 8px; padding: 4px 12px; background: #1C1404; color: #FDE68A; font-weight: 600; font-size: 12px; }

/* --------------------------------------------------------------------------
   Grilles utilitaires
   ----------------------------------------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.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)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span-all { grid-column: 1 / -1; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.trunc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .text-2 { color: var(--text-2); }
.small { font-size: 12.5px; } .xs { font-size: 11.5px; } .lg { font-size: 15px; }
.strong { font-weight: 600; } .bold { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.accent { color: var(--accent-ink); }
.c-success { color: var(--success); } .c-warning { color: var(--warning); } .c-danger { color: var(--danger); } .c-info { color: var(--info); }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.p-0 { padding: 0 !important; }
.w-full { width: 100%; }

/* --------------------------------------------------------------------------
   Boutons
   ----------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--ctl-h); padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 550; line-height: 1;
  white-space: nowrap; user-select: none; box-shadow: var(--shadow-xs); transition: background .14s, border-color .14s, color .14s, box-shadow .14s, transform .06s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn .nx-icon { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 4px 14px -6px color-mix(in oklab, var(--accent) 70%, transparent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-dark { background: var(--inverse); border-color: var(--inverse); color: var(--inverse-fg); }
.btn-dark:hover { background: color-mix(in oklab, var(--inverse) 85%, var(--accent)); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); box-shadow: none; }
.btn-soft:hover { background: color-mix(in oklab, var(--accent) 20%, transparent); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: color-mix(in oklab, var(--danger) 88%, #000); }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); box-shadow: none; }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { height: var(--ctl-h-sm); padding: 0 11px; font-size: 12.5px; border-radius: 9px; gap: 6px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 14.5px; border-radius: 12px; }
.btn-icon { width: var(--ctl-h); padding: 0; }
.btn-icon.btn-sm { width: var(--ctl-h-sm); }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--muted) transparent var(--muted) transparent; animation: nx-spin .7s linear infinite; }
.btn-primary.loading::after { border-color: var(--accent-fg) transparent var(--accent-fg) transparent; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 10px 0 0 10px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 10px 10px 0; }

/* --------------------------------------------------------------------------
   Formulaires
   ----------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 550; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.field .req { color: var(--danger); }
.hint { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--danger); }
.input, .select, .textarea {
  width: 100%; height: var(--ctl-h); padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-size: 13.5px; outline: none; transition: border-color .14s, box-shadow .14s, background .14s; box-shadow: var(--shadow-xs);
}
.textarea { height: auto; min-height: 92px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: color-mix(in oklab, var(--border-strong) 60%, var(--muted)); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2369726C' 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 10px center; background-size: 16px; }
.input-sm, .select.input-sm { height: var(--ctl-h-sm); font-size: 12.5px; border-radius: 9px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .nx-icon { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.input-group > .input { padding-left: 34px; }
.input-group > .ig-end { position: absolute; right: 6px; display: flex; gap: 4px; }
.input-group .ig-btn { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 7px; }
.input-group .ig-btn:hover { background: var(--surface-3); color: var(--text); }
input[type="color"].input { padding: 4px; width: 46px; }
input[type="date"].input, input[type="datetime-local"].input, input[type="time"].input { padding-right: 8px; }
html[data-theme="dark"] input[type="date"], html[data-theme="dark"] input[type="datetime-local"], html[data-theme="dark"] input[type="time"] { color-scheme: dark; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { padding: 18px 0; border-top: 1px solid var(--border); }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section-title { font-size: 13px; font-weight: 650; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Interrupteur */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 36px; height: 20px; border-radius: 20px; background: var(--border-strong); position: relative; transition: background .18s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }
.switch input:disabled + .track { opacity: .5; }
.switch-label { font-size: 13.5px; }
.switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .sr-text b { display: block; font-weight: 600; font-size: 13.5px; }
.switch-row .sr-text span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* Cases et boutons radio */
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
.check input { appearance: none; width: 17px; height: 17px; margin: 0; border: 1.5px solid var(--border-strong); border-radius: 5px; background: var(--surface); display: grid; place-items: center; flex: none; transition: background .12s, border-color .12s; }
.check input[type="radio"] { border-radius: 50%; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid var(--accent-fg); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input[type="radio"]:checked::after { width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--accent-fg); transform: none; }
.check input:indeterminate { background: var(--accent); border-color: var(--accent); }
.check input:indeterminate::after { content: ''; width: 9px; height: 2px; background: var(--accent-fg); }
.check input:focus-visible { box-shadow: var(--ring); }

/* Cartes de choix */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; transition: border-color .14s, box-shadow .14s, background .14s; }
.choice input { position: absolute; opacity: 0; }
.choice b { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.choice span { font-size: 12px; color: var(--muted); }
.choice:hover { border-color: var(--muted); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-softer); box-shadow: 0 0 0 1px var(--accent) inset; }

/* Segments (choix compact) */
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--border); }
.segmented button, .segmented label { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 550; cursor: pointer; white-space: nowrap; }
.segmented input { display: none; }
.segmented button:hover, .segmented label:hover { color: var(--text); }
.segmented button.active, .segmented label:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.segmented .nx-icon { width: 15px; height: 15px; }

/* Nuancier */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; position: relative; transition: transform .12s; }
.swatch:hover { transform: scale(1.08); }
.swatch.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }

/* --------------------------------------------------------------------------
   Cartes & panneaux
   ----------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); min-width: 0; display: flex; flex-direction: column; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex: none; min-height: 54px; }
.card-head.flat { border-bottom: 0; padding-bottom: 6px; }
.card-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.card-title h3 { font-size: 14px; font-weight: 650; }
.card-title .sub { font-size: 12px; color: var(--muted); font-weight: 450; }
.card-title .ct-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.card-title .ct-icon .nx-icon { width: 16px; height: 16px; }
.card-body { padding: 16px 18px; min-height: 0; }
.card-body.flush { padding: 0; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: none; background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.card.fill { flex: 1; min-height: 0; }
.card.fill > .card-body { flex: 1; min-height: 0; overflow: auto; }
.card.hover { transition: border-color .15s, box-shadow .15s, transform .15s; }
.card.hover:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.panel { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; }
.inset { background: var(--surface-2); border-radius: var(--r-md); padding: 12px 14px; }

/* Cartes indicateurs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; flex: none; }
.kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
a.kpi:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.kpi-icon .nx-icon { width: 16px; height: 16px; }
.kpi-icon.t-danger { background: var(--danger-soft); color: var(--danger); }
.kpi-icon.t-warning { background: var(--warning-soft); color: var(--warning); }
.kpi-icon.t-info { background: var(--info-soft); color: var(--info); }
.kpi-icon.t-violet { background: var(--violet-soft); color: var(--violet); }
.kpi-icon.t-dark { background: var(--inverse); color: var(--inverse-fg); }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.kpi-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.kpi-spark { position: absolute; right: 0; bottom: 0; width: 46%; height: 42px; opacity: .9; pointer-events: none; }
.delta { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 6px; font-weight: 600; font-size: 11.5px; }
.delta.up { color: var(--success); background: var(--success-soft); }
.delta.down { color: var(--danger); background: var(--danger-soft); }

/* Bandeau d'accueil */
.hero { position: relative; overflow: hidden; border-radius: var(--r-2xl); padding: 22px 24px; background: #0A0B0A; color: #fff; border: 1px solid #1B1E1B; flex: none; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 220px at 85% 0%, color-mix(in oklab, var(--accent) 40%, transparent), transparent 70%), radial-gradient(400px 200px at 0% 120%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%); pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 60%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero h2 { color: #fff; font-size: 22px; letter-spacing: -.03em; }
.hero p { color: rgba(255, 255, 255, .66); }
.hero .btn { box-shadow: none; }
.hero .btn:not(.btn-primary) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: #fff; }
.hero .btn:not(.btn-primary):hover { background: rgba(255, 255, 255, .14); }

/* --------------------------------------------------------------------------
   Badges, puces, avatars
   ----------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--gray-soft); color: var(--text-2); line-height: 1; }
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge .nx-icon { width: 12px; height: 12px; }
.badge.b-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge.b-success { background: var(--success-soft); color: var(--success); }
.badge.b-warning { background: var(--warning-soft); color: var(--warning); }
.badge.b-danger { background: var(--danger-soft); color: var(--danger); }
.badge.b-info { background: var(--info-soft); color: var(--info); }
.badge.b-violet { background: var(--violet-soft); color: var(--violet); }
.badge.b-dark { background: var(--inverse); color: var(--inverse-fg); }
.badge.b-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }
.badge-lg { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.pill.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
button.pill { cursor: pointer; }
button.pill:hover { border-color: var(--border-strong); }
.pill .count { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.online { background: #22C55E; box-shadow: 0 0 0 2px var(--surface); }

.avatar { position: relative; width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; overflow: hidden; font-size: 12px; font-weight: 700; color: #fff; background: var(--muted); user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { width: 22px; height: 22px; font-size: 9px; } .avatar.sm { width: 26px; height: 26px; font-size: 10px; } .avatar.md { width: 36px; height: 36px; font-size: 13px; } .avatar.lg { width: 48px; height: 48px; font-size: 16px; } .avatar.xl { width: 84px; height: 84px; font-size: 28px; }
.avatar.square { border-radius: 10px; }
.avatars { display: inline-flex; align-items: center; }
.avatars .avatar { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface); }
.avatars .avatar:first-child { margin-left: 0; }
.avatars .more { margin-left: -7px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: var(--surface-3); color: var(--muted); box-shadow: 0 0 0 2px var(--surface); }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-cell .uc-meta { min-width: 0; }
.user-cell .uc-meta b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-cell .uc-meta span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --------------------------------------------------------------------------
   Progression
   ----------------------------------------------------------------------- */
.progress { position: relative; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; min-width: 60px; }
.progress > span { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, color-mix(in oklab, var(--accent) 75%, #000), var(--accent)); transition: width .5s var(--ease); }
.progress.thin { height: 4px; }
.progress.thick { height: 10px; border-radius: 10px; }
.progress.t-danger > span { background: var(--danger); } .progress.t-warning > span { background: var(--warning); } .progress.t-info > span { background: var(--info); }
.progress-line { display: flex; align-items: center; gap: 10px; }
.progress-line .progress { flex: 1; }
.progress-line .pct { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 38px; text-align: right; }
.ring { --size: 44px; --pct: 0; --stroke: 5px; position: relative; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--pct) * 1%), var(--surface-3) 0); }
.ring::before { content: ''; position: absolute; inset: var(--stroke); border-radius: 50%; background: var(--surface); }
.ring > span { position: relative; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring.lg { --size: 96px; --stroke: 9px; } .ring.lg > span { font-size: 20px; letter-spacing: -.02em; }
.ring.md { --size: 64px; --stroke: 7px; } .ring.md > span { font-size: 14px; }
.stack-bar { display: flex; height: 8px; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.stack-bar > span { height: 100%; }

/* --------------------------------------------------------------------------
   Onglets
   ----------------------------------------------------------------------- */
.tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--border); flex: none; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border: 0; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 550; white-space: nowrap; cursor: pointer; border-radius: 8px 8px 0 0; }
.tab .nx-icon { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab .tab-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--surface-3); color: var(--muted); font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; }
.tab.active .tab-count { background: var(--accent-soft); color: var(--accent-ink); }
.tab-panel { display: none; min-height: 0; }
.tab-panel.active { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.vtabs { display: flex; flex-direction: column; gap: 2px; }
.vtab { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: 10px; color: var(--text-2); font-size: 13.5px; font-weight: 500; border: 0; background: transparent; text-align: left; cursor: pointer; }
.vtab .nx-icon { width: 17px; height: 17px; color: var(--muted); }
.vtab:hover { background: var(--surface-3); color: var(--text); }
.vtab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.vtab.active .nx-icon { color: var(--accent-ink); }
.vtab-group { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); padding: 14px 12px 6px; }
.split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--gap); flex: 1; min-height: 0; }
.split > .split-nav { min-height: 0; overflow: auto; }
.split > .split-main { min-height: 0; display: flex; flex-direction: column; }

/* --------------------------------------------------------------------------
   Tableaux
   ----------------------------------------------------------------------- */
.table-wrap { position: relative; flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { position: sticky; top: 0; z-index: 2; height: 40px; padding: 0 14px; text-align: left; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--text); }
.table th .sort-ind { display: inline-block; margin-left: 4px; opacity: .3; }
.table th.sorted .sort-ind { opacity: 1; color: var(--accent-ink); }
.table td { height: var(--row-h); padding: 8px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-hover); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.selected { background: var(--accent-softer); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td.strong, .table td .t-main { color: var(--text); font-weight: 550; }
.table .t-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.table .col-check { width: 40px; padding-right: 0; }
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.table.compact td { height: 40px; padding: 6px 12px; }
.row-actions { display: inline-flex; gap: 2px; opacity: .55; transition: opacity .12s; }
tr:hover .row-actions { opacity: 1; }
.table-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; flex: none; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); flex: none; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager button { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text-2); font-size: 12.5px; }
.pager button:hover:not(:disabled) { background: var(--surface-3); }
.pager button.active { border-color: var(--border-strong); background: var(--surface); color: var(--text); font-weight: 650; box-shadow: var(--shadow-xs); }
.pager button:disabled { opacity: .35; cursor: default; }
.bulk-bar { display: none; align-items: center; gap: 10px; padding: 8px 14px; background: var(--inverse); color: var(--inverse-fg); border-radius: 12px; font-size: 13px; position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 5; box-shadow: var(--shadow-lg); }
.bulk-bar.show { display: flex; }
.bulk-bar .btn { height: 30px; font-size: 12.5px; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); color: inherit; box-shadow: none; }
html[data-theme="dark"] .bulk-bar .btn { background: rgba(0, 0, 0, .08); border-color: rgba(0, 0, 0, .14); }

/* Listes */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); transition: background .1s; min-width: 0; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover, .list-item.clickable:hover { background: var(--surface-hover); cursor: pointer; }
.list-item .li-main { min-width: 0; flex: 1; }
.list-item .li-title { font-weight: 550; color: var(--text); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-sub { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.list-group-title { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.list-group-title .count { margin-left: auto; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 10px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); font-weight: 500; min-width: 0; word-break: break-word; }

/* Fil d'activité */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item::before { content: ''; position: absolute; left: -19px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.tl-item .tl-time { font-size: 11.5px; color: var(--faint); }
.tl-item .tl-text { font-size: 13px; color: var(--text-2); }

/* --------------------------------------------------------------------------
   États vides, squelettes, alertes
   ----------------------------------------------------------------------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 36px 20px; color: var(--muted); flex: 1; }
.empty-art { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(145deg, var(--accent-soft), transparent); border: 1px solid var(--accent-line); color: var(--accent-ink); margin-bottom: 4px; }
.empty-art .nx-icon { width: 28px; height: 28px; }
.empty h4 { color: var(--text); font-size: 15px; }
.empty p { max-width: 380px; font-size: 13px; }
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 8px; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--surface) 55%, transparent), transparent); animation: nx-shimmer 1.3s infinite; }
.sk-line { height: 12px; margin: 8px 0; }
.sk-row { height: 44px; margin: 8px 16px; }
.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 13px; border: 1px solid transparent; }
.alert .nx-icon { margin-top: 1px; }
.alert b { font-weight: 650; }
.alert.a-info { background: var(--info-soft); color: color-mix(in oklab, var(--info) 80%, var(--text)); border-color: color-mix(in oklab, var(--info) 20%, transparent); }
.alert.a-warning { background: var(--warning-soft); color: color-mix(in oklab, var(--warning) 75%, var(--text)); border-color: color-mix(in oklab, var(--warning) 22%, transparent); }
.alert.a-danger { background: var(--danger-soft); color: color-mix(in oklab, var(--danger) 80%, var(--text)); border-color: color-mix(in oklab, var(--danger) 20%, transparent); }
.alert.a-success { background: var(--success-soft); color: color-mix(in oklab, var(--success) 80%, var(--text)); border-color: color-mix(in oklab, var(--success) 20%, transparent); }
.alert.a-accent { background: var(--accent-softer); color: var(--text-2); border-color: var(--accent-line); }

/* --------------------------------------------------------------------------
   Menus déroulants, info-bulles
   ----------------------------------------------------------------------- */
.dropdown { position: relative; display: inline-flex; }
.menu { position: absolute; z-index: 70; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-pop); display: none; animation: nx-pop .14s var(--ease); }
.menu.open { display: block; }
.menu.menu-right { right: 0; } .menu.menu-up { bottom: calc(100% + 6px); } .menu:not(.menu-up) { top: calc(100% + 6px); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 10px; border-radius: 9px; border: 0; background: transparent; color: var(--text-2); font-size: 13.5px; text-align: left; white-space: nowrap; cursor: pointer; }
.menu-item .nx-icon { width: 16px; height: 16px; color: var(--muted); }
.menu-item:hover, .menu-item.focus { background: var(--surface-3); color: var(--text); }
.menu-item:hover .nx-icon { color: var(--text); }
.menu-item.danger { color: var(--danger); } .menu-item.danger .nx-icon { color: var(--danger); }
.menu-item .kbd { margin-left: auto; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-label { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.menu-head { padding: 10px 10px 8px; display: flex; align-items: center; gap: 10px; }
.kbd { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 6px; border-radius: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); background: var(--surface-3); border: 1px solid var(--border); box-shadow: 0 1px 0 var(--border); }
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; z-index: 90; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 6px 9px; border-radius: 8px;
  background: #0B0C0B; color: #fff; font-size: 12px; font-weight: 500; line-height: 1.3; white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-md); animation: nx-fade .12s;
}
[data-tip-pos="right"]:hover::after { left: calc(100% + 10px); bottom: auto; top: 50%; transform: translateY(-50%); }
[data-tip-pos="bottom"]:hover::after { bottom: auto; top: calc(100% + 8px); }
html:not([data-sidebar-collapsed="1"]) .sidebar [data-tip]:hover::after { display: none; }

/* --------------------------------------------------------------------------
   Modales, tiroirs, palettes
   ----------------------------------------------------------------------- */
.backdrop { position: fixed; inset: 0; z-index: 100; background: var(--overlay); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: nx-fade .16s; }
.modal { width: min(560px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); animation: nx-rise .22s var(--ease); overflow: hidden; }
.modal.sm { width: min(420px, 100%); } .modal.lg { width: min(780px, 100%); } .modal.xl { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; flex: none; }
.modal-head .mh-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.modal-head .mh-icon.t-danger { background: var(--danger-soft); color: var(--danger); }
.modal-head .mh-icon.t-warning { background: var(--warning-soft); color: var(--warning); }
.modal-head h3 { font-size: 16px; font-weight: 650; }
.modal-head p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 4px 20px 18px; overflow: auto; min-height: 0; flex: 1; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); flex: none; }
.modal-foot .left { margin-right: auto; }
.drawer-backdrop { position: fixed; inset: 0; z-index: 95; background: var(--overlay); animation: nx-fade .16s; }
.drawer { position: fixed; z-index: 96; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: nx-slide .26s var(--ease); }
.drawer.md { width: min(560px, 100vw); } .drawer.xl { width: min(960px, 100vw); }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex: none; min-height: 58px; }
.drawer-body { flex: 1; min-height: 0; overflow: auto; }
.drawer-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex: none; background: var(--surface-2); }

.palette { position: fixed; inset: 0; z-index: 120; background: var(--overlay); display: flex; justify-content: center; padding-top: 12vh; animation: nx-fade .14s; }
.palette-box { width: min(640px, calc(100vw - 24px)); max-height: 66vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: nx-rise .18s var(--ease); }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--border); }
.palette-input input { flex: 1; border: 0; outline: none; background: transparent; font-size: 15.5px; }
.palette-input input:focus-visible { box-shadow: none; }
.palette-results { overflow: auto; padding: 6px; }
.palette-group { padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); cursor: pointer; }
.palette-item .pi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; }
.palette-item .pi-icon .nx-icon { width: 15px; height: 15px; }
.palette-item .pi-text { min-width: 0; flex: 1; }
.palette-item .pi-text b { display: block; font-weight: 550; color: var(--text); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item .pi-text span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-item.active { background: var(--accent-softer); }
.palette-item.active .pi-icon { background: var(--accent-soft); color: var(--accent-ink); }
.palette-foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); background: var(--surface-2); }

/* Notifications (liste déroulante) */
.notif-panel { width: 400px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-list { max-height: 420px; overflow: auto; }
.notif-item { display: flex; gap: 11px; padding: 11px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif-item:hover { background: var(--surface-hover); }
.notif-item.unread { background: var(--accent-softer); }
.notif-item .ni-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); }
.notif-item .ni-icon .nx-icon { width: 15px; height: 15px; }
.notif-item .ni-text b { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.notif-item .ni-text span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-item .ni-time { font-size: 11px; color: var(--faint); margin-top: 4px; }

/* Toasts */
.toasts { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 36px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px; border-radius: 14px; background: #0B0C0B; color: #F3F5F4; box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, .08); animation: nx-toast .28s var(--ease); font-size: 13.5px; }
.toast .t-icon { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--accent); color: var(--accent-fg); }
.toast .t-icon .nx-icon { width: 14px; height: 14px; }
.toast.t-error .t-icon { background: #EF4444; color: #fff; }
.toast.t-warning .t-icon { background: #F59E0B; color: #1C1404; }
.toast.t-info .t-icon { background: #3B82F6; color: #fff; }
.toast .t-body { flex: 1; min-width: 0; line-height: 1.45; }
.toast .t-body b { display: block; font-weight: 650; }
.toast .t-close { background: none; border: 0; color: rgba(255, 255, 255, .5); padding: 0; }
.toast.leaving { animation: nx-toast-out .22s forwards; }

/* --------------------------------------------------------------------------
   Sélecteur de personnes / multi-sélection
   ----------------------------------------------------------------------- */
.picker { position: relative; }
.picker-control { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: var(--ctl-h); padding: 4px 8px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); cursor: text; }
.picker-control:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.picker-control input { flex: 1; min-width: 80px; border: 0; outline: none; background: transparent; height: 28px; font-size: 13.5px; }
.picker-chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 3px; border-radius: 8px; background: var(--surface-3); font-size: 12.5px; font-weight: 500; }
.picker-chip button { width: 18px; height: 18px; border: 0; border-radius: 5px; display: grid; place-items: center; background: transparent; color: var(--muted); padding: 0; }
.picker-chip button:hover { background: var(--border); color: var(--text); }
.picker-chip select { border: 0; background: transparent; font-size: 11.5px; color: var(--muted); padding: 0 2px; outline: none; }
.picker-list { position: absolute; z-index: 80; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; padding: 5px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-pop); }
.picker-opt { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.picker-opt:hover, .picker-opt.focus { background: var(--surface-3); }
.picker-opt.selected { color: var(--accent-ink); font-weight: 600; }
.picker-empty { padding: 12px; color: var(--muted); font-size: 12.5px; text-align: center; }

/* Zone de dépôt */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 22px; border: 1.5px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); color: var(--muted); text-align: center; cursor: pointer; transition: border-color .14s, background .14s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-softer); color: var(--text-2); }
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.file-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .03em; flex: none; }

/* --------------------------------------------------------------------------
   Kanban
   ----------------------------------------------------------------------- */
.board { display: flex; gap: 12px; flex: 1; min-height: 0; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; scrollbar-width: thin; }
.board-col { width: 300px; flex: none; display: flex; flex-direction: column; min-height: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-xl); }
.board-col-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; flex: none; }
.board-col-head b { font-size: 13px; font-weight: 650; }
.board-col-head .count { font-size: 11.5px; color: var(--muted); font-weight: 600; background: var(--surface-3); border-radius: 8px; padding: 1px 7px; }
.board-col-body { flex: 1; min-height: 60px; overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.board-col.drag-over { border-color: var(--accent); background: var(--accent-softer); }
.board-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; box-shadow: var(--shadow-xs); cursor: grab; transition: box-shadow .14s, border-color .14s, transform .14s; }
.board-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.board-card.dragging { opacity: .5; transform: rotate(1.5deg); }
.board-card .bc-title { font-size: 13.5px; font-weight: 550; color: var(--text); line-height: 1.35; }
.board-card .bc-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.board-placeholder { height: 4px; border-radius: 4px; background: var(--accent); margin: -2px 0; }

/* --------------------------------------------------------------------------
   Planning (Gantt)
   ----------------------------------------------------------------------- */
.gantt { display: grid; grid-template-columns: 300px minmax(0, 1fr); flex: 1; min-height: 0; border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; background: var(--surface); }
.gantt-left { border-right: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; }
.gantt-right { overflow: auto; position: relative; scrollbar-width: thin; }
.gantt-head { height: 52px; flex: none; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; z-index: 3; }
.gantt-rows-left { overflow: hidden; flex: 1; }
.gantt-row-label { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--border); font-size: 13px; white-space: nowrap; overflow: hidden; }
.gantt-row-label.phase { background: var(--surface-2); font-weight: 650; }
.gantt-grid { position: relative; }
.gantt-scale { display: flex; height: 52px; }
.gantt-day { flex: none; border-right: 1px solid var(--border); font-size: 10.5px; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 6px; }
.gantt-day.weekend { background: color-mix(in oklab, var(--surface-3) 60%, transparent); }
.gantt-day.today { color: var(--accent-ink); font-weight: 700; }
.gantt-line { height: 40px; border-bottom: 1px solid var(--border); position: relative; }
.gantt-bar { position: absolute; top: 9px; height: 22px; border-radius: 7px; background: color-mix(in oklab, var(--accent) 22%, var(--surface)); border: 1px solid color-mix(in oklab, var(--accent) 55%, transparent); overflow: hidden; cursor: pointer; display: flex; align-items: center; padding: 0 8px; font-size: 11.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.gantt-bar > i { position: absolute; inset: 0 auto 0 0; background: var(--accent); opacity: .55; }
.gantt-bar > span { position: relative; overflow: hidden; text-overflow: ellipsis; }
.gantt-bar.late { border-color: var(--danger); background: var(--danger-soft); }
.gantt-bar.milestone { width: 18px !important; height: 18px; top: 11px; transform: rotate(45deg); border-radius: 4px; padding: 0; background: var(--inverse); border-color: var(--inverse); }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); z-index: 2; pointer-events: none; }
.gantt-deps { position: absolute; inset: 0; pointer-events: none; z-index: 1; }

/* --------------------------------------------------------------------------
   Contenu riche (descriptions, commentaires)
   ----------------------------------------------------------------------- */
.prose { font-size: 13.5px; line-height: 1.65; color: var(--text-2); word-break: break-word; }
.prose p + p { margin-top: 10px; }
.prose ul, .prose ol { margin: 6px 0; padding-left: 20px; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.prose code { background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
.prose .mention { color: var(--accent-ink); font-weight: 600; background: var(--accent-softer); border-radius: 5px; padding: 0 3px; }
.comment { display: flex; gap: 12px; padding: 14px 0; }
.comment + .comment { border-top: 1px solid var(--border); }
.comment .c-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.comment .c-head b { font-weight: 650; color: var(--text); font-size: 13px; }
.comment .c-body { margin-top: 4px; }
.reactions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.reaction { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); font-size: 12px; cursor: pointer; }
.reaction.mine { border-color: var(--accent); background: var(--accent-softer); }
.composer { border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); transition: border-color .14s, box-shadow .14s; }
.composer:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.composer textarea { width: 100%; border: 0; outline: none; resize: none; background: transparent; padding: 12px 14px 4px; min-height: 64px; line-height: 1.55; font-size: 13.5px; }
.composer-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px 8px 10px; }

/* Checklist */
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; }
.checklist-item:hover { background: var(--surface-hover); }
.checklist-item.done .ci-title { text-decoration: line-through; color: var(--faint); }
.checklist-item .ci-title { flex: 1; min-width: 0; font-size: 13.5px; }
.checklist-item .ci-actions { opacity: 0; display: flex; gap: 2px; }
.checklist-item:hover .ci-actions { opacity: 1; }

/* Étapes (assistant de création) */
.steps { display: flex; align-items: center; gap: 8px; padding: 0 20px 6px; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 550; color: var(--faint); }
.step i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; border: 1.5px solid var(--border-strong); }
.step.active { color: var(--text); } .step.active i { border-color: var(--accent); background: var(--accent); color: var(--accent-fg); }
.step.done { color: var(--text-2); } .step.done i { border-color: var(--accent); color: var(--accent-ink); }
.step-sep { flex: 1; height: 1px; background: var(--border); min-width: 12px; }

/* Graphiques */
.chart-box { position: relative; width: 100%; min-height: 160px; flex: 1; }
.chart-box canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* --------------------------------------------------------------------------
   Pages d'authentification
   ----------------------------------------------------------------------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(440px, .95fr); background: var(--bg); }
.auth-visual { position: relative; overflow: hidden; background: #050605; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 48px; isolation: isolate; }
.auth-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; z-index: -2; }
.auth-slide.active { opacity: 1; }
.auth-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 8s ease; }
.auth-slide.active img { transform: scale(1); }
.auth-visual::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5, 6, 5, .55) 0%, rgba(5, 6, 5, .2) 35%, rgba(5, 6, 5, .92) 100%), radial-gradient(700px 400px at 0% 100%, color-mix(in oklab, var(--accent) 30%, transparent), transparent 70%); }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand img { width: 44px; height: 44px; border-radius: 50%; background: #fff; }
.auth-brand b { font-size: 16px; font-weight: 800; letter-spacing: .34em; }
.auth-brand span { display: block; font-size: 11px; color: rgba(255, 255, 255, .6); letter-spacing: .08em; margin-top: 2px; }
.auth-copy { max-width: 560px; }
.auth-copy .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: 12px; letter-spacing: .04em; backdrop-filter: blur(8px); }
.auth-copy .eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.auth-copy h2 { color: #fff; font-size: clamp(28px, 3.2vw, 42px); line-height: 1.08; letter-spacing: -.035em; margin-top: 18px; font-weight: 700; }
.auth-copy p { color: rgba(255, 255, 255, .7); font-size: 15px; margin-top: 14px; max-width: 470px; line-height: 1.6; }
.auth-dots { display: flex; gap: 8px; margin-top: 26px; }
.auth-dots button { width: 9px; height: 9px; border-radius: 9px; border: 0; background: rgba(255, 255, 255, .3); padding: 0; transition: width .3s, background .3s; }
.auth-dots button.active { width: 30px; background: var(--accent); }
.auth-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 28px; position: relative; background: var(--bg-glow), var(--bg); }
.auth-top { position: absolute; top: 20px; right: 24px; display: flex; gap: 8px; }
.auth-box { width: 100%; max-width: 410px; }
.auth-box h1 { font-size: 28px; letter-spacing: -.035em; font-weight: 700; }
.auth-box .sub { color: var(--muted); margin-top: 8px; font-size: 14px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.auth-form .input { height: 46px; border-radius: 12px; font-size: 14.5px; }
.auth-form .input-group > .input { padding-left: 40px; }
.auth-form .input-group > .nx-icon { left: 14px; }
.auth-foot { margin-top: 28px; font-size: 12px; color: var(--faint); text-align: center; }
.auth-foot a { color: var(--muted); }
.auth-foot a:hover { color: var(--text); }
.otp { display: flex; gap: 8px; justify-content: space-between; }
.otp input { width: 100%; max-width: 56px; height: 58px; text-align: center; font-size: 24px; font-weight: 700; font-family: var(--font-mono); border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); outline: none; }
.otp input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.strength i { height: 4px; border-radius: 4px; background: var(--surface-3); transition: background .2s; }
.strength[data-score="1"] i:nth-child(-n+1) { background: var(--danger); }
.strength[data-score="2"] i:nth-child(-n+2) { background: var(--warning); }
.strength[data-score="3"] i:nth-child(-n+3) { background: #84CC16; }
.strength[data-score="4"] i { background: var(--success); }
.rules { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 8px; list-style: none; }
.rules li::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; }
.rules li.ok { color: var(--success); }
.rules li.ok::before { background: var(--success); border-color: var(--success); box-shadow: inset 0 0 0 3px var(--surface); }
.rules { padding: 0; margin: 0; }
.center-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 28px 18px; background: var(--bg-glow), var(--bg); }
.center-card { width: min(520px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 32px; }
.center-card.wide { width: min(760px, 100%); }
.code-box { font-family: var(--font-mono); font-size: 12px; background: #0B0C0B; color: #C9F2B5; border-radius: 12px; padding: 14px 16px; max-height: 320px; overflow: auto; white-space: pre-wrap; line-height: 1.6; }

/* --------------------------------------------------------------------------
   Animations
   ----------------------------------------------------------------------- */
@keyframes nx-spin { to { transform: rotate(360deg); } }
@keyframes nx-shimmer { to { transform: translateX(100%); } }
@keyframes nx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nx-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes nx-rise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes nx-slide { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes nx-toast { from { transform: translateY(12px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nx-toast-out { to { transform: translateX(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* --------------------------------------------------------------------------
   Adaptation aux écrans
   ----------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 210px minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .app, html[data-sidebar-collapsed="1"] .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); transform: translateX(-104%); transition: transform .24s var(--ease); box-shadow: var(--shadow-lg); }
  html.sb-open .sidebar { transform: none; }
  html.sb-open .sb-scrim { display: block; }
  .sb-scrim { display: none; position: fixed; inset: 0; z-index: 35; background: var(--overlay); }
  .sb-toggle { display: none; }
  html[data-sidebar-collapsed="1"] .sb-brand, html[data-sidebar-collapsed="1"] .sb-company-meta, html[data-sidebar-collapsed="1"] .sb-label, html[data-sidebar-collapsed="1"] .sb-badge,
  html[data-sidebar-collapsed="1"] .sb-group-label span, html[data-sidebar-collapsed="1"] .sb-user-meta { display: block; }
  html[data-sidebar-collapsed="1"] .sb-link { justify-content: flex-start; padding: 0 10px; }
  html[data-sidebar-collapsed="1"] .sb-head { justify-content: flex-start; padding: 0 16px; }
  .tb-menu { display: grid; }
  .tb-search span, .tb-search .kbd { display: none; }
  .tb-search { width: 36px; padding: 0; justify-content: center; border-color: transparent; background: transparent; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}
/* Petits écrans ou faible hauteur : la page défile naturellement. */
@media (max-width: 768px), (max-height: 620px) {
  .content { overflow: auto; }
  .page, .page-body, .fill, .card.fill, .tab-panel.active { flex: none; min-height: auto; }
  .table-wrap { max-height: 70vh; }
  .board { min-height: 420px; }
}
@media (max-width: 768px) {
  :root { --pad: 14px; --gap: 12px; }
  .g2, .g3, .g4, .g6, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .span2, .span3 { grid-column: auto; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > .split-nav { overflow-x: auto; }
  .split > .split-nav .vtabs { flex-direction: row; }
  .page-head h2 { font-size: 19px; }
  .tb-title .crumbs { display: none; }
  .tb-hide-sm { display: none !important; }
  .modal { border-radius: 20px 20px 0 0; max-height: 92vh; align-self: end; }
  .backdrop { padding: 0; place-items: end center; }
  .drawer { width: 100vw; }
  .gantt { grid-template-columns: 160px minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  input, select, textarea { font-size: 16px !important; }
}
@media print {
  .sidebar, .topbar, .ph-actions, .toasts { display: none !important; }
  .app { display: block; height: auto; }
  .content, .page, .page-body { overflow: visible !important; height: auto !important; }
}

/* ==========================================================================
   Compléments : coquille, listes de tâches, fiche tâche, divers
   ========================================================================== */
#nxLoadBar { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 300; background: var(--accent); box-shadow: 0 0 10px var(--accent); opacity: 0; transition: width .35s var(--ease), opacity .3s; pointer-events: none; }
#nxLoadBar.on { width: 72%; opacity: 1; transition: width 2.5s cubic-bezier(.1, .7, .2, 1), opacity .1s; }
#nxLoadBar.done { width: 100%; opacity: 0; transition: width .2s, opacity .4s .15s; }
body.has-modal { overflow: hidden; }
.sb-scrim { display: none; }
.sb-company-menu { left: 0; right: 0; min-width: 0; }
.sb-company-btn > .nx-icon { color: var(--sb-muted); width: 15px; height: 15px; }
.tb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
.tb-quick { height: 34px; }
.tb-avatar-btn { border: 0; background: transparent; padding: 0; border-radius: 50%; margin-left: 4px; }
.tb-avatar-btn .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border); }
.tb-avatar-btn:hover .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); }
.tb-timer { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 4px 0 10px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--success) 35%, transparent); background: var(--success-soft); color: var(--success); font-weight: 650; font-size: 12.5px; cursor: pointer; }
.tb-timer[hidden] { display: none; }
.tb-timer .tt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: nx-pulse 1.6s infinite; }
.tb-timer .tt-stop { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff; }
@keyframes nx-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--success) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.notif-foot { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; font-size: 12.5px; font-weight: 600; color: var(--accent-ink); background: var(--surface-2); }
.notif-foot:hover { background: var(--surface-3); }
.flag-txt { display: inline-grid; place-items: center; width: 26px; height: 18px; border-radius: 4px; font-size: 10px; font-weight: 800; background: var(--surface-3); color: var(--text-2); letter-spacing: .04em; }
.av-online { position: absolute; right: 0; bottom: 0; width: 9px; height: 9px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 2px var(--surface); }
.avatar { overflow: visible; }
.avatar img { border-radius: inherit; }
.avatar.square img { border-radius: 10px; }
.table-wrap.is-loading tbody { opacity: .55; transition: opacity .15s; }
.dt { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dt .table-wrap { flex: 1; }
.dt-empty { padding: 20px 0; }
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.prio .nx-icon { width: 14px; height: 14px; }
.due { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.due .nx-icon { width: 12px; height: 12px; }
.c-danger.due { font-weight: 600; }
.st-ico { display: inline-grid; place-items: center; flex: none; }
.st-ico .nx-icon { width: 17px; height: 17px; }
.is-on { color: var(--accent-ink) !important; }
.is-on .nx-icon { fill: color-mix(in oklab, var(--accent) 25%, transparent); }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.more-opts > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); padding: 6px 10px; border-radius: 9px; border: 1px dashed var(--border-strong); }
.more-opts > summary::-webkit-details-marker { display: none; }
.more-opts[open] > summary { border-style: solid; background: var(--surface-2); }
.swatch-none { background: repeating-linear-gradient(45deg, var(--surface-3), var(--surface-3) 4px, var(--surface) 4px, var(--surface) 8px); }
.label-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.input-lg-title { height: 44px; font-size: 15px; font-weight: 550; }
.range { accent-color: var(--accent); height: 6px; }
.quick-add { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border: 1px dashed var(--border-strong); border-radius: 10px; color: var(--muted); }
.quick-add:focus-within { border-style: solid; border-color: var(--accent); box-shadow: var(--ring); }
.quick-add .input { border: 0; box-shadow: none !important; background: transparent; padding-left: 0; }
.tag-perso { background: var(--surface-3); color: var(--text-2); }

/* Lignes de tâches */
.tlist { display: flex; flex-direction: column; }
.trow { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--border); min-width: 0; cursor: pointer; transition: background .1s; outline: none; }
.trow:last-child { border-bottom: 0; }
.trow:hover, .trow:focus-visible { background: var(--surface-hover); }
.trow-main { flex: 1; min-width: 0; }
.trow-title { font-size: 13.5px; font-weight: 550; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow-code { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; color: var(--faint); margin-right: 7px; letter-spacing: .02em; }
.trow-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.trow-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.trow-status { width: 120px; flex: none; }
.trow-prog { width: 120px; flex: none; }
.trow-prio { width: 92px; flex: none; }
.trow-people { width: 76px; flex: none; display: flex; justify-content: flex-end; }
.trow.is-done .trow-title { color: var(--faint); text-decoration: line-through; text-decoration-color: color-mix(in oklab, var(--faint) 60%, transparent); }
.trow.is-late { box-shadow: inset 2px 0 0 var(--danger); }
.tm-proj { display: inline-flex; align-items: center; gap: 5px; font-weight: 550; color: var(--text-2); }
.tm-proj i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
.tm-free { color: var(--faint); }
.tcheck { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; color: transparent; padding: 0; transition: all .15s; }
.tcheck .nx-icon { width: 13px; height: 13px; stroke-width: 2.5; }
.tcheck:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-softer); }
.tcheck.done { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.tcheck.review { border-color: var(--violet); color: var(--violet); background: var(--violet-soft); }
.tcheck.busy { animation: nx-spin .8s linear infinite; border-style: dashed; }
.bucket { border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); overflow: hidden; }
.bucket + .bucket { margin-top: 12px; }
.bucket-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); cursor: pointer; user-select: none; }
.bucket-head .count { margin-left: auto; font-variant-numeric: tabular-nums; background: var(--surface-3); padding: 1px 8px; border-radius: 8px; color: var(--text-2); }
.bucket-head .nx-icon { width: 15px; height: 15px; }
.bucket.t-danger .bucket-head { color: var(--danger); }
.bucket.t-warning .bucket-head { color: var(--warning); }
.bucket.collapsed .tlist { display: none; }
.bucket.collapsed .bucket-head { border-bottom: 0; }
.board-card.is-late { border-left: 3px solid var(--danger); }
.board-empty { border: 1.5px dashed var(--border); border-radius: 12px; padding: 18px 10px; text-align: center; color: var(--faint); font-size: 12px; }
.board-col-head .right { margin-left: auto; }

/* Fiche tâche */
.td-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.td-head .crumbs { min-width: 0; }
.td-code { font-size: 11.5px; color: var(--muted); }
.td-tools { gap: 2px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--c) 40%, transparent); background: color-mix(in oklab, var(--c) 12%, transparent); color: color-mix(in oklab, var(--c) 85%, var(--text)); font-weight: 650; font-size: 12.5px; white-space: nowrap; }
.status-pill:not(:disabled):hover { background: color-mix(in oklab, var(--c) 20%, transparent); }
.status-pill:disabled { cursor: default; }
.td { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 18px 22px 28px; }
.td-page { grid-template-columns: minmax(0, 1fr) 340px; padding: 0; align-items: start; }
.td-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.td-side { position: sticky; top: 0; }
.td-title { width: 100%; border: 0; outline: none; resize: none; background: transparent; font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.3; padding: 4px 6px; margin: 0 -6px; border-radius: 8px; overflow: hidden; color: var(--text); }
.td-title:hover { background: var(--surface-2); }
.td-title:focus { background: var(--surface); box-shadow: var(--ring); }
.td-title-ro { font-size: 21px; font-weight: 700; letter-spacing: -.025em; }
.props { display: grid; grid-template-columns: 1fr; gap: 2px; }
.td-drawer .props { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); }
.prop { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 36px; font-size: 13px; }
.prop-k { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; }
.prop-k .nx-icon { color: var(--faint); }
.prop-v { min-width: 0; color: var(--text); }
.prop-btn { border: 0; background: transparent; padding: 3px 6px; margin-left: -6px; border-radius: 7px; }
.prop-btn:not(:disabled):hover { background: var(--surface-3); }
.inline-date { border-color: transparent; background: transparent; box-shadow: none; padding: 0 6px; margin-left: -6px; width: auto; max-width: 100%; }
.inline-date:hover { border-color: var(--border-strong); background: var(--surface); }
.assignee { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px 2px 2px; border-radius: 999px; background: var(--surface-3); font-size: 12px; font-weight: 550; }
.assignee.done { background: var(--success-soft); }
.assignee .role-dot { font-style: normal; color: var(--warning); font-size: 11px; }
.td-progress { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.td-pagehead { display: flex; align-items: center; gap: 12px; padding: 0 0 14px; }
.td-panels { min-height: 120px; }
.td-panels .tab-panel.active { display: block; }
.td-page .tabs { position: sticky; top: 0; background: var(--bg); z-index: 3; }
.comments .comment:first-child { padding-top: 4px; }
.checklist { display: flex; flex-direction: column; gap: 1px; }

/* Tableau de bord */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--gap); flex: 1; min-height: 0; }
.dash-col { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }
.agenda-item { display: flex; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.agenda-item:last-child { border-bottom: 0; }
.agenda-time { width: 54px; flex: none; font-size: 12px; font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; padding-top: 1px; }
.agenda-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); }
.agenda-ico .nx-icon { width: 14px; height: 14px; }
.agenda-ico.k-event { background: var(--info-soft); color: var(--info); }
.agenda-ico.k-task { background: var(--accent-soft); color: var(--accent-ink); }
.agenda-ico.k-reminder { background: var(--warning-soft); color: var(--warning); }
.agenda-day { padding: 8px 16px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; }
.proj-card { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
.proj-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.proj-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.03em; color: #fff; font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: 12px; color: rgba(255, 255, 255, .62); }
.team-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 70px 70px; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.team-row:last-child { border-bottom: 0; }
.team-row .num { text-align: right; }
.plat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.plat-cell { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.plat-cell b { display: block; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.plat-cell span { font-size: 12px; color: var(--muted); }

/* Barre d'outils de liste */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: none; }
.toolbar .input-group { min-width: 220px; flex: 1; max-width: 360px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; height: var(--ctl-h-sm); padding: 0 10px; border-radius: 9px; border: 1px dashed var(--border-strong); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 550; }
.filter-chip.on { border-style: solid; border-color: var(--accent); background: var(--accent-softer); color: var(--accent-ink); }
.view-switch { margin-left: auto; }
.count-pill { font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 6px; background: var(--surface-3); color: var(--muted); }

@media (max-width: 1280px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .td-page { grid-template-columns: minmax(0, 1fr); }
  .td-side { position: static; }
}
@media (max-width: 1024px) {
  .trow-prog, .trow-status { display: none; }
}
@media (max-width: 768px) {
  .td-drawer .props { grid-template-columns: minmax(0, 1fr); }
  .trow-prio { display: none; }
  .team-row { grid-template-columns: minmax(0, 1fr) 54px 54px; }
  .team-row > :nth-child(4) { display: none; }
}
.content.scrollable { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.content.scrollable .page { flex: none; min-height: auto; }
.content.scrollable .page-body { flex: none; }

/* Authentification (compléments) */
.auth-body { min-height: 100vh; }
.auth-brand-inline { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand-inline img { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--border), 0 0 0 4px var(--accent-soft); }
.auth-brand-inline b { display: block; font-size: 14px; font-weight: 800; letter-spacing: .3em; }
.auth-brand-inline span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.auth-brand-inline.only-mobile { display: none; }
.auth-slide-copy h2 { animation: nx-rise .5s var(--ease); }
.otp-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); margin-bottom: 18px; border: 1px solid var(--accent-line); }
.otp-icon.t-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in oklab, var(--danger) 30%, transparent); }
.back-link { display: inline-flex; align-items: center; gap: 6px; }
.auth-top .segmented button { height: 26px; padding: 0 10px; font-weight: 700; letter-spacing: .05em; }
@media (max-width: 1024px) { .auth-brand-inline.only-mobile { display: flex; } }
.sb-toggle[data-tip] { position: absolute; }
.error-code { font-size: 84px; font-weight: 800; letter-spacing: -.06em; line-height: 1; margin: 22px 0 6px; background: linear-gradient(180deg, var(--text), color-mix(in oklab, var(--text) 15%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.upgrade .code-box { max-height: 260px; }

/* Fiche projet */
.proj-head { flex: none; }
.proj-head-in { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.proj-head-in h2 { font-size: 22px; font-weight: 700; letter-spacing: -.028em; max-width: 60vw; }
.proj-mark.lg { width: 52px; height: 52px; border-radius: 16px; font-size: 17px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15), var(--shadow-md); }
.kpi-ring { flex-direction: row; align-items: center; gap: 14px; }
.ov-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.wl-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.wl-row + .wl-row { border-top: 1px solid var(--border); }
.grip { cursor: grab; color: var(--faint); display: grid; place-items: center; }
.list-item.dragging { opacity: .5; background: var(--accent-softer); }
.m-2 { margin: 8px; }
.gantt-body .gantt-line:nth-child(odd) { background: color-mix(in oklab, var(--surface-2) 45%, transparent); }
.gantt-line.phase-line { background: var(--surface-2) !important; }
.gantt-phase { position: absolute; top: 15px; height: 10px; border-radius: 5px; background: color-mix(in oklab, var(--c) 30%, transparent); border: 1px solid color-mix(in oklab, var(--c) 60%, transparent); }
.gantt-bar { --bc: var(--accent); background: color-mix(in oklab, var(--bc) 18%, var(--surface)); border-color: color-mix(in oklab, var(--bc) 55%, transparent); }
.gantt-bar > i { background: var(--bc); }
.gantt-bar.done { opacity: .7; }
.gantt-bar.done > i { width: 100% !important; }
.gantt-bar:hover { box-shadow: var(--shadow-md); z-index: 2; }
.gantt-day { position: relative; gap: 1px; }
.gantt-day b { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.gantt-day .gm { position: absolute; top: 6px; left: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--accent-ink); white-space: nowrap; }
.gantt-row-label { cursor: pointer; }
.gantt-row-label:hover { background: var(--surface-hover); }
.gantt-rows-left .gantt-row-label .st-ico .nx-icon { width: 15px; height: 15px; }
.gantt-deps { color: var(--text-2); }
@media (max-width: 1280px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } }

/* Profil */
.profile-hero { display: flex; align-items: center; gap: 18px; padding: 18px 20px; border-radius: var(--r-2xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); flex: none; flex-wrap: wrap; }
.profile-hero h2 { font-size: 22px; font-weight: 700; letter-spacing: -.028em; }
.ph-avatar { position: relative; }
.ph-avatar .avatar.xl { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent-soft); }
.ph-avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--inverse); color: var(--inverse-fg); cursor: pointer; box-shadow: 0 0 0 3px var(--surface); }
.ph-avatar-edit:hover { background: var(--accent); color: var(--accent-fg); }
.theme-choice { align-items: center; text-align: center; padding: 10px; }
.theme-prev { display: grid; grid-template-columns: 26% 1fr; grid-template-rows: 14px 1fr; gap: 4px; width: 100%; height: 74px; border-radius: 9px; padding: 6px; margin-bottom: 6px; border: 1px solid var(--border); }
.theme-prev i { border-radius: 4px; display: block; }
.theme-prev i:nth-child(1) { grid-row: 1 / span 2; }
.tp-light { background: #F5F6F5; } .tp-light i:nth-child(1) { background: #0A0B0A; } .tp-light i:nth-child(2) { background: #fff; } .tp-light i:nth-child(3) { background: #fff; box-shadow: inset 0 -12px 0 color-mix(in oklab, var(--accent) 35%, #fff); }
.tp-dark { background: #080908; } .tp-dark i:nth-child(1) { background: #060706; border: 1px solid #1B1E1B; } .tp-dark i:nth-child(2) { background: #141614; } .tp-dark i:nth-child(3) { background: #141614; box-shadow: inset 0 -12px 0 color-mix(in oklab, var(--accent) 45%, #141614); }
.tp-system { background: linear-gradient(135deg, #F5F6F5 50%, #080908 50%); } .tp-system i:nth-child(1) { background: #0A0B0A; } .tp-system i:nth-child(2) { background: rgba(255, 255, 255, .8); } .tp-system i:nth-child(3) { background: rgba(20, 22, 20, .85); }
.swatch-custom { display: grid; place-items: center; background: conic-gradient(#E11D48, #F59E0B, #84CC16, #0EA5E9, #8B5CF6, #E11D48); color: #fff; }
.accent-preview { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-strong); }
.tfa-setup { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.tfa-qr { padding: 10px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.tfa-qr svg { width: 100%; height: auto; }
.codes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.codes-grid span { padding: 9px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; font-size: 14px; letter-spacing: .08em; }
@media (max-width: 768px) { .tfa-setup { grid-template-columns: 1fr; } .tfa-qr { max-width: 220px; margin: 0 auto; } }
/* Icônes dans du texte en ligne */
span:has(> .nx-icon:first-child):not(.badge):not(.avatar):not(.st-ico):not(.ct-icon):not(.kpi-icon):not(.pi-icon):not(.ni-icon):not(.agenda-ico):not(.t-icon):not(.mh-icon) { display: inline-flex; align-items: center; gap: 5px; }
/* Sur-titre des pages d'authentification (installation, mise à niveau) */
.eyebrow-sm { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; margin-bottom: 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11.5px; font-weight: 600; letter-spacing: .03em; }
