/* Inventory screens. Figma G16 « Rapports du parc » (205:2370): four KPI cards, status and
   category bars, 12-month spend, spend by supplier and by category.
   Design tokens only (colors_and_type.css). */

.inv-report .hd-page-header,
.inv-report > header { align-items: flex-end; }
.inv-report > header h1 { margin: 0; font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.022em; }
.inv-report > header p { font-size: 16px; line-height: 24px; color: var(--text-secondary); }

.inv-report-actions { display: flex; align-items: flex-end; gap: 12px; }
.inv-report-period { width: 180px; }

.inv-report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.inv-report-kpi {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  padding: 16px 20px; background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.inv-report-kpi__label { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--text-secondary); }
.inv-report-kpi__value {
  font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -0.035em;
  color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.inv-report-kpi__sub { font-size: 13px; line-height: 18px; color: var(--text-secondary); }

.inv-report-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.inv-report-row--spend { grid-template-columns: minmax(0, 1fr) 360px; }

.inv-report-card {
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 20px; background: var(--bg-surface);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.inv-report-card h2 { margin: 0; font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -0.008em; color: var(--text-primary); }
.inv-report-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inv-report-card__head > span { font-size: 13px; line-height: 18px; color: var(--text-secondary); }

.inv-report-bar {
  display: grid; grid-template-columns: 110px minmax(40px, 1fr) auto auto;
  align-items: center; gap: 12px; font-size: 13px; line-height: 18px; color: var(--text-primary);
}
.inv-report-bar--wide { grid-template-columns: 120px minmax(40px, 1fr) auto; }
.inv-report-bar__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-report-bar__track { position: relative; height: 8px; border-radius: 4px; background: var(--bg-sunken); overflow: hidden; }
.inv-report-bar__fill { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: var(--bg-brand); }
.inv-report-bar__value { min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.inv-report-bar__extra { width: 124px; font-size: 12px; line-height: 16px; color: var(--text-secondary); }

.inv-report-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; overflow-x: auto; }
.inv-report-chart__month { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 0 0 30px; }
.inv-report-chart__value { font-size: 12px; line-height: 16px; color: var(--text-primary); white-space: nowrap; }
.inv-report-chart__bar { display: block; width: 30px; min-height: 1px; border-radius: 3px 3px 0 0; background: var(--bg-brand); }
.inv-report-chart__bar.is-partial { background: var(--border-default); }
.inv-report-chart__label { font-size: 12px; line-height: 16px; color: var(--text-secondary); white-space: nowrap; }

.inv-report-note,
.inv-report-empty { margin: 0; font-size: 13px; line-height: 18px; color: var(--text-secondary); }

.inv-report-line { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 13px; line-height: 18px; color: var(--text-primary); }
.inv-report-line > span { flex: 1; min-width: 0; }
.inv-report-line > strong { font-size: 14px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.inv-report-line--total { padding: 8px 0 0; }
.inv-report-line--total > span { color: var(--text-secondary); }

.inv-report-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.inv-report-column { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.inv-report-column .inv-report-bar__value { min-width: 80px; }

.inv-report-footnote { margin: 0; font-size: 13px; line-height: 18px; color: var(--text-secondary); }

@media (max-width: 1150px) {
  .inv-report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv-report-row, .inv-report-row--spend { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .inv-report-kpis, .inv-report-columns { grid-template-columns: minmax(0, 1fr); }
  .inv-report-kpi__value { font-size: 28px; line-height: 34px; }
  .inv-report-actions { flex-wrap: wrap; }
  .inv-report-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .inv-report-bar__track { grid-row: 2; grid-column: 1 / -1; }
  .inv-report-bar__extra { grid-column: 1 / -1; width: auto; }
}

/* Figma G13 « Fournisseurs » (211:3538): directory with search and period,
   rows sorted by « Dépensé », total row, detail panel of the selected supplier. */
.sup-header { display: flex; align-items: flex-end; gap: 12px; }
.sup-header__titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sup-header h1 { margin: 0; font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.022em; color: var(--text-primary); }
.sup-header p { margin: 0; max-width: 800px; font-size: 16px; line-height: 24px; color: var(--text-secondary); }

.sup-filters { display: flex; align-items: flex-start; gap: 12px; }
.sup-filters__search { flex: 1; min-width: 0; }
.sup-filters__select { width: 150px; }

.sup-layout { display: flex; align-items: flex-start; gap: 24px; }
.sup-list { flex: 1; min-width: 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-surface); }
.sup-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 168px 64px 104px; gap: 12px; align-items: center;
  padding: 12px 16px; border-top: 1px solid var(--border-subtle); font-size: 14px; line-height: 20px; color: var(--text-primary);
}
.sup-row--head { padding: 10px 16px; border-top: 0; background: var(--bg-sunken); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); }
.sup-row.is-selected { background: var(--bg-selected); }
.sup-row--total { background: var(--bg-sunken); font-weight: 500; }
.sup-col-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sup-row__select {
  all: unset; cursor: pointer; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sup-row__select:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; border-radius: 2px; }
.sup-mono { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--text-secondary); }
.sup-col-contact { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 18px; }
.sup-col-contact small { font-size: 12px; line-height: 16px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-col-contact.is-muted { color: var(--text-secondary); }
.sup-col-num, .sup-col-spent { text-align: right; font-variant-numeric: tabular-nums; }
.sup-row--head .sup-col-spent { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
.sup-col-spent.is-muted { color: var(--text-secondary); }
.sup-empty { margin: 0; padding: 12px 16px; font-size: 13px; line-height: 18px; color: var(--text-secondary); }

.sup-detail {
  width: 360px; flex: 0 0 360px; display: flex; flex-direction: column; gap: 20px;
  padding: 20px; background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.sup-detail__head { display: flex; align-items: flex-start; gap: 8px; }
.sup-detail__head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.sup-detail__head h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; color: var(--text-primary); }
.sup-detail__figures { display: flex; gap: 8px; }
.sup-detail__figures > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-sunken); }
.sup-detail__figures strong { font-size: 16px; line-height: 22px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.sup-detail__figures span { font-size: 12px; line-height: 16px; color: var(--text-secondary); }
.sup-detail__label { font-size: 13px; line-height: 16px; font-weight: 500; color: var(--text-secondary); }
.sup-detail__contact { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px 0; margin: 0; font-size: 13px; line-height: 18px; }
.sup-detail__contact dt { color: var(--text-secondary); }
.sup-detail__contact dt.sup-detail__label { grid-column: 1 / -1; }
.sup-detail__contact dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--text-primary); }
.sup-detail__contact dd:empty { display: none; }
.sup-detail a { color: var(--text-link); text-decoration: underline; }
.sup-detail__recent { display: flex; flex-direction: column; }
.sup-detail__recent > .sup-detail__label { padding-bottom: 8px; }
.sup-purchase { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border-subtle); font-size: 13px; line-height: 18px; }
.sup-purchase > .sup-mono { width: 64px; color: var(--text-link); }
.sup-purchase__status { flex: 1; min-width: 0; }
.sup-purchase__date { width: 52px; color: var(--text-secondary); }
.sup-purchase__amount { width: 72px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.sup-purchase__amount.is-cancelled { text-decoration: line-through; color: var(--text-secondary); }
.sup-detail__models { display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 18px; }
.sup-detail__models p { margin: 0; color: var(--text-primary); }
.sup-detail__note { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 12px; line-height: 16px; color: var(--text-secondary); }

@media (max-width: 1150px) {
  .sup-layout { flex-direction: column; }
  .sup-detail { width: auto; flex: none; align-self: stretch; }
}
@media (max-width: 700px) {
  .sup-header, .sup-filters { flex-direction: column; align-items: stretch; }
  .sup-filters__select { width: auto; }
  .sup-row { grid-template-columns: minmax(0, 1fr) auto; }
  .sup-row .sup-col-contact, .sup-row .sup-col-num { display: none; }
}

/* Figma G14 « Modèles d'équipement » (382:11446): Fournisseurs | Modèles tabs, list
   with the retired badge and « remplacé par », detail, G14b form, G14d dialog. */
.sup-tabs { align-self: flex-start; }
.mdl-row { grid-template-columns: minmax(0, 1fr) 190px 56px 104px; }
.mdl-name { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.mdl-badges { display: inline-flex; align-items: center; gap: 8px; }
.mdl-usedby { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-sunken); font-size: 13px; line-height: 18px; }
.mdl-usedby p { margin: 0; color: var(--text-primary); }
.mdl-retire { display: flex; flex-direction: column; gap: 6px; }
.mdl-link { all: unset; cursor: pointer; font-size: 13px; line-height: 18px; color: var(--text-link); text-decoration: underline; }
.mdl-link:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; border-radius: 2px; }
.mdl-form { gap: 16px; }
.mdl-form__help { margin: 0; font-size: 12px; line-height: 16px; color: var(--text-secondary); }
.mdl-form__actions { display: flex; gap: 8px; }
.mdl-empty { padding: 24px 0; }
.mdl-dialog { width: min(520px, calc(100vw - 32px)); max-width: none; }
.mdl-dialog__head .itw-dialog-title { flex: 1; min-width: 0; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.mdl-dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mdl-dialog__sub { margin: 0; font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.mdl-dialog__note { display: flex; gap: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg-sunken); font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.mdl-dialog__note p { margin: 0; }
.mdl-dialog__note .mdl-dialog__lead { color: var(--text-primary); margin-bottom: 4px; }
@media (max-width: 700px) {
  .mdl-row { grid-template-columns: minmax(0, 1fr) auto; }
}

/* Figma G06c (399:13027): « Filtré par modèle : [nom ×] Effacer le filtre ». */
.inv-model-filter { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.inv-model-filter__label { font-size: var(--font-size-body-sm); color: var(--fg-secondary); }
.inv-model-filter__foot { margin: var(--space-3) 0 0; font-size: var(--font-size-body-sm); color: var(--fg-secondary); }
.mdl-assets-link { align-self: flex-start; margin-top: var(--space-2); }
