/* « Livrables » — 26/09/2026 ergonomics pass.
   A page, like Documents: one row per deliverable, the download on the row,
   search and filters above; the side panel shows versions and a readable
   provenance. A status appears only when it tells something. On a narrow
   screen each row becomes a card. Application tokens only. */

.forge-shell .deliverables-view { gap: 16px; }
.forge-shell .deliverables-card { display: grid; overflow: hidden; }
.forge-shell .deliverables-table-wrap { overflow-x: auto; }
.forge-shell .deliverables-card .section-header p:empty { display: none; }

.forge-shell .deliverables-filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.forge-shell .deliverables-filter { display: grid; gap: 5px; min-width: 0; color: var(--tx-2); font-size: 12px; font-weight: 650; }
.forge-shell .deliverables-filter input,
.forge-shell .deliverables-filter select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--tx);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
}
.forge-shell .deliverables-filters .compact-action { min-height: 38px; }

.forge-shell .deliverables-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.forge-shell .deliverables-table th,
.forge-shell .deliverables-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.forge-shell .deliverables-table thead th {
  color: var(--tx-3);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}
.forge-shell .deliverables-table tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 40%, var(--card)); }
.forge-shell .deliverable-name {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tx);
  font: inherit;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.forge-shell .deliverable-name:hover { color: var(--accent-text); text-decoration: underline; }
.forge-shell .deliverable-name:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-xs); }
.forge-shell .deliverables-table tbody td:first-child { min-width: 210px; }
.forge-shell .deliverables-table tbody td:nth-child(2) { min-width: 130px; }
.forge-shell .deliverable-dossier { display: block; margin-top: 3px; color: var(--tx-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.forge-shell .deliverable-dossier-id { white-space: nowrap; }
.forge-shell .deliverable-nowrap { white-space: nowrap; font-variant-numeric: tabular-nums; }
.forge-shell .deliverable-actions { text-align: right; white-space: nowrap; }

.deliverable-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--idle-line);
  border-radius: 999px;
  background: var(--idle-bg);
  color: var(--idle);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.3;
}
.deliverable-status[data-tone="progress"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-soft-ink); }
.deliverable-status[data-tone="attention"] { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.deliverable-status[data-tone="error"] { border-color: var(--err-line); background: var(--err-bg); color: var(--err); }

/* The side panel (outside .forge-shell, at body level): provenance in
   words, identifiers folded. */
.artifact-provenance-incident { margin: 0 0 8px; color: var(--tx-2); font-size: 13px; }
.artifact-provenance-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.artifact-provenance-list li {
  display: grid;
  gap: 2px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
}
.artifact-provenance-list strong { color: var(--tx); font-size: 13px; font-weight: 650; }
.artifact-provenance-meta { color: var(--tx-2); font-size: 12.5px; }
.artifact-provenance-refs { color: var(--tx-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.artifact-technical { margin-top: 12px; color: var(--tx-2); font-size: 12.5px; }
.artifact-technical summary { cursor: pointer; font-weight: 650; }
.artifact-technical-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 12px;
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
}
.artifact-technical-list dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .forge-shell .deliverables-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forge-shell .deliverables-filter-search { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .forge-shell .deliverables-filters { grid-template-columns: 1fr; padding: 12px 14px; }
  .forge-shell .deliverables-table thead { display: none; }
  .forge-shell .deliverables-table,
  .forge-shell .deliverables-table tbody,
  .forge-shell .deliverables-table tr { display: block; width: 100%; }
  .forge-shell .deliverables-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  .forge-shell .deliverables-table td { display: block; padding: 0; border: 0; }
  .forge-shell .deliverables-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--tx-3);
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .forge-shell .deliverables-table td:first-child,
  .forge-shell .deliverable-actions { grid-column: 1 / -1; }
  .forge-shell .deliverables-table td:first-child::before { display: none; }
  .forge-shell .deliverable-actions { text-align: left; }
  .forge-shell .deliverable-actions .btn-primary { width: 100%; justify-content: center; min-height: 40px; }
  .forge-shell .deliverables-table td:empty { display: none; }
}

/* Lot P (01/10/2026): the registry — classification column, formats per
   row, a server page of 25 or 50 rows, a side panel with every version. */
.forge-shell .deliverable-type { display: block; margin-top: 2px; color: var(--tx-3); font-size: 12px; font-weight: 400; }
.forge-shell .deliverable-class { display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--paper); color: var(--tx-2); font-size: 11.5px; font-weight: 650; }
.forge-shell .deliverable-class[data-class="confidentiel"] { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.forge-shell .deliverable-class[data-class="critique"] { border-color: var(--err-line); background: var(--err-bg); color: var(--err); }
.deliverable-format { margin: 0 4px 4px 0; padding: 1px 7px; border: 1px solid var(--accent-line); border-radius: var(--r-xs); background: var(--card); color: var(--accent-text); font-size: 11px; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.deliverable-format:hover { background: var(--accent-soft); }
.forge-shell .deliverables-pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; color: var(--tx-2); font-size: 13px; }
.forge-shell .deliverables-pager-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.forge-shell .deliverables-page-size { display: inline-flex; align-items: center; gap: 6px; color: var(--tx-3); }
.deliverables-drawer-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; background: rgba(40, 28, 12, .28); }
.deliverables-drawer-backdrop[hidden] { display: none; }
.deliverables-drawer { width: min(560px, 100%); height: 100%; overflow: auto; padding: 22px 26px; border-left: 1px solid var(--line); background: var(--paper); box-shadow: -18px 0 40px rgba(40, 28, 12, .18); }
.deliverables-drawer h2 { margin: 6px 0 10px; font-size: 20px; }
.deliverables-drawer h3 { margin: 18px 0 8px; font-size: 14px; }
.deliverables-drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.deliverable-version { display: grid; grid-template-columns: minmax(90px, auto) 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
.deliverable-version.is-current { box-shadow: inset 3px 0 0 var(--accent); }
.deliverable-version-number { color: var(--accent-text); font-weight: 700; }
.deliverable-version small { display: block; color: var(--tx-3); }
.deliverable-hash { font-family: var(--mono); }
.deliverable-mention { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--accent-line); border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent-soft-ink); font-size: 13px; }
.deliverable-source-line { margin: 12px 0 4px; }
.deliverable-details { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.deliverable-details dt { color: var(--tx-3); }
.deliverable-details dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .deliverable-version { grid-template-columns: 1fr; }
  .deliverable-details { grid-template-columns: 1fr; }
}

/* Lot P: Paramètres › Rapports › « Conservation des livrables » (maquette c). */
.retention-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.retention-settings h3 { margin: 0 0 8px; font-size: 14px; }
.retention-choice { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); cursor: pointer; }
.retention-choice.is-selected { border-color: var(--accent-line); background: var(--accent-soft); }
.retention-choice small { display: block; color: var(--tx-3); }
.retention-default { margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--ok-bg, var(--accent-soft)); color: var(--ok, var(--accent-text)); font-size: 11px; font-weight: 650; }
.retention-other { width: 80px; margin-top: 6px; }
.retention-short { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 12px; font-size: 13px; }
.retention-short dd { margin: 0; font-weight: 650; text-align: right; }
.retention-note { color: var(--tx-3); font-size: 12.5px; }
.retention-preview { padding: 8px 10px; border: 1px solid var(--warn-line); border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn); font-size: 12.5px; }
.retention-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 12px; }
@media (max-width: 760px) { .retention-settings { grid-template-columns: 1fr; } }
