.tableau-proprietes {
	--tp-text: #f5efe3;
	--tp-border: #f5efe3;
	--tp-bg: #b08d57;
	--tp-rowbg-all: transparent;
	--tp-rowtext-all: var(--tp-text);
	--tp-head-bg: transparent;
	--tp-head-text: var(--tp-text);
	--tp-row: #f5efe3;
	--tp-hover: rgba(255, 255, 255, .08);
	--tp-radius: 0px;
	--tp-card-radius: 0px;
	--tp-ui-radius: 0px;
	--tp-overlay: rgba(0, 0, 0, .88);
	--tp-viewer: #ffffff;
	color: var(--tp-text);
	width: 100%;
	box-sizing: border-box;
}
.tableau-proprietes *,
.tableau-proprietes *::before,
.tableau-proprietes *::after { box-sizing: border-box; }

/* Badges */
.tableau-proprietes .tp-badge {
	display: inline-block;
	padding: 4px 12px;
	font-size: .8em;
	font-weight: 600;
	line-height: 1.3;
	background: var(--b-bg);
	color: var(--b-text);
	white-space: nowrap;
	flex-shrink: 0;
	border-radius: var(--tp-ui-radius);
}
/* Couleurs par statut (surchargées par ligne via .elementor-repeater-item-xxx) */
.tableau-proprietes .tp-st--disponible {
	--r-bg: var(--tp-disponible-row-bg, var(--tp-rowbg-all));
	--r-text: var(--tp-disponible-row-text, var(--tp-rowtext-all));
	--r-first: var(--tp-disponible-first-bg, var(--tp-bg));
	--r-first-text: var(--tp-disponible-first-text, var(--tp-first-text-all, var(--r-text)));
	--r-card-border: var(--tp-disponible-card-border, var(--tp-border));
	--r-sep: var(--tp-disponible-sep, var(--tp-row));
	--r-btn-text: var(--tp-disponible-btn-text, var(--tp-btn-text, var(--tp-text)));
	--r-btn-bg: var(--tp-disponible-btn-bg, var(--tp-btn-bg, transparent));
	--r-btn-border: var(--tp-disponible-btn-border, var(--tp-btn-border, var(--tp-border)));
	--b-bg: var(--tp-disponible-badge-bg, #2f7d4f);
	--b-text: var(--tp-disponible-badge-text, #ffffff);
}
.tableau-proprietes .tp-st--reserve {
	--r-bg: var(--tp-reserve-row-bg, var(--tp-rowbg-all));
	--r-text: var(--tp-reserve-row-text, var(--tp-rowtext-all));
	--r-first: var(--tp-reserve-first-bg, var(--tp-bg));
	--r-first-text: var(--tp-reserve-first-text, var(--tp-first-text-all, var(--r-text)));
	--r-card-border: var(--tp-reserve-card-border, var(--tp-border));
	--r-sep: var(--tp-reserve-sep, var(--tp-row));
	--r-btn-text: var(--tp-reserve-btn-text, var(--tp-btn-text, var(--tp-text)));
	--r-btn-bg: var(--tp-reserve-btn-bg, var(--tp-btn-bg, transparent));
	--r-btn-border: var(--tp-reserve-btn-border, var(--tp-btn-border, var(--tp-border)));
	--b-bg: var(--tp-reserve-badge-bg, #c98a1b);
	--b-text: var(--tp-reserve-badge-text, #ffffff);
}
.tableau-proprietes .tp-st--vendu {
	--r-bg: var(--tp-vendu-row-bg, var(--tp-rowbg-all));
	--r-text: var(--tp-vendu-row-text, var(--tp-rowtext-all));
	--r-first: var(--tp-vendu-first-bg, var(--tp-bg));
	--r-first-text: var(--tp-vendu-first-text, var(--tp-first-text-all, var(--r-text)));
	--r-card-border: var(--tp-vendu-card-border, var(--tp-border));
	--r-sep: var(--tp-vendu-sep, var(--tp-row));
	--r-btn-text: var(--tp-vendu-btn-text, var(--tp-btn-text, var(--tp-text)));
	--r-btn-bg: var(--tp-vendu-btn-bg, var(--tp-btn-bg, transparent));
	--r-btn-border: var(--tp-vendu-btn-border, var(--tp-btn-border, var(--tp-border)));
	--b-bg: var(--tp-vendu-badge-bg, #777777);
	--b-text: var(--tp-vendu-badge-text, #ffffff);
}

/* Boutons : neutralise les styles du thème */
.tableau-proprietes button {
	font: inherit;
	color: var(--tp-text);
	background: transparent;
	border-radius: 0;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
}

/* Desktop : tableau */
.tableau-proprietes .tp-desktop { display: none; }
.tableau-proprietes .tp-scroll { overflow-x: auto; border: 1px solid var(--tp-border); border-radius: var(--tp-radius); }
.tableau-proprietes .tp-table {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	white-space: nowrap;
}
.tableau-proprietes .tp-table th,
.tableau-proprietes .tp-table td {
	padding: 14px 16px;
	text-align: left;
	vertical-align: middle;
	border: 0;
	border-bottom: 1px solid var(--tp-row);
	background: transparent;
	color: inherit;
	transition: background-color .2s;
}
.tableau-proprietes .tp-table tbody tr:last-child td { border-bottom: 0; }
.tableau-proprietes .tp-table th { font-weight: 600; }
.tableau-proprietes .tp-table thead tr { background: var(--tp-head-bg); color: var(--tp-head-text); }
.tableau-proprietes .tp-table tbody tr { background: var(--r-bg); color: var(--r-text); }
.tableau-proprietes .tp-table tbody td.tp-sticky { background: var(--r-first); color: var(--r-first-text); }
.tableau-proprietes .tp-table thead th.tp-sticky { background: var(--tp-head-first, var(--tp-bg)); }
.tableau-proprietes .tp-table .tp-sticky {
	position: sticky;
	left: 0;
	z-index: 1;
	background: var(--tp-bg);
	border-right: 1px solid var(--tp-row);
}
.tableau-proprietes .tp-clickable { cursor: pointer; }
.tableau-proprietes .tp-table tbody tr:hover td:not(.tp-sticky),
.tableau-proprietes .tp-table tbody tr.tp-active td:not(.tp-sticky) { background: var(--tp-hover); }
.tableau-proprietes .tp-card.tp-active { box-shadow: inset 0 0 0 100vmax var(--tp-hover); }
.tableau-proprietes .tp-plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--tp-border);
	border-radius: var(--tp-ui-radius);
	transition: background .2s, color .2s;
}
.tableau-proprietes .tp-plus:hover { background: var(--tp-text); color: var(--tp-bg); }

/* Mobile : cartes */
.tableau-proprietes .tp-mobile { display: flex; flex-direction: column; gap: 16px; }
.tableau-proprietes .tp-card {
	border: 1px solid var(--tp-border);
	background: var(--r-bg);
	color: var(--r-text);
	padding: 20px 20px 0;
	border-radius: var(--tp-card-radius);
	overflow: hidden;
	transition: background-color .2s;
}
.tableau-proprietes .tp-card__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding-bottom: 14px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--tp-row);
}
.tableau-proprietes .tp-card__title { margin: 0; font-size: 1.25em; line-height: 1.2; color: inherit; }
.tableau-proprietes .tp-card__price { white-space: nowrap; }
.tableau-proprietes .tp-card__summary {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	padding-bottom: 14px;
}
.tableau-proprietes .tp-card__summary:last-child { padding-bottom: 20px; }
.tableau-proprietes .tp-line { line-height: 1.6; }
.tableau-proprietes .tp-label { color: inherit; }
.tableau-proprietes .tp-line .tp-value { white-space: nowrap; }

/* Flèche */
.tableau-proprietes .tp-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: calc(100% + 40px);
	margin: 0 -20px;
	padding: 10px 20px;
	border: 0;
	border-top: 1px solid var(--tp-row);
}
.tableau-proprietes .tp-chevron { transition: transform .3s ease; }
.tableau-proprietes .tp-toggle[aria-expanded="true"] .tp-chevron { transform: rotate(180deg); }

/* Partie dépliable */
.tableau-proprietes .tp-panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .35s ease;
}
.tableau-proprietes .tp-panel.is-open { grid-template-rows: 1fr; }
.tableau-proprietes .tp-panel__inner { overflow: hidden; min-height: 0; }
.tableau-proprietes .tp-panel__inner > :first-child { margin-top: 6px; }
.tableau-proprietes .tp-panel__inner > :last-child { margin-bottom: 20px; }
.tableau-proprietes .tp-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 16px;
	margin: 0;
}
.tableau-proprietes .tp-grid dt { margin: 0; }
.tableau-proprietes .tp-grid dd { margin: 2px 0 0; }
.tableau-proprietes .tp-btn {
	display: block;
	width: 100%;
	margin-top: 20px;
	padding: 12px 16px;
	text-align: center;
	border: 1px solid var(--tp-border);
	border-radius: var(--tp-ui-radius);
	transition: background .2s, color .2s;
}
.tableau-proprietes .tp-btn:hover { background: var(--tp-text); color: var(--tp-bg); }

.tableau-proprietes .tp-notes { margin-top: 16px; font-size: .875em; }
.tableau-proprietes .tp-notes p { margin: 0 0 4px; }

/* Breakpoint desktop (lg) */
@media (min-width: 1024px) {
	.tableau-proprietes .tp-desktop { display: block; }
	.tableau-proprietes .tp-mobile { display: none; }
}

/* Visionneuse des plans : image seule sur voile */
html.tp-lock { overflow: hidden; }
.tableau-proprietes .tp-viewer {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--tp-viewer);
	overflow: hidden;
}
.tableau-proprietes .tp-viewer[open] { display: block; }
.tableau-proprietes .tp-viewer::backdrop { background: var(--tp-overlay); }
.tableau-proprietes .tp-viewer:not([open])::backdrop { display: none; }
.tableau-proprietes .tp-viewer__stage {
	position: absolute;
	inset: 64px 72px 84px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tableau-proprietes .tp-viewer__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}
.tableau-proprietes .tp-viewer button {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	color: var(--tp-viewer);
	background: transparent;
	opacity: .85;
	transition: opacity .2s;
}
.tableau-proprietes .tp-viewer button:hover { opacity: 1; }
.tableau-proprietes .tp-viewer__close { top: 16px; right: 16px; width: 44px; height: 44px; }
.tableau-proprietes .tp-viewer__nav { top: 50%; width: 56px; height: 56px; transform: translateY(-50%); }
.tableau-proprietes .tp-viewer__prev { left: 12px; }
.tableau-proprietes .tp-viewer__next { right: 12px; }
.tableau-proprietes .tp-viewer.is-single .tp-viewer__nav,
.tableau-proprietes .tp-viewer.is-single .tp-viewer__count { display: none; }
.tableau-proprietes .tp-viewer__bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
}
.tableau-proprietes .tp-viewer__count { display: none; font-size: .9em; opacity: .8; }
.tableau-proprietes .tp-viewer.has-count .tp-viewer__count { display: inline; }
.tableau-proprietes .tp-viewer__dl {
	padding: 10px 22px;
	border: 1px solid var(--tp-viewer);
	border-radius: var(--tp-ui-radius);
	color: var(--tp-viewer);
	text-decoration: none;
	transition: background .2s, color .2s;
}
.tableau-proprietes .tp-viewer__dl:hover { background: var(--tp-viewer); color: #000; }
.tableau-proprietes .tp-viewer__dl[hidden] { display: none; }
@media (max-width: 767px) {
	.tableau-proprietes .tp-viewer__stage { inset: 64px 8px 84px; }
	.tableau-proprietes .tp-viewer__nav { top: auto; bottom: 14px; transform: none; width: 48px; height: 48px; }
	.tableau-proprietes .tp-viewer__prev { left: 8px; }
	.tableau-proprietes .tp-viewer__next { right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.tableau-proprietes .tp-panel,
	.tableau-proprietes .tp-chevron,
	.tableau-proprietes .tp-table td { transition: none; }
}

.tableau-proprietes .tp-viewer button:focus:not(:focus-visible) { outline: none; }
.tableau-proprietes .tp-viewer button:focus-visible { outline: 1px solid var(--tp-viewer); outline-offset: 2px; }
.tableau-proprietes .tp-viewer:focus { outline: none; }

/* Tableau ajusté à la largeur : les en-têtes passent sur plusieurs lignes au lieu de défiler */
.tableau-proprietes.tp-fit .tp-table {
	table-layout: auto;
	white-space: normal;
}
.tableau-proprietes.tp-fit .tp-table th,
.tableau-proprietes.tp-fit .tp-table td {
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
}
/* seuls les en-têtes passent à la ligne, les valeurs restent sur une ligne */
.tableau-proprietes.tp-fit .tp-table td { white-space: nowrap; }
.tableau-proprietes.tp-fit .tp-col-name   { width: var(--tp-w-name); }
.tableau-proprietes.tp-fit .tp-col-price  { width: var(--tp-w-price); }
.tableau-proprietes.tp-fit .tp-col-status { width: var(--tp-w-status); }
.tableau-proprietes.tp-fit .tp-col-plans  { width: var(--tp-w-plans, 1%); }

/* Lignes du tableau : horizontales (tp-lines-h), verticales (tp-lines-v), séparateur 1re colonne (tp-lines-first) */
.tableau-proprietes .tp-table th,
.tableau-proprietes .tp-table td { border-bottom: 0; border-right: 0; }
.tableau-proprietes .tp-table .tp-sticky { border-right: 0; }
.tableau-proprietes.tp-lines-h .tp-table thead th,
.tableau-proprietes.tp-lines-h .tp-table tbody tr:not(:last-child) td { border-bottom: var(--tp-line-w, 1px) solid var(--tp-row); }
.tableau-proprietes.tp-lines-v .tp-table th:not(:last-child),
.tableau-proprietes.tp-lines-v .tp-table td:not(:last-child) { border-right: var(--tp-line-w, 1px) solid var(--tp-row); }
.tableau-proprietes.tp-lines-first .tp-table .tp-sticky { border-right: var(--tp-line-w, 1px) solid var(--tp-row); }

/* Pas de contour de focus au clic/tap (conservé au clavier) */
.tableau-proprietes button:focus:not(:focus-visible) { outline: none; }

/* Mobile : libellés et valeurs = texte normal (neutralise les styles du thème sur dt/dd/h3) */
.tableau-proprietes .tp-card dt,
.tableau-proprietes .tp-card dd,
.tableau-proprietes .tp-card .tp-label,
.tableau-proprietes .tp-card .tp-value { color: inherit; font-weight: inherit; font-size: inherit; font-style: inherit; }

/* Le bouton + des plans ne doit pas agrandir la ligne */
.tableau-proprietes .tp-table .tp-plus { margin-top: -10px; margin-bottom: -10px; vertical-align: middle; }
.tableau-proprietes .tp-table .tp-badge { vertical-align: middle; }

/* Couleurs par statut : texte des cellules (priorité sur les styles du thème), carte et bouton mobile */
.tableau-proprietes .tp-table tbody tr[class*="tp-st--"] td { color: var(--r-text); }
.tableau-proprietes .tp-table tbody tr[class*="tp-st--"] td.tp-sticky { color: var(--r-first-text); }
.tableau-proprietes .tp-card[class*="tp-st--"] { border-color: var(--r-card-border); }
.tableau-proprietes .tp-card[class*="tp-st--"] .tp-card__head { border-bottom-color: var(--r-sep); }
.tableau-proprietes .tp-card[class*="tp-st--"] .tp-toggle { border-top-color: var(--r-sep); }
.tableau-proprietes .tp-card[class*="tp-st--"] .tp-btn {
	color: var(--r-btn-text);
	background-color: var(--r-btn-bg);
	border-color: var(--r-btn-border);
}
.tableau-proprietes .tp-card[class*="tp-st--"] .tp-btn:hover {
	color: var(--tp-btn-text-h, var(--tp-bg));
	background-color: var(--tp-btn-bg-h, var(--tp-text));
	border-color: var(--tp-btn-border-h, var(--r-btn-border));
}

/* Titre des cartes : même police que le reste du widget par défaut (pas celle des titres h3 du thème) */
.tableau-proprietes .tp-card .tp-card__title {
	font-family: inherit;
	font-weight: inherit;
	font-style: inherit;
	letter-spacing: inherit;
	text-transform: none;
	line-height: 1.2;
}

/* ===== Accordéon des plans (desktop) ===== */
.tableau-proprietes .tp-table tbody tr.tp-acc-row,
.tableau-proprietes .tp-table tbody tr.tp-acc-row:hover { cursor: default; }
.tableau-proprietes .tp-table tbody tr.tp-acc-row > td,
.tableau-proprietes .tp-table tbody tr.tp-acc-row:hover > td {
	padding: 0 !important;
	border: 0 !important;
	background: var(--tp-acc-bg, transparent);
	white-space: normal;
}
.tableau-proprietes .tp-acc-wrap {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .45s ease;
}
.tableau-proprietes .tp-acc-row.is-open .tp-acc-wrap { grid-template-rows: 1fr; }
.tableau-proprietes .tp-acc-wrap > .tp-acc { overflow: hidden; min-height: 0; }
.tableau-proprietes .tp-acc { padding: 24px; text-align: center; }
.tableau-proprietes .tp-acc-row:not(.is-open) .tp-acc { padding-top: 0 !important; padding-bottom: 0 !important; }
.tableau-proprietes .tp-acc__imgs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	gap: 20px;
}
.tableau-proprietes .tp-acc__imgs img {
	display: block;
	max-width: 100%;
	max-height: var(--tp-acc-img-h, 700px);
	width: auto;
	height: auto;
}
.tableau-proprietes .tp-acc .tp-acc__dl {
	display: inline-block;
	margin-top: 20px;
	color: inherit;
	border-color: currentColor;
}
.tableau-proprietes .tp-acc .tp-acc__dl:hover { color: var(--r-bg, #fff); background: var(--r-text, currentColor); }
/* ligne ouverte : le + pivote en × */
.tableau-proprietes .tp-plus svg { transition: transform .3s ease; }
.tableau-proprietes tr.tp-acc-open .tp-plus svg { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) {
	.tableau-proprietes .tp-acc-wrap,
	.tableau-proprietes .tp-plus svg { transition: none; }
}

/* pas de double trait en bas du tableau quand l'accordéon de la dernière ligne est fermé */
.tableau-proprietes.tp-lines-h .tp-table tbody tr:has(+ tr.tp-acc-row:last-child:not(.is-open)) td { border-bottom: 0; }

/* trait sous l'accordéon ouvert (entre les plans et la ligne suivante) */
.tableau-proprietes.tp-lines-h .tp-table tbody tr.tp-acc-row.is-open:not(:last-child) > td {
	border-bottom: var(--tp-line-w, 1px) solid var(--tp-row) !important;
}
