body {
  height: 100%;
  font-family: "Open Sans", sans-serif;
}

.map {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

/* Map control */
.ol-zoom-in,
.ol-zoom-out {
  /* background-color: #0071bc !important; */
  background-color: rgba(255, 255, 255, 0.7) !important;
  color: #0071bc !important;
  box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
}

.ol-attribution a {
  color: #0071bc !important;
}

/*scale-line*/
.maplibregl-ctrl-scale {
  border: 2px solid hsl(204, 50%, 50%);
  border-top: none;
  padding: 0.1em;
  position: absolute;
  bottom: 1.5em;
  right: -0.2rem;
  text-align: center;
  z-index: 1;
}

.maplibregl-ctrl-scale-inner {
  color: #0071bc;
  font-weight: bold;
  font-size: 12px;
  margin: 0;
}

.maplibregl-ctrl-scale-line {
  border-top: 2px solid #0071bc;
  height: 2px;
  margin-top: 5px;
  width: 100%;
}

#zoom-control {
  display: block;
  position: absolute;
  bottom: 7.2em;
  right: 3em;
  z-index: 99;
}

/* Legend */
#legend {
  position: absolute;
  bottom: 0.5em;
  left: 45%;
  z-index: 99;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 2px;
  border-radius: 3px;
  cursor: pointer;
  pointer-events: none;
  box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
}

#legend div {
  display: inline-block;
}

.legend {
  color: #0071bc;
  margin: 0px 10px;
  font-size: 0.6rem;
  /* font-weight: bold; */
}

#legend .item {
  display: inline-block;
  margin: 0px 5px;
  width: 20px;
  height: 4px;
}

/* Copyright and logo */
#branding {
  position: absolute;
  top: 0.5em;
  left: 0.5em;
  z-index: 99;
  /* font-size: 12px; */
  background-color: rgba(255, 255, 255, 0.7);
  /* background-image: url("../img/tag-ip-traffic-desktop.svg"); */
  /* background-position: center; */
  /* background-repeat: no-repeat; */
  /* background-origin: padding-box; */
  /* background-size: 20rem; */
  padding: 0.7rem;
  border-radius: 1rem;
  box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
  width: 20rem;
  /* height: 10rem; */
}

#branding-cua {
  position: absolute;
  bottom: .5em;
  left: .5em;
  z-index: 99;
  background-color: rgba(255, 255, 255, .7);
  padding: .5rem;
  margin: auto;
  border-radius: .5rem;
  box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, .2);
  width: 5rem;
}

#img-logo-cua {
  width: 5rem;
}

a:hover img {
  border: 0;
}

a img {
  border: 0;
}

/* Number of connected vehicles */
#vehicle {
  position: absolute;
  bottom: 0.5em;
  left: 0.5em;
  padding: 1em;
  font-size: 1em;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 99;
  border-radius: 3px;
  pointer-events: none;
  /* width: 213px; */
  text-align: center;
  box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  color: #0071bc;
}

#vehicle span.label {
  text-transform: uppercase;
  color: #333;
}

.smart {
  padding: 1em;
  text-align: center;
}

/*attribution control*/
#attribution-control {
  position: absolute;
  bottom: .3em;
  right: 0;
  z-index: 99;
  width: 100%;
  padding-bottom: 0;
}

/* Container du sélecteur */
#map-selector-container {
position: absolute;
top: 20px;
right: 20px;
z-index: 100;
cursor: pointer;
}

.layer-icon-wrapper {
background: #0071bc !important; 
padding: 8px;
border-radius: 4px;
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
display: flex;
justify-content: center;
align-items: center;
width: 25px;
height: 25px;
}

.layer-icon {
width: 25px;
height: 25px;
background-color: #ffffff !important; 
-webkit-mask: url("../img/layers.svg") no-repeat center / contain;
mask: url("../img/layers.svg") no-repeat center / contain;
}

/* Menu des calques */
.layer-menu {
position: absolute;
top: 100%; 
right: 0; 
white-space: nowrap; 
background: white;
padding: 10px;
border-radius: 4px;
margin-top: 5px;
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
display: none; 
flex-direction: column;
gap: 8px;
}

#map-selector-container:hover .layer-menu {
display: flex !important;
}

.layer-menu label {
font-family: 'Open Sans', sans-serif;
font-size: 13px;
cursor: pointer;
display: flex;
align-items: center;
gap: 5px;
color: #333;
}

@media only screen and (max-width: 900px) {
  #branding {
    position: absolute;
    top: 0.5em;
    left: 0.5em;
    z-index: 99;
    /* font-size: 12px; */
    background-color: rgba(255, 255, 255, 0.7);
    /* background-image: url("../img/tag-ip-traffic-desktop.svg"); */
    /* background-position: center; */
    /* background-repeat: no-repeat; */
    /* background-origin: padding-box; */
    /* background-size: contain; */
    padding: 0.7rem;
    border-radius: 1rem;
    box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
    width: 10rem;
    /* height: 5rem; */
  }

  #branding-cua {
    position: absolute;
    bottom: 4em;
  }

  #img-logo-cua {}

  #legend {
    position: absolute;
    margin-bottom: -2em;
  }

  /*#vehicle {
position: absolute;
bottom: 2.2em;
left: 0.3em;
padding: 1em;
font-size: 0.5em;
background-color: rgba(255, 255, 255, 0.7);
z-index: 99;
border-radius: 3px;
pointer-events: none;
width: 213px; 
text-align: center;
box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
font-weight: bold;
color: #0071bc;
}*/

  #legend {
    position: absolute;
    bottom: 3.5em;
    left: 0.3em;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.7);
    /* padding: 2px; */
    border-radius: 3px;
    /*pointer-events: none;*/
    cursor: pointer;
    box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
  }

  #legend div {
    display: inline-block;
  }

  #map-selector-container {
    top: 10px;      
    right: 10px;    
  }

  .layer-menu {
    position: absolute;
    top: 45px;     
    right: 0;
    max-width: 85vw; 
    white-space: normal;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  }

  .layer-menu label {
    font-size: 14px;
    padding: 6px 4px;
  }

  .layer-menu input[type="radio"] {
    transform: scale(1.2); 
    margin-right: 4px;
  }
}

a img {
  border: 0;
}

a:hover img {
  border: 0;
}

a:visited img {
  border: 0;
}

/* Container du sélecteur */
#map-selector-container {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
  cursor: pointer;
}

.layer-icon-wrapper {
  background: #0071bc !important;
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  width: 25px;
  height: 25px;
}

.layer-icon {
  width: 25px;
  height: 25px;
  background-color: #ffffff !important;
  -webkit-mask: url("../img/layers.svg") no-repeat center / contain;
  mask: url("../img/layers.svg") no-repeat center / contain;
}

/* Menu des calques */
.layer-menu {
  position: absolute;
  top: 100%;
  right: 0;
  white-space: nowrap;
  background: white;
  padding: 10px;
  border-radius: 4px;
  margin-top: 5px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  display: none;
  flex-direction: column;
  gap: 8px;
}

.layer-menu.show {
  display: flex !important;
}

.layer-menu label {
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #333;
}

#zoom-control {
  display: block;
  position: absolute;
  bottom: 7.2em;
  right: 3em;
  z-index: 101;
}

.ol-zoom-in,
.ol-zoom-out {
  width: 30px;
  height: 30px;
  background-color: rgba(255, 255, 255, 0.7) !important;
  color: #0071bc !important;
  border: 1px solid #ccc;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
}

/* Correction de l'attribution */
#attribution-control {
  position: absolute;
  bottom: .3em;
  right: 0;
  z-index: 99;
  width: auto;
  max-width: 100%;
  padding-bottom: 0;
  pointer-events: none;
}

#attribution-control a {
  pointer-events: auto;
}