  :root{
    color-scheme: light;
    --bg: #f6f5f0;
    --surface: #ffffff;
    --surface-2: #efeee7;
    --surface-3: #e8e6dd;
    --text-primary: #161c1a;
    --text-secondary: #57605b;
    --text-muted: #8a938c;
    --border: rgba(16,32,28,0.13);
    --border-soft: rgba(16,32,28,0.07);
    --accent: #0f6e64;
    --accent-strong: #0a4f47;
    --accent-soft: #e1eeeb;
    --accent-on: #ffffff;
    --status-good: #0ca30c;
    --status-good-soft: #e2f4e0;
    --status-warning: #b9790a;
    --status-warning-soft: #fbedd2;
    --status-neutral: #8a938c;
    --status-neutral-soft: #eceae2;
    --status-critical: #d03b3b;
    --late: #c4501a;
    --late-soft: #fbe6d9;
    --cat-couts: #2a78d6;
    --cat-couts-soft: #e2edfa;
    --cat-activite: #d5591f;
    --cat-activite-soft: #fbe9dd;
    --cat-dev: #148a63;
    --cat-dev-soft: #dcf1e9;
    --cat-idee: #6552b0;
    --cat-idee-soft: #eae6f7;
    --accent2: #8a5a2a;
    --accent2-soft: #f3e7d6;
    --s-real: #2a78d6;
    --s-fc: #eb6834;
    --on-real: #ffffff;
    --s-base: #7f8da1;
    --shadow-card: 0 1px 2px rgba(16,32,28,0.06), 0 1px 1px rgba(16,32,28,0.04);
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      color-scheme: dark;
      --bg: #121412;
      --surface: #1a1d1a;
      --surface-2: #23261f;
      --surface-3: #2c2f28;
      --text-primary: #f5f5f1;
      --text-secondary: #c1c6bd;
      --text-muted: #8f968e;
      --border: rgba(255,255,255,0.12);
      --border-soft: rgba(255,255,255,0.07);
      --accent: #38b3a5;
      --accent-strong: #6bd0c3;
      --accent-soft: #1c3733;
      --accent-on: #06211d;
      --status-good: #4fc94f;
      --status-good-soft: #163a1c;
      --status-warning: #e8ab2f;
      --status-warning-soft: #3a2d10;
      --status-neutral: #97a096;
      --status-neutral-soft: #2a2d28;
      --status-critical: #e66767;
      --late: #f08a5a;
      --late-soft: #3d2416;
      --cat-couts: #5c9eea;
      --cat-couts-soft: #1c2c3e;
      --cat-activite: #e8894f;
      --cat-activite-soft: #3a2717;
      --cat-dev: #3fbb92;
      --cat-dev-soft: #163a2c;
      --cat-idee: #a596e0;
      --cat-idee-soft: #2a2440;
      --accent2: #d3a15e;
      --accent2-soft: #362a17;
      --s-real: #3987e5;
      --s-fc: #d95926;
      --on-real: #0b1d33;
      --s-base: #8593a6;
      --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 1px 1px rgba(0,0,0,0.2);
    }
  }
  :root[data-theme="dark"]{
    color-scheme: dark;
    --bg: #121412;
    --surface: #1a1d1a;
    --surface-2: #23261f;
    --surface-3: #2c2f28;
    --text-primary: #f5f5f1;
    --text-secondary: #c1c6bd;
    --text-muted: #8f968e;
    --border: rgba(255,255,255,0.12);
    --border-soft: rgba(255,255,255,0.07);
    --accent: #38b3a5;
    --accent-strong: #6bd0c3;
    --accent-soft: #1c3733;
    --accent-on: #06211d;
    --status-good: #4fc94f;
    --status-good-soft: #163a1c;
    --status-warning: #e8ab2f;
    --status-warning-soft: #3a2d10;
    --status-neutral: #97a096;
    --status-neutral-soft: #2a2d28;
    --status-critical: #e66767;
    --late: #f08a5a;
    --late-soft: #3d2416;
    --cat-couts: #5c9eea;
    --cat-couts-soft: #1c2c3e;
    --cat-activite: #e8894f;
    --cat-activite-soft: #3a2717;
    --cat-dev: #3fbb92;
    --cat-dev-soft: #163a2c;
    --cat-idee: #a596e0;
    --cat-idee-soft: #2a2440;
    --accent2: #d3a15e;
    --accent2-soft: #362a17;
    --s-real: #3987e5;
    --s-fc: #d95926;
    --on-real: #0b1d33;
    --s-base: #8593a6;
    --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 1px 1px rgba(0,0,0,0.2);
  }

  *{ box-sizing: border-box; }
  body{
    margin:0; background: var(--bg); color: var(--text-primary);
    font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    padding: 28px 20px 80px;
  }
  .wrap{ max-width: 980px; margin: 0 auto; }
  h1,h2,h3{ font-family: "Fraunces", Georgia, serif; font-weight: 600; margin: 0; text-wrap: balance; }
  .num{ font-variant-numeric: tabular-nums; }
  [hidden]{ display:none !important; }

  /* ---- header ---- */
  header{ margin-bottom: 18px; }
  .eyebrow{ font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 6px; }
  h1{ font-size: clamp(26px, 4vw, 34px); }
  .sub{ color: var(--text-secondary); font-size: 14.5px; margin-top: 6px; max-width: 66ch; }
  .sync-note{ color: var(--text-muted); font-size: 12.5px; margin-top: 10px; }

  /* ---- top-level tabs ---- */
  .tabs{ display:flex; gap:6px; margin-bottom: 20px; border-bottom: 1px solid var(--border-soft); }
  .tab-btn{ font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text-secondary); background:none; border:none; padding: 10px 4px 12px; cursor:pointer; border-bottom: 2px solid transparent; margin-bottom:-1px; }
  .tab-btn.active{ color: var(--accent); border-bottom-color: var(--accent); }
  .tab-btn .count{ color: var(--text-muted); font-weight: 500; }
  .tab-btn.active .count{ color: var(--accent); }

  /* ---- KPI grid ---- */
  .kpis{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
  @media (max-width: 780px){ .kpis{ grid-template-columns: repeat(2,1fr); } }
  .kpi{ background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 16px 16px 14px; box-shadow: var(--shadow-card); }
  .kpi .label{ font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
  .kpi .value{ font-size: 24px; font-weight: 700; margin-top: 6px; line-height: 1.1; }
  .kpi .value.neg{ color: var(--status-critical); }
  .kpi .hint{ font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
  .kpi .bar-track{ margin-top: 10px; height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
  .kpi .bar-fill{ height: 100%; background: var(--accent); border-radius: 4px; }

  /* ---- charts row ---- */
  .panels{ display:grid; grid-template-columns: 1.3fr 1fr; gap: 12px; margin-bottom: 22px; }
  @media (max-width: 780px){ .panels{ grid-template-columns: 1fr; } }
  .panel{ background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 16px 18px 14px; box-shadow: var(--shadow-card); }
  .panel h3{ font-size: 14.5px; font-weight: 600; font-family: "IBM Plex Sans", sans-serif; }
  .panel .panel-sub{ font-size: 12px; color: var(--text-muted); margin-top: 2px; }

  .bars{ display:flex; align-items:flex-end; gap: 18px; height: 120px; margin-top: 18px; padding: 0 4px; position: relative; }
  .bar-col{ flex:1; display:flex; flex-direction: column; align-items:center; height:100%; justify-content:flex-end; cursor: default; }
  .bar-val{ font-size: 12.5px; font-weight: 600; margin-bottom: 6px; white-space:nowrap; }
  .bar-rect{ width: 100%; max-width: 64px; border-radius: 6px 6px 3px 3px; transition: opacity .15s; }
  .bar-col:hover .bar-rect{ opacity: .82; }
  .bar-label{ margin-top: 8px; font-size: 12px; color: var(--text-secondary); }
  .bar-base{ position:absolute; left:0; right:0; bottom:0; border-top: 1px solid var(--border); }

  .split{ display:flex; gap: 3px; margin-top: 22px; height: 14px; border-radius: 8px; overflow:hidden; }
  .split > div{ height:100%; }
  .split-legend{ display:flex; gap: 16px; margin-top: 12px; flex-wrap:wrap; }
  .split-legend .item{ font-size: 12.5px; color: var(--text-secondary); display:flex; align-items:center; gap:6px; }
  .split-legend .dot{ width:9px; height:9px; border-radius:2px; flex:none; }
  .split-legend b{ color: var(--text-primary); }

  .status-bar{ display:flex; gap: 3px; margin-top: 18px; height: 16px; border-radius: 8px; overflow:hidden; }
  .status-bar > div{ height:100%; }
  .status-legend{ display:flex; gap:18px; margin-top: 12px; flex-wrap:wrap; }
  .status-legend .item{ font-size: 12.5px; color: var(--text-secondary); display:flex; align-items:center; gap:6px; }
  .status-legend .dot{ width:9px; height:9px; border-radius: 50%; flex:none; }
  .status-legend b{ color: var(--text-primary); }

  /* ---- toolbar ---- */
  .toolbar{ position: sticky; top: 12px; z-index: 5; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-card); margin-bottom: 16px; display:flex; flex-wrap:wrap; gap: 10px; align-items:center; }
  .chip-row{ display:flex; gap:6px; flex-wrap:wrap; }
  .chip{ border:1px solid var(--border); background: var(--surface-2); color: var(--text-secondary); font-size: 12.5px; padding: 6px 11px; border-radius: 999px; cursor:pointer; font-family: inherit; font-weight:500; }
  .chip:hover{ border-color: var(--accent); }
  .chip.active{ background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
  .search{ flex:1; min-width: 160px; }
  .search input{ width:100%; padding: 7px 12px; border-radius: 999px; border:1px solid var(--border); background: var(--surface-2); color: var(--text-primary); font-family: inherit; font-size: 13px; }
  .search input:focus{ outline: 2px solid var(--accent); outline-offset: 1px; }
  select{ padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-primary); font-family: inherit; font-size: 12.5px; }
  .toolbar-count{ font-size: 12px; color: var(--text-muted); white-space: nowrap; }
  .add-btn{ background: var(--accent); color: var(--accent-on); border:none; border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight:600; cursor:pointer; font-family: inherit; white-space:nowrap; }
  .add-btn:hover{ background: var(--accent-strong); }
  .subtabs{ display:flex; gap:6px; flex-wrap:wrap; margin-bottom: 12px; }
  .subtab-btn{ font-family: inherit; font-size: 12.5px; font-weight:600; padding: 7px 13px; border-radius: 999px; border:1px solid var(--border); background: var(--surface); color: var(--text-secondary); cursor:pointer; }
  .subtab-btn.active{ background: var(--accent2-soft); border-color: var(--accent2); color: var(--accent2); }
  .mission-note{ font-size: 12.5px; color: var(--text-secondary); background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; line-height:1.5; }

  /* ---- add form ---- */
  .add-form{ background: var(--surface); border: 1px dashed var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; display: grid; gap: 10px; grid-template-columns: 2fr 1fr 1fr; }
  .add-form[hidden]{ display:none; }
  .add-form input[type="text"]{ padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-primary); font-family:inherit; font-size: 13px; }
  .add-form select{ border-radius: 8px; width:100%; }
  .add-form .full{ grid-column: 1 / -1; display:flex; gap:8px; justify-content:flex-end; }
  .add-form button{ font-family: inherit; font-size: 12.5px; font-weight:600; border-radius: 999px; padding: 7px 16px; cursor:pointer; }
  .add-form .save{ background: var(--accent); color: var(--accent-on); border:none; }
  .add-form .cancel{ background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
  @media (max-width: 560px){ .add-form{ grid-template-columns: 1fr; } }

  /* ---- list ---- */
  .list{ display:flex; flex-direction:column; gap: 10px; }
  .card{ background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-card); }
  .card.late{ border-left: 4px solid var(--late); }
  .badge.late{ background: var(--late-soft); color: var(--late); border: none; }
  .chip.late-chip{ border-color: var(--late); color: var(--late); }
  .chip.late-chip.active{ background: var(--late); border-color: var(--late); color: #fff; }
  .late-note{ margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--late-soft); color: var(--text-primary); font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; line-height: 1.4; }
  .late-note b{ color: var(--late); }
  .late-note.ok{ background: var(--status-good-soft); }
  .late-note .chip{ margin-left: auto; }
  .date-input{ padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-primary); font-family: inherit; font-size: 13px; }
  .field .hint{ font-size: 11px; color: var(--text-muted); margin-top: 3px; }
  .card.prio{ border-left: 4px solid var(--status-critical); }
  .badge.prio{ background: var(--status-critical); color: #fff; border: none; }
  .chip.prio-chip{ border-color: var(--status-critical); color: var(--status-critical); }
  .chip.prio-chip.active{ background: var(--status-critical); border-color: var(--status-critical); color: #fff; }
  .card-top{ display:flex; align-items:flex-start; justify-content:space-between; gap: 10px; flex-wrap: wrap; }
  .badges{ display:flex; gap: 6px; flex-wrap:wrap; align-items:center; }
  .badge{ font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space:nowrap; }
  .badge.outline{ background: transparent; border: 1px solid var(--border); color: var(--text-secondary); font-weight:500; }
  .badge.accent2{ background: var(--accent2-soft); color: var(--accent2); border:none; }
  .impact-fig{ font-size: 17px; font-weight: 700; white-space:nowrap; }
  .impact-fig.neg{ color: var(--status-critical); }
  .impact-fig.dim{ color: var(--text-muted); font-weight:500; font-size:13px; }
  .detail{ font-size: 15px; font-weight: 600; margin-top: 8px; line-height:1.35; }
  .meta-row{ display:flex; align-items:center; gap: 14px; margin-top: 10px; flex-wrap:wrap; font-size: 12.5px; color: var(--text-secondary); }
  .meta-row .who{ display:flex; align-items:center; gap:6px; }
  .avatar{ width:20px; height:20px; border-radius:50%; background: var(--accent-soft); color: var(--accent-strong); font-size:10px; font-weight:700; display:flex; align-items:center; justify-content:center; flex:none; }
  .statut-select{ margin-left:auto; }
  .statut-select select{ font-weight:600; font-size:12px; padding: 5px 10px 5px 8px; }
  .statut-select.st-fait select{ background: var(--status-good-soft); color: var(--status-good); border-color: transparent; }
  .statut-select.st-encours select{ background: var(--status-warning-soft); color: var(--status-warning); border-color: transparent; }
  .statut-select.st-adecider select{ background: var(--status-neutral-soft); color: var(--status-neutral); border-color: transparent; }

  .expand-toggle{ margin-top: 10px; font-size: 12px; color: var(--accent); background:none; border:none; cursor:pointer; font-family: inherit; font-weight:600; padding:0; }
  .expand-panel{ margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-soft); display:grid; gap: 8px; }
  .expand-panel[hidden]{ display:none; }
  .field{ font-size: 13px; }
  .field .k{ color: var(--text-muted); font-size: 11px; text-transform:uppercase; letter-spacing:.04em; font-weight:600; margin-bottom:2px; }
  .field .v{ color: var(--text-secondary); line-height:1.45; white-space: pre-line; }
  textarea.notes-input{ width:100%; min-height: 56px; resize: vertical; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-primary); font-family: inherit; font-size: 13px; padding: 8px 10px; }
  textarea.notes-input:focus{ outline: 2px solid var(--accent); outline-offset:1px; }
  .save-hint{ font-size: 11px; color: var(--text-muted); margin-top:3px; height: 14px; }

  .empty{ text-align:center; padding: 50px 20px; color: var(--text-muted); font-size: 14px; }
  .banner{ background: var(--status-warning-soft); color: var(--text-primary); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
  .banner[hidden]{ display:none; }
  footer{ text-align:center; color: var(--text-muted); font-size: 12px; margin-top: 36px; }

  /* ---- onglet CA et MCD vs forecast ---- */
  .fin-controls{ display:flex; flex-wrap:wrap; gap:14px 28px; align-items:flex-end; margin: 0 0 16px; }
  .fin-group{ display:flex; flex-direction:column; gap:6px; min-width:0; }
  .fin-group .glabel{ font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; }
  .fin-panels{ display:grid; grid-template-columns: 1.35fr 1fr; gap:12px; margin-bottom:22px; }
  @media (max-width: 860px){ .fin-panels{ grid-template-columns: 1fr; } }
  .fin-panels .panel, .fin-block{ min-width:0; }
  .fin-block{ margin-bottom:22px; }
  .legend{ display:flex; gap:6px 16px; flex-wrap:wrap; margin-top:10px; font-size:12px; color:var(--text-secondary); }
  .legend .key{ display:inline-flex; align-items:center; gap:6px; }
  .legend svg{ flex:none; display:block; }
  .chart-wrap{ margin-top:10px; position:relative; min-height:60px; }
  .chart-wrap svg{ display:block; width:100%; height:auto; overflow:visible; }
  .chart-note{ font-size:11.5px; color:var(--text-muted); margin-top:8px; line-height:1.45; max-width:80ch; }
  .fin-hit{ fill:transparent; cursor:default; }
  .fin-hit:hover{ fill: var(--border-soft); }
  .fin-tip{ position:fixed; z-index:30; pointer-events:none; background:var(--surface); color:var(--text-primary); border:1px solid var(--border); border-radius:10px; padding:8px 11px; font-size:12px; line-height:1.5; box-shadow:0 6px 18px rgba(0,0,0,.2); max-width:270px; font-variant-numeric: tabular-nums; }
  .fin-tip b{ font-weight:600; }
  .table-scroll{ overflow-x:auto; margin-top:12px; }
  table.fin-table{ border-collapse:collapse; width:100%; font-size:12.5px; font-variant-numeric:tabular-nums; }
  table.fin-table th, table.fin-table td{ padding:8px 10px; border-bottom:1px solid var(--border-soft); text-align:right; white-space:nowrap; }
  table.fin-table th:first-child, table.fin-table td:first-child{ text-align:left; position:sticky; left:0; background:var(--surface); z-index:1; }
  table.fin-table thead th{ font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted); font-weight:600; vertical-align:bottom; white-space:normal; }
  table.fin-table td.neg{ color: var(--status-critical); }
  table.fin-table td .sub2{ color: var(--text-muted); font-size:11px; margin-left:4px; }
  table.fin-table tr.total td{ font-weight:700; border-top:1px solid var(--border); }
  .att{ display:inline-flex; align-items:center; gap:6px; justify-content:flex-end; }
  .att .dot{ width:8px; height:8px; border-radius:50%; flex:none; background: var(--status-neutral); }
  .att.att-good .dot{ background: var(--status-good); }
  .att.att-warn .dot{ background: var(--status-warning); }
  .att.att-bad .dot{ background: var(--status-critical); }
  .fin-input{ width:96px; padding:6px 8px; border-radius:8px; border:1px solid var(--border); background: var(--surface-2); color: var(--text-primary); font-family:inherit; font-size:13px; text-align:right; font-variant-numeric: tabular-nums; }
  .fin-input:focus{ outline:2px solid var(--accent); outline-offset:1px; }
  .hyp-tag{ font-size:10.5px; font-weight:600; color: var(--accent2); background: var(--accent2-soft); border-radius:999px; padding:2px 8px; margin-left:8px; white-space:nowrap; }
  .proj-sum{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:16px; }
  @media (max-width: 680px){ .proj-sum{ grid-template-columns:1fr; } }
  .proj-card{ background: var(--surface-2); border-radius:12px; padding:12px 14px; min-width:0; }
  .proj-card.main{ background: var(--accent-soft); }
  .proj-card .t{ font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; }
  .proj-card .big{ font-size:22px; font-weight:700; margin-top:4px; font-variant-numeric: tabular-nums; }
  .proj-card .l{ font-size:12px; color:var(--text-secondary); margin-top:3px; font-variant-numeric: tabular-nums; }
  .budget-row{ display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; margin-top:14px; font-size:13px; color: var(--text-secondary); }
  .notes-list{ display:flex; flex-direction:column; gap:12px; margin-top:12px; }
  .note-row{ display:grid; grid-template-columns: 120px 1fr; gap:12px; font-size:13px; line-height:1.5; }
  @media (max-width: 560px){ .note-row{ grid-template-columns:1fr; gap:2px; } }
  .note-row .when{ font-weight:600; }
  .note-row .txt{ color: var(--text-secondary); min-width:0; }
  .limits{ margin:12px 0 0; padding-left:18px; font-size:13px; line-height:1.55; color: var(--text-secondary); }
  .limits li{ margin-bottom:6px; }
  .limits b{ color: var(--text-primary); font-weight:600; }
  .fin-link{ background:none; border:0; padding:0; font:inherit; color:var(--accent); cursor:pointer; text-decoration:underline; text-underline-offset:3px; text-align:left; }
  .fin-link:hover{ text-decoration-thickness:2px; }
  .fin-link:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:3px; }
  .fin-link.cur{ font-weight:700; text-decoration:none; color:var(--text-primary); }
  table.fin-table tr.hl td{ background: var(--accent-soft); }
  table.fin-table tr.hl td:first-child{ background: var(--accent-soft); }

  /* ---- onglet Retard médecin ---- */
  .tabs{ flex-wrap:wrap; column-gap:14px; }
  .aw-select{ width:auto; max-width:100%; margin:0; padding:7px 10px; border-radius:8px; border:1px solid var(--border); background:var(--surface-2); color:var(--text-primary); font-family:inherit; font-size:13px; }
  .aw-select:focus{ outline:2px solid var(--accent); outline-offset:1px; }
  .aw-headline{ font-size:14px; line-height:1.55; color:var(--text-primary); background:var(--surface); border:1px solid var(--border-soft); border-left:3px solid var(--accent); border-radius:12px; padding:12px 14px; margin:0 0 4px; max-width:84ch; }
  .aw-hit{ fill:transparent; cursor:default; }
  .aw-hit:hover{ fill:var(--border-soft); }
  .aw-sw{ display:inline-block; width:12px; height:12px; border-radius:3px; flex:none; }
  .aw-tr{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600; padding:2px 8px; border-radius:999px; white-space:nowrap; background:var(--status-neutral-soft); color:var(--text-primary); }
  .aw-tr .g{ font-size:9px; color:var(--text-muted); }
  .aw-tr.up{ background:var(--late-soft); }
  .aw-tr.up .g{ color:var(--late); }
  .aw-tr.down{ background:var(--status-good-soft); }
  .aw-tr.down .g{ color:var(--status-good); }
  .aw-spark-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(146px, 1fr)); gap:10px; margin-top:12px; }
  .aw-spark{ background:var(--surface-2); border-radius:12px; padding:11px 12px 9px; min-width:0; }
  .aw-spark.cab{ background:var(--accent-soft); }
  .aw-spark .top{ display:flex; justify-content:space-between; align-items:center; gap:6px 8px; flex-wrap:wrap; }
  .aw-spark .nm{ font-size:13px; font-weight:600; }
  .aw-spark .big{ font-size:22px; font-weight:700; margin-top:4px; line-height:1.1; font-variant-numeric:tabular-nums; }
  .aw-spark .big small{ font-size:12px; font-weight:500; color:var(--text-muted); margin-left:3px; }
  .aw-spark .hb{ font-size:11.5px; color:var(--text-secondary); margin-top:2px; font-variant-numeric:tabular-nums; }
  .aw-spark svg{ display:block; width:100%; height:auto; margin-top:6px; overflow:visible; }
  .aw-spark .ax{ display:flex; justify-content:space-between; font-size:10.5px; color:var(--text-muted); margin-top:2px; }
  .aw-note-txt{ font-size:13.5px; line-height:1.6; color:var(--text-secondary); margin:10px 0 0; max-width:80ch; }
  .aw-diff{ list-style:none; margin:10px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--text-secondary); }
  .aw-diff b{ color:var(--text-primary); font-weight:600; }
  .aw-sub3{ font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; margin:16px 0 0; }
  table.aw-matrix td.c, table.aw-matrix th.c{ text-align:center; min-width:48px; padding:6px 5px; }
  table.aw-matrix td.c.sel, table.aw-matrix th.c.sel{ box-shadow:inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent); }
  table.aw-matrix th.c.sel{ box-shadow:inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent), inset 0 2px 0 var(--accent); }
  table.aw-matrix tr.last td.c.sel{ box-shadow:inset 2px 0 0 var(--accent), inset -2px 0 0 var(--accent), inset 0 -2px 0 var(--accent); }
  table.aw-matrix td.nd{ color:var(--text-muted); font-size:11px; }
  table.aw-matrix th .dd{ display:block; font-weight:500; text-transform:none; letter-spacing:0; font-size:10.5px; color:var(--text-muted); }
  table.aw-matrix tr.total td.c{ border-top:1px solid var(--border); }
  .aw-form summary{ cursor:pointer; font-size:14.5px; font-weight:600; }
  .aw-form summary:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; border-radius:4px; }
  .aw-form-body{ margin-top:12px; }
  .aw-form-top{ display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; margin-bottom:10px; font-size:13px; color:var(--text-secondary); }
  .aw-form-top input{ width:auto; text-align:left; }
  .fin-input.aw-in{ width:70px; padding:5px 6px; }
  .aw-form-body label.aw-lab{ display:block; margin:14px 0 4px; font-size:12px; color:var(--text-muted); font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
  .aw-form-actions{ display:flex; flex-wrap:wrap; gap:10px 14px; align-items:center; margin-top:14px; }
  .aw-btn{ background:var(--accent); color:var(--accent-on); border:0; border-radius:8px; padding:9px 16px; font-family:inherit; font-size:13px; font-weight:600; cursor:pointer; }
  .aw-btn:hover{ background:var(--accent-strong); }
  .aw-btn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
  .aw-hint{ font-size:12px; color:var(--text-secondary); line-height:1.45; }

  /* ---- onglet Synthèse ---- */
  .sy-grid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; align-items:start; }
  @media (max-width: 860px){ .sy-grid{ grid-template-columns:minmax(0, 1fr); } }
  .sy-wide{ grid-column:1 / -1; }
  .sy-alerts-block{ margin:12px 0 0; }
  .sy-split{ display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.15fr); gap:4px 28px; align-items:start; }
  @media (max-width: 860px){ .sy-split{ grid-template-columns:minmax(0, 1fr); } }
  .sy-lm{ display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--border-soft); font-size:12.5px; }
  .sy-lm .d{ color:var(--text-secondary); margin-top:2px; font-variant-numeric:tabular-nums; }
  .sy-block{ min-width:0; display:flex; flex-direction:column; gap:0; }
  .sy-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:8px 12px; flex-wrap:wrap; }
  .sy-head h3{ font-size:15px; }
  .sy-link{ background:none; border:0; padding:0; font:inherit; font-size:12.5px; font-weight:600; color:var(--accent); cursor:pointer; text-decoration:underline; text-underline-offset:3px; white-space:nowrap; }
  .sy-link:hover{ text-decoration-thickness:2px; }
  .sy-link:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:3px; }
  .sy-stats{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; margin-top:12px; }
  #sy-sat .sy-stats{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
  @media (max-width: 860px){ #sy-sat .sy-stats{ grid-template-columns:repeat(2, minmax(0, 1fr)); } }
  .sy-stat{ background:var(--surface-2); border-radius:12px; padding:10px 12px; min-width:0; }
  .sy-stat .l{ font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; }
  .sy-stat .v{ font-size:20px; font-weight:700; margin-top:3px; line-height:1.15; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
  .sy-stat .h{ font-size:12px; color:var(--text-secondary); margin-top:3px; line-height:1.4; }
  .sy-stat.warn{ background:var(--late-soft); }
  .sy-stat.ok{ background:var(--status-good-soft); }
  .sy-sub3{ font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; margin:16px 0 6px; }
  .sy-bar{ display:flex; gap:3px; height:12px; border-radius:6px; overflow:hidden; margin-top:14px; }
  .sy-bar > div{ height:100%; }
  .sy-bar-leg{ display:flex; flex-wrap:wrap; gap:4px 14px; margin-top:7px; font-size:12px; color:var(--text-secondary); }
  .sy-bar-leg i{ display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:5px; }
  .sy-bar-leg b{ color:var(--text-primary); font-weight:600; }
  .sy-hrow{ display:grid; grid-template-columns:44px minmax(0, 1fr) 92px; gap:8px; align-items:center; font-size:12.5px; margin-bottom:5px; }
  .sy-hrow .t{ height:10px; border-radius:5px; background:var(--surface-3); overflow:hidden; }
  .sy-hrow .t > div{ height:100%; background:var(--accent); border-radius:5px; }
  .sy-hrow .n{ text-align:right; font-variant-numeric:tabular-nums; }
  .sy-carow{ grid-template-columns:44px minmax(0, 1fr) 132px; }
  .sy-carow .n small{ color:var(--text-muted); font-size:11.5px; margin-left:4px; }
  .sy-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:7px; font-size:12.5px; color:var(--text-secondary); line-height:1.45; }
  .sy-list li{ display:flex; gap:8px; align-items:baseline; min-width:0; }
  .sy-list li > span:first-child{ flex:none; }
  .sy-list li > span:last-child{ min-width:0; overflow-wrap:anywhere; }
  .sy-list b{ color:var(--text-primary); font-weight:600; }
  .sy-cabs{ display:flex; flex-direction:column; gap:7px; }
  .sy-cab{ display:grid; grid-template-columns:minmax(0, 128px) minmax(0, 1fr) 62px; gap:8px; align-items:center; font-size:12.5px; }
  .sy-cab .nm{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .sy-track{ position:relative; height:12px; background:var(--surface-3); border-radius:6px; }
  .sy-track .fill{ position:absolute; left:0; top:0; bottom:0; border-radius:6px; background:var(--s-real); }
  .sy-track .mk{ position:absolute; top:-3px; bottom:-3px; width:2px; background:var(--text-primary); opacity:.5; }
  .sy-cab .pc{ text-align:right; font-variant-numeric:tabular-nums; }
  .sy-alerts{ list-style:none; margin:12px 0 0; padding:0; display:flex; flex-direction:column; gap:8px; }
  .sy-alerts li{ display:grid; grid-template-columns:auto minmax(0, 1fr) auto; gap:4px 12px; align-items:baseline; padding:9px 12px; border-radius:10px; background:var(--surface-2); border-left:3px solid var(--status-neutral); font-size:13px; line-height:1.45; }
  .sy-alerts li.critical{ background:var(--late-soft); border-left-color:var(--status-critical); }
  .sy-alerts li.warn{ background:var(--status-warning-soft); border-left-color:var(--status-warning); }
  .sy-alerts li.ok{ background:var(--status-good-soft); border-left-color:var(--status-good); }
  .sy-alerts .tag{ font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text-primary); white-space:nowrap; min-width:72px; }
  .sy-alerts .tx{ min-width:0; overflow-wrap:anywhere; }
  @media (max-width: 560px){ .sy-alerts li{ grid-template-columns:minmax(0, 1fr) auto; } .sy-alerts .tag{ grid-column:1 / -1; } }
  @media (max-width: 560px){
    table.sy-t th, table.sy-t td{ padding:8px 5px; }
    table.sy-stack thead{ display:none; }
    table.sy-stack, table.sy-stack tbody{ display:block; }
    table.sy-stack tr{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:4px 12px; padding:10px 0; border-bottom:1px solid var(--border-soft); }
    table.sy-stack td{ display:block; border:0; padding:0; text-align:left; white-space:normal; }
    table.sy-stack td:first-child{ grid-column:1 / -1; position:static; font-weight:700; font-size:13px; }
    table.sy-stack td[data-l]::before{ content:attr(data-l); display:block; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted); font-weight:600; }
    table.sy-stack td .sub2{ display:block; margin-left:0; }
  }
  .sy-list .sy-gain{ min-width:96px; white-space:nowrap; }
  .sy-list .sy-gain b{ display:block; font-size:13.5px; }
  .sy-st{ color:var(--text-muted); white-space:nowrap; }

  /* ---- onglet Cotations ---- */
  .ct-scale{ display:flex; align-items:center; gap:8px; margin:10px 0 8px; font-size:11.5px; color:var(--text-muted); }
  .ct-scale .bar{ width:110px; height:10px; border-radius:3px; background:linear-gradient(90deg, color-mix(in srgb, var(--accent) 0%, transparent), color-mix(in srgb, var(--accent) 42%, transparent)); border:1px solid var(--border-soft); }
  table.ct-t td.c, table.ct-t th.c{ text-align:center; min-width:62px; padding:7px 6px; }
  table.ct-t th.c .dd{ display:block; font-weight:500; text-transform:none; letter-spacing:0; font-size:10.5px; color:var(--text-muted); }
  table.ct-t td.lab{ white-space:normal; min-width:200px; max-width:260px; }
  table.ct-t td.lab .l1{ display:block; font-size:12.5px; line-height:1.3; color:var(--text-primary); }
  table.ct-t td.lab .l2{ display:block; font-size:10.5px; color:var(--text-muted); margin-top:1px; letter-spacing:.01em; }
  table.ct-t td.ct-h{ background:color-mix(in srgb, var(--accent) var(--hp, 0%), transparent); }
  table.ct-t td.ct-hit{ cursor:default; }
  table.ct-t td.ct-hit:hover{ box-shadow:inset 0 0 0 2px var(--accent); }
  table.ct-t tr.ct-sec th{ text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; padding:14px 10px 6px; background:var(--surface); border-bottom:1px solid var(--border); white-space:normal; }
  table.ct-t tr.ct-meta td{ color:var(--text-secondary); }
  table.ct-t tr.ct-meta td b{ color:var(--text-primary); font-weight:600; }
  table.ct-t td.ens, table.ct-t th.ens{ border-left:1px solid var(--border); }
  table.ct-t td.nd{ color:var(--text-muted); }
  table.ct-t td.ct-oct{ position:relative; min-width:92px; text-align:left; padding-left:9px; }
  table.ct-t td.ct-oct .ct-bar{ position:absolute; left:0; top:5px; bottom:5px; background:color-mix(in srgb, var(--s-real) 24%, transparent); border-radius:0 4px 4px 0; }
  table.ct-t td.ct-oct .ct-v{ position:relative; font-variant-numeric:tabular-nums; }
  table.ct-t td.ct-oct.per{ border-left:1px solid var(--border); font-weight:700; }
  .ct-leg-grid{ display:grid; grid-template-columns:auto minmax(0, 1fr) auto; gap:6px 14px; font-size:12.5px; align-items:baseline; }
  .ct-leg-grid .cd{ font-weight:600; color:var(--text-primary); white-space:nowrap; }
  .ct-leg-grid .ln{ color:var(--text-muted); font-variant-numeric:tabular-nums; text-align:right; }
  .ct-leg-grid .hd{ font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; }
  .ct-ul{ margin:10px 0 0; padding-left:18px; display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--text-secondary); line-height:1.5; }
  .ct-ul b{ color:var(--text-primary); font-weight:600; }
  @media (max-width: 560px){
    table.ct-t td.lab{ min-width:104px; max-width:104px; }
    table.ct-t th:first-child, table.ct-t td:first-child{ padding-left:8px; padding-right:6px; }
    table.ct-t td.lab .l1{ font-size:12px; }
    table.ct-t td.lab .l2{ font-size:10px; overflow-wrap:anywhere; }
    table.ct-t td.c, table.ct-t th.c{ min-width:52px; padding:7px 4px; }
    table.ct-t th:first-child, table.ct-t td:first-child{ min-width:104px; }
    table.ct-t td.ct-oct{ min-width:64px; }
  }

  /* ---- onglet Satisfaction patient ---- */
  .sp-tr{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600; padding:2px 8px; border-radius:999px; white-space:nowrap; background:var(--status-neutral-soft); color:var(--text-primary); }
  .sp-tr .g{ font-size:9px; color:var(--text-muted); }
  .sp-tr.good{ background:var(--status-good-soft); }
  .sp-tr.good .g{ color:var(--status-good); }
  .sp-tr.bad{ background:var(--late-soft); }
  .sp-tr.bad .g{ color:var(--late); }
  .sp-hit{ fill:transparent; cursor:default; }
  .sp-hit:hover{ fill:var(--border-soft); }
  .sp-two{ display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:6px 28px; align-items:start; }
  @media (max-width: 760px){ .sp-two{ grid-template-columns:minmax(0, 1fr); } }
  .sp-rs{ list-style:none; margin:12px 0 0; padding:0; display:flex; flex-direction:column; gap:9px; }
  .sp-rs li{ display:grid; grid-template-columns:minmax(0, 1fr) auto; gap:3px 12px; align-items:baseline; font-size:13px; color:var(--text-secondary); }
  .sp-rs .lb{ color:var(--text-primary); min-width:0; }
  .sp-rs .vl{ font-variant-numeric:tabular-nums; white-space:nowrap; text-align:right; }
  .sp-rs .vl b{ color:var(--text-primary); font-weight:700; }
  .sp-rs .tr{ grid-column:1 / -1; height:7px; border-radius:4px; background:var(--surface-2); overflow:hidden; }
  .sp-rs .tr span{ display:block; height:100%; border-radius:4px; }
  .sp-rs .tr span.pos{ background:var(--status-good); }
  .sp-rs .tr span.neg{ background:var(--status-critical); }
  .sp-sub3{ font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; margin:0; }
  .gg-meter{ position:relative; height:8px; border-radius:4px; background:var(--surface-2); margin:10px 0 4px; }
  .gg-meter .fill{ position:absolute; left:0; top:0; bottom:0; border-radius:4px; background:var(--accent); }
  .gg-meter .tick{ position:absolute; top:-4px; bottom:-4px; width:2px; background:var(--text-primary); border-radius:1px; }
  .gg-meter-ax{ display:flex; justify-content:space-between; font-size:10.5px; color:var(--text-muted); }
  table.sp-t td.nd, table.sp-t td.nd *{ color:var(--text-muted); }
  table.sp-t td.c, table.sp-t th.c{ text-align:center; }
  .sp-cabbtn{ background:none; border:0; padding:0; font:inherit; font-weight:600; color:var(--accent); cursor:pointer; text-align:left; }
  .sp-cabbtn:hover{ text-decoration:underline; }
  .sp-cabbtn:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; border-radius:3px; }
  .sp-flag{ font-size:10.5px; color:var(--text-muted); margin-left:6px; font-weight:500; }
  /* --- intégration dans l'outil du cabinet --- */
  .topbar{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin:0 0 12px; flex-wrap:wrap; }
  .back-home{ font-size:12.5px; font-weight:600; color:var(--accent-strong); text-decoration:none; border:1px solid var(--border); border-radius:999px; padding:6px 13px; background:var(--surface); }
  .back-home:hover{ background:var(--accent-soft); }

  /* --- consultation seule : pas de formulaires de saisie --- */
  body.ro:not(.plan-edit) #add-toggle, body.ro:not(.plan-edit) #add-form, body.ro:not(.plan-edit) #m-add-toggle, body.ro:not(.plan-edit) .card-tools, body.ro #aw-form, body.ro #gg-form{ display:none !important; }
  body.ro [data-action]:disabled, body.ro [data-fin-input]:disabled, body.ro [data-fin-budget]:disabled{ opacity:.75; cursor:not-allowed; }

  /* --- onglet Charges --- */
  .ch-controls{ display:flex; flex-wrap:wrap; gap:14px 24px; margin:0 0 6px; }
  .ch-select{ font:inherit; font-size:12.5px; padding:6px 10px; border:1px solid var(--border); border-radius:999px; background:var(--surface-2); color:var(--text-secondary); }
  .ch-checks{ display:flex; flex-direction:column; gap:4px; font-size:12.5px; color:var(--text-secondary); }
  .ch-checks label{ display:flex; gap:6px; align-items:center; cursor:pointer; }
  .ch-hint{ font-size:12px; color:var(--text-secondary); margin:4px 0 10px; line-height:1.45; }
  .ch-hint.warn{ color:var(--late); }
  .ch-note{ font-size:11.5px; color:var(--text-muted); font-weight:400; }
  .ch-empty{ padding:14px; color:var(--text-secondary); font-size:13px; }
  .ch-empty.big{ background:var(--surface); border:1px dashed var(--border); border-radius:12px; text-align:center; padding:28px 18px; }
  .ch-kpis{ display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; margin:12px 0 18px; }
  .ch-kpi{ background:var(--surface); border:1px solid var(--border-soft); border-radius:12px; padding:12px 14px; box-shadow:var(--shadow-card); }
  .ch-kpi-label{ font-size:11.5px; letter-spacing:.04em; text-transform:uppercase; color:var(--text-muted); font-weight:600; }
  .ch-kpi-value{ margin-top:4px; color:var(--text-primary); }
  .ch-kpi-value .big{ font-size:24px; font-weight:700; font-variant-numeric:tabular-nums; }
  .ch-kpi-value .mid{ font-size:15px; font-weight:700; line-height:1.25; display:block; }
  .ch-kpi-sub{ margin-top:4px; font-size:12px; }
  .ch-delta{ font-size:12px; font-weight:600; white-space:nowrap; font-variant-numeric:tabular-nums; }
  .ch-delta.up{ color:var(--late); } .ch-delta.down{ color:var(--status-good); } .ch-delta.flat{ color:var(--text-muted); }
  .ch-section{ background:var(--surface); border:1px solid var(--border-soft); border-radius:14px; padding:14px 16px 16px; margin:0 0 16px; box-shadow:var(--shadow-card); }
  .ch-section h3{ margin:0 0 8px; font-size:15px; }
  .ch-two{ display:grid; grid-template-columns:repeat(auto-fit,minmax(380px,1fr)); gap:16px; }
  .ch-two .ch-section{ margin:0; }
  .ch-two{ margin-bottom:16px; }
  .ch-bars{ display:flex; flex-direction:column; gap:7px; }
  .ch-bar-row{ display:grid; grid-template-columns:minmax(150px,1.2fr) minmax(70px,1fr) auto auto; gap:8px 10px; align-items:center; font-size:12.5px; padding:2px 4px; border-radius:6px; }
  .ch-bar-row.clickable{ cursor:pointer; } .ch-bar-row.clickable:hover, .ch-bar-row.clickable:focus-visible{ background:var(--accent-soft); outline:none; }
  .ch-bar-label{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-primary); }
  .ch-bar-track{ position:relative; height:12px; background:var(--surface-3); border-radius:6px; }
  .ch-bar-fill{ height:100%; background:var(--accent); border-radius:6px; }
  .ch-bar-fill.muted{ background:var(--s-base); } .ch-bar-fill.neg{ background:var(--status-good); }
  .ch-marker{ position:absolute; top:-3px; bottom:-3px; width:2px; background:var(--s-fc); border-radius:1px; }
  .ch-bar-value{ text-align:right; font-variant-numeric:tabular-nums; font-weight:600; white-space:nowrap; }
  .ch-share{ font-weight:400; color:var(--text-muted); font-size:11.5px; margin-left:4px; }
  .ch-bar-delta{ text-align:right; min-width:92px; }
  .ch-svg{ width:100%; height:auto; display:block; }
  .ch-svg .ch-grid{ stroke:var(--border-soft); stroke-width:1; } .ch-svg .ch-axis{ fill:var(--text-muted); font-size:10.5px; }
  .ch-svg .ch-bar-cur{ fill:var(--accent); } .ch-svg .ch-bar-cur.partial{ fill:var(--accent); opacity:.35; } .ch-svg .ch-bar-prev{ fill:var(--s-base); opacity:.7; }
  .ch-legend{ display:flex; gap:16px; flex-wrap:wrap; font-size:12px; color:var(--text-secondary); margin-top:6px; }
  .ch-legend .sw{ display:inline-block; width:10px; height:10px; border-radius:2px; margin-right:5px; vertical-align:-1px; }
  .ch-legend .sw.cur{ background:var(--accent); } .ch-legend .sw.prev{ background:var(--s-base); opacity:.7; } .ch-legend .sw.partial{ background:var(--accent); opacity:.35; }
  .ch-insights{ display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:12px; }
  .ch-insight{ border:1px solid var(--border-soft); border-left-width:4px; border-radius:10px; padding:10px 14px; background:var(--surface-2); }
  .ch-insight.warn{ border-left-color:var(--late); } .ch-insight.good{ border-left-color:var(--status-good); } .ch-insight.info{ border-left-color:var(--cat-couts); }
  .ch-insight h4{ margin:0 0 6px; font-size:13px; } .ch-insight ul{ margin:0; padding-left:18px; font-size:12.5px; line-height:1.6; }
  .ch-tools{ margin-bottom:8px; } .ch-search{ font:inherit; font-size:13px; padding:7px 12px; border:1px solid var(--border); border-radius:999px; background:var(--surface-2); color:var(--text-primary); min-width:260px; }
  .ch-table-wrap{ overflow-x:auto; max-height:520px; overflow-y:auto; border:1px solid var(--border-soft); border-radius:10px; }
  .ch-table{ width:100%; border-collapse:collapse; font-size:12.5px; }
  .ch-table th, .ch-table td{ padding:6px 10px; border-bottom:1px solid var(--border-soft); text-align:left; vertical-align:top; }
  .ch-table thead th{ position:sticky; top:0; background:var(--surface); z-index:1; font-size:11.5px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.03em; }
  .ch-table .num{ text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; } .ch-table .muted{ color:var(--text-muted); }
  .ch-table td.name{ max-width:420px; } .ch-table tr.clickable{ cursor:pointer; } .ch-table tr.clickable:hover{ background:var(--accent-soft); }
  .ch-th{ all:unset; cursor:pointer; font:inherit; text-transform:inherit; letter-spacing:inherit; color:inherit; font-weight:600; }
  .ch-import{ background:var(--surface); border:1px solid var(--border-soft); border-radius:12px; padding:10px 14px; margin:0 0 14px; }
  .ch-import summary{ cursor:pointer; font-weight:600; font-size:13.5px; color:var(--accent-strong); }
  .ch-import-row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:8px 0; }
  .ch-report{ margin-top:8px; }
  .ch-overlay{ position:fixed; inset:0; background:rgba(15,25,20,.5); display:flex; align-items:center; justify-content:center; z-index:1000; padding:16px; }
  .ch-modal{ background:var(--surface); color:var(--text-primary); border-radius:14px; padding:16px 18px; width:min(860px,100%); max-height:86vh; display:flex; flex-direction:column; box-shadow:0 20px 50px rgba(0,0,0,.3); }
  .ch-modal-head{ display:flex; justify-content:space-between; align-items:center; gap:10px; } .ch-modal h3{ margin:0; font-size:16px; }
  .ch-close{ all:unset; cursor:pointer; font-size:24px; line-height:1; padding:2px 8px; border-radius:8px; color:var(--text-secondary); } .ch-close:hover{ background:var(--surface-3); }
  .ch-modal .ch-table-wrap{ max-height:none; flex:1; }
  body.ro .ch-import{ display:none; }
  @media (max-width: 640px){ .ch-bar-row{ grid-template-columns:1fr auto; } .ch-bar-track{ grid-column:1 / -1; order:3; } .ch-bar-delta{ display:none; } .ch-two{ grid-template-columns:1fr; } }
  .ch-bars.no-delta .ch-bar-row{ grid-template-columns:minmax(150px,1.2fr) minmax(70px,1fr) auto; }

  /* --- actions annulées, historique daté, fenêtre d'annulation --- */
  .statut-select.st-annule select{ background: var(--surface-3); color: var(--text-muted); border-color: var(--border); }
  .card.cancelled{ opacity:.78; }
  .card.cancelled .detail{ text-decoration: line-through; text-decoration-color: var(--text-muted); color: var(--text-secondary); }
  .mod-stamp{ font-size:11.5px; color:var(--text-muted); }
  .mod-last{ font-size:12.5px; color:var(--text-secondary); } .mod-last.dim{ color:var(--text-muted); }
  .mod-details{ margin-top:6px; } .mod-details summary{ cursor:pointer; font-size:12.5px; color:var(--accent-strong); font-weight:600; }
  .mod-list{ margin:8px 0 0; padding-left:0; list-style:none; font-size:12px; line-height:1.55; display:flex; flex-direction:column; gap:5px; }
  .mod-list li{ padding:5px 8px; border-left:3px solid var(--border); background:var(--surface-2); border-radius:0 6px 6px 0; }
  .mod-date{ font-weight:600; color:var(--text-primary); } .mod-by{ color:var(--text-muted); }
  .cx-overlay{ position:fixed; inset:0; background:rgba(15,25,20,.5); display:flex; align-items:center; justify-content:center; z-index:1000; padding:16px; }
  .cx-dialog{ background:var(--surface); color:var(--text-primary); border-radius:14px; padding:18px 20px; width:min(520px,100%); box-shadow:0 20px 50px rgba(0,0,0,.3); }
  .cx-dialog h3{ margin:0 0 6px; font-size:16px; } .cx-title{ margin:0 0 12px; font-size:13px; color:var(--text-secondary); }
  .cx-label{ display:block; font-size:12.5px; font-weight:600; margin-bottom:6px; } .cx-req{ color:var(--late); font-weight:600; }
  .cx-dialog textarea{ width:100%; box-sizing:border-box; } .cx-actions{ display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
  .cx-actions .chip[disabled]{ opacity:.5; cursor:not-allowed; }

  /* --- notes de suivi en puces --- */
  .note-list{ margin:4px 0 8px; padding-left:20px; font-size:13px; line-height:1.55; color:var(--text-primary); }
  .note-list li{ margin:3px 0; } .note-list li::marker{ color:var(--accent); }
  .note-date{ font-weight:700; color:var(--accent-strong); white-space:nowrap; }
  .note-empty{ font-size:12.5px; color:var(--text-muted); margin:4px 0 8px; }
  .note-add{ display:flex; gap:8px; align-items:center; }
  .note-new{ flex:1; font:inherit; font-size:13px; padding:7px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); color:var(--text-primary); }
  .note-raw{ margin-top:8px; } .note-raw summary{ cursor:pointer; font-size:12px; color:var(--text-secondary); } .note-raw textarea{ margin-top:6px; width:100%; box-sizing:border-box; }
  .field .v .note-list{ margin:0; }

  /* --- modifier / ajouter / supprimer une action --- */
  .card-tools{ display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; padding-top:10px; border-top:1px dashed var(--border-soft); }
  .chip.danger{ color:var(--late); border-color:var(--late); } .chip.danger.active{ background:var(--late); color:#fff; }
  .deleted-box{ margin:14px 0 0; } .deleted-box summary{ cursor:pointer; font-size:13px; font-weight:600; color:var(--text-secondary); }
  .deleted-list{ list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; }
  .deleted-list li{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:12.5px; padding:6px 10px; background:var(--surface-2); border-radius:8px; border:1px solid var(--border-soft); }
  .deleted-list .del-title{ flex:1 1 260px; color:var(--text-secondary); text-decoration:line-through; }
  .cx-dialog input[type="text"], .cx-dialog input[type="number"], .cx-dialog input[type="date"], .cx-dialog select{ width:100%; box-sizing:border-box; font:inherit; font-size:13px; padding:7px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); color:var(--text-primary); margin-bottom:8px; }
  .cx-dialog textarea{ margin-bottom:8px; } .cx-dialog{ max-height:90vh; overflow:auto; }

  /* Onglet « Cotations et dépassements » */
  .ct2-bar{ position:relative; min-width:140px; height:20px; background:var(--surface-2); border-radius:6px; overflow:hidden; }
  .ct2-bar span{ position:absolute; inset:0 auto 0 0; background:var(--accent-soft); border-right:2px solid var(--accent); }
  .ct2-bar b{ position:relative; display:block; padding:1px 8px; font-size:12px; font-variant-numeric:tabular-nums; }
  .ct2-s1{ display:inline-block; margin-left:4px; padding:0 5px; border-radius:6px; font-size:11px; font-weight:600; background:var(--surface-2, rgba(0,0,0,.06)); color:var(--text-2, inherit); }
  .ct2-bad{ color:var(--status-critical); font-weight:700; }
  .ct2-alert{ border-left:4px solid var(--status-critical); }
  .ct2-detail td{ background:var(--surface-2); }
  .ct2-cols{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:10px 24px; }
  .ct2-cols h4{ margin:4px 0 6px; font-size:12.5px; } .ct2-cols ul{ margin:0; padding-left:18px; font-size:12.5px; line-height:1.6; }
  #ct2-root .ch-table td.name{ white-space:nowrap; } #ct2-root .ct2-bar{ min-width:110px; }

  /* Plan d'action : priorités, échéances, retards, import de check-list */
  .badge.prio-p0{ background:var(--status-critical); color:#fff; border:1px solid var(--status-critical); }
  .badge.prio-p1{ background:var(--status-warning); color:#fff; border:1px solid var(--status-warning); }
  .badge.prio-p2{ background:var(--surface-2); color:var(--text-secondary); border:1px solid var(--border); }
  .badge.late-badge{ color:var(--late); border-color:var(--late); font-weight:700; }
  .card.is-late{ border-left:4px solid var(--late); }
  .ck-projet{ flex:1 1 280px; min-width:220px; font:inherit; font-size:13px; padding:6px 10px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); color:var(--text-primary); }
