/*
 * Styles propres a l'application, charges apres le theme Modernize.
 */

/* ---------- Gabarits ---------- */

.left-sidebar .brand-logo { min-height: 80px; }
.left-sidebar .bpa-logo { max-height: 52px; width: auto; }

.bpa-avatar { object-fit: contain; background: #fff; }

.bpa-pied { border-top: 1px solid var(--bs-border-color); margin-top: 24px; }


/* ---------- Classes Bootstrap 4 encore presentes dans les vues ----------
 * Le theme est en Bootstrap 5, qui a renomme ou retire ces classes. Elles
 * sont redonnees ici le temps de reprendre les vues, plutot que de laisser
 * des marges et des cases a cocher sans style.
 */

.ml-2 { margin-left: .5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.mr-2 { margin-right: .5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.pr-2 { padding-right: .5rem !important; }
.text-left { text-align: left !important; }
.font-weight-normal { font-weight: 400 !important; }
.btn-block { display: block; width: 100%; }
.form-group { margin-bottom: 1rem; }
.form-row { display: flex; flex-wrap: wrap; margin-right: -5px; margin-left: -5px; }
.form-row > [class*="col"] { padding-right: 5px; padding-left: 5px; }

.badge-pill { border-radius: 50rem; }
.badge-success { background-color: var(--bs-success); color: #fff; }
.badge-danger  { background-color: var(--bs-danger);  color: #fff; }
.badge-warning { background-color: var(--bs-warning); color: #fff; }
.badge-info    { background-color: var(--bs-info);    color: #fff; }

/* Bouton de fermeture des modales Bootstrap 4 (<button class="close">×</button>). */
button.close {
    padding: 0; background: transparent; border: 0; float: right;
    font-size: 1.5rem; font-weight: 700; line-height: 1; color: #000; opacity: .5;
}
button.close:hover { opacity: .75; }

/* Cases a cocher Bootstrap 4 (custom-control) rendues comme form-check. */
.custom-control { position: relative; display: block; min-height: 1.5rem; padding-left: 1.75rem; }
.custom-control-input { position: absolute; left: 0; top: .2rem; width: 1.1rem; height: 1.1rem; margin: 0; }
.custom-control-label { cursor: pointer; margin-bottom: 0; }

/* Un libelle de menu long passe a la ligne au lieu de deborder du panneau. */
.sidebar-nav ul .sidebar-item .sidebar-link { white-space: normal; }

/* Select2 a la hauteur et a la bordure des champs du theme (form-control : 39px, 16px, 7px).
   Prefixe body : select2.min.css est charge par la vue, apres ce fichier. */
body .select2-container { width: 100% !important; }
body .select2-container--default .select2-selection--single {
    height: 39px; padding: 0;
    border: 1px solid var(--bs-border-color); border-radius: 7px;
}
body .select2-container--default .select2-selection--single .select2-selection__rendered {
    height: 37px; line-height: 37px; padding-left: 16px; border: 0; color: var(--bs-body-color);
}
body .select2-container--default .select2-selection--single .select2-selection__arrow { height: 37px; right: 8px; }
body .select2-container--default.select2-container--focus .select2-selection--single,
body .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--bs-primary); }
body .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: var(--bs-primary); }

/* SweetAlert 2.1 : bouton de confirmation aux couleurs du theme, au lieu
   du bleu par defaut ; le bouton « danger » garde sa couleur. */
body .swal-button:not(.swal-button--danger):not(.swal-button--cancel) { background-color: var(--bs-primary); }
body .swal-button:not(.swal-button--danger):not(.swal-button--cancel):not([disabled]):hover { background-color: var(--bs-primary); filter: brightness(.92); }
body .swal-button:focus { box-shadow: 0 0 0 1px #fff, 0 0 0 3px rgba(14, 138, 12, .35); }
