/* Import des styles externalisés de CTableBuilder.js */
/* @import url('./table-builder.css'); */

/* ====================================================
 * BOARD.CSS - Styles principaux pour l'interface LIM
 * ====================================================*/


h2.services-tab-title {
  text-shadow: 0 0 60px white;
}

section#board-content {
  z-index: 1;
  position: relative;
}

*,
*:before,
*:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

/* ==================
 * LAYOUT - GRID SYSTEM
 * ================== */

h1.board-title {
  text-align: right;
  margin-right: 70px;
}

.board-row {
  margin-right: -15px;
  margin-left: -15px;
  display: flex;
  flex-direction: column;
}

.board-col-left,
.board-col-right,
.board-col-center {
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
  width: 50%;
  margin: 0.5rem;
}

.board-col-left {
  float: left;
}

.board-col-right {
  float: right;
}

.board-col-center {
  float: left;
  width: 100%;
}

.pull-left {
  float: left;
}

.pull-right {
  float: right;
}

/* ==================
 * SERVICES CONTAINER
 * ================== */
#services-container.content {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  min-height: auto;
  gap: 20px;
}

#services-container.content section {
  width: 100%;
  height: fit-content;
}

#services-container.content #section-client {
  flex: 2;
  min-width: 400px;
}

#services-container.content #section-users {
  flex: 3;
  min-width: 500px;
}

/* Styles pour les filtres d'en-tête avec Select2 - Version compacte */
.table-header-filters-container {
  padding: 0px 0px 22px 10px;
  border-bottom: 1px solid #ddd;
  background-color: #f9f9f9;
  display: flex;
  flex-wrap: nowrap;
  gap: 1%;
  align-items: flex-start;
  overflow-x: auto;
  white-space: nowrap;
  box-shadow: 0 -20px 20px #f9f9f9;
}

.table-header-filters-container>div {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-width: 200px;
  flex-direction: column;
}

.table-header-filters-container label {
  font-weight: bold;
  margin: 0;
  white-space: nowrap;
  font-size: 11px;
  min-width: 60px;
}

.table-header-filter-select {
  min-width: 200px;
}

label.switch-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.date-range-container label {
  font-weight: bold;
  margin-right: 10px;
}

.date-range-container .date-range-inputs {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* STYLES GLOBAUX POUR TOUS LES SELECT2 - Basés sur le style des filtres de tableau */
.select2-container {
  min-width: 120px;
  max-width: 180px;
}

.select2-selection--multiple {
  min-height: 28px;
  max-height: 32px;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 2px 4px;
  overflow: hidden;
  transition: max-height 0.3s ease;
  position: relative;
}

/* Enlever le padding-right ajouté par Select2 pour le bouton clear */
.select2-selection--multiple.select2-selection--clearable {
  padding-right: 0 !important;
}

/* Hauteur adaptative au survol et au focus */
.select2-container:hover .select2-selection--multiple,
.select2-container.select2-container--focus .select2-selection--multiple,
.select2-container.select2-container--open .select2-selection--multiple {
  max-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
}

.select2:hover .select2-container--default .select2-selection--multiple {
  border-color: var(--primary-color);
}

.select2-container--default:hover .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: var(--primary-color);
}

.select2-selection--single {
  height: 28px !important;
  border: 1px solid #ccc;
  border-radius: 3px;
}

/* Conteneur des choix - affichage flexible avec wrap */
.select2-selection--multiple .select2-selection__rendered {
  display: flex !important;
  flex-wrap: wrap;
  /* Permettre le wrap en ligne puis en colonne */
  align-items: flex-start;
  padding: 0;
  margin: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__clear {
  position: sticky !important;
  top: 0 !important;
  right: 0 !important;
  float: right !important;
  z-index: 10 !important;
  padding: 0;
  margin: 0;
  margin-right: 10px;
  margin-top: 2px;
  color: var(--primary-color);
  background: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.select2-container--default .select2-selection--multiple .select2-selection__clear:hover {
  color: var(--secondary-color);
  background: #f8f9fa;
  cursor: pointer;
}

/* Style pour le champ de recherche dans le multiple select */
.select2-search--inline {
  margin: 0;
  order: 999;
  /* S'assurer qu'il apparaît en dernier */
  align-self: flex-end;
  display: flex;
}

.select2-search--inline .select2-search__field {
  width: 100%;
  min-width: 60px;
}

/* Scrollbar personnalisée pour les sélections multiples */
.select2-selection--multiple::-webkit-scrollbar,
.select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar {
  width: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 22px;
  padding-left: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #2c3e50;
}

fieldset#main-fields .select2-selection__rendered {
  line-height: 24px;
}

.select2-selection__rendered#select2-Date-container {
  line-height: 24px;
}

.select2-selection__arrow {
  top: 1px;
  right: 2px;
}

.select2-dropdown {
  border-radius: 10px;
  color: var(--tertiary-color);
  z-index: 9000;
  min-width: fit-content !important;
}
.select2-container--open .select2-dropdown--below{
  border-top: 1px solid !important;
}

.select2-results li:last-of-type {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.select2-search--dropdown input.select2-search__field {
  border-radius: 7px;
}

/* Style pour le compteur de sélections supplémentaires */
.selection-counter {
  background-color: #6c757d;
  color: white;
  margin: 1px 2px 1px 0;
  font-size: 10px;
  line-height: 16px;
  height: 18px;
  padding: 1px 6px;
  border-radius: 3px;
  display: inline-block;
  cursor: pointer;
  font-weight: bold;
}

.selection-counter:hover {
  background-color: #5a6268;
}

/* Animation douce pour l'apparition/disparition des tags cachés */
.select2-selection__choice.hidden-choice {
  display: none;
}

.select2-selection__choice.show-on-hover {
  animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Tooltip pour afficher tous les éléments sélectionnés */
.selection-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #333;
  color: white;
  padding: 8px;
  border-radius: 4px;
  font-size: 11px;
  z-index: 1000;
  max-height: 150px;
  overflow-y: auto;
  word-wrap: break-word;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  line-height: 1.4;
}

/* Style pour les tags dans le multiple select - Version compacte avec ellipses */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  color: white;
  margin: 1px 2px 1px 0;
  font-size: 10px;
  line-height: 16px;
  height: 18px;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  position: relative;
  border-top-left-radius: 9px;
  border-bottom-left-radius: 9px;
  background-color: var(--primary-color);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  margin-right: 2px;
  font-size: 10px;
  line-height: 16px;
  vertical-align: top;
  color: #ffffff;
}

/* Style pour les inputs texte compacts */
.table-header-filters-container .form-control {
  min-width: 120px;
  max-width: 150px;
  padding: 2px 6px;
  border: 1px solid #ccc;
  /* border-radius: 3px; */
  font-size: 11px;
  height: 20px;
}

/* Bouton reset compact */
.table-header-filters-container .btn {
  margin-left: auto;
  padding: 2px 8px;
  font-size: 10px;
  height: 20px;
  flex-shrink: 0;
}

/* Style pour le dropdown Select2 */
.select2-container--default .select2-results__option {
  font-size: 11px;
  padding: 4px 8px;
}

/* Supprimer le padding des options qui contiennent des tooltips */
.select2-container--default .select2-results__option:has(.custom-date-tooltip-target),
.select2-container--default .select2-results__option:has(.custom-date-tooltip-target-dashboard) {
  padding: 0;
}

.select2-container--default .select2-search--inline .select2-search__field {
  font-size: 11px;
  line-height: 16px;
  color: var(--tertiary-color);
}

/* EXCEPTIONS POUR CERTAINS CONTEXTES */
/* Dashboard - Légèrement plus grand mais même style */
.dashboard-controls .select2-container {
  min-width: 150px;
  max-width: 300px;
  transition: all 0.2s ease;
  border: 0px;
  box-shadow: 3px -3px 0px var(--accent-color-select) !important;
}

.select2-container .select2-search__field {
  font-family: var(--font-main);
  font-weight: bold;
}
.select2-container .select2-search--inline .select2-search__field {
  height: 17px;
}

.dashboard-controls .select2-container,
.select2-selection.select2-selection--multiple {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: -4px 4px 0 rgba(1, 42, 83, 0.2) !important;
  transition: all .2s ease;
}

.dashboard-controls .select2-container:hover,
.select2-selection.select2-selection--multiple:hover {
  box-shadow: -4px 4px 0 rgba(1, 42, 83, 1) !important;
}


.dashboard-controls .select2-selection--multiple {
  max-height: 28px;
}

.dashboard-controls .select2-container:hover .select2-selection--multiple,
.dashboard-controls .select2-container.select2-container--focus .select2-selection--multiple,
.dashboard-controls .select2-container.select2-container--open .select2-selection--multiple {
  max-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Placeholder lorsque le ciblage contexte est indisponible */
.target-map-placeholder {
  border: 1px dotted #ff7572;
  color: #ff7572;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.3;
  margin-left: 6px;
  display: inline-block;
  background: rgba(217, 83, 79, 0.06);
  width: 100%;
  text-align: center;
}

/* Style pour l'icône dans le placeholder */
.target-map-placeholder i {
  margin-right: 6px;
  font-size: 13px;
  vertical-align: middle;
}

.past-icone {
  text-shadow: 0px 0px 3px rgb(0, 0, 0);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 30px;
  width: 30px;
  font-size: 15px;
  background: radial-gradient(circle, #3C8DBC3B 60%, #012a531c 60%);
  line-height: 30px;
  outline: 2px solid rgba(0, 0, 0, 0.3);
  outline-offset: -2px;
  box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3);
  padding: 10px;
  color: white;
}

.level-list-small {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.past-icone.past-icone-small {
  height: 20px;
  width: 20px;
  padding: 13px;
  font-size: 13px;
}

/* Centrer les icônes dans les cellules Tabulator sans casser le layout */
/* Utiliser margin auto sur les icônes (elles ont déjà une largeur définie) */
.tabulator-cell .past-icone,
.tabulator-cell .past-icone-small {
  margin-left: auto;
  margin-right: auto;
}

/* Responsive - sur petits écrans, permettre le wrap */
@media (max-width: 768px) {
  .table-header-filters-container {
    white-space: normal;
  }

  .table-header-filters-container>div {
    min-width: 120px;
  }

  .select2-container {
    min-width: 100px;
    max-width: 120px;
  }

  /* .dashboard-controls .select2-container {
    min-width: 120px;
    max-width: 150px;
  } */
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  top: 45%;
}


/* MODULE BOX */
.box {
  padding: 0.2rem;
  padding-bottom: 0;
  margin-bottom: 0;
  border: 0;
  border-radius: 10px;
}

.box-open {
  position: relative;
}

.box-header {
  display: block;
  padding: 10px;
  position: absolute;
  z-index: 10;
  text-align: center;
  width: 100%;
  pointer-events: none;
  user-select: none;
}


.box.box-close .box-header {
  color: var(--primary-color);
}

.box.box-open .box-header {
  color: var(--secondary-color);
  text-shadow: 2px 2px 0 rgb(255, 255, 255);
}

.box-header>.box-title {
  font-size: 0.75rem;
  line-height: 20px;
}

/* .import-tabs-custom {
  margin: 0 auto 1.5rem auto;
} */


/* TAB MODULES */
.nav-tabs-custom {
  margin: 5px;
  border: 1px solid rgba(66, 139, 202, .25);
  font-family: var(--font-title);
  border-radius: 10px;
  overflow: hidden;
}

.nav-tabs-import {
  max-width: 60vw;
  min-width: 600px;
  width: 100%;
}

.nav-tabs-custom .nav {
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.nav-tabs-custom .nav>li>a {
  position: relative;
  display: block;
  padding: 10px 15px;
}

.nav-tabs-custom .nav-tabs>li.header {
  font-size: 0.7rem;
}

.nav-tabs-custom .nav-tabs>li>a {
  margin-right: 2px;
  font-size: 0.7rem;
  line-height: 1.428571429;
  border: 1px solid transparent;
  border-radius: 4px 4px 0 0;
  text-decoration: none;
}

.nav-tabs-custom>box-body>nav {
  padding-left: 0;
  list-style: none;
}

.nav-tabs-custom>box-body>nav>li {
  position: relative;
  display: block;
}

.tab-content {
  font-size: 0.6rem;
  border: 1px solid rgba(18, 236, 243, 0.25);
}

.tab-content>.tab-pane {
  display: none;
  visibility: hidden;
}

.tab-content>.active {
  display: block;
  visibility: visible;
}

.pull-left {
  float: left;
}

.pull-right {
  float: right;
}

.box-footer {
  font-family: var(--font-title);
  background-color: #12ecf3;
  display: inline-block;
  width: 100%;
  height: 2.3rem;
  text-align: center;
}

.box-footer a {
  color: #428bca;
  text-decoration: none;
}

.small-box {
  margin-bottom: 0.2rem;
}

.small-box h3 {
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.small-box>.inner {
  color: rgba(255, 255, 255, 0.75);
  font-size: .5rem;
  padding: 0.2rem 0.5rem;
}

.small-box>.inner-dark {
  font-size: .5rem;
  padding: 0.2rem 0.5rem;
  color: rgba(0, 0, 0, 0.75);
}

.small-box-footer {
  font-size: .5rem;
  /*text-decoration: none;*/
}

.small-box>.small-box-footer {
  background-color: rgba(0, 0, 0, 0.1);
  color: rgba(255, 255, 255, 0.8);
  display: block;
  padding: 3px 0;
  position: relative;
  margin: auto;
  text-align: center;
  text-decoration: none;
  z-index: 1;
  min-height: 1rem;
}

.small-box>.small-box-footer:hover {
  background-color: rgba(0, 0, 0, 0.15);
  color: #fff;
}


.small-box-footer>span {
  height: 1rem;
  width: 1rem;
  margin-left: 0.8rem;
  margin-bottom: -0.2rem;
  display: inline-block;
}

.small-box-footer>i.button-more {
  width: 1rem;
  height: 1rem;
  background-image: url(/assets/IMAGES/GUI/BUTTONS/b_more.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem;
  margin: 0 0.25rem;
  padding: 10px;
}

.small-box .icon>i.lim {
  width: 3rem;
  height: 3rem;
  top: 0.8rem;
  right: 0.25rem;
  opacity: 0.25;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.lim-data {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-data.png);
}

.lim-mat {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-mat.png);
}

.lim-site {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-site.svg);
}

.lim-cat {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-cat.svg);
}

.lim-water {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-water.png);
}

.lim-uwater {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-uwater.png);
}

.lim-noise {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-noise.png);
}

.lim-air {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-air.png);
}

.lim-ground {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-ground.png);
}

.lim-stream {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-stream.png);
}

.lim-probability {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-probability.png);
}

.lim-picture {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-picture.svg);
}

.lim-alteration {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-alteration.png);
}

.lim-risk {
  background-image: url(/assets/IMAGES/GUI/ICONS/lim-risk.png);
}

.small-box.bg-white>.inner {
  color: #d2d6de;
  /*color: var(--tertiary-color);*/
}


.small-box p {
  font-size: 0.5rem;
}

.small-box p>small {
  color: #f8f9fa;
  display: block;
  font-size: .9rem;
  margin-top: 5px;
}

.small-box h3,
.small-box p {
  z-index: 5;
}

.small-box .icon {
  color: rgba(0, 0, 0, 0.15);
  z-index: 0;
  top: -0.1rem;
  right: 1rem;
}

.small-box .icon>i {
  font-size: 90px;
  position: absolute;
  right: 15px;
  top: 15px;
  transition: -webkit-transform 0.3s linear;
  transition: transform 0.3s linear;
  transition: transform 0.3s linear, -webkit-transform 0.3s linear;
}

.small-box .icon>i.fa,
.small-box .icon>i.fas,
.small-box .icon>i.far,
.small-box .icon>i.fab,
.small-box .icon>i.fal,
.small-box .icon>i.fad,
.small-box .icon>i.ion {
  font-size: 70px;
  top: 20px;
}

.small-box:hover {
  text-decoration: none;
}

.small-box:hover .icon>i,
.small-box:hover .icon>i.fa,
.small-box:hover .icon>i.fas,
.small-box:hover .icon>i.far,
.small-box:hover .icon>i.fab,
.small-box:hover .icon>i.fal,
.small-box:hover .icon>i.fad,
.small-box:hover .icon>i.ion {
  -webkit-transform: scale(1.1);
  transform: scale(1.1);
}

/* ==================
 * SCORE RATING SYSTEM
 * ================== */

/* Conteneur principal pour l'éditeur de score */
.score-editor-container {
  padding: 20px;
  text-align: center;
}

.score-info {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 5px;
}

.score-info h4 {
  margin: 0 0 10px 0;
  color: #2c3e50;
}

.score-info p {
  margin: 5px 0;
  color: #5a6c7d;
}

/* Système de notation par étoiles/icônes */
.star-rating {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 20px 0;
  padding: 15px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 4px 8px 0px rgba(0, 0, 0, 0.1);
}

.star-rating .star {
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.star-rating .star:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.star-rating .star i {
  font-size: 20px;
  transition: all 0.3s ease;
}

/* Animation des icônes au survol */
.star-rating .star i:hover {
  transform: scale(1.2);
}

/* États actifs avec animations */
.star-rating .star.active i {
  animation: pulseGlow 0.6s ease-in-out;
}

@keyframes pulseGlow {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Styles spécifiques pour les scores hydro (bleu) */
.hydro-score .star-rating .star i {
  color: #3498db;
  /* Bleu pour l'eau */
}

.hydro-score .star-rating .star.active i {
  color: #2980b9;
  /* Bleu plus foncé pour les étoiles actives */
  text-shadow: 0 0 8px rgba(52, 152, 219, 0.5);
}

.hydro-score .star-rating .star.half i {
  color: #5dade2;
  /* Bleu moyen pour les demi-étoiles */
}

/* Styles spécifiques pour les scores obstruction (orange) */
.obstruction-score .star-rating .star i {
  color: #508d0a;
  /* Orange pour l'obstruction */
}

.obstruction-score .star-rating .star.active i {
  color: #2a5707;
  /* Orange plus foncé pour les étoiles actives */
  text-shadow: 0 0 8px rgba(42, 87, 7, 0.5);
}

.obstruction-score .star-rating .star.half i {
  color: #326808;
  /* Orange moyen pour les demi-étoiles */
}

/* Styles spécifiques pour les scores risk (orange) */
.risk-score .star-rating .star i {
  color: #f39c12;
  /* Orange pour le risque */
}

.risk-score .star-rating .star.active i {
  color: #e67e22;
  /* Orange plus foncé pour les étoiles actives */
  text-shadow: 0 0 8px rgba(243, 156, 18, 0.5);
}

.risk-score .star-rating .star.half i {
  color: #f7c52d;
  /* Orange moyen pour les demi-étoiles */
}

/* Affichage du score */
.score-display {
  margin: 15px 0;
  font-size: 24px;
  font-weight: bold;
  color: #2c3e50;
}

/* Couleur par défaut du score (hydro) */
.score-display .current-score {
  color: black;
}

/* Couleurs spécifiques selon le type de score */
.hydro-score .score-display .current-score {
  color: #3498db;
  /* Bleu pour l'eau */
}

.risk-score .score-display .current-score {
  color: #f39c12;
  /* Orange pour le risque */
}

.obstruction-score .score-display .current-score {
  color: #4e850f;
  /* Vert pour l'obstruction */
}

/* Slider de score */
.score-slider {
  width: 100%;
  max-width: 300px;
  margin: 20px auto;
  display: block;
}

.hydro-score .score-slider {
  accent-color: #3498db;
  /* Bleu pour hydro */
}

.risk-score .score-slider {
  accent-color: #f39c12;
  /* Orange pour risk */
}

.obstruction-score .score-slider {
  accent-color: #4e850f;
  /* Vert pour obstruction */
}

/* Boutons d'action */
.score-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
}


/* MODULES FOR MATERIAL VIGILANCE */
#mod_vigilance_mat div {
  background-color: #fff;
}

.box-body.border-radius-none>div {
  position: relative;
  display: inline-block;
  width: 100%;
}

.bg-primary {
  background-color: #007bff;
}

a.bg-primary:hover,
a.bg-primary:focus,
button.bg-primary:hover,
button.bg-primary:focus {
  background-color: #0062cc;
}

.bg-secondary {
  background-color: #6c757d;
}

a.bg-secondary:hover,
a.bg-secondary:focus,
button.bg-secondary:hover,
button.bg-secondary:focus {
  background-color: #545b62;
}

.bg-success {
  background-color: #28a745;
}

a.bg-success:hover,
a.bg-success:focus,
button.bg-success:hover,
button.bg-success:focus {
  background-color: #1e7e34;
}

.bg-info {
  background-color: #17a2b8;
}

a.bg-info:hover,
a.bg-info:focus,
button.bg-info:hover,
button.bg-info:focus {
  background-color: #117a8b;
}

.bg-warning {
  background-color: #ffc107;
}

a.bg-warning:hover,
a.bg-warning:focus,
button.bg-warning:hover,
button.bg-warning:focus {
  background-color: #d39e00;
}

.bg-danger {
  background-color: #dc3545;
}

a.bg-danger:hover,
a.bg-danger:focus,
button.bg-danger:hover,
button.bg-danger:focus {
  background-color: #bd2130;
}

.bg-light {
  background-color: #f8f9fa;
}

a.bg-light:hover,
a.bg-light:focus,
button.bg-light:hover,
button.bg-light:focus {
  background-color: #dae0e5;
}

.bg-dark {
  background-color: #ff0000;
}

a.bg-dark:hover,
a.bg-dark:focus,
button.bg-dark:hover,
button.bg-dark:focus {
  background-color: #bb1f1f;
}

.bg-white {
  background-color: #fff;
}

.bg-transparent {
  background-color: transparent;
}

.date-range-inputs {
  display: flex;
}

.date-controls-container {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  background-color: #f9f9f9;
}

.date-controls-container .date-list-selector {
  display: flex;
  width: 100%;
  gap: 10px;
  align-items: center;
}

/*************************************************************************************************
* 
*                                                 BOOTSTRAP
*
**************************************************************************************************/

.col-xs-1,
.col-xs-2,
.col-xs-3,
.col-xs-4,
.col-xs-5,
.col-xs-6,
.col-xs-7,
.col-xs-8,
.col-xs-9,
.col-xs-10,
.col-xs-11,
.col-xs-12,
.col-sm-1,
.col-sm-2,
.col-sm-3,
.col-sm-4,
.col-sm-5,
.col-sm-6,
.col-sm-7,
.col-sm-8,
.col-sm-9,
.col-sm-10,
.col-sm-11,
.col-sm-12,
.col-md-1,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-9,
.col-md-10,
.col-md-11,
.col-md-12,
.col-lg-1,
.col-lg-2,
.col-lg-3,
.col-lg-4,
.col-lg-5,
.col-lg-6,
.col-lg-7,
.col-lg-8,
.col-lg-9,
.col-lg-10,
.col-lg-11,
.col-lg-12 {
  position: relative;
  min-height: 1px;
  padding-right: 15px;
  padding-left: 15px;
}

.col-xs-1,
.col-xs-2,
.col-xs-3,
.col-xs-4,
.col-xs-5,
.col-xs-6,
.col-xs-7,
.col-xs-8,
.col-xs-9,
.col-xs-10,
.col-xs-11 {
  float: left;
}

.col-xs-1 {
  width: 8.333333333333332%;
}

.col-xs-2 {
  width: 16.666666666666664%;
}

.col-xs-3 {
  width: 25%;
}

.col-xs-4 {
  width: 33.33333333333333%;
}

.col-xs-5 {
  width: 41.66666666666667%;
}

.col-xs-6 {
  width: 50%;
}

.col-xs-7 {
  width: 58.333333333333336%;
}

.col-xs-8 {
  width: 66.66666666666666%;
}

.col-xs-9 {
  width: 75%;
}

.col-xs-10 {
  width: 83.33333333333334%;
}

.col-xs-11 {
  width: 91.66666666666666%;
}

.col-xs-12 {
  width: 100%;
}

@media (min-width: 768px) {
  .container {
    max-width: 750px;
  }

  .col-sm-1,
  .col-sm-2,
  .col-sm-3,
  .col-sm-4,
  .col-sm-5,
  .col-sm-6,
  .col-sm-7,
  .col-sm-8,
  .col-sm-9,
  .col-sm-10,
  .col-sm-11 {
    float: left;
  }

  .col-sm-1 {
    width: 8.333333333333332%;
  }

  .col-sm-2 {
    width: 16.666666666666664%;
  }

  .col-sm-3 {
    width: 25%;
  }

  .col-sm-4 {
    width: 33.33333333333333%;
  }

  .col-sm-5 {
    width: 41.66666666666667%;
  }

  .col-sm-6 {
    width: 50%;
  }

  .col-sm-7 {
    width: 58.333333333333336%;
  }

  .col-sm-8 {
    width: 66.66666666666666%;
  }

  .col-sm-9 {
    width: 75%;
  }

  .col-sm-10 {
    width: 83.33333333333334%;
  }

  .col-sm-11 {
    width: 91.66666666666666%;
  }

  .col-sm-12 {
    width: 100%;
  }

  .col-sm-push-1 {
    left: 8.333333333333332%;
  }

  .col-sm-push-2 {
    left: 16.666666666666664%;
  }

  .col-sm-push-3 {
    left: 25%;
  }

  .col-sm-push-4 {
    left: 33.33333333333333%;
  }

  .col-sm-push-5 {
    left: 41.66666666666667%;
  }

  .col-sm-push-6 {
    left: 50%;
  }

  .col-sm-push-7 {
    left: 58.333333333333336%;
  }

  .col-sm-push-8 {
    left: 66.66666666666666%;
  }

  .col-sm-push-9 {
    left: 75%;
  }

  .col-sm-push-10 {
    left: 83.33333333333334%;
  }

  .col-sm-push-11 {
    left: 91.66666666666666%;
  }

  .col-sm-pull-1 {
    right: 8.333333333333332%;
  }

  .col-sm-pull-2 {
    right: 16.666666666666664%;
  }

  .col-sm-pull-3 {
    right: 25%;
  }

  .col-sm-pull-4 {
    right: 33.33333333333333%;
  }

  .col-sm-pull-5 {
    right: 41.66666666666667%;
  }

  .col-sm-pull-6 {
    right: 50%;
  }

  .col-sm-pull-7 {
    right: 58.333333333333336%;
  }

  .col-sm-pull-8 {
    right: 66.66666666666666%;
  }

  .col-sm-pull-9 {
    right: 75%;
  }

  .col-sm-pull-10 {
    right: 83.33333333333334%;
  }

  .col-sm-pull-11 {
    right: 91.66666666666666%;
  }

  .col-sm-offset-1 {
    margin-left: 8.333333333333332%;
  }

  .col-sm-offset-2 {
    margin-left: 16.666666666666664%;
  }

  .col-sm-offset-3 {
    margin-left: 25%;
  }

  .col-sm-offset-4 {
    margin-left: 33.33333333333333%;
  }

  .col-sm-offset-5 {
    margin-left: 41.66666666666667%;
  }

  .col-sm-offset-6 {
    margin-left: 50%;
  }

  .col-sm-offset-7 {
    margin-left: 58.333333333333336%;
  }

  .col-sm-offset-8 {
    margin-left: 66.66666666666666%;
  }

  .col-sm-offset-9 {
    margin-left: 75%;
  }

  .col-sm-offset-10 {
    margin-left: 83.33333333333334%;
  }

  .col-sm-offset-11 {
    margin-left: 91.66666666666666%;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 970px;
  }

  .col-md-1,
  .col-md-2,
  .col-md-3,
  .col-md-4,
  .col-md-5,
  .col-md-6,
  .col-md-7,
  .col-md-8,
  .col-md-9,
  .col-md-10,
  .col-md-11 {
    float: left;
  }

  .col-md-1 {
    width: 8.333333333333332%;
  }

  .col-md-2 {
    width: 16.666666666666664%;
  }

  .col-md-3 {
    width: 25%;
  }

  .col-md-4 {
    width: 33.33333333333333%;
  }

  .col-md-5 {
    width: 41.66666666666667%;
  }

  .col-md-6 {
    width: 50%;
  }

  .col-md-7 {
    width: 58.333333333333336%;
  }

  .col-md-8 {
    width: 66.66666666666666%;
  }

  .col-md-9 {
    width: 75%;
  }

  .col-md-10 {
    width: 83.33333333333334%;
  }

  .col-md-11 {
    width: 91.66666666666666%;
  }

  .col-md-12 {
    width: 100%;
  }

  .col-md-push-0 {
    left: auto;
  }

  .col-md-push-1 {
    left: 8.333333333333332%;
  }

  .col-md-push-2 {
    left: 16.666666666666664%;
  }

  .col-md-push-3 {
    left: 25%;
  }

  .col-md-push-4 {
    left: 33.33333333333333%;
  }

  .col-md-push-5 {
    left: 41.66666666666667%;
  }

  .col-md-push-6 {
    left: 50%;
  }

  .col-md-push-7 {
    left: 58.333333333333336%;
  }

  .col-md-push-8 {
    left: 66.66666666666666%;
  }

  .col-md-push-9 {
    left: 75%;
  }

  .col-md-push-10 {
    left: 83.33333333333334%;
  }

  .col-md-push-11 {
    left: 91.66666666666666%;
  }

  .col-md-pull-0 {
    right: auto;
  }

  .col-md-pull-1 {
    right: 8.333333333333332%;
  }

  .col-md-pull-2 {
    right: 16.666666666666664%;
  }

  .col-md-pull-3 {
    right: 25%;
  }

  .col-md-pull-4 {
    right: 33.33333333333333%;
  }

  .col-md-pull-5 {
    right: 41.66666666666667%;
  }

  .col-md-pull-6 {
    right: 50%;
  }

  .col-md-pull-7 {
    right: 58.333333333333336%;
  }

  .col-md-pull-8 {
    right: 66.66666666666666%;
  }

  .col-md-pull-9 {
    right: 75%;
  }

  .col-md-pull-10 {
    right: 83.33333333333334%;
  }

  .col-md-pull-11 {
    right: 91.66666666666666%;
  }

  .col-md-offset-0 {
    margin-left: 0;
  }

  .col-md-offset-1 {
    margin-left: 8.333333333333332%;
  }

  .col-md-offset-2 {
    margin-left: 16.666666666666664%;
  }

  .col-md-offset-3 {
    margin-left: 25%;
  }

  .col-md-offset-4 {
    margin-left: 33.33333333333333%;
  }

  .col-md-offset-5 {
    margin-left: 41.66666666666667%;
  }

  .col-md-offset-6 {
    margin-left: 50%;
  }

  .col-md-offset-7 {
    margin-left: 58.333333333333336%;
  }

  .col-md-offset-8 {
    margin-left: 66.66666666666666%;
  }

  .col-md-offset-9 {
    margin-left: 75%;
  }

  .col-md-offset-10 {
    margin-left: 83.33333333333334%;
  }

  .col-md-offset-11 {
    margin-left: 91.66666666666666%;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1170px;
  }

  .col-lg-1,
  .col-lg-2,
  .col-lg-3,
  .col-lg-4,
  .col-lg-5,
  .col-lg-6,
  .col-lg-7,
  .col-lg-8,
  .col-lg-9,
  .col-lg-10,
  .col-lg-11 {
    float: left;
  }

  .col-lg-1 {
    width: 8.333333333333332%;
  }

  .col-lg-2 {
    width: 16.666666666666664%;
  }

  .col-lg-3 {
    width: 25%;
  }

  .col-lg-4 {
    width: 33.33333333333333%;
  }

  .col-lg-5 {
    width: 41.66666666666667%;
  }

  .col-lg-6 {
    width: 50%;
  }

  .col-lg-7 {
    width: 58.333333333333336%;
  }

  .col-lg-8 {
    width: 66.66666666666666%;
  }

  .col-lg-9 {
    width: 75%;
  }

  .col-lg-10 {
    width: 83.33333333333334%;
  }

  .col-lg-11 {
    width: 91.66666666666666%;
  }

  .col-lg-12 {
    width: 100%;
  }

  .col-lg-push-0 {
    left: auto;
  }

  .col-lg-push-1 {
    left: 8.333333333333332%;
  }

  .col-lg-push-2 {
    left: 16.666666666666664%;
  }

  .col-lg-push-3 {
    left: 25%;
  }

  .col-lg-push-4 {
    left: 33.33333333333333%;
  }

  .col-lg-push-5 {
    left: 41.66666666666667%;
  }

  .col-lg-push-6 {
    left: 50%;
  }

  .col-lg-push-7 {
    left: 58.333333333333336%;
  }

  .col-lg-push-8 {
    left: 66.66666666666666%;
  }

  .col-lg-push-9 {
    left: 75%;
  }

  .col-lg-push-10 {
    left: 83.33333333333334%;
  }

  .col-lg-push-11 {
    left: 91.66666666666666%;
  }

  .col-lg-pull-0 {
    right: auto;
  }

  .col-lg-pull-1 {
    right: 8.333333333333332%;
  }

  .col-lg-pull-2 {
    right: 16.666666666666664%;
  }

  .col-lg-pull-3 {
    right: 25%;
  }

  .col-lg-pull-4 {
    right: 33.33333333333333%;
  }

  .col-lg-pull-5 {
    right: 41.66666666666667%;
  }

  .col-lg-pull-6 {
    right: 50%;
  }

  .col-lg-pull-7 {
    right: 58.333333333333336%;
  }

  .col-lg-pull-8 {
    right: 66.66666666666666%;
  }

  .col-lg-pull-9 {
    right: 75%;
  }

  .col-lg-pull-10 {
    right: 83.33333333333334%;
  }

  .col-lg-pull-11 {
    right: 91.66666666666666%;
  }

  .col-lg-offset-0 {
    margin-left: 0;
  }

  .col-lg-offset-1 {
    margin-left: 8.333333333333332%;
  }

  .col-lg-offset-2 {
    margin-left: 16.666666666666664%;
  }

  .col-lg-offset-3 {
    margin-left: 25%;
  }

  .col-lg-offset-4 {
    margin-left: 33.33333333333333%;
  }

  .col-lg-offset-5 {
    margin-left: 41.66666666666667%;
  }

  .col-lg-offset-6 {
    margin-left: 50%;
  }

  .col-lg-offset-7 {
    margin-left: 58.333333333333336%;
  }

  .col-lg-offset-8 {
    margin-left: 66.66666666666666%;
  }

  .col-lg-offset-9 {
    margin-left: 75%;
  }

  .col-lg-offset-10 {
    margin-left: 83.33333333333334%;
  }

  .col-lg-offset-11 {
    margin-left: 91.66666666666666%;
  }
}

/* ========================================
   DASHBOARD LAYOUTS
   ======================================== */

.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 0px;
  width: 100%;
  padding: 15px;
}

.dashboard-row {
  display: flex;
  gap: 20px;
  width: 100%;
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.dashboard-col {
  display: flex;
  flex-direction: column;
}

.dashboard-col-large {
  flex: 3;
  min-width: 0;
}

.dashboard-col-small {
  flex: 1;
  min-width: 300px;
}

.dashboard-col-full {
  flex: 1;
  width: 100%;
  min-width: 0;
  gap: 10px;
}

/* ========================================
   DASHBOARD STATS MODULE
   ======================================== */

.dashboard-stats-container {
  background: transparent;
  border-radius: 8px;
  overflow: visible;
  animation: fadeInUp 0.6s ease-out;
  width: 100%;
}


/* SIDEBAR FILTERS - Menu latéral fixe à droite */
.dashboard-header {
  display: none;
  background: linear-gradient(135deg, #1d4972 0%, #18597e 100%);
  color: white;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  position: fixed;
  top: 7vh;
  right: 10px;
  flex-direction: column;
  border-radius: 20px 0 0 20px;
  width: 330px;
  /* Largeur fixe pour un meilleur contrôle */
  min-height: 100px;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateX(300px);
  /* Caché à droite, seule une partie visible */
  box-shadow: -8px -8px 0px var(--primary-color);
  border: 1px solid var(--primary-color);
  border-right: none;
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  user-select: none;
  pointer-events: all;
  /* CORRECTION : Toujours interactif */
  cursor: pointer;
  /* CORRECTION : Montrer que c'est cliquable */
}

#sec-board.active-section .dashboard-stats-container[data-active-tab="charts-tab"] .dashboard-header {
  display: flex;
  min-height: 200px;
  opacity: 1;
  user-select: none;
  pointer-events: all;
  overflow: visible;
  padding-right: 10px;
}

#sec-board.active-section .dashboard-stats-container[data-active-tab="charts-tab"] .dashboard-header.sidebar-open {
  min-height: auto;
  right: 0px;
}

/* État ouvert du menu - DÉSACTIVÉ : Contrôlé par JavaScript */
/* 
#sec-board.active-section .dashboard-header:hover,
#sec-board.active-section .dashboard-header:focus,
#sec-board.active-section .dashboard-header:active,
#sec-board.active-section .dashboard-header:focus-within {
  transform: translateX(3px);
  box-shadow: -3px -8px 0px var(--primary-color);
}
*/

.dashboard-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  opacity: 1;
  width: auto;
  padding: 8px 3px;
  color: white;
  background: transparent;
  position: absolute;
  left: -38px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: center;
  z-index: 1001;
  transition: all 0.3s ease;
}

/* Masquer le titre quand le menu est ouvert - DÉSACTIVÉ : Contrôlé par JavaScript */
/*
#sec-board.active-section .dashboard-header:hover .dashboard-title,
#sec-board.active-section .dashboard-header:focus .dashboard-title,
#sec-board.active-section .dashboard-header:active .dashboard-title,
#sec-board.active-section .dashboard-header:focus-within .dashboard-title {
  opacity: 0;
  padding: 0;
}
*/

/* Indicateur visuel quand il y a des filtres actifs */
.dashboard-header.has-active-filters .dashboard-title {
  background: #e74c3c;
  animation: pulse 2s infinite;
}

.dashboard-period-info {
  text-align: center;
  font-size: 10px;
  color: white;
}

.dashboard-title h3 {
  margin: 0;
  font-weight: normal;
}

.dashboard-controls {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
  flex-direction: column;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s ease 0.2s;
  padding: 5px 10px 0px 10px;
}

.dashboard-controls>div {
  width: 100%;
}

/* Affichage des contrôles quand le menu est ouvert - DÉSACTIVÉ : Contrôlé par JavaScript */
/*
#sec-board.active-section .dashboard-header:hover .dashboard-controls,
#sec-board.active-section .dashboard-header:focus .dashboard-controls,
#sec-board.active-section .dashboard-header:focus-within .dashboard-controls {
  opacity: 1;
  transform: translateX(0);
}
*/

.control-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: nowrap;
}

.control-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  font-size: 12px;
  width: 100%;
  padding-right: 0px;
}

.button-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Espace central pour afficher les tooltips */
.button-group::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 30px;
  background: var(--primary-color);
  border-radius: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

/* Classe pour afficher le tooltip */
.button-group.show-tooltip::after {
  content: var(--tooltip-content, '');
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.6em;
  font-weight: 500;
  text-align: center;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Classes pour l'alignement du tooltip */
.button-group.show-tooltip.tooltip-left::after {
  text-align: left;
}

.button-group.show-tooltip.tooltip-right::after {
  text-align: right;
}

.dashboard-export-btn {
  margin-left: -10px;
  border-top-right-radius: 20px;
  border-bottom-left-radius: 20px;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-self: flex-start;
  background: rgb(72, 115, 146);
  transition: all 0.3s ease;
  z-index: 1;
  width: 50px;
  height: 30px;
}

.dashboard-export-btn .dropdown,
.dashboard-export-btn .dropdown button.export-btn {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  margin: 0;
  padding: 0;
}

.dashboard-export-btn button i {
  color: white;
}

.dashboard-controls .dashboard-export-btn:hover {
  background: rgb(187, 203, 215);
}

.dashboard-export-btn:hover button i {
  color: var(--primary-color);
}

.control-group label {
  font-size: 0.9em;
  font-weight: 500;
  opacity: 0.9;
}

.dashboard-controls .form-control {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  /* padding: 8px 12px; */
  font-size: 0.9em;
  min-width: 150px;
}

.date-separator {
  background: white;
  color: black;
}

.dashboard-controls .form-control::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.dashboard-controls .form-control:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.2);
}

.dashboard-content {
  padding-bottom: 10px;
}

#sidebar-refresh-stats {
  border-top-left-radius: 20px;
  border-bottom-right-radius: 0px;
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-self: flex-end;
  z-index: 1;
  margin-right: -25px;
  padding-right: 20px;
  width: 60px;
  height: 30px;
}


/* Stats Row - 4 colonnes */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-left: 10px solid var(--module-color, var(--primary-color));
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeInUp 0.6s ease-out;
  flex: 1;
  border-top-left-radius: 50px;
  border-bottom-left-radius: 50px;
}



.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-card:nth-child(2) {
  animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
  animation-delay: 0.2s;
}

.stat-card:nth-child(4) {
  animation-delay: 0.3s;
}

.stat-card .stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
  background-color: var(--module-color, var(--primary-color));
}



.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-card .stat-value {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
  line-height: 1.2;
}

.stat-card .stat-label {
  font-size: 12px;
  color: #7f8c8d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

/* Charts */

.chart-header {
  font-size: 16px;
  font-weight: 600;
  color: var(--module-color, var(--primary-color));
  text-align: center;
  border-bottom: 1px solid #dee2e6;
  line-height: 33px;
  width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.chart-type-switch {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
}

/* Bouton d'export des graphiques */
.chart-export-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.chart-export-btn .export-btn,
.chart-type-switch {
  border: none;
  background: transparent;
  color: var(--module-color, var(--primary-color));
  padding: 0;
  font-size: 16px;
  border-radius: 50%;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-export-btn .export-btn:hover,
.chart-type-switch:hover {
  background-color: var(--module-color, var(--primary-color));
  color: white;
}

.chart-export-btn .export-btn:focus,
.chart-type-switch:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.chart-export-btn .dropdown-menu,
.dashboard-export-btn .dropdown-menu {
  font-size: 13px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 8px 0;
  margin-top: 5px;
  display: none;
  /* Masqué par défaut */
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  background: white;
}

.chart-export-btn .dropdown.show .dropdown-menu,
.dashboard-export-btn .dropdown.show .dropdown-menu {
  display: block;
  /* Affiché quand le dropdown est ouvert */
}

.filter-dropdown .dropdown-header,
.chart-export-btn .dropdown-header,
.dashboard-export-btn .dropdown-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--module-color, var(--primary-color));
  padding: 0;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-dropdown .dropdown-item,
.chart-export-btn .dropdown-item,
.geometry-format-menu .dropdown-item,
.dashboard-export-btn .dropdown-item {
  padding: 4px 8px;
  color: #333;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  font-size: 10px;
  white-space: nowrap;
}

.filter-dropdown .dropdown-item:hover,
.chart-export-btn .dropdown-item:hover,
.geometry-format-menu .dropdown-item:hover,
.dashboard-export-btn .dropdown-item:hover {
  background-color: #f8f9fa;
  color: var(--secondary-color);
  padding-left: 20px;
}

.filter-dropdown .dropdown-item i,
.chart-export-btn .dropdown-item i,
.chart-export-btn .dropdown-item i,
.dashboard-export-btn .dropdown-item i {
  width: 16px;
  text-align: center;
  opacity: 0.7;
}

.filter-dropdown .dropdown-item:hover i,
.chart-export-btn .dropdown-item:hover i,
.chart-export-btn .dropdown-item:hover i,
.dashboard-export-btn .dropdown-item:hover i {
  opacity: 1;
}

.chart-export-btn .dropdown-divider,
.dashboard-export-btn .dropdown-divider {
  margin: 6px 0;
  border-top-color: #e9ecef;
}

/* Styles pour les boutons des modules enfants (child-modules-buttons) */
.chart-header .child-modules-buttons {
  position: absolute;
  display: flex;
  gap: 0px;
  z-index: 10;
}

/* Position à gauche quand il y a un bouton d'export */
.chart-header:has(.chart-export-btn) .child-modules-buttons {
  left: -2px;
  top: 0;
}

/* Position à droite quand il n'y a pas de bouton d'export */
.chart-header:not(:has(.chart-export-btn)) .child-modules-buttons {
  right: 10px;
}

/* Styles des boutons enfants */
.chart-header .child-modules-buttons button {
  background-color: var(--primary-color);
  width: auto;
  border: none;
  border-radius: 0;
  padding: 4px 8px;
  margin: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chart-header .child-modules-buttons button:hover {
  background-color: var(--secondary-color);
  padding-left: 3px;
  /* transform: scale(1.05);
  margin-left: 5px; */
}

.chart-header .child-modules-buttons button i {
  color: white;
  padding: 0 10px;
  margin: 0;
  font-size: 14px;
}

/* Titre du bouton - masqué par défaut avec max-width */
.chart-header .child-modules-buttons button .btn-title {
  color: white;
  font-size: 10px;
  font-weight: 500;
  margin-left: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
  opacity: 0;
  transition: all 0.3s ease;
}

/* Titre visible au hover */
.chart-header .child-modules-buttons button:hover .btn-title {
  max-width: 200px;
  opacity: 1;
  margin-right: 20px;
}

.chart-header .child-modules-buttons button:first-of-type {
  border-top-left-radius: 20px;
}

.chart-header .child-modules-buttons button:last-of-type {
  border-bottom-right-radius: 40px;
}

/* Styles pour les headers créés dynamiquement */
.module-header-created {
  padding-left: 35px;
  position: relative;
}

/* Centrage du titre quand il y a des boutons des deux côtés */
.chart-header:has(.chart-export-btn) h3,
.chart-header:has(.chart-export-btn) .title {
  flex: 1;
  text-align: center;
  margin: 0;
  padding: 0 60px;
  /* Espace pour les boutons des deux côtés */
}

/* Centrage du titre quand il n'y a que des boutons à droite */
.chart-header:not(:has(.chart-export-btn)) h3,
.chart-header:not(:has(.chart-export-btn)) .title {
  flex: 1;
  text-align: center;
  margin: 0;
  padding: 0 60px 0 0;
  /* Espace pour les boutons à droite */
}


.charts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  /* MODIFIÉ : Égaliser les hauteurs */
  margin-bottom: 20px;
  width: 100%;
}

.charts-row:last-of-type {
  margin-bottom: 0px;
}

/* Graphiques en 2 colonnes */
#charts-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

/* Graphiques pleine largeur */
#charts-full-width {
  display: flex;
  width: 100%;
  flex-direction: column-reverse;
}

#charts-full-width .chart-container {
  width: 100%;
  flex: 1;
}

.chart-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* min-height: 578px; */
  animation: fadeInUp 0.6s ease-out 0.4s both;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: fit-content;
}

/* Contenu du graphique pie - s'adapter au transform d'ApexCharts */
.chart-container.chart-pie .chart-content {
  position: relative;
  overflow: visible;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 0;
  /* Pas de hauteur minimale pour les pies */
}

.chart-container .chart-content {
  padding: 0px;
  width: 100%;
  min-height: fit-content;
}

/* Styles pour le récapitulatif contextuel */
.chart-context-summary {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 8px 20px;
  font-size: 13px;
  color: #6c757d;
  display: flex;
  align-items: center;
  /*min-height: 32px;*/
  transition: all 0.3s ease;
  width: 100%;
}

.chart-context-summary:hover {
  background: #e9ecef;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.context-summary-chart-content {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 8px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.chart-context-item {
  display: inline-block;
  vertical-align: middle;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-context-item i {
  font-size: 12px;
  opacity: 0.7;
  margin-right: 4px;
}

.context-summary-empty {
  font-style: italic;
  opacity: 0.6;
}

/* Titre de légende (type de score) aligné au context-summary */
.chart-legend-title {
  background: #e9ecef;
  border-bottom: 1px solid #dee2e6;
  padding: 4px 12px;
  font-size: 12px;
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  width: 100%;
  font-weight: bold;
}

.chart-legend-title:hover {
  background: #dde3e8;
}

/* Responsive pour les petits écrans */
@media (max-width: 768px) {
  .chart-context-summary {
    padding: 6px 15px;
    font-size: 12px;
  }

  .context-summary-chart-content {
    gap: 6px;
  }

  .chart-context-item {
    font-size: 12px;
  }

  .chart-legend-title {
    padding: 4px 10px;
    font-size: 10px;
    min-height: 22px;
  }
}

.chart-container,
.box {
  border-top: 4px solid var(--module-color, var(--primary-color));
}

.chart-container.chart-open,
.box.box-open {
  border-top: 4px solid var(--secondary-color);
}

/* Responsive - Sur mobile, tout en une colonne */
@media (max-width: 768px) {
  #charts-two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .charts-row {
    gap: 10px;
  }
}

/* Animation des icônes au survol */
.star-rating .star i:hover {
  transform: scale(1.2);
}

/* États actifs avec animations */
.star-rating .star.active i {
  animation: pulseGlow 0.6s ease-in-out;
}

@keyframes pulseGlow {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.1);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive design pour les petits écrans */
@media (max-width: 768px) {
  .star-rating {
    gap: 4px;
  }

  .star-rating .star i {
    font-size: 16px;
  }

  .score-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* Bouton NULL pour supprimer les scores */

/* .star-rating .star.null-score {
  margin-right: 15px;
  border-right: 2px solid #ddd;
  padding-right: 15px;
} */

.star-rating .star.null-score i {
  color: #e74c3c;
  /* Rouge pour suppression */
  opacity: 0.3;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.star-rating .star.null-score.active i {
  color: #c0392b;
  /* Rouge foncé quand actif */
  opacity: 1;
  transform: scale(1);
  text-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
}

.star-rating .star.null-score:hover i {
  color: #e74c3c;
  opacity: 0.8;
  transform: scale(1.1);
  cursor: pointer;
}

/* Styles pour l'état NULL */
.score-editor-container .score-slider:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.score-editor-container .score-display .current-score.null-state {
  color: #95a5a6;
  font-style: italic;
}

/* Animation pour le passage en mode NULL */
.star-rating .star:not(.null-score).disabled i {
  opacity: 0.2;
  transform: scale(0.8);
  filter: grayscale(50%);
}

.dashboard-header.sidebar-open {
  transform: translateX(3px);
  box-shadow: 0px -8px 0px var(--primary-color);
  cursor: default;
}

.dashboard-header.sidebar-open .dashboard-title {
  opacity: 0;
  pointer-events: none;
}

.dashboard-header.sidebar-open .dashboard-controls {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

/* Styles pour différencier l'état verrouillé */
.dashboard-header.sidebar-locked {
  border-left: 3px solid #e74c3c;
}

.dashboard-header.sidebar-locked .dashboard-title {
  background: #e74c3c;
}

.btn-child-module {
  border: none;
  background: transparent;
  color: var(--tertiary-color);
  padding: 0;
  font-size: 16px;
  border-radius: 50%;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-child-module:hover {
  background-color: rgba(0, 0, 0, 0.08);
  color: var(--module-color, var(--secondary-color));
}

.btn-child-module:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Animation de pulsation pour indiquer que c'est verrouillé */
@keyframes lockedPulse {

  0%,
  100% {
    border-left-color: rgba(231, 77, 60, 0.8);
  }

  50% {
    border-left-color: rgba(231, 76, 60, 0.4);
  }
}

#sec-board .dashboard-header.sidebar-open.sidebar-locked {
  animation: lockedPulse 3s infinite;
}

/* Amélioration de la zone cliquable */
#sec-board .dashboard-header {
  cursor: pointer;
}

#sec-board .dashboard-header.sidebar-open {
  cursor: default;
}

/* Style pour l'aperçu au hover */
#sec-board .dashboard-header:hover:not(.sidebar-open) {
  transform: translateX(290px);
  opacity: 0.95;
  transition: all 0.2s ease;
}

#sec-board .dashboard-header:hover:not(.sidebar-open) .dashboard-title {
  left: -34px;
  transition: all 0.2s ease;
}


/* Empêcher l'effet hover sur les éléments internes quand le menu est ouvert */
#sec-board .dashboard-header.sidebar-open:hover {
  transform: translateX(3px);
  opacity: 1;
  transition: all 0.2s ease;
}

.apexcharts-svg,
.apexcharts-inner,
.apexcharts-graphical {
  overflow: visible;
}

/* Désactive l'effet de hover sur la légende ApexCharts */
.apexcharts-legend-series:hover {
  background: none;
  opacity: 1;
  filter: none;
}

.apexcharts-legend-marker {
  opacity: 1;
  filter: none;
}

/* Force les couleurs des icônes de légende personnalisées */
.apexcharts-legend-marker .custom-legend-marker {
  color: inherit !important;
}

.apexcharts-legend-marker .custom-legend-marker i {
  color: inherit !important;
}

/* Styles pour les tooltips des graphiques de ruisseaux */
.apexcharts-tooltip .stream-tooltip {
  padding: 0px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-family: var(--font-title, 'Zen Dots');
  /* Désactiver les animations qui peuvent causer des problèmes */
  animation: none !important;
  transition: none !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 2px;
}

/* Position relative pour la flèche ::after sur les pie charts */
.apexcharts-tooltip .pie-chart-tooltip {
  position: relative;
}

.apexcharts-tooltip .stream-tooltip>div {
  padding: 2px 10px;
  width: 100%;
}

.stream-tooltip-content {
  color: #666;
}

.stream-tooltip-border {
  border-left: 5px solid;
}

/* Styles pour les tooltips ApexCharts - sans animations */
.apexcharts-tooltip-series-group.stream-series {
  border-left: 5px solid;
  padding-left: 8px;
  /* Désactiver les animations */
  animation: none !important;
  transition: none !important;
}

/* Styles pour le conteneur principal du tooltip ApexCharts */
.apexcharts-tooltip {
  overflow: visible !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid #e0e0e0 !important;
}

/* Styles pour les tooltips ApexCharts avec text-shadow */
/* Styles pour le titre du tooltip ApexCharts */
.apexcharts-tooltip-title {
  border-radius: 10px 10px 0 0 !important;
  background: #f8f9fa !important;
  border-bottom: 1px solid #e0e0e0 !important;
  font-weight: 600 !important;
  width: 100%;
  display: flex;
  margin: 0;
  padding: 2px;
}

.stream-tooltip-title {
  font-weight: bold;
  margin-bottom: 5px;
  width: 100%;
  display: flex;
  margin: 0;
  padding: 2px;
  border-radius: 10px 10px 0 0;
}


/* Padding à droite pour les graphiques avec axes (x/y) */
.chart-horizontal {
  margin-top: auto;
  padding: 0 10px !important;
}

/* Empêche l'estompage des autres séries lors du hover sur la légende */
.apexcharts-series[rel] {
  opacity: 1;
}

/* Styles pour les sous-menus */
.dropdown-submenu {
  position: absolute;
  left: 100%;
  bottom: 0;
  min-width: 350px;
  z-index: 9999;
  display: none;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 8px 0;
}

.dropdown-submenu.show {
  display: block;
}

.dropdown-item.has-submenu {
  position: relative;
}

.dropdown-item.has-submenu:hover .dropdown-submenu {
  display: block;
}

/* Styles pour l'état de chargement des sous-menus */
.submenu-loading {
  padding: 10px;
  text-align: center;
}

.submenu-loading i {
  margin-right: 5px;
}

/* Classes utilitaires pour les effets hover */
.dropdown-item-hover {
  background-color: #f8f9fa;
}

.dropdown-item-normal {
  background-color: transparent;
}


/* VARAIOUS TABULATOR */
.tabulator {
  position: relative;
  margin: 0;
}

/* Indicateurs visuels de scroll pour les tableaux Tabulator */
.tabulator-tableholder {
  position: relative;
  transition: border 0.3s ease;
}

/* Indicateurs de scroll avec pseudo-éléments absolus */
.tabulator.scrollable-right,
.tabulator.scrollable-left,
.tabulator.scrollable-both {
  cursor: pointer;
}

/* Indicateur gauche (pseudo-élément ::before) */
.tabulator.scrollable-left::before,
.tabulator.scrollable-both::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--scroll-indicator-left-width, 0px);
  background: linear-gradient(to bottom,
      transparent 0%,
      var(--accent-color-select) 20%,
      var(--accent-color-select) 80%,
      transparent 100%);
  pointer-events: auto;
  z-index: 1000;
  transition: width 0.2s ease;
  height: 90%;
  cursor: pointer;
}

/* Indicateur droite (pseudo-élément ::after) */
.tabulator.scrollable-right::after,
.tabulator.scrollable-both::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--scroll-indicator-right-width, 0px);
  background: linear-gradient(to bottom,
      transparent 0%,
      var(--accent-color-select) 20%,
      var(--accent-color-select) 80%,
      transparent 100%);
  pointer-events: auto;
  z-index: 1000;
  transition: width 0.2s ease;
  height: 90%;
  cursor: pointer;
}

.tabulator .tabulator-footer {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
}

.tabulator .tabulator-footer .tabulator-footer-contents {
  flex-wrap: wrap;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {
  font-family: var(--font-main);
  font-size: calc(var(--header-height)/7);
  vertical-align: middle;
  line-height: calc(var(--header-height)/6);
  font-weight: bold;
}

.tabulator-row .tabulator-cell {
  font-family: var(--font-main);
  font-size: calc(var(--header-height)/6);
  vertical-align: middle;
  line-height: calc(var(--header-height)/2);
  border-right: 1px solid rgba(211, 211, 211, 0.5);
  padding: 5px;
}

.tabulator-row.tabulator-selected {
  background-color: var(--accent-color-select-table) !important;
}

.tabulator-row.tabulator-selected:hover {
  background-color: var(--accent-color-hover-table) !important;
}


.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-title {
  white-space: normal;
}

.tabulator-grid button:not(.btn-table, .select2-selection__choice__remove, .select2-selection__clear, .btn-view-data, .btn-edit, .btn-refresh, .btn-activation, .btn-deactivation, .btn-reset) {
  margin: 0.5rem;
  font-size: .6rem;
  text-decoration: none;
  text-shadow: none;
  text-align: center;
  background-color: var(--primary-color);
  cursor: pointer;
  padding: 1rem;
  border-radius: 10px;
  min-width: 40px;
  transition: all 0.2s ease;
  border: 0px;
  box-shadow: 5px 5px 0px var(--accent-color-select);
  font-family: var(--font-title);
  color: #fff;
}

.tabulator-grid button.tabulator-page {
  margin: 0px;
  padding: 7px 17px;
  border-radius: 0;
  position: relative;
  box-shadow: 0px 5px 0px var(--accent-color-select);
  background: var(--primary-color);
}

.tabulator-grid button.tabulator-page::after,
.tabulator-grid button.tabulator-page::before {
  position: relative;
  top: 0px;
  transition: all .2s ease;
  text-shadow: 0 0 0 black;
}

.tabulator-grid button.tabulator-page:hover::after,
.tabulator-grid button.tabulator-page:hover::before {
  text-shadow: 0 4px 0 rgba(29, 73, 114, 0.5);
  top: -2px;
}

/* Icônes FontAwesome pour les boutons de pagination */
/* Premier bouton (first) - icône à droite */
.tabulator-grid button.tabulator-page[data-page="first"]::after {
  content: "\f049";
  /* fa-backward-fast */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: -10px;
  margin-left: 10px;
}

/* Deuxième bouton (prev) - icône à gauche */
.tabulator-grid button.tabulator-page[data-page="prev"]::before {
  content: "\f048";
  /* fa-backward-step */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 10px;
  margin-left: -10px;
}

/* Avant-dernier bouton (next) - icône à droite */
.tabulator-grid button.tabulator-page[data-page="next"]::after {
  content: "\f051";
  /* fa-forward-step */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: -10px;
  margin-left: 10px;
}

/* Dernier bouton (last) - icône à gauche */
.tabulator-grid button.tabulator-page[data-page="last"]::before {
  content: "\f050";
  /* fa-forward-fast */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 10px;
  margin-left: -10px;
}

.tabulator-grid button.tabulator-page.active,
.tabulator-grid button.tabulator-page.active:hover {
  background-color: var(--accent-color-select);
  box-shadow: 0px 3px 0px var(--accent-color-select);
  color: var(--primary-color);
  transform: translate(0, 2px);
  cursor: auto;
  text-decoration: underline;
}


.tabulator-grid button.tabulator-page:hover {
  margin: 0px;
  border-radius: 0;
  transform: translate(0, 2px);
  box-shadow: 0px 3px 0px var(--accent-color-select);
  background-color: var(--secondary-color);
}


.tabulator-grid span.tabulator-paginator>button.tabulator-page:nth-of-type(1),
.tabulator-grid span.tabulator-paginator>button.tabulator-page:nth-of-type(3) {
  border-bottom-left-radius: 10px;
  border-top-left-radius: 10px;
}

.tabulator-grid span.tabulator-paginator>button.tabulator-page:nth-of-type(2),
.tabulator-grid span.tabulator-paginator>button.tabulator-page:nth-of-type(4) {
  border-bottom-right-radius: 10px;
  border-top-right-radius: 10px;
}

.tabulator-grid .tabulator-pages button.tabulator-page:first-of-type {
  border-bottom-left-radius: 10px;
  border-top-left-radius: 10px;
}

.tabulator-grid .tabulator-pages button.tabulator-page:last-of-type {
  border-bottom-right-radius: 10px;
  border-top-right-radius: 10px;
}

.tabulator-grid span.tabulator-paginator>button.tabulator-page:nth-of-type(1):hover,
.tabulator-grid span.tabulator-paginator>button.tabulator-page:nth-of-type(3):hover,
.tabulator-grid .tabulator-pages button.tabulator-page:first-of-type:hover {
  border-bottom-left-radius: 15px;
  border-top-left-radius: 15px;
}

.tabulator-grid span.tabulator-paginator>button.tabulator-page:nth-of-type(2):hover,
.tabulator-grid span.tabulator-paginator>button.tabulator-page:nth-of-type(4):hover,
.tabulator-grid .tabulator-pages button.tabulator-page:last-of-type:hover {
  border-bottom-right-radius: 15px;
  border-top-right-radius: 15px;
}

.tabulator-grid .tabulator-pages button.tabulator-page {
  position: relative;
  /* Nécessaire pour z-index */
  z-index: 1;
  /* Valeur par défaut */
}

.tabulator-grid .tabulator-pages button.tabulator-page:nth-of-type(2) {
  z-index: 2;
}

.tabulator-grid .tabulator-pages button.tabulator-page:nth-of-type(3) {
  z-index: 3;
}

.tabulator-grid .tabulator-pages button.tabulator-page:nth-of-type(4) {
  z-index: 4;
}

.tabulator-grid .tabulator-pages button.tabulator-page:nth-of-type(5) {
  z-index: 5;
}

/* ...et ainsi de suite selon le nombre de boutons maximum attendu */


/* Dropdown Tabulator */
.dropdown.tabulator-context-menu {
  position: fixed;
  z-index: 99999;
  display: block;
}

.dropdown.tabulator-context-menu .dropdown-menu {
  position: static;
  max-height: 400px;
  border-radius: 4px;
  overflow-y: auto;
  display: block;
  margin: 0;
  padding: 5px 0;
  font-size: 13px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 8px 0;
  margin-top: 5px;
  z-index: 1000;
  overflow: visible;
}

.dropdown.tabulator-context-menu .dropdown-menu .dropdown-divider {
  height: 0;
  margin: 0.5rem 0;
  overflow: hidden;
  border-top: 1px solid #e9ecef;
}

.dropdown.tabulator-context-menu .dropdown-menu .dropdown-header {
  display: block;
  padding: 3px 20px;
  margin-bottom: 0;
  font-size: 0.875rem;
  color: #6c757d;
  white-space: nowrap;
}

.dropdown.tabulator-context-menu .dropdown-menu span.dropdown-item {
  width: 100%;
  clear: both;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  cursor: pointer;
  border: 0;
  box-sizing: border-box;
  padding: 4px 8px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  font-size: 10px;
}

.dropdown.tabulator-context-menu .dropdown-menu span.dropdown-item:hover {
  background-color: #f8f9fa;
  color: var(--secondary-color);
  padding-left: 20px;
}

.dashboard-tabs {
  background: #ffffff5e;
  padding: 20px;
  border-radius: 50px;
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
}

.tabs-header {
  display: flex;
  background: transparent;
  padding: 8px;
  margin-bottom: 10px;
  box-shadow: none;
  min-height: 60px;
}

.tab-button:first-of-type {
  border-top-left-radius: 25px;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  flex-direction: row-reverse;
}

.tab-button:last-of-type {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 25px;
  border-bottom-right-radius: 0;
}

.tab-button {
  flex: 1;
  text-align: center;
  padding: 16px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: bold;
  color: var(--tertiary-color);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
  outline: 3px solid var(--primary-color);
  outline-offset: 0px;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
}

.tab-button i {
  font-size: 18px;
}

.tab-button:hover {
  color: var(--secondary-color);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  outline: 3px solid var(--secondary-color);
  outline-offset: -5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tab-button:focus {
  color: var(--primary-color);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
  outline: 3px solid var(--accent-color-focus);
  outline-offset: -5px;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.15);
}

.tab-button:active {
  color: var(--primary-color);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  outline: 3px solid var(--primary-color);
  outline-offset: -5px;
  transform: translateY(0px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tab-button.active {
  background: var(--primary-color);
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  outline: 3px solid white;
  outline-offset: -5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-button.active:hover {
  outline: 3px solid white;
  outline-offset: -3px;
  transform: translateY(0px);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.tab-button.active:focus {
  color: white;
  background: var(--primary-color);
  outline: 3px solid white;
  outline-offset: -5px;
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.2);
}

/* ==================
 * ACCORDION (Tables tab)
 * ================== */
.grids-accordion {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 20px;
}

.grids-accordion .accordion-item {
  background: #fff;
  position: relative;
  padding: 0;
  border-left: 2px solid var(--primary-color);
  transition: border .1s ease;
  overflow: hidden;
  border-bottom: 1px solid rgba(1, 42, 83, 0.2);
}

.grids-accordion .accordion-item:first-of-type {
  border-top-right-radius: 20px;
  border-top-left-radius: 20px;
}

.grids-accordion .accordion-item:last-of-type {
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
  border-bottom: none;
}

.grids-accordion .accordion-header {
  background: transparent;
  position: relative;
}

.grids-accordion .accordion-item.open,
.grids-accordion .accordion-item:hover {
  border-left: 5px solid var(--primary-color);
}

.grids-accordion .accordion-header-content {
  display: flex;
  align-items: center;
  padding: 0px 16px;
}

.grids-accordion .accordion-toggle {
  text-align: left;
  color: #333;
  font-weight: 500;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  background: transparent;
  flex: 1;
}

.accordion-header .accordion-header-content {
  background: transparent;
}

.accordion-header:has(.accordion-toggle) {
  cursor: pointer;
}

.grids-accordion .accordion-header-content i {
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

/* Styles pour l'icône du module (gauche) */
.grids-accordion .accordion-module-icon {
  font-size: 16px;
  color: var(--primary-color);
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--panel-active-bg);
  border-radius: 20px;
}

/* Styles pour le bouton de détachement (droite) */
.grids-accordion .accordion-open-modal-btn {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  margin-right: 50px;
  font-size: 14px;
  color: var(--tertiary-color);
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 5px;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 1);
  opacity: 0.5;
  border: none;
  cursor: pointer;
  gap: 0;
  font-size: 10px;
}

.grids-accordion .accordion-open-modal-btn:hover {
  color: var(--accent-color);
  background-color: rgba(0, 0, 0, 0.05);
  opacity: 1;
}

.grids-accordion .accordion-open-modal-btn .btn-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
  opacity: 0;
  transition: all 0.3s ease;
  margin-right: 0;
  order: -1;
  flex-shrink: 0;
  font-size: 10px;
}

.grids-accordion .accordion-open-modal-btn:hover .btn-title {
  max-width: 150px;
  opacity: 1;
  margin-right: 8px;
}

/* Désactiver l'affichage du texte au hover si la fenêtre est en dessous de 1000px */
@media (max-width: 1000px) {
  .grids-accordion .accordion-open-modal-btn:hover .btn-title {
    max-width: 0;
    opacity: 0;
    margin-right: 0;
  }
}

.grids-accordion .accordion-open-modal-btn i {
  flex-shrink: 0;
  display: block;
}

/* Styles pour le bouton toggle enfant tableau */
.accordion-toggle-child-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-left: 12px;
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  background: rgba(29, 73, 114, 0.05);
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.accordion-toggle-child-grid:hover {
  background: rgba(29, 73, 114, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.accordion-toggle-child-grid.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.accordion-toggle-child-grid i {
  font-size: 14px;
}

.accordion-toggle-child-grid .btn-title {
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 🎯 NOUVEAU : Styles pour le bouton toggle en position absolue */
.box-toggle-child-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.box-toggle-child-grid {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  padding: 0px 5px;
  border: 1px solid var(--module-color, var(--primary-color));
  border-radius: 6px;
  background: rgba(29, 73, 114, 0.05);
  color: var(--module-color, var(--primary-color));
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  pointer-events: all !important;
  position: relative;
  z-index: 101;
  box-shadow: -4px 4px 0 rgba(0, 0, 0, 0.1);
}

.box-toggle-child-grid:hover {
  background: rgba(29, 73, 114, 0.15) !important;
  box-shadow: -4px 2px 0 rgba(0, 0, 0, 0.2);
  transform: translateY(2px);
}

.box-toggle-child-grid.active {
  background: rgba(29, 73, 114, 0.2);
  border-color: var(--module-color, var(--primary-color));
}

.box-toggle-child-grid i {
  font-size: 14px;
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

.box-toggle-child-grid .alteration-icon {
  font-size: 14px;
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
  mask-image: url(/assets/IMAGES/GUI/ICONS/lim-alteration-w.svg);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url(/assets/IMAGES/GUI/ICONS/lim-alteration-w.svg);
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  background-color: currentColor;
  margin: 5px;
}

.box-toggle-child-grid .btn-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
  opacity: 0;
  transition: all 0.3s ease;
  order: -1;
  flex-shrink: 0;
}

.box-toggle-child-grid:hover .btn-title {
  max-width: 150px;
  opacity: 1;
}

.accordion-item {
  transition: background 0.2s ease, color 0.2s ease;
  background: #fff;
}

.accordion-item:has(.accordion-toggle):hover {
  background: #eaeaea;
  transform: translateX(3px);
  transition: all .3s ease;
}

.grids-accordion .accordion-item.open {
  background: #eaeaea;
  transform: translateX(3px);
  transition: all .3s ease;
}


/* Caret indicator (right) - Style moderne */
/* Conteneur pour le fond (ne tourne pas) */
.grids-accordion .accordion-toggle::after {
  content: '';
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 60px;
  background: rgba(29, 73, 114, 0.1);
  border-radius: 0px;
  outline: 2px solid var(--primary-color);
  position: absolute;
  right: 0px;
  outline-offset: -4px;
  transition: background .2s ease, outline-color .2s ease, border-radius .2s ease;
}

/* Chevron à l'intérieur du conteneur (tourne uniquement) */
.grids-accordion .accordion-toggle::before {
  content: '\f0d7';
  /* Font Awesome caret-down */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--primary-color);
  font-size: 12px;
  transition: transform .2s ease, color .2s ease;
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

.grids-accordion .accordion-item.open .accordion-toggle::after {
  background-color: var(--primary-color);
  outline-color: white;
  border-top-right-radius: 0 !important;
  height: 120%;
  top: 0;
  z-index: 1;
}

.grids-accordion .accordion-item.open .accordion-toggle::before {
  color: white;
  transform: translateY(-50%) rotate(180deg);
  top: 60% !important;
}

.grids-accordion .accordion-item:hover .accordion-toggle::after {
  outline-color: white;
}

.grids-accordion .accordion-item:hover .accordion-toggle::before {
  color: white;
}
.table-controls-row {
  z-index: 1;
  position: relative;
}

/* NOUVEAU : Styles pour les accordéons verrouillés par une modale */
.accordion-item.locked {
  opacity: 0.6;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid var(--accent-color);
  position: relative;
}

.accordion-item.locked::before {
  content: '\f07c';
  /* Font Awesome window-restore */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  right: 70px;
  transform: translateY(-50%);
  color: var(--accent-color);
  font-size: 14px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 6px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.accordion-item.locked .accordion-toggle {
  cursor: pointer;
  color: var(--accent-color);
  font-weight: 500;
}

.accordion-item.locked .accordion-toggle::after {
  background: rgba(255, 193, 7, 0.1);
  outline-color: var(--accent-color);
  transform: translateX(-2px);
}

.accordion-item.locked .accordion-toggle::before {
  content: '\f2d0';
  /* Font Awesome external-link-alt */
  color: var(--accent-color);
  transform: translateY(-50%) translateX(-2px);
}

.accordion-item.locked:hover {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  transform: translateX(2px);
}

.accordion-item.locked:hover .accordion-toggle::after {
  background: rgba(255, 193, 7, 0.2);
  outline-offset: -3px;
  transform: translateX(0);
}

.accordion-item.locked:hover .accordion-toggle::before {
  transform: translateY(-50%) translateX(0);
}

/* Hover effect pour les chevrons */
.grids-accordion .accordion-item:not(.open):hover .accordion-toggle::after {
  transform: translateX(0px);
  background-color: rgba(29, 73, 114, 0.3);
  outline-color: white !important;
}

.grids-accordion .accordion-item:not(.open):hover .accordion-toggle::before {
  color: white !important;
  transform: translateY(-50%);
}

.grids-accordion .accordion-item.open:hover .accordion-toggle::after {
  transform: translateX(0px);
}

.grids-accordion .accordion-item.open:hover .accordion-toggle::before {
  transform: translateY(-50%) rotate(180deg);
}

.grids-accordion .accordion-item:first-of-type .accordion-toggle::after {
  border-top-right-radius: 20px;
  border-bottom-left-radius: 10px;
}

.grids-accordion .accordion-item:first-of-type:hover .accordion-toggle::after {
  border-top-right-radius: 20px;
  border-bottom-left-radius: 20px;
}

.grids-accordion .accordion-item:first-of-type.open .accordion-toggle::after {
  border-top-right-radius: 20px !important;
  border-bottom-left-radius: 0px;

}

.grids-accordion .accordion-item:last-of-type .accordion-toggle::after {
  border-bottom-right-radius: 20px;
  border-top-left-radius: 10px;
}

.grids-accordion .accordion-item:last-of-type.open .accordion-toggle::after {
  border-top-left-radius: 20px;
  border-bottom-right-radius: 0px;
}

.grids-accordion .accordion-item:last-of-type.open:hover .accordion-toggle::after {
  border-bottom-right-radius: 0px;
  border-top-left-radius: 20px;
}

.grids-accordion .accordion-item:last-of-type:hover .accordion-toggle::after {
  border-bottom-right-radius: 20px;
}

.grids-accordion .accordion-item:not(:first-of-type):not(:last-of-type) .accordion-toggle::after {
  border-bottom-left-radius: 10px;
  border-top-left-radius: 10px;
}

.grids-accordion .accordion-item:not(:first-of-type):not(:last-of-type):hover .accordion-toggle::after {
  border-bottom-left-radius: 20px;
  border-top-left-radius: 20px;
}

.grids-accordion .accordion-item.open:not(:first-of-type):not(:last-of-type) .accordion-toggle::after {
  border-bottom-left-radius: 0px;
  border-top-left-radius: 20px;
  border-bottom-right-radius: 0px;
  border-top-right-radius: 0px;
}

.grids-accordion .accordion-content {
  background: #f8f9fa;
  transition: max-height 0.25s ease;
}

.accordion-item.open .accordion-content {
  border-bottom: 10px solid var(--primary-color);
}

/* Indentation visuelle pour les enfants */
.grids-accordion .accordion-header[data-module-id][data-parent="true"] .accordion-toggle {
  padding-left: 32px;
}


.grids-accordion .accordion-item.loading .accordion-toggle::after {
  background-image: none;
  border: 2px solid #cfd4da;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  right: 23px;
  top: 50%;
  transform: translateY(-50%);
}

.grids-accordion .accordion-item.loading .accordion-toggle::before {
  animation: spin 0.8s linear infinite;
  content: '';
  width: 14px;
  height: 14px;
  right: 23px;
  top: 50%;
  transform: translateY(-50%);
  border: 2px solid #cfd4da;
  border-top-color: var(--primary-color);
  border-radius: 50%;
  background: transparent;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Styles pour les dropdowns contextuels de CTableBuilder */
.tabulator-context-menu {
  position: fixed;
  z-index: 99999;
  display: block;
}

.tabulator-context-menu[data-position] {
  position: fixed;
  left: var(--dropdown-left, 0);
  top: var(--dropdown-top, 0);
}

.tabulator-context-menu .dropdown-menu {
  position: static;
  max-height: 400px;
  border-radius: 4px;
  overflow-y: auto;
  display: block;
  margin: 0;
  padding: 5px 0;
  font-size: 13px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 8px 0;
  margin-top: 5px;
  z-index: 1000;
}

.tabulator-context-menu .dropdown-menu .dropdown-divider {
  height: 0;
  margin: 0.5rem 0;
  overflow: hidden;
  border-top: 1px solid #e9ecef;
}

.tabulator-context-menu .dropdown-menu .dropdown-header {
  display: block;
  padding: 3px 20px;
  margin-bottom: 0;
  font-size: 0.875rem;
  color: #6c757d;
  white-space: nowrap;
}

.tabulator-context-menu .dropdown-menu span.dropdown-item {
  width: 100%;
  clear: both;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  cursor: pointer;
  border: 0;
  box-sizing: border-box;
  padding: 4px 8px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  font-size: 10px;
}

.tabulator-context-menu .dropdown-menu span.dropdown-item:hover {
  background-color: #f8f9fa;
  color: var(--secondary-color);
  padding-left: 20px;
}

/* Actions de modale cohérentes (remplace les styles inline JS) */
.lim-modal-actions {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #dee2e6;
  display: flex;
  gap: 10px;
  justify-content: center;
}
