/* ============================ */
/* ========== GLOBAL ========== */
/* ============================ */

/* ---------- All ---------- */

* {
  font-family: Barlow, sans-serif !important;
}

a {
  color: #245aa6 !important;
}

div[class^="leaflet"] a {
  color: initial !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #4c585e;
  font-weight: bold;
}

/* ---------- Header/Nav ---------- */

.navbar,
.navbar-cigale,
.navbar-cigale-logo,
#version-inv-nav {
  background-color: #245aa6 !important;
}

.fixed-top {
  z-index: 9999;
}

#navbarSupportedContent ul li a {
  color: white !important;
  font-size: 0.9rem;
  text-transform: uppercase;
}

#navbarSupportedContent ul li a i {
  margin-right: 3px;
}

body:not(#methazoom) .navbar-toggler {
  all: unset !important;
  border: 0;
  font-size: 1rem !important;
  cursor: pointer !important;
  background-color: white !important;
  border-radius: 50% !important;
  border: solid 3px #fbb911 !important;
  width: 26px !important;
  padding: 5px !important;
}

body:not(#methazoom) .navbar-toggler:focus {
  border: solid 1px white;
  outline: unset;
}

body:not(#methazoom) .navbar-toggler-icon {
  background-image: none !important;
}

body:not(#methazoom) .navbar-toggler-icon::after {
  content: "\F479";
  font-family: Bootstrap-icons;
  font-size: 20px;
  color: black;
  position: relative;
  top: -3px;
  left: 3px;
}

/* ---------- Left column ---------- */

#visualisation-col-left,
#left-block {
  background-color: #f0f1f4;
  box-shadow: 0 0 7px silver inset;
}

.select-header {
  color: #245aa6;
  font-weight: bold;
  text-transform: uppercase;
  margin-top: 2rem;
}

:is(#tdb-select-territoires, #visualisation-select-territoires, #select-zones)
  + button {
  width: 87%;
  position: relative;
  left: 1.5rem;
  background-color: #245aa6;
  color: white;
  padding: 0.6rem;
}

:is(#tdb-select-territoires, #visualisation-select-territoires, #select-zones)
  + button::before {
  content: "\F3EA";
  font-family: Bootstrap-icons;
  margin-right: 5px;
}

:is(#tdb-select-territoires, #visualisation-select-territoires, #select-zones)
  + button:hover {
  text-shadow: 0 0 1px white;
}

.dropdown-menu {
  overflow-x: auto;
  width: 90% !important;
  top: 10px !important;
  left: 23px !important;
}

.dropdown-menu.inner.show {
  position: relative;
  top: -2.2rem;
}

.dropdown-menu .selected {
  width: 90% !important;
}

.dropdown-item {
  font-size: 0.9rem;
}

#bs-select-1 {
  overflow-x: auto;
}

#bs-select-1 a {
  color: black !important;
  padding-left: 0;
  padding-right: 0;
}

#bs-select-1 a.active,
#bs-select-1 a:active {
  color: #245aa6;
  background-color: rgba(36, 90, 166, 0.1) !important;
}

#left-layers [id^="ButtonTheme"] {
  overflow: hidden;
  padding: 1rem;
  font-weight: bold;
  text-transform: uppercase;
  border: solid 1px #f0f1f4;
  margin-top: 0.6rem;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 0 1px #ddd;
  color: black;
  border-radius: 0 5px 5px 0 !important;
  border-left: solid 3px #245aa6 !important;
  transition: transform 0.1s ease;
  cursor: pointer;
}

:is(#theme1, #theme2, #theme3, #theme4, #theme5, #theme6, #theme7) .card-body {
  border: 0;
  border-radius: 0;
  width: 84%;
  margin-left: auto;
  margin-right: auto;
  background-color: white;
  padding: 0.75rem;
}

#left-layers [id^="ButtonTheme"]::after {
  border: solid 2px rgba(251, 185, 17, 0.3);
  width: 20px;
  display: block;
  position: relative;
  left: -5px;
}

#left-layers [id^="ButtonTheme"]:not(.active):hover {
  background-color: white;
  transform: scale(1.05);
}

#left-layers [id^="ButtonTheme"].active {
  color: #245aa6;
  background-color: rgba(36, 90, 166, 0.1);
  border: 0;
}

.list-group {
  width: 96%;
  margin: auto;
  background-color: #f0f1f4;
}

.list-group-item:not(.toggle-ht-button):hover {
  background-color: #f0f1f4;
}

input.info:checked + .slider {
  background-color: #245aa6;
}

.layer-sous-onglet {
  color: #245aa6;
}

/* ---------- Map (center) ---------- */

path[stroke="#25a4f2"] {
  stroke: white !important;
  stroke-width: 2px;
}

path[stroke="#3DE0F5"] {
  stroke: black !important;
  stroke-width: 3px;
}

#btn-container-visualisation-col-map {
  border-radius: 20px 0 0 20px;
  background-color: white;
}

.bi-arrow-left {
  color: #245aa6;
}

.bi-arrow-right {
  color: #245aa6;
}

.legend-title {
  margin-top: 0;
  margin-bottom: 0.1rem;
  line-height: 1.5 !important;
}

.legend.leaflet-control {
  color: black;
  text-align: left;
  font-size: 0.75rem;
  line-height: 1.1;
  background-color: rgba(255, 255, 255, 0.9);
  min-width: unset;
  border-right: solid 1px #f0f1f4;
  border-radius: 5px;
  overflow-y: hidden;
}

.legend.leaflet-control img {
  margin-top: 5px;
}

/* ---------- Right column ---------- */

#tdb-graph-title-toggle {
  background: url("https://bilan.atmosud.org/user/images/g5_helium/nuages.jpg")
    center;
}

#poll_selector,
#year_selector,
#seuil_selector {
  color: #4c585e;
  background-color: white;
  padding: 0.5rem;
  text-align: left;
  border: solid 1px #ddd;
  box-shadow: 0 0 3px #f0f1f4;
  margin: 7px;
}

.change_poll_label,
.change_year_label,
.change_seuil_label {
  color: black;
  font-size: 0.8rem !important;
  margin: 0;
}

.change_seuil_label {
  width: 120px;
}

#visualisation-row-graphiques,
#visualisation-report-block {
  background-color: white;
}

.shadow-custom-graph {
  box-shadow: 0 0 7px #f0f1f4;
  border-radius: 5px;
}

[id^="visualisation-graph-block-"].datablock {
  margin-bottom: 1rem !important;
  background-color: white;
  padding: 0.25rem;
}

[id^="visualisation-graph-block-"].datablock > div {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 5px !important;
}

[id^="visualisation-graph-block-"].datablock > div > div {
  margin-right: auto !important;
  margin-left: unset !important;
}

[id^="visualisation-graph-block-"].datablock .h5 {
  font-size: 1rem !important;
  color: #245aa6;
}

[id^="visualisation-graph-block-"] > div:not(.btn) {
  color: #4c585e !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* =========================== */
/* ========== PAGES ========== */
/* =========================== */

:is(#tdb, #visualisation) #left-layers [id^="ButtonTheme"]::before {
  font-family: Bootstrap-icons;
  margin-right: 0.5rem;
  position: relative;
  top: 1px;
  font-weight: normal;
}

/* ---------- Tableau de bord ---------- */

/* Left */

#tdb #left-layers #ButtonTheme4::before {
  content: "\F425";
}
#tdb #left-layers #ButtonTheme2::before {
  content: "\F4D4";
}
#tdb #left-layers #ButtonTheme1::before {
  content: "\F6F7";
}
#tdb #left-layers #ButtonTheme3::before {
  content: "\F840";
}
#tdb #left-layers #ButtonTheme6::before {
  content: "\F185";
}
#tdb #left-layers #ButtonTheme5::before {
  content: "\F186";
}
#tdb #left-layers #ButtonTheme7::before {
  content: "\F4D0";
}

/* Center */

path[stroke="#25a4f2"] {
  stroke: black !important;
  stroke-width: 3px;
}

/* Right */

#tdb .highcharts-container:has(svg[aria-label="Consommation d'énergie par secteur en GWH"]) {
  min-height: 400px;
  max-height: 400px;
}

#tdb #toggle-ht {
  padding: 0.75rem 0.75rem 0.25rem 0.75rem;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  padding: 18px 5px 5px 5px !important;
  background-color: rgba(255, 255, 255, 0.2);
}

#tdb .toggle-ht-button {
  border: 0;
  color: black !important;
  font-weight: bold;
  padding: 1.2rem;
  background-color: rgba(255, 255, 255, 0.6) !important;
  box-shadow: 0 0 2px silver inset;
}

#tdb #toggle-ht-content {
  display: inline-flex;
  width: 100%;
}

/* ---------- Visualisation ---------- */

#visualisation #left-layers #ButtonTheme1::before {
  content: "\F6F7";
}
#visualisation #left-layers #ButtonTheme2::before {
  content: "\F187";
}
#visualisation #left-layers #ButtonTheme3::before {
  content: "\F5D1";
}
#visualisation #left-layers #ButtonTheme4::before {
  font-family: "bootstrap-icons"; 
  content: "\F903";
}

/* ---------- Méthazoom ---------- */

#methazoom .highcharts-container {
  height: 400px !important;
}

#methazoom [id^="ThemeMethodo"] {
  border: 0;
}

#methazoom [id^="ButtonTheme"].active [id^="ThemeMethodo"] {
  color: white !important;
  background-color: #245aa6;
}

#map-block .leaflet-draw a {
  color: white !important;
}

/* ---------- Données ---------- */

#donnees .col-md-12.contact-col-header {
  margin-top: 12%;
}

/* ---------- Documentation ---------- */

#documentation h1 {
  font-size: 1.2rem;
}

#documentation .title_frame {
  color: #4c585e;
}

#documentation .souligne-orange {
  border: 0;
}

#documentation .documentation_frame {
  background-color: #f0f1f4;
  border-color: #ddd;
}

/* ---------- Contact ---------- */

.contact-row-header {
  margin-top: 4%;
}

/* ================================ */
/* ========== RESPONSIVE ========== */
/* ================================ */

@media screen and (min-width: 900px) {
  body:not(#methazoom) #navbarSupportedContent ul {
    width: 75%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0.75rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-around;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 0 1px white;
  }

  body:not(#methazoom) #navbarSupportedContent ul li {
    margin: 0.5rem 0 0.5rem 0 !important;
  }

  body:not(#methazoom) #navbarSupportedContent ul li a:hover {
    color: #fbb911 !important;
  }
}

/* Fix d'un bug au passage plein ecran / fenetré sur le graphique bulle */
#visualisation-graph-block-G {
  max-height: 500px;
}