/* C5-D1 — DIRECTION B « Maîtrise d'ouvrage » (Premium Construction Cockpit) — shared foundation.
   Authority: docs/ai/c5d1/DESIGN_CONTRACT_B.md. Linked EXPLICITLY by the adopting templates (b_ui.ASSETS).
   Every rule is scoped to [data-c5b-screen] / body[data-c5b] / .b-* : no other page is affected.
   Own tokens (--b-*) only: the C5-A1 tokens are never redefined. */

@font-face { font-family: 'B Newsreader'; font-style: normal; font-weight: 500 600; font-display: swap;
  src: url('/client/static/c4/foundation/fonts/newsreader-var.woff2') format('woff2'); }
@font-face { font-family: 'B Public Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/client/static/c4/foundation/fonts/publicsans-var.woff2') format('woff2'); }

/* C7.12: the B tokens are shared by the screen AND the module dialogs rendered outside it (legacy stage / backdrop),
   so those dialogs resolve the same values (single source; layout below stays screen-only). */
[data-c5b-screen], body[data-c5b] :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal), body[data-c5b] .b-prompt {
  --b-stone: #ecedea; --b-surface: #ffffff; --b-surface-2: #fafaf8;
  --b-marine: #12284a; --b-marine-2: #1e3a63; --b-band-ink: #dbe3ee; --b-band-mute: #b9c7da; --b-band-line: #4a6690;
  --b-text: #1b2430; --b-text-2: #3f4a56; --b-muted: #5b6570; --b-rule: #dcdfda; --b-rule-soft: #eceeea;
  --b-ochre: #8a5a0b; --b-ochre-soft: #f3e8d2; --b-ochre-line: #c99a4a;
  --b-ok: #2c684c; --b-ok-soft: #e5f0ea; --b-risk: #a3302a; --b-risk-soft: #f8e6e4; --b-info: #1e3a63; --b-info-soft: #e6ecf5;
  --b-serif: 'B Newsreader', Georgia, 'Times New Roman', serif;
  --b-sans: 'B Public Sans', 'Inter', system-ui, sans-serif;
  --b-r-card: 10px; --b-r-ctl: 8px; --b-r-pill: 999px;
  --b-shadow: 0 1px 2px rgba(18, 40, 74, .05); --b-shadow-lift: 0 1px 2px rgba(18, 40, 74, .06), 0 8px 24px rgba(18, 40, 74, .07);
}
[data-c5b-screen] {
  --b-gutter: 32px; --b-gap: 24px; --b-gap-s: 16px;
  display: block; box-sizing: border-box; min-width: 0; max-width: none; margin: 0;
  padding: 0 var(--b-gutter) 36px; background: var(--b-stone);
  font: 400 14px/1.5 var(--b-sans); color: var(--b-text-2); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
body[data-c5b] { background: #ecedea; }
body[data-c5b] .c4ui-legacy-stage { background: #ecedea; }
[data-c5b-screen] *, [data-c5b-screen] *::before, [data-c5b-screen] *::after { box-sizing: border-box; }
[data-c5b-screen] .b-ic { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------------- Hero : bande marine — CANONICAL HERO GEOMETRY (contract §12) ----------------
   ONE geometry for every adopting screen: same min-height, paddings, title / sub-line alignment, actions placement,
   elevation box and lead-strip overlap. Screens vary the CONTENT only (lede, chips, actions). No per-screen override. */
[data-c5b-screen] { --b-hero-h: 156px; --b-hero-pt: 18px; --b-hero-lap: 28px; --b-elev-w: 232px; }
[data-c5b-screen] .b-band { position: relative; overflow: hidden; box-sizing: border-box; display: flex; align-items: center; gap: 24px;
  min-height: var(--b-hero-h); margin: 0 calc(-1 * var(--b-gutter));
  padding: var(--b-hero-pt) calc(var(--b-gutter) + var(--b-elev-w) + 16px) calc(var(--b-hero-pt) + var(--b-hero-lap)) var(--b-gutter);
  background: var(--b-marine); color: #fff; }
/* C5-D3.1 — ALGERIA HERO (USER_SELECTED image, docs/ai/c5d3/assets/hero_algerie_selected.png sha 55134393…): the photo is the
   band's signature visual, anchored right, ratio kept (height-based size, never stretched), under a marine → transparent
   gradient that keeps the text zone (left) at full marine for contrast. Geometry (156 px, paddings, actions, lap) unchanged.
   .b-band.b-band: one class of extra specificity so a legacy page-level section/card background reset cannot erase it. */
[data-c5b-screen] .b-band.b-band {
  background-color: var(--b-marine);
  /* R2 (C5-D3.2): the panorama starts earlier and stays perceptible in the centre (city + bay); the left text zone stays solid
     marine; the actions zone (ends at 100% − gutter − elevation box − 16 px) keeps ≥ .60 marine → white text ≥ 4.5:1 over the
     brightest sunlit pixels; fully open on the right (Monument des Martyrs, crane, site). Larger framing (285 %, top 34 %). */
  background-image: linear-gradient(90deg, var(--b-marine) 0%, var(--b-marine) max(34%, 480px), rgba(18, 40, 74, .72) max(50%, 640px),
      rgba(18, 40, 74, .60) calc(100% - var(--b-gutter) - var(--b-elev-w) - 16px), rgba(18, 40, 74, .10) calc(100% - var(--b-gutter) - var(--b-elev-w) + 64px),
      rgba(18, 40, 74, .02) 100%),
    url("assets/hero_algerie.webp");
  background-repeat: no-repeat, no-repeat; background-size: 100% 100%, auto 285%; background-position: 0 0, right 0 top 34%; }
/* C8A R2.1: in a viewport-fit column the band never shrinks below its content (a 2-line context / title used to be clipped
   under the topbar and the lead strip); the fitted workspace below already absorbs the height (min-height: 0, own scroll).
   Geometry tokens unchanged: a band whose content fits keeps exactly its canonical height. */
[data-c5b-screen] .b-band { flex-shrink: 0; }
/* C8A R1.3: a band « more » menu (b-menu: « Outils de l'étude », « Plus »…) opened inside the band was clipped by its overflow:hidden
   (only the first item visible / clickable, pre-existing on every Direction B screen with a band menu); while one is open the
   band lets it overflow and stacks above the page content (disclosure rows use z-index 20). Closed bands are unchanged. */
[data-c5b-screen] .b-band:has(.b-menu[open]) { overflow: visible; z-index: 60; }
[data-c5b-screen] .b-band > .b-elev { display: none; }  /* the SVG line elevation is replaced by the Algeria photo */
[data-c5b-screen] .b-band-copy { position: relative; z-index: 1; flex: 1 1 auto; min-width: 0; }
[data-c5b-screen] .b-band-ctx { min-height: 18px; margin: 0 0 4px; font: 400 13px/18px var(--b-sans); color: var(--b-band-mute); }
[data-c5b-screen] .b-band-title { margin: 0; font: 600 32px/38px var(--b-serif); letter-spacing: -.3px; color: #fff; }
[data-c5b-screen] .b-band-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 26px; margin-top: 6px; }
[data-c5b-screen] .b-band-lede { margin: 0; font: 400 14.5px/22px var(--b-sans); color: var(--b-band-ink); }
[data-c5b-screen] .b-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border: 1px solid var(--b-band-line);
  border-radius: var(--b-r-pill); font: 600 12.5px/1 var(--b-sans); color: #fff; }
[data-c5b-screen] .b-band-tabs { display: flex; gap: 26px; margin-top: 12px; }
[data-c5b-screen] .b-band-tabs a { padding-bottom: 6px; border-bottom: 2px solid transparent; color: var(--b-band-mute); font: 600 14px/1 var(--b-sans); text-decoration: none; }
[data-c5b-screen] .b-band-tabs a.on { color: #fff; border-bottom-color: var(--b-ochre-line); }
/* NUMIDRA_ETUDES_GLOBAL_UX_SIMPLIFICATION_R1_WAVE1 — study journey stepper rendered in the band tabs (studies_ui.journey_stepper, DQE ·
   Chiffrage · Contrôler l'offre · Finaliser): CURRENT = the « .on » tab above; DONE = muted + ochre check; NEXT = light label, dashed
   ochre underline. Scoped to .b-journey-step (inert anywhere else); band tab geometry unchanged. */
[data-c5b-screen] .b-band-tabs a.b-journey-step { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
[data-c5b-screen] .b-band-tabs a.b-journey-step.is-done { color: var(--b-band-mute); }
[data-c5b-screen] .b-band-tabs a.b-journey-step .b-journey-mark { width: 14px; height: 14px; fill: none; stroke: var(--b-ochre-line); stroke-width: 2.4; }
[data-c5b-screen] .b-band-tabs a.b-journey-step.is-next { color: var(--b-band-ink); border-bottom: 2px dashed var(--b-ochre-line); }
[data-c5b-screen] .b-band-tabs a.b-journey-step:hover { color: #fff; }
[data-c5b-screen] .b-band-tabs .b-journey-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[data-c5b-screen] .b-band-actions form { display: contents; margin: 0; }  /* an action may be a real form (e.g. validation) */
[data-c5b-screen] .b-band-actions { position: relative; z-index: 2; flex: 0 0 auto; display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; }
[data-c5b-screen] .b-elev { position: absolute; right: var(--b-gutter); bottom: var(--b-hero-lap); width: var(--b-elev-w);
  height: calc(100% - var(--b-hero-lap) - 12px); pointer-events: none; z-index: 0; }

/* ---------------- actions ---------------- */
[data-c5b-screen] .b-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px;
  border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); color: var(--b-text);
  font: 600 14px/1 var(--b-sans); text-decoration: none; white-space: nowrap; cursor: pointer; box-shadow: none; }
[data-c5b-screen] .b-btn:hover { border-color: var(--b-marine-2); }
[data-c5b-screen] .b-btn--primary { background: var(--b-marine); border-color: var(--b-marine); color: #fff; }
[data-c5b-screen] .b-btn--primary:hover { background: var(--b-marine-2); }
[data-c5b-screen] .b-btn--link { height: auto; padding: 0; border: 0; background: transparent; color: var(--b-marine-2); }
[data-c5b-screen] .b-band .b-btn { background: transparent; border-color: var(--b-band-line); color: #fff; }
[data-c5b-screen] .b-band .b-btn--primary { background: #fff; border-color: #fff; color: var(--b-marine); }
[data-c5b-screen] .b-band .b-btn:hover { border-color: #fff; }
[data-c5b-screen] .b-menu { position: relative; display: inline-block; }
[data-c5b-screen] .b-menu > summary { list-style: none; }
[data-c5b-screen] .b-menu > summary::-webkit-details-marker { display: none; }
[data-c5b-screen] .b-menu-list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 50; display: grid; min-width: 240px; padding: 6px;
  background: var(--b-surface); border: 1px solid var(--b-rule); border-radius: var(--b-r-card); box-shadow: var(--b-shadow-lift); }
[data-c5b-screen] .b-menu--left .b-menu-list { left: 0; right: auto; }
[data-c5b-screen] .b-menu-item { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 6px; background: transparent;
  color: var(--b-text); font: 500 14px/1.3 var(--b-sans); text-align: left; text-decoration: none; cursor: pointer; }
[data-c5b-screen] .b-menu-item:hover { background: var(--b-stone); }
[data-c5b-screen] :is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--b-ochre-line); outline-offset: 2px; }

/* ---------------- chiffres clés ---------------- */
[data-c5b-screen] .b-figures { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(var(--b-cols, 4), minmax(0, 1fr));
  margin: 0 0 var(--b-gap-s); background: var(--b-surface); border-radius: var(--b-r-card); box-shadow: var(--b-shadow-lift); }
/* lead strip = the first block under the band (figures, planning summary, detail facts): same overlap on every screen */
[data-c5b-screen] :is(.b-figures--overlap, .b-lead.b-lead) { position: relative; z-index: 3; margin-top: calc(-1 * var(--b-hero-lap)); }
[data-c5b-screen] .b-lead.b-lead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; min-height: 56px; margin-bottom: var(--b-gap-s);
  padding: 10px 22px; background: var(--b-surface); border-radius: var(--b-r-card); box-shadow: var(--b-shadow-lift); }
[data-c5b-screen] .b-fig { min-width: 0; padding: 12px 22px; border-left: 1px solid var(--b-rule); }
[data-c5b-screen] .b-fig:first-child { border-left: 0; }
[data-c5b-screen] .b-fig-label { display: block; font: 400 12.5px/1.3 var(--b-sans); color: var(--b-muted); }
[data-c5b-screen] .b-fig-value { display: block; margin: 4px 0 2px; font: 600 28px/1.1 var(--b-serif); letter-spacing: -.3px; color: var(--b-text); white-space: nowrap; }
[data-c5b-screen] .b-fig-value small { margin-left: 6px; font: 500 14px/1 var(--b-sans); color: var(--b-muted); letter-spacing: 0; }
[data-c5b-screen] .b-fig--risk .b-fig-value { color: var(--b-risk); }
[data-c5b-screen] .b-fig--ok .b-fig-value { color: var(--b-ok); }
[data-c5b-screen] .b-fig-sub { margin: 0; font: 400 12.5px/1.4 var(--b-sans); color: var(--b-text-2); }
[data-c5b-screen] .b-track { position: relative; height: 4px; margin: 6px 0 6px; background: var(--b-rule); border-radius: 2px; }
[data-c5b-screen] .b-track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--b-marine); border-radius: 2px; }
[data-c5b-screen] .b-track b { position: absolute; top: -4px; width: 2px; height: 12px; background: var(--b-ochre); }
[data-c5b-screen] .b-summary { display: flex; flex-wrap: wrap; gap: 8px 36px; margin: 0; }
[data-c5b-screen] .b-sum span { display: block; font: 400 12.5px/1.3 var(--b-sans); color: var(--b-muted); }
[data-c5b-screen] .b-sum strong { display: block; font: 600 22px/1.15 var(--b-serif); color: var(--b-text); white-space: nowrap; }
[data-c5b-screen] .b-sum--risk strong { color: var(--b-risk); }
[data-c5b-screen] .b-facts { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0 0 var(--b-gap-s); }
[data-c5b-screen] .b-fact { font: 400 13px/1.4 var(--b-sans); color: var(--b-muted); }
[data-c5b-screen] .b-fact strong { margin-left: 6px; font-weight: 600; color: var(--b-text); }

/* ---------------- cartes / sections ---------------- */
[data-c5b-screen] .b-card { min-width: 0; margin: 0 0 var(--b-gap); background: var(--b-surface); border-radius: var(--b-r-card); box-shadow: var(--b-shadow); }
[data-c5b-screen] .b-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 18px 24px 10px; }
[data-c5b-screen] .b-card-head h2 { margin: 0; font: 600 21px/1.2 var(--b-serif); color: var(--b-text); letter-spacing: -.1px; }
[data-c5b-screen] .b-card-meta { font: 400 13px/1.3 var(--b-sans); color: var(--b-muted); }
[data-c5b-screen] .b-card-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
[data-c5b-screen] .b-card-body { padding: 0 24px 20px; }
[data-c5b-screen] .b-card--flush .b-card-body { padding: 0; }
[data-c5b-screen] .b-cols { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--b-gap); align-items: start; }
[data-c5b-screen] .b-cols > * { min-width: 0; }
[data-c5b-screen] .b-stack { display: grid; gap: var(--b-gap); align-content: start; }
[data-c5b-screen] .b-stack > .b-card { margin: 0; }
[data-c5b-screen] .b-disc { margin: 0 0 var(--b-gap); background: var(--b-surface); border-radius: var(--b-r-card); box-shadow: var(--b-shadow); }
[data-c5b-screen] .b-disc > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; cursor: pointer; list-style: none; }
[data-c5b-screen] .b-disc > summary::-webkit-details-marker { display: none; }
[data-c5b-screen] .b-disc > summary strong { display: block; font: 600 18px/1.25 var(--b-serif); color: var(--b-text); }
[data-c5b-screen] .b-disc > summary small { display: block; margin-top: 2px; font: 400 13px/1.35 var(--b-sans); color: var(--b-muted); }
[data-c5b-screen] .b-disc[open] > summary .b-ic { transform: rotate(180deg); }
[data-c5b-screen] .b-disc-body { padding: 4px 24px 20px; border-top: 1px solid var(--b-rule-soft); }

/* ---------------- tables / toolbar / filtres ---------------- */
[data-c5b-screen] .b-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 24px; }
[data-c5b-screen] .b-toolbar .b-grow { flex: 1; }
[data-c5b-screen] .b-search { display: flex; align-items: center; gap: 10px; flex: 0 1 360px; height: 38px; padding: 0 14px; border-radius: var(--b-r-pill);
  background: var(--b-stone); color: var(--b-muted); }
[data-c5b-screen] .b-search input { flex: 1; min-width: 0; height: 36px; border: 0; background: transparent; font: 400 14px/1 var(--b-sans); color: var(--b-text); outline: none; }
[data-c5b-screen] .b-filter { height: 36px; padding: 0 14px; border: 1px solid var(--b-rule); border-radius: var(--b-r-pill); background: var(--b-surface);
  color: var(--b-text-2); font: 600 13px/1 var(--b-sans); }
[data-c5b-screen] .b-filter.on, [data-c5b-screen] a.b-filter.on { background: var(--b-marine); border-color: var(--b-marine); color: #fff; }
[data-c5b-screen] table.b-table, [data-c5b-screen] .b-tablewrap table { width: 100%; border-collapse: collapse; }
[data-c5b-screen] .b-tablewrap { overflow-x: auto; }
[data-c5b-screen] .b-tablewrap th { padding: 11px 16px; background: var(--b-surface-2); border-bottom: 1px solid var(--b-rule); text-align: left;
  font: 600 12.5px/1.2 var(--b-sans); color: var(--b-muted); text-transform: none; letter-spacing: 0; white-space: nowrap; }
[data-c5b-screen] .b-tablewrap td { padding: 13px 16px; border-bottom: 1px solid var(--b-rule); color: var(--b-text-2); vertical-align: middle; }
[data-c5b-screen][data-c5b-arch="data"] .b-tablewrap td { padding: 10px 16px; }
[data-c5b-screen] .b-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--b-r-pill); font: 600 12.5px/1 var(--b-sans); white-space: nowrap; }
[data-c5b-screen] .b-badge--ok { background: var(--b-ok-soft); color: var(--b-ok); }
[data-c5b-screen] .b-badge--risk { background: var(--b-risk-soft); color: var(--b-risk); }
[data-c5b-screen] .b-badge--watch { background: var(--b-ochre-soft); color: var(--b-ochre); }
[data-c5b-screen] .b-badge--info { background: var(--b-info-soft); color: var(--b-info); }
[data-c5b-screen] .b-badge--neutral { background: var(--b-stone); color: var(--b-text-2); }
[data-c5b-screen] .b-empty { padding: 26px 24px; text-align: center; }
[data-c5b-screen] .b-empty strong { display: block; font: 600 17px/1.3 var(--b-serif); color: var(--b-text); }
[data-c5b-screen] .b-empty p { margin: 6px auto 12px; max-width: 48ch; font: 400 13.5px/1.5 var(--b-sans); color: var(--b-muted); }
[data-c5b-screen] .b-note { margin: 0 0 var(--b-gap-s); padding: 11px 16px; border-left: 3px solid var(--b-marine-2); border-radius: 6px; background: var(--b-surface);
  font: 400 13.5px/1.5 var(--b-sans); color: var(--b-text-2); box-shadow: var(--b-shadow); }
[data-c5b-screen] .b-note--watch { border-left-color: var(--b-ochre-line); }
[data-c5b-screen] .b-note--risk { border-left-color: var(--b-risk); }
[data-c5b-screen] .b-note strong { color: var(--b-text); }

/* ---------------- responsive ---------------- */
@media (max-width: 1600px) {
  [data-c5b-screen] { --b-gutter: 24px; --b-gap: 20px; }
  [data-c5b-screen] .b-cols { grid-template-columns: minmax(0, 1fr) 330px; }
  [data-c5b-screen] .b-fig { padding: 12px 18px; }
}
@media (max-width: 1400px) {
  [data-c5b-screen] .b-cols { grid-template-columns: minmax(0, 1fr); }
  [data-c5b-screen] { --b-elev-w: 180px; }
}
/* V11 Q2 (founder 31/10, « 2 colonnes partout ») — the figure band goes to 2 columns from 1180 px down (4 columns down to 768 px let a
   large value overflow its cell: « 13 157 000 DA » +39 px at 950 px). Inserted before the 768 px block: the 600 px rule (1 column) still
   wins after it. Unchanged above 1180 px. */
@media (max-width: 1180px) {
  [data-c5b-screen] .b-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-c5b-screen] .b-fig:nth-child(odd) { border-left: 0; }
  [data-c5b-screen] .b-fig:nth-child(n+3) { border-top: 1px solid var(--b-rule); }
}
/* L8b — narrow screens (client shell drawer, 768 px and below): the page band gives its text the full width (the right padding
   reserved for the elevation box goes back to the gutter) and its actions wrap under it instead of crushing it; the figure band
   wraps (2 columns, then 1 at 600 px and below) so a large value (e.g. « 1 642 834 653 DA », 231 px) stays inside its cell instead
   of widening the page. Unchanged above 768 px. */
@media (max-width: 768px) {
  [data-c5b-screen] .b-band { flex-wrap: wrap; padding-right: var(--b-gutter); }
  [data-c5b-screen] .b-band-copy { flex-basis: 100%; }
  [data-c5b-screen] .b-band-actions { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; }
  [data-c5b-screen] .b-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-c5b-screen] .b-fig:nth-child(odd) { border-left: 0; }
  [data-c5b-screen] .b-fig:nth-child(n+3) { border-top: 1px solid var(--b-rule); }
}
@media (max-width: 600px) {
  [data-c5b-screen] .b-figures { grid-template-columns: minmax(0, 1fr); }
  [data-c5b-screen] .b-fig { border-left: 0; }
  [data-c5b-screen] .b-fig:nth-child(n+2) { border-top: 1px solid var(--b-rule); }
}

/* ---------------- Sidebar B (contract §13) — VISUAL ONLY on adopting pages ----------------
   The C5-A2 registry markup, links, routes, RBAC gating, group toggles, active-route logic and badges are untouched:
   only colours, type, spacing and the decorative photo change. Palette = Direction B prototype (side / side-2 / ink / mute). */
body[data-c5b] { --b-side: #0e2140; --b-side-2: #1a3561; --b-side-ink: #d3dce8; --b-side-mute: #9aabc1; --b-side-rule: rgba(211, 220, 232, .12); }
body[data-c5b] #c4ui-root .c4ui-sidebar { background: var(--b-side); color: var(--b-side-ink); font-family: 'B Public Sans', Inter, system-ui, sans-serif; box-shadow: 1px 0 0 rgba(0, 0, 0, .18); }
body[data-c5b] #c4ui-root .c4ui-sidebar::after { display: none; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-brand { min-height: 78px; padding: 16px 20px 14px; gap: 12px; border-bottom: 1px solid var(--b-side-rule); }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-brand-title { font: 700 16px/1.15 'B Public Sans', Inter, sans-serif; letter-spacing: .01em; color: #fff; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-brand-subtitle { margin-top: 3px; font: 400 12px/1.35 'B Public Sans', Inter, sans-serif; color: var(--b-side-mute); }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav { padding: 14px 12px 0; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav-link { height: 40px; min-height: 40px; gap: 12px; margin: 0 0 2px; padding: 0 12px; border-radius: 8px; background: transparent;
  color: var(--b-side-ink); font: 500 14px/1.2 'B Public Sans', Inter, sans-serif; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav-icon { width: 20px; height: 20px; flex: 0 0 20px; color: var(--b-side-mute); }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav-icon svg { width: 19px; height: 19px; stroke-width: 1.7; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav-link:hover .c4ui-nav-icon { color: var(--b-side-ink); }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav-group.is-current { background: transparent; color: #fff; font-weight: 600; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav-group.is-current .c4ui-nav-icon { color: #fff; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav-link.c4ui-nav-entry.is-active { background: var(--b-side-2); color: #fff; font-weight: 600; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav-link.c4ui-nav-entry.is-active .c4ui-nav-icon { color: #fff; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-nav-chevron { color: var(--b-side-mute); opacity: 1; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-subnav { margin: 2px 0 8px 22px; padding: 0 0 0 14px; border-left: 1px solid var(--b-side-rule); }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-sub-link { position: relative; min-height: 30px; margin: 0 0 1px; padding: 6px 10px; border-radius: 6px; background: transparent;
  color: var(--b-side-mute); font: 400 13px/1.25 'B Public Sans', Inter, sans-serif; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-sub-link:hover { background: rgba(255, 255, 255, .04); color: #fff; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-sub-link.is-active { overflow: visible; background: rgba(255, 255, 255, .06); color: #fff; font-weight: 600; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-sub-link.is-active::before { content: ""; position: absolute; left: -18px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: #c99a4a; box-shadow: 0 0 0 2px var(--b-side); }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-sub-hint { margin: 4px 0 6px; padding: 7px 10px; border: 1px dashed var(--b-side-rule); border-radius: 6px; color: var(--b-side-mute);
  font: 400 12px/1.4 'B Public Sans', Inter, sans-serif; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-sub-hint:hover { color: #fff; border-color: rgba(211, 220, 232, .3); }
body[data-c5b] #c4ui-root .c4ui-sidebar :is(.c4ui-nav-badge, .c4ui-sub-badge) { background: #c99a4a; color: var(--b-side); font: 700 11px/18px 'B Public Sans', Inter, sans-serif; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-help-card { min-height: 52px; gap: 12px; padding: 8px 12px; border: 1px solid var(--b-side-rule); border-radius: 10px;
  background: rgba(255, 255, 255, .04); box-shadow: none; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-help-card:hover { background: rgba(255, 255, 255, .07); }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-help-icon { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid var(--b-side-rule); background: transparent; color: var(--b-side-ink); }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-help-card strong { font: 600 13px/1.3 'B Public Sans', Inter, sans-serif; color: #fff; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-help-card small { font: 400 12px/1.35 'B Public Sans', Inter, sans-serif; color: var(--b-side-mute); white-space: normal; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-sidebar-footer { left: 20px; bottom: 14px; }
body[data-c5b] #c4ui-root .c4ui-sidebar .c4ui-sidebar-footer strong { font: 500 11px/1 'B Public Sans', Inter, sans-serif; letter-spacing: .04em; color: var(--b-side-mute); }
body[data-c5b] #c4ui-root .c4ui-sidebar :is(.c4ui-nav-link, .c4ui-sub-link, .c4ui-sub-hint, .c4ui-help-card, .c4ui-brand):focus-visible { outline: 2px solid #c99a4a; outline-offset: -2px; }

/* ======================= CANARY ADAPTERS (explicit, one block per adopting screen) ======================= */
/* ---- CANARY 1 · Accueil (cockpit) : legacy portfolio markup kept (ids / handlers), restyled to B ---- */
[data-c5b-screen="home"] .dashboard-content { padding: 0; margin: 0; max-width: none; }
[data-c5b-screen="home"] .dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--b-gap); align-items: start; margin: 0; }
[data-c5b-screen="home"] .dashboard-left, [data-c5b-screen="home"] .dashboard-right { display: grid; gap: var(--b-gap); align-content: start; min-width: 0; }
[data-c5b-screen="home"] .card { margin: 0; padding: 0; border: 0; border-radius: var(--b-r-card); background: var(--b-surface); box-shadow: var(--b-shadow); }
[data-c5b-screen="home"] .cc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 24px 16px; margin: 0; border: 0; }
[data-c5b-screen="home"] .cc-toolbar .search-control { flex: 0 1 380px; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px;
  border: 0; border-radius: var(--b-r-pill); background: var(--b-stone); color: var(--b-muted); }
[data-c5b-screen="home"] .cc-toolbar .search-control svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
[data-c5b-screen="home"] .cc-toolbar .search-control input { flex: 1; height: 36px; border: 0; background: transparent; box-shadow: none; font: 400 14px/1 var(--b-sans); color: var(--b-text); }
[data-c5b-screen="home"] .cc-toolbar select { height: 36px; padding: 0 30px 0 14px; border: 1px solid var(--b-rule); border-radius: var(--b-r-pill); background-color: var(--b-surface);
  font: 600 13px/1 var(--b-sans); color: var(--b-text-2); box-shadow: none; }
[data-c5b-screen="home"] .cc-toolbar #c4eHomeExport { margin-left: auto; height: 36px; padding: 0 14px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface);
  color: var(--b-text); font: 600 13.5px/1 var(--b-sans); box-shadow: none; }
[data-c5b-screen="home"] .cc-table { border: 0; border-radius: 0; }
[data-c5b-screen="home"] .cc-thead { padding: 0 24px; min-height: 40px; background: var(--b-surface-2); border-top: 1px solid var(--b-rule); border-bottom: 1px solid var(--b-rule);
  font: 600 12.5px/1.2 var(--b-sans); color: var(--b-muted); text-transform: none; letter-spacing: 0; }
[data-c5b-screen="home"] .cc-row { padding: 0 24px; min-height: 64px; border-bottom: 1px solid var(--b-rule); background: var(--b-surface); }
[data-c5b-screen="home"] .cc-row:hover { background: #f7f8f5; }
[data-c5b-screen="home"] .cc-name strong { font: 600 14.5px/1.3 var(--b-sans); color: var(--b-text); }
[data-c5b-screen="home"] .cc-cell, [data-c5b-screen="home"] .cc-progress-cell { font: 400 13.5px/1.3 var(--b-sans); color: var(--b-text-2); }
[data-c5b-screen="home"] .cc-thumb { border-radius: 6px; overflow: hidden; }
[data-c5b-screen="home"] .progress { height: 5px; border-radius: 3px; background: #e6e8e4; }
[data-c5b-screen="home"] .progress i { background: var(--b-marine); border-radius: 3px; }
[data-c5b-screen="home"] .cc-open { height: 32px; padding: 0 12px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); color: var(--b-text); font: 600 13px/1 var(--b-sans); box-shadow: none; }
[data-c5b-screen="home"] .cc-foot { padding: 12px 24px 16px; border: 0; font: 400 13px/1.3 var(--b-sans); color: var(--b-muted); }
/* context column */
[data-c5b-screen="home"] .cc-import, [data-c5b-screen="home"] .cc-apex { padding: 20px 24px; min-height: 0; overflow: hidden; }
[data-c5b-screen="home"] .cc-import .h3, [data-c5b-screen="home"] .cc-apex .h3 { font: 600 20px/1.25 var(--b-serif); color: var(--b-text); }
[data-c5b-screen="home"] :is(.cc-import p, .cc-apex-copy, .cc-apex-kicker) { font: 400 13.5px/1.5 var(--b-sans); color: var(--b-text-2); }
[data-c5b-screen="home"] :is(.cc-import-icon, .cc-apex-icon) { background: var(--b-stone); color: var(--b-marine); border-radius: 8px; box-shadow: none; }
[data-c5b-screen="home"] :is(.cc-apex-spark, .r2-apex-robot) { display: none; }
[data-c5b-screen="home"] :is(.cc-import, .cc-apex) .btn { height: 38px; padding: 0 16px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface);
  color: var(--b-text); font: 600 14px/1 var(--b-sans); box-shadow: none; }
@media (max-width: 1600px) { [data-c5b-screen="home"] .dashboard-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 1400px) { [data-c5b-screen="home"] .dashboard-grid { grid-template-columns: minmax(0, 1fr); } }
/* Accueil: legacy fixed geometry released (portfolio grows with its rows, pager in flow, no blue top rule) */
[data-c5b-screen="home"] .cc-portfolio { height: auto; overflow: visible; padding: 0; }
[data-c5b-screen="home"] .cc-foot { position: static; height: auto; display: flex; align-items: center; justify-content: space-between; }
[data-c5b-screen="home"] .cc-pager button, [data-c5b-screen="home"] .cc-pager a { min-width: 32px; height: 32px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); color: var(--b-text); font: 600 13px/1 var(--b-sans); box-shadow: none; }
[data-c5b-screen="home"] .cc-pager .is-active, [data-c5b-screen="home"] .cc-pager [aria-current] { background: var(--b-marine); border-color: var(--b-marine); color: #fff; }
[data-c5b-screen="home"] .cc-apex { height: auto; background: var(--b-surface); border: 0; }
[data-c5b-screen="home"] .cc-apex-head, [data-c5b-screen="home"] .cc-import-head { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; }
[data-c5b-screen="home"] .cc-apex-kicker { text-transform: none; letter-spacing: 0; color: var(--b-muted); font-size: 13px; }
[data-c5b-screen="home"] .cc-apex-copy { position: static; margin: 0 0 14px; }
[data-c5b-screen="home"] :is(.cc-import, .cc-apex) .btn { position: static; width: auto; display: inline-flex; align-items: center; gap: 8px; }
[data-c5b-screen="home"] .badge { height: 24px; padding: 0 10px; border: 0; border-radius: var(--b-r-pill); font: 600 12.5px/24px var(--b-sans); }
[data-c5b-screen="home"] .badge-info { background: var(--b-info-soft); color: var(--b-info); }
[data-c5b-screen="home"] .badge-success { background: var(--b-ok-soft); color: var(--b-ok); }
[data-c5b-screen="home"] .badge-warning { background: var(--b-ochre-soft); color: var(--b-ochre); }
[data-c5b-screen="home"] .badge-danger { background: var(--b-risk-soft); color: var(--b-risk); }
body[data-c5b] .lab-app { background: #ecedea; }


/* ---- CANARY 2 · DQE (data archetype): table dominant, context in disclosures, legacy owner9/F1 layer restyled ---- */
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] { padding: 0 var(--b-gutter) 36px; }
body[data-c5b] [data-c5b-screen="dqe"] > .c4ui-page-body { padding: 0; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-maincol { display: block; min-width: 0; }
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] .owner9-workspace.c4ui-card { margin: 0 0 var(--b-gap); padding: 0; border: 0; border-radius: var(--b-r-card); background: var(--b-surface); box-shadow: var(--b-shadow); }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-work-head { padding: 18px 24px 8px; border: 0; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-work-head .c4ui-card-title { font: 600 21px/1.2 var(--b-serif); color: var(--b-text); letter-spacing: -.1px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-work-head .c4ui-card-subtitle { font: 400 13px/1.4 var(--b-sans); color: var(--b-muted); }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-study-context { font: 400 13px/1.4 var(--b-sans); color: var(--b-muted); gap: 10px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-study-name { font: 600 13px/1.4 var(--b-sans); color: var(--b-text); background: transparent; padding: 0; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-status { height: 22px; padding: 0 10px; border-radius: var(--b-r-pill); background: var(--b-ok-soft); color: var(--b-ok); font: 600 12px/22px var(--b-sans); }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-work-actions .c4ui-btn { height: 36px; padding: 0 14px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); color: var(--b-text); font: 600 13.5px/1 var(--b-sans); box-shadow: none; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-toolbar { padding: 6px 24px 14px; gap: 10px; border: 0; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-search { flex: 0 1 460px; height: 38px; padding: 0 14px; border: 0; border-radius: var(--b-r-pill); background: var(--b-stone); }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-search input { height: 36px; border: 0; background: transparent; box-shadow: none; padding-left: 8px; font: 400 14px/1 var(--b-sans); }
body[data-c5b] [data-c5b-screen="dqe"] #x-status-filter { height: 36px; padding: 0 30px 0 14px; border: 1px solid var(--b-rule); border-radius: var(--b-r-pill); font: 600 13px/1 var(--b-sans); color: var(--b-text-2); }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table-wrap { border: 0; border-top: 1px solid var(--b-rule); border-radius: 0; }
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] .owner9-table th { padding: 11px 14px; background: var(--b-surface-2); border-color: var(--b-rule); color: var(--b-muted); font: 600 12.5px/1.2 var(--b-sans); white-space: nowrap; }
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] .owner9-table td { padding: 10px 14px; border-color: var(--b-rule); color: var(--b-text-2); font: 400 13px/1.4 var(--b-sans); vertical-align: top; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table td :is(strong, b) { font-weight: 500; color: var(--b-text); }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table td:last-child { min-width: 118px; color: var(--b-muted); font-size: 12.5px; line-height: 1.35; }
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] .owner9-table td.designation, body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] .owner9-table td.designation * { font-weight: 500; color: var(--b-text); }
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] .owner9-search #x-table-search { border: 0; background: transparent; box-shadow: none; min-height: 36px; }
body[data-c5b] [data-c5b-screen="dqe"] #x-status-filter { min-width: 190px; }
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] .owner9-phase-band { border-left: 2px solid var(--b-ochre-line); background: transparent; padding: 6px 12px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-phase-band strong { font: 600 16px/1.3 var(--b-serif); color: var(--b-text); white-space: normal; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-phase-band :is(.owner9-phase-kicker, small, span:first-child) { background: transparent; color: var(--b-ochre); font: 600 12px/1 var(--b-sans); letter-spacing: 0; text-transform: none; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table tr:has(.owner9-phase-band) td { background: var(--b-surface); }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table-footer { padding: 12px 24px 16px; border-color: var(--b-rule); font: 400 13px/1.3 var(--b-sans); color: var(--b-muted); }
body[data-c5b] [data-c5b-screen="dqe"] .x-page-btn, body[data-c5b] [data-c5b-screen="dqe"] .owner9-pagebuttons button, body[data-c5b] [data-c5b-screen="dqe"] #x-page-size {
  min-width: 32px; height: 32px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); color: var(--b-text); font: 600 13px/1 var(--b-sans); box-shadow: none; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-pagebuttons button.is-active, body[data-c5b] [data-c5b-screen="dqe"] .owner9-pagebuttons [aria-current] { background: var(--b-marine); border-color: var(--b-marine); color: #fff; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-toolbar { grid-template-columns: minmax(0, 1fr) auto auto; }
/* column widths re-balanced for the B type scale (13px, 14px cell padding): designation keeps the remaining width */
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table th:nth-child(1) { width: 52px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table th:nth-child(3) { width: 52px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table th:nth-child(4) { width: 92px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table :is(th:nth-child(5), th:nth-child(6), th:nth-child(7)) { width: 98px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table th:nth-child(8) { width: 76px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table th:nth-child(9) { width: 124px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table th:nth-child(10) { width: 150px; }
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] .owner9-table th:is(:nth-child(4), :nth-child(5), :nth-child(6), :nth-child(7), :nth-child(8), :nth-child(9)) { text-align: right; }
body[data-c5b] [data-c5b-screen="dqe"] .b-disc .c4ui-card { border: 0; box-shadow: none; margin: 0; }
body[data-c5b] [data-c5b-screen="dqe"] .b-dqe-flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--b-gap); }
@media (max-width: 1400px) { body[data-c5b] [data-c5b-screen="dqe"] .b-dqe-flow { grid-template-columns: minmax(0, 1fr); } }

/* ---- CANARY 3 · Planning V2 (planning archetype): slim band, inline summary, Gantt dominant, context collapsed ---- */
[data-c5b-screen="planning"] .b-plan-sum .b-summary { margin: 14px 0 12px; }
[data-c5b-screen="planning"] .b-sum strong small { font: 500 13px/1 var(--b-sans); color: var(--b-muted); }
[data-c5b-screen="planning"] .c4ap-inline { margin: 0 0 14px; padding: 10px 16px; border: 0; border-left: 3px solid var(--b-ochre-line); border-radius: 6px; background: var(--b-surface); box-shadow: var(--b-shadow);
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
[data-c5b-screen="planning"] .c4ap-inline ul { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; list-style: none; font: 400 13.5px/1.4 var(--b-sans); color: var(--b-text-2); }
[data-c5b-screen="planning"] .c4ap-inline .c4ap-kicker { font: 600 13px/1 var(--b-sans); color: var(--b-ochre); text-transform: none; letter-spacing: 0; }
[data-c5b-screen="planning"] .c4ap-inline .c4ap-btn { margin-left: auto; height: 32px; padding: 0 12px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); color: var(--b-text); font: 600 13px/32px var(--b-sans); }
[data-c5b-screen="planning"] .c4p5-tabs { display: inline-flex; gap: 2px; margin: 0 0 12px; padding: 3px; border: 0; border-radius: 10px; background: #dfe1dc; width: auto; box-shadow: none; }
[data-c5b-screen="planning"] .c4p5-tab { height: 32px; min-height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--b-text-2); font: 600 13px/1 var(--b-sans); box-shadow: none; }
[data-c5b-screen="planning"] .c4p5-tab.active { background: var(--b-surface); color: var(--b-text); box-shadow: 0 1px 2px rgba(18, 40, 74, .12); }
[data-c5b-screen="planning"] .c4p5-tab svg { width: 15px; height: 15px; }
[data-c5b-screen="planning"] .c4p5-planning-card .c5-card-head h2 { font: 600 20px/1.2 var(--b-serif); color: var(--b-text); }
[data-c5b-screen="planning"] .c4p5-planning-card .c5-card-head p { font: 400 13px/1.4 var(--b-sans); color: var(--b-muted); }
[data-c5b-screen="planning"] .c4p5-filterbar input { border-radius: var(--b-r-pill); background: var(--b-stone); border-color: transparent; }
[data-c5b-screen="planning"] .b-disc .c5-card { border: 0; box-shadow: none; }
[data-c5b-screen="planning"] #b-plan-context .b-disc-body { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--b-gap-s); }
@media (max-width: 1400px) { [data-c5b-screen="planning"] #b-plan-context .b-disc-body { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[data-c5b-screen="planning"] .c5-native-tools { margin-top: 12px; }

/* ---- CANARY 5 · Documents entrants (document archetype): queue dominant, upload + policy disclosures ---- */
body#c5-page[data-c5b] main.c4ep-page[data-c5b-screen="documents"] { width: auto; max-width: none; margin: 0; padding: 0 var(--b-gutter) 36px; background: var(--b-stone); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-views { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-views .b-filter { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-views .c4di-count { min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--b-r-pill); background: var(--b-stone); color: var(--b-text-2); font: 600 12px/20px var(--b-sans); text-align: center; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-views .on .c4di-count { background: rgba(255, 255, 255, .18); color: #fff; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4di-filter { display: flex; gap: 8px; align-items: center; margin: 0; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4di-filter select { height: 36px; padding: 0 30px 0 14px; border: 1px solid var(--b-rule); border-radius: var(--b-r-pill); background-color: var(--b-surface); font: 600 13px/1 var(--b-sans); color: var(--b-text-2); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] :is(.c4ep-btn, .c4di-filter button) { height: 36px; padding: 0 14px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); color: var(--b-text); font: 600 13.5px/1 var(--b-sans); box-shadow: none; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-btn--primary { background: var(--b-marine); border-color: var(--b-marine); color: #fff; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-table-wrap { border: 0; border-top: 1px solid var(--b-rule); border-radius: 0; box-shadow: none; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-table th { padding: 11px 16px; background: var(--b-surface-2); border-bottom: 1px solid var(--b-rule); color: var(--b-muted); font: 600 12.5px/1.2 var(--b-sans); text-transform: none; letter-spacing: 0; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-table td { padding: 13px 16px; border-bottom: 1px solid var(--b-rule); color: var(--b-text-2); font: 400 13.5px/1.4 var(--b-sans); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-person-name { color: var(--b-text); font: 600 14px/1.3 var(--b-sans); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-person-meta { color: var(--b-muted); font: 400 12.5px/1.4 var(--b-sans); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-empty { padding: 30px 24px; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-empty strong { font: 600 17px/1.3 var(--b-serif); color: var(--b-text); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-empty-icon { background: var(--b-stone); color: var(--b-marine); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-row-link { color: var(--b-marine-2); font: 600 13px/1 var(--b-sans); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-disc .c4ep-card { margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-disc .c4ep-card-head { display: none; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4di-upload { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 12px; align-items: end; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-field label { font: 600 12.5px/1.3 var(--b-sans); color: var(--b-text-2); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-field :is(select, input) { height: 38px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); font: 400 14px/1 var(--b-sans); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4hr-note { margin-top: 12px; color: var(--b-muted); font: 400 13px/1.5 var(--b-sans); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-dist-row { border-color: var(--b-rule-soft); font: 400 13.5px/1.4 var(--b-sans); color: var(--b-text-2); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4ep-dist-row strong { color: var(--b-text); font-weight: 600; }

body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4hr-exc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--b-rule-soft); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4hr-exc-row code { display: block; font: 600 13.5px/1.35 var(--b-sans); color: var(--b-text); background: transparent; padding: 0; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4hr-exc-row small { display: block; margin-top: 2px; font: 400 11.5px/1.3 var(--b-sans); color: var(--b-muted); letter-spacing: .01em; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .c4hr-count { min-width: 26px; height: 22px; padding: 0 8px; border-radius: var(--b-r-pill); background: var(--b-risk-soft); color: var(--b-risk); font: 600 12.5px/22px var(--b-sans); text-align: center; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-doc-queue .b-card-head { padding-bottom: 4px; }

/* ---- CANARY 4 · Radar (portfolio archetype): band + figures, toolbar, opportunity list dominant ---- */
body#c5-page[data-c5b] main.c4rd-page[data-c5b-screen="radar"] { padding: 0 var(--b-gutter) 36px; background: var(--b-stone); font: 400 14px/1.5 var(--b-sans); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] form.c4rd-filters { margin: 0 0 14px; padding: 14px 20px; background: var(--b-surface); border-radius: var(--b-r-card); box-shadow: var(--b-shadow); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] form.c4rd-filters :is(input, select) { height: 38px; border: 1px solid var(--b-rule); border-radius: var(--b-r-pill); background: var(--b-surface); font: 500 13.5px/1 var(--b-sans); color: var(--b-text-2); padding: 0 14px; }
body#c5-page[data-c5b] [data-c5b-screen="radar"] form.c4rd-filters input[type=search] { border-color: transparent; background: var(--b-stone); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-morefilters > summary { height: 38px; border: 1px solid var(--b-rule); border-radius: var(--b-r-pill); background: var(--b-surface); color: var(--b-text); font: 600 13.5px/1 var(--b-sans); padding: 0 14px; }
body#c5-page.c4ui-app[data-c5b] [data-c5b-screen="radar"] :is(.c4rd-btn.is-primary.c5f1-primary, form.c4rd-filters .c5f1-primary) { height: 38px; border-radius: var(--b-r-ctl); background: var(--b-marine); border-color: var(--b-marine); color: #fff; font: 600 14px/1 var(--b-sans); padding: 0 18px; }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-listhead { align-items: center; }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-listhead .c4rd-count { padding-top: 0; font: 600 20px/1.2 var(--b-serif); color: var(--b-text); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c5f1-disclosure { border: 0; border-radius: var(--b-r-card); box-shadow: var(--b-shadow); background: var(--b-surface); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c5f1-disclosure > summary strong { font: 600 16px/1.3 var(--b-serif); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-list { gap: 12px; }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-card { padding: 16px 20px; border: 0; border-radius: var(--b-r-card); background: var(--b-surface); box-shadow: var(--b-shadow); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-card h3 { font: 600 17px/1.35 var(--b-serif); margin: 6px 0 10px; }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-card h3 a { color: var(--b-text); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-meta dt { font: 400 12px/1.3 var(--b-sans); color: var(--b-muted); text-transform: none; letter-spacing: 0; }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-meta dd { font: 500 13.5px/1.35 var(--b-sans); color: var(--b-text); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-badge { height: 24px; padding: 0 10px; border-radius: var(--b-r-pill); font: 600 12px/24px var(--b-sans); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-badge.m-strong { background: var(--b-ok-soft); color: var(--b-ok); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-badge.m-medium { background: var(--b-ochre-soft); color: var(--b-ochre); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-badge.s-new { background: var(--b-info-soft); color: var(--b-info); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-reasons { font: 400 13px/1.4 var(--b-sans); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-actions .c4rd-btn { height: 34px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); color: var(--b-text); font: 600 13px/1 var(--b-sans); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-actions .c4rd-btn.is-study { border-color: var(--b-marine-2); color: var(--b-marine); }

/* ---- CANARY 6 · Field report detail (detail/form archetype): compact band -> facts -> dominant 5-step form ---- */
body#c5-page.c4-5ref[data-c5b] main.c4rd-page[data-c5b-screen="field-report"] { width: auto; max-width: none; margin: 0; padding: 0 var(--b-gutter) 36px; background: var(--b-stone); color: var(--b-text); font: 400 14px/1.5 var(--b-sans); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-layout { display: block; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-card { border: 0; border-radius: var(--b-r-card); background: var(--b-surface); box-shadow: var(--b-shadow); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-card-head { padding: 16px 22px; border-bottom: 1px solid var(--b-rule); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-card-head h2 { font: 600 20px/1.25 var(--b-serif); color: var(--b-text); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell { padding: 6px 22px 20px; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-step { padding: 16px 0; border-color: var(--b-rule); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-step-title { gap: 10px; margin: 0 0 12px; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-step-no { width: 24px; height: 24px; flex-basis: 24px; background: var(--b-marine); color: #fff; font: 600 12px/1 var(--b-sans); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-step-title strong { font: 600 16px/1.3 var(--b-serif); color: var(--b-text); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] :is(.c4rd-field, .c4rd-prod-field) label { font: 500 12.5px/1.3 var(--b-sans); color: var(--b-muted); text-transform: none; letter-spacing: 0; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] :is(.c4rd-field, .c4rd-prod-field) :is(input, select, textarea) { min-height: 38px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); color: var(--b-text); font: 400 14px/1.4 var(--b-sans); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] :is(.c4rd-field, .c4rd-prod-field) :is(input, select, textarea):focus { border-color: var(--b-marine-2); outline: 2px solid rgba(30, 58, 99, .18); outline-offset: 0; box-shadow: none; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] :is(.c4rd-field, .c4rd-prod-field) :is(input, select, textarea):disabled { background: var(--b-stone); color: var(--b-text-2); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-unit-info { min-height: 38px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-stone); color: var(--b-text-2); font: 400 13px/1.3 var(--b-sans); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-empty { color: var(--b-text-2); font: 400 13.5px/1.4 var(--b-sans); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-btn { min-height: 38px; border-radius: var(--b-r-ctl); font: 600 14px/1 var(--b-sans); }
/* one primary per screen state: the band carries « Valider le rapport »; sub-form submits are secondary */
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] :is(.c4rd-btn--primary, .c4rd-btn--secondary) { border: 1px solid var(--b-marine-2); background: var(--b-surface); color: var(--b-marine); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-table-wrap table th { font: 600 12.5px/1.3 var(--b-sans); color: var(--b-muted); text-transform: none; letter-spacing: 0; background: var(--b-stone); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-table-wrap table td { font: 400 13.5px/1.4 var(--b-sans); color: var(--b-text); border-color: var(--b-rule); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-subhead strong { font: 600 15px/1.3 var(--b-serif); color: var(--b-text); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-step:first-of-type .c4rd-fields { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1400px) { body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-step:first-of-type .c4rd-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-valid-note { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 0; border-radius: var(--b-r-ctl); background: var(--b-ok-soft); color: var(--b-ok); font: 600 13.5px/1.3 var(--b-sans); }

/* ======================= VIEWPORT FIT (contract §14) =======================
   Each canary is one viewport-high column (viewport − topbar): canonical hero → lead strip → toolbar → dominant workspace,
   the workspace takes the remaining height and scrolls INTERNALLY (sticky header). Nothing is hidden: secondary tools stay
   one click away (compact disclosure rows / popovers); content grows past the fold only when the user opens something. */
[data-c5b-screen] { --b-vh: calc(100vh - var(--c4ui-shell-topbar-h, 70px)); --b-fit-pb: 16px; }
[data-c5b-screen] .b-disc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 12px 16px; margin: 0 0 var(--b-gap-s); }
[data-c5b-screen] .b-disc-row > .b-disc { margin: 0; }
[data-c5b-screen] :is(.b-disc-row, .b-fit-row) > .b-disc > summary { min-height: 48px; padding: 8px 18px; }
[data-c5b-screen] :is(.b-disc-row, .b-fit-row) > .b-disc > summary strong { font-size: 15.5px; }
[data-c5b-screen] :is(.b-disc-row, .b-fit-row) > .b-disc > summary small { margin-top: 0; font-size: 12.5px; }

/* Accueil: portfolio card fills the column, its rows scroll inside; Apex stays at the top of the rail */
body[data-c5b] main.template-dashboard[data-c5b-screen="home"] { display: flex; flex-direction: column; height: var(--b-vh); padding-bottom: var(--b-fit-pb); }
[data-c5b-screen="home"] .dashboard-content { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
[data-c5b-screen="home"] .dashboard-grid { flex: 1 1 auto; min-height: 0; margin-top: 0; grid-template-rows: minmax(0, 1fr); align-items: start; }
[data-c5b-screen="home"] .dashboard-left { align-self: stretch; min-height: 0; display: flex; flex-direction: column; }
[data-c5b-screen="home"] .cc-portfolio { flex: 0 1 auto; min-height: 0; max-height: 100%; display: flex; flex-direction: column; }
[data-c5b-screen="home"] .cc-table { flex: 1 1 auto; min-height: 0; overflow: auto; }
[data-c5b-screen="home"] .cc-thead { position: sticky; top: 0; z-index: 2; }
[data-c5b-screen="home"] .cc-row { height: 50px; min-height: 50px; }
[data-c5b-screen="home"] .b-pager { display: flex; align-items: center; gap: 10px; }
[data-c5b-screen] :is(.b-pagesize, #x-page-size) { height: 32px; padding: 0 28px 0 12px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl);
  background-color: var(--b-surface); color: var(--b-text); font: 500 13px/1 var(--b-sans); }
[data-c5b-screen] .b-pageinfo { font: 400 13px/1 var(--b-sans); color: var(--b-muted); white-space: nowrap; }
[data-c5b-screen] .b-pageinfo strong { font-weight: 600; color: var(--b-text); }

/* DQE: disclosures row (parcours / marché) above a table-dominant workspace; opened panels float over the table */
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] { display: flex; flex-direction: column; height: var(--b-vh); padding-bottom: var(--b-fit-pb); }
body[data-c5b] [data-c5b-screen="dqe"] > .c4ui-page-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-layout.owner9-layout { position: relative; flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr); gap: 12px 16px; margin: 0; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-layout > .owner9-maincol { grid-column: 1 / -1; grid-row: 2; align-self: stretch; min-height: 0; display: flex; flex-direction: column; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-layout > #b-dqe-flow { grid-column: 1; grid-row: 1; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-layout > #b-dqe-market { grid-column: 2; grid-row: 1; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-layout > details.b-disc { display: block; position: static; margin: 0; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-layout > details.b-disc > summary { min-height: 48px; padding: 8px 18px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-layout > details.b-disc > summary strong { font-size: 15.5px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-layout > details.b-disc > summary small { margin-top: 0; font-size: 12.5px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-layout > details.b-disc[open] > .b-disc-body { position: absolute; left: 0; right: 0; top: 60px; z-index: 30; max-height: calc(var(--b-vh) - 340px);
  overflow: auto; padding: 16px 20px; background: var(--b-surface); border: 1px solid var(--b-rule); border-radius: var(--b-r-card); box-shadow: var(--b-shadow-lift); }
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] .owner9-workspace.c4ui-card { flex: 1 1 auto; min-height: 0; margin: 0; display: flex; flex-direction: column; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-work-head { padding: 14px 24px 4px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-work-head .c4ui-card-subtitle { display: none; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-toolbar { padding: 6px 24px 12px; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table-wrap { flex: 1 1 auto; min-height: 160px; overflow: auto; }
body[data-c5b] [data-c5b-screen="dqe"][data-c5f1-screen] .owner9-table thead th { position: sticky; top: 0; z-index: 2; }
body[data-c5b] [data-c5b-screen="dqe"] .owner9-table-footer { flex: 0 0 auto; padding: 10px 24px 12px; }

body[data-c5b] #x-study-top[data-c5b-screen="dqe"] .owner9-pagebuttons button, body[data-c5b] #x-study-top[data-c5b-screen="dqe"] .x-page-btn { min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl);
  background: var(--b-surface); color: var(--b-text); font: 600 13px/1 var(--b-sans); box-shadow: none; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"] .owner9-pagebuttons button.is-active { background: var(--b-marine); border-color: var(--b-marine); color: #fff; }

/* Planning: summary + Autopilot = one lead strip; Outils / Contexte beside the view tabs (popovers); Gantt takes the rest */
[data-c5b-screen="planning"] .c5-body { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0; }
[data-c5b-screen="planning"] .c5-body > .c5-kpis.b-lead { grid-column: 1; margin-bottom: 12px; border-radius: var(--b-r-card) 0 0 var(--b-r-card); }
[data-c5b-screen="planning"] .c5-body > .c4ap-inline { grid-column: 2; position: relative; z-index: 3; min-height: 56px; margin: calc(-1 * var(--b-hero-lap)) 0 12px; padding: 8px 20px;
  border: 0; border-left: 1px solid var(--b-rule); border-radius: 0 var(--b-r-card) var(--b-r-card) 0; background: var(--b-surface); box-shadow: var(--b-shadow-lift); }
[data-c5b-screen="planning"] .c5-body > :not(.c5-kpis):not(.c4ap-inline) { grid-column: 1 / -1; }
[data-c5b-screen="planning"] .c5-flow { position: relative; }
[data-c5b-screen="planning"] .c5-flow > #b-plan-context > summary { min-height: 38px; padding: 4px 14px; }
[data-c5b-screen="planning"] .c5-flow > #b-plan-context > summary strong { font: 600 14px/1.2 var(--b-sans); }
[data-c5b-screen="planning"] .c5-flow > #b-plan-context > summary small { display: none; }
[data-c5b-screen="planning"] .c5-flow > #b-plan-context[open] > .b-disc-body { position: absolute; left: 0; right: 0; z-index: 30; }
[data-c5b-screen="planning"] .c5-flow > #b-plan-context[open] > .b-disc-body { top: 48px; padding: 16px 20px; background: var(--b-surface); border: 1px solid var(--b-rule);
  border-radius: var(--b-r-card); box-shadow: var(--b-shadow-lift); }

[data-c5b-screen="planning"] { --b-plan-off: 476px; }
@media (max-width: 1600px) { [data-c5b-screen="planning"] { --b-plan-off: 500px; } }
[data-c5b-screen="planning"] .c5-flow > .c5-native-tools > summary { display: flex; align-items: center; height: 38px; padding: 0 14px; border-radius: var(--b-r-ctl); background: var(--b-surface);
  box-shadow: var(--b-shadow); font: 600 14px/1 var(--b-sans); color: var(--b-text); cursor: pointer; list-style: none; }
[data-c5b-screen="planning"] .c5-flow > .c5-native-tools > summary::-webkit-details-marker { display: none; }
[data-c5b-screen="planning"] .c5-flow > .c5-native-tools[open] > .c5-actions { position: absolute; top: calc(100% + 6px); right: 0; left: auto; z-index: 30; display: flex; flex-wrap: nowrap; gap: 8px;
  width: max-content; padding: 10px; background: var(--b-surface); border: 1px solid var(--b-rule); border-radius: var(--b-r-card); box-shadow: var(--b-shadow-lift); }
[data-c5b-screen="planning"] .c5-flow > .c5-native-tools > p.muted { display: none; }
[data-c5b-screen="planning"] .c5-flow > #b-plan-context { box-shadow: var(--b-shadow); }

/* Documents: disclosure row, then queue (table scrolls inside) + attention column, both viewport-high */
body#c5-page[data-c5b] [data-c5b-screen="documents"].c4ep-page { display: flex; flex-direction: column; height: var(--b-vh); padding-bottom: var(--b-fit-pb); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] > .b-cols { flex: 1 1 auto; min-height: 240px; grid-template-rows: minmax(0, 1fr); align-items: stretch; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] > .b-cols > .b-stack { min-height: 0; grid-template-rows: minmax(0, 1fr); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] > .b-cols .b-card { min-height: 0; max-height: 100%; display: flex; flex-direction: column; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] > .b-cols .b-card-body { min-height: 0; overflow: auto; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-doc-queue > :is(.b-tablewrap, .c4ep-table-wrap, div:last-child) { flex: 1 1 auto; min-height: 0; overflow: auto; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-doc-queue thead th { position: sticky; top: 0; z-index: 2; background: var(--b-surface-2); }

/* Radar: filters + list head fixed, the opportunity list scrolls inside (backend pagination 25/page reused unchanged) */
body#c5-page[data-c5b] [data-c5b-screen="radar"].c4rd-page { display: flex; flex-direction: column; height: var(--b-vh); padding-bottom: var(--b-fit-pb); }
body#c5-page[data-c5b] [data-c5b-screen="radar"] > :not(.c4rd-list) { flex: 0 0 auto; }
body#c5-page[data-c5b] [data-c5b-screen="radar"] > .c4rd-list { flex: 1 1 auto; min-height: 200px; overflow: auto; padding: 2px 4px 4px 2px; align-content: start; }
body#c5-page[data-c5b] [data-c5b-screen="radar"] form.c4rd-filters { margin-bottom: 10px; }
body#c5-page[data-c5b] [data-c5b-screen="radar"] .c4rd-listhead { margin-bottom: 10px; }

/* Detail: facts lead strip, then the 5-step form in two columns (1-3 | 4-5), scrolling inside its card if needed */
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"].c4rd-page { display: flex; flex-direction: column; height: var(--b-vh); padding-bottom: var(--b-fit-pb); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-layout { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-main-stack { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-card { flex: 0 1 auto; min-height: 0; max-height: 100%; display: flex; flex-direction: column; overflow: hidden; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-card-head { flex: 0 0 auto; padding: 12px 22px; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell { flex: 1 1 auto; min-height: 0; overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto; column-gap: 36px; padding: 0 22px 14px; }
/* C8A-006: rows were "auto minmax(0, 1fr) auto": in a height-bound shell row 2 shrank below the production step (4, rows
   1-2), whose form then overflowed onto step 5 and the save bar (clicks intercepted at 1440x900). Content-sized rows (auto
   tracks still stretch into free height) + the existing overflow:auto = the card scrolls instead of overlapping. */
/* C8A R2.1 (mini-smoke 1366 / 1440): on a VALIDATED report the one-line « Rapport validé… » note widened the hero actions, the
   title wrapped and the band clipped its breadcrumb / chips; the note may wrap (the band itself: canonical rule above). The
   « Quantités DQE déclarées » table (7 columns in the right step) fits its card: headers may wrap, compact cells, the mini bar
   is dropped below 1600 px (the percentage stays). */
body#c5-page[data-c5b] [data-c5b-screen="field-report"] .c4rd-valid-note { white-space: normal; max-width: 240px; line-height: 1.3; }
body#c5-page[data-c5b] [data-c5b-screen="field-report"] .c4rd-table-wrap :is(th, td) { white-space: normal; padding-left: 8px; padding-right: 8px; }
body#c5-page[data-c5b] [data-c5b-screen="field-report"] .c4rd-table-wrap td { overflow-wrap: break-word; }
body#c5-page[data-c5b] [data-c5b-screen="field-report"] .c4rd-table-wrap .c4ca-progress-cell { min-width: 0; }
@media (max-width: 1600px) { body#c5-page[data-c5b] [data-c5b-screen="field-report"] .c4rd-table-wrap :is(th, td) { padding-left: 6px; padding-right: 6px; } body#c5-page[data-c5b] [data-c5b-screen="field-report"] .c4rd-table-wrap .c4ca-progress-cell .c4ca-progress { display: none; } }
@media (max-width: 1400px) { body#c5-page[data-c5b] [data-c5b-screen="field-report"] .c4rd-table-wrap :is(th, td) { padding-left: 3px; padding-right: 3px; } }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell > .c4rd-step { padding: 12px 0; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell > .c4rd-step:nth-of-type(1) { grid-column: 1; grid-row: 1; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell > .c4rd-step:nth-of-type(2) { grid-column: 1; grid-row: 2; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell > .c4rd-step:nth-of-type(3) { grid-column: 1; grid-row: 3; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell > .c4rd-step:nth-of-type(4) { grid-column: 2; grid-row: 1 / span 2; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell > .c4rd-step:nth-of-type(5) { grid-column: 2; grid-row: 3; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-step:first-of-type .c4rd-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell textarea { min-height: 64px; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell > .c4rd-step:nth-of-type(2) { display: flex; flex-direction: column; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell > .c4rd-step:nth-of-type(2) > .c4rd-field { flex: 1 1 auto; display: flex; flex-direction: column; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="field-report"] .c4rd-form-shell > .c4rd-step:nth-of-type(2) textarea { flex: 1 1 auto; }

/* ======================= C5-D2 SHARED UTILITIES (explicit opt-in classes; contract §14 viewport fit, §15 pagination) =======================
   An adopting owner opts in by CLASS on its own markup — nothing here matches a screen that does not use these classes.
   .b-fit  on the screen scope     = one viewport-high column (canonical hero -> lead strip -> toolbar -> dominant workspace)
   .b-fill on the dominant block    = takes the remaining height; a .b-card.b-fill scrolls its body inside (sticky table head)
   .b-scroll on any wrapper         = internal scroll with sticky table head
   table[data-b-pager] + b_pager.js = client pager (footer .b-pager.b-pgfoot — never matches a canary's own .b-pager) 10 (default) / 20 over the FULL server-rendered row set (nothing truncated) */
body[data-c5b] [data-c5b-screen].b-fit { display: flex; flex-direction: column; height: var(--b-vh); padding-bottom: var(--b-fit-pb); }
body[data-c5b] [data-c5b-screen].b-fit > * { flex: 0 0 auto; }
body[data-c5b] [data-c5b-screen].b-fit > .b-fill, body[data-c5b] [data-c5b-screen] .b-fit-col > .b-fill { flex: 1 1 auto; min-height: 0; }
body[data-c5b] [data-c5b-screen] .b-fit-col { display: flex; flex-direction: column; min-height: 0; }
[data-c5b-screen] .b-card.b-fill { display: flex; flex-direction: column; margin-bottom: 0; }
[data-c5b-screen] .b-card.b-fill > .b-card-head { flex: 0 0 auto; }
[data-c5b-screen] .b-card.b-fill > .b-card-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
[data-c5b-screen] .b-scroll { min-height: 0; overflow: auto; }
[data-c5b-screen] :is(.b-card.b-fill > .b-card-body, .b-scroll) thead th { position: sticky; top: 0; z-index: 2; background: var(--b-surface-2); }
[data-c5b-screen] .b-cols.b-fill { grid-template-rows: minmax(0, 1fr); align-items: stretch; }
[data-c5b-screen] .b-cols.b-fill > * { min-height: 0; }
[data-c5b-screen] tr.b-pg-off { display: none; }
[data-c5b-screen] .b-pager.b-pgfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 24px 12px; border-top: 1px solid var(--b-rule); background: var(--b-surface); }
[data-c5b-screen] .b-pager.b-pgfoot[hidden] { display: none; }
[data-c5b-screen] .b-pgfoot .b-pg-spacer { flex: 1 1 auto; }
[data-c5b-screen] .b-pgfoot .b-pg-btn { min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface);
  color: var(--b-text); font: 600 13px/1 var(--b-sans); cursor: pointer; }
[data-c5b-screen] .b-pgfoot .b-pg-btn:disabled { opacity: .45; cursor: default; }
[data-c5b-screen] .b-pgfoot .b-pg-btn.is-active { background: var(--b-marine); border-color: var(--b-marine); color: #fff; }
[data-c5b-screen] .b-pgfoot .b-pg-gap { color: var(--b-muted); }

/* ---- C5-D3 SHARED UTILITIES (explicit opt-in classes for the specialized screens; nothing matches without them) ----
   .b-lap  = a specialized workspace overlaps the canonical band by --b-hero-lap (it IS the lead block: chat, assistant)
   .b-switch = segmented view switch (not .b-switch: that name is a C5-D2 page-local class on BPU) (contract §7: #dfe1dc track, active segment white) — a[href] / button[type=button] items */
[data-c5b-screen] .b-lap { position: relative; z-index: 3; margin-top: calc(-1 * var(--b-hero-lap)); }
[data-c5b-screen] .b-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: #dfe1dc; }
[data-c5b-screen] .b-switch > :is(a, button) { display: inline-flex; align-items: center; gap: 8px; height: 32px; min-height: 32px; padding: 0 14px; border: 0; border-radius: 8px;
  background: transparent; color: var(--b-text-2); font: 600 13px/1 var(--b-sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
[data-c5b-screen] .b-switch > :is(a, button):hover { color: var(--b-text); }
[data-c5b-screen] .b-switch > :is(.on, .is-active, [aria-selected="true"], [aria-current="page"]) { background: var(--b-surface); color: var(--b-text); box-shadow: 0 1px 2px rgba(18, 40, 74, .12); }

/* B-IMPORTANT-BLOCK: overrides of legacy owner rules that force their values with !important (scoped, explicit) */
body[data-c5b] [data-c5b-screen="home"] .card { border: 0 !important; border-top: 0 !important; }
body[data-c5b] [data-c5b-screen="home"] :is(.cc-import, .cc-apex) .btn-primary { background: var(--b-surface) !important; border: 1px solid var(--b-rule) !important;
  color: var(--b-text) !important; -webkit-text-fill-color: var(--b-text) !important; box-shadow: none !important; }
body#c5-page.c4-5ref.c4ui-app[data-c5b] #c5-main[data-c5b-screen="planning"], body#c5-page.c4-5ref[data-c5b] #c5-main[data-c5b-screen="planning"] { width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 var(--b-gutter) 36px !important; background: var(--b-stone); }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] .c5-kpis { display: block !important; grid-template-columns: none !important; height: auto !important; min-height: 0 !important; margin: 0 !important; gap: 0 !important; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] .c5-columns { grid-template-columns: minmax(0, 1fr) !important; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] :is(.c4p5-plan, .c4p5-planning-card) { border: 0 !important; border-radius: var(--b-r-card) !important; box-shadow: var(--b-shadow) !important; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] .c4p5-filterbar .c5-primary { background: var(--b-marine) !important; border-color: var(--b-marine) !important; color: #fff !important; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] .c4p5-tabs { display: inline-flex !important; width: auto !important; gap: 2px !important; margin: 0 0 12px !important; padding: 3px !important;
  border: 0 !important; border-radius: 10px !important; background: #dfe1dc !important; box-shadow: none !important; grid-template-columns: none !important; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] .c4p5-tab { height: 32px !important; min-height: 32px !important; padding: 0 14px !important; border: 0 !important; border-radius: 8px !important;
  background: transparent !important; color: var(--b-text-2) !important; font: 600 13px/1 var(--b-sans) !important; box-shadow: none !important; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] .c4p5-tabs .c4p5-tab.active.active { background: var(--b-surface) !important; color: var(--b-text) !important; box-shadow: 0 1px 2px rgba(18, 40, 74, .12) !important; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] .c4p5-planning-card .c5-card-head h2 { font: 600 20px/1.2 var(--b-serif) !important; letter-spacing: -.1px; color: var(--b-text) !important; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] .c4p5-tabs { width: fit-content !important; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] .c4p5-tabs .c4p5-tab.active.active * { color: var(--b-text) !important; stroke: currentColor !important; }
body#c5-page.c4-5ref[data-c5b] [data-c5b-screen="planning"] .c4p5-tab svg { color: currentColor !important; stroke: currentColor !important; fill: none !important; opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) { body[data-c5b] [data-c5b-screen] * { transition: none !important; } }
body[data-c5b] main.template-dashboard[data-c5b-screen] { width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 var(--b-gutter) 36px !important; background: var(--b-stone) !important; }
body[data-c5b] [data-c5b-screen="home"] .dashboard-grid { border-top: 0 !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-body { padding-top: 0 !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto auto !important; grid-template-rows: auto auto !important;
  column-gap: 10px !important; row-gap: 10px !important; align-items: center !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow > .c4p5-tabs { grid-column: 1 !important; grid-row: 1 !important; margin: 0 !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow > .c4p5-planning-card { grid-column: 1 / -1 !important; grid-row: 2 !important; margin: 0 !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow > .c5-native-tools { grid-column: 3 !important; grid-row: 1 !important; position: relative !important; margin: 0 !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow > #b-plan-context { grid-column: 4 !important; grid-row: 1 !important; margin: 0 !important; }
/* C8A R2 (P3_NEW_03): Gantt « Aujourd'hui » label kept inside the timeline near its edges (server edge class, CSS only). */
body#c5-page.c4-5ref[data-c5b] .c5-time-head .c5-today-label.is-start { transform: translateX(-10px); }
body#c5-page.c4-5ref[data-c5b] .c5-time-head .c5-today-label.is-start::after { left: 5px; }
body#c5-page.c4-5ref[data-c5b] .c5-time-head .c5-today-label.is-end { transform: translateX(calc(-100% + 10px)); }
body#c5-page.c4-5ref[data-c5b] .c5-time-head .c5-today-label.is-end::after { left: auto; right: 5px; }
/* C8A OBS-03: at <=1600px the 5 view tabs + "Outils avancés" + context card do not fit on one grid row (tabs were
   overlapped at 1440). Tabs keep row 1; the two tool cards move to row 2 (right-aligned); the planning card to row 3. */
@media (max-width: 1600px) {
  body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow { grid-template-rows: auto auto auto !important; }
  body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow > .c4p5-tabs { grid-column: 1 / -1 !important; grid-row: 1 !important; }
  body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow > .c5-native-tools { grid-column: 3 !important; grid-row: 2 !important; }
  body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow > #b-plan-context { grid-column: 4 !important; grid-row: 2 !important; }
  body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow > .c4p5-planning-card { grid-row: 3 !important; }
  body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] { --b-plan-off: 550px; }
}
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c4p5-planning-card > .c5-card-head { display: none !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] :is(.c4p6-mini-wbs, .c4p6-list-wrap), body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c4p6-gantt-timeline .c5-gantt-scroll { height: calc(100vh - var(--b-plan-off, 400px)) !important;
  min-height: 320px !important; max-height: none !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-body { align-items: stretch !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-body > .c5-kpis.b-lead { display: flex !important; align-items: center !important; min-height: 56px !important; margin: calc(-1 * var(--b-hero-lap)) 0 12px !important;
  padding: 8px 22px !important; background: var(--b-surface) !important; border-radius: var(--b-r-card) 0 0 var(--b-r-card) !important; box-shadow: var(--b-shadow-lift) !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-body > .c4ap-inline { margin: calc(-1 * var(--b-hero-lap)) 0 12px !important; min-height: 56px !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow > .c5-native-tools > summary { display: flex !important; align-items: center !important; height: 38px !important; padding: 0 14px !important; border: 0 !important;
  border-radius: var(--b-r-ctl) !important; background: var(--b-surface) !important; box-shadow: var(--b-shadow) !important; font: 600 14px/1 var(--b-sans) !important;
  color: var(--b-text) !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c5-flow > .c5-native-tools { padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
body#c5-page.c4-5ref[data-c5b] #c5-main.c4-e2-root[data-c5b-screen="planning"] .c4ap-inline .c4ap-btn { height: 34px !important; padding: 0 14px !important; border: 1px solid var(--b-marine-2) !important; border-radius: var(--b-r-ctl) !important;
  background: var(--b-surface) !important; color: var(--b-marine) !important; font: 600 13.5px/1 var(--b-sans) !important; }
/* C7.12 — module dialogs: */
/* Two legacy sheets force these dialogs with !important (v1a.css on the Scénarios page, the inline home-page sheet
   « body.c43-home-master-v2 .btn-primary »): the same canonical values are restated with !important for exactly those
   properties of exactly those dialogs — nothing else. */
body.c4ui-app[data-c5b] .c4sd-modal[class] label { font-weight: 600 !important; }
body.c4ui-app[data-c5b] .c4sd-modal[class] .c4sd-btn.primary,
body.c4ui-app[data-c5b] .r4-modal[class] .btn.btn-primary {
  background: var(--b-marine) !important; border-color: var(--b-marine) !important; color: #fff !important; }
body.c4ui-app[data-c5b] .c4sd-modal[class] .c4sd-btn.primary:hover,
body.c4ui-app[data-c5b] .r4-modal[class] .btn.btn-primary:hover { background: var(--b-marine-2) !important; border-color: var(--b-marine-2) !important; }
/* C7.12 — B screens: */
/* the legacy runtime v1d.css forces « font: 15px Arial !important » on the c5 search field: only the FAMILY is restated */
body[data-c5b]:is(#c5-page, [data-c5b]) [data-c5b-screen] .c5-search-field input { font-family: var(--b-sans) !important; }
/* B-IMPORTANT-BLOCK end */
[data-c5b-screen="home"] .cc-apex::before, [data-c5b-screen="home"] .cc-apex::after { display: none; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-views.c4hr-tabs { border: 0; background: transparent; overflow: visible; gap: 8px; }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-views .c4hr-tab { flex: 0 0 auto; height: 34px; border: 1px solid var(--b-rule); border-radius: var(--b-r-pill); background: var(--b-surface); color: var(--b-text-2); }
body#c5-page[data-c5b] [data-c5b-screen="documents"] .b-views .c4hr-tab.on { background: var(--b-marine); border-color: var(--b-marine); color: #fff; }

/* ===== C7.12 — canonical treatment of the module dialogs (legacy design fragments) ==========================================
   The module dialogs (Équipes & Paie, Stock, Sous-traitants, Avenants, Documents, Engins, Finance, HSE, Monte Carlo, Achats,
   Scénarios, accueil « nouveau chantier ») are rendered OUTSIDE [data-c5b-screen] (legacy stage / backdrop), so the scoped B
   rules never reached them: C4E blue primary, 850-weight 10.5px labels, fonts not loaded (system fallback). Same values as
   the canonical B dialog (b_intelligence.css .c4ep-modal / .c4ep-field / .c4ep-btn). Presentation only: markup, names,
   handlers untouched. The :is(#c5-page, [data-c5b]) prefix gives ID-level specificity and [class] one more class (page-local
   legacy rules are body#c5-page.c4-5ref[.owner] …) without forced priority; it also matches the home page body (no id). */
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] {
  border: 0; border-radius: var(--b-r-card); box-shadow: var(--b-shadow-lift); background: var(--b-surface);
  font-family: var(--b-sans); color: var(--b-text-2); }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] :is(h2, .c4ep-modal-title h3) {
  font: 600 20px/1.25 var(--b-serif); color: var(--b-text); letter-spacing: 0; }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] :is([class*="modal-head"], [class*="-head"]) p {
  font: 400 13px/1.4 var(--b-sans); color: var(--b-muted); }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] [class*="modal-icon"] { background: var(--b-stone); color: var(--b-marine); }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] label {
  font: 600 12.5px/1.3 var(--b-sans); color: var(--b-text-2); letter-spacing: 0; text-transform: none; }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]), select, textarea) {
  min-height: 38px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface);
  font: 400 14px/1.4 var(--b-sans); color: var(--b-text); }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] textarea { min-height: 72px; }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] :is(input, select, textarea):focus {
  outline: none; border-color: var(--b-marine-2); box-shadow: 0 0 0 2px rgba(30, 58, 99, .18); }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] :is([class$="-btn"], [class*="-btn "], .btn) {
  min-height: 0; height: 36px; padding: 0 14px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl);
  background: var(--b-surface); color: var(--b-text); font: 600 12.5px/1 var(--b-sans); letter-spacing: 0; box-shadow: none; }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] :is([class$="-btn"], [class*="-btn "], .btn):hover {
  border-color: var(--b-marine-2); background: var(--b-surface); }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] :is([class*="-btn--primary"], [class*="-btn"].is-primary, [class*="-btn"].primary, .btn-primary) {
  background: var(--b-marine); border-color: var(--b-marine); color: #fff; }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] :is([class*="-btn--primary"], [class*="-btn"].is-primary, [class*="-btn"].primary, .btn-primary):hover {
  background: var(--b-marine-2); border-color: var(--b-marine-2); }
body.c4ui-app[data-c5b]:is(#c5-page, [data-c5b]) :is(.c4ep-modal, .c4st-modal, .c4cl-modal, .c4doc-modal, .c4eq-modal, .c4fin-modal, .c4hse-modal, .c4mc-modal, .c4pr-modal, .c4sd-modal, .r4-modal)[class] :is([class$="-btn"], [class*="-btn "], .btn):disabled { opacity: .55; cursor: not-allowed; }
/* (C7.12: the forced-priority restatements for the Scénarios / home dialogs live in the B-IMPORTANT-BLOCK) */

/* ===== C7.12 — canonical input dialog (b_prompt.js, replaces the browser-native window.prompt) ===================== */
body[data-c5b] .b-prompt { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--b-r-card);
  background: var(--b-surface); box-shadow: var(--b-shadow-lift), 0 24px 64px rgba(18, 40, 74, .18); color: var(--b-text-2);
  font: 400 14px/1.5 var(--b-sans); overflow: auto; }
body[data-c5b] .b-prompt::backdrop { background: rgba(18, 40, 74, .38); }
body[data-c5b] .b-prompt .b-prompt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 12px;
  border-bottom: 1px solid var(--b-rule-soft); }
body[data-c5b] .b-prompt .b-prompt-title { margin: 0; font: 600 20px/1.25 var(--b-serif); color: var(--b-text); }
body[data-c5b] .b-prompt .b-prompt-close { flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl);
  background: var(--b-surface); color: var(--b-muted); font: 400 18px/1 var(--b-sans); cursor: pointer; }
body[data-c5b] .b-prompt .b-prompt-body { padding: 16px 20px 4px; }
body[data-c5b] .b-prompt .b-prompt-label { display: grid; gap: 6px; font: 600 12.5px/1.3 var(--b-sans); color: var(--b-text-2); }
body[data-c5b] .b-prompt .b-prompt-input { width: 100%; min-height: 38px; box-sizing: border-box; padding: 8px 11px; border: 1px solid var(--b-rule);
  border-radius: var(--b-r-ctl); background: var(--b-surface); font: 400 14px/1.4 var(--b-sans); color: var(--b-text); }
body[data-c5b] .b-prompt textarea.b-prompt-input { min-height: 96px; resize: vertical; }
body[data-c5b] .b-prompt .b-prompt-input:focus { outline: none; border-color: var(--b-marine-2); box-shadow: 0 0 0 2px rgba(30, 58, 99, .18); }
body[data-c5b] .b-prompt .b-prompt-error { margin: 8px 0 0; font: 500 12.5px/1.4 var(--b-sans); color: var(--b-risk); }
body[data-c5b] .b-prompt .b-prompt-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 18px; }
body[data-c5b] .b-prompt .b-prompt-btn { height: 36px; padding: 0 14px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface);
  color: var(--b-text); font: 600 12.5px/1 var(--b-sans); cursor: pointer; }
body[data-c5b] .b-prompt .b-prompt-btn:hover { border-color: var(--b-marine-2); }
body[data-c5b] .b-prompt .b-prompt-btn--primary { background: var(--b-marine); border-color: var(--b-marine); color: #fff; }
body[data-c5b] .b-prompt .b-prompt-btn--primary:hover { background: var(--b-marine-2); border-color: var(--b-marine-2); }
/* C7.12B — the same dialog for messages (numidraAlert) and confirmations (numidraConfirm): a tone mark beside the title,
   the message as text (line breaks kept), a destructive primary for dangerous confirmations; the input dialog is unchanged. */
body[data-c5b] .b-prompt.b-dialog { width: min(480px, calc(100vw - 32px)); }
body[data-c5b] .b-prompt .b-dialog-mark { flex: 0 0 auto; width: 4px; align-self: stretch; min-height: 24px; border-radius: 2px; background: var(--b-info); }
body[data-c5b] .b-prompt.b-dialog--success .b-dialog-mark { background: var(--b-ok); }
body[data-c5b] .b-prompt.b-dialog--warning .b-dialog-mark { background: var(--b-ochre-line); }
body[data-c5b] .b-prompt:is(.b-dialog--error, .b-dialog--danger) .b-dialog-mark { background: var(--b-risk); }
body[data-c5b] .b-prompt.b-dialog .b-prompt-title { flex: 1 1 auto; }
body[data-c5b] .b-prompt .b-dialog-message { margin: 0; font: 400 14.5px/1.55 var(--b-sans); color: var(--b-text); white-space: pre-line; overflow-wrap: anywhere;
  max-height: calc(100vh - 220px); overflow-y: auto; }
body[data-c5b] .b-prompt .b-prompt-btn--danger { background: var(--b-risk); border-color: var(--b-risk); color: #fff; }
body[data-c5b] .b-prompt .b-prompt-btn--danger:hover { background: #8a2823; border-color: #8a2823; }
body[data-c5b] .b-prompt .b-prompt-btn:focus-visible { outline: 2px solid var(--b-marine-2); outline-offset: 2px; }
@media (max-width: 480px) {
  body[data-c5b] .b-prompt .b-prompt-actions { flex-direction: column-reverse; align-items: stretch; }
  body[data-c5b] .b-prompt .b-prompt-btn { width: 100%; height: 40px; }
}

/* ===== C7.12 — DQE (Chiffrage) embedded forms: manual line + DQE import (owner9 legacy C4 tokens -> B) ============
   Same layout (grid, field order, widths); only the generation of the typography / controls / action changes. */
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--b-rule);
  border-radius: var(--b-r-card); background: var(--b-surface-2); }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe h3 { font: 600 16px/1.3 var(--b-serif); color: var(--b-text); }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe p { margin-top: 2px; font: 400 13px/1.4 var(--b-sans); color: var(--b-muted); }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-grid { gap: 10px; }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-grid label { gap: 6px; font: 600 12.5px/1.3 var(--b-sans); color: var(--b-text-2); }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-grid :is(input:not([type="file"]), select) { min-height: 38px; height: 38px;
  border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); font: 400 14px/1.4 var(--b-sans); color: var(--b-text); }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-grid input[type="file"] { font: 400 13px/1.4 var(--b-sans); color: var(--b-text-2); }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-grid :is(input, select):focus { outline: none; border-color: var(--b-marine-2);
  box-shadow: 0 0 0 2px rgba(30, 58, 99, .18); }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-grid button[type="submit"] { height: 38px; min-height: 38px; padding: 0 16px;
  border: 1px solid var(--b-marine); border-radius: var(--b-r-ctl); background: var(--b-marine); color: #fff; font: 600 13px/1 var(--b-sans);
  letter-spacing: 0; box-shadow: none; white-space: nowrap; }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-grid button[type="submit"]:hover { background: var(--b-marine-2); border-color: var(--b-marine-2); }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-grid button[type="submit"]:disabled { opacity: .55; cursor: not-allowed; }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-msg { margin-top: 6px; font: 400 12.5px/1.4 var(--b-sans); color: var(--b-muted); }
/* « Modifier la désignation » : quiet row action (secondary, per line), not a bordered bold button repeated on every row */
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .owner9-table td.designation .dqe-edit-designation { display: inline-flex; align-items: center; min-height: 0; height: auto;
  margin-top: 4px; padding: 2px 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--b-marine-2);
  font: 600 12.5px/1.3 var(--b-sans); letter-spacing: 0; cursor: pointer; }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .owner9-table td.designation .dqe-edit-designation:hover { text-decoration: underline; text-underline-offset: 3px; background: none; }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .owner9-table td.designation .dqe-edit-designation:focus-visible { outline: 2px solid rgba(30, 58, 99, .35); outline-offset: 2px; }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 .owner9-table td.designation .dqe-edit-designation:disabled { opacity: .55; cursor: progress; }

/* ===== C7.12 — DQE screen: the other owner9 legacy controls (same family as the manual form) ==================== */
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 :is(label, input, select, textarea, button) { font-family: var(--b-sans); }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 :is(.owner9-submission-settings label, .owner9-market-amount-label, .c4x2-ask-grid label, .owner9-check) {
  font-weight: 600; font-size: 12.5px; color: var(--b-text-2); letter-spacing: 0; }
body[data-c5b] [data-c5b-screen="dqe"].c4ui-owner9 :is(.owner9-submission-settings, .owner9-project-controls, .owner9-existing-market, .c4x2-ask-grid) :is(input:not([type="checkbox"]):not([type="radio"]), select) {
  min-height: 38px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); font: 400 14px/1.4 var(--b-sans);
  color: var(--b-text); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 :is(.owner9-project-save, .owner9-submission-settings button) { height: 38px; min-height: 38px; padding: 0 16px; border: 1px solid var(--b-marine); border-radius: var(--b-r-ctl);
  background: var(--b-marine); color: #fff; font: 600 13px/1 var(--b-sans); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 :is(.owner9-project-save, .owner9-submission-settings button):hover { background: var(--b-marine-2); border-color: var(--b-marine-2); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .x-more-menu button { min-height: 0; padding: 9px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--b-text);
  font: 500 13.5px/1.3 var(--b-sans); justify-content: flex-start; text-align: left; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .x-more-menu button:hover { background: var(--b-stone); border: 0; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .x-contract-dqe-secondary { color: var(--b-marine-2); font-family: var(--b-sans); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 :is(button, input, select, textarea) { font-family: var(--b-sans); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .c4x2-suggest button { min-height: 0; height: 32px; padding: 0 12px; border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl);
  background: var(--b-surface); color: var(--b-text); font: 600 12.5px/1 var(--b-sans); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .c4x2-suggest button:hover { border-color: var(--b-marine-2); }

/* ===== C7.12 — control typography of the B screens (legacy fonts: Inter / Arial / c4 tokens are not loaded on B pages,
   the browser fell back to a system face inside otherwise B screens). Font FAMILY only: sizes / layouts unchanged. */
body[data-c5b]:is(#c5-page, [data-c5b]) [data-c5f1-screen][data-c5b-screen] :is(input, select, textarea, label) { font-family: var(--b-sans); }
body[data-c5b]:is(#c5-page, [data-c5b]) [data-c5f1-screen][data-c5b-screen] .c5f1-more-menu label { font-weight: 600; }
body[data-c5b]:is(#c5-page, [data-c5b]) [data-c5b-screen] :is(.b-apex-tools button, .b-apex-history select) { font-family: var(--b-sans); }
body[data-c5b]:is(#c5-page, [data-c5b]) [data-c5b-screen] .c4x2-ask-grid label { font-weight: 600; font-size: 12.5px; color: var(--b-text-2); }
/* (C7.12: the c5 search-field font restatement lives in the B-IMPORTANT-BLOCK) */

/* ===== C7.12C — DQE workspace organisation (one coherent card: title → study context → compact manual entry → lines table).
   The work head never shrinks (it was squeezed to 45 px by the viewport-fit column and its title slid under the next block);
   the manual entry is a compact disclosure aligned on the card padding (open by default only on an empty study), so the lines
   table keeps the remaining height of the viewport (contract §14). DQE screen only. */
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-work-head { flex: 0 0 auto; align-items: flex-start; gap: 16px; padding: 16px 24px 10px; margin: 0; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-work-head .c4ui-card-heading { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-work-head .c4ui-card-title { order: -1; margin: 0; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-study-context { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-study-name { font: 600 13px/1.3 var(--b-sans); color: var(--b-text-2); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-study-meta { flex: 1 1 320px; min-width: 0; font: 400 12.5px/1.4 var(--b-sans); color: var(--b-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe { flex: 0 0 auto; margin: 0 24px 12px; padding: 0; border: 1px solid var(--b-rule);
  border-radius: var(--b-r-ctl); background: var(--b-surface-2); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe > summary { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 44px; padding: 8px 14px;
  list-style: none; cursor: pointer; border-radius: var(--b-r-ctl); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe > summary::-webkit-details-marker { display: none; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe > summary::before { content: "+"; flex: 0 0 22px; height: 22px; border-radius: 6px;
  background: var(--b-marine); color: #fff; font: 600 15px/22px var(--b-sans); text-align: center; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe[open] > summary::before { content: "−"; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe > summary:focus-visible { outline: 2px solid var(--b-marine-2); outline-offset: 2px; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe > summary > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; min-width: 0; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe > summary h3 { margin: 0; font: 600 14.5px/1.3 var(--b-sans); color: var(--b-text); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe > summary p { margin: 0; font: 400 12.5px/1.4 var(--b-sans); color: var(--b-muted); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe[open] > summary { border-bottom: 1px solid var(--b-rule-soft); border-radius: var(--b-r-ctl) var(--b-r-ctl) 0 0; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe > form { margin: 0; padding: 12px 14px; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe > .d10-12-manual-msg:empty { display: none; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .d10-12-manual-dqe > .d10-12-manual-msg { margin: 0 14px 10px; }
/* the lines table: full card width at every desktop width (no 1080 px floor → no horizontal scroll at 1366), the designation column
   takes the free width; in the viewport-fit column it keeps ≥ 340 px so opening the manual entry grows the page past the fold
   instead of squeezing the table (contract §14) */
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-table { min-width: 0; width: 100%; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-table thead th:nth-child(2) { width: auto; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-table-wrap { min-height: 340px; }
/* DQE import into an empty study (inside the manual entry): its own row, labelled file field + import action, B controls */
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 #c4s6-dqe-import-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px;
  margin: 0; padding: 12px 14px 14px; border-top: 1px solid var(--b-rule-soft); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 #c4s6-dqe-import-form label { display: grid; gap: 6px; min-width: 0; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 #c4s6-dqe-import-form input[type="file"] { width: 100%; height: 38px; box-sizing: border-box; padding: 5px 8px;
  border: 1px solid var(--b-rule); border-radius: var(--b-r-ctl); background: var(--b-surface); font: 400 13.5px/26px var(--b-sans); color: var(--b-text-2); }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 #c4s6-dqe-import-form input[type="file"]::file-selector-button { height: 26px; margin-right: 10px; padding: 0 12px;
  border: 1px solid var(--b-rule); border-radius: 6px; background: var(--b-surface-2); color: var(--b-text); font: 600 12.5px/1 var(--b-sans); cursor: pointer; }
body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 #c4s6-dqe-import-form button[type="submit"] { width: auto; height: 38px; padding: 0 16px; white-space: nowrap; }
/* short viewports (≤ 900 px high, e.g. 1366×768): the viewport-fit column would leave the lines table a 160 px scroll box under
   the hero / summary / disclosures — the DQE page flows instead and the table shows its whole page of rows (page scroll) */
@media (max-height: 900px) {
  body[data-c5b] #x-study-top[data-c5b-screen="dqe"][data-c5f1-screen].c4ui-owner9 { height: auto; }
  body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 > .c4ui-page-body,
  body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-layout.owner9-layout,
  body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-layout > .owner9-maincol,
  body[data-c5b] #x-study-top[data-c5b-screen="dqe"][data-c5f1-screen].c4ui-owner9 .owner9-workspace.c4ui-card { flex: 0 0 auto; min-height: 0; }
  body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-layout.owner9-layout { grid-template-rows: auto auto; }
  body[data-c5b] #x-study-top[data-c5b-screen="dqe"].c4ui-owner9 .owner9-table-wrap { flex: 0 0 auto; overflow-x: auto; overflow-y: visible; }
}
/* V11_RING_FIT2 (backlog 37): Planning V2 état des tâches (64 px) — thinner band, hole 50 -> 54 (same diameter, colours, markup) */
body#c5-page.c4-5ref[data-pattern="planning"][data-c4e-planning-v2-design="r5"] [data-c5b-screen="planning"] .c4p5-state .c4p5-state-ring::before { inset: 5px; }
