/*
 * Compatibilité Bootstrap 4 → 5
 * Le site tourne sous Bootstrap 5.3.2, mais une partie du code utilise encore des
 * classes de Bootstrap 4 qui n'existent plus en v5 (et n'avaient donc aucun effet).
 * Cette feuille leur redonne leur rendu d'origine, sans toucher aux ~300 endroits
 * concernés. À supprimer progressivement au fil des réécritures (préférer les classes v5 :
 * mb-3, fw-bold, text-end, ms-*, me-*, w-100, bg-*, rounded-pill…).
 */

/* Formulaires */
.form-group { margin-bottom: 1rem; }
.form-row { display: flex; flex-wrap: wrap; margin-right: -5px; margin-left: -5px; }
.form-row > .col, .form-row > [class*="col-"] { padding-right: 5px; padding-left: 5px; }
/* Formulaire en ligne (règles de Bootstrap 4.6) : champs et bouton alignés sur une ligne
   à partir de 576 px, empilés en dessous. Dans ce mode, form-group n'a PAS de marge basse
   (sinon le champ est décalé par rapport au bouton « Rechercher »). */
.form-inline { display: flex; flex-flow: row wrap; align-items: center; }
@media (min-width: 576px) {
    .form-inline label { display: flex; align-items: center; justify-content: center; margin-bottom: 0; }
    .form-inline .form-group { display: flex; flex: 0 0 auto; flex-flow: row wrap; align-items: center; margin-bottom: 0; }
    .form-inline .form-control { display: inline-block; width: auto; vertical-align: middle; }
}
@media (max-width: 575.98px) {
    .form-inline .form-group, .form-inline .btn { width: 100%; margin-bottom: .5rem; }
}
.form-control-file { display: block; width: 100%; }

/* Typographie et alignement */
.font-weight-bold { font-weight: 700 !important; }
.font-weight-bolder { font-weight: bolder !important; }
.font-weight-normal { font-weight: 400 !important; }
.font-weight-light { font-weight: 300 !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.float-left { float: left !important; }
.float-right { float: right !important; }

/* Marges / espacements (ml/mr/pl/pr → ms/me/ps/pe en v5) */
.ml-0 { margin-left: 0 !important; }        .mr-0 { margin-right: 0 !important; }
.ml-1 { margin-left: .25rem !important; }   .mr-1 { margin-right: .25rem !important; }
.ml-2 { margin-left: .5rem !important; }    .mr-2 { margin-right: .5rem !important; }
.ml-3 { margin-left: 1rem !important; }     .mr-3 { margin-right: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }   .mr-4 { margin-right: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }     .mr-5 { margin-right: 3rem !important; }
.ml-auto { margin-left: auto !important; }  .mr-auto { margin-right: auto !important; }
.pl-0 { padding-left: 0 !important; }       .pr-0 { padding-right: 0 !important; }
.pl-1 { padding-left: .25rem !important; }  .pr-1 { padding-right: .25rem !important; }
.pl-2 { padding-left: .5rem !important; }   .pr-2 { padding-right: .5rem !important; }
.pl-3 { padding-left: 1rem !important; }    .pr-3 { padding-right: 1rem !important; }
.pl-4 { padding-left: 1.5rem !important; }  .pr-4 { padding-right: 1.5rem !important; }
.pl-5 { padding-left: 3rem !important; }    .pr-5 { padding-right: 3rem !important; }

/* Boutons */
.btn-block { display: block; width: 100%; }
.btn-block + .btn-block { margin-top: .5rem; }
.btn-xs { padding: .1rem .35rem; font-size: .75rem; border-radius: .2rem; }

/* Badges (badge-* → bg-* en v5) */
.badge-pill { border-radius: 10rem; }
.badge-primary   { color: #fff; background-color: #0d6efd; }
.badge-secondary { color: #fff; background-color: #6c757d; }
.badge-success   { color: #fff; background-color: #198754; }
.badge-danger    { color: #fff; background-color: #dc3545; }
.badge-warning   { color: #000; background-color: #ffc107; }
.badge-info      { color: #000; background-color: #0dcaf0; }
.badge-light     { color: #000; background-color: #f8f9fa; }
.badge-dark      { color: #fff; background-color: #212529; }

/* Bouton de fermeture v4 (.close) */
.close { float: right; font-size: 1.5rem; font-weight: 700; line-height: 1; color: #000;
         text-shadow: 0 1px 0 #fff; opacity: .5; background: transparent; border: 0; padding: 0; }
.close:hover { opacity: .75; cursor: pointer; }
