:host,
.bp-test-modal-layer{
  --bp-test-gold:#c2892a;
  --bp-test-gold-dark:#9b6819;
  --bp-test-ink:#171717;
  --bp-test-muted:#6b6862;
  --bp-test-line:#dedbd5;
  --bp-test-soft:#f6f4f0;
}

/* The original search controls remain in the DOM so the current engine can be
   driven safely, but the test UI is the only visible control surface. */
.search-shell > .search-fields,
.compact-search-wrap > .compact-searchbar,
.active-filters{
  display:none!important;
}

.bp-test-toolbar{
  width:100%;
  min-width:0;
}

.search-shell .bp-test-toolbar{
  padding:0 2px 2px;
}

.compact-search-wrap .bp-test-toolbar{
  display:none!important;
}

.bp-test-buttons{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px;
  align-items:stretch;
}

.bp-test-filter-button{
  min-width:0;
  min-height:58px;
  border:1px solid var(--bp-test-line);
  border-radius:17px;
  padding:0 17px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background:#fff;
  color:var(--bp-test-ink);
  text-align:left;
  font-weight:720;
  font-size:13px;
  line-height:1.25;
  box-shadow:none;
  transition:border-color .18s ease,background .18s ease,box-shadow .18s ease;
}

.bp-test-filter-button:hover,
.bp-test-filter-button:focus-visible,
.bp-test-filter-button.is-open{
  border-color:#2c2c2c;
  background:#fbfaf8;
  box-shadow:0 5px 16px rgba(20,20,20,.055);
  outline:none;
}

.bp-test-filter-button[data-bp-filter="advanced"]{
  border-color:#171717;
  background:#171717;
  color:#fff;
}

.bp-test-filter-button[data-bp-filter="advanced"]:hover,
.bp-test-filter-button[data-bp-filter="advanced"]:focus-visible,
.bp-test-filter-button[data-bp-filter="advanced"].is-open{
  border-color:#000;
  background:#2a2a2a;
  color:#fff;
}

.bp-test-chevron{
  width:15px;
  height:15px;
  flex:0 0 15px;
  transition:transform .24s cubic-bezier(.22,.61,.36,1);
}

.bp-test-filter-button.is-open .bp-test-chevron{
  transform:rotate(180deg);
}

@media (prefers-reduced-motion:reduce){
  .bp-test-chevron{transition:none}
}

.bp-test-filter-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding-top:12px;
}

.bp-test-filter-chips[hidden]{display:none!important}

.bp-test-filter-chip{
  min-height:32px;
  max-width:100%;
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:999px;
  padding:6px 8px 6px 13px;
  background:#1d1d1d;
  color:#fff;
  font-size:12px;
  font-weight:690;
  line-height:1.2;
}

.bp-test-filter-chip > span{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.bp-test-filter-chip button{
  width:20px;
  height:20px;
  flex:0 0 20px;
  display:grid;
  place-items:center;
  margin:0;
  padding:0 0 1px;
  border:0;
  border-radius:50%;
  background:rgba(255,255,255,.16);
  color:#fff;
  font-size:15px;
  line-height:1;
}

.bp-test-filter-chip button:hover,
.bp-test-filter-chip button:focus-visible{
  background:#fff;
  color:#171717;
  outline:none;
}

/* The modal is portalled directly into document.body so its fixed positioning
   always follows the visible browser viewport, including after page scrolling. */
.bp-test-modal-layer{
  position:fixed;
  inset:0;
  z-index:2147483000;
  width:100vw;
  height:100dvh;
  display:grid;
  place-items:center;
  padding:16px;
  box-sizing:border-box;
  pointer-events:none;
}

.bp-test-modal-layer[hidden]{display:none!important}

.bp-test-modal{
  pointer-events:auto;
  max-width:100%;
  max-height:100%;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid rgba(20,20,20,.12);
  border-radius:24px;
  background:#fff;
  color:var(--bp-test-ink);
  box-shadow:0 28px 85px rgba(0,0,0,.28),0 0 0 9999px rgba(20,20,20,.04);
}

.bp-test-modal.is-large{
  width:min(960px,calc(100vw - 32px));
  height:min(640px,calc(100dvh - 32px));
}

.bp-test-modal.is-compact{
  width:min(570px,calc(100vw - 32px));
  height:min(470px,calc(100dvh - 32px));
}

.bp-test-modal.is-compact .bp-test-modal-header{
  min-height:82px;
  padding:16px 20px 14px;
}

.bp-test-modal.is-compact .bp-test-modal-header h2{
  font-size:23px;
}

.bp-test-modal.is-compact .bp-test-modal-body{
  padding:18px 20px;
}

.bp-test-modal.is-compact .bp-test-modal-footer{
  min-height:68px;
  padding:10px 20px;
}

.bp-test-modal.is-compact .bp-test-choice-list{
  gap:7px;
}

.bp-test-modal.is-compact .bp-test-check-row,
.bp-test-modal.is-compact .bp-test-radio-row{
  min-height:47px;
  padding:9px 13px;
}

.bp-test-modal.is-compact .bp-test-budget-fields{
  margin-top:12px;
}

.bp-test-modal.is-compact .bp-test-room-sections{
  gap:16px;
}

.bp-test-modal.is-compact .bp-test-room-section{
  padding-bottom:16px;
}

.bp-test-modal.is-compact .bp-test-room-section h3{
  margin-bottom:12px;
  font-size:19px;
}

.bp-test-modal-header{
  min-height:104px;
  padding:21px 25px 19px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  border-bottom:1px solid #ece9e3;
  background:#fff;
}

.bp-test-modal-heading{min-width:0}

.bp-test-modal-eyebrow{
  display:block;
  margin:0 0 7px;
  color:var(--bp-test-gold-dark);
  font-size:10px;
  line-height:1.2;
  font-weight:820;
  letter-spacing:.15em;
  text-transform:uppercase;
}

.bp-test-modal-header h2{
  margin:0;
  color:var(--bp-test-ink);
  font-size:26px;
  line-height:1.15;
  letter-spacing:-.025em;
}

.bp-test-modal-subtitle{
  margin:6px 0 0;
  color:var(--bp-test-muted);
  font-size:13px;
  line-height:1.45;
}

.bp-test-modal-close{
  width:40px;
  height:40px;
  flex:0 0 40px;
  display:grid;
  place-items:center;
  margin:0;
  padding:0 0 2px;
  border:0;
  border-radius:50%;
  background:var(--bp-test-soft);
  color:#171717;
  font-size:24px;
  line-height:1;
  transition:background .18s ease,color .18s ease;
}

.bp-test-modal-close:hover,
.bp-test-modal-close:focus-visible{
  background:#171717;
  color:#fff;
  outline:none;
}

.bp-test-modal-body{
  min-height:0;
  overflow:auto;
  overscroll-behavior:contain;
  padding:25px;
  background:#fff;
  scrollbar-gutter:stable;
}

.bp-test-modal-footer{
  min-height:79px;
  padding:14px 25px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  border-top:1px solid #ece9e3;
  background:#fff;
}

.bp-test-modal-reset{
  border:0;
  background:transparent;
  color:#4e4b46;
  padding:10px 0;
  font-size:12px;
  font-weight:720;
  text-decoration:underline;
  text-underline-offset:3px;
}

.bp-test-results-button{
  min-width:185px;
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 22px;
  border:1px solid var(--bp-test-gold-dark);
  border-radius:999px;
  background:linear-gradient(135deg,var(--bp-test-gold),#e2b252);
  color:#fff;
  font-size:13px;
  font-weight:820;
  box-shadow:0 8px 20px rgba(194,137,42,.2);
  transition:background .18s ease,border-color .18s ease;
}

.bp-test-results-button:hover,
.bp-test-results-button:focus-visible{
  border-color:#82500e;
  background:linear-gradient(135deg,#9f6816,#d99f3a);
  outline:none;
}

/* Shared form language */
.bp-test-modal-body label{
  color:#33312e;
  font-size:12px;
  font-weight:760;
}

.bp-test-modal-body input,
.bp-test-modal-body select,
.bp-test-modal-body textarea{
  font:inherit;
}

.bp-test-choice-list{
  max-width:620px;
  margin:0 auto;
  display:grid;
  gap:8px;
}

.bp-test-check-row,
.bp-test-radio-row{
  min-height:54px;
  display:flex!important;
  align-items:center;
  gap:12px;
  margin:0!important;
  padding:11px 14px;
  border:1px solid var(--bp-test-line);
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease;
}

.bp-test-check-row:hover,
.bp-test-radio-row:hover{
  border-color:#a7a29a;
  background:#faf9f6;
}

.bp-test-check-row input,
.bp-test-radio-row input{
  position:absolute;
  width:1px!important;
  height:1px!important;
  opacity:0;
  pointer-events:none;
}

.bp-test-checkbox,
.bp-test-radio{
  width:21px;
  height:21px;
  flex:0 0 21px;
  display:grid;
  place-items:center;
  border:1px solid #9b9790;
  background:#fff;
}

.bp-test-checkbox{border-radius:6px}
.bp-test-radio{border-radius:50%}

.bp-test-check-row input:checked + .bp-test-checkbox,
.bp-test-radio-row input:checked + .bp-test-radio{
  border-color:#171717;
  background:#171717;
}

.bp-test-check-row input:checked + .bp-test-checkbox::after{
  content:"";
  width:9px;
  height:5px;
  margin-top:-2px;
  border-left:2px solid #fff;
  border-bottom:2px solid #fff;
  transform:rotate(-45deg);
}

.bp-test-radio-row input:checked + .bp-test-radio::after{
  content:"";
  width:7px;
  height:7px;
  border-radius:50%;
  background:#fff;
}

.bp-test-two-fields{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}

.bp-test-two-fields > label{
  display:grid!important;
  gap:8px;
  margin:0!important;
}

.bp-test-input-suffix,
.bp-test-select-wrap{
  min-height:51px;
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid #aaa69e;
  border-radius:12px;
  background:#fff;
}

.bp-test-input-suffix:focus-within,
.bp-test-select-wrap:focus-within{
  border-color:#171717;
  box-shadow:0 0 0 2px rgba(194,137,42,.13);
}

.bp-test-input-suffix input{
  min-width:0;
  width:100%;
  height:49px;
  margin:0!important;
  padding:0 4px 0 14px!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
}

.bp-test-input-suffix > span{
  flex:0 0 auto;
  padding-right:14px;
  color:#77736d;
  font-weight:650;
}

.bp-test-budget-fields{
  max-width:700px;
  margin:26px auto 0;
}

.bp-test-room-sections{
  max-width:720px;
  margin:0 auto;
  display:grid;
  gap:24px;
}

.bp-test-room-section{
  padding:0 0 24px;
  border-bottom:1px solid #e5e1da;
}

.bp-test-room-section:last-child{
  padding-bottom:0;
  border-bottom:0;
}

.bp-test-room-section h3{
  margin:0 0 17px;
  text-align:center;
  color:#3d3a36;
  font-size:21px;
  line-height:1.2;
}

.bp-test-select-wrap{
  position:relative;
  overflow:hidden;
}

.bp-test-select-wrap select{
  width:100%;
  height:49px;
  margin:0!important;
  padding:0 42px 0 14px!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:#303030;
  appearance:none;
  cursor:pointer;
}

.bp-test-select-wrap svg{
  position:absolute;
  right:14px;
  top:50%;
  width:15px;
  height:15px;
  transform:translateY(-50%);
  pointer-events:none;
}

/* Location/map popup */
.bp-test-location-layout{
  height:100%;
  min-height:430px;
  display:grid;
  grid-template-columns:minmax(270px,36%) minmax(0,64%);
  gap:0;
  margin:-25px;
  padding-right:8px;
  box-sizing:border-box;
  background:#fff;
}

.bp-test-location-controls{
  position:relative;
  z-index:3;
  padding:28px 24px;
  border-right:1px solid #e7e3dc;
  background:#fff;
}

.bp-test-location-label{
  display:grid!important;
  gap:9px;
  margin:0!important;
}

.bp-test-location-input-wrap{
  min-height:51px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 13px;
  border:1px solid #aaa69e;
  border-radius:12px;
  background:#fff;
}

.bp-test-location-input-wrap:focus-within{
  border-color:#171717;
  box-shadow:0 0 0 2px rgba(194,137,42,.13);
}

.bp-test-location-input-wrap svg{
  width:20px;
  height:20px;
  flex:0 0 20px;
  color:#6d6963;
}

.bp-test-location-input-wrap input{
  min-width:0;
  width:100%;
  height:49px;
  margin:0!important;
  padding:0!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:#303030;
}

.bp-test-location-input-wrap input::-webkit-search-cancel-button{
  display:none;
}

.bp-test-location-clear{
  width:24px;
  height:24px;
  flex:0 0 24px;
  display:grid;
  place-items:center;
  margin:0;
  padding:0 0 1px;
  border:0;
  border-radius:50%;
  background:#efede8;
  color:#171717;
  font-size:17px;
  line-height:1;
  cursor:pointer;
}

.bp-test-location-clear[hidden]{
  display:none!important;
}

.bp-test-city-suggestions{
  position:absolute;
  z-index:50;
  top:102px;
  left:24px;
  right:24px;
  max-height:255px;
  overflow:auto;
  border:1px solid #d8d4cc;
  border-radius:13px;
  background:#fff;
  box-shadow:0 16px 36px rgba(0,0,0,.14);
}

.bp-test-city-suggestions[hidden]{display:none!important}

.bp-test-city-suggestions button{
  width:100%;
  min-height:56px;
  display:block;
  padding:11px 13px;
  border:0;
  border-bottom:1px solid #eeeae3;
  background:#fff;
  color:#252525;
  text-align:left;
}

.bp-test-city-suggestions button:last-child{border-bottom:0}
.bp-test-city-suggestions button:hover{background:#f7f5f1}
.bp-test-city-suggestions strong{display:block;font-size:13px}
.bp-test-city-suggestions small{display:block;margin-top:3px;color:#77726b;font-size:10px;line-height:1.35}

.bp-test-radius-control{
  margin-top:31px;
  padding-top:25px;
  border-top:1px solid #e5e1da;
}

.bp-test-radius-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
  color:#34322f;
  font-size:12px;
  font-weight:760;
  line-height:1.4;
}

.bp-test-radius-heading strong{
  min-width:55px;
  height:48px;
  display:grid;
  place-items:center;
  flex:0 0 55px;
  border:1px solid #aaa69e;
  border-radius:11px;
  font-size:15px;
}

.bp-test-radius-control input[type=range]{
  --range-progress:33.333%;
  width:100%;
  height:22px;
  margin:0;
  padding:0;
  background:transparent;
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
}

.bp-test-radius-control input[type=range]::-webkit-slider-runnable-track{
  height:4px;
  border-radius:999px;
  background:linear-gradient(
    to right,
    var(--bp-test-gold) 0,
    var(--bp-test-gold) var(--range-progress),
    #171717 var(--range-progress),
    #171717 100%
  );
}

.bp-test-radius-control input[type=range]::-webkit-slider-thumb{
  width:18px;
  height:18px;
  margin-top:-7px;
  border:1px solid #171717;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.15);
  -webkit-appearance:none;
  appearance:none;
}

.bp-test-radius-control input[type=range]::-moz-range-track{
  height:4px;
  border-radius:999px;
  background:#171717;
}

.bp-test-radius-control input[type=range]::-moz-range-progress{
  height:4px;
  border-radius:999px;
  background:var(--bp-test-gold);
}

.bp-test-radius-control input[type=range]::-moz-range-thumb{
  width:18px;
  height:18px;
  border:1px solid #171717;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(0,0,0,.15);
}

.bp-test-radius-scale{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:5px;
  color:#77736d;
  font-size:10px;
}

.bp-test-location-map{
  position:relative;
  z-index:1;
  min-width:0;
  min-height:430px;
  background:#eceeea;
}

.bp-test-location-map .leaflet-control-attribution{
  font-size:9px;
}

.bp-test-map-unavailable{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  padding:20px;
  color:#625f59;
  text-align:center;
  font-size:12px;
}

/* The existing advanced-filter fields are reused without duplicating business
   logic, but receive the same Baux Patrimoine visual language. */
.bp-test-advanced-fields{
  display:grid;
  gap:0;
}

.bp-test-advanced-fields .filter-group{
  margin:0 0 21px!important;
  padding:0 0 21px!important;
  border-bottom:1px solid #e8e4dd!important;
}

.bp-test-advanced-fields .filter-group:last-child{
  margin-bottom:0!important;
  padding-bottom:0!important;
  border-bottom:0!important;
}

.bp-test-advanced-fields .filter-group h3{
  margin:0 0 13px!important;
  color:#242321;
  font-size:16px!important;
}

.bp-test-advanced-fields .two-columns{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  width:100%;
  box-sizing:border-box;
}

.bp-test-advanced-fields .bp-test-surface-fields{
  width:calc(100% - 32px);
  margin-inline:auto;
}

.bp-test-advanced-fields .two-columns label{
  display:grid!important;
  gap:7px;
  margin:0!important;
}

.bp-test-advanced-fields input[type=number]{
  width:100%;
  min-width:0;
  min-height:49px;
  margin:0!important;
  padding:0 13px!important;
  box-sizing:border-box;
  border:1px solid #aaa69e!important;
  border-radius:12px!important;
  background:#fff!important;
}

.bp-test-advanced-fields .filter-options{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}

.bp-test-advanced-fields .filter-check{
  min-height:48px;
  display:flex!important;
  align-items:center;
  gap:9px;
  margin:0!important;
  padding:10px 12px!important;
  border:1px solid var(--bp-test-line)!important;
  border-radius:12px!important;
  background:#fff;
}

.bp-test-advanced-fields .filter-check input{
  width:auto!important;
  margin:0!important;
}

/* Keep the original radius/advanced overlays completely inert in the test UI. */
#radiusModal:not([hidden]),
#advancedModal:not([hidden]){
  visibility:hidden!important;
  pointer-events:none!important;
}

@media(max-width:1100px){
  .bp-test-buttons{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .bp-test-location-layout{
    grid-template-columns:minmax(260px,40%) minmax(0,60%);
  }
}

@media(max-width:760px){
  .bp-test-buttons{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .bp-test-filter-button{
    min-height:54px;
    padding:0 14px;
    border-radius:15px;
    font-size:12px;
  }

  .bp-test-modal-layer{
    padding:10px;
  }

  .bp-test-modal{
    width:calc(100vw - 20px);
    border-radius:20px;
  }

  .bp-test-modal.is-large{
    height:calc(100dvh - 20px);
  }

  .bp-test-modal[data-filter="location"]{
    width:calc(100vw - 32px);
    max-width:calc(100vw - 32px);
  }

  .bp-test-modal[data-filter="location"] .bp-test-location-input-wrap input{
    font-size:16px;
  }

  .bp-test-modal.is-compact{
    width:min(570px,calc(100vw - 20px));
    height:min(470px,calc(100dvh - 20px));
  }

  .bp-test-modal-header{
    min-height:94px;
    padding:17px 17px 15px;
  }

  .bp-test-modal-header h2{font-size:22px}
  .bp-test-modal-close{width:36px;height:36px;flex-basis:36px;font-size:21px}
  .bp-test-modal-body{padding:18px 17px}
  .bp-test-modal-footer{min-height:72px;padding:11px 17px;gap:10px}
  .bp-test-results-button{min-width:0;padding:11px 16px;font-size:12px}
  .bp-test-modal-reset{font-size:11px}

  .bp-test-location-layout{
    min-height:0;
    display:grid;
    grid-template-columns:1fr;
    grid-template-rows:auto minmax(260px,1fr);
    margin:-18px -17px;
  }

  .bp-test-location-controls{
    padding:20px 17px 18px;
    border-right:0;
    border-bottom:1px solid #e7e3dc;
  }

  .bp-test-city-suggestions{
    top:92px;
    left:17px;
    right:17px;
    max-height:210px;
  }

  .bp-test-radius-control{
    margin-top:20px;
    padding-top:17px;
  }

  .bp-test-location-map{
    min-height:260px;
  }

  .bp-test-advanced-fields .filter-options{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:520px){
  .bp-test-buttons{
    grid-template-columns:1fr;
  }

  .bp-test-two-fields,
  .bp-test-advanced-fields .two-columns,
  .bp-test-advanced-fields .filter-options{
    grid-template-columns:1fr;
  }

  .bp-test-budget-fields{margin-top:0}

  .bp-test-filter-chips{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:4px;
    scrollbar-width:none;
  }

  .bp-test-filter-chips::-webkit-scrollbar{display:none}
  .bp-test-filter-chip{flex:0 0 auto}

  .bp-test-modal-footer{
    align-items:stretch;
  }

  .bp-test-results-button{
    flex:1;
  }
}

@media(max-height:560px) and (min-width:761px){
  .bp-test-modal.is-large{
    height:calc(100dvh - 20px);
  }

  .bp-test-modal.is-compact{
    height:min(450px,calc(100dvh - 20px));
  }

  .bp-test-modal-header{
    min-height:72px;
    padding-top:11px;
    padding-bottom:10px;
  }

  .bp-test-modal-body{
    padding-top:14px;
    padding-bottom:14px;
  }

  .bp-test-modal-footer{
    min-height:58px;
    padding-top:6px;
    padding-bottom:6px;
  }
}

/* Galerie des annonces : chaque indicateur conserve exactement le même cercle,
   y compris l'indicateur actif et les galeries longues sur petits écrans. */
.gallery-dots{
  display:inline-flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  max-width:calc(100% - 24px);
  overflow-x:auto;
  scrollbar-width:none;
}

.gallery-dots::-webkit-scrollbar{display:none}

.gallery-dot,
.gallery-dot.active{
  box-sizing:border-box!important;
  appearance:none!important;
  -webkit-appearance:none!important;
  flex:0 0 8px!important;
  width:8px!important;
  height:8px!important;
  min-width:8px!important;
  min-height:8px!important;
  max-width:8px!important;
  max-height:8px!important;
  aspect-ratio:1 / 1!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.92)!important;
  border-radius:50%!important;
  line-height:0!important;
  font-size:0!important;
  overflow:hidden!important;
  transform:none!important;
}

.gallery-dot::before,
.gallery-dot::after{
  content:none!important;
  display:none!important;
}

.gallery-dot.active{
  background:#fff!important;
}
