.immo-filters-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto;
  gap: 12px;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-start;
  
}
.immo-filters-form { grid-template-columns: 1fr; }

.immo-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.ahre_field {
  flex: 1 1 120px;
  min-width: 120px;
  max-width: 220px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
}

.ahre_field.button-field {
  flex: 0 0 160px;
  max-width: 180px;
  justify-content: center;
}


/* Bouton reset compact */
.ahre_search_form .btn.resetsearchform {
  background: transparent;
  color: #a33c3c;
  border: 1px solid #a33c3c;
  border-radius: 22px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.ahre_search_form .btn.resetsearchform:hover {
  background: rgba(163,60,60,0.06);
}
.immo-price-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.immo-actions {
  display: flex;
  gap: 8px;
}
.ahre_field select,
.ahre_field input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1rem;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.ahre_field select:focus,
.ahre_field input:focus {
  border-color: #b04a4a;
  outline: none;
}

.immo-results.is-loading {
  opacity: 0.7;
}

/* Cards grid */
.immo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.immo-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
  position: relative;
}
.immo-card:hover {
  box-shadow: 0 6px 24px rgba(163,60,60,0.12);
}
.ahre_search_form .btn.submitsearchform {
  background: #b04a4a;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 0.7rem 2rem;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
  min-width: 150px;
  margin: 0;
  height: 48px;
  justify-content: center;
}
.ahre_search_form .btn.submitsearchform:hover {
  background: #a03d3d;
}
.immo-thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.immo-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #222;
  margin-top: 1rem;
}

.immo-meta {
  font-size: 0.97rem;
  color: #555;
  margin-top: 0.3rem;
  display: flex;
  gap: 1.2rem;
  list-style: none;
  padding: 0;
}

.meta-type {
  text-transform: uppercase;
  color: #a33c3c;
  font-weight: 600;
}

.meta-price {
  font-weight: 700;
  color: #a33c3c;
}

.immo-pagination {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.immo-pagination button.active {
  background: #222;
  color: #fff;
}

.immo-no-results {
  text-align: center;
  color: #a33c3c;
  font-size: 1.1rem;
  margin-top: 2rem;
}

.immo-price-slider {
  position: relative;
  height: 28px;
  margin-top: 8px;
}
.immo-price-slider input[type="range"] {
  position: absolute;
  left: 0;
  top: 12px;
  width: 100%;
  pointer-events: none; /* thumbs will still get the events */
  background: none;
}
.immo-price-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #b74141;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.1);
}
.immo-price-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: #b74141;
}
.immo-price-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}
.immo-price-slider input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
}
.immo-price-slider .immo-price-fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 20px;
  height: 4px;
  background: linear-gradient(90deg, #ddd 0, #ddd 100%);
  border-radius: 2px;
}

.immo-empty { color: #666; margin: 8px 0; }

/* Formulaire grid horizontal, épuré et responsive */
.ahre_search_form {
  max-width: 1200px;
  margin: 0 auto 2rem auto;
}
.immo-reset-row { margin-top: 1px; text-align: left; }
.immo-reset-row .reset-inline { color: #c0392b; text-decoration: none; font-size: 0.95rem; }
.immo-reset-row .reset-inline:hover { text-decoration: underline; }
.ahre_search_form .immo-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 1rem;
  justify-content: center;
  align-items: flex-end;
}
.ahre_field {
  flex: 0 1 160px;
  min-width: 140px;
  margin-bottom: 0;
}
.ahre_field:last-child {
  flex: 0 1 180px;
}
.ahre_field select,
.ahre_field input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid #bbb;
  border-radius: 7px;
  font-size: 1rem;
  background: #fafbfc;
  transition: border 0.2s;
  margin-bottom: 0;
}
.ahre_field select:focus,
.ahre_field input:focus {
  border-color: #a33c3c;
  outline: none;
}
.submitsearchform {
  background: #a33c3c;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 0.7rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(163,60,60,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  height: 48px;
}
.submitsearchform i {
  margin-right: 8px;
}
.submitsearchform:hover {
  background: #7c2a2a;
  box-shadow: 0 4px 16px rgba(163,60,60,0.12);
}
/* Force le style des selectpicker comme un input (évite le style bouton d'Elementor) */
.ahre_search_form .bootstrap-select{ width:100% !important; }
.ahre_search_form .bootstrap-select>.dropdown-toggle{
  background: #fafbfc !important;
  color: #222 !important;
  border: 1px solid #bbb !important;
  border-radius: 7px !important;
  padding: 0.6rem 0.9rem !important;
  height: 48px !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
}
.ahre_search_form .bootstrap-select>.dropdown-toggle:focus,
.ahre_search_form .bootstrap-select>.dropdown-toggle:hover{
  border-color: #a33c3c !important;
  outline: none !important;
  box-shadow: none !important;
}
.ahre_search_form .bootstrap-select .filter-option{ width:100%; }
.ahre_search_form .bootstrap-select .filter-option-inner-inner{ 
  font-size: 1rem; 
  color:#222; 
}
.ahre_search_form .bootstrap-select .dropdown-menu{ border-radius: 8px; }
@media (max-width: 900px) {
  .ahre_search_form .immo-row {
    flex-wrap: wrap;
    gap: 0.7rem;
  }
  .ahre_field {
    min-width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    flex: 0 0 auto; /* annule le flex-basis de 160px en mobile */
  }
  .ahre_field.button-field {
    justify-content: center;
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }
  .ahre_search_form .btn.submitsearchform {
    width: 100%;
    min-width: unset;
    height: 48px;
  }
  
  .ahre_search_form .immo-row {
    flex-direction: column;
    gap: 0.7rem;
    align-items: stretch;
    width: 100%;
  }
}

/* Tablette: autoriser le wrap en 2-3 colonnes et compacter l'espace */
@media (max-width: 1200px) and (min-width: 901px) {
  .ahre_search_form .immo-row {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .ahre_field {
    flex: 1 1 240px;
    min-width: 220px;
  }
  .ahre_field.button-field {
    flex: 0 0 auto;
    max-width: none;
  }

}

/* Mobile: réduire légèrement les marges verticales */
@media (max-width: 600px) {
  .ahre_search_form { padding: 0 12px; }
  .ahre_search_form .row { gap: 0.6rem; }
  .immo-reset-row { margin-top: 4px; }
}
