/**
 * Styles de la fiche bien (autonomes, indépendants du thème Salient).
 * Préfixe : .br-  — variables CSS pour adapter facilement la charte.
 */
.br-bien {
	--br-gold: #c2a572;
	--br-gold-dark: #ab8e5c;
	--br-dark: #2b2b2b;
	--br-text: #3a3a3a;
	--br-muted: #6f6f6f;
	--br-line: rgba(0, 0, 0, .18);
	color: var(--br-text);
	font-family: inherit;
	line-height: 1.6;
}
.br-bien * { box-sizing: border-box; }

/* Pleine largeur : sort du conteneur centré du thème SANS provoquer de
   débordement horizontal (technique par marges négatives symétriques). */
.br-fullbleed {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
.br-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ----------------------------------------------------------- Galerie hero */
.br-gallery { background: var(--br-dark); }
.br-gallery__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-auto-rows: 1fr;
	gap: 4px;
	max-height: 520px;
}
.br-gallery__cell { position: relative; overflow: hidden; }
.br-gallery__cell--main { grid-row: span 2; }
.br-gallery__cell img {
	width: 100%; height: 100%; object-fit: cover; display: block;
	cursor: pointer; transition: transform .4s ease;
}
.br-gallery__cell img:hover { transform: scale(1.04); }
.br-gallery__more {
	position: absolute; right: 12px; bottom: 12px;
	background: rgba(0, 0, 0, .65); color: #fff;
	padding: 8px 14px; border-radius: 4px; font-size: 13px;
	cursor: pointer;
}
@media (max-width: 780px) {
	.br-gallery__grid { grid-template-columns: 1fr 1fr; }
	.br-gallery__cell--main { grid-row: span 1; grid-column: span 2; }
}

/* ------------------------------------------------------- Barre chiffres-clés */
.br-facts { background: var(--br-dark); color: #fff; }
.br-facts__inner {
	display: flex; justify-content: center; flex-wrap: wrap; gap: 50px;
	padding: 22px 20px;
}
.br-fact { text-align: center; min-width: 90px; }
.br-fact__icon { font-size: 22px; color: var(--br-gold); margin-bottom: 6px; }
.br-fact__label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; opacity: .8; }
.br-fact__value { font-size: 18px; font-weight: 700; }

/* ------------------------------------------------------------- Barre titre */
.br-titlebar { background: var(--br-gold); }
.br-titlebar__inner {
	display: flex; justify-content: space-between; align-items: center;
	flex-wrap: wrap; gap: 10px; padding: 18px 20px; color: #fff;
}
.br-titlebar h1 { margin: 0; font-size: 22px; color: #fff; font-weight: 600; }
.br-titlebar__price { font-size: 28px; font-weight: 700; color: #fff; white-space: nowrap; }

/* ------------------------------------------------- Fil d'ariane + actions */
.br-subbar {
	display: flex; justify-content: space-between; align-items: center;
	flex-wrap: wrap; gap: 10px; padding: 14px 0; font-size: 13px;
}
.br-breadcrumb { color: var(--br-muted); }
.br-breadcrumb a { color: var(--br-muted); text-decoration: none; }
.br-actions a {
	display: inline-block; border: 1px solid var(--br-line);
	padding: 6px 12px; border-radius: 3px; margin-left: 6px;
	color: var(--br-text); text-decoration: none; font-size: 12px;
}
.br-actions a:hover { background: #f5f1e9; }

/* ------------------------------------------------------- Colonnes contenu */
.br-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin: 24px 0; }
@media (max-width: 900px) { .br-cols { grid-template-columns: 1fr; } }
.br-panel { background: var(--br-gold); color: #fff; padding: 28px; border-radius: 2px; }
.br-panel h2 {
	margin: 0 0 18px; font-size: 20px; font-weight: 600; color: #fff;
	border-bottom: 1px solid rgba(255, 255, 255, .35); padding-bottom: 10px;
}
.br-panel--light { background: #f5f1e9; color: var(--br-text); }
.br-panel--light h2 { color: var(--br-text); border-color: var(--br-line); }
.br-desc { white-space: pre-line; }

/* Listes à pointillés (caractéristiques / détail) */
.br-dl { list-style: none; margin: 0; padding: 0; }
.br-dl li {
	display: flex; justify-content: space-between; align-items: baseline;
	gap: 8px; padding: 7px 0; border-bottom: 1px dotted rgba(255, 255, 255, .5);
}
.br-panel--light .br-dl li { border-bottom-color: var(--br-line); }
.br-dl .br-dl__k { flex: 0 0 auto; }
.br-dl .br-dl__v { font-weight: 700; text-align: right; }

/* Boutons (specificité .br-bien pour passer devant les styles Salient) */
.br-bien .br-btn {
	display: inline-block; background: var(--br-dark); color: #fff;
	padding: 12px 20px; border-radius: 3px; text-decoration: none;
	font-size: 14px; line-height: 1.2; font-weight: 600; border: 0;
	box-shadow: none; cursor: pointer; transition: opacity .2s;
}
.br-bien .br-btn:hover { opacity: .85; color: #fff; }
.br-bien .br-btn--gold { background: var(--br-gold); }
.br-btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.br-pricedetail { margin-top: 18px; font-size: 14px; }
.br-pricedetail p { margin: 4px 0; }

/* ---------------------------------------------------------------- Carte */
.br-map-section { margin: 30px 0; }
#br-map { width: 100%; height: 380px; background: #e9e9e9; }

/* ----------------------------------------------------------- DPE / Détail */
.br-energy { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 560px) { .br-energy { grid-template-columns: 1fr; } }
.br-dpe { font-size: 12px; }
.br-dpe__title { font-weight: 700; margin-bottom: 8px; text-align: center; }
.br-dpe__scale { display: flex; flex-direction: column; gap: 3px; }
.br-dpe__row {
	display: flex; align-items: center; height: 22px; color: #fff;
	font-weight: 700; padding: 0 8px; border-radius: 2px; position: relative;
	opacity: .45;
}
.br-dpe__row.is-active { opacity: 1; box-shadow: 0 0 0 2px var(--br-dark); }
.br-dpe__row .br-dpe__letter { margin-left: auto; }
.br-dpe__value { margin-top: 10px; text-align: center; font-size: 12px; font-weight: 700; color: var(--br-text); }
.br-dpe__a { background: #319a3f; width: 40%; }
.br-dpe__b { background: #52b153; width: 50%; }
.br-dpe__c { background: #a9cf54; width: 60%; }
.br-dpe__d { background: #f3e600; width: 70%; color: #333; }
.br-dpe__e { background: #f0a32d; width: 80%; }
.br-dpe__f { background: #e8732a; width: 90%; }
.br-dpe__g { background: #d8232a; width: 100%; }

.br-infobox { background: var(--br-dark); color: #fff; padding: 22px; border-radius: 2px; margin-top: 20px; }
.br-infobox h3 { margin: 0 0 10px; color: #fff; font-size: 16px; }
.br-infobox p { font-size: 13px; opacity: .9; }

/* ------------------------------------------------------------- Contact */
.br-contact { background: var(--br-gold); color: #fff; }
.br-contact__inner { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; padding: 40px 20px; align-items: stretch; }
/* min-width:0 empêche une colonne de grille de déborder à cause d'un contenu
   non sécable (ex. une adresse e-mail longue) — classique « grid blowout ». */
.br-contact__inner > * { min-width: 0; }
@media (max-width: 820px) { .br-contact__inner { grid-template-columns: 1fr; } }
.br-contact h2 { color: #fff; margin-top: 0; }
.br-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.br-form .br-form__full { grid-column: 1 / -1; }
.br-form input:not([type="checkbox"]), .br-form textarea {
	width: 100%; padding: 11px 12px; border: 0; border-radius: 3px;
	font-size: 14px; font-family: inherit;
}
.br-form textarea { min-height: 110px; resize: vertical; }
@media (max-width: 600px) { .br-form { grid-template-columns: 1fr; } }
/* Variante page Contact autonome (pas de pleine largeur, coins arrondis). */
.br-contact--page { border-radius: 10px; overflow: hidden; margin: 24px 0; }
.br-contact--page .br-contact__inner { padding: 34px 26px; }
/* Champs "ghost" sur le panneau doré : placeholders en BLANC et lisibles
   (le !important passe devant d'éventuels styles de formulaire de Salient). */
.br-contact .br-form input:not([type="checkbox"]),
.br-contact .br-form textarea {
	background: rgba(255, 255, 255, .12) !important;
	border: 1px solid rgba(255, 255, 255, .6) !important;
	color: #fff !important;
}
.br-contact .br-form input:not([type="checkbox"])::placeholder,
.br-contact .br-form textarea::placeholder {
	color: #fff !important; opacity: .9;
}
.br-contact .br-form input:not([type="checkbox"]):focus,
.br-contact .br-form textarea:focus {
	outline: none; border-color: #fff !important;
	background: rgba(255, 255, 255, .2) !important;
}
.br-form__rgpd { font-size: 12px; display: flex; gap: 8px; align-items: flex-start; text-align: left; }
.br-form__rgpd input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: 3px 0 0; }
.br-hp { position: absolute; left: -9999px; }
.br-agency {
	background: #fff; color: var(--br-text); border-radius: 6px; padding: 28px 24px;
	text-align: center; align-self: stretch;
	display: flex; flex-direction: column; justify-content: center;
}
.br-agency h3 { margin: 10px 0 16px; font-size: 16px; }
.br-agency p { margin: 7px 0; font-size: 14px; overflow-wrap: anywhere; }
.br-agency a { color: var(--br-gold-dark); text-decoration: none; overflow-wrap: anywhere; }
.br-agency .fa { color: var(--br-gold); margin-right: 6px; }
.br-agency__person { font-weight: 700; margin-top: 12px; }
.br-notice { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; background: #fff; color: #2e7d32; }
.br-notice--err { color: #c62828; }

/* ------------------------------------------------------- Biens similaires */
.br-bien .br-related { margin: 50px 0; text-align: center; }
.br-bien .br-related h2 { text-align: center; font-weight: 400; color: var(--br-muted); margin-bottom: 26px; }
.br-bien .br-related__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.br-related .br-card { flex: 0 1 260px; text-align: left; }
@media (max-width: 600px) { .br-related .br-card { flex-basis: 100%; } }
.br-related__more { margin-top: 30px; }
.br-card {
	border: 1px solid #eee; border-radius: 6px; overflow: hidden; background: #fff;
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.br-card a { text-decoration: none; color: var(--br-text); }
.br-card__img { height: 190px; position: relative; overflow: hidden; background: #ddd; }
/* .br-bien + !important : neutralise le `img { height:auto }` de Salient qui
   faisait déborder la photo hors de sa boîte et recouvrir le titre. */
.br-bien .br-card__img img {
	width: 100% !important; height: 100% !important;
	object-fit: cover !important; display: block; margin: 0 !important;
	max-width: none; border-radius: 0;
	transition: transform .5s ease;
}

/* --- Effet au survol d'une carte de bien --- */
.br-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 14px 30px rgba(0, 0, 0, .16);
	border-color: var(--br-gold);
}
.br-card:hover .br-card__img img { transform: scale(1.07); }
.br-card:hover .br-card__title { color: var(--br-gold-dark); }
.br-card__title { transition: color .3s ease; }
@media (prefers-reduced-motion: reduce) {
	.br-card, .br-card__img img, .br-card__title { transition: none; }
	.br-card:hover { transform: none; }
	.br-card:hover .br-card__img img { transform: none; }
}
.br-card__price {
	position: absolute; left: 0; bottom: 0; z-index: 1; background: var(--br-gold);
	color: #fff; padding: 5px 12px; font-weight: 700; font-size: 14px;
}
.br-card__body { padding: 14px; background: #fff; position: relative; z-index: 1; }
.br-card__title { font-size: 15px; font-weight: 700; margin: 0 0 6px; line-height: 1.35; color: var(--br-text); }
.br-card__meta { font-size: 13px; color: var(--br-muted); }

/* --------------------------------------------------- Module de recherche */
.br-search { background: #fff; border: 1px solid #e7e2d6; border-radius: 4px; padding: 16px; margin: 0 0 26px; }
.br-search__row {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px;
}
.br-search__field { display: flex; flex-direction: column; gap: 4px; }
.br-search__field > span { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--br-muted); }
.br-search__field input, .br-search__field select {
	width: 100%; padding: 9px 10px; border: 1px solid #ddd; border-radius: 3px;
	font-size: 14px; font-family: inherit; background: #fff; color: var(--br-text);
}
.br-search__checks {
	display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 14px;
}
.br-search__check { display: flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.br-search__check input { width: auto; }
.br-search__submit { margin-left: auto; }
@media (max-width: 600px) { .br-search__submit { margin-left: 0; width: 100%; } }

/* ----------------------------------------------------------- Archive */
#br-results { transition: opacity .2s; }
#br-results.is-loading { opacity: .45; pointer-events: none; }
.br-archive { margin: 30px auto; }
.br-archive__title { margin: 0 0 20px; }
.br-archive__count { color: var(--br-muted); font-size: 14px; margin: 0 0 18px; }
.br-archive__grid { display: flex; flex-wrap: wrap; gap: 24px; }
.br-archive__grid .br-card { flex: 0 1 280px; }
@media (max-width: 600px) { .br-archive__grid .br-card { flex-basis: 100%; } }
.br-archive__pagination { margin-top: 30px; }
.br-archive__pagination .page-numbers {
	display: inline-block; padding: 6px 12px; margin: 0 2px; border: 1px solid #e0d9c9;
	border-radius: 3px; text-decoration: none; color: var(--br-text);
}
.br-archive__pagination .page-numbers.current { background: var(--br-gold); color: #fff; border-color: var(--br-gold); }

/* ------------------------------------------------- Sélection (shortcode) */
.br-selection { text-align: center; margin: 30px 0; }
.br-selection__title { font-weight: 400; color: var(--br-muted); margin-bottom: 24px; }
.br-selection__viewport { position: relative; }
.br-selection__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.br-selection .br-card { flex: 0 1 280px; text-align: left; }
@media (max-width: 600px) { .br-selection .br-card { flex-basis: 100%; } }
.br-selection__more { margin-top: 28px; }

/* --- Mode slider (carrousel horizontal) --- */
/* Gouttières latérales : les flèches se logent dans l'espace réservé de part
   et d'autre, sans jamais recouvrir les cartes (ni le prix). */
.br-selection--slider .br-selection__viewport { padding: 0 52px; }
.br-selection--slider .br-selection__grid {
	flex-wrap: nowrap;
	justify-content: flex-start;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 4px 2px 12px;
	scrollbar-width: none; /* Firefox */
	-webkit-overflow-scrolling: touch;
}
.br-selection--slider .br-selection__grid::-webkit-scrollbar { display: none; } /* WebKit */
.br-selection--slider .br-card { flex: 0 0 280px; scroll-snap-align: start; }
@media (max-width: 600px) { .br-selection--slider .br-card { flex-basis: 82%; } }
.br-selection__nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
	width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--br-gold, #b89150); color: #fff; font-size: 22px; line-height: 1;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2); transition: opacity .2s, background .2s;
}
.br-selection__nav:hover { background: var(--br-gold-dark, #ab8e5c); }
.br-selection__nav--prev { left: 4px; }
.br-selection__nav--next { right: 4px; }
.br-selection__nav:disabled { opacity: 0; pointer-events: none; }
@media (max-width: 600px) {
	.br-selection--slider .br-selection__viewport { padding: 0; }
	.br-selection__nav { display: none; }
}

/* --- Mode liste (une carte par ligne, image à gauche) --- */
.br-selection--liste .br-selection__grid { flex-direction: column; flex-wrap: nowrap; gap: 16px; }
.br-selection--liste .br-card { flex: 1 1 100%; max-width: 720px; margin: 0 auto; width: 100%; }
.br-selection--liste .br-card > a { display: flex; align-items: stretch; }
.br-selection--liste .br-card__img { flex: 0 0 40%; }
.br-selection--liste .br-card__body { flex: 1; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 600px) {
	.br-selection--liste .br-card > a { flex-direction: column; }
	.br-selection--liste .br-card__img { flex-basis: auto; }
}

/* ------------------------------------------------------- Alerte e-mail */
.br-alert { max-width: 860px; margin: 30px auto; }
.br-alert__form {
	background: #fff; border: 1px solid #e7e2d6; border-radius: 8px;
	padding: 28px; display: flex; flex-direction: column; gap: 22px;
}
.br-alert__grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.br-field { display: flex; flex-direction: column; gap: 5px; }
.br-field--full { grid-column: 1 / -1; }
.br-field > span {
	font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
	color: var(--br-muted); font-weight: 600;
}
.br-field input, .br-field select {
	width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 4px;
	font-size: 14px; font-family: inherit; background: #fff; color: var(--br-text);
}
.br-field input:focus, .br-field select:focus {
	outline: none; border-color: var(--br-gold);
	box-shadow: 0 0 0 3px rgba(194, 165, 114, .18);
}
.br-fieldset { border: 0; padding: 0; margin: 0; }
.br-fieldset legend {
	font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
	color: var(--br-muted); font-weight: 700; margin-bottom: 10px; padding: 0;
}
.br-checks { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.br-check {
	display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer;
	border: 1px solid #e7e2d6; border-radius: 999px; padding: 7px 14px;
	transition: border-color .2s, background .2s;
}
.br-check:hover { border-color: var(--br-gold); background: #faf7f0; }
.br-check input { width: auto; accent-color: var(--br-gold); }
.br-alert__rgpd {
	display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px;
	line-height: 1.5; color: var(--br-text);
}
.br-alert__rgpd input { width: auto; flex: 0 0 auto; margin-top: 3px; accent-color: var(--br-gold); }
.br-alert__legal { font-size: 11px; line-height: 1.6; color: var(--br-muted); margin: 0; }
.br-alert__submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.br-alert__req { font-size: 12px; color: var(--br-muted); }
@media (max-width: 600px) {
	.br-alert__form { padding: 18px; }
}

/* ------------------------------------------------------------- Lightbox */
.br-lightbox {
	display: none; position: fixed; inset: 0; z-index: 99999;
	background: rgba(0, 0, 0, .92); align-items: center; justify-content: center;
}
.br-lightbox.is-open { display: flex; }
.br-lightbox img { max-width: 92vw; max-height: 88vh; }
.br-lightbox__close, .br-lightbox__nav {
	position: absolute; color: #fff; font-size: 34px; cursor: pointer;
	user-select: none; padding: 10px 18px;
}
.br-lightbox__close { top: 10px; right: 20px; }
.br-lightbox__nav { top: 50%; transform: translateY(-50%); }
.br-lightbox__prev { left: 10px; }
.br-lightbox__next { right: 10px; }
