/* =============== Layout deux colonnes =============== */
.panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;  
}

.map-container {
  position: sticky;
  top: 100px;  
  max-height: calc(100vh - 120px);
}

#map {
  width: 100%;
  height: 100%;     /* ⇐ sans ça, le div n’a pas de hauteur */
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.results-count {
  display: flex;
  justify-content: center;
  background: var(--first-color);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  vertical-align: middle;
  animation: fadeInScale 0.5s ease-out;
  max-width: 20%;
}

.status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: fadeInScale 0.5s ease-out;
  z-index: 2;
}

.status-open {
  background: var(--first-color);
  color: white;
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.3);
}

.status-opens-later {
  background: #f59e0b;
  color: white;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

.status-closed {
  background: #ef4444;
  color: white;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

/* S'assurer que le conteneur de l'image est en position relative */


@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}





/* ================= Listing des cartes ================= */
.listing {
  display: grid;
  gap: 1.5rem;
}

.listing .home__search {
  padding: 1rem;
  width: auto;
  height: 60px;
  margin-bottom: -8px;
  border-width: 1px;
  border-color: rgba(128, 128, 128, 0.111);
  box-shadow: 0 0px 15px rgba(0,0,0,0.05);
}

/* Carte individuelle */
.card {
  display: flex;
  align-items: center;      /* ancre image et texte sur le haut */
  background: #fff;
  border-radius: 30px;
  /* box-shadow: 0 5px 10px rgba(0,0,0,0.05); */
  border-width: 1px;
  border-color: rgba(128, 128, 128, 0.111);
  box-shadow: 0 0px 15px rgba(0,0,0,0.05);
  border: 1px solid rgba(128, 128, 128, 0.11);
  overflow: hidden;
  transition: transform .2s;
  height: 135px;
  
}
.card:hover {
  transform: translateY(-4px);
}

/* Lien autour de la carte */
.card__link {
  display: flex;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

/* Vignette */
.card__img {
  flex-shrink: 0;
  width: 140px;
  height: 110px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  margin-right: 2px;    
  margin-left: 10px;  /* espace image → texte */
}
.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  padding: 0.2rem;
}

/* Bloc texte : même hauteur que .card__img */
.card__body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 110px;                /* rigidifie à la hauteur de l’image */
  padding: 0.5rem 1rem;         /* top/bottom 0.5 pour bien coller */
  gap: 0.25rem;                 /* espace entre titre / sous‑titre / services */
}

/* Titre et sous‑titre */
.card__title {
  margin: 0;
  font-size: 1.125rem;
  color: var(--title-color);
  line-height: 1.2;
}
.card__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.547);
  font-weight: 400;
}
.card__subtitle i {
  margin-right: 0.25rem;
  color: var(--first-color);
}

/* Bloc services (icônes) */
.card__services {
  display: flex;
  align-items: center;
}
.card-filter-txt {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 11px;
  margin-right: 0.5rem;
  font-size: 1.1rem;
  /* color: var(--first-color); */
  background-color: rgb(245, 245, 245);
  border-radius: 30px;
  border-color: rgba(128, 128, 128, 0.111);
  border: 1px solid rgba(128, 128, 128, 0.11);
}

.card-filter-txt span {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  margin-left: 5px;
  opacity: .4;
}

/* Styles généraux des icônes de services */
.service-icon i {
  font-size: 1.2rem;       
  opacity: .4;
  transition: opacity .2s, color .2s;
  margin-right: 0.5rem;
  vertical-align: middle;
  cursor: default;
}

.service-icon {
  opacity: .4;
  transition: opacity .2s, color .2s;
}
.service-icon.active {
  /* color: var(--title-color); */
  color: var(--second-color);
  opacity: 1;
}

.sspan.active {
  /* color: var(--title-color); */
  color: var(--second-color);
  opacity: 1;
}

.card-filter-txt.active {
  color: var(--second-color);
  background: var(--first-color-lighten);
}

/* CSS */
.service-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.service-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-width: 1px;
  border-color: rgba(128, 128, 128, 0.111);
  box-shadow: 0 0px 15px rgba(0,0,0,0.05);
  border: 1px solid rgba(128, 128, 128, 0.11);
  background: #fff;
  padding: 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  font-size: 14px;
  color: var(--title-color);
  font-weight: 500;
  width: 100%;
  transition : background-color .2s, border-color .4s, color .4s, transform .2s ease, box-shadow .2s ease;
}

.logo2 {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.service-pill i {
  font-size: 1.3rem;
  color: var(--title-color);
}

.service-pill span {
  white-space: nowrap;
}
@keyframes click-scale {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.service-pill.clicked {
  animation: click-scale 0.2s ease-out;
}
/* état actif */
.service-pill.active {
  color: var(--second-color);
  background: var(--first-color-lighten);
 
}
.service-pill.active i {
  color: var(--second-color);
}




/* =============== Responsive =============== */
@media screen and (max-width: 1100px) {

  .card-filter-txt {
    padding: 4.5px 6px;
    border-radius: 10px;
  }

  .card-filter-txt span {
    font-size: 9px;
    display: none;
  }

  .results-count {
    display: none;
  }

  /* .card__services {
    display: none;
  } */

  /* .card__services {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  } */

  /* .card {
    height: 150px;
  } */

  .panels {
    grid-template-columns: 1fr;
  }
  #map {
    height: 300px;
  }
  .card__body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 110px;                /* rigidifie à la hauteur de l’image */
    padding: 0.5rem 1rem;         /* top/bottom 0.5 pour bien coller */
    gap: 0.25rem;                 /* espace entre titre / sous‑titre / services */
  }

  .card__title {
    font-size: 1rem;
  }

  .card__subtitle {
    font-size: 0.9rem;
  }

  .map-container {
    position: relative;
    top: 1px;  
    max-height: calc(100vh - 120px);
  }

}
