#map-directory {
  background-color: white;
  margin-bottom: 0px;
  position: relative;
}

#map-directory .autoComplete_wrapper {
  width: 100% !important;
}

#map-directory .autoComplete_wrapper>input {
  border: none;
  background: none !important;
  padding-left: 0 !important;
  color: #666;
  max-width: 100%;
  width: 100% !important;
  height: auto !important;
  padding: .375rem 2.25rem .375rem .75rem;
}

#map-directory .autoComplete_wrapper>ul {
  z-index: 1000;
}

#map-directory .autoComplete_wrapper>ul>li mark {
  color: var(--purple);
  padding: 0 !important;
  font-weight: inherit !important;
}

#map-directory .autoComplete_wrapper>input::placeholder {
  color: #666;
}

#map-directory-filters {}

#map-directory-form .d-flex {
  gap: 30px;
}

/* ******************** */
#map-directory-results {
  display: flex;
  min-height: 100vh;
  justify-content: space-between;
  gap: 3rem;
}

#map-directory-results .side {}

#map-directory-results .left-side {
  flex: 0 0 47%;
}

#map-directory-results .right-side {
  flex: 1;

}

.map-wrapper {
  position: sticky;
  top: 120px;
  height: 70vh;
}

#map-directory-map {
  width: 100%;
  height: 100% !important;
}

/* ******************** */
#map-directory-map .leaflet-tooltip {
  background-color: var(--blue);
  color: white;
  border-radius: 25px;
  padding: 8px 15px;
  font-size: 0.9rem;
  box-shadow: none;
  border: none;
}

#map-directory-map .leaflet-tooltip-top::before {
  border-top-color: #9153e0;
  /* triangle direction haut */
}

#map-directory-map .leaflet-marker-pane img {
  filter: var(--blue-filter);
}

#map-directory-map .leaflet-popup-content-wrapper .popup-title {
  border-radius: 25px;
  overflow: hidden;
  box-shadow: none !important;
  border: none !important;
}

#map-directory-map .leaflet-popup-content-wrapper {
  border-radius: 25px;
  overflow: hidden;
  box-shadow: none !important;
  border: none !important;
}

#map-directory .leaflet-popup {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#map-directory .marker-cluster-small {
  background-color: var(--blue) !important;
}

#map-directory .marker-cluster-small div {
  background-color: var(--blue) !important;
  color: white;
  font-weight: 600;
}

#map-directory-cards .card-item {
  position: relative;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--blue);
}

#map-directory-cards .popup-title {
  border-radius: 50rem;
  font-weight: bold;
  font-size: 1rem;
  color: var(--blue);
}


#map-directory .popup-referent {
  border-radius: 1rem;

}

#map-directory-cards .popup-address {
  /* color: var(--blue); */
}

#map-directory-cards .card-item.highlight {
  border-color: var(--red);
  color: var(--red);
}


#map-directory-cards .card-item.highlight a:not(.btn),
#map-directory-cards .card-item.highlight i,
#map-directory-cards .card-item.highlight strong {
  color: var(--red) !important;
}

#map-directory-cards .card-item.highlight a.btn {
  background-color: var(--red) !important;
  border-color: var(--red) !important;
}

#map-directory-cards .highlight .popup-title {
  color: var(--red);
}

#map-directory-cards .highlight .popup-address {
  color: var(--red);
}

#map-directory .popup-type {
  font-style: italic;
  color: #666;
  margin-bottom: 6px;
}

#map-directory-map .popup-details {
  font-size: 0.8rem;
  color: #555;
  overflow: hidden;
  text-overflow: ellipsis;
  hyphens: auto;
  hyphenate-limit-chars: 8 4 4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* nombre de lignes visibles */
  display: flex;
  -webkit-box-orient: vertical;
}

#map-directory-map .popup-side {
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px dotted #999;
}

#map-directory-cards .popup-content {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#map-directory-cards .popup-details {
  padding-top: 0px;
  flex-grow: 1;
}

#map-directory-cards .popup-side {
  height: 100%;
}

#map-directory-cards .popup-side {
  /*
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  */
}

#map-directory-cards .popup-side {
  font-size: 0.90rem;
}

@media (min-width: 992px) and (max-width: 1199px) {
  #map-directory-cards .popup-details {
    flex-direction: column;
  }

  #map-directory-cards .popup-side {
    flex: 1 !important;
    margin-left: 0rem;
  }
}

#select-territories {
  position: relative;
  z-index: 1001;
}

#select-territories .selection {}

#select-territories .suggest {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  width: 100%;
  background-color: white;
  border: 1px solid #999;
  border-top: none;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  z-index: 1000;
  padding: 0px;
  overflow: hidden;
  max-height: 600px;
  transition: all 500ms;
}

#select-territories .suggest.collapsed {
  max-height: 0;
  border-color: transparent;
}

#select-territories ul {
  list-style: none;
  margin: 5px;
  padding: 0;
  font-size: 1rem;
  height: 300px;
  overflow-y: auto;
}

#select-territories li {
  margin: 0;
  padding: 4px 5px;
  display: flex;
  width: 100;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}

#select-territories li:last-child {
  border-bottom: 1px solid #fff;
}

#select-territories li:hover {
  background-color: #f0f0f0;
  color: var(--purple);
}

#select-territories li .fa-arrow-right {
  color: var(--purple);
}

#select-territories li .action i.fa-circle {
  font-weight: 400;
  /* regular */
}

#select-territories li.selected .action i.fa-circle {
  font-weight: 900;
  /* solid */
}





@media (max-width: 767px) {


  #map-directory-results {
    flex-direction: column;

  }

  #map-directory-results .side {
    width: 100%;
  }

  #map-directory-results .left-side {
    position: relative;
    top: unset;
    flex: 1;
  }

  .map-wrapper {
    height: 70vw;
    max-height: 700px;
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
  }

  #map-directory-map {
    height: 100%;
    width: 100%;
    touch-action: pan-x pan-y;
  }


}