/* --- ID 143: hivepress - filtres --- */
/* === HomerentAI — Filtres sidebar & carte === */

/* Carte de filtres globale */
.hp-page__sidebar .hp-widget--listing-filter {
  background: #ffffff;
  border-radius: 24px;
  padding: 22px 22px 20px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

/* Formulaire de filtres en colonne, avec espacements propres */
.hp-form--listing-filter .hp-form__fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Labels (Tags, Prix, etc.) */
.hp-form--listing-filter .hp-form__label,
.hp-form--listing-filter .hp-field__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 6px;
}

/* Inputs/Selects de base */
.hp-form--listing-filter input[type="text"],
.hp-form--listing-filter input[type="number"],
.hp-form--listing-filter select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #f9fafb;
  padding: 10px 14px;
  font-size: 14px;
  color: #111827;
  transition: border-color 0.12s ease-out, box-shadow 0.12s ease-out,
              background-color 0.12s ease-out;
}

.hp-form--listing-filter input:focus,
.hp-form--listing-filter select:focus {
  outline: none;
  border-color: #16a085;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(22, 160, 133, 0.18),
    0 0 0 6px rgba(22, 160, 133, 0.06);
}

/* Select2 (Tags) */
.hp-form--listing-filter .select2-container--default .select2-selection--multiple {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #f9fafb;
  min-height: 44px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
}

.hp-form--listing-filter .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.hp-form--listing-filter .select2-container--default .select2-selection--multiple .select2-selection__choice {
  border-radius: 999px;
  border: none;
  background: #e5f9f3;
  color: #047857;
  padding: 2px 8px;
  font-size: 11px;
}

/* --- Bloc Prix (slider) --- */
.hp-form--listing-filter .hp-form__field--number-range {
  padding-top: 4px;
}

.hp-form--listing-filter .hp-form__field--number-range .hp-field--number-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
}

/* Inputs min / max */
.hp-form--listing-filter .hp-form__field--number-range input[type="number"] {
  font-size: 13px;
  text-align: center;
  border-radius: 999px;
  background: #f9fafb;
}

/* Slider */
.hp-form--listing-filter .hp-form__field--number-range .ui-slider {
  grid-column: 1 / 3;
  grid-row: 1;
  margin-top: 4px;
  height: 4px;
  border-radius: 999px;
  background: #e5e7eb;
}

.hp-form--listing-filter .hp-form__field--number-range .ui-slider-range {
  border-radius: 999px;
  background: #020617;
}

.hp-form--listing-filter .hp-form__field--number-range .ui-slider-handle {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #ffffff;
  background: #020617;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.1);
}

/* Bouton "Filtre" plein écran, même style que le CTA principal */
.hp-form--listing-filter .hp-form__footer {
  margin-top: 18px;
}

.hp-form--listing-filter .hp-form__button {
  width: 100%;
  border-radius: 999px;
  height: 52px;
  padding: 0 20px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  background: linear-gradient(135deg, #16a085, #1abc9c);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 26px rgba(22, 160, 133, 0.45);
  cursor: pointer;
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out, background 0.15s ease-out;
}

.hp-form--listing-filter .hp-form__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(22, 160, 133, 0.55);
  background: linear-gradient(135deg, #149174, #1abc9c);
}

/* === Carte Mapbox === */
.hp-page__sidebar .hp-map {
  margin-top: 22px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
}

/* Boutons de contrôle plus doux */
.hp-page__sidebar .hp-map .mapboxgl-ctrl-group {
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.hp-page__sidebar .hp-map .mapboxgl-ctrl-group button {
  background: rgba(255, 255, 255, 0.94);
}

.hp-page__sidebar .hp-map .mapboxgl-ctrl-group button:hover {
  background: #f3f4f6;
}



/* === Sidebar filtre — garder les tags DANS le card === */

/* Le card de filtre garde tout à l’intérieur de son radius */
.widget.hp-widget.hp-widget--listing-filter {
  overflow: hidden; /* masque tout ce qui dépasserait du radius */
}

/* Conteneur des chips : flex + wrap + pas de marge qui déborde */
.widget.hp-widget--listing-filter .hp-tag-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 !important;          /* au cas où HivePress met des marges latérales */
  padding-right: 4px;            /* léger buffer pour éviter le bord droit */
  box-sizing: border-box;
}

/* Chaque chip */
.widget.hp-widget--listing-filter .hp-tag-pill {
  max-width: 100%;
  white-space: normal;           /* autorise les retours à la ligne dans le texte long */
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
}

/* Optionnel : sur mobile, on compacte un peu plus */
@media (max-width: 768px) {
  .widget.hp-widget--listing-filter .hp-tag-pill {
    font-size: 12px;
    padding: 5px 9px;
  }
}



/* --- Bouton "Filtre" mobile : même style que le CTA --- */
@media (max-width: 768px) {
  .hp-button--mobile.hp-button--listing-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;
    margin: 20px 0 0;
    padding: 14px 24px;

    border: none !important;
    border-radius: 999px !important;

    background: linear-gradient(90deg, #3BB38A 0%, #3BA3D4 100%) !important;
    box-shadow: 0 12px 30px rgba(59, 163, 212, 0.35) !important;

    color: #ffffff !important;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    cursor: pointer;

    /* on enlève le vieux fond gris / bordures du thème */
    background-image: none;
  }

  .hp-button--mobile.hp-button--listing-filter i {
    color: #ffffff !important;
    font-size: 18px;
  }

  .hp-button--mobile.hp-button--listing-filter:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(59, 163, 212, 0.45) !important;
  }
}

