/* Gif de chargement au lancement du dashboard */
._dash-loading {
    position: fixed;
    inset: 0;
    font-size: 0;
    background: url('images/load.gif') center / min(800px, 90vw) auto no-repeat;
}


/* Pour cacher les cartes */
.hide {
    position: absolute !important;
    left: -10000px !important;
}


/* Dropdown sélection des sites : on réduit le padding-x */
#tabs-dropdown-sites a {
    padding: 0.5rem 0.1rem;
}


/* Dropdown sélection des sites : sites sans donnée (grisés + étiquette, aussi une fois sélectionnés) */
.site-no-data {
    color: #95a5a6;
}
.no-data-label {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0 0.4rem;
    font-size: 0.75em;
    font-style: italic;
    line-height: 1.5;
    color: #7b8a8b;
    background-color: #ecf0f1;
    border-radius: 0.25rem;
    white-space: nowrap;
}


/* Onglets principaux du bloc graphique (dans l'en-tête de la carte) */
#card-tabs .nav-link {
    font-weight: 500;
}


/* Sélecteur de la vue (sous-onglets), au-dessus du bloc paramètres du graphique : même rendu que .map-switch */
.subtabs-selector .btn-group {
    display: flex;
    width: 100%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    border-radius: var(--bs-border-radius-sm, 0.25rem);
}
.subtabs-selector .form-check {
    flex: 1 1 0;
    min-height: 0;
    margin: 0;
    padding: 0;
}
.subtabs-selector .form-check + .form-check {
    margin-left: -1px;
}
.subtabs-selector .btn {
    width: 100%;
    white-space: nowrap;
    color: #2c3e50;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0;
    box-shadow: none;
}
.subtabs-selector .form-check:first-child .btn {
    border-top-left-radius: var(--bs-border-radius-sm, 0.25rem);
    border-bottom-left-radius: var(--bs-border-radius-sm, 0.25rem);
}
.subtabs-selector .form-check:last-child .btn {
    border-top-right-radius: var(--bs-border-radius-sm, 0.25rem);
    border-bottom-right-radius: var(--bs-border-radius-sm, 0.25rem);
}
.subtabs-selector .btn:hover {
    color: #2c3e50;
    background-color: #f8f9fa;
}
.subtabs-selector .btn.active,
.subtabs-selector .btn-check:checked + .btn {
    position: relative;
    z-index: 1;
    color: #fff;
    background-color: #2c3e50;
    border-color: #2c3e50;
}


/* Bloc carte + informations : même arrondi que les autres cartes, hauteur alignée sur le menu */
.map-panel {
    background-color: #fff;
    border-radius: var(--bs-border-radius, 0.375rem);
    overflow: hidden;
}
.map-col {
    position: relative;
}
.map-switch {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.map-switch .btn {
    color: #2c3e50;
    background-color: #fff;
    border-color: #ced4da;
}
.map-switch .btn:hover {
    background-color: #f8f9fa;
}
.map-switch .btn.active {
    color: #fff;
    background-color: #2c3e50;
    border-color: #2c3e50;
}
.infos-col {
    position: relative;
    border-left: 1px solid #dee2e6;
}
.infos-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
}
.infos-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}
.infos-content {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding-top: 0.5rem;
}
.info-subtitle {
    text-align: center;
    margin-bottom: 0.6rem;
}

/* Chiffres clés du site */
.info-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.info-stat {
    padding: 0.35rem 0.25rem;
    text-align: center;
    background-color: #f4f6f7;
    border-radius: var(--bs-border-radius, 0.375rem);
}
.info-stat-value {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: nowrap;
}
.info-stat-label {
    font-size: 0.72rem;
    color: #7b8a8b;
    line-height: 1.2;
}

/* Liste libellé / valeur */
.info-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 0.75rem;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.35;
}
.info-list dt {
    font-weight: 600;
    color: #7b8a8b;
}
.info-list dd {
    margin: 0;
}
.info-section-title {
    margin: 0.6rem 0 0.4rem;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    background-color: #f4f6f7;
    border-radius: var(--bs-border-radius, 0.375rem);
}

/* Codes du site */
.info-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
}
.info-code-label {
    margin-right: 0.25rem;
    font-size: 0.75rem;
    color: #7b8a8b;
}

/* Campagnes du site (année + protocoles réalisés) */
.info-campagne {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.info-campagne + .info-campagne {
    margin-top: 0.2rem;
}
.info-campagne-year {
    min-width: 2.5rem;
    font-weight: 600;
}
.info-flag {
    padding: 0 0.4rem;
    font-size: 0.75rem;
    border-radius: 1rem;
}
.info-flag-yes {
    color: #127a5c;
    background-color: #d4f3ea;
}
.info-flag-no {
    color: #95a5a6;
    background-color: #f4f6f7;
    text-decoration: line-through;
}


/* Dropdown (titre) dans le panneau à droite des cartes */
#title-infos {
    flex-shrink: 1;
    padding-right: 0px;
    padding-left: 0px;
}
#title-infos > .dash-dropdown {
    margin-right: 0.5rem !important;
    margin-left: 0.5rem !important;
}
#title-infos .Select-control {
    height: auto;
}
#title-infos .Select-menu-outer {
    margin-top: 0.5rem;
}
#title-infos .Select-arrow-zone {
    display: none;
}
#title-infos .Select-multi-value-wrapper > .Select-value {
    padding: 0px;
    font-weight: 500;
    line-height:1.2;
    font-size: 1.40625rem; /* Taille d'un titre h4 */
    position: static; /* Valeur par défaut de la propriété 'position' */
    white-space: normal; /* Valeur par défaut de la propriété 'white-space' */
}
#title-infos .Select-multi-value-wrapper > .Select-input {
    display: none !important;
}


/* Boutons "précédent"/"suivant" dans le panneau à droite des cartes */
#button-prev-infos, #button-next-infos {
    flex-shrink: 0;
    width: auto;
}


/* Boutons collapse affichage paramètres données/visuels */
.collapse-btn, .collapse-btn:hover, .collapse-btn:active, .collapse-btn:focus {
    font-size: 1.05rem;
    padding: 0;
    text-decoration: none;
    border: none;
    box-shadow: none;
    font-weight: 500; /* Propriété d'un titre h5 */
    line-height: 1.2; /* Propriété d'un titre h5 */
}


/* Modification du padding des sliders des strates */
.padding-slider-strates {
    padding: 25px 0px !important;
}


/* Groupe de boutons pour sélection du type de graphique/distribution (onglets 1 et 2) */
.radio-group .form-check {
    padding-left: 0;
}
.radio-group .form-check .form-check-label {
    border: none;
    box-shadow: none;
}
.radio-group .btn-group > .form-check:not(:last-child) > .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.radio-group .btn-group > .form-check:not(:first-child) > .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}


/* Pour enlever la dernière margin d'un groupe de cases à cocher / boutons radio */
.delete-last-margin > div:last-child {
    margin-right: 0;
}


/* Pour enlever la margin-bottom d'un switch */
.delete-margin-bottom > div:first-child {
    margin-bottom: 0;
}


/* Pour ouvrir le menu d'un dropdown vers le haut plutôt que vers le bas */
/* À supprimer quand Dash aura ajouté la fonctionnalité : https://github.com/JedWatson/react-select/issues/1602 */
.open-dropdown-top .Select-menu-outer {
    top: auto;
    bottom: 100%;
    border-bottom-right-radius: 0px;
    border-bottom-left-radius: 0px;
    border-top-right-radius: 4px;
    border-top-left-radius: 4px;
    border: 1px solid #ccc;
    border-bottom-color: #e6e6e6;
}

.open-dropdown-top.is-open > .Select-control {
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 4px;
    border-top-right-radius: 0px;
    border-top-left-radius: 0px;
    border-color: #d9d9d9 #ccc #b3b3b3;
}


/* Pour aligner sur une ligne à l'horizontal un dropdown et son label */
.param-dropdown-align {
display: flex;
flex-wrap: wrap;
align-items: center
}

/* Animation au chargement des graphiques */
.plotlybars {
  padding: 0 20px;
  vertical-align: bottom;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.plotlybars-wrapper {
  width: 200px;
  height: 150px;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.plotlybars-text {
  color: #2C3E50;
  font-family: 'Open Sans', verdana, arial, sans-serif;
  font-size: 80%;
  text-align: center;
  margin-top: 5px;
}

.plotlybars-bar {
  background-color: #79A1C3;
  height: 100%;
  width: 13.3%;
  position: absolute;
  transform: translateZ(0);
  animation-duration: 2s;
  animation-iteration-count: infinite;
  animation-direction: normal;
  animation-timing-function: linear;
}

.b1 { left: 0%; top: 88%; animation-name: b1; }
.b2 { left: 14.3%; top: 76%; animation-name: b2; }
.b3 { left: 28.6%; top: 16%; animation-name: b3; }
.b4 { left: 42.9%; top: 40%; animation-name: b4; }
.b5 { left: 57.2%; top: 26%; animation-name: b5; }
.b6 { left: 71.5%; top: 67%; animation-name: b6; }
.b7 { left: 85.8%; top: 89%; animation-name: b7; }

@keyframes b1 {
  0% { top: 88%; }
  44% { top: 0%; }
  94% { top: 100%; }
  100% { top: 88%; }
}

@keyframes b2 {
  0% { top: 76%; }
  38% { top: 0%; }
  88% { top: 100%; }
  100% { top: 76%; }
}

@keyframes b3 {
  0% { top: 16%; }
  8% { top: 0%; }
  58% { top: 100%; }
  100% { top: 16%; }
}

@keyframes b4 {
  0% { top: 40%; }
  20% { top: 0%; }
  70% { top: 100%; }
  100% { top: 40%; }
}

@keyframes b5 {
  0% { top: 26%; }
  13% { top: 0%; }
  63% { top: 100%; }
  100% { top: 26%; }
}

@keyframes b6 {
  0% { top: 67%; }
  33.5% { top: 0%; }
  83% { top: 100%; }
  100% { top: 67%; }
}

@keyframes b7 {
  0% { top: 89%; }
  44.5% { top: 0%; }
  94.5% { top: 100%; }
  100% { top: 89%; }
}