/* ─── Orialeg theme — Moderne SaaS ─────────────────────────────── */
:root {
  --bg: #f4f7fb;
  --bg2: #e9eef6;
  --surface: #ffffff;
  --border: #dfe4ec;
  --text: #0f172a;
  --muted: #64748b;
  --light: #94a3b8;
  --accent: #2563eb;
  --accent-light: rgba(37,99,235,0.08);
  --accent-2: #0ea5e9;
  --success: #10b981;
  --success-light: rgba(16,185,129,0.10);
  --warn: #f59e0b;
  --warn-light: rgba(245,158,11,0.10);
  --danger: #ef4444;
  --danger-light: rgba(239,68,68,0.10);
  --sidebar: #0f1e3a;
  --sidebar-text: #a3b3d0;
  --shadow-card: 0 1px 3px rgba(0,0,0,.07), 0 4px 16px rgba(37,99,235,.06);
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 16px; color: var(--text); background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-weight: 700; margin: 0; line-height: 1.25; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
i.fa, i.fa-solid, i.fa-regular, i.fa-brands { color: inherit; }

/* ─── Layout shell ─── */
.app-shell { display: flex; min-height: 100vh; }
.app-main  { flex: 1; display: flex; flex-direction: column; min-width: 0; margin-left: 240px; }
.app-content { flex: 1; padding: 30px 36px; }

/* ─── Sidebar ─── */
/* Sidebar fixée à gauche : le copyright reste visible quand on scrolle.
   Si elle est plus haute que l'écran, son contenu interne scrolle (overflow-y). */
.sidebar {
  width: 240px; background: var(--sidebar); color: #fff;
  display: flex; flex-direction: column; flex-shrink: 0;
  position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto;
  z-index: 50;
}
/* Quand la sidebar est repliée → le contenu remonte (margin-left réduit) */
html.sb-collapsed .app-main, .app-shell:has(.sidebar.collapsed) .app-main { margin-left: 70px; }
/* Transition douce sur le décalage du contenu en suivant la sidebar */
.app-main { transition: margin-left 0.22s ease; }
.sidebar-logo { padding: 22px 22px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 12px; }
/* Logo mark — SVG image; the gradient lives in the SVG itself */
.sidebar-logo .logo-mark { width: 42px; height: 42px; display: block; flex-shrink: 0; }
.sidebar-logo .name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: 0.5px; text-transform: uppercase; }
.sidebar-logo .sub  { font-size: 10.5px; color: var(--sidebar-text); opacity: 0.72; margin-top: 2px; letter-spacing: -0.05px; white-space: nowrap; }

.sidebar-nav { flex: 1; padding: 14px 12px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; margin-bottom: 3px; border-radius: 8px;
  color: var(--sidebar-text); font-size: 14.5px; font-weight: 400;
  border-left: 3px solid transparent; text-decoration: none;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.sidebar-nav a.active {
  background: rgba(37,99,235,0.18); color: #fff; font-weight: 600;
  border-left-color: var(--accent);
}
.sidebar-nav a .icon { width: 20px; text-align: center; font-size: 15px; opacity: 0.85; }
.sidebar-nav a.active .icon { opacity: 1; color: var(--accent); }

.sidebar-rgpd-badge {
  margin: 14px; padding: 10px 14px; border-radius: 9px;
  background: rgba(16,185,129,0.16); display: flex; align-items: center; gap: 10px;
}
.sidebar-rgpd-badge .ic { color: var(--success); font-size: 16px; }
.sidebar-rgpd-badge .l1 { font-size: 12px; font-weight: 600; color: var(--success); }
.sidebar-rgpd-badge .l2 { font-size: 11px; color: var(--sidebar-text); margin-top: 2px; }

.sidebar-copyright {
  padding: 12px 18px 16px; font-size: 11.5px; color: rgba(255,255,255,0.5);
  border-top: 1px solid rgba(255,255,255,0.05); line-height: 1.55;
}

/* Bouton « Réduire le menu » au bas de la sidebar */
.sidebar-collapse-btn {
  border: 0; background: transparent; color: var(--sidebar-text);
  display: flex; align-items: center; gap: 12px;
  margin: 6px 12px 4px; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer; text-align: left;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-radius: 0; padding-top: 14px;
}
.sidebar-collapse-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-collapse-btn i { width: 20px; text-align: center; font-size: 14px; }

/* ─── Sidebar repliée (icônes seulement) — desktop uniquement ──────────── */
.sidebar.collapsed,
html.sb-collapsed .sidebar { width: 70px; transition: width 0.22s ease; }

.sidebar.collapsed .sidebar-logo,
html.sb-collapsed .sidebar .sidebar-logo { padding: 18px 12px; justify-content: center; }

.sidebar.collapsed .sidebar-logo > div,
html.sb-collapsed .sidebar .sidebar-logo > div { display: none; }

.sidebar.collapsed .sidebar-nav a,
html.sb-collapsed .sidebar .sidebar-nav a { justify-content: center; padding: 11px 8px; }

.sidebar.collapsed .sidebar-nav a .lbl,
html.sb-collapsed .sidebar .sidebar-nav a .lbl { display: none; }

.sidebar.collapsed .sidebar-nav a.active,
html.sb-collapsed .sidebar .sidebar-nav a.active { border-left-width: 0; background: rgba(37,99,235,0.28); }

.sidebar.collapsed .sidebar-rgpd-badge,
html.sb-collapsed .sidebar .sidebar-rgpd-badge { padding: 10px; justify-content: center; }

.sidebar.collapsed .sidebar-rgpd-badge > div,
html.sb-collapsed .sidebar .sidebar-rgpd-badge > div { display: none; }

.sidebar.collapsed .sidebar-copyright,
html.sb-collapsed .sidebar .sidebar-copyright { display: none; }

.sidebar.collapsed .sidebar-collapse-btn,
html.sb-collapsed .sidebar .sidebar-collapse-btn { justify-content: center; }

.sidebar.collapsed .sidebar-collapse-btn .lbl,
html.sb-collapsed .sidebar .sidebar-collapse-btn .lbl { display: none; }

.sidebar.collapsed .sidebar-collapse-btn i,
html.sb-collapsed .sidebar .sidebar-collapse-btn i { transform: rotate(180deg); }

/* ─── Top bar ─── */
.topbar {
  height: 60px; min-height: 60px; flex-shrink: 0;
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 28px; gap: 14px;
}
.topbar .breadcrumb { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.topbar .breadcrumb .crumb        { color: var(--muted); }
.topbar .breadcrumb .crumb.current{ color: var(--text); font-weight: 600; }
.topbar .breadcrumb .sep          { color: var(--light); font-size: 13px; }
.topbar .global-search {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 22px;
  padding: 7px 16px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px;
  width: 240px;
}
.topbar .global-search input { border: 0; background: transparent; flex: 1; outline: none; font-size: 13px; color: var(--text); }
.topbar .user-pill {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 14.5px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.topbar .user-menu { position: relative; }
.topbar .user-dropdown {
  position: absolute; right: 0; top: 100%; margin-top: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.10); min-width: 220px; padding: 7px; z-index: 50;
  display: none;
}
.topbar .user-dropdown a {
  display: block; padding: 10px 14px; color: var(--text); font-size: 14px; border-radius: 6px;
}
.topbar .user-dropdown a:hover { background: var(--bg2); text-decoration: none; }
.topbar .user-dropdown .meta { padding: 10px 14px 12px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }
.topbar .user-dropdown .meta .name { font-weight: 600; font-size: 14.5px; }
.topbar .user-dropdown .meta .email { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ─── Page header ─── */
.page-header { margin-bottom: 26px; display: flex; align-items: flex-end; gap: 18px; }
.page-header .titles { flex: 1; }
.page-header h1 { font-size: 28px; font-weight: 800; }
.page-header .subtitle { font-size: 14.5px; color: var(--muted); margin-top: 6px; }

/* ─── Cards ─── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 22px;
}
.card-tight { padding: 16px 18px; }
.kpi-card { border-top: 3px solid var(--accent); }
.kpi-card .kpi-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.kpi-card .kpi-value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 28px; font-weight: 800; color: var(--accent); margin-top: 6px; line-height: 1.1; }
.kpi-card .kpi-sub   { font-size: 12.5px; color: var(--light); margin-top: 4px; }

/* Avatars */
.avatar-gmail { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Pills / badges */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill-ok    { color: var(--success); background: var(--success-light); }
.pill-warn  { color: var(--warn);    background: var(--warn-light); }
.pill-error { color: var(--danger);  background: var(--danger-light); }
.pill-info  { color: var(--accent);  background: var(--accent-light); }
.pill-mute  { color: var(--muted);   background: var(--bg2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 600;
  border: 1.5px solid transparent; cursor: pointer; line-height: 1.2;
  font-family: inherit; transition: filter .12s, background .12s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.06); color: #fff; }
.btn-outline { background: var(--surface); color: var(--accent); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-light); color: var(--accent); }
.btn-ghost   { background: var(--surface); color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg2); color: var(--text); }
.btn-danger  { background: var(--danger-light); color: var(--danger); border-color: rgba(239,68,68,0.45); }
.btn-sm { padding: 7px 13px; font-size: 13px; gap: 6px; }

/* Inputs */
.form-input {
  width: 100%; padding: 11px 14px; border-radius: 9px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-family: inherit; font-size: 14.5px; color: var(--text); outline: none;
}
.form-input:focus { border-color: var(--accent); }
.form-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.5px; margin-bottom: 7px; display: block; text-transform: uppercase; }
.form-hint  { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

/* Status / segmented */
.segmented {
  display: inline-flex; gap: 4px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 9px; padding: 4px;
}
.segmented button {
  padding: 7px 14px; border: 0; background: transparent; cursor: pointer;
  border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); font-family: inherit;
}
.segmented button.active { background: var(--accent); color: #fff; }

/* Year selector with dropdown for older years */
.year-selector { position: relative; }
.year-selector .year-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,0.10); padding: 5px;
  min-width: 130px; display: none; z-index: 30;
}
.year-selector .year-dropdown a {
  display: block; padding: 8px 12px; font-size: 13px; color: var(--text);
  border-radius: 6px;
}
.year-selector .year-dropdown a:hover { background: var(--bg2); text-decoration: none; }
.year-selector .year-dropdown a.current { background: var(--accent-light); color: var(--accent); font-weight: 600; }

/* Table */
.dt {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card);
}
.dt thead th {
  background: var(--bg2); padding: 12px 16px; font-size: 11.5px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.dt tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.dt tbody tr:hover { background: var(--accent-light); cursor: pointer; }
.dt tbody tr:last-child td { border-bottom: none; }
.dt .progress { height: 6px; background: var(--bg2); border-radius: 99px; overflow: hidden; min-width: 80px; }
.dt .progress > div { height: 100%; background: var(--success); border-radius: 99px; }
.dt .progress.warn  > div { background: var(--warn); }
.dt .progress.error > div { background: var(--danger); }
.dt .name-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.dt .name-cell .name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* DSN calendar (12 months strip) */
.dsn-cal { display: flex; gap: 4px; }
.dsn-cal .month {
  flex: 1; text-align: center; padding: 8px 0; border-radius: 6px;
  background: var(--bg2); border: 1px solid var(--border);
  font-size: 11.5px; color: var(--light);
}
.dsn-cal .month.received { background: var(--success-light); border-color: rgba(16,185,129,0.3); color: var(--success); }
.dsn-cal .month.expected { background: var(--warn-light);    border-color: rgba(245,158,11,0.3); color: var(--warn); }
.dsn-cal .month .lbl { font-weight: 700; font-size: 12px; }
.dsn-cal .month .ind { margin-top: 3px; font-size: 12px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.tabs button {
  padding: 12px 22px; background: transparent; border: 0; cursor: pointer;
  font-family: inherit; font-size: 14.5px; color: var(--muted); font-weight: 500;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
  border-radius: 8px 8px 0 0;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .12s, color .12s;
}
.tabs button:hover { color: var(--text); background: var(--bg2); }
.tabs button.active { color: var(--accent); font-weight: 700; border-bottom-color: var(--accent); background: var(--accent-light); }
.tabs button.active:hover { background: var(--accent-light); color: var(--accent); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15,15,25,0.55);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.modal-backdrop.show { display: flex; }
.modal-card {
  background: var(--surface); border-radius: var(--radius); padding: 30px;
  width: 500px; max-width: calc(100% - 40px); box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}
.modal-card h3 { font-size: 19px; margin-bottom: 8px; }
.modal-card .modal-sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--border); background: var(--surface);
  border-radius: var(--radius); padding: 44px; text-align: center;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.drop-zone:hover, .drop-zone.dragover { border-color: var(--accent); background: var(--accent-light); }
.drop-zone .ic { font-size: 44px; margin-bottom: 14px; color: var(--accent); }
.drop-zone h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 19px; margin-bottom: 6px; }

/* Auth pages */
.auth-shell {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f5fb 0%, #e7e7f6 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 20px 60px rgba(15,15,40,0.12);
  width: 460px; max-width: 100%; padding: 40px 36px;
}
.auth-card .logo {
  display: flex; align-items: center; gap: 14px; margin-bottom: 28px;
}
.auth-card .logo .logo-mark { width: 54px; height: 54px; display: block; flex-shrink: 0; }
.auth-card .logo .name { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 24px; }
.auth-card .logo .tag  { font-size: 13px; color: var(--muted); margin-top: 2px; }
.auth-card h1 { font-size: 24px; margin-bottom: 8px; }
.auth-card p.lead { color: var(--muted); font-size: 14.5px; margin-bottom: 24px; }
.auth-card .form-group { margin-bottom: 16px; }
.auth-card .alert {
  padding: 12px 16px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px;
  background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239,68,68,0.25);
}
.auth-card .alert.ok {
  background: var(--success-light); color: var(--success); border-color: rgba(16,185,129,0.25);
}
.auth-card .switch { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--muted); }

/* Charts */
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 130px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.bar-chart .bar .v   { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.bar-chart .bar .col { width: 100%; background: var(--accent); border-radius: 5px 5px 0 0; min-height: 5px; transition: height .3s; }
.bar-chart .bar .lbl { font-size: 11.5px; color: var(--light); }

.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.donut-legend .row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.donut-legend .row .swatch { width: 12px; height: 12px; border-radius: 4px; }
.donut-legend .row .lbl { color: var(--muted); flex: 1; }
.donut-legend .row .val { font-weight: 700; font-size: 14px; }

/* Service grid */
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service-card { padding: 20px; position: relative; overflow: hidden; }
.service-card.active { border-color: rgba(37,99,235,0.35); }
.service-card.active::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent);
}
.service-card .icon-bubble {
  width: 44px; height: 44px; border-radius: 11px; background: var(--bg2);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  color: var(--muted);
}
.service-card.active .icon-bubble { background: var(--accent-light); color: var(--accent); }
.service-card .title { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 15px; margin: 12px 0 6px; }
.service-card .desc  { font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.55; }
.service-card .cta {
  width: 100%; padding: 9px; border-radius: 8px; text-align: center;
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: 0;
}
.service-card.active .cta { background: var(--success-light); color: var(--success); }

/* Rights matrix */
.rights-matrix table { width: 100%; }
.rights-matrix th { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 0; border-bottom: 2px solid var(--border); text-align: center; }
.rights-matrix th:first-child, .rights-matrix td:first-child { text-align: left; }
.rights-matrix td { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; text-align: center; }
.rights-checkbox {
  width: 26px; height: 26px; border-radius: 6px;
  border: 1.5px solid var(--border); background: var(--bg2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--light); font-weight: 700; font-size: 13px;
}
.rights-checkbox.on { border-color: rgba(37,99,235,0.5); background: var(--accent-light); color: var(--accent); }

/* Toast */
.toast {
  position: fixed; bottom: 26px; right: 26px; z-index: 200;
  background: var(--text); color: #fff; padding: 14px 20px; border-radius: 9px;
  font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); opacity: 0; transform: translateY(8px);
  transition: opacity .15s, transform .15s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok    { background: var(--success); }
.toast.error { background: var(--danger); }

/* Utility */
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-muted { color: var(--muted); }
.text-light { color: var(--light); }
.fw-700 { font-weight: 700; }
.fs-11 { font-size: 12px; } .fs-12 { font-size: 13px; } .fs-13 { font-size: 13.5px; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.grid { display: grid; }
.grid-2 { grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3,1fr); gap: 18px; }
.grid-4 { grid-template-columns: repeat(4,1fr); gap: 16px; }
.grid-5 { grid-template-columns: repeat(5,1fr); gap: 14px; }
.hide { display: none !important; }

/* ─── Hamburger button + offcanvas backdrop ──────────────────────────── */
.sidebar-toggle {
  display: none; /* affiché en mobile via media query */
  border: 0; background: transparent; padding: 6px 10px;
  font-size: 18px; color: var(--text); cursor: pointer; border-radius: 8px;
}
.sidebar-toggle:hover { background: var(--bg2); }
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.45); z-index: 90;
}
.sidebar-backdrop.show { display: block; }

/* ─── Responsive : tablette (≤ 1100px) ──────────────────────────────── */
@media (max-width: 1100px) {
  .app-content { padding: 22px 22px; }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  /* Les grilles inline (style="display:grid; grid-template-columns:…")
     deviennent 1col en stack pour éviter que les colonnes hardcodées
     (ex: 360px) ou les sous-grilles (déclarant 1fr 1fr) ne débordent. */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h1 { font-size: 24px; }
}

/* ─── Responsive : tablette (≤ 1100px) — suite ──────────────────────── */
@media (max-width: 1100px) {
  /* Toutes les barres flex wrap automatiquement (search + filters + count) */
  .flex { flex-wrap: wrap; }
  /* Le segmented (filter par statut/rôle) wrap aussi */
  .segmented { flex-wrap: wrap; }
  .segmented button { flex: 1 1 auto; }
  /* L'input search dans une barre flex prend toute la largeur sur sa ligne */
  .flex > [style*="flex:1"], .flex > [style*="flex: 1"] { min-width: 100%; }
}

/* ─── Responsive : mobile (≤ 900px) ─────────────────────────────────── */
@media (max-width: 900px) {
  /* Sidebar en off-canvas — translateX(-100%) par défaut */
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; width: 260px;
    z-index: 100; transform: translateX(-100%); transition: transform 0.22s ease-out;
    box-shadow: 0 0 30px rgba(0,0,0,0.25);
  }
  .sidebar.open { transform: translateX(0); }
  /* En mobile, la sidebar est offcanvas → l'app-main reprend toute la largeur */
  .app-main { margin-left: 0 !important; }
  /* Sur mobile, le bouton collapse n'a pas de sens (offcanvas) */
  .sidebar-collapse-btn { display: none; }
  /* Si la sidebar était .collapsed sur desktop, on annule en mobile (full width) */
  .sidebar.collapsed,
  html.sb-collapsed .sidebar { width: 260px; }
  .sidebar.collapsed .sidebar-logo > div,
  .sidebar.collapsed .sidebar-nav a .lbl,
  .sidebar.collapsed .sidebar-rgpd-badge > div,
  .sidebar.collapsed .sidebar-copyright,
  html.sb-collapsed .sidebar .sidebar-logo > div,
  html.sb-collapsed .sidebar .sidebar-nav a .lbl,
  html.sb-collapsed .sidebar .sidebar-rgpd-badge > div,
  html.sb-collapsed .sidebar .sidebar-copyright { display: revert; }
  .sidebar-toggle { display: inline-flex; align-items: center; }
  .app-main { width: 100%; }

  .topbar {
    padding: 10px 14px; gap: 10px; flex-wrap: wrap;
  }
  .topbar .breadcrumb { font-size: 13px; gap: 4px; }
  .topbar .global-search { order: 99; flex: 1 0 100%; max-width: none; }
  /* Le bouton page-action déborde — on le cache en mobile, l'utilisateur passe par les Quick Actions du dashboard */
  .topbar > .btn { display: none; }

  .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .app-content { padding: 16px 14px; }
  .page-header { margin-bottom: 16px; }
  .page-header h1 { font-size: 20px; }

  /* Tables : scroll horizontal au lieu d'overflow caché.
     Cible les listings standalone (companies, users). Le `white-space: nowrap`
     est utile pour qu'une ligne reste sur une seule ligne avec un scroll
     horizontal — sinon les colonnes s'écraseraient. */
  .dt { display: block; overflow-x: auto; white-space: nowrap; }
  .dt thead th, .dt tbody td { padding: 10px 12px; font-size: 12.5px; }

  /* Mais les tables imbriquées dans une card (cotisations, RGPD logs, etc.)
     doivent wrapper normalement — sinon `nowrap` force la cellule à toute la
     longueur du texte, ce qui propage le min-content vers tous les ancêtres
     flex/grid et fait déborder la page. La card elle-même contient la
     largeur, on n'a pas besoin de scroll horizontal interne. */
  .card .dt { display: table; overflow-x: visible; white-space: normal; }

  /* Tabs : scroll horizontal */
  .tabs { overflow-x: auto; white-space: nowrap; gap: 4px; padding-bottom: 4px; }
  .tabs button { font-size: 12.5px; padding: 8px 12px; flex-shrink: 0; }

  /* Cartes & dashboard hero : un peu plus compact */
  .card { padding: 16px 16px; }
  .dash-hero { padding: 14px 16px; gap: 12px; }
  .dash-hero h1 { font-size: 18px; }
  .dash-hero .meta { font-size: 12px; }
  .kpi-pro .value { font-size: 24px; }

  /* Modale : full-screen */
  .modal-card { width: 100% !important; max-width: 100% !important; border-radius: 0 !important; max-height: 100vh !important; }

  /* Empêcher les enfants flex/grid de gonfler au-delà du parent (cause classique d'overflow) */
  .grid > *, .flex > * { min-width: 0; }
  /* Cards : le contenu wrap, jamais déborde */
  .card { overflow: hidden; word-break: break-word; }
  .card pre, .card code { white-space: pre-wrap; word-break: break-all; }

  /* Calendrier DSN : 6 mois par ligne au lieu de 12 sur une seule ligne */
  .dsn-cal { flex-wrap: wrap; }
  .dsn-cal .month { flex: 1 1 calc((100% / 6) - 4px); min-width: 0; padding: 6px 0; }
  .dsn-cal .month .lbl { font-size: 11px; }

  /* Liens des établissements frères & similaires : wrap ok */
  #info-siblings a { flex-wrap: wrap; }
  #info-siblings a > div:nth-child(2) { flex: 1 1 calc(100% - 60px); }

  /* Hero company : avatar + bloc nom/meta/pills + year-selector empilés */
  #hero > .flex { flex-wrap: wrap; }
  #hero > .flex > div { min-width: 0; }
  #hero > .flex > .flex-1 { flex: 1 1 100%; order: 2; } /* nom + meta + pills sur sa propre ligne */
  #hero > .flex > #hero-avatar { order: 1; }
  #hero > .flex > .flex.gap-8 { order: 3; flex: 1 1 100%; }
  #hero #hero-name { font-size: 18px !important; word-break: break-word; }
  #hero #hero-meta { word-break: break-word; }
}

/* ─── Responsive : table RGPD compacte (≤ 700px) ────────────────────── */
@media (max-width: 700px) {
  /* Masque la colonne IP (dernière) — peu utile au quotidien sur mobile */
  .dt-rgpd th:last-child, .dt-rgpd td:last-child { display: none; }
  .dt-rgpd { white-space: normal; }
  .dt-rgpd .pill { font-size: 10.5px; padding: 2px 8px; }
}

/* ─── Responsive : petit mobile (≤ 480px) ───────────────────────────── */
@media (max-width: 480px) {
  .topbar .global-search { display: none; }
  .topbar { padding: 8px 12px; }
  .page-header h1 { font-size: 18px; }
  .dash-hero .ic { width: 42px; height: 42px; font-size: 18px; }
  /* Import : les 3 source-cards (Manual file / Payroll / Net-Entreprises) chacune sur sa ligne */
  .flex > .card-tight { flex: 1 1 100% !important; }
}

/* ─── Dashboard hero + KPI PRO + bar chart + donut + timeline + quick-link ── */
/* Ces styles vivaient inline dans app/dashboard.php côté PHP. En SPA on les
   centralise ici pour que toutes les vues qui les réutilisent (dashboards)
   partagent la même définition. */
.dash-hero {
  display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #6d68ff 100%); color: #fff;
  box-shadow: 0 8px 28px rgba(37,99,235,0.18); margin-bottom: 18px;
}
.dash-hero .ic { width: 54px; height: 54px; border-radius: 13px; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.dash-hero h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -0.3px; color: #fff; }
.dash-hero .meta { font-size: 13px; opacity: 0.9; margin-top: 3px; text-transform: capitalize; }

.kpi-pro {
  background: var(--surface); border-radius: 14px; padding: 18px 18px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 0 0 1px var(--border);
  position: relative; overflow: hidden; transition: transform 0.18s, box-shadow 0.18s;
}
.kpi-pro:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06), 0 0 0 1px var(--border); }
.kpi-pro .ic { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; margin-bottom: 10px; }
.kpi-pro .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.kpi-pro .value { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 30px; font-weight: 800; line-height: 1.05; margin-top: 4px; letter-spacing: -0.5px; }
.kpi-pro .sub { font-size: 12px; color: var(--light); margin-top: 6px; display: flex; align-items: center; gap: 6px; }

.bar-chart-pro { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding-top: 18px; }
.bar-chart-pro .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-chart-pro .bar .v { font-size: 12px; color: var(--text); font-weight: 700; }
.bar-chart-pro .bar .col { width: 100%; background: linear-gradient(180deg, var(--accent) 0%, #6d68ff 100%); border-radius: 7px 7px 0 0; min-height: 5px; transition: height 0.5s ease-out, opacity 0.18s; opacity: 0.92; }
.bar-chart-pro .bar:hover .col { opacity: 1; box-shadow: 0 4px 12px rgba(37,99,235,0.25); }
.bar-chart-pro .bar .lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.bar-chart-pro .bar.current .col { background: linear-gradient(180deg, var(--success) 0%, #34d399 100%); }
.bar-chart-pro .bar.current .v { color: var(--success); }

.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.timeline-item { position: relative; padding: 8px 0; }
.timeline-item::before { content: ''; position: absolute; left: -20px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--accent); }
.timeline-item .when { font-size: 11px; color: var(--muted); font-weight: 600; }
.timeline-item .what { font-size: 13px; font-weight: 700; margin-top: 1px; }
.timeline-item .who { font-size: 11.5px; color: var(--light); margin-top: 1px; }

.quick-link { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: background 0.15s, transform 0.12s; }
.quick-link:hover { background: var(--bg2); text-decoration: none; transform: translateX(2px); }
.quick-link .ic { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quick-link .lbl { flex: 1; font-weight: 600; font-size: 13px; }

.donut-card .donut-svg { display: block; margin: 8px auto 18px; }
.donut-card .donut-svg .seg { transition: stroke-dasharray 900ms cubic-bezier(0.22, 1, 0.36, 1); }
.donut-card .donut-pct { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; fill: var(--text); }
.donut-card .legend-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 13px; }
.donut-card .legend-row + .legend-row { border-top: 1px solid var(--border); }
.donut-card .legend-row .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-card .legend-row .lbl { flex: 1; color: var(--muted); font-weight: 500; }
.donut-card .legend-row .val { font-weight: 700; font-size: 14px; min-width: 24px; text-align: right; }
.donut-card .legend-row .bar { flex: 0 0 70px; height: 5px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin: 0 6px; }
.donut-card .legend-row .bar > div { height: 100%; border-radius: 99px; transition: width 900ms cubic-bezier(0.22, 1, 0.36, 1); }

/* ─── Nav badge dans la sidebar (Messagerie non-lus) ────────────────── */
.sidebar-nav a { position: relative; }
.nav-badge {
  position: absolute; right: 12px; top: 50%; margin-top: -9px;
  background: #d93025; color: #fff; font-size: 10px; font-weight: 700;
  border-radius: 10px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  display: inline-block; text-align: center;
  line-height: 18px; font-family: system-ui, -apple-system, sans-serif;
}
.sb-collapsed .nav-badge, .sidebar.collapsed .nav-badge { right: 4px; padding: 1px 4px; font-size: 9px; }

/* ─── Agenda — grille mensuelle 7 colonnes ─────────────────────────── */
.cal-app { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cal-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; background: #fafbfc; }
.cal-head .month-name { font-size: 18px; font-weight: 700; flex: 1; text-transform: capitalize; }
.cal-head .btn-nav { padding: 6px 10px; background: #fff; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; }
.cal-head .btn-today { padding: 6px 14px; background: var(--accent); color: #fff; border: 0; border-radius: 6px; cursor: pointer; font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--border); }
.cal-dayname { padding: 10px; text-align: center; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; border-right: 1px solid var(--border); background: #fafbfc; font-weight: 600; }
.cal-day { min-height: 108px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px; cursor: pointer; position: relative; }
.cal-day.other-month { background: #fafbfc; color: var(--muted); }
.cal-day.today .day-num { background: var(--accent); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.cal-day .day-num { font-size: 13px; padding: 2px 4px; }
.cal-day .ev { margin-top: 4px; font-size: 11px; padding: 3px 6px; border-radius: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; background: var(--accent-light); color: var(--accent); border-left: 3px solid var(--accent); }
.cal-day .ev-more { margin-top: 3px; font-size: 10px; color: var(--muted); text-align: center; }
.cal-day:hover { background: #f8fafc; }

/* Global search dans le topbar — masqué en mobile */
@media (max-width: 900px) {
  .topbar .global-search { display: none; }
}

/* ─── Import DSN — imp-tabs + panels + pl-grid + sync-box ──────────── */
.imp-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.imp-tab { border: 2px solid var(--border); background: var(--surface); border-radius: 12px; padding: 14px 18px; cursor: pointer; transition: .15s; display: flex; align-items: center; gap: 12px; }
.imp-tab:hover { border-color: var(--accent); }
.imp-tab.on { border-color: var(--accent); background: var(--accent-light); }
.imp-tab .ic { width: 40px; height: 40px; border-radius: 10px; background: #fff; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 18px; flex: none; }
.imp-tab.on .ic { color: var(--accent); }
.imp-tab .lbl { font-weight: 700; font-size: 14px; }
.imp-tab .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.imp-panel { display: none; }
.imp-panel.on { display: block; }

/* ─── pl-* (grille payroll partagée avec /connectors) ──────────────── */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pl-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: .15s; }
.pl-card:hover { border-color: var(--accent); }
.pl-card.active { border-color: var(--accent); background: var(--accent-light); }
.pl-card.disabled { opacity: .55; cursor: not-allowed; }
.pl-card .head { display: flex; align-items: center; gap: 10px; }
.pl-card .logo { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-light); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.pl-card .name-wrap { flex: 1; min-width: 0; }
.pl-card .name { font-size: 14px; font-weight: 700; }
.pl-card .status { display: inline-flex; padding: 2px 9px; font-size: 10.5px; font-weight: 700; border-radius: 999px; }
.pl-card .status.on { background: #dcfce7; color: #166534; }
.pl-card .status.off { background: #f1f5f9; color: #64748b; }
.pl-card .desc { font-size: 12px; color: var(--muted); line-height: 1.4; min-height: 34px; }

.sync-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-top: 16px; }
.sync-box h3 { font-size: 15px; margin-bottom: 10px; }
.log-line { font-family: monospace; font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.log-line.info { color: #374151; }
.log-line.ok   { background: #f0fdf4; color: #166534; }
.log-line.err  { background: #fef2f2; color: #991b1b; }

/* ─── Connecteurs (cloud + payroll) ────────────────────────────────── */
.cn-section { max-width: 1200px; margin: 0 auto 32px; }
.cn-section-head { margin: 8px 0 14px; }
.cn-section-head h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.cn-section-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.cn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cn-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; transition: .15s; }
.cn-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.cn-card.disabled { opacity: .55; }
.cn-card .head { display: flex; align-items: center; gap: 10px; }
.cn-card .logo { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; background: #f1f5f9; }
.cn-card .logo.g  { background: #fff; border: 1px solid #e5e7eb; color: #4285F4; }
.cn-card .logo.ms { background: #fff; border: 1px solid #e5e7eb; color: #0078D4; }
.cn-card .logo.pl { background: var(--accent-light); color: var(--accent); }
.cn-card .name-wrap { flex: 1; min-width: 0; }
.cn-card .name { font-size: 14px; font-weight: 700; }
.cn-card .status { display: inline-flex; padding: 2px 9px; font-size: 10.5px; font-weight: 700; border-radius: 999px; flex: none; }
.cn-card .status.on { background: #dcfce7; color: #166534; }
.cn-card .status.off { background: #f1f5f9; color: #64748b; }
.cn-card .desc { font-size: 12px; color: var(--muted); line-height: 1.4; min-height: 34px; }
.cn-card .state { font-size: 11.5px; color: #334155; word-break: break-all; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-card .state.dim { color: var(--muted); font-style: italic; }
.cn-card .scopes { display: flex; gap: 4px; flex-wrap: wrap; min-height: 20px; }
.cn-card .scope-chip { padding: 1px 8px; border-radius: 999px; background: var(--accent-light); color: var(--accent); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.cn-card .actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.cn-card .btn.btn-sm { padding: 4px 10px; font-size: 12px; }
.cn-flash { max-width: 1200px; margin: 0 auto 16px; }
.cn-warn { background: #fef3c7; border: 1px solid #fde68a; color: #92400e; padding: 10px 14px; border-radius: 10px; font-size: 13px; }
.cn-warn.ok  { background: #dcfce7; border-color: #86efac; color: #166534; }

/* ─── Modale générique (scope picker, credentials) ─────────────────── */
.modal-bk { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-bk.show { display: flex; }
.modal-bk .modal-card { background: var(--surface); border-radius: 14px; width: 580px; max-width: 96vw; max-height: 92vh; overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.25); padding: 0; }
.modal-bk .modal-head { padding: 16px 22px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-bk .modal-head h3 { margin: 0; font-size: 16px; }
.modal-bk .modal-body { padding: 18px 22px; }
.modal-bk .modal-foot { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.scope-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.scope-row:has(input:checked) { border-color: var(--accent); background: var(--accent-light); }
.scope-row input { margin-top: 3px; }
.scope-row .lbl { font-weight: 600; font-size: 13px; }
.scope-row .desc { color: var(--muted); font-size: 12px; margin-top: 2px; }
.field-row { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.field-row .lbl { font-size: 13px; font-weight: 600; }
.field-row .desc { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tuto { background: var(--bg2); border-left: 4px solid var(--accent); border-radius: 6px; padding: 14px 18px; margin-bottom: 16px; }
.tuto ol { padding-left: 22px; margin: 8px 0 0; }
.tuto ol li { margin: 6px 0; font-size: 13px; }
.tuto code { background: #fff; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border); font-family: monospace; font-size: 12px; }
.tuto a { color: var(--accent); font-weight: 600; }
.btn-icon { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; padding: 6px 8px; border-radius: 6px; }
.btn-icon:hover { background: var(--bg2); color: var(--text); }

/* ─── Dashboard entreprise — pending-item, recent-doc, review modal ── */
.pending-item { display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--border); border-radius:10px; margin-bottom:8px; transition:.15s; text-decoration:none; color:var(--text); }
.pending-item:hover { border-color:var(--accent); background:var(--accent-light); text-decoration:none; color:var(--text); }
.pending-item .pi-ic { width:36px; height:36px; border-radius:9px; background:var(--warn-light); color:var(--warn); display:flex; align-items:center; justify-content:center; font-size:15px; flex:none; }
.pending-item .pi-meta { flex:1; min-width:0; }
.pending-item .pi-title { font-size:13.5px; font-weight:700; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pending-item .pi-sub { font-size:11.5px; color:var(--muted); margin-top:2px; }
.pending-item .pi-action { color:var(--warn); font-weight:700; font-size:12px; white-space:nowrap; }

.recent-doc { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--border); }
.recent-doc:last-child { border-bottom:0; }
.recent-doc .rd-ic { width:32px; height:32px; border-radius:8px; background:var(--accent-light); color:var(--accent); display:flex; align-items:center; justify-content:center; font-size:14px; flex:none; }
.recent-doc .rd-meta { flex:1; min-width:0; }
.recent-doc .rd-title { font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.recent-doc .rd-sub { font-size:11px; color:var(--muted); margin-top:1px; }

.review-bk { position:fixed; inset:0; background:rgba(15,23,42,.75); display:none; z-index:1000; flex-direction:column; }
.review-bk.show { display:flex; }
.review-head { background:var(--surface); padding:12px 20px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--border); box-shadow:0 2px 8px rgba(0,0,0,.08); }
.review-head .title { font-size:15px; font-weight:700; }
.review-head .sub { font-size:12px; color:var(--muted); margin-top:2px; }
.review-body { flex:1; background:#404040; padding:0; }
.review-body iframe { width:100%; height:100%; border:0; background:#fff; }
.review-foot { background:var(--surface); padding:14px 20px; display:flex; gap:12px; justify-content:flex-end; align-items:center; border-top:1px solid var(--border); flex-wrap:wrap; }
.review-foot .btn-danger { background:#ef4444; color:#fff; border-color:#ef4444; }
.review-foot .btn-danger:hover { background:#dc2626; border-color:#dc2626; }

/* ─── Users détail + toast ─────────────────────────────────────────── */
.user-detail-card { animation: slidein 0.18s ease; }
@keyframes slidein { from { opacity:0; transform: translateY(-4px); } to { opacity:1; transform: translateY(0); } }
.dt tbody tr.selected { background: var(--accent-light); }
.user-toast { position: fixed; bottom: 26px; right: 26px; z-index: 200; background: var(--text); color: #fff; padding: 14px 20px; border-radius: 9px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); animation: toastin .16s ease; }
.user-toast.ok    { background: var(--success); }
.user-toast.error { background: var(--danger); }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-header .head-actions, .page-header > .btn, .page-header a.btn { align-self: flex-end; }

/* ─── Rôles & permissions ──────────────────────────────────────────── */
.role-card { margin-bottom: 20px; }
.role-card .role-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.role-card .role-pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; }
.role-card .role-desc { color: var(--muted); font-size: 12px; flex: 1; }

/* ─── Sub-nav segmented (sous-onglets Company) ─────────────────────── */
/* Sub-nav segmented (harmonisé avec l'onglet Envoi des accès) — centrée, actif accent */
.sub-nav { display: flex; justify-content: center; gap: 4px; background: var(--surface); border: 1.5px solid var(--border); padding: 4px; border-radius: 9px; margin: 0 auto 20px; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.sub-nav button { flex: 0 0 auto; padding: 7px 14px; background: transparent; border: 0; border-radius: 7px; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .12s, color .12s; }
.sub-nav button:hover { color: var(--text); background: var(--bg2); }
.sub-nav button.active { background: var(--accent); color: #fff; box-shadow: none; }
.sub-nav button.active:hover { background: var(--accent); color: #fff; }
.sub-nav button span.text-muted { font-weight: 500; font-size: 11.5px; }
.sub-nav button.active span.text-muted { color: rgba(255,255,255,0.75); }

/* ─── Services — coming-soon bouton violet désactivé ────────────── */
.service-card:not(.active) .cta:disabled { opacity: .55; cursor: not-allowed; }
.service-card:not(.active) .cta:disabled:hover { opacity: .55; }
.service-card.active .cta:disabled { cursor: default; opacity: .85; }

/* ─── Messagerie 3 colonnes ──────────────────────────────────────── */
html:has(body.mail-fullscreen) { height: 100vh; overflow: hidden; }
body.mail-fullscreen           { height: 100vh; overflow: hidden; margin: 0; }
body.mail-fullscreen .app-shell,
body.mail-fullscreen .layout   { height: 100vh; min-height: 100vh; overflow: hidden; }
body.mail-fullscreen .app-main,
body.mail-fullscreen .main     { height: 100vh; min-height: 0; overflow: hidden; }
body.mail-fullscreen .app-content,
body.mail-fullscreen .content  { padding: 0 !important; flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
body.mail-fullscreen .page-header,
body.mail-fullscreen .breadcrumb,
body.mail-fullscreen .app-topbar-actions,
body.mail-fullscreen .topbar-actions { display: none !important; }
body.mail-fullscreen .topbar .global-search { margin-left: auto; }

.mail-app { display: grid; grid-template-columns: 240px 400px 1fr; flex: 1 1 auto; min-height: 0; height: 100%;
  background: var(--surface, #fff); font-size: 13px; overflow: hidden; position: relative; }
@media (max-width: 1200px) { .mail-app { grid-template-columns: 220px 360px 1fr; } }
@media (max-width: 900px)  { .mail-app { grid-template-columns: 60px 320px 1fr; } .mail-side-label { display: none; } }

.mail-side { border-right: 1px solid var(--border); background: #fafbfc; overflow-y: auto; padding-top: 8px; min-height: 0; height: 100%; }
.mail-compose-btn { margin: 8px 12px 14px; padding: 10px 16px; background: var(--accent); color: #fff; border: none; border-radius: 24px;
  font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.08); display: flex; align-items: center; gap: 10px;
  width: calc(100% - 24px); }
.mail-compose-btn:hover { box-shadow: 0 3px 8px rgba(0,0,0,.14); }
.mail-folder { padding: 8px 12px 8px 24px; cursor: pointer; display: flex; align-items: center; gap: 10px; border-radius: 0 20px 20px 0;
  margin-right: 10px; font-size: 13px; color: #3c4043; transition: background .1s; }
.mail-folder:hover { background: #e8eaed; }
.mail-folder.active { background: #d3e3fd; color: #001d35; font-weight: 600; }
.mail-folder i { width: 18px; text-align: center; font-size: 14px; }
.mail-folder-group { padding: 12px 24px 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.mail-folder .fold-toggle { width: 14px; text-align: center; font-size: 10px; color: var(--muted); cursor: pointer; margin-right: -4px; }
.mail-folder .fold-toggle.empty { visibility: hidden; }

.mail-list-col { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: hidden; }
.mail-list-head { padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; background: #fafbfc; }
.mail-list-head .title { font-size: 15px; font-weight: 700; flex: 1; }
.mail-list { flex: 1; overflow-y: auto; min-height: 0; }
.mail-thread { padding: 8px 14px; border-bottom: 1px solid #f0f1f3; cursor: pointer; transition: background .08s; background: #f1f3f5; }
.mail-thread.unseen { background: #ffffff; }
.mail-thread:hover { background: #e8eaed; }
.mail-thread.unseen:hover { background: #f5f6fa; }
.mail-thread.dragging { opacity: .5; }
.mail-folder.drag-over { background: #dbeafe !important; outline: 2px dashed var(--accent); outline-offset: -2px; }
.mail-thread.selected { background: #d3e3fd; }
.mail-thread .row1 { display: flex; align-items: center; gap: 6px; }
.mail-thread .row2 { margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.mail-thread .from { flex: 1; min-width: 0; font-size: 13px; color: #202124; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-thread .star { flex-shrink: 0; font-size: 12px; }
.mail-thread .date { flex-shrink: 0; font-size: 11px; color: var(--muted); }
.mail-thread .subject { flex: 1; min-width: 0; font-size: 12px; color: #5f6368; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-thread .count-badge { display: inline-block; padding: 0 5px; font-size: 11px; color: var(--muted); background: #e8eaed; border-radius: 8px; font-weight: 600; flex-shrink: 0; }
.mail-thread .attach { color: var(--muted); font-size: 11px; flex-shrink: 0; }
.mail-thread.unseen .from    { font-weight: 700; color: #202124; }
.mail-thread.unseen .subject { font-weight: 400; color: #202124; }
.mail-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: var(--muted); height: 100%; padding: 40px; }
.mail-empty i { font-size: 42px; opacity: .35; }

.mail-view { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; background: #fff; overflow: hidden; }
.mail-view-head { padding: 16px 22px; border-bottom: 1px solid var(--border); background: #fff; }
.mail-view-toolbar { padding: 6px 12px; border-bottom: 1px solid #f0f1f3; display: flex; gap: 4px; align-items: center; background: #fafbfc; }
.mail-view-toolbar button { border: none; background: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; color: #5f6368; font-size: 14px; transition: background .1s; }
.mail-view-toolbar button:hover { background: #e8eaed; color: #202124; }
.mail-view-toolbar .spacer { flex: 1; }
.mail-view-subject { font-size: 20px; font-weight: 500; color: #202124; margin-bottom: 4px; word-break: break-word; }
.mail-view-body { flex: 1; overflow-y: auto; padding: 0; min-height: 0; }
.mail-msg { border-bottom: 1px solid #f0f1f3; padding: 18px 22px; }
.mail-msg:last-child { border-bottom: none; }
.mail-msg-header { display: flex; gap: 12px; margin-bottom: 12px; align-items: center; }
.mail-msg-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.mail-msg-meta { flex: 1; min-width: 0; }
.mail-msg-from { font-size: 14px; font-weight: 600; color: #202124; }
.mail-msg-to { font-size: 12px; color: var(--muted); }
.mail-msg-date { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.mail-msg-body { color: #202124; line-height: 1.5; font-size: 14px; max-width: 100%; word-wrap: break-word; overflow-wrap: break-word; }
.mail-msg-body img { max-width: 100%; height: auto; }
.mail-msg-body a { color: var(--accent); }
.mail-msg-body pre { white-space: pre-wrap; font-family: inherit; }
.mail-msg-body blockquote { border-left: 3px solid #dadce0; margin: 8px 0; padding: 4px 12px; color: #5f6368; }
.mail-msg-attach { margin-top: 12px; padding: 8px 12px; background: #f5f6fa; border-radius: 6px; font-size: 12px; color: #5f6368; }
.mail-msg.collapsed { padding: 10px 22px; cursor: pointer; }
.mail-msg.collapsed:hover { background: #fafbfc; }
.mail-msg.collapsed .mail-msg-header { margin-bottom: 0; }

.compose-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; align-items: center; justify-content: center; z-index: 1000; }
.compose-mask.show { display: flex; }
.compose-card { background: #fff; border-radius: 8px; width: 720px; max-width: 96vw; max-height: 92vh; overflow: hidden; display: flex;
  flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.compose-head { padding: 12px 20px; background: #404040; color: #fff; display: flex; justify-content: space-between; align-items: center; }
.compose-head button { background: none; border: none; color: #fff; cursor: pointer; font-size: 16px; }
.compose-body { padding: 12px 20px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; }
.compose-row { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid #f0f1f3; gap: 10px; }
.compose-row label { color: #5f6368; font-size: 13px; width: 56px; }
.compose-row input { border: none; outline: none; flex: 1; font-size: 14px; padding: 4px 0; }
.compose-body textarea { border: none; outline: none; resize: none; flex: 1; min-height: 260px; font-family: inherit; font-size: 14px; padding: 12px 0; }
.compose-foot { padding: 10px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; }
.compose-foot .btn-send { background: var(--accent); color: #fff; border: none; padding: 8px 20px; border-radius: 20px; font-weight: 600;
  cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.compose-foot .btn-send:hover { box-shadow: 0 2px 6px rgba(0,0,0,.14); }
.compose-foot .btn-send:disabled { opacity: .7; cursor: not-allowed; }

.mask-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.75); display: none; align-items: center; justify-content: center; z-index: 100; }
.mask-overlay.show { display: flex; }
.mask-overlay .spinner { display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: #fff; border-radius: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1); font-size: 13px; }

.move-menu { display: none; position: fixed; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.12);
  min-width: 220px; max-height: 340px; overflow: auto; z-index: 500; padding: 4px; font-size: 13px; }
.move-menu.show { display: block; }
.move-menu-head { padding: 8px 12px 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.move-menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 5px; cursor: pointer; color: #202124; user-select: none; }
.move-menu-item:hover { background: #f1f5f9; }
.move-menu-item i { color: var(--muted); width: 16px; text-align: center; }
.move-menu-item .lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.move-menu-empty { padding: 12px; color: var(--muted); text-align: center; font-size: 12px; }

/* ─── Drive ──────────────────────────────────────────────────────── */
.drive-app { display: flex; flex-direction: column; height: calc(100vh - 120px); background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; position: relative; margin: 12px 0; }
.drive-head { padding: 12px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; background: #fafbfc; }
.drop-overlay { position: absolute; inset: 0; background: rgba(37,99,235,.12); border: 3px dashed var(--accent); display: none;
  align-items: center; justify-content: center; z-index: 50; pointer-events: none; border-radius: 12px; }
.drop-overlay.show { display: flex; }
.drop-overlay .msg { padding: 30px 50px; background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.12);
  font-size: 16px; color: var(--accent); font-weight: 600; display: flex; align-items: center; gap: 12px; }
.drop-overlay .msg i { font-size: 28px; }
.upload-progress { position: absolute; bottom: 20px; right: 20px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.12); padding: 12px 16px; font-size: 13px; display: none;
  align-items: center; gap: 10px; z-index: 60; }
.upload-progress.show { display: flex; }
.drive-crumb { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); flex: 1; overflow: hidden; }
.drive-crumb .crumb { cursor: pointer; color: var(--accent); white-space: nowrap; }
.drive-crumb .crumb.current { color: var(--text); font-weight: 600; cursor: default; }
.drive-crumb .sep { color: var(--muted); font-size: 11px; }
.drive-crumb .crumb.drop-target { background: var(--accent-light); color: var(--accent); border-radius: 4px; padding: 2px 8px; }
.drive-list { flex: 1; overflow: auto; padding: 4px 0; }
.drive-head-cols { display: grid; grid-template-columns: 40px 1fr 120px 160px 100px; gap: 12px; padding: 8px 20px;
  background: #fafbfc; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--muted);
  font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.drive-row { display: grid; grid-template-columns: 40px 1fr 120px 160px 100px; gap: 12px; align-items: center;
  padding: 10px 20px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.drive-row:hover { background: #f8fafc; }
.drive-row .ic { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 18px;
  color: var(--muted); background: #f1f5f9; border-radius: 8px; }
.drive-row.is-folder .ic { color: #3b82f6; }
.drive-row .name { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.drive-row .size, .drive-row .date { font-size: 12px; color: var(--muted); }
.drive-row .actions { display: flex; gap: 8px; justify-content: flex-end; opacity: 0; transition: .15s; }
.drive-row:hover .actions { opacity: 1; }
.drive-row[draggable="true"] { cursor: grab; }
.drive-row.is-folder.drag-over { background: #dbeafe; outline: 2px solid var(--accent); outline-offset: -2px; }
.drive-row.dragging { opacity: .4; }
.drive-row .btn-icon { padding: 4px 8px; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 4px; font-size: 12px; }
.drive-row .btn-icon:hover { background: var(--border); color: var(--text); }
.drive-empty { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.drive-empty i { display: block; font-size: 36px; opacity: .3; margin-bottom: 12px; }
.drive-loading { padding: 48px; text-align: center; color: var(--muted); }

/* ─── Document types grid ─────────────────────────────────────── */
.dt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.dt-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; cursor: pointer; transition: .15s; }
.dt-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.06); }
.dt-card.inactive { opacity: .55; }
.dt-icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.dt-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.dt-badge-cabinet    { background: #fef3c7; color: #92400e; }
.dt-badge-entreprise { background: #dbeafe; color: #1e40af; }
.dt-badge-salarie    { background: #dcfce7; color: #166534; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-row-full { margin-bottom: 14px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row label { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 1.5px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 600; }
.chip-row label:has(input:checked) { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════
 *  VAULT — Page Entreprises réinventée (mail-like)
 * ═══════════════════════════════════════════════════════════════════════ */

html:has(body.vault-fullscreen) { height: 100vh; overflow: hidden; }
body.vault-fullscreen           { height: 100vh; overflow: hidden; margin: 0; }
body.vault-fullscreen .app-shell,
body.vault-fullscreen .layout   { height: 100vh; min-height: 100vh; overflow: hidden; }
body.vault-fullscreen .app-main,
body.vault-fullscreen .main     { height: 100vh; min-height: 0; overflow: hidden; }
body.vault-fullscreen .app-content,
body.vault-fullscreen .content  { padding: 0 !important; flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
body.vault-fullscreen .page-header,
body.vault-fullscreen .breadcrumb,
body.vault-fullscreen .app-topbar-actions,
body.vault-fullscreen .topbar-actions { display: none !important; }

.vault-app { display: grid; grid-template-columns: 260px 1fr; flex: 1 1 auto; min-height: 0; height: 100%; background: var(--surface, #fff); font-size: 13px; overflow: hidden; }
@media (max-width: 900px) { .vault-app { grid-template-columns: 1fr; } .vault-list { display: none; } }

/* Liste des entreprises (colonne de gauche) */
.vault-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--border); background: #fafbfc; overflow: hidden; }
.vault-list-head { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.vault-list-head h2 { font-family: inherit; font-size: 14.5px; font-weight: 700; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; color: var(--text); letter-spacing: -0.1px; }
.vault-list-head h2 .count { font-family: inherit; font-size: 11.5px; font-weight: 600; color: var(--muted); background: #e8eaed; border-radius: 999px; padding: 2px 9px; }
.vault-search { position: relative; }
.vault-search input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font-family: inherit; font-size: 13.5px; color: var(--text); }
.vault-search input:focus { outline: none; border-color: var(--accent); }
.vault-search .fa-solid { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.vault-filter { display: flex; gap: 6px; padding: 8px 16px 10px; border-bottom: 1px solid var(--border); }
.vault-filter button { border: 1px solid var(--border); background: #fff; color: var(--muted); padding: 4px 10px; border-radius: 999px; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.vault-filter button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.vault-filter button:hover:not(.active) { background: #e8eaed; color: var(--text); }
.vault-list-body { flex: 1; overflow-y: auto; min-height: 0; }
.vault-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; padding: 9px 16px; cursor: pointer; border-left: 3px solid transparent; align-items: center; border-bottom: 1px solid #f0f1f3; text-decoration: none; color: inherit; }
.vault-item:hover, .vault-item:focus { text-decoration: none; }
.vault-item:hover { background: #e8eaed; }
.vault-item.active { background: #d3e3fd; border-left-color: var(--accent); }
.vault-item .avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-family: inherit; font-weight: 700; font-size: 12px; letter-spacing: -0.2px; }
.vault-item .name { font-family: inherit; font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-item .meta { font-family: inherit; font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-item .badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.vault-item .badge.b-todo { background: #fef3c7; color: #b45309; }
.vault-item .badge.b-new  { background: var(--accent-light); color: var(--accent); }

/* Détail de l'entreprise (colonne de droite) */
.vault-detail { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--bg); }
.vault-detail-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: var(--muted); height: 100%; padding: 40px; text-align: center; }
.vault-detail-empty i { font-size: 48px; opacity: 0.3; }
.vault-detail-top { padding: 16px 24px 0; background: #fff; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.vault-title { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.vault-title .avatar { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.vault-title .info { flex: 1; min-width: 0; }
.vault-title h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 21px; letter-spacing: -0.5px; font-weight: 800; margin: 0; color: var(--text); }
.vault-title .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vault-title .sub .fa-solid { font-size: 10.5px; margin-right: 4px; }
.vault-title .sub .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: 0.5; }
.vault-title .sub .mail-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--accent-light); color: var(--accent); padding: 3px 9px; border-radius: 6px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; border: 1px dashed rgba(37,99,235,0.4); cursor: pointer; white-space: nowrap; }
.vault-title .sub .mail-badge:hover { background: rgba(37,99,235,0.15); }
.vault-title .actions { display: flex; gap: 8px; }

.vault-tabs { display: flex; gap: 2px; overflow-x: auto; }
.vault-tabs a { padding: 11px 15px; color: var(--muted); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.vault-tabs a .fa-solid { font-size: 11px; }
.vault-tabs a:hover { color: var(--text); }
.vault-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.vault-tabs a .tab-badge { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10px; background: #fef3c7; color: #b45309; padding: 2px 6px; border-radius: 999px; }

.vault-body { flex: 1; min-height: 0; overflow: hidden; display: flex; }
.vault-body-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--muted); flex: 1; padding: 40px; }

/* Onglet Vault : tree + files */
.vault-tree-col { width: 280px; flex-shrink: 0; overflow-y: auto; background: #fafbfc; border-right: 1px solid var(--border); padding: 12px 0; }
.vault-tree-section { padding: 12px 18px 6px; font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: 0.6px; text-transform: uppercase; }
.vault-tree-item { display: grid; grid-template-columns: 14px 18px 1fr auto; gap: 7px; padding: 6px 18px 6px 10px; align-items: center; cursor: pointer; font-size: 13px; color: var(--text); }
.vault-tree-item:hover { background: #e8eaed; }
.vault-tree-item.active { background: #d3e3fd; color: var(--accent); font-weight: 600; }
.vault-tree-item.active .fa-solid { color: var(--accent); }
.vault-tree-item .chev { color: var(--muted); font-size: 9px; cursor: pointer; }
.vault-tree-item .chev.empty { visibility: hidden; }
.vault-tree-item i.fa-folder, .vault-tree-item i.fa-folder-open { color: #3b82f6; }
.vault-tree-item i.fa-lock { color: #b45309; }
.vault-tree-item i.fa-user-tie, .vault-tree-item i.fa-users { color: #0f766e; }
.vault-tree-item .cnt { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 10.5px; color: var(--muted); }
.vault-tree-item.child { padding-left: 34px; font-size: 12.5px; color: var(--muted); }
.vault-tree-item.child.active { color: var(--accent); }
.vault-tree-item .lock-mini,
.vault-folder-item .lock-mini,
.vault-type-item .lock-mini { display: inline-block; width: 13px; height: 13px; border-radius: 3px; background: #fef3c7; color: #b45309; font-size: 8px; line-height: 13px; text-align: center; margin-left: 4px; vertical-align: middle; }

.vault-files-col { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
.vault-files-head { padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.vault-crumb { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.vault-crumb strong { color: var(--text); font-weight: 700; font-size: 14px; }
.vault-crumb .fa-solid { font-size: 9px; opacity: 0.6; }
.vault-files-tools { display: flex; gap: 8px; align-items: center; }

.vault-notice { margin: 0 0 16px 0; padding: 12px 16px; border-radius: 10px; background: #fef3c7; border: 1px solid rgba(180,83,9,0.25); display: flex; gap: 12px; align-items: center; color: #92400e; font-size: 12.5px; }
.vault-notice .fa-solid { font-size: 14px; }
.vault-notice strong { font-weight: 700; }

.vault-files-body { flex: 1; overflow-y: auto; min-height: 0; padding: 12px 24px 24px; }
.vault-files-table { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 2px rgba(20,19,43,0.04); }
.vault-files-table table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.vault-files-table th { text-align: left; padding: 10px 14px; background: #fafbfc; border-bottom: 1px solid var(--border); font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.4px; text-transform: uppercase; }
.vault-files-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.vault-files-table tr:last-child td { border-bottom: 0; }
.vault-files-table tr:hover td { background: #fafbfc; }
.file-cell { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: center; }
.file-icon { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; font-size: 11.5px; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; color: #fff; }
.file-icon.pdf { background: #dc2626; }
.file-icon.edi { background: #2563eb; }
.file-icon.img { background: #7c3aed; }
.file-icon.xls { background: #059669; }
.file-icon.doc { background: #0ea5e9; }
.file-name { font-weight: 600; color: var(--text); font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 11.5px; color: var(--muted); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.file-meta { font-size: 10.5px; color: var(--muted); font-family: 'JetBrains Mono', ui-monospace, monospace; margin-top: 2px; }
.file-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.file-status.locked  { background: #fef3c7; color: #b45309; }
.file-status.review  { background: var(--accent-light); color: var(--accent); }
.file-status.done    { background: #dcfce7; color: #166534; }
.file-status.new     { background: #dbeafe; color: #1e40af; }
.file-status.rejected{ background: #fee2e2; color: #b91c1c; }
.icon-btn { border: 0; background: transparent; padding: 6px; border-radius: 6px; color: var(--muted); cursor: pointer; font-size: 13px; }
.icon-btn:hover { background: #e8eaed; color: var(--text); }

/* Upload drop-zone */
.vault-drop { padding: 30px; margin: 12px 24px; border: 2px dashed var(--border); border-radius: 10px; text-align: center; color: var(--muted); cursor: pointer; transition: all .15s; }
.vault-drop:hover, .vault-drop.dragover { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.vault-drop i { font-size: 24px; }

/* ═══════════════════════════════════════════════════════════════════════
 *  User menu dans la sidebar (au-dessus du RGPD, remplace le topbar pill)
 * ═══════════════════════════════════════════════════════════════════════ */
.sidebar-user { position: relative; margin: 8px 12px 6px; }
.sidebar-user-btn {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border: 0; background: transparent; color: var(--sidebar-text);
  cursor: pointer; border-radius: 10px;
  text-align: left;
  transition: background .12s;
}
.sidebar-user-btn:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-user-pill {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 12.5px;
  flex-shrink: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.sidebar-user-info {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px;
  overflow: hidden;
}
.sidebar-user-name {
  font-size: 13px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 10.5px; color: var(--sidebar-text); opacity: 0.75;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-chev {
  font-size: 10px; color: var(--sidebar-text); opacity: 0.5;
  transition: transform .15s;
}
.sidebar-user.open .sidebar-user-chev { transform: rotate(180deg); }

.sidebar-user-menu {
  display: none;
  position: absolute; bottom: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.08);
  overflow: hidden;
  z-index: 500;
  padding: 4px 0;
}
.sidebar-user.open .sidebar-user-menu { display: block; }
.sidebar-user-menu .meta {
  padding: 12px 14px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.sidebar-user-menu .meta .name { font-weight: 700; font-size: 14px; color: var(--text); }
.sidebar-user-menu .meta .role-pill {
  display: inline-block; padding: 2px 9px; font-size: 10.5px; font-weight: 700;
  border-radius: 999px; color: #fff; margin: 4px 0 2px;
}
.sidebar-user-menu .meta .email {
  font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-user-menu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; color: var(--text); font-size: 13px; text-decoration: none;
}
.sidebar-user-menu a:hover { background: var(--bg2); }
.sidebar-user-menu a .fa-solid { color: var(--muted); font-size: 13px; width: 16px; }

/* Mode réduit : ne montrer que le pill, centré, sans texte */
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-user-chev,
html.sb-collapsed .sidebar .sidebar-user-info,
html.sb-collapsed .sidebar .sidebar-user-chev { display: none; }
.sidebar.collapsed .sidebar-user-btn,
html.sb-collapsed .sidebar .sidebar-user-btn { justify-content: center; padding: 6px; }
.sidebar.collapsed .sidebar-user,
html.sb-collapsed .sidebar .sidebar-user { margin: 8px 6px 6px; }
.sidebar.collapsed .sidebar-user-menu,
html.sb-collapsed .sidebar .sidebar-user-menu {
  left: 100%; right: auto; bottom: 0; min-width: 220px; margin-left: 8px;
}

/* Scroll wrapper pour company.php dans le mode vault-fullscreen */
.vault-detail > .vault-content-scroll {
  flex: 1; overflow-y: auto; padding: 24px 28px; min-height: 0;
}

/* Layout Vault : 2 cards côte à côte (sous-dossiers | fichiers) */
.vault-two-cards {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  align-items: flex-start;
}
/* Colonne fichiers : autorise le scroll horizontal du tableau si la place manque */
.vault-files-plain { min-width: 0; overflow-x: auto; }
.vault-files-plain > .dt { min-width: 540px; }
.vault-files-plain > .dt tbody td { padding: 10px 14px; }
.vault-files-plain > .dt thead th { padding: 11px 14px; }
.vault-folders-card { padding: 16px; }
/* Card À classer : compact (pas de titre → moins de padding) */
.vault-inbox-compact { padding: 6px; }
.vault-folders-card h3 {
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 0 0 10px 4px;
}
.vault-folder-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 10px; align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: 2px;
}
.vault-folder-item:hover { background: var(--bg2); }
.vault-folder-item.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  border-color: rgba(37,99,235,0.2);
}
.vault-folder-item .icon { color: #3b82f6; }
.vault-folder-item i.fa-lock { color: #b45309; }
.vault-folder-item.active i.fa-solid { color: var(--accent); }
.vault-folder-item .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-folder-item .cnt {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg2);
  padding: 1px 8px;
  border-radius: 999px;
}
.vault-folder-item.active .cnt { background: rgba(37,99,235,0.15); color: var(--accent); }
/* Groupe de badges (total + à valider) — toujours en ligne */
.cnt-group { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }

.vault-files-card { padding: 0; overflow: hidden; }
.vault-files-card .vault-files-head { border-radius: 12px 12px 0 0; }

/* Marqueur inline "Scellé — Arkhineo" à côté du titre du dossier */
.seal-inline {
  display: inline-flex; align-items: center; gap: 5px;
  background: #fef3c7; color: #92400e;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
}
.seal-inline .fa-solid { font-size: 10px; }

@media (max-width: 900px) {
  .vault-two-cards { grid-template-columns: 1fr; }
}

/* Company titlebar (nom entreprise + year selector persistant) */
.company-titlebar {
  display: flex; align-items: center; gap: 16px;
  padding: 4px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.company-titlebar-name { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.company-titlebar .ttl-avatar { flex-shrink: 0; }
.company-titlebar .ttl-avatar .avatar-gmail { width: 36px !important; height: 36px !important; border-radius: 10px !important; font-size: 13px !important; }
.company-titlebar h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 19px; font-weight: 800; letter-spacing: -0.4px;
  color: var(--text); margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Tabs row : tabs scrollables + année à droite (déjà dans titlebar mais garde flex) */
.tabs-row { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px; min-width: 0; }
.tabs-row .tabs { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; border-bottom: 0; margin-bottom: 0; flex-wrap: nowrap; }
.tabs-row .tabs::-webkit-scrollbar { height: 6px; }
.tabs-row .tabs::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.tabs-row .tabs button { flex-shrink: 0; white-space: nowrap; padding: 12px 16px; font-size: 13.5px; }

/* Compacte un peu la vault-list (padding uniquement, on garde les tailles baseline app) */
.vault-list-head { padding: 12px 14px 8px; }
.vault-filter { padding: 6px 14px 8px; }
.vault-item { padding: 8px 14px; gap: 8px; grid-template-columns: 32px 1fr auto; }
.vault-item .avatar { width: 32px; height: 32px; }

/* Drag & drop des documents dans le vault */
.vault-files-inline tbody tr[draggable="true"] { cursor: grab; }
.vault-files-inline tbody tr[draggable="true"]:active { cursor: grabbing; }
.vault-files-inline tbody tr.dragging { opacity: 0.4; }
.vault-folder-item.drag-over {
  background: var(--accent) !important;
  color: #fff !important;
  outline: 2px dashed #fff;
  outline-offset: -3px;
}
.vault-folder-item.drag-over i.fa-solid { color: #fff !important; }

/* Menu popover de déplacement */
.move-menu {
  display: none; position: fixed;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.15);
  min-width: 260px; max-width: 320px; max-height: 380px;
  overflow-y: auto; z-index: 900;
  padding: 5px;
  font-family: inherit;
  font-size: 13px;
}
.move-menu.show { display: block; }
.move-menu-head {
  padding: 8px 12px 4px; font-size: 10.5px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px;
}
.move-menu-group {
  padding: 6px 12px 3px 12px; font-size: 11px; font-weight: 700;
  color: var(--text); background: var(--bg2);
  border-radius: 6px; margin: 4px 0 2px;
}
.move-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px; border-radius: 6px; cursor: pointer;
  color: var(--text);
}
.move-menu-item:hover { background: var(--accent-light); color: var(--accent); }
.move-menu-item i.fa-solid { color: #3b82f6; font-size: 13px; width: 16px; }
.move-menu-item i.fa-lock { color: #b45309; }
.move-menu-item:hover i.fa-solid { color: var(--accent); }
.move-menu-item .lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Zone de dépôt dans la modale */
.vault-drop-inline {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  color: var(--muted);
  transition: all .15s;
}
.vault-drop-inline:hover,
.vault-drop-inline.dragover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
}
.vault-drop-inline i { font-size: 22px; }
.vault-drop-inline .lbl { margin-top: 6px; font-size: 13px; font-weight: 600; }
.vault-drop-inline .fname { color: var(--text); font-weight: 600; }

/* Dropdown custom pour "Type de document" dans la modale Déposer */
.vault-type-select { position: relative; }
.vault-type-trigger {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s;
}
.vault-type-trigger:hover { border-color: var(--border-strong, #d4d1e5); }
.vault-type-select.open .vault-type-trigger { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.vault-type-trigger .vault-type-icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.vault-type-trigger .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vault-type-trigger .vault-type-chev { color: var(--muted); font-size: 11px; transition: transform .15s; }
.vault-type-select.open .vault-type-trigger .vault-type-chev { transform: rotate(180deg); }

.vault-type-menu {
  position: fixed;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  max-height: 340px;
  overflow-y: auto;
  z-index: 2000;
  padding: 5px;
  font-family: inherit;
  font-size: 13px;
}
.vault-type-group {
  padding: 8px 12px 4px; font-size: 10.5px; font-weight: 700;
  color: var(--text); background: var(--bg2);
  border-radius: 6px; margin: 4px 0 2px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.vault-type-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
  color: var(--text);
}
.vault-type-item:hover { background: var(--accent-light); }
.vault-type-item i.fa-solid { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.vault-type-item .lbl { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }

/* ─── Sub-nav du Vault : layout "option 4" (icône au-dessus du libellé) ─── */
#vault-cat-nav {
  width: 100%;
  max-width: 100%;
  justify-content: stretch;
}
#vault-cat-nav button {
  position: relative;
  flex: 1 1 0;
  flex-direction: column;
  padding: 7px 10px;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  min-width: 0;
  max-width: none;
  text-align: center;
}
/* Badge "à valider" en corner top-right des boutons de la sub-nav */
#vault-cat-nav button .cnt-corner {
  position: absolute;
  top: 3px;
  right: 4px;
  margin: 0;
}
#vault-cat-nav button .fa-solid {
  font-size: 15px;
  margin-bottom: 2px;
}
#vault-cat-nav button .lbl {
  display: block;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}
/* Badges dans les boutons de la sub-nav Vault (uniquement "à valider" en corner) */
#vault-cat-nav button .cnt {
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.4;
}
/* Badge "à valider" — accent orange pour attirer l'œil, partout où il apparaît */
.cnt.cnt-pending {
  background: #fef3c7 !important;
  color: #b45309 !important;
  margin-left: 4px;
}
#vault-cat-nav button.active .cnt.cnt-pending,
.vault-folder-item.active .cnt.cnt-pending {
  background: #fbbf24 !important;
  color: #78350f !important;
}
