html, body {
  height: 100%;
}

* {
  font-size: 14px;
  font-family: Helvetica, Arial, sans-serif;
  text-align: left;
  line-height: 1.2em;
  /* outline: 1px solid red; */
}

h1 {
  text-align: center;
}

label {
  font-weight: bold;
}

.hidden {
  display: none !important;
}

.warnPopup {
  display: none;
  width: 90%;
  margin: 2% 0 0 5%;
}

#mapid {
  height: 100%;
}

#wait {
  position: absolute;
  top: 45%;
  left: 45%;
  width: 60px;
  height: 60px;
  visibility: hidden;
  z-index: 905;

  border: 5px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;

  animation: spin 1s ease-in-out infinite;
  will-change: transform;
}

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

#voile {
  position: absolute;
  inset: 0;
  z-index: 900;
  visibility: hidden;
  opacity: 0.6;
  background-color: black;
}

#depart, #arrivee {
  padding: 1% 0 1% 0;
  width: 80%;
}

#entrerTrajet {
  position: fixed;
  width: 450px;
  top: 30px;
  left: 30px;
  padding: 12px 0 0 0;
  z-index: 600;

  background-color: #fefefe;
  border-radius: 5px;
  border: 1.5px solid green;
  
  display: flex;
  flex-direction: column;
  place-items: center;
  gap: 4px;
}

#entrerTrajet button {
  line-height: 1;
  overflow: visible;
}

#changerParam {
  display: flex;
  flex-direction: column;
  place-items: center;
  width: 95%;
  margin: 2% 0 4% 0;
  padding: 2%;
  gap: 15px;
  border: 1.5px solid lightgrey;
  border-left: 3px solid green;
}

#changerParam button {
  line-height: 0.4;
}

#autonomie {
  display: flex;
  flex-direction: column;
  place-items: center;
  gap: 10px;
  width: 100%;
}

#parametres {
  display: flex;
  gap: 10px;  
}

#autonomieModele,
#autoPerso,
#chargePercent {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.group {
  display: flex;
  align-items: center;
  gap: 5px;
}

#entrerAutonomie,
#charge {
  width: 50px;
  height: 20px;
  margin: -5px 0 0 10px;
}

input[type="text"] {
  padding: 0;
  box-sizing: border-box;
}

#infoTrajet {
  display: grid;
  grid-template-columns: auto auto;
  row-gap: 6px;
  column-gap: 100px;
  border: 2px solid green;
  border-radius: 8px;
  width: 90%;
  margin: 0 3% 3% 3%;
  padding: 2%;
  transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease, border-width 0.3s ease;
  overflow: hidden;
}

#infoTrajet.anim-hidden {
  max-height: 0;
  padding: 0;
  margin: 0;
  border-width: 0;
  pointer-events: none;
}

#infoTrajet dd {
  margin: 0;
  text-align: right;
}

#infoTrajet dt {
  font-weight: normal;
  text-align: left;
}

#directions {
  position: fixed;
  top: 30px;
  bottom: 30px;
  right: 30px;
  width: 20%;
  height: 90%;
  background-color: #fefefe;
  border: 1.5px solid green;
  border-radius: 5px;
  overflow: hidden;
  z-index: 400;
  transform: translateX(0);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#directions h1 {
  flex: 0 0 auto;
  padding: 10px;
  width: 80%;
  border-bottom: 2px solid lightgrey;
}

#directions.anim-hidden {
  transform: translateX(110%);
  pointer-events: none;
}

#toggleDirections {
  position: fixed;
  top: 50px;
  right: 50px;
  width: 25px;
  height: 25px;
  background-color: rgba(0, 128, 0, 0.75);
  color: white;
  cursor: pointer;
  padding: 5px;
  text-align: center;
  z-index: 1000;
  transition: 0.3s;
}

#route-narrative {
  width: 100%;
  flex: 1 1 auto;
  overflow: auto;
  padding: 2%;
  white-space: nowrap;
}

#route-narrative ul {
  display: inline-block;
  min-width: 100%;
  border: none;
  background-color: #fefefe;
}

#route-narrative li {
  display: block;
  min-width: 100%;
  border: none;
  border-bottom: 1px solid lightgrey;
}

@media screen and (max-width: 999px) {
  #entrerTrajet {
    height: 200px;
    overflow: hidden;
  }

  #directions {
    width: 0;
    overflow: hidden;
  }
}
