.bd-header {
    height: 90px;  
    font-size: 1.5rem; 
}

/* Agrandir le logo en haut à gauche */
.navbar-brand img {
  height: 60px;  /* Ajuste cette valeur selon tes besoins */
  max-height: none; /* Assure que le logo n'est pas limité en hauteur */
}


/* Supprimer les bordures et l’ombre des cartes */
.no-border {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.btn-primary { background-color: #2c6089; }
.btn-secondary { background-color: rgb(255, 255, 255); color: black; }





.sphinx-codeautolink-a{
    border-bottom-color: rgb(0, 0, 0);
    border-bottom-style: dotted;
    border-bottom-width: 1px;
  }
  .sphinx-codeautolink-a:hover{
    color: rgb(132, 0, 0);
  }
  
  .supportbutton a {
    color: var(--pst-color-link);
  }
  
  .navbar-brand {
  display: inline-block !important;
  }

/* -------------------- MATH -------------------- */

.bd-content div.math mjx-container {
    overflow-x: auto;
    overflow-y: hidden;
}

/* -------------------- THEME OVERRIDES -------------------- */

/* ── Conteneur principal ── */
.bd-container {
    width: 100%;
    max-width: 100%;
    padding-left:  2%;
    padding-right: 0%;
    box-sizing: border-box;
}

/* ── Sidebar gauche ── */
.bd-sidebar-primary {
    flex: 0 0 18%;
    background-color: var(--pst-color-sidebar);
}

/* ── Contenu central ── */
.bd-main {
    flex: 1 1 auto;
    background-color: var(--pst-color-background) !important;
    min-width: 0;
}

/* ── Sidebar droite ── */
.bd-sidebar-secondary {
    flex: 0 0 30%;
    background-color: var(--pst-color-sidebar);
    font-size: 0.8rem;
}

/* ── Contenu centré par défaut ── */
.bd-main .bd-content {
    justify-content: center;
    max-width: 100%;
}

/* ── Pages de doc uniquement ── */
.bd-article-container {
    max-width: 95%;
}

html[data-theme="light"] {
    --pst-color-primary: #2c6089;
    --pst-color-secondary: rgb(238 144 64);
    --pst-color-plot-background: rgb(255, 255, 255);
    --pst-color-background: #ffffff;
    --pst-color-sidebar: #ffffff;
}

html[data-theme="dark"] {
    --pst-color-primary: #2c6089;
    --pst-color-secondary: rgb(238 144 64);
    --pst-color-plot-background: rgb(218, 219, 220);
}

/* Override for example gallery - remove border around card */
.bd-content div.sd-card.example-gallery {
    border: none;
}


  /* -------------------- HOMEPAGE -------------------- */

/* Hero */
#hero {
    display: flex;
    flex-direction: row;
    min-height: min(calc(80vh), 1100px); /* Make hero fill up most of the page on load */
  }
  #hero-left {
    max-width: 952px;
    width: 90%;
    margin: auto 0;
  }
  
  .homepage-button-container {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
  }
  .homepage-button-container-row {
    display: flex;
    flex-wrap: wrap;
  }
  
  .homepage-button-container a {
    transition: 0.1s;
  }
  .homepage-button {
    min-width: 142px;
    padding: 0.5em 2em;
    border: 1px solid var(--pst-color-primary);
    border-radius: 4px;
    margin: 1em 0.5em 0.5em 0;
  }
  .primary-button {
    background-color: var(--pst-color-primary);
    color: var(--pst-color-background) !important;
  }
  .secondary-button {
    background-color: var(--pst-color-background);
    color: var(--pst-color-primary);
  }
  .homepage-button:hover {
    text-decoration: none;
    background-color: var(--pst-color-secondary);
    color: var(--pst-color-background);
    border: 1px solid var(--pst-color-secondary);
  }
  .homepage-button-link {
    text-decoration: underline;
  }

/* Responsive */
@media (max-width: 768px) {
    #hero {
      display: block;
    }
    #hero-left,
    #hero-right {
      width: 100%;
      min-width: 0px;
    }
    .support-arviz-img-donate img {
      display: none;
    }
    .support-arviz-img-donate-responsive img {
      display: block;
    }
  }


/* -------------------- HOMEPAGE + EXAMPLE GALLERY -------------------- */

/* Homepage - grid layout */
.home-flex-grid {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 10px;
  padding: 20px 0px 40px;
}

/* Homepage + Example Gallery Body - Set dimensions */
.home-img-plot,
.bd-content div.sd-card.example-gallery .sd-card-body,
.home-img-plot-overlay,
.example-img-plot-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 10px;
}
.home-img-plot,
.home-img-plot-overlay {
  width: 235px;
  height: 130px;
}
.bd-content div.sd-card.example-gallery .sd-card-body,
.example-img-plot-overlay {
  width: 100%;
  height: 150px;
}
.home-img-plot img,
.bd-content div.sd-card.example-gallery .sd-card-body img {
  /* Images keep aspect ratio and fit in container */
  /* To make images stretch/fill container, change to min-width */
  max-width: 100%;
  max-height: 100%;
}

/* Homepage + Example Gallery Body - Set color and hover */
.home-img-plot.img-thumbnail,
.bd-content div.sd-card.example-gallery .sd-card-body {
  background-color: var(--pst-color-plot-background);  /* Same as img-thumbnail from pydata css, adjusted for dark mode */
}
.home-img-plot-overlay,
.example-img-plot-overlay,
.bd-content div.sd-card.example-gallery .sd-card-body {
  border: 1px solid #dee2e6;  /* Same as img-thumbnail from pydata css */
  border-radius: 0.25rem;  /* Same as img-thumbnail from pydata css */
}
.home-img-plot-overlay,
.example-img-plot-overlay,
.example-img-plot-overlay p.sd-card-text {
  background: var(--pst-color-primary);
  position: absolute;
  color: var(--pst-color-background);
  opacity: 0;
  transition: .2s ease;
  text-align: center;
  padding: 10px;
  z-index: 998;  /* Make sure overlay is above image...this is here to handle dark mode */
}
.home-img-plot-overlay:hover,
.bd-content div.sd-card.example-gallery:hover .example-img-plot-overlay,
.example-img-plot-overlay p.sd-card-text {
  opacity: 90%;
}