/* ==========================================================================
   Template V6 ter : écrans types (chargé après v6c-dockspace.css)
     .vc-main       panneau principal : bandeau, corps, pied
     .vc-home       ACCUEIL : blocs (indicateurs, files de travail, planning, alertes)
     .vc-list       LISTE : barre de vue, filtres par colonne, regroupement, sélection, lot
     .vc-form       FICHE : formulaire construit depuis un schéma
     .vc-wiz        ASSISTANT : étapes, contrôle, compte rendu
     .vc-tree       panneau ARBRE ; .vc-ctx panneau CONTEXTE
   ========================================================================== */
.h6.ds-page { --list-w: 0; }
.ds-page .h6-detail { display: flex; flex-direction: column; min-width: 0; }
.vc-main { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.vc-main > .h6-dhead { height: var(--band-h); flex: none; flex-wrap: nowrap; }
.vc-main > .h6-dhead .ttl small { display: flex; align-items: center; gap: 0.375rem; }
.vc-body { flex: 1; min-height: 0; overflow: auto; padding: var(--pad); display: flex; flex-direction: column; gap: var(--gap); }
.vc-body.flush { padding: 0; overflow: hidden; gap: 0; }
.vc-foot { flex: none; }
.vc-live { color: var(--ok); font-weight: 600; }
.vc-bar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.5rem var(--pad); border-bottom: 1px solid var(--border); background: var(--surface); }
.vc-bar .spacer { flex: 1; }
.vc-bar .select, .vc-bar .input { height: 1.875rem; }
.vc-bar label.lbl { display: flex; align-items: center; gap: 0.375rem; font-size: var(--fs-xs); color: var(--text-muted); }
.vc-note { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.5rem 0.75rem; border-radius: var(--radius-lg); background: var(--info-soft); font-size: var(--fs-sm); }
.vc-note .ico { color: var(--info); flex-shrink: 0; margin-top: 0.125rem; }
/* Lien dans une note (ex. « onglet Actions », CHG-013) : couleur du texte de la note, souligné et gras (contraste AA, repérable sans la couleur). */
.vc-note .vc-lien { color: inherit; font-weight: 650; text-decoration: underline; text-underline-offset: 0.125rem; }
.vc-note .vc-lien:hover { text-decoration-thickness: 2px; }
.vc-note.warn { background: var(--warn-soft); } .vc-note.warn .ico { color: var(--warn); }
.vc-note.err { background: var(--err-soft); } .vc-note.err .ico { color: var(--err); }
.vc-note .btn { margin-left: auto; flex-shrink: 0; }
.vc-note[hidden] { display: none; }
.vc-main > .h6-dhead .ttl h1 { white-space: nowrap; }
.vc-main > .h6-dhead .acts { flex-wrap: nowrap; }
@container (max-width: 61.25rem) { .vc-main > .h6-dhead .acts kbd { display: none; } }
.vc-muted { color: var(--text-muted); font-size: var(--fs-xs); }
.vc-tag { display: inline-flex; align-items: center; gap: 0.25rem; padding: 1px 0.4375rem; border-radius: 62.4375rem; font-size: var(--fs-xs); font-weight: 600; background: var(--surface-3); color: var(--text-muted); white-space: nowrap; }
.vc-tag.ok { background: var(--ok-soft); color: var(--ok); } .vc-tag.warn { background: var(--warn-soft); color: var(--warn); }
.vc-tag.err { background: var(--err-soft); color: var(--err); } .vc-tag.info { background: var(--info-soft); color: var(--info); }
/* Texte en accent foncé : contraste AA sur le fond accent clair dans les trois thèmes (axe-core, CHG-007). */
.vc-tag.accent { background: var(--accent-soft); color: var(--accent-hover); }

/* ---------- ACCUEIL : blocs ---------- */
.vc-home { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-content: start; }
.vc-blk { grid-column: span 6; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.vc-blk.w12 { grid-column: 1 / -1; } .vc-blk.w8 { grid-column: span 8; } .vc-blk.w4 { grid-column: span 4; }
.vc-blk > header { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--border); }
.vc-blk > header h3 { font-size: var(--fs-base); flex: 1; }
.vc-blk > header .vc-mod { font-size: var(--fs-xs); color: var(--text-faint); }
.vc-blk > .b { padding: 0.375rem 0.875rem 0.75rem; }
@container (max-width: 56.25rem) { .vc-blk, .vc-blk.w8, .vc-blk.w4 { grid-column: 1 / -1; } }
.vc-kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(10.625rem, 1fr)); gap: var(--gap); }
.vc-kpi { display: flex; flex-direction: column; gap: 0.125rem; padding: 0.75rem 0.875rem; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; font: inherit; color: var(--text); position: relative; }
.vc-kpi:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.vc-kpi b { font-size: var(--fs-2xl); font-weight: 650; font-variant-numeric: tabular-nums; }
.vc-kpi span { font-size: var(--fs-sm); color: var(--text-muted); }
.vc-kpi small { font-size: var(--fs-xs); color: var(--text-faint); }
.vc-kpi.warn b { color: var(--warn); } .vc-kpi.err b { color: var(--err); } .vc-kpi.ok b { color: var(--ok); }
.vc-kpi::after { content: "→ liste filtrée"; position: absolute; right: 0.75rem; top: 0.75rem; font-size: var(--fs-xs); color: var(--accent); opacity: 0; transition: opacity .15s; }
.vc-kpi:hover::after { opacity: 1; }
.vc-work { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.vc-work td { padding: 0.4375rem 0.375rem; border-top: 1px solid var(--border); vertical-align: middle; }
.vc-work tr:first-child td { border-top: 0; }
.vc-work tr { cursor: pointer; }
.vc-work tr:hover td { background: var(--surface-2); }
.vc-work .u { width: 0.625rem; } .vc-work .u i { display: block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--text-faint); }
.vc-work .u i.err { background: var(--err); } .vc-work .u i.warn { background: var(--warn); } .vc-work .u i.ok { background: var(--ok); }
.vc-work .t b { display: block; font-weight: 600; } .vc-work .t small { color: var(--text-faint); }
.vc-work .d { white-space: nowrap; text-align: right; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.vc-plan { list-style: none; margin: 0; padding: 0; }
.vc-plan li { display: grid; grid-template-columns: 3.25rem 0.75rem minmax(0, 1fr); gap: 0.5rem; padding: 0.4375rem 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); }
.vc-plan li:first-child { border-top: 0; }
.vc-plan time { font-family: var(--font-mono); color: var(--text-muted); }
.vc-plan i { width: 0.625rem; height: 0.625rem; margin-top: 0.25rem; border-radius: 50%; border: 0.125rem solid var(--accent); }
.vc-plan li.done i { background: var(--ok); border-color: var(--ok); } .vc-plan li.now i { background: var(--accent); }
.vc-plan li.done { color: var(--text-faint); }
.vc-alert { display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.5rem 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); cursor: pointer; }
.vc-alert:first-child { border-top: 0; }
.vc-alert .ico { flex-shrink: 0; margin-top: 0.125rem; color: var(--warn); }
.vc-alert.err .ico { color: var(--err); }
.vc-alert small { display: block; color: var(--text-faint); }

/* ---------- LISTE ---------- */
.vc-list { flex: 1; min-height: 0; overflow: auto; background: var(--surface); }
.vc-list table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.vc-list th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); padding: 0.4375rem 0.5rem; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none; }
.vc-list th.num, .vc-list td.num { text-align: right; }
.vc-list th .srt { color: var(--accent); margin-left: 0.25rem; }
.vc-list tr.flt th { top: 1.9375rem; background: var(--surface); padding: 0.25rem 0.375rem; cursor: default; }
.vc-list tr.flt input { width: 100%; height: 1.625rem; padding: 0 0.375rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); font: inherit; font-size: var(--fs-xs); color: var(--text); }
.vc-list tr.flt input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.vc-list td { padding: 0.4375rem 0.5rem; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 16.25rem; }
.vc-list tbody tr { cursor: pointer; }
.vc-list tbody tr:hover td { background: var(--surface-2); }
.vc-list tbody tr.cur td { background: var(--accent-soft); }
.vc-list tbody tr.cur td:first-child { box-shadow: inset 0.1875rem 0 0 var(--accent); }
.vc-list tbody tr.chk td { background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.vc-list tr.grp td { background: var(--surface-3); font-weight: 650; font-size: var(--fs-xs); color: var(--text-muted); cursor: default; }
.vc-list td.cb, .vc-list th.cb { width: 1.875rem; text-align: center; }
.vc-list .mono { font-family: var(--font-mono); }
/* Barre d'actions de lot : flotte au bas de la liste, sans décaler les lignes sous le curseur */
.vc-body.flush { position: relative; }
.vc-lot { position: absolute; z-index: 6; left: 50%; bottom: 2.75rem; transform: translateX(-50%); width: max-content; max-width: calc(100% - 2rem);
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.375rem 0.5rem 0.375rem 0.875rem; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--radius-lg); background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); box-shadow: var(--shadow-lg); font-size: var(--fs-sm); }
.vc-lot[hidden] { display: none; }
.vc-lot b { color: var(--accent); }
/* Panneau Sélection d'une liste : plusieurs lignes cochées (CHG-009, v6c-selection-multiple). */
.vc-sel-resume { display: flex; flex-wrap: wrap; gap: 0.375rem; align-items: center; }
.vc-sel-resume .vc-sel-aucun { margin-left: auto; }
.vc-sel-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.vc-sel-actions .act { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: 0.75rem; align-items: center; }
.vc-sel-actions .act .btn { justify-content: flex-start; }
.vc-sel-actions .act .portee { font-size: var(--fs-xs); color: var(--text-muted); }
.vc-sel-actions .act .portee b { color: var(--text); font-weight: 600; }
.vc-sel-actions .act.aucun .portee { color: var(--text-faint); }
.vc-sum { display: flex; gap: 1rem; padding: 0.375rem var(--pad); border-top: 1px solid var(--border); background: var(--surface); font-size: var(--fs-xs); color: var(--text-muted); }
.vc-sum b { color: var(--text); }

/* ---------- Panneau ARBRE ---------- */
.vc-tree { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.vc-tree ul { list-style: none; margin: 0 0 0 0.6875rem; padding-left: 0.875rem; position: relative; }
/* Lignes de l'arbre : un trait vertical par niveau, un trait horizontal vers chaque nœud (DEC-038, 13/11/2026). */
.vc-tree ul > li { position: relative; }
.vc-tree ul > li::before { content: ""; position: absolute; left: -0.875rem; top: 0; bottom: 0; border-left: 1px solid var(--border-strong); }
.vc-tree ul > li:last-child::before { bottom: auto; height: 0.9375rem; }
.vc-tree ul > li::after { content: ""; position: absolute; left: -0.875rem; top: 0.9375rem; width: 0.75rem; border-top: 1px solid var(--border-strong); }
.vc-tree .n { display: flex; align-items: center; gap: 0.375rem; width: 100%; padding: 0.3125rem 0.375rem; border: 0; border-radius: var(--radius); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.vc-tree .n:hover { background: var(--surface-3); }
.vc-tree .n.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.vc-tree .n .c { margin-left: auto; font-size: var(--fs-xs); color: var(--text-faint); }
.vc-tree .n .tw { width: 0.75rem; color: var(--text-faint); flex-shrink: 0; }
.vc-tree li.closed > ul { display: none; }
.vc-tree .n .add { margin-left: 0.25rem; }
/* Filtre d'un arbre (ex. « Filtrer les fonctionnalités ») : hauteur standard des champs, sans se tasser dans la
   colonne flexible du panneau ; une fois saisi, la croix des filtres de colonne (.vc-fcell, .vc-fclear) le vide. */
.vc-tfilter { width: 100%; margin-bottom: 0.5rem; }
.vc-fcell.vc-tfilter { flex-shrink: 0; }
.vc-fcell.vc-tfilter .input { margin: 0; }
.vc-fcell.vc-tfilter .input.on { padding-right: 1.75rem; }

/* ---------- Panneau CONTEXTE ---------- */
.vc-ctx { display: flex; flex-direction: column; gap: 0.625rem; }
.vc-ctxtabs { align-self: flex-start; flex-wrap: wrap; }
.vc-ctxtabs .btn.active, .vc-ctxtabs .btn.active:hover { background: var(--accent-soft); color: var(--accent-hover); }  /* contraste AA, même au survol (DEC-034) */
.vc-ctxpane { display: flex; flex-direction: column; gap: 0.625rem; }  /* même écart entre blocs que .vc-ctx (note, frise, chaîne) */
.vc-ctxpane[hidden] { display: none; }
.vc-hist { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.vc-hist li { display: grid; grid-template-columns: 4.625rem minmax(0, 1fr); gap: 0.125rem 0.625rem; padding: 0.4375rem 0; border-top: 1px solid var(--border); }
.vc-hist li:first-child { border-top: 0; }
.vc-hist time { color: var(--text-faint); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.vc-hist small { grid-column: 2; color: var(--text-faint); }
.vc-drop { display: grid; place-items: center; gap: 0.375rem; padding: 1.125rem; border: 0.125rem dashed var(--border-strong); border-radius: var(--radius-lg); color: var(--text-faint); font-size: var(--fs-sm); text-align: center; }
.vc-files { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.vc-files li { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0; border-top: 1px solid var(--border); }

/* ---------- FICHE ---------- */
.vc-form { max-width: 61.25rem; display: flex; flex-direction: column; gap: 0.875rem; }
.vc-form .form-section { --form-cols: 3; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.75rem 1rem 1rem; }
@container (max-width: 47.5rem) { .vc-form .form-section { --form-cols: 1; } }
.vc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.75rem 1rem 0.875rem; }
.vc-card > h3 { display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-base); margin-bottom: 0.625rem; }
.vc-card > h3 .ico { color: var(--accent); }
.vc-card > h3 .r { margin-left: auto; font-weight: 500; font-size: var(--fs-xs); color: var(--text-muted); }
.vc-lines { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.vc-lines th { text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); padding: 0.25rem; border-bottom: 1px solid var(--border); }
.vc-lines td { padding: 0.25rem; border-bottom: 1px solid var(--border); }
.vc-lines .input, .vc-lines .select { height: 1.75rem; width: 100%; font-size: var(--fs-sm); padding: 0 0.375rem; }
.vc-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.vc-chip { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.1875rem 0.25rem 0.1875rem 0.625rem; border-radius: 62.4375rem; background: var(--accent-soft); color: var(--accent); font-size: var(--fs-sm); font-weight: 600; }
.vc-chip button { display: grid; place-items: center; width: 1.125rem; height: 1.125rem; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.vc-chip button:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.vc-chip small { font-weight: 500; color: var(--text-muted); }
.vc-draft { font-size: var(--fs-xs); color: var(--text-faint); }

/* ---------- ASSISTANT ---------- */
.vc-wiz { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.vc-wiz .h6-steps { --n: 4; }
.vc-wpane { flex: 1; min-height: 0; overflow: auto; padding: var(--pad); display: flex; flex-direction: column; gap: 0.875rem; }
.vc-wpane > * { max-width: 61.25rem; }
.vc-wq { display: flex; align-items: center; gap: 0.875rem; }
.vc-wq .h6-qico { flex-shrink: 0; }
.vc-wq h2 { font-size: var(--fs-xl); }
.vc-wq p { color: var(--text-muted); font-size: var(--fs-sm); margin: 0.125rem 0 0; }
.vc-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.625rem, 1fr)); gap: 0.625rem; }
.vc-grp { display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.75rem 0.875rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; }
.vc-grp:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 0.1875rem var(--accent-soft); }
.vc-grp input { margin-top: 0.1875rem; }
.vc-grp b { display: block; }
.vc-grp small { color: var(--text-faint); font-size: var(--fs-xs); }
.vc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.375rem, 1fr)); gap: 0.625rem; }
.vc-stat { padding: 0.75rem 0.875rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.vc-stat b { display: block; font-size: var(--fs-2xl); font-weight: 650; font-variant-numeric: tabular-nums; }
.vc-stat span { color: var(--text-muted); font-size: var(--fs-sm); }
.vc-stat.ok b { color: var(--ok); } .vc-stat.info b { color: var(--info); } .vc-stat.err b { color: var(--err); } .vc-stat.plain b { color: var(--text-muted); }
.vc-conf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 0.5rem 0.875rem; align-items: center; padding: 0.625rem 0.875rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.vc-conf.done { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.vc-conf .h { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-sm); }
.vc-conf .side { font-size: var(--fs-sm); padding: 0.375rem 0.625rem; border-radius: var(--radius); background: var(--surface-2); }
.vc-conf .side small { display: block; color: var(--text-faint); font-size: var(--fs-xs); }
.vc-conf .side del { color: var(--err); } .vc-conf .side ins { color: var(--ok); text-decoration: none; font-weight: 600; }
.vc-conf .ch { display: flex; flex-direction: column; gap: 0.25rem; font-size: var(--fs-sm); white-space: nowrap; }

/* ---------- ACCUEIL en tableau de bord (v6c-accueil) ----------
   Cadres d'alerte cliquables en tête, puis tuiles de tailles variées : chiffre clé, petit graphique SVG.
   Couleur : une seule teinte (accent) pour les données ; vert / orange / rouge réservés au sens (état),
   toujours accompagnés d'un texte et d'une icône. */
.vc-dash { display: flex; flex-direction: column; gap: 0.875rem; }
.vc-sect { display: flex; align-items: baseline; gap: 0.625rem; font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); }
.vc-sect span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.vc-alerts { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.875rem, 1fr)); gap: 0.625rem; }
.vc-af {
  position: relative; display: flex; flex-direction: column; gap: 0.125rem; min-height: 7rem; padding: 0.75rem 0.875rem 0.625rem 1rem; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); font: inherit; cursor: pointer;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.vc-af::before { content: ""; position: absolute; left: 0; top: 0.625rem; bottom: 0.625rem; width: 0.25rem; border-radius: 0 0.25rem 0.25rem 0; background: var(--sev, var(--accent)); }
.vc-af:hover, .vc-af:focus-visible { border-color: var(--sev, var(--accent)); box-shadow: var(--shadow); transform: translateY(-1px); outline: none; }
.vc-af:focus-visible { box-shadow: 0 0 0 0.1875rem color-mix(in srgb, var(--sev, var(--accent)) 30%, transparent); }
.vc-af .top { display: flex; align-items: center; gap: 0.375rem; font-size: var(--fs-xs); font-weight: 650; color: var(--sev, var(--accent)); }
.vc-af .top .go { margin-left: auto; color: var(--text-faint); font-weight: 500; opacity: 0; transition: opacity .15s; }
.vc-af:hover .go, .vc-af:focus-visible .go { opacity: 1; }
.vc-af b { font-size: 2.125rem; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vc-af .l { font-size: var(--fs-sm); font-weight: 600; }
.vc-af small { font-size: var(--fs-xs); color: var(--text-muted); margin-top: auto; padding-top: 0.25rem; }
.vc-af[data-sev="err"] { --sev: var(--err); } .vc-af[data-sev="warn"] { --sev: var(--warn); }
.vc-af[data-sev="ok"] { --sev: var(--ok); } .vc-af[data-sev="info"] { --sev: var(--info); }
.vc-af[data-sev="err"] { background: color-mix(in srgb, var(--err-soft) 45%, var(--surface)); }
.vc-tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; gap: 0.75rem; }
.vc-tile { grid-column: span var(--w, 4); display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
@container (max-width: 68.75rem) { .vc-tile { grid-column: span max(6, var(--w, 4)); } }
@container (max-width: 43.75rem) { .vc-tile { grid-column: 1 / -1; } }
.vc-tile > header { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.875rem 0; }
.vc-tile > header h3 { font-size: var(--fs-sm); font-weight: 650; flex: 1; min-width: 0; }
.vc-tile > header .vc-tag { font-weight: 500; }
.vc-tile > header .btn { height: 1.5rem; padding: 0 0.5rem; font-size: var(--fs-xs); }
.vc-tile .bd { flex: 1; padding: 0.375rem 0.875rem 0.75rem; display: flex; flex-direction: column; gap: 0.375rem; min-height: 0; }
.vc-hero { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.vc-hero b { font-size: 1.875rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vc-hero span { color: var(--text-muted); font-size: var(--fs-sm); }
.vc-delta { font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.vc-chart { display: block; width: 100%; height: auto; overflow: visible; }
.vc-chart .grid { stroke: var(--border); stroke-width: 1; }
.vc-chart .axis { fill: var(--text-faint); font-size: 0.625rem; font-family: var(--font); }
.vc-chart .bar { fill: var(--accent); }
.vc-chart .bar.past { fill: color-mix(in srgb, var(--accent) 55%, var(--surface)); }
.vc-chart .bar:hover, .vc-chart .bar.past:hover { fill: var(--accent-hover, var(--accent)); }
.vc-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vc-chart .area { fill: color-mix(in srgb, var(--accent) 12%, transparent); }
.vc-chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.vc-chart .ref { stroke: var(--text-muted); stroke-width: 1.2; stroke-dasharray: 4 3; }
.vc-chart .reflbl { fill: var(--text-muted); font-size: 0.625rem; font-family: var(--font); font-weight: 600; }
.vc-chart .vlbl { fill: var(--text); font-size: 0.6562rem; font-family: var(--font); font-weight: 600; }
.vc-chart .track { fill: none; stroke: var(--surface-3); }
.vc-chart .arc { fill: none; stroke: var(--accent); stroke-linecap: round; }
.vc-chart .big { fill: var(--text); font-size: 1.375rem; font-weight: 700; font-family: var(--font); text-anchor: middle; }
.vc-chart .sub { fill: var(--text-muted); font-size: 0.625rem; font-family: var(--font); text-anchor: middle; }
.vc-chart .hit { fill: transparent; }
.vc-chart .cap { stroke: var(--text); stroke-width: 2; }
.vc-hb { display: grid; grid-template-columns: minmax(0, 6.875rem) minmax(0, 1fr) 2.875rem; gap: 0.375rem 0.625rem; align-items: center; font-size: var(--fs-sm); }
.vc-hb .tr { position: relative; height: 0.75rem; background: var(--surface-3); border-radius: 0 0.25rem 0.25rem 0; }
.vc-hb .tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 0.25rem 0.25rem 0; background: var(--accent); }
.vc-hb .tr em { position: absolute; top: -3px; bottom: -3px; width: 0.125rem; background: var(--text); }
.vc-hb .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.vc-hb .over { color: var(--err); }
.vc-legend { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; font-size: var(--fs-xs); color: var(--text-muted); }
.vc-legend i { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 0.125rem; margin-right: 0.3125rem; vertical-align: -1px; background: var(--accent); }
.vc-legend i.cap { width: 0.125rem; height: 0.75rem; background: var(--text); }
.vc-legend i.ref { width: 0.875rem; height: 0; border-top: 0.125rem dashed var(--text-muted); border-radius: 0; vertical-align: 0.1875rem; }
.vc-dtable { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.vc-dtable th, .vc-dtable td { padding: 0.1875rem 0.375rem; border-bottom: 1px solid var(--border); text-align: left; }
.vc-dtable td.n { text-align: right; font-variant-numeric: tabular-nums; }
.vc-tip { position: fixed; z-index: 500; pointer-events: none; padding: 0.3125rem 0.5rem; border-radius: var(--radius); background: var(--text); color: var(--surface); font-size: var(--fs-xs); box-shadow: var(--shadow); white-space: nowrap; }
.vc-tip[hidden] { display: none; }
.vc-pri { list-style: none; margin: 0; padding: 0; }
.vc-pri li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; padding: 0.4375rem 0; border-top: 1px solid var(--border); font-size: var(--fs-sm); cursor: pointer; }
.vc-pri li:first-child { border-top: 0; }
.vc-pri li:hover .t, .vc-pri li:focus-visible .t { color: var(--accent); }
.vc-pri .t { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-pri small { display: block; font-weight: 400; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-pri .d { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }

/* ---------- Fond illustré d'un accueil (réglage par accueil : illustration, fond uni, image du laboratoire) ----------
   L'image est posée sous le corps du panneau principal, derrière un voile de la couleur du fond ;
   les cartes gardent une surface presque opaque floutée : le texte reste au contraste AA en clair comme en sombre. */
.vc-main.vc-bg { --vc-veil: color-mix(in srgb, var(--bg) 30%, transparent); background-color: var(--bg); background-image: linear-gradient(var(--vc-veil), var(--vc-veil)), var(--vc-img); background-size: cover; background-position: center; }
:root[data-theme="sombre"] .vc-main.vc-bg { --vc-veil: color-mix(in srgb, var(--bg) 84%, transparent); }
:root[data-theme="contraste"] .vc-main.vc-bg { background-image: none; }   /* contraste élevé : jamais d'image */
.vc-main.vc-bg > .vc-body { background: transparent; }
.vc-bg .vc-af, .vc-bg .vc-tile { background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(0.625rem); backdrop-filter: blur(0.625rem); box-shadow: var(--shadow-sm); }
.vc-bg .vc-af[data-sev="err"] { background: color-mix(in srgb, color-mix(in srgb, var(--err-soft) 45%, var(--surface)) 94%, transparent); }
.vc-bg .vc-sect { align-self: flex-start; padding: 0.1875rem 0.75rem; border-radius: 62.4375rem; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(0.5rem); backdrop-filter: blur(0.5rem); color: var(--text-muted); }
.vc-bg .vc-sect span { color: var(--text-muted); }
/* Photo : voile plus soutenu qu'une illustration (image chargée), crédit lisible sur pastille */
.vc-main.vc-bg { --vc-veil: color-mix(in srgb, var(--bg) 42%, transparent); }
:root[data-theme="sombre"] .vc-main.vc-bg { --vc-veil: color-mix(in srgb, var(--bg) 82%, transparent); }
.vc-credit { align-self: flex-end; display: inline-flex; align-items: center; gap: 0.375rem; margin: 0; padding: 0.1875rem 0.625rem; border-radius: 62.4375rem; font-size: var(--fs-xs); color: var(--text-muted); background: color-mix(in srgb, var(--surface) 92%, transparent); }
.vc-credit[hidden] { display: none; }
.vc-credit a { color: var(--text-muted); text-decoration: underline; }

/* ==========================================================================
   Composants communs de P4 (écran de référence REF-UTILISATEURS)
   ========================================================================== */
/* Badge de statut : icône + tonalité + libellé, jamais la couleur seule (docs/p4/statuts.md) */
.vc-st { display: inline-flex; align-items: center; gap: 0.3125rem; padding: 0.0625rem 0.5rem; border-radius: 62.4375rem; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--text-muted); }
.vc-st .i { font-weight: 700; }
.vc-st.t-avenir { background: var(--surface-3); color: var(--text-muted); }
.vc-st.t-encours { background: var(--info-soft); color: var(--info); }
.vc-st.t-attendue { background: var(--warn-soft); color: var(--warn); }
.vc-st.t-termine { background: var(--ok-soft); color: var(--ok); }
.vc-st.t-bloque { background: var(--err-soft); color: var(--err); }
.vc-st.t-inactif { background: var(--surface-3); color: var(--text-faint); text-decoration: line-through; }
.vc-st.t-inactif .i { text-decoration: none; }
.vc-st small { font-weight: 500; opacity: .9; }
.vc-busy { display: inline-flex; align-items: center; gap: 0.25rem; font-size: var(--fs-xs); color: var(--info); font-weight: 600; }
.vc-busy::before { content: ""; width: 0.625rem; height: 0.625rem; border-radius: 50%; border: 0.125rem solid currentColor; border-right-color: transparent; animation: vc-spin .8s linear infinite; }
@keyframes vc-spin { to { transform: rotate(360deg); } }

/* Dialogue (dialog natif : focus piégé, Échap ferme) */
.vc-dlg { width: min(40rem, 94vw); max-height: 88vh; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.vc-dlg::backdrop { background: color-mix(in srgb, var(--text) 35%, transparent); }
.vc-dlg > header { display: flex; align-items: center; gap: 0.625rem; padding: 0.875rem 1.125rem; border-bottom: 1px solid var(--border); }
.vc-dlg > header h2 { font-size: var(--fs-lg); flex: 1; }
.vc-dlg > header .ico { color: var(--accent); }
.vc-dlg.danger > header .ico { color: var(--err); }
.vc-dlg .db { padding: 0.875rem 1.125rem; display: flex; flex-direction: column; gap: 0.75rem; overflow: auto; max-height: 62vh; font-size: var(--fs-sm); }
.vc-dlg > footer { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.125rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.vc-dlg > footer .spacer { flex: 1; }
.vc-dlg .row { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 0.5rem; align-items: center; }
.vc-dlg .row > span { color: var(--text-muted); font-size: var(--fs-xs); }
.vc-dlg .vc-prog { height: 0.5rem; border-radius: 62.4375rem; background: var(--surface-3); overflow: hidden; }
.vc-dlg .vc-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.vc-dlg ul.lst { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); max-height: 11rem; overflow: auto; }
.vc-dlg ul.lst li { display: flex; gap: 0.5rem; align-items: center; padding: 0.3125rem 0.625rem; border-top: 1px solid var(--border); }
.vc-dlg ul.lst li:first-child { border-top: 0; }
.vc-dlg ul.lst li .why { margin-left: auto; color: var(--text-muted); font-size: var(--fs-xs); }
.vc-dlg .effects { margin: 0; padding-left: 1.125rem; }
.vc-dlg .effects li { margin: 0.1875rem 0; }

/* Squelette de chargement (pas d'écran blanc ni de sablier) */
.vc-skel td span { display: block; height: 0.75rem; border-radius: 0.25rem; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: vc-shimmer 1.2s linear infinite; }
@keyframes vc-shimmer { to { background-position: -200% 0; } }
.vc-state { display: flex; flex-direction: column; align-items: center; gap: 0.625rem; padding: 3rem 1rem; text-align: center; color: var(--text-muted); }
.vc-state .ico { color: var(--text-faint); }
.vc-state b { color: var(--text); font-size: var(--fs-md); }

/* Contrôle de saisie : trois niveaux au champ */
.field .vc-msg { display: flex; gap: 0.3125rem; align-items: flex-start; margin-top: 0.25rem; font-size: var(--fs-xs); }
.field .vc-msg.info { color: var(--info); } .field .vc-msg.warn { color: var(--warn); } .field .vc-msg.bloq { color: var(--err); font-weight: 600; }
.field.is-bloq .input { border-color: var(--err); }
.field.is-changed .input, .field.is-changed label.check { outline: 0.125rem solid var(--warn); outline-offset: 1px; border-radius: var(--radius-sm); }
.vc-quick { margin-top: 0.3125rem; }
.vc-matrix { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.vc-matrix th { text-align: left; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); padding: 0.25rem 0.375rem; border-bottom: 1px solid var(--border); }
.vc-matrix td { padding: 0.25rem 0.375rem; border-bottom: 1px solid var(--border); }
.vc-matrix td.c { text-align: center; }
.vc-matrix .src { font-size: var(--fs-xs); color: var(--text-faint); }
.vc-matrix .select { height: 1.75rem; font-size: var(--fs-xs); padding: 0 0.375rem; }
/* Bandeau du panneau principal : le titre se tronque au lieu d'être recouvert par les actions */
.vc-main > .h6-dhead .ttl { min-width: 0; overflow: hidden; }
.vc-main > .h6-dhead .ttl h1, .vc-main > .h6-dhead .ttl small { overflow: hidden; text-overflow: ellipsis; }
.vc-main > .h6-dhead .acts { flex-shrink: 0; }
:root[data-xnarrow] .vc-main > .h6-dhead .acts kbd { display: none; }

/* ---------- Zone de filtre rétractable (P4, panneau principal LISTE) ----------
   Bandeau teinté d'une couleur propre aux filtres (--filt, dérivée de --info dans chaque thème), icône entonnoir.
   Ouverte : vue, regroupement, recherche, filtres par colonne. Repliée : une ligne qui résume les filtres actifs. */
.vc-filt { --filt: var(--info); flex: none; background: color-mix(in srgb, var(--filt) 7%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--filt) 28%, var(--border)); }
.vc-filt-h { display: flex; align-items: center; gap: 0.5rem; min-height: 2.25rem; padding: 0.25rem var(--pad); cursor: pointer; user-select: none; }
.vc-filt-h:hover { background: color-mix(in srgb, var(--filt) 6%, transparent); }
.vc-filt-t { display: inline-flex; align-items: center; gap: 0.375rem; border: 0; background: none; padding: 0.25rem 0.375rem 0.25rem 0; font: inherit; font-size: var(--fs-sm); color: var(--filt); cursor: pointer; flex: none; }
.vc-filt-t b { font-weight: 650; }
.vc-filt-t .vc-filt-n { min-width: 1.125rem; padding: 0 0.3125rem; border-radius: 62.4375rem; background: var(--filt); color: var(--surface); font-size: var(--fs-xs); font-weight: 700; text-align: center; }
.vc-filt-t .vc-filt-n:empty { display: none; }
.vc-filt-t svg:last-child { transition: transform .15s; }
.vc-filt.closed .vc-filt-t svg:last-child { transform: rotate(-90deg); }
.vc-filt-t:focus-visible { outline: 0.125rem solid var(--filt); outline-offset: 0.125rem; border-radius: var(--radius-sm); }
.vc-filt-sum { flex: 1; min-width: 0; display: flex; gap: 0.375rem; overflow: hidden; }
.vc-filt:not(.closed) .vc-filt-sum { visibility: hidden; }
.vc-filt .vc-chip { display: inline-flex; align-items: center; gap: 0.25rem; max-width: 16rem; height: 1.5rem; padding: 0 0.125rem 0 0.5rem; border: 1px solid color-mix(in srgb, var(--filt) 35%, var(--border)); border-radius: 62.4375rem; background: var(--surface); font-size: var(--fs-xs); white-space: nowrap; flex: none; }
.vc-filt .vc-chip i { font-style: normal; color: var(--text-muted); }
.vc-filt .vc-chip span { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.vc-filt .vc-chip button { display: inline-grid; place-items: center; width: 1.125rem; height: 1.125rem; border: 0; border-radius: 50%; background: none; color: var(--text-muted); cursor: pointer; font-size: 0.875rem; line-height: 1; }
.vc-filt .vc-chip button:hover { background: color-mix(in srgb, var(--filt) 15%, transparent); color: var(--text); }
.vc-filt-x[hidden] { display: none; }
.vc-filt-b { display: flex; align-items: center; gap: 0.5rem 0.75rem; flex-wrap: wrap; padding: 0 var(--pad) 0.5rem; }
.vc-filt.closed .vc-filt-b { display: none; }
.vc-filt-b .select, .vc-filt-b .input { height: 1.875rem; }
.vc-filt-b label.lbl { display: flex; align-items: center; gap: 0.375rem; font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; }
.vc-filt-b .search { flex: 1 1 18rem; min-width: 14rem; max-width: 28rem; height: 1.875rem; background: var(--surface); }
/* Filtres par colonne : affichés seulement quand la zone de filtre est ouverte, sur fond teinté */
.vc-main.filt-closed .vc-list tr.flt { display: none; }
.vc-list tr.flt th { background: color-mix(in srgb, var(--info) 7%, var(--surface)); }
.vc-list tr.flt input.on { border-color: var(--info); background: var(--surface); font-weight: 600; }

/* Case de sélection : toute la cellule est cliquable */
.vc-list td.cb, .vc-list th.cb { width: 2.5rem; min-width: 2.5rem; padding: 0; cursor: pointer; }
.vc-list td.cb:hover, .vc-list th.cb:hover { background: color-mix(in srgb, var(--accent) 12%, var(--surface)) !important; }
.vc-list td.cb input, .vc-list th.cb input { width: 1rem; height: 1rem; cursor: pointer; vertical-align: middle; }

/* Pied de liste : compteurs à gauche, réglages de démonstration à droite */
.vc-sum { align-items: center; flex-wrap: wrap; row-gap: 0.25rem; }
.vc-sum > span, .vc-sum #u-sum > span, .vc-sum label.lbl { white-space: nowrap; }
.vc-sum .spacer { flex: 1; }
.vc-sum label.lbl { display: flex; align-items: center; gap: 0.25rem; color: var(--text-faint); }
.vc-sum .select { height: 1.5rem; font-size: var(--fs-xs); padding-top: 0; padding-bottom: 0; }
/* Barre de lot visible : la fin de la liste reste atteignable par défilement */
.vc-body.flush:has(> .vc-lot:not([hidden])) .vc-list { padding-bottom: 3.5rem; }
/* Action sans droit : masquée, pas grisée (le style .btn ne doit pas l'emporter sur hidden) */
[data-need][hidden] { display: none !important; }
/* Liste avec le focus (donné au chargement) : pas de cadre bleu autour, la ligne courante suffit à situer le clavier */
.vc-list:focus, .vc-list:focus-visible { outline: none; }

/* ---------- Panneau CONTEXTE du journal d'audit (CHG-005) ----------
   .vc-frise   historique de l'objet : une carte par entrée, du plus récent au plus ancien, avant → après
   .vc-chaine  maillons n−2 à n+2 autour de l'entrée choisie, reliés par l'empreinte précédente */
.vc-frise { list-style: none; margin: 0; padding: 0 0 0 1rem; position: relative; display: flex; flex-direction: column; gap: 0.625rem; }
.vc-frise::before { content: ""; position: absolute; left: 0.3125rem; top: 0.5rem; bottom: 0.5rem; border-left: 2px solid var(--border); }
.vc-frise > li { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.5rem 0.75rem; font-size: var(--fs-sm); }
.vc-frise > li::before { content: ""; position: absolute; left: -0.9375rem; top: 0.75rem; width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--surface); border: 2px solid var(--text-faint); }
.vc-frise > li.cur { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.vc-frise > li.cur::before { border-color: var(--accent); background: var(--accent); }
.vc-frise .t { display: flex; align-items: baseline; gap: 0.5rem; }
.vc-frise .t time { margin-left: auto; color: var(--text-faint); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.vc-frise .q { color: var(--text-muted); }
.vc-frise .motif { margin-top: 0.25rem; color: var(--text-muted); font-style: italic; }
.vc-frise dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.125rem 0.5rem; margin: 0.375rem 0 0; }
.vc-frise dt { color: var(--text-faint); font-family: var(--font-mono); font-size: var(--fs-xs); }
.vc-frise dd { margin: 0; overflow-wrap: anywhere; }
.vc-frise dd del { color: var(--err); }
.vc-frise dd ins { color: var(--ok); text-decoration: none; }
/* Historique lisible (CHG-008, maquette v6c-historique-lisible) : événement, pastille de ton, résumé, auteur, motif,
   champs à leur libellé ; case « Détails techniques » pour les colonnes et valeurs brutes. */
.vc-hist-outils { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.vc-hist-outils label { display: inline-flex; align-items: center; gap: 0.375rem; font-size: var(--fs-sm); color: var(--text-muted); cursor: pointer; }
.vc-hist-outils .compte { margin-left: auto; font-size: var(--fs-xs); color: var(--text-faint); }
.vc-frise .t .evt { display: inline-flex; align-items: center; gap: 0.375rem; }
.vc-frise .t .evt i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--text-faint); flex: none; }
.vc-frise li.ton-ok .evt i { background: var(--ok); }
.vc-frise li.ton-warn .evt i { background: var(--warn); }
.vc-frise li.ton-err .evt i { background: var(--err); }
.vc-frise li.ton-info .evt i { background: var(--accent); }
.vc-frise .resume { margin-top: 0.25rem; color: var(--text); }
.vc-frise .qui { margin-top: 0.125rem; color: var(--text-muted); font-size: var(--fs-xs); }
.vc-frise .motif-l { margin-top: 0.25rem; color: var(--text-muted); }
.vc-frise .motif-l b { font-weight: 600; color: var(--text-muted); font-style: normal; }
.vc-frise .motif-l span { font-style: italic; }
.vc-frise dl.lisible dt { font-family: inherit; font-size: var(--fs-xs); color: var(--text-muted); }
.vc-frise .tech { margin-top: 0.375rem; padding-top: 0.375rem; border-top: 1px dashed var(--border); }
.vc-frise .tech dl { margin-top: 0; }
.vc-frise .tech .note { font-size: var(--fs-xs); color: var(--text-faint); }
.vc-frise li.groupe { background: var(--surface-2); }
.vc-chaine { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: stretch; }
.vc-chaine .m { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 0.5rem 0.75rem; font-size: var(--fs-sm); }
.vc-chaine .m .t { display: flex; align-items: baseline; gap: 0.5rem; }
.vc-chaine .m .t time { margin-left: auto; color: var(--text-faint); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.vc-chaine .m .q { color: var(--text-muted); }
.vc-chaine .m code { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-muted); }
.vc-chaine .m.cur { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.vc-chaine .m.rompu { border-color: var(--err); background: var(--err-soft); }
.vc-chaine .lien { display: flex; align-items: center; gap: 0.375rem; align-self: center; padding: 0.25rem 0; font-size: var(--fs-xs); color: var(--text-faint); }
.vc-chaine .lien::before { content: ""; width: 2px; height: 1rem; background: var(--border-strong); }
.vc-chaine .lien.ok { color: var(--ok); } .vc-chaine .lien.ok::before { background: var(--ok); }
.vc-chaine .lien.ko { color: var(--err); font-weight: 600; } .vc-chaine .lien.ko::before { background: var(--err); }

/* ---------- Liste de suggestions sous un champ (saisie d'adresse, DEC-040) ----------
   Aussi large que le champ, posée dessous ; ligne choisie en surbrillance (clavier ↑ ↓ ou survol). */
.vc-suggest-hote { position: relative; }
.vc-suggest { position: absolute; top: calc(100% + 0.125rem); left: 0; right: 0; z-index: 30; list-style: none; margin: 0; padding: 0.25rem;
  max-height: 16rem; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.vc-suggest li { padding: 0.375rem 0.5rem; border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-sm); }
.vc-suggest li.sel { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }

/* ---------- Filtre de colonne : croix pour vider la cellule (DEC-043) ---------- */
.vc-fcell { position: relative; display: block; }
.vc-fcell input.on { padding-right: 1.5rem; }
.vc-fclear { position: absolute; top: 50%; right: 0.25rem; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center;
  width: 1.125rem; height: 1.125rem; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text-muted); cursor: pointer; }
.vc-fclear:hover, .vc-fclear:focus-visible { background: var(--accent-soft); color: var(--accent-hover); }

/* ---------- Rôles et habilitations, type LISTE (DEC-044) ---------- */
/* Origine d'un rôle : standard (livré avec myLims) ou spécifique au laboratoire, icône et couleur propres. */
.vc-orig .ico { flex-shrink: 0; }
/* Liste déroulante en arbre à choix multiple (filtre « Menus ») : s'ouvre et se ferme comme une liste. */
.vc-dd { position: relative; display: inline-flex; align-items: center; gap: 0.375rem; }
/* Ancre du panneau : le bouton seul (sans le libellé), pour que la liste s'ouvre alignée sur lui. */
.vc-dd-a { position: relative; display: inline-block; }
.vc-dd-t { width: 18rem; min-width: 12rem; max-width: 18rem; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.vc-dd-t::after { content: ""; float: right; margin: 0.4375rem 0 0 0.5rem; border: 0.3125rem solid transparent; border-top-color: var(--text-muted); border-bottom: 0; }
/* Panneau de la liste : collé sous le bouton, aspect d'une liste à choix multiple (lignes pleine largeur, survol, choix surligné). */
.vc-dd-pop { position: absolute; top: 100%; left: 0; z-index: 30; display: flex; flex-direction: column; width: 100%; min-width: 18rem; box-sizing: border-box; max-height: 26rem;
  background: var(--surface); border: 1px solid var(--border-strong); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-lg); }
/* Liste fermée : l'attribut hidden l'emporte sur display: flex. */
.vc-dd-pop[hidden] { display: none; }
.vc-dd-h { display: flex; gap: 0.375rem; align-items: center; padding: 0.375rem; border-bottom: 1px solid var(--border); }
.vc-dd-h .input { flex: 1; min-width: 0; }
.vc-lb { flex: 1; overflow: auto; list-style: none; margin: 0; padding: 0.25rem 0; font-size: var(--fs-sm); }
.vc-lb li label { display: flex; align-items: center; gap: 0.5rem; padding: 0.25rem 0.625rem; cursor: pointer; }
.vc-lb li label input { margin: 0; }
.vc-lb li:hover label { background: var(--surface-3); }
.vc-lb li.g label { font-weight: 600; color: var(--text); margin-top: 0.125rem; }
.vc-lb li.g .c { margin-left: auto; font-weight: 400; color: var(--text-muted); font-size: var(--fs-xs); }
.vc-lb li.m label { padding-left: 1.75rem; }
.vc-lb li.on label { background: var(--accent-soft); color: var(--accent); }
.vc-dd-pop footer { display: flex; align-items: center; gap: 0.5rem; justify-content: space-between; padding: 0.375rem 0.625rem; border-top: 1px solid var(--border); }
/* Bloc « Dupliquer » en bas du panneau principal. */
/* Onglet « Actions » (CHG-013) : même tête (.vc-hab-tete) et même carte (.dk-card.vc-role-card) que l'onglet
   Habilitations, pour la cohérence de design ; le formulaire et son message prennent toute la largeur de la carte. */
.vc-role-card .vc-dup-b, .vc-role-card .vc-msg { flex-basis: 100%; }
.vc-dup-b { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.375rem; }
.vc-dup-b .input { width: 16rem; max-width: 100%; }
/* Panneau « Habilitations » : carte du rôle, changements en attente, pied Confirmer / Annuler toujours visible. */
.vc-role-card { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.5rem; }
.vc-role-card small { flex-basis: 100%; }
.vc-tree label.n.is-changed { box-shadow: inset 0.1875rem 0 0 var(--warn); }
.vc-hab-pied { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; padding: 0.5rem 0;
  background: var(--surface); border-top: 1px solid var(--border); }
/* Fond transparent sous la liste ouverte : un clic hors de la liste la ferme (rendu serveur, sans script). */
.vc-dd-fond { position: fixed; inset: 0; z-index: 29; }

/* ---------- Bandeau du panneau principal (DEC-044, style K de v6c-titres.html) ----------
   Barre verticale d'accent à gauche (v6b-nav.css, gardée) ; pastille de l'icône de l'écran ; titre prolongé par un trait
   fin pointillé bleu adouci qui s'efface avant les actions ; fond teinté de droite (accent clair) à gauche (surface). */
.vc-main > .h6-dhead { background: linear-gradient(270deg, var(--accent-soft) 0%, var(--surface) 75%); }
.vc-pastille { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; flex-shrink: 0;
  border-radius: var(--radius-lg); background: var(--accent-soft); color: var(--accent-hover); }
.vc-main > .h6-dhead .ttl h1 { width: 100%; }
.vc-main > .h6-dhead .ttl h1::after { content: ""; flex: 1 1 2rem; min-width: 2rem; height: 0; margin-left: 0.25rem;
  border-top: 2px dotted color-mix(in srgb, var(--accent) 55%, transparent);
  mask-image: linear-gradient(90deg, #000, transparent); -webkit-mask-image: linear-gradient(90deg, #000, transparent); }
@container (max-width: 30rem) { .vc-main > .h6-dhead .vc-pastille { display: none; } }
/* Panneau Habilitations : tête fixe (carte du rôle, actions toujours visibles), l'arbre défile dessous (DEC-045). */
.vc-hab-tete { flex-shrink: 0; display: flex; flex-direction: column; gap: 0.5rem; padding: 0.75rem 1rem; background: var(--bg); border-bottom: 1px solid var(--border); }
/* Le trait sépare la tête de la zone qui défile dessous ; une tête seule dans son panneau (onglet Actions) n'en a pas :
   un trait ne sépare que des parties vraiment différentes, qui défilent chacune de leur côté. */
.vc-hab-tete:last-child { border-bottom: 0; }
.vc-hab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
