.fm-screen { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); } /* explicit track: an auto one grew to the metric row (DE, 390 px) */
.fm-screen .screen-card .row-actions { margin-top: var(--s-1); }
.fm-mini-list, .fm-chip-list { display: grid; gap: var(--s-2); }
.fm-mini-list li, .fm-chip-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--bg-2);
}
.fm-chip-list { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.fm-space-table, .fm-type-table { display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; }
.fm-space-row, .fm-type-row {
  display: grid;
  gap: var(--s-3);
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  text-align: left;
}
.fm-space-row { grid-template-columns: minmax(0, 1.4fr) minmax(130px, .8fr) minmax(0, 1fr) 110px; }
.fm-type-row { grid-template-columns: minmax(120px, 1.4fr) repeat(4, minmax(56px, .6fr)); }
.fm-space-row:last-child, .fm-type-row:last-child { border-bottom: 0; }
.fm-type-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-space-row.is-head, .fm-type-row.is-head { background: var(--bg-2); color: var(--text-3); font-size: var(--t-xs); font-weight: 700; letter-spacing: .02em; }
button.fm-space-row { cursor: pointer; }
button.fm-space-row:hover { background: var(--bg-2); }
button.fm-space-row.is-selected { background: color-mix(in srgb, var(--brand-a) 10%, var(--bg-1)); box-shadow: inset 3px 0 0 var(--accent); }
.fm-status-card {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--r-3);
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.fm-status-card strong { font-size: var(--t-body-strong); }
.fm-status-card[data-status="ok"] { border-color: color-mix(in srgb, var(--ok) 25%, var(--line)); background: color-mix(in srgb, var(--ok-bg) 70%, var(--bg-1)); }
.fm-status-card[data-status="review"] { border-color: color-mix(in srgb, var(--sev-review) 25%, var(--line)); background: color-mix(in srgb, var(--sev-review-bg) 70%, var(--bg-1)); }
.fm-status-card[data-status="info"] { border-color: color-mix(in srgb, var(--accent) 20%, var(--line)); }
.fm-completeness-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.fm-completeness-row .panel-note { overflow-wrap: anywhere; } /* property paths (Pset_….Name) have no spaces */
.fm-completeness-row {
  display: grid;
  gap: var(--s-2);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--bg-1);
}
.fm-completeness-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.fm-progress { width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden; background: var(--bg-3); }
.fm-progress::-webkit-progress-bar { background: var(--bg-3); }
.fm-progress::-webkit-progress-value { background: var(--brand-b); border-radius: 999px; }
.fm-progress[data-tone="ok"]::-webkit-progress-value { background: var(--ok); }
.fm-progress[data-tone="review"]::-webkit-progress-value { background: var(--sev-review); }
.fm-progress[data-tone="blocking"]::-webkit-progress-value { background: var(--sev-blocking); }
.fm-progress::-moz-progress-bar { background: var(--brand-b); border-radius: 999px; }
.fm-progress[data-tone="ok"]::-moz-progress-bar { background: var(--ok); }
.fm-progress[data-tone="review"]::-moz-progress-bar { background: var(--sev-review); }
.fm-progress[data-tone="blocking"]::-moz-progress-bar { background: var(--sev-blocking); }
.handover-screen .screen-grid > section { display: grid; gap: var(--s-2); }
@media (max-width: 900px) {
  .fm-space-row { grid-template-columns: minmax(0, 1.2fr) minmax(120px, .8fr) minmax(0, 1fr) 90px; }
}
@media (max-width: 680px) {
  .fm-space-row { grid-template-columns: minmax(0, 1fr); }
  .fm-space-row.is-head { display: none; }
  .fm-space-row > span { display: grid; gap: 2px; }
}
/* The locals table sits in a half-width card (and narrower with the inspector open): it
   adapts to ITS width, not the window's, so its columns never overlap. */
.fm-space-table { container-type: inline-size; }
.fm-type-table { container-type: inline-size; }
.fm-space-row > span { min-width: 0; overflow-wrap: anywhere; }
.fm-type-row > span:not(:first-child) { min-width: 0; overflow-wrap: anywhere; }
@container (max-width: 440px) {
  .fm-type-row { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .fm-type-row.is-head { display: none; }
  .fm-type-row > .num { text-align: left; }
}
@container (max-width: 560px) {
  .fm-space-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 4px; }
  .fm-space-row.is-head { display: none; }
  .fm-space-row > span { display: grid; gap: 2px; }
  .fm-space-row > .num { text-align: left; }
}
/* « Par étage » sits beside the (taller) locals table: its rows stay at the top of the card
   instead of being stretched apart down the card's height (it looked empty). */
.fm-mini-list { align-content: start; }
.spaces-screen .screen-grid > .screen-card { align-content: start; }
/* D-S1-02 : composants du registre COBie (nom, type, étage, local, GUID, attributs manquants). */
.fm-component-table { display: grid; border: 1px solid var(--line); border-radius: var(--r-3); overflow: hidden; container-type: inline-size; }
.fm-component-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, 1.4fr); gap: var(--s-3); align-items: start; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--line); background: var(--bg-1); color: inherit; font: inherit; text-align: left; }
.fm-component-row:last-child { border-bottom: 0; }
.fm-component-row.is-head { background: var(--bg-2); color: var(--text-3); font-size: var(--t-xs); font-weight: 700; }
.fm-component-row > span { display: grid; gap: 2px; min-width: 0; overflow-wrap: break-word; }
.fm-component-row > .mono { overflow-wrap: anywhere; font-size: var(--t-xs); }
button.fm-component-row { cursor: pointer; }
button.fm-component-row:hover { background: var(--bg-2); }
@container (max-width: 720px) {
  .fm-component-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 4px; }
  .fm-component-row.is-head { display: none; }
}
