/* Simelfi Biens : recherche et grille */

.rb { color: #3d4a4f; }
.rb-form { margin: 0; }

/* Pastilles type */
.rb-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.rb-pill { margin: 0; }
.rb-pill input { position: absolute; opacity: 0; pointer-events: none; }
.rb-pill span { display: inline-block; padding: 9px 16px; border: 1px solid #b9cccf; font-size: 11px; line-height: 1.4; letter-spacing: .04em; text-transform: uppercase; color: #5f7176; cursor: pointer; transition: all .15s; }
.rb-pill span:hover { border-color: #0b5563; color: #0b5563; }
.rb-pill input:checked + span { background: #0b5563; border-color: #0b5563; color: #fff; }
.rb-pill input:focus-visible + span { outline: 2px solid #0b5563; outline-offset: 2px; }

/* Barre de recherche */
.rb-bar { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 136px; border: 1px solid #c9d6d8; }
.rb-cell { padding: 14px 20px; border-right: 1px solid #c9d6d8; min-width: 0; }
.rb-cell label { display: block; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #5f7176; margin: 0 0 8px; padding: 0; }
.rb .rb-cell select,
.rb .rb-cell input { width: 100%; border: 0; padding: 0; margin: 0; background: transparent; font-size: 13px; color: #3d4a4f; outline: none; box-shadow: none; height: auto; }
.rb .rb-cell select { cursor: pointer; }
.rb-range { display: flex; align-items: center; gap: 8px; }
.rb-range span { color: #a5b4b8; font-size: 12px; }
.rb-range input::placeholder { color: #a5b4b8; opacity: 1; }
.rb-range input::-webkit-outer-spin-button,
.rb-range input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rb-range input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.rb-submit { border: 0; border-radius: 0; background: #0b5563; color: #fff; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: background .15s; }
.rb-submit:hover { background: #083f4a; }

/* Résultats + tri */
.rb-results-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #e3eaeb; margin-bottom: 48px; }
.rb-count { margin: 0; padding: 0; font-size: 13px; color: #6d7d81; }
.rb-count strong { color: #3d4a4f; font-weight: 600; }
.rb-sort { display: flex; align-items: center; gap: 10px; }
.rb-sort label { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #6d7d81; margin: 0; }
.rb .rb-sort select { border: 0; border-bottom: 1px solid #0b5563; border-radius: 0; padding: 2px 4px; font-size: 13px; color: #0b5563; background: transparent; cursor: pointer; min-width: 120px; }

/* Grille */
.rb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rb-card { border: 1px solid #c9d6d8; background: #fff; transition: box-shadow .2s; }
.rb-card:hover { box-shadow: 0 8px 24px rgba(11, 85, 99, .1); }
.rb-card > a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.rb-img { aspect-ratio: 16 / 10; overflow: hidden; background: #e3eaeb; }
.rb-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.rb-card:hover .rb-img img { transform: scale(1.03); }
.rb-body { display: flex; flex-direction: column; flex: 1; padding: 20px 20px 22px; }
.rb .rb-meta { margin: 0 0 10px; padding: 0; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #3d4a4f; }
.rb .rb-title { margin: 0 0 6px; padding: 0; font-size: 18px; line-height: 1.35; font-weight: 600; color: #0b5563; }
.rb .rb-loc { margin: 0 0 14px; padding: 0; font-size: 12px; color: #8a9a9e; }
.rb .rb-excerpt { margin: 0 0 20px; padding: 0; font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rb-specs { margin-top: auto; display: flex; gap: 16px; padding-top: 16px; border-top: 1px solid #e3eaeb; font-size: 11px; color: #6d7d81; min-height: 16px; }
.rb-specs span { display: inline-flex; align-items: center; gap: 5px; }
.rb-specs svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.rb .rb-price { margin: 14px 0 0; padding: 0; font-size: 16px; font-weight: 600; color: #0b5563; }

/* Pagination */
.rb-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 48px; }
.rb-pagination .page-numbers { min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #c9d6d8; font-size: 13px; color: #0b5563; text-decoration: none; }
.rb-pagination .current { background: #0b5563; border-color: #0b5563; color: #fff; }
.rb-pagination .dots { border: 0; }
.rb-empty { padding: 48px 0; text-align: center; color: #6d7d81; }

/* Responsive */
@media (max-width: 980px) {
  .rb-grid { grid-template-columns: repeat(2, 1fr); }
  .rb-bar { grid-template-columns: 1fr 1fr; }
  .rb-cell { border-bottom: 1px solid #c9d6d8; }
  .rb-cell-loc { grid-column: 1 / -1; border-right: 0; }
  .rb-submit { grid-column: 1 / -1; padding: 16px; }
}
@media (max-width: 640px) {
  .rb-grid { grid-template-columns: 1fr; }
  .rb-bar { grid-template-columns: 1fr; }
  .rb-cell { border-right: 0; }
  .rb-pills { gap: 6px; margin-bottom: 20px; }
  .rb-results-bar { margin-bottom: 28px; }
}

/* Contact du bien [contact_bien] */
.sb-contact { border: 1px solid #c9d6d8; background: #fff; padding: 24px; color: #3d4a4f; }
.sb-contact .sb-contact-label { margin: 0 0 16px; padding: 0; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #5f7176; }
.sb-contact-inner { display: flex; gap: 18px; align-items: center; }
.sb-contact-photo { flex: 0 0 88px; width: 88px; height: 88px; border-radius: 50%; overflow: hidden; background: #e3eaeb; }
.sb-contact-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb-contact-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sb-contact .sb-contact-name { margin: 0; padding: 0; font-size: 17px; font-weight: 600; color: #0b5563; line-height: 1.3; }
.sb-contact .sb-contact-role { margin: 0 0 6px; padding: 0; font-size: 12px; color: #8a9a9e; }
.sb-contact .sb-contact-link { font-size: 13px; color: #3d4a4f; text-decoration: none; overflow-wrap: anywhere; }
.sb-contact .sb-contact-link:hover { color: #0b5563; text-decoration: underline; }

/* Carte du bien [carte_bien] */
.sb-map-wrap { border: 1px solid #c9d6d8; }
.sb-map { width: 100%; background: #e3eaeb; }
.sb-map-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 12px 16px; font-size: 12px; color: #6d7d81; border-top: 1px solid #c9d6d8; }
.sb-map-footer .sb-map-link { color: #0b5563; text-transform: uppercase; letter-spacing: .04em; font-size: 10px; text-decoration: none; }
.sb-map-footer .sb-map-link:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .sb-contact { padding: 18px; }
  .sb-contact-photo { flex-basis: 72px; width: 72px; height: 72px; }
}

/* Badge statut sur la carte */
.rb-img { position: relative; }
.rb-badge { position: absolute; top: 12px; left: 12px; padding: 5px 10px; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: #0b5563; }
.rb-badge-vendu { background: #3d4a4f; }

/* Fiche technique [caracteristiques_bien] */
.sb-specs-sheet { color: #3d4a4f; }
.sb-specs-section + .sb-specs-section { margin-top: 32px; }
.sb-specs-sheet .sb-specs-title { margin: 0 0 12px; padding: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #0b5563; border-bottom: 1px solid #0b5563; }
.sb-specs-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; margin: 0; padding: 0; }
.sb-specs-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e3eaeb; font-size: 13px; }
.sb-specs-row dt { margin: 0; color: #6d7d81; font-weight: 400; }
.sb-specs-row dd { margin: 0; text-align: right; font-weight: 600; color: #3d4a4f; }
.sb-equip { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sb-equip li { margin: 0; padding: 7px 12px; border: 1px solid #c9d6d8; font-size: 12px; color: #3d4a4f; }

@media (max-width: 640px) {
  .sb-specs-list { grid-template-columns: 1fr; }
}

/* Galerie [galerie_bien] */
.sb-gal { position: relative; }
.sb-gal-grid { display: grid; gap: 8px; height: 480px; }
.sb-gal-item { position: relative; display: block; overflow: hidden; background: #e3eaeb; cursor: zoom-in; }
.sb-gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, opacity .2s; }
.sb-gal-item:hover img { transform: scale(1.03); opacity: .92; }
.sb-gal-hidden { display: none; }
.sb-gal-n1 .sb-gal-grid { grid-template-columns: 1fr; }
.sb-gal-n2 .sb-gal-grid { grid-template-columns: 2fr 1fr; }
.sb-gal-n3 .sb-gal-grid,
.sb-gal-n4 .sb-gal-grid { grid-template-columns: 2fr 1fr; grid-auto-rows: 1fr; }
.sb-gal-n3 .sb-gal-item:first-child { grid-row: span 2; }
.sb-gal-n4 .sb-gal-item:first-child { grid-row: span 3; }
.sb-gal-n5 .sb-gal-grid { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.sb-gal-n5 .sb-gal-item:first-child { grid-row: span 2; }
.sb-gal-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(11, 85, 99, .55); color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .02em; }
.sb-gal-all { position: absolute; right: 16px; bottom: 16px; padding: 9px 14px; border: 0; background: #fff; color: #0b5563; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.sb-gal-all:hover { background: #0b5563; color: #fff; }

@media (max-width: 980px) {
  .sb-gal-grid { height: 380px; }
}
@media (max-width: 640px) {
  .sb-gal .sb-gal-grid { display: block; height: auto; }
  .sb-gal .sb-gal-item { display: none; aspect-ratio: 4 / 3; }
  .sb-gal .sb-gal-item:first-child { display: block; }
  .sb-gal-all { right: 12px; bottom: 12px; }
}

/* Visionneuse plein écran */
.sb-lb { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; background: rgba(10, 20, 24, .94); }
.sb-lb.is-open { display: flex; }
.sb-lb-fig { margin: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 60px 72px; box-sizing: border-box; }
.sb-lb-fig img { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.sb-lb button { position: absolute; border: 0; background: transparent; color: #fff; cursor: pointer; line-height: 1; padding: 8px; opacity: .8; transition: opacity .15s; }
.sb-lb button:hover, .sb-lb button:focus-visible { opacity: 1; }
.sb-lb-close { top: 14px; right: 18px; font-size: 36px; }
.sb-lb-prev, .sb-lb-next { top: 50%; transform: translateY(-50%); font-size: 54px; }
.sb-lb-prev { left: 12px; }
.sb-lb-next { right: 12px; }
.sb-lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 12px; letter-spacing: .08em; opacity: .8; }

@media (max-width: 640px) {
  .sb-lb-fig { padding: 56px 8px; }
  .sb-lb-prev, .sb-lb-next { font-size: 40px; top: auto; bottom: 6px; transform: none; }
}
