.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kpi-card {
  padding: 16px;
  min-height: 126px;
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -32px auto;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, var(--green)) 16%, transparent);
}

.kpi-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.kpi-value {
  margin-top: 14px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.kpi-trend {
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.summary-card {
  padding: 14px;
  min-height: 112px;
}

.summary-card span,
.summary-card small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

.summary-card strong {
  display: block;
  margin: 10px 0 7px;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.program-card {
  padding: 18px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.program-card:hover,
.program-card.active {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent, var(--green)) 54%, var(--border));
  background: color-mix(in srgb, var(--accent, var(--green)) 8%, var(--surface));
}

.program-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.program-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent, var(--green)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--green)) 36%, transparent);
  display: grid;
  place-items: center;
  color: var(--accent, var(--green));
}

.program-card h3 {
  font-size: 16px;
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.program-card p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 11px;
}

.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

body.theme-light .progress-bar {
  background: rgba(11, 20, 31, 0.08);
}

.progress-fill {
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent, var(--green)), color-mix(in srgb, var(--accent, var(--green)) 60%, white));
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
}

.tag {
  font-size: 11px;
  color: var(--text-soft);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 5px 8px;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  min-height: 660px;
}

.decom-map {
  min-height: 660px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 44%, rgba(86, 200, 216, 0.10), transparent 32%),
    var(--surface);
  background-size: 34px 34px, 34px 34px, auto, auto;
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.map-svg path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.4;
  stroke-dasharray: 7 10;
  animation: line-flow 9s linear infinite;
}

.map-svg path.primary {
  stroke-width: 2.2;
  stroke: color-mix(in srgb, var(--accent, var(--cyan)) 70%, var(--line));
}

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border-strong);
  background: rgba(13, 17, 23, 0.82);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  min-width: 150px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
}

body.theme-light .node {
  background: rgba(255, 255, 255, 0.84);
}

.node:hover,
.node.active {
  border-color: color-mix(in srgb, var(--accent, var(--green)) 58%, var(--border-strong));
  transform: translate(-50%, -50%) scale(1.03);
}

.node.center {
  width: 214px;
  min-height: 114px;
  display: grid;
  place-items: center;
  text-align: center;
  border-color: rgba(72, 213, 151, 0.44);
  background: radial-gradient(circle at center, rgba(72, 213, 151, 0.12), rgba(13, 17, 23, 0.88));
}

.node-title {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.node-meta {
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.node.small {
  min-width: 118px;
  padding: 10px 11px;
}

.map-pulse {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(72, 213, 151, 0.12);
  border-radius: 50%;
  animation: pulse-ring 4.8s ease-in-out infinite;
  pointer-events: none;
}

.side-panel {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-panel h3 {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.side-panel p,
.timeline-body,
.table-note {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.metric-list {
  display: grid;
  gap: 10px;
}

.metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.metric-row span:first-child {
  color: var(--text-muted);
  font-size: 11px;
}

.metric-row span:last-child {
  font-size: 12px;
  font-weight: 800;
}

.split-list {
  display: grid;
  gap: 12px;
}

.workstream {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.workstream h3 {
  font-size: 14px;
  letter-spacing: -0.01em;
}

.workstream p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.workstream footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.priority {
  color: var(--accent, var(--green));
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.data-table caption {
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 12px 13px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.data-table th {
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.03);
}

.data-table td {
  color: var(--text-soft);
}

.data-table td strong {
  color: var(--text);
  font-weight: 800;
}

.data-table .numeric {
  text-align: right;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--text);
  background: color-mix(in srgb, var(--accent, var(--green)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--green)) 30%, transparent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.progress-badge {
  min-width: 54px;
  justify-content: center;
}

.table-card {
  padding: 16px;
}

.table-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 14px;
}

.table-title h3 {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.table-title p {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.table-scroll {
  overflow-x: auto;
}

.finance-table {
  min-width: 1180px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  position: relative;
}

.timeline-date {
  color: var(--accent, var(--green));
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 900;
}

.timeline-title {
  font-size: 13px;
  font-weight: 800;
}

.action-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.action-column {
  padding: 14px;
  min-height: 360px;
}

.action-column h3 {
  font-size: 13px;
  margin-bottom: 12px;
}

.action-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  margin-bottom: 10px;
}

.action-card strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.action-card span {
  display: block;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 11px;
}

@keyframes line-flow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -170; }
}

@keyframes pulse-ring {
  0%, 100% { opacity: 0.35; transform: translate(-50%, -50%) scale(0.92); }
  50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1180px) {
  .map-layout { grid-template-columns: 1fr; }
  .decom-map { min-height: 620px; }
  .action-board { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .decom-map { min-height: 560px; }
  .node { min-width: 124px; padding: 9px; }
  .node.center { width: 170px; }
  .summary-grid { grid-template-columns: 1fr; }
  .table-title { display: block; }
}

/* Train cards (Analyse impact INT) */
.int-trains-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  margin-top: 18px;
}
.train-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-left: 4px solid var(--border);
}
.train-card--block { border-left-color: #ef4444; }
.train-card--critical { border-left-color: #f97316; }
.train-card--high { border-left-color: #f59e0b; }
.train-card--medium { border-left-color: #facc15; }
.train-card--low { border-left-color: #22c55e; }
.train-card--na { border-left-color: var(--border); }
.train-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.train-card__scope {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.train-card__head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}
.train-card__status {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  color: var(--muted);
  white-space: nowrap;
}
.train-card__status--done { background: rgba(34, 197, 94, 0.18); color: #16a34a; }
.train-card__status--wip { background: rgba(59, 130, 246, 0.18); color: #2563eb; }
.train-card__status--partial { background: rgba(245, 158, 11, 0.2); color: #b45309; }
.train-card__status--todo { background: rgba(239, 68, 68, 0.18); color: #b91c1c; }
.train-card__summary {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
.train-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 12px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 10px;
}
.train-card__meta > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.train-card__meta dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}
.train-card__meta dd {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  word-break: break-word;
}
.train-card__block h4 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.train-card__block ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  line-height: 1.5;
}
.train-card__risks { padding-left: 0; list-style: none; }
.train-card__risks li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: start;
  padding: 8px 10px;
  background: rgba(148, 163, 184, 0.06);
  border-radius: 8px;
}
.train-card__risks li small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}
.train-card__alts { padding-left: 0; list-style: none; }
.train-card__alts li {
  padding: 8px 10px;
  background: rgba(59, 130, 246, 0.06);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.train-card__alts strong { font-size: 13px; }
.train-card__alts span { font-size: 12px; color: var(--muted); }

.criticity {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.criticity--block { background: rgba(239, 68, 68, 0.18); color: #b91c1c; }
.criticity--critical { background: rgba(249, 115, 22, 0.18); color: #c2410c; }
.criticity--high { background: rgba(245, 158, 11, 0.2); color: #b45309; }
.criticity--medium { background: rgba(250, 204, 21, 0.22); color: #854d0e; }
.criticity--low { background: rgba(34, 197, 94, 0.18); color: #15803d; }
.criticity--contournable { background: rgba(59, 130, 246, 0.18); color: #1d4ed8; }
.criticity--na { background: rgba(148, 163, 184, 0.15); color: var(--muted); }

/* === Synthese economies - visuels === */
.finance-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 18px;
  margin: 18px 0;
}
.chart-card {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chart-card__head h3 { margin: 0 0 4px; font-size: 17px; }
.chart-card__head p { margin: 0; color: var(--muted); font-size: 13px; }

.bar-chart {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) 2fr auto;
  align-items: center;
  gap: 14px;
}
.bar-row__label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bar-row__label strong { font-size: 13px; line-height: 1.25; }
.bar-row__category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.bar-row__track {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 6px;
  height: 14px;
  overflow: hidden;
  position: relative;
}
.bar-row__fill {
  height: 100%;
  border-radius: 6px;
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.bar-row__fill--win { background: linear-gradient(90deg, #22c55e, #16a34a); }
.bar-row__fill--raf { background: linear-gradient(90deg, #f59e0b, #d97706); }
.bar-row__value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  text-align: right;
  min-width: 90px;
}

.category-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.category-bar { display: flex; flex-direction: column; gap: 6px; }
.category-bar__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.category-bar__head strong { font-size: 14px; }
.category-bar__count {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.category-bar__track {
  display: flex;
  height: 18px;
  width: var(--bar-width, 100%);
  background: rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  overflow: hidden;
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.category-bar__win { background: linear-gradient(90deg, #22c55e, #16a34a); }
.category-bar__raf { background: linear-gradient(90deg, #f59e0b, #d97706); }
.category-bar__values {
  display: flex;
  gap: 16px;
  font-size: 12px;
  flex-wrap: wrap;
}
.category-bar__legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.category-bar__legend::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.category-bar__legend--win::before { background: #16a34a; }
.category-bar__legend--raf::before { background: #d97706; }

.finance-details {
  margin-top: 18px;
  padding: 0;
  overflow: hidden;
}
.finance-details > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
.finance-details > summary::-webkit-details-marker { display: none; }
.finance-details > summary::after {
  content: '+';
  font-size: 20px;
  color: var(--muted);
  transition: transform 200ms ease;
}
.finance-details[open] > summary::after { content: '−'; }
.finance-details > summary:hover { background: rgba(148, 163, 184, 0.06); }
.finance-details .table-scroll { border-top: 1px solid var(--border); }

/* === Impact INT - matrice === */
.int-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.matrix-cell {
  position: relative;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.matrix-cell::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--border);
}
.matrix-cell--block::before { background: #ef4444; }
.matrix-cell--critical::before { background: #f97316; }
.matrix-cell--high::before { background: #f59e0b; }
.matrix-cell--medium::before { background: #facc15; }
.matrix-cell--low::before { background: #22c55e; }
.matrix-cell--na::before { background: var(--border); }
.matrix-cell__head { display: flex; flex-direction: column; gap: 2px; }
.matrix-cell__scope {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.matrix-cell__head h4 { margin: 0; font-size: 15px; line-height: 1.2; }
.matrix-cell__status {
  align-self: flex-start;
  font-size: 10px;
}
.matrix-cell__criticity { display: flex; }
.matrix-cell__stats {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.matrix-cell__stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.matrix-cell__stats dt {
  margin: 0;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.matrix-cell__stats dd {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.matrix-cell__stats dd:not([data-numeric]) { font-size: 11px; font-weight: 500; }

@media (max-width: 720px) {
  .bar-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: 'label value' 'track track';
    gap: 6px 12px;
  }
  .bar-row__label { grid-area: label; }
  .bar-row__value { grid-area: value; }
  .bar-row__track { grid-area: track; }
}

/* === Train cards v2 - hero color flood === */
.train-card {
  padding: 0;
  border-left: none;
  overflow: hidden;
}
.train-card__head {
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(148, 163, 184, 0.04));
  border-bottom: 1px solid var(--border);
}
.train-card--block .train-card__head { background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(239, 68, 68, 0.04)); }
.train-card--critical .train-card__head { background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(249, 115, 22, 0.04)); }
.train-card--high .train-card__head { background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(245, 158, 11, 0.04)); }
.train-card--low .train-card__head { background: linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.04)); }
.train-card__summary,
.train-card__meta,
.train-card__block {
  margin-left: 22px;
  margin-right: 22px;
}
.train-card__summary { margin-top: 16px; }
.train-card__block:last-child { margin-bottom: 22px; }
.train-card__meta { margin-top: 4px; }

/* === Matrix v2 - clickable, big number focal === */
.int-matrix { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.matrix-cell {
  all: unset;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px 18px 16px;
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 200ms ease;
  min-height: 170px;
}
.matrix-cell:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: rgba(148, 163, 184, 0.09);
}
.matrix-cell--active {
  border-color: var(--accent, #22c55e);
  background: rgba(34, 197, 94, 0.06);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}
.matrix-cell::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--border);
}
.matrix-cell--block::before    { background: #ef4444; }
.matrix-cell--critical::before { background: #f97316; }
.matrix-cell--high::before     { background: #f59e0b; }
.matrix-cell--medium::before   { background: #facc15; }
.matrix-cell--low::before      { background: #22c55e; }
.matrix-cell--na::before       { background: var(--border); }

.matrix-cell__scope {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
}
.matrix-cell__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.matrix-cell__big {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.matrix-cell--block .matrix-cell__big    { color: #ef4444; }
.matrix-cell--critical .matrix-cell__big { color: #f97316; }
.matrix-cell--high .matrix-cell__big     { color: #f59e0b; }
.matrix-cell--medium .matrix-cell__big   { color: #facc15; }
.matrix-cell--low .matrix-cell__big      { color: #22c55e; }
.matrix-cell--na .matrix-cell__big       { color: var(--text-muted); opacity: 0.5; }
.matrix-cell__big-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: -4px;
}
.matrix-cell__pill { margin-top: auto; align-self: flex-start; }

/* === Train detail panel === */
.train-detail { padding: 0; overflow: hidden; }
.train-detail__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.train-detail__head--block    { background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), transparent 70%); }
.train-detail__head--critical { background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), transparent 70%); }
.train-detail__head--high     { background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), transparent 70%); }
.train-detail__head--low      { background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), transparent 70%); }
.train-detail__head--na       { background: linear-gradient(135deg, rgba(148, 163, 184, 0.10), transparent 70%); }

.train-detail__scope {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 700;
}
.train-detail__head h3 {
  font-size: 24px;
  margin: 4px 0 10px;
  letter-spacing: -0.01em;
}
.train-detail__summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 720px;
}
.train-detail__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}
.criticity--lg {
  font-size: 13px;
  padding: 6px 14px;
}

.train-detail__people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.03);
}
.train-detail__people > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0;
}
.train-detail__people span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
}
.train-detail__people strong {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

.train-detail__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding: 26px 28px;
}
.train-detail__col--wide { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 20px; }
.train-detail__col h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 700;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.train-detail__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  background: rgba(148, 163, 184, 0.16);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
}
.train-detail__risks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.train-detail__risk {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  padding: 12px 14px;
  background: rgba(148, 163, 184, 0.05);
  border-left: 3px solid var(--border);
  border-radius: var(--radius-sm, 6px);
}
.train-detail__risk--block    { border-left-color: #ef4444; }
.train-detail__risk--critical { border-left-color: #f97316; }
.train-detail__risk--high     { border-left-color: #f59e0b; }
.train-detail__risk--medium   { border-left-color: #facc15; }
.train-detail__risk--low      { border-left-color: #22c55e; }
.train-detail__risk .criticity { grid-row: 1; grid-column: 1; }
.train-detail__risk p { grid-row: 1; grid-column: 2; margin: 0; font-size: 13px; color: var(--text); line-height: 1.45; }
.train-detail__risk small { grid-row: 2; grid-column: 1 / -1; font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.train-detail__alts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.train-detail__alts li {
  padding: 12px 14px;
  background: rgba(34, 197, 94, 0.06);
  border-left: 3px solid #22c55e;
  border-radius: var(--radius-sm, 6px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.train-detail__alts strong { font-size: 13px; color: var(--text); }
.train-detail__alts span { font-size: 12px; color: var(--text-muted); }

.train-detail__usage {
  list-style: disc;
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.train-detail__usage li { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.train-detail__empty { font-size: 13px; color: var(--text-muted); font-style: italic; margin: 0; }

@media (max-width: 820px) {
  .train-detail__head { grid-template-columns: 1fr; }
  .train-detail__meta { align-items: flex-start; flex-direction: row; }
  .train-detail__columns { grid-template-columns: 1fr; padding: 20px; }
}

/* === Train detail v3 - cleaned up, consistent typography === */
.train-detail { padding: 28px 32px; }
.train-detail__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  background: none !important;
}
.train-detail__head-left { display: flex; flex-direction: column; gap: 6px; }
.train-detail__head-right { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.train-detail__scope {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  font-weight: 600;
}
.train-detail__head h3 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
}
.train-detail__lede {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 820px;
}

.td-section { margin-bottom: 26px; }
.td-section:last-child { margin-bottom: 0; }
.td-section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
  letter-spacing: 0;
  text-transform: none;
}
.td-section__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.14);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}
.td-section__count {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.td-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 28px;
  margin: 0;
  padding: 0;
}
.td-list > div { display: flex; flex-direction: column; gap: 2px; }
.td-list dt {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.td-list dd {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
}

.td-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.td-bullets li {
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
  padding-left: 16px;
  position: relative;
}
.td-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.6;
}

.td-rows {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.td-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  align-items: start;
}
.td-row--alt {
  grid-template-columns: 1fr;
  background: rgba(148, 163, 184, 0.04);
}
.td-row__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.td-row__body p {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  font-weight: 500;
}
.td-row__body small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.td-empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* Override criticity pills to a single subtle style */
.criticity {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .train-detail { padding: 20px; }
  .train-detail__head { flex-direction: column; }
}

/* === Matrix v3 - quieter palette === */
.matrix-cell__big {
  color: var(--text) !important;
  opacity: 1;
}
.matrix-cell--na .matrix-cell__big { color: var(--text-muted) !important; opacity: 0.45; }
.matrix-cell { min-height: 150px; }
.matrix-cell__name { font-size: 14px; }
.matrix-cell__big { font-size: 38px; }
.matrix-cell--active { box-shadow: 0 0 0 1px var(--text); border-color: var(--text); background: rgba(148, 163, 184, 0.10); }

/* ============== Impact page – editorial redesign ============== */

.impact-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.impact-hero__phrase {
  font-size: clamp(24px, 2.6vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 780px;
  color: var(--ink);
}
.impact-hero__verdict {
  font-weight: 700;
}
.impact-hero__verdict--nogo { color: #ef4444; }
.impact-hero__verdict--watch { color: #f59e0b; }
.impact-hero__verdict--go { color: #22c55e; }

.impact-hero__countdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}
.impact-hero__countdown strong {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.impact-hero__countdown--late { color: #ef4444; }
.impact-hero__countdown span {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}

.impact-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  margin-bottom: 56px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.impact-kpi {
  padding: 20px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.impact-kpi:last-child { border-right: none; }
.impact-kpi__label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.impact-kpi__value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.impact-kpi__sub {
  font-size: 12px;
  color: var(--ink-mute);
}

.impact-block { margin-bottom: 56px; }
.impact-block__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.impact-block__num {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.impact-block__lede {
  font-size: 13px;
  color: var(--ink-mute);
  margin: 0 0 20px;
  max-width: 720px;
}

/* Radar */
.impact-radar-wrap {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 32px;
  align-items: center;
}
@media (max-width: 880px) { .impact-radar-wrap { grid-template-columns: 1fr; } }
.impact-radar {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: inherit;
}
.radar-svg { width: 100%; height: auto; display: block; }
.radar-axis {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--ink-mute);
}
.radar-axis--mute { font-weight: 400; letter-spacing: 0.02em; text-transform: none; opacity: 0.6; }
.radar-dot circle {
  fill: #94a3b8;
  fill-opacity: 0.85;
  stroke: var(--surface);
  stroke-width: 2;
  transition: fill 150ms;
}
.radar-dot--blocker circle { fill: #ef4444; }
.radar-label {
  font-size: 12px;
  font-weight: 600;
  fill: var(--ink);
}
.radar-count {
  font-size: 11px;
  font-weight: 700;
  fill: #fff;
  font-variant-numeric: tabular-nums;
}
.impact-radar__legend p {
  font-size: 12px;
  color: var(--ink-mute);
  margin: 0 0 10px;
  line-height: 1.5;
}
.impact-radar__legend strong { color: var(--ink); font-weight: 600; }

/* Trains list */
.impact-trains {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.impact-train {
  border-bottom: 1px solid var(--border);
}
.impact-train details[open] { background: var(--surface); }
.impact-train summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 40px 1.6fr 1fr 1fr 1fr 16px;
  align-items: center;
  gap: 16px;
  transition: background 120ms;
}
.impact-train summary::-webkit-details-marker { display: none; }
.impact-train summary:hover { background: var(--surface); }
.impact-train__rank {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mute);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.impact-train__name { display: flex; flex-direction: column; gap: 2px; }
.impact-train__scope {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
}
.impact-train__name strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.impact-train__crit {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.impact-train--block .impact-train__crit { color: #ef4444; font-weight: 600; }
.impact-train--critical .impact-train__crit { color: #f59e0b; font-weight: 600; }
.impact-train__alt {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.impact-train__alt--validée { color: #22c55e; font-weight: 600; }
.impact-train__alt--aucune { color: #ef4444; font-weight: 600; }
.impact-train__chev {
  width: 8px; height: 8px;
  border-right: 1.5px solid var(--ink-mute);
  border-bottom: 1.5px solid var(--ink-mute);
  transform: rotate(45deg);
  transition: transform 180ms;
  justify-self: end;
}
.impact-train details[open] .impact-train__chev { transform: rotate(225deg); }
.impact-train__body { padding: 8px 20px 28px; }
.impact-train__body .td-lede {
  font-size: 14px; line-height: 1.6; color: var(--ink); margin: 8px 0 24px;
}

@media (max-width: 760px) {
  .impact-train summary {
    grid-template-columns: 32px 1fr auto;
    gap: 12px;
  }
  .impact-train__crit, .impact-train__alt, .impact-train__status { display: none; }
}

/* Timeline */
.impact-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  position: relative;
}
.impact-timeline::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 6%;
  right: 6%;
  height: 1px;
  background: var(--border);
}
@media (max-width: 880px) {
  .impact-timeline { grid-template-columns: 1fr; gap: 16px; }
  .impact-timeline::before { display: none; }
}
.impact-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 0 12px;
  position: relative;
}
.impact-step__dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  position: relative;
  z-index: 1;
}
.impact-step--done .impact-step__dot { background: #22c55e; border-color: #22c55e; }
.impact-step--wip .impact-step__dot { background: var(--bg); border-color: #f59e0b; box-shadow: inset 0 0 0 3px #f59e0b; }
.impact-step--late .impact-step__dot { background: #ef4444; border-color: #ef4444; }
.impact-step__date {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  margin-top: 6px;
}
.impact-step__label { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.impact-step__detail { font-size: 12px; color: var(--ink-mute); line-height: 1.4; }

/* ============== INT decision board ============== */
.impact-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.impact-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 248px;
}
.impact-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.impact-card__scope {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 800;
}
.impact-card h3 {
  font-size: 17px;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.impact-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
}
.impact-pill--block { background: rgba(239, 68, 68, 0.14); color: #ef4444; }
.impact-pill--critical { background: rgba(249, 115, 22, 0.14); color: #f97316; }
.impact-pill--high { background: rgba(245, 158, 11, 0.14); color: #f59e0b; }
.impact-pill--medium { background: rgba(250, 204, 21, 0.14); color: #d97706; }
.impact-pill--low { background: rgba(34, 197, 94, 0.14); color: #22c55e; }
.impact-pill--contournable { background: rgba(59, 130, 246, 0.14); color: #3b82f6; }
.impact-pill--na { background: rgba(148, 163, 184, 0.14); color: var(--text-muted); }
.impact-card__summary {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}
.impact-card__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.impact-card__grid div {
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.04);
  min-width: 0;
}
.impact-card__grid span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}
.impact-card__grid strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.impact-card__grid small {
  display: block;
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-soft);
}
.impact-card__footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}

/* ============== Roadmap events ============== */
.roadmap-events {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.roadmap-event {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.roadmap-event__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.roadmap-event__category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 800;
}
.roadmap-event strong {
  font-size: 14px;
  line-height: 1.35;
}
.roadmap-event p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
}

/* ============== Roadmaps Decom ============== */
/* ===== ROADMAP PAGE (Gantt mensuel) ===== */
.roadmap-stack { display: grid; gap: 32px; }
.roadmap-block { display: block; }
.roadmap-block--full { display: block; }
.roadmap-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.roadmap-toolbar .rt-title { font-size: 13px; font-weight: 600; color: var(--text); margin-right: auto; }
.roadmap-toolbar .rt-sub { font-size: 11px; color: var(--text-muted); }
.roadmap-grid { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: visible; position: relative; }
.rm-month-row { display: grid; grid-template-columns: 220px repeat(12, 1fr); background: rgba(0, 0, 0, 0.4); border-bottom: 1px solid var(--border); }
.rm-month-lbl { padding: 10px 14px; font-size: 10px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.1em; border-right: 1px solid var(--border); display: flex; align-items: center; }
.rm-month-cell { padding: 8px 4px; text-align: center; font-size: 10px; font-weight: 700; color: var(--text); border-right: 1px solid var(--border); letter-spacing: 0.06em; }
.rm-month-cell:last-child { border-right: none; }
.rm-month-cell.cur { background: var(--accent-dim); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.rm-sw { padding: 6px 14px; font-size: 10.5px; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: 0.07em; border-bottom: 1px solid var(--border); }
.rm-sw.sw-orch { background: linear-gradient(90deg, #0083cc, #006699); }
.rm-sw.sw-auto { background: linear-gradient(90deg, #b45309, #92400e); }
.rm-sw.sw-td { background: linear-gradient(90deg, #047857, #065f46); }
.rm-sw.sw-infra { background: linear-gradient(90deg, #4338ca, #3730a3); }
.rm-grow { display: grid; grid-template-columns: 220px 1fr; border-bottom: 1px solid var(--border); min-height: 56px; }
.rm-grow:last-child { border-bottom: none; }
.rm-glbl { padding: 10px 14px; font-size: 11.5px; font-weight: 600; color: var(--text); border-right: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; line-height: 1.3; }
.rm-glbl small { display: block; font-size: 9.5px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.rm-garea { position: relative; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(8.3333% - 1px), rgba(255, 255, 255, 0.05) calc(8.3333% - 1px), rgba(255, 255, 255, 0.05) 8.3333%); }
.rm-bar2 { position: absolute; height: 26px; top: 50%; transform: translateY(-50%); border-radius: 3px; display: flex; align-items: center; padding: 0 8px; font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; letter-spacing: 0.02em; cursor: default; }
.rm-bar2.kind-main.sw-orch { background: rgba(43, 183, 238, 0.32); color: #cdeefb; border: 1px solid rgba(43, 183, 238, 0.7); }
.rm-bar2.kind-main.sw-auto { background: rgba(251, 191, 36, 0.32); color: #fef3c7; border: 1px solid rgba(251, 191, 36, 0.7); }
.rm-bar2.kind-main.sw-td { background: rgba(74, 222, 128, 0.32); color: #d1fae5; border: 1px solid rgba(74, 222, 128, 0.7); }
.rm-bar2.kind-main.sw-infra { background: rgba(143, 140, 255, 0.32); color: #e0e7ff; border: 1px solid rgba(143, 140, 255, 0.7); }
.rm-bar2.kind-pending { background: rgba(96, 165, 250, 0.08); color: var(--text-soft); border: 1.5px dashed var(--blue); font-style: italic; }
.rm-pending-tag { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(245, 158, 11, 0.18); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.6); font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: 3px; letter-spacing: 0.04em; white-space: nowrap; z-index: 3; }
.rm-bar-ext-lbl { position: absolute; top: 50%; transform: translateY(-50%); font-size: 9px; font-weight: 600; color: var(--text-soft); white-space: nowrap; letter-spacing: 0.02em; z-index: 3; }
.rm-now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); z-index: 6; pointer-events: none; }
.rm-now-line::after { content: "Aujourd'hui"; position: absolute; top: 0; left: 50%; transform: translate(-50%, -100%); background: var(--accent); color: #fff; font-size: 8.5px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 3px 3px 0 0; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 157, 224, 0.4); }

.rm-milestones { margin-top: 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.milestone { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; position: relative; }
.milestone .ms-date { font-size: 10.5px; color: var(--accent); font-weight: 600; letter-spacing: 0.05em; }
.milestone .ms-title { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 5px; line-height: 1.3; }
.milestone .ms-desc { font-size: 11px; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }
.milestone .ms-state { position: absolute; top: 14px; right: 14px; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; padding: 2px 7px; border-radius: 3px; }
.milestone .ms-state.done { background: rgba(74, 222, 128, 0.15); color: var(--green); }
.milestone .ms-state.next { background: var(--accent-dim); color: var(--accent); }
.milestone .ms-state.future { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); }
.milestone .ms-state.risk { background: rgba(236, 111, 114, 0.15); color: var(--red); }

@media (max-width: 1100px) {
  .rm-milestones { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .rm-month-row { grid-template-columns: 140px repeat(12, 1fr); }
  .rm-grow { grid-template-columns: 140px 1fr; }
  .rm-now-line { left: calc(140px + (100% - 140px) * var(--now)) !important; }
  .rm-milestones { grid-template-columns: 1fr; }
}

/* ============== Empty state (AWS DMPA en attente) ============== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 56px 32px;
}
.empty-state__icon {
  width: 44px;
  height: 44px;
  color: var(--text-muted);
  opacity: 0.7;
}
.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.empty-state p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  max-width: 520px;
}

/* ============== Pilotage – avancement Jira ============== */
.jira-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.05);
  font-size: 12px;
  color: var(--text-muted);
}
.jira-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 24%, transparent);
}
.jira-sync {
  border: 1px solid var(--border);
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.jira-sync:hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.jira-progress {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.jira-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.6fr) 2fr 56px;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(148, 163, 184, 0.04);
}
.jira-row__label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.jira-row__cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}
.jira-row__label strong { font-size: 13px; line-height: 1.25; color: var(--text); }
.jira-row__track {
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}
.jira-row__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent, var(--green)), color-mix(in srgb, var(--accent, var(--green)) 55%, white));
}
.jira-row__pct {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
@media (max-width: 720px) {
  .jira-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: 'label pct' 'track track';
    gap: 6px 12px;
  }
  .jira-row__label { grid-area: label; }
  .jira-row__pct { grid-area: pct; }
  .jira-row__track { grid-area: track; }
}

/* ===== AVANCEMENT DES SUJETS (cartes par projet / perimetre) ===== */
.av-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.av-search {
  flex: 1 1 280px;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}
.av-search:focus { border-color: var(--accent); }
.av-search::placeholder { color: var(--text-muted); }
.av-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.av-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.av-chip:hover { border-color: var(--border-hover); color: var(--text); }
.av-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.av-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.av-chip.active .av-cnt { background: rgba(255, 255, 255, 0.25); }

.avancement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.av-group {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 2px;
}
.av-group:first-child { margin-top: 0; }
.av-group-line { flex: 1; height: 1px; background: var(--border); }
.av-group-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-transform: uppercase;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.av-group-sub {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
}

.av-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), transform var(--transition);
}
.av-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.av-head { display: flex; align-items: flex-start; gap: 12px; }
.av-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}
.av-titlewrap { min-width: 0; flex: 1; }
.av-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.3;
}
.av-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--seg-bg);
  border: 1px solid var(--seg-border);
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.av-role {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.av-prog { display: flex; flex-direction: column; gap: 7px; }
.av-prog-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-soft);
}
.av-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
body.theme-light .av-bar { background: rgba(11, 20, 31, 0.08); }
.av-fill { height: 100%; border-radius: inherit; transition: width 0.4s var(--ease); }
.av-counts { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; }
.av-c { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); }
.av-c::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.av-c.done::before { background: var(--green); }
.av-c.wip::before { background: var(--amber); }
.av-c.todo::before { background: var(--text-dim); }
.av-statusline { font-size: 11.5px; color: var(--text-muted); }

.av-macro {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.av-macro-head {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.av-stepper {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 0 6px;
}
.av-line {
  position: absolute;
  top: 11px;
  left: 18px;
  right: 18px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}
.av-line-fill {
  position: absolute;
  top: 11px;
  left: 18px;
  height: 2px;
  border-radius: 2px;
  max-width: calc(100% - 36px);
  transition: width 0.4s var(--ease);
}
.av-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.av-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
}
.av-dot.done { background: var(--green); border-color: var(--green); color: #06210f; }
.av-dot.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 4px var(--accent-dim); }
.av-slbl {
  font-size: 9.5px;
  text-align: center;
  line-height: 1.25;
  color: var(--text-dim);
  max-width: 60px;
}
.av-slbl.done, .av-slbl.active { color: var(--text-soft); }
.av-slbl.active { font-weight: 700; color: var(--text); }

.av-empty {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 920px) {
  .avancement-grid { grid-template-columns: 1fr; }
}

