/* Le registre de facturation (js/facturationLogiciel.js). Feuille à part : elle
   ne redéfinit aucune règle des autres, elle complète les « etat-facture ». */

.sous-onglets-facturation { display: flex; gap: 6px; margin: 4px 0 12px; }
.sous-onglets-facturation .active {
  background: #0b1724; color: #fff; border-color: #0b1724;
}

.filtre-periode { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.filtre-periode .input { width: auto; }

/* Neuf commandes sur un rang : le plancher de 180 px de filters-bar--compact
   et la largeur de l'option la plus longue (« Série publique (établissements
   publics) ») les faisaient passer sur deux lignes. Chaque liste prend la
   largeur du choix affiché (field-sizing, Chrome et Edge). */
#facturation-vue-liste .filters-bar--compact { gap: 6px; }
#facturation-vue-liste .filters-bar--compact .input-search { flex: 1 1 12rem; min-width: 8rem; }
#facturation-vue-liste .filters-bar--compact .select {
  field-sizing: content; flex: 0 1 auto; min-width: 6rem; max-width: 14rem;
  padding-left: 8px; padding-right: 4px;
}
#facturation-vue-liste .filters-bar--compact .filtre-periode { flex: 0 0 auto; gap: 4px; }
#facturation-vue-liste .filtre-periode .input { padding-left: 6px; padding-right: 4px; }
/* En deçà, les listes rogneraient leur libellé : la barre passe proprement
   sur deux rangs. */
@media (min-width: 1400px) {
  #facturation-vue-liste .filters-bar--compact { flex-wrap: nowrap; }
}
@media (max-width: 860px) {
  #facturation-vue-liste .filters-bar--compact .select { max-width: none; }
}

.th-tri { cursor: pointer; user-select: none; white-space: nowrap; }
.th-tri::after { content: " ↕"; color: #94a3b8; font-size: 11px; }
.th-tri--actif[data-sens="asc"]::after { content: " ↑"; color: #0b1724; }
.th-tri--actif[data-sens="desc"]::after { content: " ↓"; color: #0b1724; }

.etat-facture--type-facture { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.etat-facture--previsionnel { background: #f8fafc; color: #475569; border: 1px dashed #94a3b8; }
.etat-facture--retard { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.etat-facture--partielle { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }
.etat-facture--payee { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.etat-facture--annulee { background: #e5e7eb; color: #374151; border: 1px solid #9ca3af; }
.etat-facture--historique { background: #e0f2fe; color: #075985; border: 1px solid #7dd3fc; }

.prestation-badge {
  display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 8px;
  font-size: 11px; border: 1px solid #cbd5e1; color: #475569; white-space: nowrap;
}
.prestation-badge--a_venir { background: #f8fafc; }
.prestation-badge--en_cours { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.prestation-badge--realisee { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }

.registre-mention { font-size: 11px; color: #64748b; margin-top: 2px; }
.registre-mention--alerte { color: #991b1b; font-weight: 600; }
.registre-hors-totaux td { opacity: .7; }

#tfoot-factures .registre-pied td {
  border-top: 2px solid #0b1724; background: #f8fafc; font-size: 13px;
}
#tfoot-factures .registre-pied--detail td { border-top: 0; font-size: 12px; }
.registre-pied-part { display: inline-block; margin-right: 16px; white-space: nowrap; }

.reglement-annule { text-decoration: line-through; color: #94a3b8; }
.registre-regime { margin: 6px 0; font-size: 12.5px; }
.registre-regime summary { cursor: pointer; font-weight: 600; }
.input-court { width: 90px; display: inline-block; }
