/* ==========================================================
   BDH — RÉSULTATS IMMOBILIERS
   Elementor gère le conteneur et la largeur extérieure.
   ========================================================== */

.bdh-property-results {
  width: 100%;
  min-width: 0;
}

.bdh-property-results [hidden] {
  display: none !important;
}

/* ==========================================================
   BARRE DE RÉSULTATS
   ========================================================== */

.bdh-property-results .bdh-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--bdh-marron-principal, #583030);
}

.bdh-property-results [data-bdh-count] {
  margin: 0;
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.5;
}

/* ==========================================================
   TRI
   ========================================================== */

.bdh-property-results .bdh-results-sort {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .625rem;
  margin: 0 0 0 auto;
  font: inherit;
}

.bdh-property-results .bdh-results-sort label {
  margin: 0;
  font-size: .875rem;
  font-weight: 400;
}

.bdh-property-results .bdh-results-sort select {
  width: 200px;
  max-width: 100%;
  height: 44px;
  padding: 0 2rem 0 .75rem;

  border: 1px solid var(--bdh-beige-dark, #E8DCD5);
  border-radius: 7px;

  background-color: var(--bdh-blanc, #fff);
  color: var(--bdh-marron-principal, #583030);

  font: inherit;
  font-size: .875rem;

  box-shadow: none;
}

.bdh-property-results .bdh-results-sort select:focus-visible,
.bdh-property-results [data-bdh-more]:focus-visible,
.bdh-property-results .bdh-sort-submit:focus-visible {
  outline: 2px solid var(--bdh-marron-principal, #583030);
  outline-offset: 3px;
}

.bdh-property-results.bdh-enhanced .bdh-sort-submit {
  display: none;
}

/* ==========================================================
   GRILLE
   ========================================================== */

.bdh-property-results .bdh-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1.75rem;
  row-gap: 2.125rem;
  margin: 0;
}

/* ==========================================================
   CARTES HOUZEZ
   ========================================================== */
.bdh-property-results .bdh-results-grid>.item-listing-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}

.bdh-property-results .bdh-results-grid .item-wrap.h-100 {
  background: var(--bdh-blanc, #fff);
  border-radius: 10px;
  overflow: hidden;

  /* Même ombre que les cartes de la page Vente */
  box-shadow: 3px 3px 10px 4px rgb(var(--bdh-noir-rgb, 0 0 0) / .15);
}

/* ==========================================================
   BOUTONS
   ========================================================== */

.bdh-property-results .bdh-sort-submit {
  padding: .6875rem 1.5rem;

  border: 1px solid var(--bdh-marron-principal, #583030);
  border-radius: 7px;

  background: var(--bdh-marron-principal, #583030);
  color: var(--bdh-blanc, #fff);

  font: inherit;
  font-size: .875rem;
  line-height: 1.5;
}

.bdh-property-results [data-bdh-more] {
  display: table;
  margin: 2rem auto 0;
  text-align: center;
}

.bdh-property-results .bdh-sort-submit:hover {
  background: var(--bdh-blanc, #fff);
  color: var(--bdh-marron-principal, #583030);
}

/* ==========================================================
   ÉTATS AJAX
   ========================================================== */

.bdh-property-results [aria-disabled="true"] {
  opacity: 0.65;
  cursor: wait;
}

.bdh-property-results [data-bdh-empty],
.bdh-property-results [data-bdh-error] {
  margin: 0;
  padding: 1.25rem 0;
  color: var(--bdh-marron-principal, #583030);
  font-size: .9375rem;
  line-height: 1.6;
}

.bdh-property-results [data-bdh-error] a {
  color: inherit;
  text-decoration: underline;
}

.bdh-property-results [data-bdh-status] {
  margin: 0;
  color: var(--bdh-marron-principal, #583030);
  font-size: .875rem;
}

.bdh-property-results [aria-busy="true"] {
  cursor: progress;
}

.bdh-property-results[aria-busy="true"]>[data-bdh-status] {
  margin-bottom: 1rem;
}

/* Annonce accessible sans dupliquer visuellement le compteur. */
.bdh-property-results[aria-busy="false"]>[data-bdh-status] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1024px) {
  .bdh-property-results .bdh-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .bdh-property-results .bdh-results-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .bdh-property-results .bdh-results-sort {
    margin-left: 0;
  }
}

/* ==========================================================
   RECHERCHE HOUZEZ
   Ordre des onglets Vente / Location
   ========================================================== */

.bdh-results-search .houzez-status-tabs {
  display: flex;
}

.bdh-results-search .houzez-status-tabs>.nav-item:has(> [data-val="a-vendre"]) {
  order: 1;
}

.bdh-results-search .houzez-status-tabs>.nav-item:has(> [data-val="a-louer"]) {
  order: 2;
}
