.access-tab { padding: 0; height: 100%; display: flex; flex-direction: column; }

.access-toolbar {
  display: flex; gap: .65rem; align-items: center;
  padding: .55rem .9rem;
  background: rgba(24, 24, 27, .22);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  flex-wrap: wrap;
  backdrop-filter: blur(24px) saturate(180%);
}
.access-toolbar .access-stats {
  font-family: 'Menlo','Consolas',monospace;
  font-size: .8rem; font-weight: 600; color: #94a3b8;
  display: flex; gap: .4rem;
}
.access-toolbar #ac-new-dataset { margin-left: auto; }

/* Layout 2 col */
.access-layout { display: grid; grid-template-columns: 260px 1fr; flex: 1; min-height: 0; transition: grid-template-columns .2s; }
.access-layout.sidebar-hidden { grid-template-columns: 0 1fr; }
.access-layout.sidebar-hidden #ac-sidebar { visibility: hidden; border-right: none; }

#ac-sidebar {
  background: rgba(20, 20, 23, .25);
  border-right: 1px solid rgba(255, 255, 255, .1);
  overflow-y: auto;
  backdrop-filter: blur(24px) saturate(180%);
}
#ac-tree { list-style: none; margin: 0; padding: .35rem 0; }
.ac-section {
  margin-bottom: .3rem;
}
.ac-section-h {
  display: flex; align-items: center; gap: .4rem;
  padding: .55rem .85rem .35rem;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--p-light); font-weight: 600;
  cursor: pointer; user-select: none;
}
.ac-section-h .ac-chev {
  display: inline-block; transition: transform .15s;
  font-size: .75rem; opacity: .6;
}
.ac-section.collapsed .ac-chev { transform: rotate(-90deg); }
.ac-section.collapsed .ac-sub { display: none; }
.ac-sub { list-style: none; margin: 0; padding: 0; }
.ac-sub li {
  display: flex; align-items: center; gap: .4rem;
  padding: .35rem .85rem .35rem 1.6rem;
  cursor: pointer;
  font-size: .8rem; color: #d4d4d8;
  border-bottom: 1px solid rgba(255, 255, 255, .03);
  transition: background .12s;
}
.ac-sub li:hover { background: rgba(var(--p-base-rgb), .07); }
.ac-sub li.active {
  background: rgba(var(--p-glow-rgb), .12);
  box-shadow: inset 2px 0 0 var(--p-base);
  color: var(--p-base);
}
.ac-sub .ac-sub-icon { color: var(--p-light); flex-shrink: 0; display: inline-flex; align-items: center; }
.ac-sub li.active .ac-sub-icon { color: var(--p-base); }
.ac-sub .ac-sub-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-sub .ac-sub-badges { display: flex; gap: .2rem; }
.ac-sub .ac-b {
  font-size: .58rem; font-weight: 700;
  padding: .05rem .32rem; border-radius: 3px; border: 1px solid;
  font-family: 'Menlo','Consolas',monospace;
}
.ac-sub .ac-b.travail { color: var(--v4); border-color: var(--v4); background: rgba(var(--v4-rgb), .12); }
.ac-sub .ac-b.support { color: var(--v3); border-color: var(--v3); background: rgba(var(--v3-rgb), .12); }
.ac-sub .ac-b.custom  { color: #fb923c; border-color: #fb923c; background: rgba(251, 146, 60, .12); }

#ac-main { display: flex; flex-direction: column; background: transparent; position: relative; overflow: hidden; min-height: 0; }
#ac-main .sidebar-handle {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 12px; height: 64px;
  background: rgba(39, 39, 42, .55);
  border: 1px solid rgba(255, 255, 255, .08); border-left: none;
  border-radius: 0 6px 6px 0;
  color: var(--p-light);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .9rem; line-height: 1; padding: 0; z-index: 10;
  backdrop-filter: blur(15px);
}
#ac-main .sidebar-handle:hover { background: rgba(var(--p-base-rgb), .18); color: var(--p-base); }

#ac-content { flex: 1; overflow-y: auto; padding: .9rem 1rem; }
.access-empty { color: #64748b; font-style: italic; padding: 1rem; text-align: center; }

/* ===== Vue Datasets — chrome .card-pri (ref design Vincent 2026-04-29)
   UNIFORME --p-base partout (pas de différenciation travail/support en couleur). ===== */
/* UI-CARDPRI: chrome herite de .card-pri, on ne garde que le layout local */
.ac-ds-card {
  padding: .8rem 1rem;
  margin-bottom: .5rem;
}
/* travail/support : pas de couleur sur la card (info portée par badge interne si besoin) */
.ac-ds-card-h {
  display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem;
}
.ac-ds-card-h .ac-ds-label { color: #e4e4e7; font-weight: 600; font-size: .95rem; flex: 1; }
.ac-ds-card-h .ac-ds-edit-btn {
  background: transparent; border: 1px solid rgba(255, 255, 255, .12);
  color: var(--p-light); border-radius: 4px;
  padding: .25rem .55rem; cursor: pointer; font-size: .76rem;
  display: inline-flex; align-items: center; gap: .25rem;
}
.ac-ds-card-h .ac-ds-edit-btn:hover:not(:disabled) {
  background: rgba(var(--p-base-rgb), .12); border-color: rgba(var(--p-base-rgb), .35); color: var(--p-base);
}
.ac-ds-card-h .ac-ds-edit-btn:disabled { opacity: .35; cursor: not-allowed; }
.ac-ds-meta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: .73rem; font-family: 'Menlo','Consolas',monospace;
  color: #94a3b8; margin-bottom: .4rem;
}
.ac-ds-meta .k { color: #64748b; }
.ac-ds-desc { color: #d4d4d8; font-size: .82rem; margin-bottom: .55rem; line-height: 1.45; }
.ac-ds-rights {
  display: flex; gap: .35rem; align-items: center;
  font-size: .76rem;
  margin-top: .35rem;
}
.ac-ds-rights-label {
  color: #94a3b8; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
  font-family: 'Menlo','Consolas',monospace;
  margin-right: .35rem;
}
.ac-ds-r-pill {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 4px;
  border: 1px solid;
  font-family: 'Menlo','Consolas',monospace;
  font-weight: 700; font-size: .8rem;
}
.ac-ds-r-pill.yes { color: var(--v4); border-color: var(--v4); background: rgba(var(--v4-rgb), .12); }
.ac-ds-r-pill.no  { color: #475569; border-color: rgba(255, 255, 255, .08); background: transparent; opacity: .4; }

/* ===== Montages CIFS (badges + plafond NAS) ===== */
.ac-mb-group { display: inline-flex; gap: .3rem; margin-left: .5rem; }
.ac-mb {
  display: inline-flex; align-items: center;
  padding: .08rem .4rem; border-radius: 4px;
  font-size: .64rem; font-weight: 700; letter-spacing: .03em;
  font-family: 'Menlo','Consolas',monospace; text-transform: uppercase;
  border: 1px solid;
}
.ac-mb.up   { color: var(--v4); border-color: var(--v4); background: rgba(var(--v4-rgb), .12); }
.ac-mb.down { color: #94a3b8; border-color: rgba(255,255,255,.12); background: transparent; }
.ac-mb.rw   { color: #fbbf24; border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.1); }
.ac-mb.ro   { color: #38bdf8; border-color: rgba(56,189,248,.5); background: rgba(56,189,248,.1); }
.ac-ds-rights-2 { flex-direction: column; align-items: flex-start; gap: .3rem; }
.ac-ds-rights-line { display: flex; gap: .35rem; align-items: center; }
.ac-ds-rights-line .ac-ds-rights-label { min-width: 76px; }
.ac-ds-unsynced { color: #fbbf24; font-size: .72rem; font-style: italic; }
.ac-acl-hint {
  width: 100%; margin: 0 0 .5rem; padding: .45rem .6rem;
  background: rgba(56,189,248,.08); border: 1px solid rgba(56,189,248,.25);
  border-radius: 5px; color: #bae6fd; font-size: .76rem; line-height: 1.4;
}
.ac-acl-cb.capped { opacity: .5; cursor: not-allowed; }
.ac-acl-cb.capped em { color: #38bdf8; font-style: normal; font-size: .68rem; }

/* ===== Vue Permissions UI ===== */
.ac-perm-tab-block {
  background: rgba(24, 24, 27, .42);
  border: 1px solid rgba(255, 255, 255, .06);
  border-left: 3px solid var(--p-base);
  border-radius: 6px;
  margin-bottom: .5rem;
}
.ac-perm-tab-h {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem .85rem;
  cursor: pointer; user-select: none;
}
.ac-perm-tab-h .ac-perm-chev {
  font-size: .8rem; color: var(--p-light); opacity: .55; transition: transform .15s;
}
.ac-perm-tab-block.expanded .ac-perm-chev { transform: rotate(90deg); opacity: 1; }
.ac-perm-tab-h .ac-perm-tab-name {
  flex: 1; color: #e4e4e7; font-weight: 600; font-size: .92rem;
}
.ac-perm-tab-h .ac-perm-count {
  font-size: .68rem; color: #94a3b8; font-family: 'Menlo','Consolas',monospace;
}
.ac-perm-tab-h .ac-perm-mode-sel {
  background: rgba(39, 39, 42, .65); color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 4px; padding: .2rem .4rem; font-size: .75rem;
  font-family: inherit;
}
.ac-perm-tab-h .ac-perm-mode-sel:disabled { opacity: .5; cursor: not-allowed; }

.ac-perm-controls {
  border-top: 1px dashed rgba(255, 255, 255, .07);
  padding: .35rem .85rem .55rem;
  display: none;
}
.ac-perm-tab-block.expanded .ac-perm-controls { display: block; }
.ac-perm-ctrl-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: .5rem; align-items: center;
  padding: .3rem 0;
  font-size: .82rem;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.ac-perm-ctrl-row:last-child { border-bottom: none; }
.ac-perm-ctrl-row .ac-perm-ctrl-name { color: #d4d4d8; }
.ac-perm-ctrl-row .ac-perm-ctrl-desc { font-size: .72rem; color: #64748b; margin-left: .4rem; }
.ac-perm-ctrl-row .ac-perm-ctrl-custom-flag {
  font-size: .58rem; padding: .05rem .3rem; border-radius: 3px;
  color: #fb923c; border: 1px solid #fb923c; background: rgba(251, 146, 60, .12);
  font-family: 'Menlo','Consolas',monospace; text-transform: uppercase; letter-spacing: .04em;
}
.ac-perm-ctrl-row .ac-perm-reset-btn {
  background: transparent; border: 1px solid rgba(255, 255, 255, .12);
  color: #64748b; border-radius: 3px;
  padding: .2rem .45rem; cursor: pointer; font-size: .68rem;
}
.ac-perm-ctrl-row .ac-perm-reset-btn:hover:not(:disabled) {
  color: var(--p-base); border-color: rgba(var(--p-base-rgb), .35);
}
.ac-perm-ctrl-row .ac-perm-reset-btn:disabled { opacity: 0; cursor: default; }

/* ===== Modal édit dataset ===== */
.ac-modal .modal {
  max-width: 720px !important; width: 94vw !important;
  max-height: 90vh !important;
  display: flex; flex-direction: column;
  padding: 1.2rem 1.3rem !important;
}
.ac-modal h2 { margin-bottom: .8rem; }
.ac-modal h3 { font-size: .82rem; color: var(--p-light); text-transform: uppercase; letter-spacing: .05em; margin: 1rem 0 .5rem; }
#ac-ds-form { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

.ac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem .85rem;
  margin-bottom: .5rem;
}
.ac-grid label { display: flex; flex-direction: column; gap: .25rem; font-size: .78rem; color: #d4d4d8; }
.ac-grid label > span { color: #94a3b8; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.ac-grid .ac-full { grid-column: 1 / -1; }
.ac-grid input[type="text"], .ac-grid select, .ac-grid textarea {
  background: rgba(39, 39, 42, .5); color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 5px; padding: .35rem .55rem; font-size: .82rem;
  font-family: inherit; box-sizing: border-box;
}
.ac-grid textarea { resize: vertical; min-height: 38px; line-height: 1.45; }
.ac-grid input:focus, .ac-grid select:focus, .ac-grid textarea:focus {
  outline: none; border-color: var(--p-base);
  box-shadow: 0 0 0 2px rgba(var(--p-base-rgb), .18);
}

.ac-acl-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  padding: .55rem .65rem;
  background: rgba(0, 0, 0, .15);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 4px;
}
.ac-acl-cb {
  display: flex; align-items: center; gap: .4rem;
  font-size: .8rem; color: #d4d4d8;
  cursor: pointer;
  padding: .25rem .35rem;
  border-radius: 3px;
  transition: background .12s;
}
.ac-acl-cb:hover { background: rgba(var(--p-base-rgb), .06); }
.ac-acl-cb input[type="checkbox"] {
  margin: 0; width: 16px; height: 16px;
  accent-color: var(--p-base);
  cursor: pointer;
}
.ac-acl-cb b { color: var(--p-base); font-family: 'Menlo','Consolas',monospace; }

.ac-modal-actions {
  display: flex; gap: .5rem; align-items: center; justify-content: flex-end;
  padding-top: .8rem; margin-top: .6rem; flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.ac-modal-actions button {
  background: rgba(39, 39, 42, .6); color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: 5px;
  padding: .4rem .85rem; font-size: .82rem; cursor: pointer;
}
.ac-modal-actions button.primary {
  background: linear-gradient(135deg, rgba(var(--p-base-rgb), .85), rgba(var(--p-glow-rgb), .75));
  color: var(--p-text-on); border-color: rgba(var(--p-soft-rgb), .8); font-weight: 600;
}
.ac-err {
  color: #fecaca; font-size: .8rem;
  padding: .4rem .6rem;
  background: rgba(239, 68, 68, .1);
  border-left: 2px solid var(--v2);
  border-radius: 0 4px 4px 0;
  margin-top: .5rem; flex-shrink: 0;
}

/* ============================================================================
   STANDARD TOOLBAR — uniforme reference Biometrie sante (Vincent 2026-05-10)
   Principle DB #102 — zone figee + controls coherents inter-tabs et inter-VMs.
   ============================================================================ */
.access-toolbar {
  min-height: 3.15rem !important;
  box-sizing: border-box !important;
}
.access-toolbar input[type="search"],
.access-toolbar input[type="text"],
.access-toolbar input[type="date"],
.access-toolbar input[type="number"],
.access-toolbar select,
.access-toolbar button.t-btn {
  background: rgba(39, 39, 42, .45);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  padding: .22rem .55rem;
  font-size: .82rem;
  font-family: 'Menlo','Consolas',monospace;
  height: 28px;
  box-sizing: border-box;
  line-height: 1.2;
}
.access-toolbar button.t-btn:hover:not(:disabled) {
  background: rgba(var(--p-base-rgb), .18);
  color: var(--p-base);
  border-color: rgba(var(--p-base-rgb), .35);
}
.access-toolbar label {
  font-size: .82rem;
  color: #d4d4d8;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  line-height: 1.2;
}

/* --- Boutons d'action sur les cartes de montage (Démonter / Retirer) --- */
.ac-ds-act-btn { font-size:.7rem; padding:.2rem .55rem; border-radius:6px; border:1px solid rgba(255,255,255,.15); background:transparent; color:#94a3b8; cursor:pointer; display:inline-flex; align-items:center; gap:.25rem; }
.ac-ds-act-btn:hover:not(:disabled) { background:rgba(255,255,255,.06); }
.ac-ds-act-btn:disabled { opacity:.4; cursor:not-allowed; }
.ac-ds-act-btn.unmount { color:#fbbf24; border-color:rgba(251,191,36,.35); }
.ac-ds-act-btn.remove  { color:var(--v2,#f87171); border-color:rgba(248,113,113,.35); }

/* === Droits montage : grille NAS (plafond) vs Local (effectif) === */
.ac-rights-grid { margin-top: .45rem; }
.ac-rg-caption { font-size: .72rem; color: #94a3b8; line-height: 1.45; margin-bottom: .4rem; max-width: 56ch; }
.ac-rg-caption b { color: #cbd5e1; font-weight: 600; }
.ac-rg-caption.warn { color: #fbbf24; }
.ac-rg-table {
  display: inline-grid; grid-template-columns: auto repeat(5, 26px); gap: 3px; align-items: center;
  background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.07); border-radius: 6px; padding: .35rem .5rem;
}
.ac-rg-col { text-align: center; font-size: .68rem; font-weight: 700; font-family: 'Menlo','Consolas',monospace; color: #64748b; }
.ac-rg-row-label { font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; font-family: 'Menlo','Consolas',monospace; color: #94a3b8; padding-right: .55rem; white-space: nowrap; }
.ac-rg-cell { width: 24px; height: 22px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; border: 1px solid transparent; }
.ac-rg-cell.on      { color: var(--v4); border-color: var(--v4); background: rgba(var(--v4-rgb), .14); }
.ac-rg-cell.off     { color: #475569; border-color: rgba(255,255,255,.07); }
.ac-rg-cell.avail   { color: #64748b; border-color: rgba(255,255,255,.13); }
.ac-rg-cell.blocked { color: #3f3f46; background: repeating-linear-gradient(45deg, transparent, transparent 3px, rgba(255,255,255,.035) 3px, rgba(255,255,255,.035) 6px); }

/* === ACL editor (modal) : plafond NAS de référence + cases locales === */
#ac-acl-editor { display: flex; flex-direction: column; gap: .55rem; }
.ac-acl-nas-ref { display: flex; align-items: center; gap: .3rem; padding: .35rem .55rem; background: rgba(56,189,248,.06); border: 1px solid rgba(56,189,248,.2); border-radius: 5px; }
.ac-acl-nas-label { text-transform: uppercase; letter-spacing: .04em; font-family: 'Menlo','Consolas',monospace; font-size: .62rem; color: #7dd3fc; margin-right: .35rem; white-space: nowrap; }
.ac-acl-nas-cell { width: 22px; height: 20px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; font-family: 'Menlo','Consolas',monospace; font-weight: 700; font-size: .74rem; border: 1px solid; }
.ac-acl-nas-cell.on  { color: var(--v4); border-color: var(--v4); background: rgba(var(--v4-rgb), .12); }
.ac-acl-nas-cell.off { color: #475569; border-color: rgba(255,255,255,.08); opacity: .55; }
.ac-acl-hint.warn { background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.3); color: #fde68a; }
.ac-acl-cb.capped em { color: #f87171; font-style: normal; font-size: .68rem; }
