/* Map / results page */

/* This stylesheet is enqueued only on the results/archive screen, so styling
   `main` here is safe. Make the green section fill the viewport down to the
   footer (kills the dead white bar from the sticky-footer flex). */
main {
  display: flex;
  flex-direction: column;
}
.results {
  background: var(--green);
  padding: 26px 0 30px;
  flex: 1 0 auto;
}
.results .container {
  max-width: 1340px;
}

/* Search row */
.results-search {
  display: flex;
  align-items: center;
  gap: 20px;
}
.results-search .field {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.results-search .field input,
.results-search .field select {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-stretch: 90%;
  font-size: 15px;
  color: var(--grey-consult);
  padding: 16px 18px;
  border-radius: 14px;
  appearance: none;
}
.results-search .field select {
  cursor: pointer;
}
.results-search .field.is-select::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid #5a6463;
  border-bottom: 2px solid #5a6463;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.results-search .btn {
  flex: 0 0 auto;
  padding: 16px 36px;
  font-size: 16px;
}

.results-meta {
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
  font-size: 14px;
  margin: 14px 4px 14px;
}
.results-meta strong {
  font-weight: 600;
}

/* Grid: cards + map */
.results-grid {
  display: grid;
  grid-template-columns: 366px 1fr;
  gap: 22px;
  align-items: start;
  padding-bottom: 0;
}
.results-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(100vh - 255px);
  overflow: auto;
  padding-bottom: 26px;
  padding-right: 2px;
}
.results-list::-webkit-scrollbar {
  width: 0;
}

.results-map {
  height: calc(100vh - 255px);
  min-height: 440px;
  overflow: hidden;
  background: #aacbe0;
  border-radius: var(--radius-card);
}
#map {
  width: 100%;
  height: 100%;
}

/* Vet card */
.vet-card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px 18px 0;
  display: flex;
  flex-direction: column;
}
.vet-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.vet-card__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-title);
  font-weight: 700;
  font-stretch: 90%;
  font-size: 19px;
  color: var(--text);
}
.vet-card__name .chk {
  color: var(--coral);
  font-size: 15px;
}
.vet-card__ext {
  color: var(--grey-consult);
  flex: 0 0 auto;
}
.vet-card__ext svg {
  width: 18px;
  height: 18px;
}
.vet-card__addr {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 14px 0 14px;
}
.vet-card__addr a {
  color: var(--muted);
}
.vet-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-stretch: 90%;
  color: var(--white);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.tag--open {
  background: var(--green-support);
}
.tag--closed {
  background: #a4595e;
}
.tag--ref {
  background: #5f8d68;
}
.tag--animal {
  background: #b08c6c;
}
.vet-card__foot {
  border-top: 1px solid var(--grey-serein);
  padding: 11px 0;
  text-align: right;
}
.vet-card__foot a {
  color: var(--green);
  font-style: italic;
  font-size: 14px;
}
.vet-card__foot a:hover {
  text-decoration: underline;
}

/* Leaflet cluster marker */
.cluster-marker {
  background: rgba(204, 114, 86, 0.85);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-stretch: 90%;
  border: 3px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.cluster-marker--count {
  font-size: 14px;
}

/* Mobile "Filtres" / "Voir la carte" controls (hidden on desktop) */
.results-mobilebar,
.results-seemap {
  display: none;
}

@media (max-width: 980px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
  .results-search {
    flex-direction: column;
    gap: 12px;
  }
  .results-search .field,
  .results-search .btn {
    width: 100%;
  }
  .results-map {
    height: 300px;
    margin-top: 18px;
    border-radius: 14px;
  }
  .results-list {
    max-height: none;
    overflow: visible;
  }
  .results-mobilebar {
    display: block;
    margin: 14px 0 6px;
  }
  .results-mobilebar .btn {
    width: 100%;
  }
}

/* Mobile filters drawer */
@media (max-width:980px){
  .results-search.is-collapsible{display:none}
  .results-search.is-collapsible.is-open{display:flex}
}
