/* ──────────────────────────────────────────────
   maisons.css — Page listing des maisons Boolva
   ────────────────────────────────────────────── */

.bm-wrap {
  position: relative;
  background:
    radial-gradient(44% 36% at 6% 18%, rgba(120,170,235,.32), transparent 60%),
    radial-gradient(48% 42% at 97% 58%, rgba(120,170,235,.28), transparent 62%),
    radial-gradient(40% 30% at 50% 2%, rgba(245,185,53,.05), transparent 60%),
    #fff;
  padding: 100px 22px 72px;
  min-height: 80vh;
  /* variables locales */
  --bm-navy:      #13294B;
  --bm-amber:     #F5B935;
  --bm-amber-drk: #E5A91A;
  --bm-muted:     #6B7A90;
  --bm-shadow:    0 24px 50px -30px rgba(19,41,75,.45);
}

/* Panneau blanc arrondi */
.bm-panel {
  max-width: 90%;
  margin: 0 auto;
  background: #fff;
  border-radius: 36px;
  box-shadow: var(--bm-shadow);
  padding: 56px clamp(24px, 5vw, 72px) 64px;
}

/* Titre principal */
.bm-title {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.06;
  color: var(--bm-navy);
  text-align: center;
  margin: 0;
}

/* ── Barre de recherche ── */
.bm-search {
  display: flex;
  justify-content: center;
  margin: 36px 0 0;
}

.bm-search__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(540px, 100%);
  border: 1.6px solid #B7C6E6;
  border-radius: 999px;
  padding: 7px 8px 7px 26px;
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
}

.bm-search__bar:focus-within {
  border-color: var(--bm-amber);
  box-shadow: 0 0 0 4px rgba(245,185,53,.2);
}

.bm-search__bar input {
  flex: 1;
  min-width: 0;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 15px;
  color: var(--bm-navy);
  padding: 9px 0;
  -webkit-appearance: none;
  appearance: none;
}

.bm-search__bar input::placeholder { color: var(--bm-muted); }

.bm-search__go {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--bm-amber);
  color: var(--bm-navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .16s;
}

.bm-search__go:hover { background: var(--bm-amber-drk); }

/* ── Filtres / tri ── */
.bm-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 44px 0 32px;
  flex-wrap: wrap;
}

.bm-count {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--bm-muted);
}

.bm-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 13.5px;
  color: var(--bm-muted);
}

.bm-sort__label { font-weight: 500; white-space: nowrap; }

.bm-sort__opt {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bm-muted);
  border: 1.4px solid #D0DBF0;
  transition: border-color .16s, color .16s, background .16s;
  text-decoration: none !important;
  background: #fff;
  white-space: nowrap;
}

.bm-sort__opt:hover,
.bm-sort__opt.on {
  border-color: var(--bm-navy);
  color: var(--bm-navy) !important;
  background: #EEF2F8;
}

/* ── Grille cartes ── */
.bm-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 42px 28px;
}

/* Carte — image + nom regroupés dans un même bloc « card » */
.bm-card {
  display: flex;
  flex-direction: column;
}

.bm-card__link {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  background: #fff;
  border-radius: 18px;
  padding: 10px 10px 0;
  box-shadow: 0 2px 10px -4px rgba(19,41,75,.12);
  transition: transform .22s ease, box-shadow .22s ease;
}

.bm-card__link:hover,
.bm-card__link:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 20px 34px -18px rgba(19,41,75,.35);
}

.bm-card__thumb {
  width: 100%;
  aspect-ratio: 1 / 1.04;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  background: #D9D9D9;
  position: relative;
}

.bm-card__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block !important;
  float: none !important;
  transition: transform .3s ease;
}

.bm-card__link:hover .bm-card__thumb img { transform: scale(1.05); }

/* Placeholder initiales */
.bm-card__ph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(19,41,75,.045) 0 12px, transparent 12px 24px),
    #E7EBF2;
}

.bm-card__ph ion-icon {
  font-size: 42px;
  color: rgba(19,41,75,.5);
}

/* Initiale affichée quand aucune photo de couverture n'est disponible */
.bm-card__ph {
  font-family: var(--bm-font, 'Jost', sans-serif);
  font-size: 46px;
  font-weight: 800;
  color: rgba(19,41,75,.55);
  line-height: 1;
}

/* ── Icône de la Maison (choisie par l'admin) ──
   Pastille en verre translucide posée sur la photo : elle situe la Maison d'un
   coup d'œil sans masquer l'image (fond semi-transparent + flou d'arrière-plan). */
.bm-card__icon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  color: #fff;
  background: rgba(19, 41, 75, .42);
  border: 1px solid rgba(255, 255, 255, .35);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
          backdrop-filter: blur(6px) saturate(120%);
  box-shadow: 0 4px 14px -6px rgba(19, 41, 75, .55);
  transition: background-color .18s ease, transform .18s ease;
  pointer-events: none;
}
.bm-card__icon ion-icon { width: 1em; height: 1em; }
.bm-card__link:hover .bm-card__icon {
  background: rgba(19, 41, 75, .58);
  transform: scale(1.06);
}
/* Sur le repli « initiale » (pas de photo), l'icône passe en bleu sur clair */
.bm-card__ph + .bm-card__icon {
  color: #184280;
  background: rgba(255, 255, 255, .72);
  border-color: rgba(24, 66, 128, .18);
}
@media (max-width: 560px) {
  .bm-card__icon { width: 34px; height: 34px; font-size: 18px; top: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .bm-card__link:hover .bm-card__icon { transform: none; }
}

.bm-card__name {
  margin: 16px 0 0;
  text-align: center;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.25;
  color: var(--bm-navy);
  transition: color .15s;
  /* hauteur fixe (2 lignes) pour que toutes les cartes aient la même taille */
  min-height: calc(1.25em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bm-card__link:hover .bm-card__name { color: #1F3A6B; }

/* ── État vide ── */
.bm-empty {
  text-align: center;
  padding: 64px 0;
  color: var(--bm-muted);
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

/* ── Pagination ── */
.bm-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 52px 0 6px;
  flex-wrap: wrap;
}

.bm-pager__nav,
.bm-pager__pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 8px;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--bm-navy);
  text-decoration: none !important;
  background: transparent;
  transition: background .15s;
}

.bm-pager__nav:hover,
.bm-pager__pg:hover { background: #EEF2F8; color: var(--bm-navy) !important; }

.bm-pager__pg.on {
  background: #1C1C1E;
  color: #fff !important;
  border-radius: 8px;
}

.bm-pager__dots {
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 15px;
  color: var(--bm-muted);
  padding: 0 4px;
  cursor: default;
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .bm-grid { grid-template-columns: repeat(3, 1fr); gap: 34px 20px; }
}

@media (max-width: 740px) {
  .bm-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; }
}

@media (max-width: 640px) {
  .bm-wrap { padding-top: 88px; padding-bottom: 48px; padding-left: 0; padding-right: 0; }
  .bm-panel { max-width: 100%; padding: 32px 16px 44px; border-radius: 0; }
  .bm-title { font-size: 26px; padding: 0 8px; }
  .bm-filters { flex-direction: column; align-items: flex-start; }
  .bm-sort { gap: 6px; }
}

@media (max-width: 380px) {
  .bm-grid { grid-template-columns: 1fr; max-width: 280px; margin: 0 auto; }
}
