/* ============================================================
   Audit technique : collectes, dépôt, reconnaissance, schéma, matrice de flux, anomalies, plan d'action.
   Couleurs : uniquement des jetons (thème clair/sombre et palette de l'organisme s'appliquent seuls).
   ============================================================ */
.chip.danger { color: var(--error-text); border-color: var(--error-border); background: var(--error-soft); }
.chip.warn { color: var(--warning-text); background: var(--warning-soft); }

.tech-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tech-col { display: block; color: inherit; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.tech-col:hover { transform: translateY(-2px); box-shadow: var(--shadow-md, var(--shadow)); border-color: var(--border-hover); }
.tech-col .card-b { display: flex; flex-direction: column; gap: 6px; }
.tech-col h3 { margin: 0; font-size: 15px; }
.tech-col svg { color: var(--primary); flex-shrink: 0; }

.tech-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.tech-summary .chip { gap: 4px; }

.tech-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--text-2);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.tech-drop:hover, .tech-drop:focus-visible { border-color: var(--primary); outline: none; }
.tech-drop.over { border-color: var(--primary); background: var(--primary-softer); }
.tech-drop svg { width: 26px; height: 26px; color: var(--primary); }
.tech-drop .big { font-size: 15px; font-weight: 600; color: var(--text); }
.tech-drop .link { color: var(--primary); text-decoration: underline; }
.tech-progress { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-top: 12px; }
.tech-progress > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width var(--dur) linear; }

.tech-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px 22px; }
.tech-cat-row { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.tech-cat-row .grow { flex: 1; min-width: 0; }

.tech-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tech-table th { text-align: start; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted);
  padding: 6px 8px; border-bottom: 1px solid var(--border); }
.tech-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.tech-table tr.clickable { cursor: pointer; }
.tech-table tr.clickable:hover td { background: var(--surface-2); }

.tech-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 13px; margin: 6px 0 12px; }
.tech-kv dt { color: var(--text-muted); }
.tech-kv dd { margin: 0; overflow-wrap: anywhere; }
.tech-conf { display: inline-flex; align-items: center; gap: 8px; }
.tech-bar { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.tech-bar > i { display: block; height: 100%; background: var(--accent); }
.tech-evidence { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tech-evidence button.chip { cursor: pointer; font: inherit; font-size: 12px; line-height: 1.5; padding: 1px 8px; }
.tech-evidence button.chip:hover { border-color: var(--primary); color: var(--primary); }

.tech-code { font-family: var(--mono); font-size: 12px; line-height: 1.55; max-height: 60vh; overflow: auto; direction: ltr; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 0; }
.tech-code .ln { display: flex; white-space: pre; }
.tech-code .ln.hl { background: var(--caution-soft); }
.tech-code .no { flex: 0 0 auto; min-width: 6ch; text-align: right; padding: 0 10px 0 6px; margin-right: 10px; color: var(--text-muted);
  border-right: 1px solid var(--border); user-select: none; }
.tech-code .tx { white-space: pre; padding-right: 12px; }
.tech-viewer-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.tech-viewer-bar input[type="search"] { flex: 1 1 220px; min-width: 0; }

/* ---------- onglets et bandeau d'analyse d'une collecte ---------- */
.tabs a.tab { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.tabs .tab .count { font-size: 11px; padding: 0 6px; border-radius: 10px; background: var(--border-soft); color: var(--text-2); }
.tech-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; margin-bottom: 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); font-size: 13px; }
.tech-banner .grow { flex: 1; min-width: 200px; }
.tech-banner.error { border-color: var(--error-border); background: var(--error-soft); color: var(--error-text); }
.tech-banner.busy { border-color: var(--info-border); background: var(--info-soft); color: var(--info-text); }

/* ---------- criticité, confiance, statuts ---------- */
.sev-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
  white-space: nowrap; line-height: 1.5; border: 0; color: var(--on-status); background: var(--grey); font-family: inherit; }
button.sev-badge { cursor: pointer; }

/* programmes & implémentation */
.pg-audits { display: grid; gap: 6px; max-height: 260px; overflow: auto; padding: 4px 0; }
.pg-audits .check { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Fiche d'un compte (1.108.0) : un organisme rattaché porte deux sélecteurs — le rôle de diffusion et
   le profil applicatif. Sans base de flexion, chacun prend toute la largeur et l'on empile trois lignes
   par organisme ; avec, la ligne reste lisible d'un coup d'œil. */
.pg-audits .check select { flex: 1 1 180px; min-width: 150px; max-width: 100%; }
.pg-comment { border-bottom: 1px dashed var(--line); padding: 6px 0; }

/* collecte à distance */
.rc-target { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: var(--surface); }
.rc-target .check, .row .check { display: inline-flex; align-items: center; gap: 4px; }
.rc-plan { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; margin-bottom: 10px; }
.rc-journal { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.rc-journal .row { gap: 8px; flex-wrap: wrap; padding: 2px 0; border-bottom: 1px dashed var(--line); }
.tg-leg i.ring.dashed { border-style: dashed; }
.tg-leg i.bar { height: 3px; border-radius: 2px; }

/* conformité (CIS, IEC 62443…) */
.cs-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650;
  border: 1px solid transparent; white-space: nowrap; line-height: 1.6; }
button.cs-chip { cursor: pointer; font-family: inherit; }
.cs-pass { color: var(--success-text); background: var(--success-soft); border-color: var(--success-border); }
.cs-fail { color: var(--error-text); background: var(--error-soft); border-color: var(--error-border); }
.cs-manual { color: var(--warning-text); background: var(--warning-soft); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.cs-na { color: var(--muted); background: var(--surface-2); border-color: var(--line); }
.cs-error { color: #fff; background: var(--danger); }
.cs-score { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.cs-score .progress { flex: 1; min-width: 60px; }
.cs-big .cs-score { min-width: min(220px, 60vw); font-size: 15px; }
.cs-logic { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  overflow-x: auto; max-height: 260px; direction: ltr; text-align: left; }
.cs-table-wrap { overflow-x: auto; }
.tech-bmk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tech-bmk-row:last-of-type { border-bottom: 0; }
.sev-critical { background: color-mix(in srgb, var(--error) 78%, #000); color: #fff; }
.sev-high { background: var(--error); color: var(--on-status); }
.sev-medium { background: var(--warning); color: var(--on-status); }
.sev-low { background: var(--caution); color: var(--on-caution); }
.sev-info { background: var(--info); color: var(--on-status); }
.sev-none { background: var(--neutral-soft); color: var(--text-2); }
.trust-chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap;
  border: 1px solid currentColor; line-height: 1.6; }
.trust-internet { color: var(--error-text); background: var(--error-soft); }
.trust-partner { color: var(--violet-text); background: var(--violet-soft); }
.trust-dmz { color: var(--warning-text); background: var(--warning-soft); }
.trust-internal { color: var(--primary); background: var(--primary-soft); }
.trust-mgmt { color: var(--success-text); background: var(--success-soft); }
.trust-unknown { color: var(--text-2); background: var(--border-soft); }
.chip.an-st-new { background: var(--info-soft); color: var(--info-text); }
.chip.an-st-confirmed { background: var(--warning-soft); color: var(--warning-text); }
.chip.an-st-false_positive, .chip.an-st-fixed { background: var(--success-soft); color: var(--success-text); }
.chip.an-st-accepted { background: var(--violet-soft); color: var(--violet-text); }
.chip.act-allow { background: var(--success-soft); color: var(--success-text); }
.chip.act-deny, .chip.act-drop, .chip.act-reject { background: var(--border-soft); color: var(--text-2); }
.chip.prio-P1 { background: color-mix(in srgb, var(--error) 78%, #000); color: #fff; }
.chip.prio-P2 { background: var(--error); color: var(--on-status); }
.chip.prio-P3 { background: var(--warning); color: var(--on-status); }
.chip.prio-P4 { background: var(--border-soft); color: var(--text-2); }
.chip.cmp-new, .chip.cmp-worsened { background: var(--error-soft); color: var(--error-text); }
.chip.cmp-fixed, .chip.cmp-improved { background: var(--success-soft); color: var(--success-text); }
.chip.cmp-persistent { background: var(--warning-soft); color: var(--warning-text); }
tr.risk-row-critical > td:first-child { box-shadow: inset 4px 0 0 color-mix(in srgb, var(--error) 78%, #000); }
tr.risk-row-high > td:first-child { box-shadow: inset 4px 0 0 var(--error); }
tr.risk-row-medium > td:first-child { box-shadow: inset 4px 0 0 var(--warning); }
tr.an-absent td { opacity: .6; }
[dir="rtl"] tr.risk-row-critical > td:first-child, [dir="rtl"] tr.risk-row-high > td:first-child, [dir="rtl"] tr.risk-row-medium > td:first-child {
  box-shadow: none; border-right: 4px solid var(--error); }

/* ---------- schéma ---------- */
.tg-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.tg-toolbar .spacer { flex: 1; }
.tg-canvas { position: relative; height: max(480px, calc(100vh - 330px)); border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; }
.tg-canvas canvas { outline: none; }
.tg-canvas .scene-nav-info { display: none; }
.tg-canvas .scene-tooltip { color: #e6edf5; }
.tg-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.tg-leg { display: inline-flex; align-items: center; gap: 6px; }
.tg-leg i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tg-leg i.ring { background: transparent; border: 3px solid; border-radius: 50%; }
.tg-tip { font: 12px/1.4 var(--font, system-ui); padding: 2px 4px; }
.tr-path { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.tr-an-item { display: flex; width: 100%; align-items: center; gap: 10px; text-align: start; padding: 8px 10px; margin-bottom: 6px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.tr-an-item:hover { border-color: var(--primary); }
.tr-an-item .grow { flex: 1; min-width: 0; }
.tr-json { font-family: var(--mono); font-size: 11.5px; max-height: 280px; overflow: auto; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px; direction: ltr; text-align: left; }
.tr-flow-box { padding: 6px 4px 10px; }
tr.tr-flow-detail td { background: var(--surface-2); }

/* ---------- matrice de zones ---------- */
.zm { border-collapse: separate; border-spacing: 4px; font-size: 12.5px; }
.zm th { font-weight: 600; text-align: center; padding: 4px; white-space: nowrap; }
.zm .zm-corner { color: var(--text-muted); font-weight: 500; font-size: 11px; }
.zm-cell { min-width: 92px; height: 52px; text-align: center; border-radius: 8px; padding: 0; }
.zm-cell button { width: 100%; height: 100%; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 6px; }
.zm-cell button b { font-size: 16px; }
.zm-cell button:hover { outline: 2px solid var(--primary); }
.zm-empty { background: var(--surface-2); }
.zm-none { background: var(--success-soft); color: var(--success-text); }
.zm-low { background: var(--caution-soft); color: var(--text); }
.zm-medium { background: var(--warning-soft); color: var(--warning-text); }
.zm-high { background: var(--error-soft); color: var(--error-text); }
.zm-critical { background: color-mix(in srgb, var(--error) 78%, #000); color: #fff; }
.tr-port { width: 150px; }
.tr-tags { gap: 4px; }

/* ---------- anomalies et plan ---------- */
.tr-bulk { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); }
.tr-bulk .spacer { flex: 1; }
.tr-bulk select { width: auto; }
.tr-cmd pre { font-family: var(--mono); font-size: 12px; line-height: 1.5; margin: 6px 0 0; padding: 10px 12px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); white-space: pre-wrap; overflow-x: auto; direction: ltr; text-align: left; }
.tr-cmd summary, .tr-plan-item details summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.tr-evidence { margin-bottom: 10px; }
.tr-evidence .tech-code { max-height: 260px; }
.tr-triage { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.tr-plan-item { margin-bottom: 12px; border-inline-start: 5px solid var(--grey); }
.tr-plan-item h3 { margin: 0; font-size: 15px; }
.tr-plan-item .card-b { display: flex; flex-direction: column; gap: 6px; }
.tr-plan-item p { margin: 4px 0; }
.sev-edge-critical { border-inline-start-color: color-mix(in srgb, var(--error) 78%, #000); }
.sev-edge-high { border-inline-start-color: var(--error); }
.sev-edge-medium { border-inline-start-color: var(--warning); }
.sev-edge-low { border-inline-start-color: var(--caution); }
.sev-edge-info { border-inline-start-color: var(--info); }
.tr-follow input[type="text"] { width: 220px; }
.tr-follow input[type="date"] { width: 160px; }
.tr-req-list { width: 100%; margin-top: 6px; font-size: 13px; }
.tr-kpis .kpi.k-ok .k-val { color: var(--success-text); }
.tr-kpis .kpi.k-bad .k-val { color: var(--error-text); }

/* ---------- remediation workspace ---------- */
.tr-rem-workspace { position: relative; }
.tr-remediation-wizard { display: grid; gap: 14px; min-width: min(760px, 76vw); }
.tr-wizard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tr-remediation-wizard pre, .tr-version-viewer pre { margin: 6px 0 0; padding: 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font: 12px/1.55 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere; direction: ltr; text-align: left; }
.tr-diff-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tr-diff-side > div, .tr-diff-side > pre { min-width: 0; }
.tr-current-config { margin-top: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface); box-shadow: 0 8px 22px rgba(8,26,44,.08); }
.tr-current-config-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px;
  border-bottom: 1px solid var(--border); background: var(--surface-2); }
.tr-current-config-head > span:first-child { display: inline-flex; align-items: center; gap: 6px; min-width: 0;
  font-weight: 700; overflow-wrap: anywhere; }
.tr-current-config-code { max-height: 360px; overflow: auto; padding: 7px 0; background: #071a2b; color: #dcecf3;
  font: 12px/1.6 var(--mono); direction: ltr; text-align: left; }
.tr-current-config-line { display: grid; grid-template-columns: 54px minmax(max-content, 1fr); min-height: 20px;
  border-inline-start: 3px solid transparent; }
.tr-current-config-line.is-highlighted { border-inline-start-color: #25c7b7; background: rgba(37,199,183,.16); color: #fff; }
.tr-current-config-no { padding: 0 10px 0 8px; color: #7594a8; text-align: end; user-select: none; }
.tr-current-config-line code { padding-inline-end: 14px; color: inherit; white-space: pre; }
.tr-current-config-empty { margin-top: 6px; min-height: 68px; }
.tr-remediation-flow { display: grid; gap: 10px; }
.tr-remediation-flow > section { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.tr-flow-step { display: grid; place-items: center; align-self: start; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #16a6ba); color: #fff; font-weight: 800; box-shadow: 0 6px 16px rgba(0,126,158,.22); }
.tr-value-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.tr-value-pair > div { padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.tr-value-pair small { display: block; margin-bottom: 5px; color: var(--muted); font-weight: 800; letter-spacing: .08em; }
.tr-value-pair > div:last-child { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); }
.tr-live-diff { min-height: 76px; border-inline-start: 4px solid var(--primary) !important; }
/* 2.9.0 : la page de remédiation en onglets, barre fixée en haut pendant le défilement */
.tr-rem-tabs { position: sticky; top: 0; z-index: 6; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px;
  padding: 6px; background: var(--surface-1, var(--bg)); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.tr-rem-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2, inherit); font-weight: 600; cursor: pointer; }
.tr-rem-tab:hover { background: var(--surface-3, rgba(0, 0, 0, .05)); }
.tr-rem-tab.active { background: var(--primary); color: #fff; }
.tr-rem-tab.active .chip { background: rgba(255, 255, 255, .22); color: #fff; }
.tr-rem-pane[hidden] { display: none; }
/* 2.9.0 : commandes à exécuter et configuration obtenue, côte à côte (l'une sous l'autre sur écran étroit) */
.tr-two-faces { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin-top: 6px; }
.tr-two-faces > div { min-width: 0; }
.tr-two-faces pre { overflow-x: auto; white-space: pre; }
.tr-commands { border-inline-start-color: var(--warning, #c58a00) !important; }
.tr-mode-note { margin: 4px 0 2px; }
.tr-example-confirm { margin-top: 10px; padding: 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--warning) 10%, var(--surface)); }
.tr-generation-progress { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.tr-generation-progress li { position: relative; padding: 10px 12px 10px 38px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tr-generation-progress li::before { content: '○'; position: absolute; left: 13px; color: var(--muted); }
.tr-generation-progress li.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface)); color: var(--primary); }
.tr-generation-progress li.active::before { content: '◌'; color: var(--primary); }
.tr-generation-progress li.done::before { content: '✓'; color: var(--success-text); font-weight: 900; }
.tr-remediation-steps { display:grid; grid-template-columns:repeat(6,minmax(110px,1fr)); gap:8px; margin:0; padding:0; list-style:none; counter-reset:rem-step; }
.tr-remediation-steps li { counter-increment:rem-step; position:relative; min-height:58px; padding:30px 10px 9px; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--muted); font-size:12px; font-weight:700; }
.tr-remediation-steps li::before { content:counter(rem-step); position:absolute; inset-block-start:7px; inset-inline-start:9px; display:grid; place-items:center; width:18px; height:18px; border-radius:50%; background:var(--surface-2); }
.tr-remediation-steps li.done { color:var(--success-text); border-color:color-mix(in srgb,var(--success-text) 35%,var(--border)); background:color-mix(in srgb,var(--success-text) 6%,var(--surface)); }
.tr-remediation-steps li.done::before { content:'✓'; background:var(--success-text); color:white; }
.tr-remediation-steps li.active { color:var(--primary); border-color:var(--primary); box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 12%,transparent); }
@media (max-width:1000px) { .tr-remediation-steps { grid-template-columns:repeat(3,1fr); } }
.tr-sandbox-progress { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:0; padding:0; list-style:none; }
.tr-sandbox-progress li { padding:10px 12px; border-inline-start:3px solid var(--border); border-radius:6px; background:var(--surface-2); color:var(--muted); font-size:12px; }
.tr-sandbox-progress li.done { border-color:var(--success-text); color:var(--success-text); }
.tr-sandbox-progress li.done::before { content:'✓ '; font-weight:900; }
.tr-sandbox-progress li.active { border-color:var(--primary); color:var(--primary); font-weight:800; }
.tr-sandbox-progress li.active::before { content:'◌ '; }
@media (max-width:720px) { .tr-remediation-steps,.tr-sandbox-progress { grid-template-columns:1fr; } }
.tr-diff-inline { position: relative; max-height: 65vh; overflow: auto; }
.tr-trace-margin { position: sticky; inset-inline-start: 0; float: left; min-height: 100%; padding: 12px 8px; margin-inline-end: 8px;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary); font: 700 10px var(--mono); }
.tr-version-timeline { position: relative; display: grid; gap: 12px; padding-inline-start: 28px; }
.tr-version-timeline::before { content: ''; position: absolute; inset-block: 8px; inset-inline-start: 9px; width: 2px; background: var(--border); }
.tr-version-node { position: relative; }
.tr-version-dot { position: absolute; inset-inline-start: -27px; inset-block-start: 15px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary); border: 4px solid var(--surface); box-shadow: 0 0 0 1px var(--primary); }
.tr-version-card { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.tr-security-comparison { padding: 4px; }
.tr-score-pair { display: grid; grid-template-columns: 1fr minmax(180px, .7fr) 1fr; align-items: center; gap: 24px; padding: 24px;
  border-radius: 20px; background: linear-gradient(135deg, #081a2c, #0b3955 58%, #0d728e); color: #fff; box-shadow: 0 18px 46px rgba(8,26,44,.18); }
.tr-score-card { display: flex; align-items: center; justify-content: center; gap: 18px; }
.tr-score-card > b { max-width: 130px; font-size: 15px; }
.tr-score-ring { --score: 0; display: grid; place-items: center; width: 112px; height: 112px; border-radius: 50%; position: relative;
  background: conic-gradient(#e8791d calc(var(--score) * 1%), rgba(255,255,255,.13) 0); }
.tr-score-ring.after { background: conic-gradient(#20d6b0 calc(var(--score) * 1%), rgba(255,255,255,.13) 0); }
.tr-score-ring::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: #0b2c46; }
.tr-score-ring span, .tr-score-ring small { position: relative; z-index: 1; }
.tr-score-ring span { font-size: 30px; font-weight: 850; }
.tr-score-ring small { font-size: 11px; margin-left: -12px; margin-top: 35px; }
.tr-score-flow { text-align: center; color: #a8e8f3; }
.tr-score-flow i { display: block; font-style: normal; font-size: 32px; color: #20d6b0; }
.tr-score-flow span { display: block; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.tr-compare-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 16px; }
.tr-compare-panel { border: 1px solid var(--border); border-radius: 16px; padding: 18px; background: var(--surface); }
.tr-compare-panel h3 { margin: 0 0 16px; color: var(--navy, var(--text)); }
.tr-compare-severity { display: grid; grid-template-columns: 72px 1fr 28px 24px 28px 1fr; align-items: center; gap: 8px; margin: 10px 0; }
.tr-compare-label { text-transform: capitalize; font-size: 12px; font-weight: 750; }
.tr-compare-track { height: 9px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.tr-compare-track i { display: block; height: 100%; border-radius: 999px; }
.tr-compare-track .before { background: #e8791d; margin-left: auto; }
.tr-compare-track .after { background: #16866b; }
.tr-compare-arrow { text-align: center; color: var(--text-muted); }
.rem-approved, .rem-approved_modified { background: var(--success-soft); color: var(--success-text); }
.rem-rejected { background: var(--error-soft); color: var(--error-text); }
.rem-prefilled, .rem-pending_review, .rem-suggested { background: var(--warning-soft); color: var(--warning-text); }
.rem-keep_current, .rem-customer_decision_required { background: var(--caution-soft); color: var(--text); }

@media (max-width: 1100px) { .grid.c5.tr-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .tg-canvas { height: 420px; }
  .grid.c5.tr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tr-follow input[type="text"], .tr-follow input[type="date"] { width: 100%; }
  .tech-kv { grid-template-columns: 1fr; gap: 2px; }
  .tech-kv dd { margin-bottom: 6px; }
  .tr-remediation-wizard { min-width: 0; }
  .tr-diff-side { grid-template-columns: 1fr; }
  .tr-value-pair { grid-template-columns: 1fr; }
  .tr-score-pair, .tr-compare-grid { grid-template-columns: 1fr; }
  .tr-score-flow i { transform: rotate(90deg); }
  .tr-compare-severity { grid-template-columns: 64px 1fr 24px 18px 24px 1fr; }
}
@media (prefers-reduced-motion: reduce) { .tech-col, .tech-drop, .tech-progress > span { transition: none; } }

/* Historique immuable des exécutions du moteur */
.tech-history { display: grid; gap: 10px; }
.tech-history-row { margin: 0; }
.tech-history-row .card-h { align-items: flex-start; gap: 12px; }
.tech-history-row .card-h h3 { margin-bottom: 2px; }
.tech-history-list { margin: 6px 0 14px; padding-inline-start: 20px; }
.tech-history-json { max-height: 220px; overflow: auto; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- programmes : circuit de validation ---------- */
.pg-wf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); }
.pg-wf-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.pg-wf-step { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px;
  background: var(--surface-2); color: var(--text-muted); }
.pg-wf-step.done { background: var(--success-soft); color: var(--success-text); }
.pg-wf-step.cur { background: var(--primary); color: #fff; font-weight: 600; }
.pg-wf-msg { flex: 1; min-width: 200px; }
.pg-wf-warn { flex-basis: 100%; }
.pg-ev-validate { border-inline-start: 3px solid var(--success); }
.pg-ev-request_changes { border-inline-start: 3px solid var(--warning); }
.pg-seg { display: inline-flex; gap: 2px; }

/* ---------- programmes : pilotage transverse ---------- */
.pg-dash { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; align-items: start; }
.pg-dash .pg-w { margin: 0; }
.pg-dash .pg-w.wide { grid-column: span 2; }
.pg-dash .dw-b { padding: 12px 14px; overflow-x: auto; }
.pg-w-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.pg-w-row .grow { flex: 1; min-width: 190px; }
.pg-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pg-list ul { margin: 2px 0 0; padding-inline-start: 18px; }
.pg-raci th[scope="row"] { text-align: start; font-weight: 600; white-space: nowrap; }
.pg-raci td select { width: auto; min-width: 64px; }
.pg-raci thead th { vertical-align: bottom; }
.pg-raci-warn th[scope="row"] { color: var(--warning-text); }
.ok-box { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--success-soft); color: var(--success-text); }
@media (max-width: 760px) { .pg-dash .pg-w.wide { grid-column: auto; } }

/* ---------- programmes : schéma directeur et déclaration d'applicabilité ---------- */
.pg-fw-head { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.pg-fw-title h3 { margin: 0; }
.pg-kpis { display: flex; flex-wrap: wrap; gap: 18px; }
.pg-kpi { display: flex; flex-direction: column; align-items: center; text-align: center; width: 132px; gap: 4px; }
.pg-kpi-l { font-size: 12px; font-weight: 600; line-height: 1.3; }
.pg-sec { margin: 22px 0 10px; font-size: 15px; }
.pg-phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.pg-phase { position: relative; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  animation: pg-rise .45s both; }
.pg-phase.pg-gate { border-style: dashed; padding-inline-start: 30px; }
.pg-phase.current { border-color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }
.pg-phase.past { opacity: .7; }
.pg-gate-mark { position: absolute; inset-inline-start: 11px; top: 14px; width: 10px; height: 10px; transform: rotate(45deg); background: var(--warning); }
.pg-axes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.pg-axis { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; margin: 0; animation: pg-rise .45s both; }
.pg-axis-h { display: flex; align-items: center; gap: 8px; }
.pg-axis p { margin: 0; }
.pg-axis footer { margin-top: auto; }
.pg-deliv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pg-deliv li.clickable { cursor: pointer; }
.pg-deliv li.clickable:hover span { text-decoration: underline; }
.pg-mat { display: inline-flex; gap: 3px; }
.pg-mat i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.pg-mat i.on { background: var(--primary); border-color: var(--primary); }
.pg-soa-sum { gap: 6px; }
@keyframes pg-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pg-phase, .pg-axis { animation: none; } }

/* ---------- programmes : Gantt et feuille de route ---------- */
.pgg-host { min-height: 240px; }
.pgg { display: flex; position: relative; overflow: hidden; font-size: 12.5px; border-radius: var(--radius-sm); }
.pgg-left { flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface); z-index: 2; }
.pgg-lhead { flex: none; height: 46px; display: flex; align-items: flex-end; padding: 0 10px 6px; font-weight: 600; border-bottom: 1px solid var(--border); }
.pgg-lclip { flex: 1; overflow: hidden; position: relative; }
.pgg-lbody { position: relative; will-change: transform; }
.pgg-l { position: absolute; left: 0; right: 0; height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); cursor: pointer; white-space: nowrap; }
.pgg-l:hover { background: var(--surface-2); }
.pgg-l-t { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; unicode-bidi: plaintext; text-align: left; }
.pgg-l-n { color: var(--text-muted); font-size: 11px; }
.pgg-l-group, .pgg-l-lane { font-weight: 600; background: var(--surface-2); }
.pgg-l-milestones { cursor: default; color: var(--text-muted); }
.pgg-ref { font-family: var(--mono); font-size: 11px; color: var(--text-muted); }
.pgg-caret { display: inline-block; transition: transform .15s; }
.pgg-caret.closed { transform: rotate(-90deg); }
.pgg-right { flex: 1; overflow: auto; position: relative; }
.pgg-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--border); }
.pgg-m, .pgg-d { position: absolute; overflow: hidden; white-space: nowrap; color: var(--text-muted); border-left: 1px solid var(--border); padding: 0 4px; }
.pgg-m { top: 0; height: 22px; line-height: 22px; font-weight: 600; color: var(--text); text-transform: capitalize; }
.pgg-d { top: 22px; height: 24px; line-height: 24px; font-size: 11px; text-align: center; }
.pgg-body { position: relative; background-image: linear-gradient(to right, color-mix(in srgb, var(--border) 55%, transparent) 1px, transparent 1px); }
.pgg-rows { position: absolute; inset: 0; }
.pgg-links { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; }
.pgg-link { fill: none; stroke: var(--text-muted); stroke-width: 1.4; pointer-events: stroke; cursor: pointer; }
.pgg-link:hover { stroke: var(--error); stroke-width: 2.4; }
.pgg-arrow { fill: var(--text-muted); }
.pgg-today { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--error); opacity: .7; z-index: 1; pointer-events: none; }
.pgg-bar { position: absolute; height: 22px; border-radius: 5px; background: color-mix(in srgb, var(--primary) 22%, var(--surface));
  border: 1px solid var(--primary); overflow: hidden; cursor: pointer; touch-action: none; user-select: none; z-index: 1; }
.pgg-bar:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pgg-bar .pgg-prog { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--primary) 55%, var(--surface)); }
.pgg-bar-l { position: relative; padding: 0 6px; line-height: 20px; font-size: 11px; font-family: var(--mono); white-space: nowrap; }
.pgg-bar.st-done { border-color: var(--success); background: var(--success-soft); }
.pgg-bar.st-done .pgg-prog { background: color-mix(in srgb, var(--success) 45%, var(--surface)); }
.pgg-bar.st-blocked { border-style: dashed; border-color: var(--error); }
.pgg-bar.st-backlog, .pgg-bar.st-todo { opacity: .85; }
.pgg-bar.overdue { border-color: var(--error); box-shadow: inset 0 -3px 0 var(--error); }
.pgg-bar.due-only { border-style: dotted; }
.pgg-bar.dragging { opacity: .75; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); z-index: 4; transition: none; }
.pgg-bar.link-from { outline: 2px dashed var(--warning); outline-offset: 2px; }
.pgg-linking .pgg-bar { cursor: crosshair; }
.pgg-grip { position: absolute; top: 0; bottom: 0; width: 7px; cursor: ew-resize; z-index: 2; }
.pgg-grip.s { left: 0; }
.pgg-grip.e { right: 0; }
.pgg-bar:hover .pgg-grip { background: color-mix(in srgb, var(--primary) 35%, transparent); }
.pgg-sum { position: absolute; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--text) 18%, var(--surface)); overflow: hidden; pointer-events: none; }
.pgg-sum .pgg-prog, .pgg-lane .pgg-prog { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--success) 60%, var(--surface)); }
.pgg-lane { position: absolute; height: 24px; border-radius: 12px; overflow: hidden; background: color-mix(in srgb, var(--primary) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 50%, var(--border)); }
.pgg-lane .pgg-bar-l { font-family: inherit; font-weight: 600; line-height: 22px; padding: 0 10px; }
.pgg-ms { position: absolute; width: 14px; height: 14px; transform: rotate(45deg); background: var(--primary); border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--primary); cursor: pointer; z-index: 2; }
.pgg-ms-gate { background: var(--warning); box-shadow: 0 0 0 1px var(--warning); }
.pgg-ms-reached { background: var(--success); box-shadow: 0 0 0 1px var(--success); }
.pgg-ms-late { background: var(--error); box-shadow: 0 0 0 1px var(--error); }
.pgg-ms-cancelled { background: var(--grey); box-shadow: 0 0 0 1px var(--grey); }
.pgg-ms-l { position: absolute; font-size: 11px; white-space: nowrap; color: var(--text); pointer-events: none; }
.pgg-phase { position: absolute; height: 22px; line-height: 20px; padding: 0 8px; border-radius: 4px; font-size: 11px; white-space: nowrap; overflow: hidden;
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px);
  border: 1px solid var(--border); cursor: pointer; }
.pgg-legend { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.pgg-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pgg-legend .lg-bar { width: 18px; height: 9px; border-radius: 3px; border: 1px solid var(--primary); background: color-mix(in srgb, var(--primary) 30%, var(--surface)); }
.pgg-legend .lg-bar.late { border-color: var(--error); box-shadow: inset 0 -2px 0 var(--error); }
.pgg-legend .lg-bar.done { border-color: var(--success); background: var(--success-soft); }
.pgg-legend .lg-ms { width: 9px; height: 9px; transform: rotate(45deg); background: var(--primary); }
.pgg-legend .lg-dep { width: 18px; height: 0; border-top: 1.5px solid var(--text-muted); }
.pgg-animate .pgg-bar, .pgg-animate .pgg-lane, .pgg-animate .pgg-sum { transform-origin: left center; animation: pgg-grow .55s cubic-bezier(.2, .7, .2, 1) both; }
.pgg-animate .pgg-ms { animation: pgg-pop .45s .25s both; }
@keyframes pgg-grow { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@keyframes pgg-pop { from { opacity: 0; } to { opacity: 1; } }

/* ---------- programmes : Kanban ---------- */
.pgk { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.pgk-col { display: flex; flex-direction: column; min-height: 200px; max-height: 74vh; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.pgk-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.pgk-n { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.pgk-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; min-height: 80px; }
.pgk-card { background: var(--surface); border: 1px solid var(--border); border-inline-start: 4px solid var(--grey); border-radius: var(--radius-sm);
  padding: 7px 9px; cursor: grab; display: flex; flex-direction: column; gap: 4px; transition: box-shadow .15s, transform .15s; }
.pgk-card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.pgk-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.pgk-card.pr-P1 { border-inline-start-color: color-mix(in srgb, var(--error) 78%, #000); }
.pgk-card.pr-P2 { border-inline-start-color: var(--error); }
.pgk-card.pr-P3 { border-inline-start-color: var(--warning); }
.pgk-card.pr-P4 { border-inline-start-color: var(--caution); }
.pgk-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pgk-title { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pgk-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pgk-late { color: var(--error-text); font-weight: 600; }
.pgk-prog { height: 3px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.pgk-prog i { display: block; height: 100%; background: var(--primary); }
.pgk-ghost { opacity: .35; }
.pgk-chosen { box-shadow: 0 0 0 2px var(--primary); }
.pgk-drag { transform: rotate(2deg); box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.pgk-more { text-align: center; padding: 4px; }
@media (max-width: 760px) { .pgg-left { width: 150px !important; } }
@media (prefers-reduced-motion: reduce) { .pgk-card, .pgg-caret { transition: none; } }
/* ---------- assistant technique ---------- */
.ai-suggestion-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.ai-suggestion { border-inline-start: 4px solid var(--primary); }
.ai-suggestion .eyebrow { color: var(--primary); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ai-suggestion details { margin-top: 10px; }
.ai-suggestion summary { cursor: pointer; color: var(--text-muted); font-size: 13px; }
.choice-stack { display: grid; gap: 9px; }
.choice-card { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; font-weight: 650; }
.choice-card:has(input:checked) { border-color: var(--primary); background: var(--primary-softer); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent); }
.choice-card:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.choice-card input { accent-color: var(--primary); }
.secret-box { padding: 16px; border: 1px solid color-mix(in srgb, var(--primary) 36%, var(--border)); border-radius: 10px; background: var(--primary-softer); text-align: center; }
.secret-box code { font-size: clamp(16px, 3vw, 22px); font-weight: 800; letter-spacing: .08em; color: var(--primary); user-select: all; }

/* 2.10.0 : propositions consolidées (mêmes lignes) */
.tr-cons { margin: 10px 0; }
.tr-cons-list { margin: 6px 0 4px; padding-inline-start: 18px; }
.tr-cons-list li { margin: 2px 0; }
.tr-cons-chip { margin-inline-start: 6px; }
