html, body {
  height: 100%;
  margin: 0;
}

.layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  background-color: #18a689;
  flex-shrink: 0;
}

#imageLogo {
  max-height: 100px;
}

.content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.sidebar {
  width: 20%;
  min-width: 300px;
  overflow-y: auto;
  background-color: white;
  margin-bottom: 2.5rem;
  scrollbar-width: thin;
  /* Firefox */
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
  scrollbar-gutter: stable;
}

.sidebar::-webkit-scrollbar {
  width: 8px;
  background: transparent;
  /* Fond transparent */
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  /* Barre semi-transparente */
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: content-box;
  /* Permet au fond de passer a travers */
}

.main {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 767.98px) {
  .sidebar {
    display: none !important;
  }
}
footer {
  background-color: #38041E;
  color: #d12076;
  height: 2.5rem;
  font-size: small;
}

#langues {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  /* Prend la taille du contenu */
  white-space: nowrap;
  /* Empeche les retours a la ligne */
  text-align: right;
  margin-top: 10px;
  margin-right: 10px;
  padding-right: 10px;
  font-size: large;
  color: #ffffff;
  z-index: 100;
  background-color: transparent;
  /* ou une couleur si besoin */
  width: auto !important;
  /* Force la largeur au contenu */
  max-width: max-content;
}

.lettreContainer {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: white;
  padding-bottom: 0.5rem;
}

.lettres {
  width: 100%;
  text-align: justify;
  font-size: medium;
  margin-top: 20px;
  cursor: default;
  color: lightgray;
  font-weight: bolder;
}

.lettresGras {
  width: 100%;
  text-align: justify;
  font-size: medium;
  font-weight: bolder;
  margin-top: 20px;
  cursor: pointer;
}

#tabListeLettres {
  width: 100%;
}

#tabListeLettres td {
  text-align: center;
}

#tabListeLettres td.sTout {
  width: 1%;
  white-space: nowrap;
}

#tabListeLettres td.sLettre {
  width: 6%;
}

.lettreLangues {
  cursor: pointer;
}

.not-active {
  pointer-events: none;
  cursor: not-allowed;
}

/*.grid-sizer,
.grid-item {
    width: 50%;
    padding-left: 5px;
    padding-right: 5px;
}*/
.grid {
  width: 100%;
  margin-left: -15px;
}

.grid-sizer,
.grid-item {
  width: calc(50% - 15px);
  /* 2 colonnes */
  margin-left: 15px;
  margin-bottom: 15px;
  box-sizing: border-box;
}

.grid-item--width2 {
  width: calc(66.666% - 10px);
}

.grid-item {
  box-sizing: border-box;
}

.menu-analyses a {
  color: #337ab7;
  text-decoration: none;
}

.menu-analyses a:hover {
  background-color: #e9ecef;
}

.customTextColor {
  color: #ffffff;
}

.dgvademecumTitle {
  color: #ffffff;
  font-size: x-large;
  font-weight: bolder;
}

.grid-item.full-width {
  width: calc(100% - 15px) !important;
}

@media print {
  html, body {
    max-width: none !important;
    width: 100% !important;
  }

  /* Masquer les scrollbars sans clipper le contenu */
  * {
    scrollbar-width: none !important;
  }

  *::-webkit-scrollbar {
    display: none !important;
  }

  /* Débloquer le scroll des conteneurs pour que tout le contenu soit imprimé */
  .main, .sidebar, .content {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Réinitialiser le positionnement absolu de Masonry — layout flexbox 2 colonnes */
  .grid {
    position: static !important;
    height: auto !important;
    margin-left: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .grid-sizer {
    display: none !important;
  }

  .grid-item {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: calc(50% - 4px) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .grid-item.full-width,
.grid-item:has(#generalitesCollapse) {
    width: 100% !important;
  }

  #generalitesCollapse .card-body {
    columns: 2;
    column-gap: 24px;
  }

  #generalitesCollapse .card-body .row {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Empêcher les cartes de se couper entre deux pages */
  .card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Forcer la couleur de fond des badges à l'impression (accrédité = vert, non accrédité = gris) */
  .badge {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
