/*
 * Mise en page des templates Property (archive + fiche annonce).
 * Réutilise les tokens déjà définis par le thème (couleurs Elementor, ombres,
 * arrondis, typographie fluide) pour rester cohérent avec le reste du site.
 */

/* --------------------------------------------------------------
   Layout partagé
-------------------------------------------------------------- */
.property-single,
.property-archive {
	max-width: 1280px;
	margin: 0 auto;
	padding: clamp(24px, 4vw, 64px) var(--container-default-padding-right, 24px);
}

.property-single__layout,
.property-archive__layout {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(24px, 3vw, 48px);
	align-items: flex-start;
}

.property-single__main,
.property-archive__main {
	flex: 1 1 640px;
	min-width: 0;
}

.property-single__sidebar,
.property-archive__sidebar {
	flex: 1 1 280px;
	max-width: 340px;
	position: sticky;
	top: clamp(80px, 8vw, 140px);
}

@media (max-width: 900px) {
	.property-single__sidebar,
	.property-archive__sidebar {
		position: static;
		max-width: 100%;
	}
}

/* --------------------------------------------------------------
   Galerie (fiche annonce) — Embla Carousel
-------------------------------------------------------------- */
.embla {
	position: relative;
}
.embla__viewport {
	overflow: hidden;
	border-radius: var(--radius);
	box-shadow: var(--box-shadow);
}
.embla__container {
	display: flex;
}
.embla__slide {
	flex: 0 0 100%;
	min-width: 0;
	aspect-ratio: 16 / 10;
	background: #f2f2f2;
}
.embla__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
/*
 * Ces boutons sont écrasés par des règles globales chargées après ce fichier
 * (kit Elementor `.elementor-kit-XXXX button`, reset `[type=button],button` d'un
 * plugin). On requalifie avec le conteneur `.embla`/`.embla-thumbs` pour gagner
 * en spécificité et on réinitialise explicitement tout ce que ces règles touchent.
 */
.embla .embla__prev,
.embla .embla__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 2.5rem;
	height: 2.5rem;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	font-family: inherit;
	font-size: 1.25rem;
	font-weight: normal;
	text-transform: none;
	text-align: center;
	white-space: nowrap;
	line-height: 1;
	border: none;
	border-radius: var(--s-radius);
	background-color: var(--e-global-color-accent);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.embla .embla__prev:hover,
.embla .embla__next:hover {
	background-color: var(--e-global-color-primary);
}
.embla .embla__prev {
	left: 16px;
}
.embla .embla__next {
	right: 16px;
}

.embla-thumbs {
	margin-top: 12px;
}
.embla-thumbs__viewport {
	overflow: hidden;
}
.embla-thumbs__container {
	display: flex;
	gap: 10px;
}
.embla-thumbs .embla-thumbs__slide {
	flex: 0 0 auto;
	width: 88px;
	height: 66px;
	margin: 0;
	padding: 0;
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	font-family: inherit;
	font-size: inherit;
	font-weight: normal;
	text-transform: none;
	text-align: center;
	white-space: nowrap;
	line-height: 1;
	border: 2px solid transparent;
	border-radius: var(--s-radius);
	overflow: hidden;
	cursor: pointer;
	background-color: transparent;
	opacity: 0.7;
	transition: all 0.2s ease;
}
.embla-thumbs__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.embla-thumbs .embla-thumbs__slide:hover {
	opacity: 1;
}
.embla-thumbs .embla-thumbs__slide.is-active {
	opacity: 1;
	border-color: var(--e-global-color-accent);
}

/* --------------------------------------------------------------
   Titre + prix
-------------------------------------------------------------- */
.property-single__header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-top: clamp(20px, 3vw, 32px);
	padding-bottom: 16px;
	border-bottom: 1px solid #eee;
}
.property-single__title {
	margin: 0;
	font-size: var(--font-size--x-large);
	flex: 1 1 320px;
}
.property-single__price {
	font-size: var(--font-size--large);
	font-weight: bold;
	color: #fff;
	background: var(--e-global-color-accent);
	white-space: nowrap;
	padding: 0.4em 0.9em;
	border-radius: var(--s-radius);
}

/* --------------------------------------------------------------
   Détails (grille de caractéristiques)
-------------------------------------------------------------- */
.property-details {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 32px;
	margin: 24px 0;
	background: var(--e-global-color-70798e0);
	border-radius: var(--radius);
	padding: clamp(16px, 3vw, 32px);
}
@media (max-width: 560px) {
	.property-details {
		grid-template-columns: 1fr;
	}
}
.property-details__row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.property-details__row dt {
	color: var(--e-global-color-secondary, #666);
	font-weight: normal;
}
.property-details__row dd {
	margin: 0;
	font-weight: bold;
	text-align: right;
}

/* --------------------------------------------------------------
   Description + caractéristiques additionnelles
-------------------------------------------------------------- */
.property-single__description {
	margin: 24px 0;
	line-height: 1.6;
}
.property-single__description h2,
.property-single__extra h2 {
	font-size: var(--font-size--large);
	margin-bottom: 12px;
}

.property-single__extra {
	margin: 24px 0;
	padding-top: 24px;
	border-top: 1px solid #eee;
}
.property-tags {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.property-tags li a {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: #f5f5f5;
	color: var(--e-global-color-text, #333);
	font-size: 0.9rem;
	text-decoration: none;
	transition: background 0.2s ease;
}
.property-tags li a:hover {
	background: var(--e-global-color-accent);
	color: #fff;
}

.property-documents {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.property-documents__link {
	display: inline-block;
	padding: 0.6rem 1.5rem;
	border-radius: var(--s-radius);
	background: var(--e-global-color-accent);
	color: #fff;
	text-decoration: none;
	font-weight: 300;
}
.property-documents__link:hover {
	background: var(--e-global-color-primary);
}

/* --------------------------------------------------------------
   Localisation (carte)
-------------------------------------------------------------- */
.property-single__map {
	margin: 24px 0;
	padding-top: 24px;
	border-top: 1px solid #eee;
}
.property-single__map h2 {
	font-size: var(--font-size--large);
	margin-bottom: 12px;
}
.property-map__frame {
	position: relative;
	width: 100%;
	padding-top: 45%;
	border-radius: var(--s-radius);
	overflow: hidden;
}
.property-map__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.property-map__link {
	display: inline-block;
	margin-top: 12px;
	color: var(--e-global-color-accent);
	text-decoration: underline;
}
.property-map__link:hover {
	color: var(--e-global-color-primary);
}

/* --------------------------------------------------------------
   Sidebar (widget agent)
-------------------------------------------------------------- */
/* > .widget uniquement : certains widgets ont eux-mêmes un .widget interne,
   un sélecteur descendant appliquerait la carte deux fois (double ombre). */
.con-sidebar > .widget {
	background: #fff;
	border-radius: var(--radius);
	margin-bottom: 24px;
}
.con-sidebar > .widget .widget-title {
	font-size: var(--font-size--medium);
	margin-top: 0;
	margin-bottom: 16px;
}

/* --------------------------------------------------------------
   Archive / résultats de recherche
-------------------------------------------------------------- */
.property-archive__title {
	font-size: var(--font-size--xx-large);
	margin-bottom: clamp(24px, 3vw, 40px);
}
.property-archive__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}
@media (max-width: 700px) {
	.property-archive__grid {
		grid-template-columns: 1fr;
	}
}

.property-card {
	background: #fff;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--box-shadow);
	transition: box-shadow 0.2s ease;
	display: flex;
	flex-direction: column;
}
.property-card:hover {
	box-shadow: var(--big-box-shadow);
}
.property-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #f2f2f2;
}
.property-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.property-card__status,
.property-card__price {
	position: absolute;
	padding: 4px 12px;
	font-size: 0.85rem;
	border-radius: var(--s-radius);
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
}
.property-card__status {
	top: 12px;
	left: 12px;
}
.property-card__price {
	bottom: 12px;
	right: 12px;
	background: var(--e-global-color-accent);
	font-weight: bold;
}
.property-card__body {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}
.property-card__title {
	margin: 0 0 12px;
	font-size: 1.1rem;
}
.property-card__title a {
	color: inherit;
	text-decoration: none;
}
.property-card__title a:hover {
	color: var(--e-global-color-accent);
}
.property-card .listing-details {
	margin-top: auto;
}

.property-empty {
	text-align: center;
	padding: 48px 24px;
	background: #f9f9f9;
	border-radius: var(--radius);
}

.property-pagination {
	margin-top: 32px;
	display: flex;
	justify-content: center;
	gap: 8px;
}
.property-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: var(--s-radius);
	background: #f5f5f5;
	color: var(--e-global-color-text, #333);
	text-decoration: none;
}
.property-pagination .page-numbers.current {
	background: var(--e-global-color-accent);
	color: #fff;
}
