/* ============================================================================
   rapports.css — shared responsive + "résumé" styling for the Reports section.
   Scoped under .ids-rapport (added to each report's root <MudContainer>), so no
   other page is affected. Introduced with the report-by-report financial pass.
   ============================================================================ */

.ids-rapport{ padding-bottom:32px; }

/* ---- Report intro / summary panel (the "resume" at the top) ---- */
.rapport-summary{
  border-radius:14px;
  background:linear-gradient(135deg,#eef2ff,#faf5ff);
  border:1px solid #e0e7ff;
  padding:16px 18px;
  margin-bottom:20px;
}
.rapport-summary .rs-head{
  display:flex; align-items:center; gap:10px;
  font-weight:800; color:#4338ca; margin-bottom:8px; font-size:1rem;
}
.rapport-summary .rs-head .mud-icon-root{ color:#6366f1; }
.rapport-summary p{ margin:0 0 8px; color:#334155; font-size:.92rem; line-height:1.55; }
.rapport-summary p:last-child{ margin-bottom:0; }
.rapport-summary .rs-formula{
  font-family:'SF Mono',Consolas,'Roboto Mono',monospace; font-size:.82rem;
  background:#ffffffcc; border:1px dashed #c7d2fe; border-radius:8px;
  padding:8px 11px; color:#3730a3; display:block; margin:8px 0; white-space:normal;
}
.rapport-summary ul{ margin:6px 0 0; padding-left:20px; color:#475569; font-size:.88rem; }
.rapport-summary li{ margin:3px 0; }
.rapport-summary li b{ color:#3730a3; }

/* ---- Tables never overflow the screen: scroll horizontally inside their card ---- */
@media (max-width: 960px){
  .ids-rapport .mud-table-container{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .ids-rapport .mud-table-container > table{ min-width:520px; }
}

/* ---- Phone tuning ---- */
@media (max-width: 600px){
  .ids-rapport{ margin-top:8px !important; }
  .ids-rapport .rapport-header .mud-typography-h4,
  .ids-rapport .rapport-header .mud-typography-h3{ font-size:1.35rem; line-height:1.2; }
  .ids-rapport .rapport-header .mud-typography-subtitle2{ font-size:.78rem; }
  /* stacked money columns: drop the desktop side-margins so both align full width */
  .ids-rapport .col-split{ margin:0 0 12px 0 !important; }
  .rapport-summary{ padding:14px; }
  .rapport-summary .rs-formula{ font-size:.76rem; }
  /* grand-total row: wrap the amount to its own line rather than breaking the number */
  .ids-rapport .grand-total-row{ flex-wrap:wrap; gap:2px 8px; }
  .ids-rapport .grand-total-row .mud-typography-h4{ font-size:1.7rem; white-space:nowrap; }
}
