/* ============================================================================
   Rapports — écran de composition et bloc posé sur les fiches.
   ============================================================================ */

.rapport-raccourcis {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}

.rapport-form .picker { max-width: 100%; }

/* --- Bloc sur une fiche véhicule ou chauffeur -------------------------- */

.rapport-fiche { margin-top: var(--space-4, 1rem); }

.rapport-fiche__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .75rem;
}

.rapport-fiche__dates { display: flex; gap: .6rem; }
.rapport-fiche__dates .form-row { margin-bottom: 0; }
.rapport-fiche__dates input { min-height: var(--touch-min, 44px); font-size: 16px; }

.rapport-fiche__actions { display: flex; gap: .4rem; }

.rapport-fiche .form-hint { flex: 1 1 100%; margin: .2rem 0 0; }

@media (max-width: 640px) {
  .rapport-fiche__form,
  .rapport-fiche__dates,
  .rapport-fiche__actions { flex-direction: column; align-items: stretch; }
  .rapport-fiche__actions .btn { width: 100%; }
}

/* --- Export du tableau financier --------------------------------------- */

.export-financier { margin-top: var(--space-5, 1.25rem); }

.export-financier__intro { max-width: 70ch; line-height: 1.55; margin: 0 0 .8rem; }

.export-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0 1.2rem;
  margin-bottom: var(--space-3, .75rem);
}

.export-modules .switch-row { padding: .35rem 0; min-height: 0; }
.export-modules .switch-row strong { font-weight: 500; font-size: var(--font-sm, .88rem); }

@media (max-width: 640px) {
  .export-modules { grid-template-columns: 1fr; }
}

/* --- Comptabilité ------------------------------------------------------- */

.compta-periode { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.compta-periode input { min-height: var(--touch-min, 44px); font-size: 16px; }

.compta-intro { max-width: 72ch; line-height: 1.55; margin: 0 0 .8rem; }

.compta-table small { display: block; }
.compta-table td.num { font-variant-numeric: tabular-nums; }
.compta-actions { white-space: nowrap; display: flex; gap: .35rem; justify-content: flex-end; }

@media (max-width: 820px) {
  .compta-table thead { display: none; }
  .compta-table, .compta-table tbody, .compta-table tr, .compta-table td { display: block; width: 100%; }

  .compta-table tr {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: .7rem .85rem;
    margin-bottom: .7rem;
  }

  .compta-table td {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: .3rem 0; border: 0; text-align: right;
  }

  .compta-table td::before {
    content: attr(data-label);
    font-size: var(--font-xs, .72rem);
    color: var(--color-text-muted);
    text-align: left; flex: 0 0 auto;
  }

  .compta-actions { flex-direction: column; }
  .compta-actions .btn { width: 100%; }
}
