.bm {
  --bm-red: #E81815;
  --bm-black: #000;
  --bm-green: #026D3A;
  --bm-border: #F2F2F2;
  --bm-radius: 14px;
  position: relative;
  width: 100%;
  font-size: 14px;
  line-height: 1.4;
  color: #000;
  box-sizing: border-box;
}
.bm *, .bm *::before, .bm *::after { box-sizing: border-box; }

/* Police unique pour tout le locator (inputs, boutons, titres et bulles de la carte inclus) */
.bm,
.bm *,
.bm *::before,
.bm *::after,
.bm input,
.bm button,
.bm input::placeholder {
  font-family: "Right Grotesk Compact", Sans-serif !important;
}

/* ---------- Search row ---------- */
.bm-search {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto 50px;
}
.bm-search-form {
  position: relative;
  flex: 1 1 auto;
  margin: 0;
}
.bm-search-input {
  width: 100%;
    height: auto;
    padding: 11px 24px 16px;
  border: 1px solid #B2B2B2;
  border-radius: 999px;
  background: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 24px;
  color: #000;
  box-shadow: none;
  outline: none;
}
.bm-search-input::placeholder { color: #000; opacity: 1; }
.bm-search-input:focus { border-color: var(--bm-black); }
.bm-search-btn {
  position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 6px;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #000;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.bm-geo-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
    height: auto;
    padding: 14px 32px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--bm-red);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s;
}
.bm-geo-btn:hover, .bm-geo-btn:focus { background: #000; color: #fff; }

/* ---------- Body: list + map ---------- */
.bm-body {
  position: relative;
  display: flex;
  gap: 8px;
  height: 640px;
}
.bm-list {
  flex: 0 0 400px;
  width: 400px;
  overflow-y: auto;
  padding: 0 6px 0 0;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: #bbb transparent;
}
.bm-list::-webkit-scrollbar { width: 4px; }
.bm-list::-webkit-scrollbar-thumb { background: #bbb; border-radius: 4px; }
.bm-map {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: var(--bm-radius);
  overflow: hidden;
  background: #e9e9e9;
}

/* ---------- Card ---------- */
.bm-card {
  margin: 0 0 16px;
  padding: 24px;
  border: 1px solid var(--bm-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.bm-card:hover, .bm-card.is-active { border-color: #999; box-shadow: 0 2px 8px rgba(0,0,0,.14); }
.bm-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.bm-pin {
  position: relative;
  flex: 0 0 auto;
    width: 22px;
    height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="25" height="30" viewBox="0 0 25 30" fill="none"><path d="M12.25 28.5C12.25 28.5 23.5 21 23.5 12.25C23.5 9.26631 22.3147 6.40483 20.205 4.29505C18.0952 2.18526 15.2337 1 12.25 1C9.26631 1 6.40483 2.18526 4.29505 4.29505C2.18526 6.40483 1 9.26631 1 12.25C1 21 12.25 28.5 12.25 28.5Z" fill="%23E81815" stroke="%23E81815" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-size: contain;
}
.bm-card-title {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  text-transform: none;
  color: #000;
}
.bm-card-distance {
  flex: 0 0 auto;
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
}

.bm-card-address,
.bm-card-line {
    margin: 0 0 14px !important;
}

.bm-card-address,
.bm-card-line,
.bm-card-status {
  padding: 0;
  font-size: 18px;
    font-weight: 400;
    line-height: 22px;
}
.bm-card-line {
  display: flex;
  align-items: center;
  gap: 8px;
    font-size: 18px;
    font-weight: 400;
    line-height: 22px;
}
.bm-card-line a { color: #000; text-decoration: none; }
.bm-sep { width: 1px; height: 12px; background: var(--bm-red); }
.bm-card-line .bm-card-directions {
  color: var(--bm-red);
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.bm-card-status {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bm-badge {
  display: inline-block;
    padding: 8px 12px;
  border: 1px solid;
  border-radius: 999px;
  background: #fff;
  font-size: 16px !important;
  font-weight: 400;
  line-height: 20px;
}
.bm-badge-open { color: var(--bm-green); border-color: var(--bm-green); }
.bm-badge-closed { color: var(--bm-red); border-color: var(--bm-red); }
.bm-status-label { font-size: 16px !important; }

/* ---------- Buttons ---------- */
.bm-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.bm-btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
    height: 40px;
    padding: 12px 24px;
  border: 1px solid var(--bm-black);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.bm-btn-select { background: var(--bm-black); color: #fff; }
.bm-btn-select:hover, .bm-btn-select:focus { background: var(--bm-red); color: #fff; }
.bm-btn-current {
  background: var(--bm-red);
  border-color: var(--bm-red);
  color: #fff;
  cursor: default;
}
.bm-btn-details { background: #fff; color: var(--bm-black); }
.bm-btn-details:hover, .bm-btn-details:focus { background: #fff; color: var(--bm-red); border-color: var(--bm-red); }

/* ---------- Map markers (info bubble) ---------- */
/* ---------- Tuile au clic sur un marqueur ---------- */
.bm-map .gm-style-iw-c { border-radius: 20px !important; padding: 0 !important; box-shadow: 0 4px 18px rgba(0,0,0,.25) !important; }
.bm-map .gm-style-iw-d { overflow: hidden !important; max-height: none !important; }
.bm-map .gm-style-iw-chr { position: absolute; top: 0; right: 0; z-index: 2; }
.bm-map .gm-ui-hover-effect {
  width: 30px !important; height: 30px !important;
  top: 10px !important; right: 10px !important;
  background: #fff !important;
  border-radius: 50% !important;
  opacity: 1 !important;
}
.bm-map .gm-ui-hover-effect > span { margin: 7px !important; width: 16px !important; height: 16px !important; background-color: #000 !important; }
.bm-tile { width: 340px; max-width: 100%; }
.bm-tile-img { height: 160px; overflow: hidden; background: #e9e9e9; }
.bm-tile-img img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.bm-tile-body { padding: 24px; }

/* Sans image : espace réservé en haut pour le bouton de fermeture (30px + marges) */
.bm-tile-noimg .bm-tile-body { padding-top: 56px; }
.bm-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.bm-tile-title { flex: 1 1 auto; margin: 0; padding: 0; font-size: 18px; font-weight: 700; line-height: 24px; text-transform: none; color: #000; }
.bm-tile-dir { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bm-red); color: #fff; }
.bm-tile-dir:hover, .bm-tile-dir:focus { background: #c4110a; color: #fff; }
.bm-tile-address { margin: 0 0 15px !important; padding: 0; font-size: 18px; font-weight: 400; line-height: 22px; }
.bm-tile-link { display: inline-block; margin-top: 15px; color: var(--bm-red); font-size: 16px !important; font-weight: 700; line-height: 20px; text-decoration: underline; }

/* ---------- Loader ---------- */
.bm-loader {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(255,255,255,.7);
  border-radius: var(--bm-radius);
}
.bm-loader.active { display: block; }
.bm-spinner {
  position: absolute;
  top: 50%; left: 50%;
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border: 4px solid #ddd;
  border-top-color: var(--bm-red);
  border-radius: 50%;
  animation: bm-spin .8s linear infinite;
}
@keyframes bm-spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  /* Search: full-width field, centered geoloc button underneath */
  .bm-search { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 16px; }
  .bm-geo-btn { align-self: center; }

  /* Map on top, list below, page scrolls normally (no inner scroll) */
  .bm-body { flex-direction: column; gap: 16px; height: auto; }
  .bm-map { order: 1; flex: 0 0 auto; width: 100%; height: 470px; }
  .bm-list { order: 2; flex: 0 0 auto; width: 100%; max-height: none; overflow: visible; padding: 0; }

  /* Cards */
  .bm-pin { width: 18px; height: 18px; }

  /* Buttons stacked, sized to their content (not full width) */
  .bm-card-actions { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 6px; }
  .bm-btn { flex: 0 0 auto; width: auto; }
}
