/* Barre sur une seule ligne + chips + dropdown types */
.rb-toolbar { margin-bottom:16px; }
.rb-row.rb-one-line {
  display:flex;
  flex-direction: column;
  gap: 12px;
  align-items:start;
}
.rb-col label{ display:block; font-size:14px !important; margin-bottom:0px; color: #F0E8D5; }

.rb-local-wrap {
  margin-top: 8px !important;
}

/* Rent mode dropdown state */
#rb-rentmode-wrap{ position:relative; }
#rb-rentmode-wrap #rb-rentmode-dd{ display:none; position:absolute; left:0; top:100%; margin-top:4px; z-index:9999; }
#rb-rentmode-wrap.is-open #rb-rentmode-dd{ display:block; }


.rb-col-local label {
    padding: 8px 0 0 0 !important;
}
.rb-col label {
    padding-bottom: 8px;
}

#rb-rentmode-btn {
  padding: 0px 12px !important;
}

#rb-rentmode-dd .rb-rentmode-opt{
  width:100%;
  text-align:left;
  background:transparent;
  border:0;
  padding:6px 4px;
  font-weight: 400 !important;
  cursor:pointer;
  color:#9a031e;
}
#rb-rentmode-dd .rb-rentmode-opt:hover{ background:#f5f7fb; }

/* Localisation + autocomplete + chips */
.rb-local-wrap{ position:relative; }
#rb-q{
  height:40px; border:1px solid #ddd; border-radius:6px; padding:0 10px; width:100%; background:#fff; font-size:14px;
}

.rb-local-wrap, .rb-fields-col {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: end;
    height: fit-content;
    width: fit-content;
}

#rb-suggest{
  position:absolute; left:0; right:0; top:100%; margin-top:4px;
  background:#fff; border:1px solid #ddd; border-radius:6px; display:none; z-index:30;
  max-height:260px; overflow:auto;
}
.rb-sg-list{ list-style:none; margin:0; padding:4px 0; }
.rb-sg-item{ padding:8px 10px; cursor:pointer; }
.rb-sg-item:hover{ background:#f5f7fb; }

#rb-chips{
  display:flex; gap:6px; margin-top:6px;
}
.rb-chip{
  display:inline-flex; align-items:center; gap:6px;
  background:#F0E8D5; color:#9a031e; border:1px solid #F0E8D5; border-radius:999px;
  padding:4px 8px; font-size:13px; width: max-content;
}
.rb-chip .rb-chip-x{
  background:transparent; border:none; cursor:pointer; font-size:16px; line-height:1; color:#9a031e; padding:8px !important;
}

.rb-chip .rb-chip-x:hover, .rb-chip .rb-chip-label:hover{
  background:transparent; border:none; cursor:pointer;  color:#E1711E;
}

/* Types dropdown */
.rb-type-btn, .rb-filter-btn{
  height:40px; border:1px solid #ddd; border-radius:6px; background:#fff; padding:0 10px; cursor:pointer; font-size:14px;
}
.rb-col-type{ position:relative; }
.rb-type-dd{
  position:absolute; left:0; top:100%; background:#fff; border:1px solid #ddd; border-radius:6px; margin-top:4px; z-index:25;
  padding:8px; width:280px;
}
.rb-type-opt{ display:flex; align-items:center; gap:8px; padding:6px 4px; color: #9a031e !important;}

.recherche-empty {
color: #F0E8D5;
}

/* Champs numériques */
#rb-prix, #rb-pieces{
  height:40px; border:1px solid #ddd; border-radius:6px; padding:0 10px; background:#fff; font-size:14px; width:100%;
}

/* Results container (loading state optionnel) */
#p2p-results-container.is-loading { opacity:.6; pointer-events:none; }
/* 1) Placeholder plus petit */
#rb-q::placeholder { font-size: 12px; color:#888; }

/* 2) Majuscules visuelles sur la liste des types (checkboxes) */
.rb-type-dd .rb-type-opt { text-transform: capitalize; }

/* 3) Mise en page une seule ligne : tu as basculé en flex; je garde tes règles et j'ajoute rien ici */

/* 4) Popup Filtres */
.p2p-modal[hidden]{ display:none !important; }
.p2p-modal__backdrop { position:fixed; inset:0; background:rgba(0,0,0,.4); z-index: 998; }
.p2p-modal__panel {
  position:fixed; left:50%; top:10%; transform:translateX(-50%);
  width:min(720px, calc(100% - 24px)); background:#fff; border-radius:12px;
  box-shadow:0 10px 40px rgba(0,0,0,.2); display:flex; flex-direction:column; max-height:80vh;
  z-index:1001;
}
.p2p-modal__head, .p2p-modal__foot { padding:12px 16px; border-bottom:1px solid #eee; }
.p2p-modal__foot { border-top:1px solid #eee; border-bottom:none; display:flex; gap:8px; justify-content:flex-end; }
.p2p-modal__body { padding:16px; overflow:auto; }
.p2p-modal__close { background:none; border:none; font-size:22px; cursor:pointer; }

/* 5) Ligne Surface + Chambres */
.rb-more-grid { display:grid; grid-template-columns: 1fr 1fr; gap:12px 16px; margin-bottom:12px; }
.rb-more-grid .ps-field label { display:block; margin-bottom:6px; font-size:14px; }
.rb-more-grid .ps-field input {
  width:100%; height:40px; padding:0 10px; border:1px solid #ddd; border-radius:6px;
  background:#fff; font-size:14px;
}

/* 6) Tags des commodités */
.ps-tags { display:flex; flex-wrap:wrap; gap:8px; }
.ps-tag {
  height:32px; padding:0 12px; border-radius:16px; border:1px solid #ddd; background:#fff; cursor:pointer;
  display:inline-flex; align-items:center; font-size:14px;
}
.ps-tag.is-on { background:#0d6efd; color:#fff; border-color:#0d6efd; }

form#rb-toolbar {
    background: #9A031E;
    padding: 24px;
    width: fit-content;
}
	  
	  .flip-switch-container {
  --card-width: 100%;
  --card-height: 44px;
  --switch-bg: #F0E8D5;
  --switch-border-color: #F0E8D5;
  --text-color: #9A031E;
  --inactive-text-color: rgba(154, 3, 30, 0.6);
  --icon-shadow-color: rgba(154, 3, 30, 0.3);
  --highlight-color: #F0E8D5;

  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-switch {
  display: flex;
  position: relative;
  width: 100%;
  height: var(--card-height);
  background: var(--switch-bg);
  justify-content: center;
  align-items: center;
  border: 1px solid var(--switch-border-color);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37),
              inset 0 4px 8px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 99px !important;

  /* important : plus de gap, on utilise du padding */
  gap: 0;
  padding: 4px;
}

.flip-switch input[type="radio"] {
  display: none;
}

label.switch-button {
    padding: 8px;
    margin: 0px;
}

.flip-switch .switch-button {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  z-index: 2;
  color: var(--inactive-text-color);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
width: 250px !important;

}

.rb-col.rb-col-kind {
  width: 100%;
}
					
.flip-switch .switch-button:hover {
  color: var(--text-color);
}

.flip-switch .switch-button:hover svg {
  transform: translateY(-3px);
  filter: drop-shadow(0 4px 6px var(--icon-shadow-color)) brightness(1.2);
}

.flip-switch .switch-button svg {
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: drop-shadow(0 2px 3px var(--icon-shadow-color));
  width: 24px;
  height: 24px;
}

.flip-switch .switch-button span {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Carte qui se translate sans flip */
.flip-switch .switch-card {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
background: #9A031E;
  z-index: 1;
  transition: transform 0.35s cubic-bezier(0.76, 0, 0.24, 1);
  border-radius: 999px;
}

.flip-switch .card-face {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Position du slider en fonction du radio coché */
#rb-kind-bail:checked ~ .switch-card {
  transform: translateX(0%);
}

#rb-kind-repreneur:checked ~ .switch-card {
  transform: translateX(100%);
}

/* Petit soulignement sous le bouton actif */
#rb-kind-bail:checked ~ [for="rb-kind-bail"]::after,
#rb-kind-repreneur:checked ~ [for="rb-kind-repreneur"]::after {
  content: "";
  position: absolute;
  bottom: -5px;
  width: 30px;
  height: 3px;
  background: var(--highlight-color);
  border-radius: 2px;
  animation: glow 1.5s infinite alternate;
}

@keyframes glow {
  from {
    box-shadow: 0 0 5px var(--highlight-color);
  }
  to {
    box-shadow:
      0 0 15px var(--highlight-color),
      0 0 25px var(--highlight-color);
  }
}
																  
.rb-fields-col.rb-first {
    justify-content: start;
    align-items: start !important;
}

/* État actif / inactif du toggle Bail / Repreneur */

/* Label actif : fond bordeaux + texte/icône crème */
#rb-kind-bail:checked ~ [for="rb-kind-bail"],
#rb-kind-repreneur:checked ~ [for="rb-kind-repreneur"] {
  background: transparent;
  color: #F0E8D5;
  border-radius: 999px;
  text-shadow: none;
}

/* Icônes des labels actifs : même couleur que le texte */
#rb-kind-bail:checked ~ [for="rb-kind-bail"] svg,
#rb-kind-repreneur:checked ~ [for="rb-kind-repreneur"] svg {
  color: #F0E8D5;
  fill: currentColor;
}

/* Label inactif : fond transparent + texte atténué */
#rb-kind-bail:checked ~ [for="rb-kind-repreneur"],
#rb-kind-repreneur:checked ~ [for="rb-kind-bail"] {
  background: transparent;
  color: var(--inactive-text-color);
}


/* Avatar repreneur : image & SVG en full width dans le rond */
.p2p-card--profil .card__avatar {
position: absolute;
    top: calc(110px);
    width: 90px;
    height: 90px;
    border-radius: 999px;
    display: flex;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .14);
    overflow: hidden;
}

.p2p-card--profil .card__avatar img.card__avatar-img,
.p2p-card--profil .p2p-card__media svg {
  display: block;
  width: 100% !important;
  height: 160px !important;
object-fit: cover !important;
}
    
.p2p-card__media img {
    width: 100% !important;
    height: 212px !important;
    object-fit: cover;
    display: block;
}

/*.card__avatar {
    top: calc(155px) !important;
}
*/

.p2p-card--profil .card__avatar svg.card__avatar-pico, .p2p-card--profil .card__avatar img.card__avatar-pico {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.card__title__search{
    margin-top: 40px !important;
    font-weight: 600;
    font-size: 16px;
    color: var(--main-color);
    text-align: center;
    padding: 0 14px;															  
}	  
/* Responsive modal content */
@media (max-width: 600px){
  .rb-more-grid { grid-template-columns: 1fr; }

.flip-switch .switch-button {
    width: 150px !important;
}
    .rb-fields-col > * {
        flex: 0 0 48%;
        max-width: fit-content;
    }

form#rb-toolbar {
    background: #9A031E;
    padding: 12px;
    width: fit-content;
}
}

/* Responsive */
@media (max-width: 980px){
  .rb-row.rb-one-line{
    grid-template-columns: 1fr;
    align-items:stretch;
  }
  .rb-type-dd{ position:relative; width:100%; }
}
