/* =========================================================================
   Melkeys - Fiche bien (single property) - rendu codé, façon prod melkeys.com
   Scopé sous .mk-single. Charte : navy #172740, crème #f6eedb, Roboto.
   Étape 1 : structure + système d'onglets (Descriptif rempli).
   ========================================================================= */

.mk-single {
	--mk-navy: #172740;
	--mk-cream: #f6eedb;
	--mk-muted: #7a7f87;
	--mk-border: #e4e7ea;
	padding-top: 105px;
	font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
	color: var(--mk-navy);
}

.mk-single__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 15px 56px;
}

/* houzez_listing_price_v1() renvoie .item-price-wrap que le thème parent place
   en position:absolute (bottom/left), pour se caler en bas d'une image de carte.
   Sur la fiche on la remet dans le flux normal (sinon le prix file en bas à
   gauche de la page et les deux occurrences se superposent). !important pour
   battre la règle parente quelle que soit sa spécificité. */
.mk-single .item-price-wrap {
	position: static !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---- Boutons crème (Nous contacter / Envoyer) ---- */
.mk-single .mk-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 48px;
	padding: 0 24px;
	border: 1px solid transparent;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .4px;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.mk-single .mk-btn--cream {
	background: var(--mk-cream);
	color: var(--mk-navy);
	border-color: var(--mk-cream);
}

.mk-single .mk-btn--cream:hover {
	background: var(--mk-navy);
	color: var(--mk-cream);
	border-color: var(--mk-navy);
}

/* =========================================================================
   BLOC TITRE (centré)
   ========================================================================= */
.mk-hero {
	text-align: center;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--mk-navy);
}

.mk-hero__title {
	margin: 0;
	font-size: 26px;
	font-weight: 400;
	line-height: 1.3;
}

/* Badge exclusivité : sous le titre, centré (hero déjà text-align:center). */
.mk-hero__badge-wrap {
	margin-top: 5px;
}

.mk-hero__badge {
	display: inline-block;
	font-size: 11px;
	line-height: 1;
	padding: 6px 12px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #fff;
	background: var(--mk-navy);
}

.mk-hero__type {
	text-transform: uppercase;
	color: var(--mk-muted);
	letter-spacing: .5px;
}

.mk-hero__city {
	text-transform: uppercase;
	font-weight: 700;
	color: var(--mk-navy);
	margin-left: 6px;
}

.mk-hero__crit {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 0 8px;
	margin-top: 10px;
	font-size: 22px;
	color: var(--mk-navy);
}

.mk-hero__price {
	list-style: none;
	margin: 0;
	padding: 0;
	display: inline-flex;
}

.mk-hero__price .item-price,
.mk-hero__price .item-price .price {
	font-size: 22px;
	font-weight: 700;
	color: var(--mk-navy);
	list-style: none;
}

.mk-hero .mk-star {
	color: var(--mk-navy);
	font-size: 14px;
}

.mk-hero__meta {
	font-weight: 400;
}

/* =========================================================================
   SOUS-BARRE (retour / suivant + contacter)
   ========================================================================= */
.mk-subbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 18px 0 24px;
}

.mk-subbar__nav {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mk-subbar__link {
	color: var(--mk-navy);
	text-decoration: none;
	font-size: 15px;
}

.mk-subbar__link:hover {
	color: #3a5170; /* navy éclairci (charte) au lieu du bleu clair hérité */
	text-decoration: underline;
}

.mk-subbar__next {
	font-weight: 700;
}

.mk-subbar__sep {
	color: var(--mk-border);
}

/* =========================================================================
   GALERIE (carousel coverflow Swiper : slide central + voisins atténués)
   ========================================================================= */
.mk-gallery {
	margin-bottom: 8px;
}

.mk-gallery__swiper {
	width: 100%;
	height: 540px;
	overflow: hidden;
}

.mk-gallery__swiper .swiper-slide {
	height: 100%;
	border-radius: 8px;
	overflow: hidden;
}

.mk-gallery__swiper .swiper-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* L'image centrale ouvre le plein écran au clic (les latérales se recentrent) :
   on l'indique par le curseur loupe. */
.mk-gallery__swiper .swiper-slide-active img {
	cursor: zoom-in;
}

.mk-gallery__nav {
	display: flex;
	justify-content: center;
	gap: 28px;
	margin-top: 14px;
}

.mk-gallery__btn {
	background: transparent;
	border: 0;
	padding: 6px 12px;
	font-size: 20px;
	line-height: 1;
	color: var(--mk-navy);
	cursor: pointer;
	opacity: .5;
	transition: opacity .2s ease;
}

.mk-gallery__btn:hover {
	opacity: 1;
}

@media (max-width: 991.98px) {
	.mk-gallery__swiper {
		height: 400px;
	}
}

@media (max-width: 575.98px) {
	.mk-gallery__swiper {
		height: 280px;
	}
}

/* Desktop : la galerie déborde du container (1200px) pour gagner en largeur.
   Centrée sur le viewport (le container est lui-même centré) et plafonnée à
   la largeur de l'écran (- 40px) pour ne jamais créer de scroll horizontal. */
@media (min-width: 1240px) {
	.mk-gallery {
		width: 1440px;
		max-width: calc(100vw - 40px);
		margin-left: 50%;
		transform: translateX(-50%);
	}

	.mk-gallery__swiper {
		height: 580px;
	}
}

/* =========================================================================
   ONGLETS
   ========================================================================= */
.mk-tabs {
	margin-top: 28px;
}

.mk-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 2px solid var(--mk-border);
}

.mk-tabs__nav > li {
	margin: 0;
}

.mk-tab {
	border: 0;
	background: transparent;
	margin: 0;
	padding: 12px 16px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	color: var(--mk-navy);
	cursor: pointer;
	border-radius: 4px 4px 0 0;
	position: relative;
	transition: background .15s ease, color .15s ease;
}

.mk-tab:hover {
	background: #f3f4f6;
}

.mk-tab.is-active {
	background: var(--mk-navy);
	color: #fff;
}

/* Outils (favori / imprimer / partager) calés à droite */
.mk-tabs__tools {
	margin-left: auto;
	display: flex;
	align-items: center;
}

/* Outils natifs Houzez (favori / partage / impression) rendus dans la barre
   d'onglets. On reprend l'apparence des anciens boutons .mk-tool. */
.mk-tabs__tools .property-item-tools {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mk-tabs__tools .item-tool {
	position: relative;
}

.mk-tabs__tools .item-tool > span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	padding: 8px;
	font-size: 20px;
	line-height: 1;
	color: var(--mk-navy);
	background: transparent;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	opacity: .8;
	transition: opacity .15s ease, color .15s ease;
}

.mk-tabs__tools .item-tool > span:hover {
	background: transparent;
	color: var(--mk-navy);
	opacity: 1;
}

.mk-tabs__tools .houzez-favorite > span:hover,
.mk-tabs__tools .item-tool-favorite .text-danger {
	color: #e34848;
}

/* Panneaux */
.mk-tabs__panels {
	padding-top: 6px;
}

.mk-panel {
	display: none;
	padding: 28px 0;
}

.mk-panel.is-active {
	display: block;
}

.mk-soon {
	padding: 24px;
	background: #f6f7f8;
	border-radius: 6px;
	color: var(--mk-muted);
	font-style: italic;
}

/* ---- DÉTAIL : liste 2 colonnes "label : ........ valeur" ---- */
.mk-detail {
	list-style: none;
	margin: 0;
	padding: 0;
	column-count: 2;
	column-gap: 56px;
}

.mk-detail__row {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 7px 0;
	font-size: 16px;
	break-inside: avoid;
}

.mk-detail__label {
	color: var(--mk-muted);
	white-space: nowrap;
}

.mk-detail__dots {
	flex: 1 1 auto;
	min-width: 20px;
	border-bottom: 1px dotted #c4c8cd;
	transform: translateY(-4px);
}

.mk-detail__value {
	color: var(--mk-navy);
	font-weight: 500;
	white-space: nowrap;
	text-align: right;
}

@media (max-width: 767.98px) {
	.mk-detail {
		column-count: 1;
		column-gap: 0;
	}
}

/* ---- PIÈCES : grille de cartes (nom + surface) ---- */
.mk-rooms {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 18px;
}

.mk-room {
	border: 1px solid var(--mk-border);
	border-radius: 4px;
	padding: 22px 14px;
	text-align: center;
}

.mk-room__name {
	display: block;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .3px;
	color: var(--mk-navy);
}

.mk-room__area {
	display: block;
	margin-top: 8px;
	font-size: 15px;
	color: var(--mk-navy);
}

@media (max-width: 991.98px) {
	.mk-rooms {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 575.98px) {
	.mk-rooms {
		grid-template-columns: 1fr;
	}
}

/* ---- DPE - GES : étiquettes officielles (API outils.immo, norme 2021) ---- */
.mk-dpe {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 360px));
	gap: 40px;
	align-items: start;
}

.mk-dpe__title {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 700;
	color: var(--mk-navy);
}

.mk-dpe__title span {
	font-weight: 400;
	font-size: 13px;
	color: var(--mk-muted);
}

.mk-dpe__label {
	display: block;
	width: 100%;
	max-width: 340px;
	height: auto;
}

@media (max-width: 767.98px) {
	.mk-dpe {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

/* ---- LOCALISATION : carte ---- */
.mk-map {
	width: 100%;
	height: 440px;
	border-radius: 8px;
	overflow: hidden;
	z-index: 0; /* garde la carte sous le header/éléments du thème */
}

/* Pin custom (divIcon) : on enlève le fond/bordure par défaut de Leaflet */
.mk-map-pin {
	background: transparent !important;
	border: 0 !important;
}

@media (max-width: 575.98px) {
	.mk-map {
		height: 340px;
	}
}

/* ---- FRAIS DE NOTAIRE : calculateur (repris de la section prestataire) ---- */
.cfn-container {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	color: #333;
}

.cfn-left-col {
	flex: 1.2;
	min-width: 320px;
}

.cfn-right-col {
	flex: 1;
	min-width: 320px;
}

.cfn-right-col .chart-wrapper {
	position: relative;
	height: 380px;
	width: 100%;
}

.cfn-inputs {
	background: #fcfcfc;
	border: 1px solid #f0f0f0;
	padding: 20px;
	margin-bottom: 25px;
}

.cfn-input-row {
	display: flex;
	gap: 20px;
	margin-bottom: 15px;
}

.cfn-input-group {
	flex: 1;
}

.cfn-input-group label {
	display: block;
	font-size: 13px;
	color: #666;
	margin-bottom: 5px;
}

.cfn-input-group input,
.cfn-input-group select,
.cfn-dept {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	font-size: 16px;
	background: #fff;
	box-sizing: border-box;
}

.cfn-checkbox-group {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 5px;
	font-size: 14px;
}

.cfn-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.cfn-table th {
	font-weight: bold;
	color: #555;
	border-bottom: 2px solid #ddd;
	padding: 10px;
}

.cfn-table td {
	padding: 12px 10px;
	border-bottom: 1px solid #eee;
}

.cfn-table .text-right {
	text-align: right;
}

.cfn-row-blue td {
	background-color: var(--mk-cream) !important;
	color: var(--mk-navy) !important;
	font-weight: 600;
}

.cfn-row-total td {
	background-color: var(--mk-navy) !important;
	color: #ffffff !important;
	font-weight: bold;
}

.cfn-disclaimer {
	font-size: 12px;
	color: #888;
	margin-top: 15px;
	font-style: italic;
}

@media screen and (max-width: 768px) {
	.cfn-container {
		gap: 25px;
	}

	.cfn-input-row {
		flex-direction: column;
		gap: 15px;
	}

	.cfn-checkbox-group {
		justify-content: flex-start;
		margin-top: 10px;
	}

	.cfn-table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	.cfn-right-col .chart-wrapper {
		height: 280px;
	}

	.cfn-table th.text-right:last-child {
		font-size: 0;
	}
}

/* ---- DESCRIPTIF : aside (résumé) + main (titre + description) ---- */
.mk-desc {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 40px;
}

.mk-desc__type {
	font-size: 15px;
	color: var(--mk-navy);
}

.mk-desc__city {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--mk-navy);
}

.mk-desc__city i {
	font-size: 18px;
}

.mk-desc__price {
	margin-top: 18px;
}

.mk-desc__price .item-price-wrap {
	list-style: none;
	margin: 0;
	padding: 0;
	display: inline-flex;
}

.mk-desc__price .item-price,
.mk-desc__price .item-price .price {
	font-size: 26px;
	font-weight: 700;
	color: var(--mk-navy);
	list-style: none;
}

.mk-desc__fees {
	margin-top: 8px;
	font-size: 12px;
	color: var(--mk-muted);
	line-height: 1.4;
}

.mk-desc .mk-specs {
	list-style: none;
	margin: 22px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 20px 28px;
	color: var(--mk-navy);
}

.mk-desc .mk-specs li {
	display: flex;
	align-items: baseline;
	gap: 6px;
	font-size: 15px;
}

.mk-desc .mk-specs .val {
	position: relative;
	font-size: 20px;
	font-weight: 700;
}

.mk-desc .mk-specs .val::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -6px;
	width: 16px;
	height: 2px;
	background: var(--mk-navy);
}

.mk-desc__title {
	margin: 0 0 14px;
	font-size: 22px;
	font-weight: 700;
	color: var(--mk-navy);
}

.mk-desc__text {
	font-size: 15px;
	line-height: 1.7;
	color: #33373d;
}

.mk-desc__text p {
	margin: 0 0 14px;
}

/* =========================================================================
   SECTIONS (Contactez-nous / Biens similaires) : titre + barre d'accent
   ========================================================================= */
.mk-section {
	margin-top: 48px;
}

.mk-section__title {
	position: relative;
	margin: 0 0 24px;
	padding-left: 16px;
	font-size: 26px;
	font-weight: 700;
	color: var(--mk-navy);
}

.mk-section__title::before {
	content: "";
	position: absolute;
	left: 0;
	top: 4px;
	bottom: 4px;
	width: 4px;
	border-radius: 2px;
	background: var(--mk-navy);
}

/* ---- Formulaire de contact ---- */
/* Contact : titre + formulaire dans un même bloc de 760px, centré sur la page.
   Le titre reste aligné à gauche dans ce bloc, avec sa barre d'accent. */
.mk-contact {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
}

.mk-form__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px 28px;
}

.mk-field--full {
	grid-column: 1 / -1;
}

.mk-form .mk-field label {
	display: block;
	margin-bottom: 8px;
	font-size: 16px;
	color: var(--mk-navy);
}

.mk-form .mk-req {
	color: var(--mk-navy);
}

.mk-form .form-control {
	width: 100%;
	height: 48px;
	padding: 0 14px;
	border: 1px solid #d7dbe0;
	border-radius: 2px;
	background: #fff;
	color: var(--mk-navy);
	font-size: 15px;
	font-family: inherit;
}

.mk-form textarea.form-control {
	height: auto;
	padding: 12px 14px;
	line-height: 1.6;
}

.mk-form .form-control:focus {
	outline: 0;
	border-color: var(--mk-navy);
}

.mk-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 22px 0 14px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--mk-muted);
}

.mk-consent input {
	margin-top: 3px;
	flex: 0 0 auto;
}

.mk-form__req {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--mk-muted);
}

.mk-form .form_messages {
	margin-bottom: 14px;
}

/* ---- Contact Form 7 (intégré dans .mk-form) ---- */
/* Le wrapper de chaque champ passe en bloc pour que l'input soit sous le label. */
.mk-form .wpcf7-form-control-wrap {
	display: block;
}

.mk-form .wpcf7 br {
	display: none;
}

/* Case d'acceptation RGPD : checkbox + texte alignés */
.mk-form .mk-consent {
	display: block;
}

.mk-form .mk-consent .wpcf7-list-item {
	display: block;
	margin: 0;
}

.mk-form .mk-consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--mk-muted);
}

.mk-form .mk-consent input[type="checkbox"] {
	margin-top: 3px;
	flex: 0 0 auto;
}

/* Messages de validation sous les champs */
.mk-form .wpcf7-not-valid-tip {
	margin-top: 5px;
	font-size: 12px;
	color: #d63638;
}

.mk-form .form-control.wpcf7-not-valid {
	border-color: #d63638 !important;
}

/* Bandeau de réponse (succès / erreur) */
.mk-form .wpcf7-response-output {
	margin: 18px 0 0;
	padding: 12px 16px;
	border-radius: 4px;
	font-size: 14px;
}

/* Spinner CF7 aligné avec le bouton */
.mk-form .wpcf7-spinner {
	margin: 0 0 0 10px;
}

/* ---- Biens similaires (cartes Property Card v1) ---- */
.mk-similar__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 991.98px) {
	.mk-desc {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.mk-similar__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767.98px) {
	.mk-form__grid {
		grid-template-columns: 1fr;
	}

	.mk-similar__grid {
		grid-template-columns: 1fr;
	}

	.mk-tab {
		font-size: 14px;
		padding: 10px 12px;
	}

	.mk-hero__title {
		font-size: 22px;
	}
}
