/* Administration › Journal d'audit, Rapport mensuel, Système (public/js/admin-reports.js).
   Language: docs/design/2026/LANGUAGE.md v0.5 §14 — panels and rules, no cards, colour = state, sentence case. */

/* ── Journal d'audit ── */
.audit-table td { white-space: nowrap; }
.audit-table td.audit-detail { white-space: normal; min-width: 220px; line-height: 18px; padding-top: 6px; padding-bottom: 6px; }
.audit-who { display: flex; flex-direction: column; justify-content: center; }
.audit-role { font-size: 11px; line-height: 13px; }
.audit-table .call-flag { margin-left: 6px; vertical-align: 1px; }
.audit-more { border-bottom: 0; border-top: 1px solid var(--rule); align-items: center; padding-top: 10px; padding-bottom: 10px; }

/* ── Rapport mensuel ── */
.rp-sq { display: inline-block; width: 8px; height: 8px; margin-right: 8px; vertical-align: 1px; }
.rp-sq.k-sos { background: var(--sos-f); } .rp-sq.k-chute { background: var(--chute); } .rp-sq.k-isole { background: var(--isole); } .rp-sq.k-zone { background: var(--zone); }
.report-zone { padding: 0 16px 24px; }
.report-zone > .empty-cell { padding: 16px 0 !important; }
.rp-print-head { display: none; }
.rp-site { display: flex; flex-direction: column; gap: 14px; padding: 18px 0 20px; border-bottom: 1px solid var(--rule); }
.rp-head { display: flex; align-items: baseline; gap: 12px; }
.rp-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule-2); }
.rp-fig { display: flex; flex-direction: column; gap: 4px; padding: 10px 16px 4px 0; }
.rp-fig + .rp-fig { padding-left: 16px; border-left: 1px solid var(--rule); }
.rp-fig .t-readout { font-variant-numeric: tabular-nums; text-transform: none; }
.rp-table { max-width: 980px; }
.rp-table td { height: 34px; }
.rp-never { max-width: 980px; white-space: normal; }
.rp-never .t-label { margin-right: 8px; }
.rp-note { padding-top: 14px; max-width: 980px; }
@media (max-width: 1365px) { .rp-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-fig:nth-child(3) { padding-left: 0; border-left: 0; } }

/* ── Système ── */
.sys-zone { display: flex; flex-direction: column; padding: 0 16px 24px; }
.sys-block { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; max-width: 980px; }
.sys-rows { border-top: 1px solid var(--rule-2); }
.sys-row { display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: center; min-height: 40px; padding: 6px 0; border-bottom: 1px solid var(--rule); gap: 16px; }
.sys-row > .t-label { color: var(--fg-2); }
.sys-banner { margin-top: 12px; border: 0; }
.sys-note { padding-top: 14px; }

/* ── Licences (public/js/licenses.js): a state = a word, a mark and a colour, never a fill ── */
.lic-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border: 1px solid currentColor; border-radius: 2px; font-family: var(--f-semi); font-weight: 600; font-size: 13px; }
.lic-chip.k-ok { color: var(--ok); }
.lic-chip.k-warn { color: var(--busy); }
.lic-chip.k-stop { color: var(--on-busy); background: var(--busy); border-color: var(--busy); }
.lic-chip.k-wait { color: var(--fg-1); border-color: var(--rule-2); }
.lic-chip.k-off { color: var(--fg-3); border-color: var(--rule); }
.lic-radio, .lic-expiry { display: flex; flex-direction: column; justify-content: center; }
.lic-stop { font-size: 11px; line-height: 13px; }
.lic-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); vertical-align: middle; }
.lic-table .acc-actions { align-items: center; }
.lic-sheet { display: flex; align-items: center; gap: 12px; flex: none; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--rule); border-left: 3px solid var(--busy); background: var(--busy-tint); }
.lic-sheet[hidden] { display: none; }
.lic-sheet .grow { flex: 1; min-width: 240px; }

/* ── Impression du rapport : seule la zone du rapport, sur papier blanc ── */
@media print {
  body.report-print-mode .app > *:not(.views), body.report-print-mode .toast-container { display: none !important; }
  body.report-print-mode .app { border: 0 !important; height: auto; }
  body.report-print-mode .view:not(.view-admin), body.report-print-mode .admin-nav, body.report-print-mode .admin-panel:not(#monthlyReportSection),
  body.report-print-mode #monthlyReportSection > :not(#reportZone) { display: none !important; }
  body.report-print-mode, body.report-print-mode .app, body.report-print-mode .view-admin, body.report-print-mode .admin-body,
  body.report-print-mode #monthlyReportSection { overflow: visible !important; height: auto !important; background: #fff !important; }
  body.report-print-mode #reportZone, body.report-print-mode #reportZone * { color: #111 !important; background: transparent !important; border-color: #9aa1a9 !important; }
  body.report-print-mode #reportZone .rp-sq { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.report-print-mode #reportZone .rp-sq.k-sos { background: #D92B26 !important; }
  body.report-print-mode #reportZone .rp-sq.k-chute { background: #C2479F !important; }
  body.report-print-mode #reportZone .rp-sq.k-isole { background: #E0901A !important; }
  body.report-print-mode #reportZone .rp-sq.k-zone { background: #7B6CDB !important; }
  body.report-print-mode .rp-print-head { display: flex; flex-direction: column; gap: 4px; padding: 0 0 12px; border-bottom: 2px solid #111; }
  html:has(body.report-print-mode) { background: #fff !important; }
  body.report-print-mode .rp-site { break-inside: avoid; }
  body.report-print-mode .rp-figures { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.report-print-mode .dtable th { position: static; }
}
