/*
 * BBL-immo - affichage public des biens
 *
 * Le conteneur principal ne masque jamais les débordements. Seul le viewport
 * interne du carrousel / slider contrôle son propre défilement horizontal.
 */

.bbl-property-display,
.bbl-property-display * {
	box-sizing:border-box;
}

.bbl-property-display {
	position:relative;
	width:100%;
	overflow:visible;
}

.bbl-property-display__title {
	margin:0 0 20px;
}

.bbl-property-grid {
	display:grid;
	gap:var(--bbl-property-gap, 24px);
	grid-template-columns:repeat(3, minmax(0, 1fr));
}

.bbl-property-grid[data-bbl-property-columns="1"] { grid-template-columns:repeat(1, minmax(0, 1fr)); }
.bbl-property-grid[data-bbl-property-columns="2"] { grid-template-columns:repeat(2, minmax(0, 1fr)); }
.bbl-property-grid[data-bbl-property-columns="3"] { grid-template-columns:repeat(3, minmax(0, 1fr)); }
.bbl-property-grid[data-bbl-property-columns="4"] { grid-template-columns:repeat(4, minmax(0, 1fr)); }
.bbl-property-grid[data-bbl-property-columns="5"] { grid-template-columns:repeat(5, minmax(0, 1fr)); }
.bbl-property-grid[data-bbl-property-columns="6"] { grid-template-columns:repeat(6, minmax(0, 1fr)); }

.bbl-property-card {
	display:flex;
	flex-direction:column;
	height:100%;
	overflow:hidden;
	background:#fff;
	border:1px solid rgba(0, 0, 0, .12);
	border-radius:12px;
}

.bbl-property-card__media {
	display:block;
	position:relative;
	width:100%;
	aspect-ratio:4 / 3;
	overflow:hidden;
	background:#eee;
}

.bbl-property-card__image {
	display:block;
	width:100%;
	height:100%;
	object-fit:cover;
	transition:transform .25s ease;
}

.bbl-property-card__media:hover .bbl-property-card__image,
.bbl-property-card__media:focus .bbl-property-card__image {
	transform:scale(1.025);
}

.bbl-property-card__content {
	display:flex;
	flex:1 1 auto;
	flex-direction:column;
	padding:18px;
}

.bbl-property-card__location {
	margin:0 0 6px;
	font-size:.85em;
	opacity:.72;
}

.bbl-property-card__title {
	margin:0 0 12px;
	font-size:1.2em;
	line-height:1.25;
}

.bbl-property-card__title a {
	color:inherit;
	text-decoration:none;
}

.bbl-property-card__characteristics {
	display:flex;
	flex-wrap:wrap;
	gap:6px 12px;
	margin:0 0 12px;
	font-size:.9em;
}

.bbl-property-card__characteristics span {
	white-space:nowrap;
}

.bbl-property-card__excerpt {
	margin:0 0 15px;
	font-size:.95em;
	line-height:1.45;
}

.bbl-property-card__excerpt p {
	margin:0;
}

.bbl-property-card__footer {
	display:flex;
	align-items:flex-end;
	justify-content:space-between;
	gap:12px;
	margin-top:auto;
	padding-top:8px;
}

.bbl-property-card__price {
	font-size:1.15em;
	font-weight:700;
}

.bbl-property-card__reference {
	font-size:.78em;
	opacity:.65;
	white-space:nowrap;
}

.bbl-property-scroller {
	position:relative;
	width:100%;
	overflow:visible;
}

.bbl-property-scroller__viewport {
	width:100%;
	overflow-x:auto;
	overflow-y:visible;
	scroll-behavior:smooth;
	scroll-snap-type:x mandatory;
	scrollbar-width:none;
	overscroll-behavior-inline:contain;
}

.bbl-property-scroller__viewport::-webkit-scrollbar {
	display:none;
}

/*
 * Pendant le recentrage technique d'une boucle circulaire, le viewport doit
 * revenir sur le bien réel sans animation ni accrochage intermédiaire.
 */
.bbl-property-scroller__viewport.is-bbl-infinite-rebasing {
	scroll-behavior:auto !important;
	scroll-snap-type:none;
}

.bbl-property-scroller__slide[data-bbl-property-clone="1"] {
	pointer-events:none;
}

.bbl-property-scroller__track {
	display:flex;
	align-items:stretch;
	gap:var(--bbl-property-gap, 24px);
	width:100%;
}

.bbl-property-scroller__slide {
	flex:0 0 100%;
	min-width:0;
	scroll-snap-align:start;
}

.bbl-property-scroller[data-bbl-property-items="1"] .bbl-property-scroller__slide { flex-basis:100%; }
.bbl-property-scroller[data-bbl-property-items="2"] .bbl-property-scroller__slide { flex-basis:calc((100% - (1 * var(--bbl-property-gap, 24px))) / 2); }
.bbl-property-scroller[data-bbl-property-items="3"] .bbl-property-scroller__slide { flex-basis:calc((100% - (2 * var(--bbl-property-gap, 24px))) / 3); }
.bbl-property-scroller[data-bbl-property-items="4"] .bbl-property-scroller__slide { flex-basis:calc((100% - (3 * var(--bbl-property-gap, 24px))) / 4); }
.bbl-property-scroller[data-bbl-property-items="5"] .bbl-property-scroller__slide { flex-basis:calc((100% - (4 * var(--bbl-property-gap, 24px))) / 5); }
.bbl-property-scroller[data-bbl-property-items="6"] .bbl-property-scroller__slide { flex-basis:calc((100% - (5 * var(--bbl-property-gap, 24px))) / 6); }

.bbl-property-scroller__arrow {
	position:absolute;
	top:50%;
	z-index:2;
	display:flex;
	align-items:center;
	justify-content:center;
	width:44px;
	height:44px;
	padding:0;
	transform:translateY(-50%);
	border:1px solid rgba(0, 0, 0, .18);
	border-radius:50%;
	background:#fff;
	box-shadow:0 3px 14px rgba(0, 0, 0, .12);
	cursor:pointer;
	font-size:30px;
	line-height:1;
}

.bbl-property-scroller__arrow--previous {
	left:10px;
}

.bbl-property-scroller__arrow--next {
	right:10px;
}

.bbl-property-scroller__arrow[disabled] {
	cursor:default;
	opacity:.35;
}

.bbl-property-scroller__dots {
	display:flex;
	align-items:center;
	justify-content:center;
	flex-wrap:wrap;
	gap:8px;
	min-height:12px;
	margin-top:14px;
}

.bbl-property-scroller__dot {
	width:9px;
	height:9px;
	padding:0;
	border:0;
	border-radius:50%;
	background:currentColor;
	cursor:pointer;
	opacity:.28;
}

.bbl-property-scroller__dot.is-active {
	opacity:1;
}

.bbl-property-display--slider .bbl-property-card__media {
	aspect-ratio:16 / 7;
}

.bbl-property-display--slider .bbl-property-card__content {
	padding:22px;
}

@media (max-width:1024px) {

	.bbl-property-grid[data-bbl-property-tablet="1"] { grid-template-columns:repeat(1, minmax(0, 1fr)); }
	.bbl-property-grid[data-bbl-property-tablet="2"] { grid-template-columns:repeat(2, minmax(0, 1fr)); }
	.bbl-property-grid[data-bbl-property-tablet="3"] { grid-template-columns:repeat(3, minmax(0, 1fr)); }
	.bbl-property-grid[data-bbl-property-tablet="4"] { grid-template-columns:repeat(4, minmax(0, 1fr)); }

	.bbl-property-scroller[data-bbl-property-tablet="1"] .bbl-property-scroller__slide { flex-basis:100%; }
	.bbl-property-scroller[data-bbl-property-tablet="2"] .bbl-property-scroller__slide { flex-basis:calc((100% - (1 * var(--bbl-property-gap, 24px))) / 2); }
	.bbl-property-scroller[data-bbl-property-tablet="3"] .bbl-property-scroller__slide { flex-basis:calc((100% - (2 * var(--bbl-property-gap, 24px))) / 3); }
	.bbl-property-scroller[data-bbl-property-tablet="4"] .bbl-property-scroller__slide { flex-basis:calc((100% - (3 * var(--bbl-property-gap, 24px))) / 4); }
}

@media (max-width:640px) {

	.bbl-property-grid[data-bbl-property-mobile="1"] { grid-template-columns:repeat(1, minmax(0, 1fr)); }
	.bbl-property-grid[data-bbl-property-mobile="2"] { grid-template-columns:repeat(2, minmax(0, 1fr)); }

	.bbl-property-scroller[data-bbl-property-mobile="1"] .bbl-property-scroller__slide { flex-basis:100%; }
	.bbl-property-scroller[data-bbl-property-mobile="2"] .bbl-property-scroller__slide { flex-basis:calc((100% - (1 * var(--bbl-property-gap, 24px))) / 2); }

	.bbl-property-scroller__arrow {
		width:38px;
		height:38px;
		font-size:26px;
	}

	.bbl-property-display--slider .bbl-property-card__media {
		aspect-ratio:4 / 3;
	}
}


/* BBL-IMMO - SLIDE FICHE BIEN : SOCLE STRUCTUREL */
/*
 * BBL-immo - slide de fiche bien
 *
 * Feuille structurelle dédiée : elle garantit l'affichage du rail de
 * miniatures indépendamment du CSS général du moteur d'affichage des biens.
 */

.bbl-property-detail-slide,
.bbl-property-detail-slide * {
	box-sizing:border-box;
}

.bbl-property-detail-slide {
	--bbl-property-slide-duration:450ms;
	--bbl-property-slide-thumbnails-per-view:4;
	--bbl-property-slide-thumbnail-gap:10px;
	position:relative;
	width:100%;
}

.bbl-property-detail-slide__stage {
	position:relative;
	width:100%;
	overflow:hidden;
}

.bbl-property-detail-slide__main-link,
.bbl-property-detail-slide__main-image {
	display:block;
	width:100%;
	height:100%;
}

.bbl-property-detail-slide__navigation {
	display:grid;
	grid-template-columns:34px minmax(0, 1fr) 34px;
	align-items:stretch;
	gap:10px;
	width:100%;
	margin-top:10px;
}

.bbl-property-detail-slide__thumbnails {
	display:flex;
	gap:var(--bbl-property-slide-thumbnail-gap);
	width:100%;
	min-width:0;
	overflow-x:auto;
	overflow-y:hidden;
	scroll-behavior:smooth;
	scrollbar-width:none;
}

.bbl-property-detail-slide__thumbnails::-webkit-scrollbar {
	display:none;
}

.bbl-property-detail-slide__thumbnail {
	appearance:none;
	-webkit-appearance:none;
	position:relative;
	display:block;
	flex:0 0 calc(
		(100% - ((var(--bbl-property-slide-thumbnails-per-view) - 1) * var(--bbl-property-slide-thumbnail-gap)))
		/ var(--bbl-property-slide-thumbnails-per-view)
	);
	min-width:0;
	margin:0;
	padding:0;
	border:2px solid transparent;
	background:transparent;
	box-shadow:none;
	cursor:pointer;
	overflow:hidden;
	aspect-ratio:4 / 3;
}

.bbl-property-detail-slide__thumbnail.is-active {
	border-color:#710A0FFF;
}

.bbl-property-detail-slide__thumbnail-image {
	display:block;
	width:100%;
	height:100%;
	max-width:none;
	object-fit:cover;
}

.bbl-property-detail-slide__arrow {
	appearance:none;
	-webkit-appearance:none;
	display:flex;
	align-items:center;
	justify-content:center;
	width:34px;
	min-width:34px;
	height:100%;
	margin:0;
	padding:0;
	border:0;
	box-shadow:none;
	cursor:pointer;
}

.bbl-property-detail-slide[data-bbl-property-show-thumbnails="0"] .bbl-property-detail-slide__navigation {
	grid-template-columns:34px 34px;
	justify-content:space-between;
}

.bbl-property-detail-slide[data-bbl-property-show-thumbnails="0"] .bbl-property-detail-slide__thumbnails {
	display:none;
}

.bbl-property-detail-slide[data-bbl-property-slide-count="1"] .bbl-property-detail-slide__navigation {
	display:none;
}

.bbl-property-detail-slide.is-bbl-property-animating[data-bbl-property-transition="fade"] .bbl-property-detail-slide__main-image {
	animation:bbl-property-slide-fade var(--bbl-property-slide-duration) ease both;
}

.bbl-property-detail-slide.is-bbl-property-animating[data-bbl-property-transition="slide"][data-bbl-property-slide-direction="next"] .bbl-property-detail-slide__main-image {
	animation:bbl-property-slide-from-right var(--bbl-property-slide-duration) ease both;
}

.bbl-property-detail-slide.is-bbl-property-animating[data-bbl-property-transition="slide"][data-bbl-property-slide-direction="previous"] .bbl-property-detail-slide__main-image {
	animation:bbl-property-slide-from-left var(--bbl-property-slide-duration) ease both;
}

.bbl-property-detail-slide.is-bbl-property-animating[data-bbl-property-transition="zoom-in"] .bbl-property-detail-slide__main-image {
	animation:bbl-property-slide-zoom-in var(--bbl-property-slide-duration) ease both;
}

.bbl-property-detail-slide.is-bbl-property-animating[data-bbl-property-transition="zoom-out"] .bbl-property-detail-slide__main-image {
	animation:bbl-property-slide-zoom-out var(--bbl-property-slide-duration) ease both;
}

@keyframes bbl-property-slide-fade {
	from { opacity:0; }
	to   { opacity:1; }
}

@keyframes bbl-property-slide-from-right {
	from { opacity:0; transform:translateX(8%); }
	to   { opacity:1; transform:translateX(0); }
}

@keyframes bbl-property-slide-from-left {
	from { opacity:0; transform:translateX(-8%); }
	to   { opacity:1; transform:translateX(0); }
}

@keyframes bbl-property-slide-zoom-in {
	from { opacity:.25; transform:scale(.90); }
	to   { opacity:1; transform:scale(1); }
}

@keyframes bbl-property-slide-zoom-out {
	from { opacity:.25; transform:scale(1.10); }
	to   { opacity:1; transform:scale(1); }
}

@media (prefers-reduced-motion:reduce) {
	.bbl-property-detail-slide.is-bbl-property-animating .bbl-property-detail-slide__main-image {
		animation:none !important;
	}
}
