/* Change la marge bout d'export  */
.table-menu {
  font-size: 16px;
  margin: 12px;
  height: 36px;
}

.table-menu > * {
  margin: 8px;
  float: left;
}

#source_table p {
  line-height: 1.5;
}

#source_table {
  margin-bottom: 25px;
}

#instructions {
  max-width: 1000px;
}

details > div {
  padding-top: 24px;
}

/* Logo et version */

a.logo {
  color: black;
  text-decoration: none;
  float: left;
}

p.version {
  float: left;
  margin-top: 21px;
  margin-left: 12px;
}

p.version > a {
  text-decoration: none;
  margin-top: 10px;
}

.navbar-brand {
  margin-right: 2px;
}

/* Réduire la taille du texte de la colonne Objet */

/*
td[data-dash-column="objet"],td[data-dash-column="titulaire_nom"],td[data-dash-column="acheteur_nom"],  {
  font-size: 85%;
}*/

/* Couleur des en-têtes */
.dash-table-container
  .dash-spreadsheet-container
  .dash-spreadsheet-inner
  th.dash-header {
  background-color: #b33821;
  color: white;
  font-family: "Open Sans", sans-serif;
  text-align: left;
}

.dash-table-container
  .dash-spreadsheet-container
  .dash-spreadsheet-inner
  th.dash-filter {
  background-color: #f0afa3;
}

.dash-table-container p {
  margin-bottom: 0;
}

.dash-filter--case {
  display: none;
}

.dash-tooltip,
.dash-table-tooltip {
  color: #333;
  width: 400px !important;
  max-width: 400px !important;
  height: 150px !important;
  max-height: 150px !important;
  overflow: hidden;
}

.dash-tooltip pre,
.dash-tooltip code {
  overflow: hidden;
  height: 150px;
  text-wrap: wrap;
  font-family: "Open Sans", sans-serif;
}

/* Menu de masquage des colonnes */
.column-actions {
  margin-right: 8px;
}

.column-header--hide {
  display: none;
}

.show-hide {
  position: relative;
  width: 180px;
  margin: 0 0 10px 10px;
}

.show-hide::before {
  background: inherit;
  content: "Colonnes affichées";
  position: absolute;
  left: 5px;
  right: 5px;
}

.show-hide-menu-item > input {
  margin-right: 10px;
}

/* Alternance des couleurs pour les lignes */
.marches_table table td,
.marches_table table th {
  font-family: "Open Sans", sans-serif;
}

.marches_table.stuck {
  position: relative;
  right: 200px;
}

.marches_table .cell-table tr:nth-child(even) td {
  background-color: #feeeee;
  font-family: "Open Sans", sans-serif;
}

#header > *,
.dash-spreadsheet-menu button.export {
  margin: 0 0 20px 20px;
}

/* Annonces */
#announcements {
  margin: 25px 40px 0 60px;
  font-size: 90%;
  max-width: 900px;
}

/* Page de recherche */

.tagline {
  text-align: center;
  font-size: 120%;
  display: block;
  margin-top: 50px;
}

#search {
  margin: 30px auto 0px auto;
  width: 500px;
  font-size: 16px;
  height: 30px;
  display: block;
}

.search_options {
  margin: 16px auto;
  width: 450px;
}

.search_options input {
  margin-right: 12px;
}

.results_acheteur {
  grid-column: 1;
  grid-row: 1;
}

.results_titulaire {
  grid-column: 2;
  grid-row: 1;
}

/* Menu de navigation */

h3 {
  margin: 36px 0 20px 0;
}

summary > h3 {
  margin: 0;
  display: inline;
}

#_pages_content {
  padding: 28px 24px 0 24px;
}

/* Vue acheteur/titulaire/recherche    */
.wrapper {
  display: grid;
  grid-gap: 10px;
  margin-bottom: 50px;
  justify-content: space-between;
}

.org_title {
  grid-column: 1 / 3;
  grid-row: 1;
}

.org_year {
  grid-column: 3;
  grid-row: 1;
}

.org_infos {
  grid-column: 1;
  grid-row: 2;
}

.org_infos > p {
  margin: 8px 0;
}

.org_stats {
  grid-column: 2;
  grid-row: 2;
}

.org_map {
  grid-column: 3;
  grid-row: 2;
}

.org_top {
  grid-column: 1/3;
  grid-row: 3;
}

@media (max-width: 992px) {
  #announcements-nav {
    display: none !important;
  }
}

/* CSS for the /a-propos page Layout and Table of Contents */

.a-propos-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.a-propos-content {
  flex: 1 1 70%;
  max-width: 75%;
  padding-right: 40px;
}

.a-propos-toc {
  flex: 0 0 25%;
  max-width: 25%;
  /* Keeps it from growing too large */
  position: sticky;
  top: 40px;
  /* Sticks 40px from the top of the viewport */
  border-left: 2px solid #333;
  /* Dark vertical line like hedgedoc */
  padding-left: 15px;
  margin-top: 40px;
  background-color: #fff;
  /* Aligns visually with the first header */
}

/* Hide TOC on smaller screens */
@media (max-width: 992px) {
  .a-propos-content {
    max-width: 100%;
    padding-right: 0;
    flex: 1 1 100%;
  }

  .a-propos-toc {
    display: none;
  }
}

/* Styling for TOC links */
.toc-link {
  display: block;
  color: #666;
  text-decoration: none;
  font-size: 0.9em;
  padding: 2px 0;
  transition: color 0.2s, font-weight 0.2s;
  line-height: 1.4;
}

.toc-link:hover {
  color: #000;
  text-decoration: none;
}

.toc-active {
  color: #000;
  font-weight: bold;
}

/* Indentation for H5 levels (Level 2 in our simplified TOC) */
/* Using specific classes if I generate them, or just generic hierarchy if nested */
.toc-level-2 {
  margin-left: 15px;
  font-size: 0.85em;
}

/* Header title for TOC (optional) */
.toc-header {
  font-weight: bold;
  margin-bottom: 10px;
  display: block;
  color: #333;
}
