/*
 * Habillage cible des rapports imprimables et consultatifs.
 *
 * Objectif :
 * - neutraliser les coins arrondis introduits par le style global des tableaux ;
 * - conserver un rendu rectangulaire propre a l'ecran comme a l'impression ;
 * - limiter la correction aux rapports sans impacter les autres pages du back-office.
 */

/*
 * Les cartes qui portent le contenu des rapports gardent leur structure,
 * mais perdent les coins arrondis pour ne plus transmettre un effet "capsule"
 * autour des tableaux qu'elles contiennent.
 */
.report-card,
.report-card.card,
.report-card > .card-header,
.report-card > .card-body {
  border-radius: 0 !important;
}

/*
 * Les wrappers responsives et les tableaux des rapports neutralisent ici
 * les arrondis et l'effet de carte du style global applique sur `.table`
 * et `.table-responsive`.
 */
.report-table-shell,
.report-table-shell.table-responsive {
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow-x: auto;
  overflow-y: visible;
}

.report-table-shell > .table {
  margin-bottom: 0;
  border-radius: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0;
  box-shadow: none !important;
  overflow: visible !important;
}

.report-table-shell > .table,
.report-table-shell > .table thead,
.report-table-shell > .table tbody,
.report-table-shell > .table tfoot,
.report-table-shell > .table tr,
.report-table-shell > .table th,
.report-table-shell > .table td {
  border-radius: 0 !important;
}

@media print {
  .report-card,
  .report-card.card,
  .report-card > .card-header,
  .report-card > .card-body,
  .report-table-shell,
  .report-table-shell.table-responsive,
  .report-table-shell > .table,
  .report-table-shell > .table thead,
  .report-table-shell > .table tbody,
  .report-table-shell > .table tfoot,
  .report-table-shell > .table tr,
  .report-table-shell > .table th,
  .report-table-shell > .table td {
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}

/*
 * Ajustements de densite du rapport A.
 *
 * Le but est de remonter legerement l'en-tete, de reduire les interlignes
 * et d'aligner les cartes de synthese en mode "libelle a gauche / valeur a droite"
 * sans toucher aux donnees ni au fonctionnement du rapport.
 */
.report-a-card {
  padding: 1rem 1.25rem 1.2rem !important;
}

.report-a-header {
  margin-bottom: 1rem !important;
}

.report-a-company {
  margin-bottom: 0.15rem !important;
  line-height: 1.08;
}

.report-a-divider {
  margin: 0.35rem 0 0.55rem !important;
}

.report-a-title {
  margin: 0.55rem 0 0.4rem !important;
  line-height: 1.04;
}

.report-a-meta-line {
  margin-bottom: 0.1rem !important;
  line-height: 1.18;
}

.report-a-summary-row {
  --bs-gutter-x: 0.9rem;
  --bs-gutter-y: 0.75rem;
  margin-bottom: 1rem !important;
}

.report-a-summary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.95rem !important;
  line-height: 1.1;
}

.report-a-summary-label {
  margin: 0;
  text-align: left;
  letter-spacing: 0.01em;
}

.report-a-summary-value {
  margin: 0;
  text-align: right;
  line-height: 1;
  white-space: nowrap;
}

.report-a-footer-row {
  margin-top: 1rem !important;
}

.report-a-footer-meta p {
  line-height: 1.2;
}

@media print {
  .report-a-card {
    padding: 0.55rem 0.8rem 0.75rem !important;
  }

  .report-a-header {
    margin-bottom: 0.6rem !important;
  }

  .report-a-company {
    margin-bottom: 0.1rem !important;
  }

  .report-a-divider {
    margin: 0.22rem 0 0.4rem !important;
  }

  .report-a-title {
    margin: 0.35rem 0 0.3rem !important;
  }

  .report-a-meta-line {
    line-height: 1.1;
  }

  .report-a-summary-row {
    --bs-gutter-x: 0.65rem;
    --bs-gutter-y: 0.45rem;
    margin-bottom: 0.6rem !important;
  }

  .report-a-summary-card {
    padding: 0.45rem 0.55rem !important;
  }

  .report-a-footer-row {
    margin-top: 0.7rem !important;
  }

  .report-a-footer-meta p {
    line-height: 1.15;
  }
}
