/**
 * Fiche « bien immobilier » — mise en page d'après la maquette. Scopée .fti-fiche, à l'intérieur d'un
 * conteneur .fti-archive : hérite des tokens --fti-* et du composant carte (archive-property.css) réutilisé
 * pour les biens suggérés. Le fond de carte réutilise le composant .ftimmo-map (ftimmo-map.css).
 */

.fti-fiche {
	color: var(--fti-ink);
	/* Gabarit calé sur les variables globales Elementor (fallbacks = valeurs du thème). Le padding
	   bascule selon le breakpoint (lg desktop → md tablette → sm mobile). */
	--fti-pad: var(--site-padding-lg, 40px);
	--fti-cmax: var(--site-width-max, 1280px);
	/* Container fluide (pleine largeur) : c'est LUI qui porte le padding latéral. */
	padding-left: var(--fti-pad);
	padding-right: var(--fti-pad);
}
@media (max-width: 1024px) { .fti-fiche { --fti-pad: var(--site-padding-md, 30px); } }
@media (max-width: 767px)  { .fti-fiche { --fti-pad: var(--site-padding-sm, 20px); } }
.fti-fiche *, .fti-fiche *::before, .fti-fiche *::after { box-sizing: border-box; }
/* Enfant : simple max-width centré, SANS padding (le parent fluide s'en charge). */
.fti-fiche__container { max-width: var(--fti-cmax); margin: 0 auto; }

/* Quittance de renouvellement (retour du lien e-mail) : bloc bleu clair, texte centré, inséré
   au-dessus de la barre de retour, avec filet gris inférieur (même forme que les pages d'alerte). */
.fti-fiche__flashwrap { margin-top: 50px; padding-bottom: 50px; border-bottom: 1px solid var(--fti-border); }
.fti-fiche__flash { background: #eef5ff; border-radius: 20px; padding: 50px; text-align: center; }
.fti-fiche__flash-title { margin: 0 0 15px; color: var(--fti-navy); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.fti-fiche__flash-meta { margin: 0; color: var(--fti-ink); font-size: 1.25rem; line-height: 1.3; }
/* Ligne durée/expiration : collée à la ligne suivante sur desktop, aérée de 10px sur mobile (où elle passe sur plusieurs lignes). */
.fti-fiche__flash-meta--dates { margin-bottom: 0; }
@media (max-width: 767px) { .fti-fiche__flash-meta--dates { margin-bottom: 10px; } }
.fti-fiche__flash--fail { background: #fce8e8; }
.fti-fiche__flash--fail .fti-fiche__flash-title { color: #b32d2e; }

/* Retour à la liste — barre collante au scroll (retour facilité sans remonter en haut). */
.fti-fiche__backsentinel { height: 1px; margin: 0; padding: 0; }
.fti-fiche__backbar {
	position: sticky; top: 0; z-index: 1001; /* au-dessus des panes/contrôles Leaflet (jusqu'à ~1000). */
	display: flex; align-items: center; justify-content: space-between;
	background: #fff;
}
.fti-fiche__backbar.is-stuck { border-bottom: 1px solid var(--fti-card-border); }
.fti-fiche__back { display: inline-flex; align-items: center; gap: 8px; margin: 24px 0; color: var(--fti-ink); text-decoration: none; font-size: 1.125rem; }
.fti-fiche__back svg { width: 24px; height: 24px; }
.fti-fiche__back:hover { color: var(--fti-primary); }
/* Logo FTI révélé en fondu quand la barre devient collante. */
.fti-fiche__backlogo { height: 30px; width: auto; display: block; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.fti-fiche__backbar.is-stuck .fti-fiche__backlogo { opacity: 1; }
/* Compensation de la barre d'admin WP (fixe et haute de 32px à partir de 783px) : on décale le point
   d'accroche des éléments collants de 32px vers le bas. Le relâchement final du contact ne change pas
   (il dépend du bas de sa colonne, pas du top). Sous 782px, la barre WP défile → aucune compensation. */
@media screen and (min-width: 783px) {
	body.logged-in.admin-bar .fti-fiche__backbar { top: 32px; }
	body.logged-in.admin-bar .fti-fiche__contact { top: 142px; }
}

/* Carrousel photo (hero) : mêmes flèches rondes que les cartes. */
.fti-fiche__hero { position: relative; margin-bottom: 62px; }
.fti-fiche__photos, .fti-fiche__hero > .fti-fiche__photo, .fti-fiche__noimg { border-radius: 30px; overflow: hidden; }
.fti-fiche__photo { display: block; width: 100%; height: clamp(300px, 46vw, 640px); object-fit: cover; background: var(--fti-bg-soft); }
.fti-fiche__noimg { display: flex; align-items: center; justify-content: center; height: clamp(300px, 46vw, 640px); background: var(--fti-bg-soft); color: var(--fti-muted); }
/* Tablette (et mobile) : image de tête plus haute proportionnellement, plafonnée à 450px. */
@media (max-width: 1024px) {
	.fti-fiche__photo, .fti-fiche__noimg { height: clamp(300px, 55vw, 450px); }
}
/* Tablette : corps de la fiche à 1.125rem au lieu de 1.25rem (base héritée + deux éléments explicites).
   Les titres (1.5rem) ne sont pas concernés, et les cartes « À voir aussi » gardent leur taille d'origine
   (on restaure 1.25rem sur leur conteneur, car le composant carte s'appuie en partie sur l'héritage). */
@media (max-width: 1024px) {
	.fti-fiche { font-size: 1.125rem; }
	.fti-fiche__flash-meta, .fti-fiche__contact-h { font-size: 1.125rem; }
	.fti-fiche__suggest { font-size: 1.25rem; }
}
/* Flèches : 50×50 forcé (jamais déformé). Repos = fond blanc, flèche noire, opacité 40 % ; survol de
   l'image → 70 % ; survol du bouton → 100 % + flèche primaire ; pressé → fond primaire, flèche blanche. */
.fti-fiche__nav {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
	width: 50px !important; height: 50px !important; min-width: 50px; min-height: 50px; flex: 0 0 50px;
	/* Remises à zéro forcées (le reset.css du thème pose padding/bordure sur les <button> → décentrage). */
	padding: 0 !important; margin: 0 !important; border: 0 !important; box-sizing: border-box !important; line-height: 0 !important;
	display: flex !important; align-items: center; justify-content: center;
	border-radius: 50% !important; background: #fff !important; color: #000 !important;
	opacity: .4; cursor: pointer; box-shadow: 0 1px 6px rgba(0,0,0,.2);
	transition: opacity .2s ease, background .2s ease, color .2s ease;
}
.fti-fiche__nav svg { width: 24px !important; height: 24px !important; display: block; margin: 0; }
.fti-fiche__nav--prev { left: 20px; }
.fti-fiche__nav--next { right: 20px; }
.fti-fiche__hero:hover .fti-fiche__nav { opacity: .7; }
/* Repos blanc/noir déjà en !important ci-dessus (aucun mauve du reset possible) : au clic souris, la
   flèche retombe donc à 40 % quand la souris quitte l'image. Survol / focus clavier : 100 % + primaire. */
.fti-fiche__nav:hover, .fti-fiche__nav:focus-visible {
	opacity: 1 !important; background: #fff !important; color: var(--fti-primary) !important;
}
.fti-fiche__nav:active { opacity: 1 !important; background: var(--fti-primary) !important; color: #fff !important; }

/* Puces : bord blanc 1px ; zone à 40 % au repos, 100 % au survol de l'image ; sélection = primaire + bord blanc. */
.fti-fiche__dots { position: absolute; bottom: 16px; left: 0; right: 0; z-index: 3; opacity: .4; transition: opacity .2s ease; }
.fti-fiche__hero:hover .fti-fiche__dots { opacity: 1; }
.fti-fiche__dots .swiper-pagination-bullet { background: #fff; border: 1px solid #fff; opacity: 1; }
.fti-fiche__dots .swiper-pagination-bullet-active { background: var(--fti-primary); border: 1px solid #fff; }

/* En-tête (label + réf + titre) / carte Contact */
.fti-fiche__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 40px; align-items: start; margin-bottom: 48px; }
.fti-fiche__eyebrow { display: flex; align-items: baseline; gap: 16px; margin: 0 0 10px; }
.fti-fiche__contract { color: var(--fti-primary); font-weight: 700; letter-spacing: .02em; font-size: .9375rem;}
.fti-fiche__ref { color: var(--fti-muted); font-size: .9375rem; }
.fti-fiche__title { margin: 0 0 52px; font-size: clamp(1.7rem, 3vw, 2.25rem); line-height: 1.2; font-weight: 700; }
.fti-fiche__desc { color: var(--fti-ink); line-height: 1.6; }
.fti-fiche__desc :first-child { margin-top: 0; }

/* Carte Contact (beige) */
/* Carte Contact : alignée en tête avec « LOCATION » (marge 8px), et STICKY au scroll (70px sous le haut)
   jusqu'à la fin de la colonne — soit le début de la carte, la grille s'arrêtant là. */
.fti-fiche__contact { margin-top: 8px; position: sticky; top: 110px; align-self: start; background: #ece8e1; border-radius: 24px; padding: 24px 28px; }
.fti-fiche__contact-h { margin: 0 0 12px; font-weight: 700; font-size: 1.25rem; }
.fti-fiche__company { margin: 0; line-height: 1.5; }
.fti-fiche__contact-sep { border: 0; border-top: 1px solid rgba(0,0,0,.15); margin: 16px 0; }
.fti-fiche__contact-name { margin: 0 0 4px; }
.fti-fiche__contact p { margin: 0 0 2px; }
.fti-fiche__contact-link { display: inline-flex; align-items: center; gap: 8px; color: var(--fti-primary); text-decoration: none; }
/* Icône (phone/mail/globe) devant le libellé : taille fixe, ne rétrécit pas, ne se souligne pas au survol. */
.fti-fiche__contact-link svg { flex: 0 0 auto; width: 18px; height: 18px; }
.fti-fiche__contact-link:hover span { text-decoration: underline; }
/* Mobile : le téléphone devient un bouton d'appel PRIMAIRE, pleine largeur, texte + icône en blanc. Ciblé sur
   le seul lien tel: (l'e-mail et le site restent des liens texte). */
@media (max-width: 767px) {
	.fti-fiche .fti-fiche__contact-link[href^="tel:"] {
		display: flex; width: 100%; box-sizing: border-box; justify-content: center;
		padding: 12px 20px; border-radius: 999px;
		background: var(--fti-primary); color: #fff; font-weight: 600;
	}
	.fti-fiche .fti-fiche__contact-link[href^="tel:"] span,
	.fti-fiche .fti-fiche__contact-link[href^="tel:"] svg { color: #fff; }
	.fti-fiche .fti-fiche__contact-link[href^="tel:"]:hover { background: var(--fti-primary-dark); color: #fff; }
	.fti-fiche .fti-fiche__contact-link[href^="tel:"]:hover span { text-decoration: none; }
	/* Le bouton d'appel passe SOUS l'e-mail (et le site) : bloc contact en colonne flex, téléphone en dernier
	   (order), avec une marge haute pour le détacher des liens texte au-dessus. */
	.fti-fiche__contact { display: flex; flex-direction: column; }
	.fti-fiche__contact p.fti-fiche__contact-tel { order: 1; margin-top: 15px; } /* p.… pour battre .fti-fiche__contact p (margin:0). */
	/* E-mail/site sur deux lignes : l'icône s'aligne sur la 1re ligne (haut) et non au centre du bloc. Exclut
	   le bouton d'appel (une ligne, texte centré). Léger décalage bas de l'icône pour épouser la ligne de texte. */
	.fti-fiche .fti-fiche__contact-link:not([href^="tel:"]) { align-items: flex-start; }
	.fti-fiche .fti-fiche__contact-link:not([href^="tel:"]) svg { margin-top: 5px; }
}

/* Titres de section */
.fti-fiche__h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 20px; }
/* Caractéristiques placées dans la colonne gauche, sous la description → un peu d'air au-dessus. */
.fti-fiche__h2--specs { margin-top: 56px; margin-bottom: 24px; }
/* padding-top (et non margin-top) : la marge basse de la grille absorberait un margin-top par collapse. */
.fti-fiche__h2--map { padding-top: 16px; margin-bottom: 24px; }

/* Tableau Caractéristiques */
/* Pas de marge basse : la colonne gauche s'arrête sur la dernière ligne → le contact sticky se relâche
   aligné en pied avec elle (l'espacement vers la carte est porté par .fti-fiche__grid). */
.fti-fiche__specs { margin: 0; padding: 0; }
.fti-fiche__spec { display: flex; justify-content: space-between; gap: 24px; padding: 10px 0; border-bottom: 1px solid var(--fti-card-border); }
.fti-fiche__spec:first-child { border-top: 1px solid var(--fti-card-border); }
.fti-fiche__spec dt { margin: 0; font-weight: 700; }
.fti-fiche__spec dd { margin: 0; text-align: right; color: var(--fti-ink); }

/* Références complémentaires : chaque ligne est un simple hyperlien (pas de paire label/valeur). */
.fti-fiche__spec--ref { justify-content: flex-start; }
.fti-fiche__ref-link { color: var(--fti-primary); font-weight: 600; text-decoration: none; }
.fti-fiche__ref-link:hover { text-decoration: underline; }

/* Découplage du bleu global d'Elementor. La règle `.elementor-kit-6 a { color: var(--e-global-color-primary) }`
   (spécificité 0,1,1, issue d'Elementor V3, non préfixable) l'emporte sinon sur nos classes de lien (0,1,0) et
   recolore nos liens de fiche avec le bleu global du thème. On réaffirme ici NOS couleurs de token avec le
   préfixe `.fti-fiche` (spécificité 0,2,0 > 0,1,1) : nos composants gardent leur design, AA compris. */
.fti-fiche .fti-fiche__back { color: var(--fti-primary); }
.fti-fiche .fti-fiche__back:hover { color: var(--fti-navy); }
.fti-fiche .fti-fiche__contact-link { color: var(--fti-primary); }
.fti-fiche .fti-fiche__ref-link { color: var(--fti-primary); }

/* Sur la carte */
.fti-fiche__mapcanvas { width: 100%; aspect-ratio: 2.4; min-height: 320px; border: 1px solid var(--fti-card-border); border-radius: 10px; overflow: hidden; background: var(--fti-bg-soft); margin-bottom: 48px; }
/* Tablette (et mobile) : carte calée sur la MÊME proportion que l'image hero (hauteur clampée identique),
   pour l'harmonie visuelle. On neutralise l'aspect-ratio panoramique du desktop. */
@media (max-width: 1024px) {
	.fti-fiche__mapcanvas { aspect-ratio: auto; height: clamp(300px, 55vw, 450px); min-height: 0; }
}

/* Filet séparateur entre la carte et « À voir aussi » (70px de marge au-dessus et en dessous). */
.fti-fiche__hr { border: 0; border-top: 1px solid var(--fti-card-border); margin: 70px 0; }

/* À voir aussi (carrousel de cartes) */
.fti-fiche__suggest { margin-bottom: 56px; }
.fti-fiche__suggest .fti-fiche__h2 { transform: translateY(-6px); } /* remonte le titre de 6px (transform : insensible au collapse de marges). */
.fti-fiche__suggest-swiper { padding: 4px; }
/* Slides non étirés → chaque carte prend sa hauteur naturelle (pas de grand blanc en bas de carte). */
.fti-fiche__suggest-swiper .swiper-wrapper { align-items: flex-start; }
.fti-fiche__suggest-swiper .swiper-slide { height: auto; }
.fti-fiche__suggest-nav { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 28px; }
.fti-fiche__suggest-nav[hidden] { display: none; } /* rien à faire défiler → on masque toute la barre (flèches + points). */
.fti-fiche__snav {
	width: 50px !important; height: 50px !important; min-width: 50px; min-height: 50px; flex: 0 0 50px;
	/* Remises à zéro forcées (le reset.css du thème pose padding/bordure sur les <button> → déformation). */
	padding: 0 !important; margin: 0 !important; border: 0 !important; box-sizing: border-box !important; line-height: 0 !important;
	display: flex !important; align-items: center; justify-content: center;
	border-radius: 50% !important; background: var(--fti-primary) !important; color: #fff !important;
	cursor: pointer;
}
.fti-fiche__snav svg { width: 24px !important; height: 24px !important; display: block; margin: 0; }
/* Survol / focus clavier : fond primaire foncé (au clic souris, la flèche reste en primaire de repos). */
.fti-fiche__snav:hover, .fti-fiche__snav:focus-visible {
	background: var(--fti-primary-dark) !important; color: #fff !important;
}
.fti-fiche__snav.swiper-button-disabled { opacity: .4; cursor: default; }
/* Puces en bloc compact : on annule le width:100% de Swiper (qui poussait les flèches aux extrémités). */
.fti-fiche__suggest-dots { position: static !important; width: auto !important; left: auto !important; flex: 0 0 auto; display: flex; align-items: center; gap: 0; }
.fti-fiche__suggest-dots .swiper-pagination-bullet-active { background: var(--fti-primary); }

@media (max-width: 900px) {
	.fti-fiche__grid { grid-template-columns: 1fr; gap: 28px; }
	/* Contact empilé sous l'en-tête : on l'aère du contenu au-dessus (l'alignement 8px n'a plus de sens).
	   42px car le gap de grille (28px) s'ajoute déjà au-dessus → 42 + 28 = 70px d'espace total voulu. */
	.fti-fiche__contact { margin-top: 42px; }
}

/* ============================================================================
 * Impression — Ctrl/⌘+P depuis la fiche. Mise en page sobre et lisible : une
 * colonne, texte noir sur blanc, une seule photo à taille raisonnable, encadré
 * contact allégé en pied. Tout l'interactif (retour, navigation, carte, biens
 * suggérés, messages d'état) est masqué. Scopé .fti-fiche : n'affecte que la
 * fiche (l'habillage du thème — en-tête/pied — reste géré par le thème).
 * ========================================================================== */
@media print {
	@page { margin: 1.5cm; }
	#wpadminbar { display: none !important; }
	/* Pied de page du thème masqué à l'impression : il débordait sur une page blanche en trop. */
	footer.elementor-location-footer { display: none !important; }

	/* Entête du thème : logo réduit, collé à gauche, aéré de 1 cm sous l'entête. */
	header.elementor-location-header { margin-bottom: 1cm !important; }
	header.elementor-location-header .wrapper-fluid { padding-left: 0 !important; justify-content: flex-start !important; }
	header.elementor-location-header .wrapper-contained { max-width: none !important; width: auto !important; margin-left: 0 !important; }
	header.elementor-location-header img { height: 1.2cm !important; width: auto !important; max-width: none !important; padding-left: 0 !important; } /* max-width:none : sinon le logo est bridé à ~44 px par le max-width:100% du thème dans un conteneur rétréci. */
	header.elementor-location-header a::after { content: none !important; } /* pas d'URL ajoutée après le logo. */

	.fti-fiche {
		padding: 0 !important;
		color: #000 !important;
		font-size: 11pt;
		-webkit-print-color-adjust: exact; /* rend les photos fidèlement. */
		print-color-adjust: exact;
	}
	.fti-fiche__container { max-width: none !important; }

	/* Superflu masqué à l'impression. */
	.fti-fiche__flashwrap,
	.fti-fiche__backbar,
	.fti-fiche__backsentinel,
	.fti-fiche__nav,
	.fti-fiche__dots,
	.fti-fiche__h2--map,
	.fti-fiche__mapcanvas,
	.fti-fiche__hr,
	.fti-fiche__suggest,
	.fti-fiche__suggest-nav,
	.fti-fiche__snav,
		.elementor-widget-nav-menu { display: none !important; }

	/* Photo : la première seulement, format raisonnable, jamais coupée entre 2 pages. */
	.fti-fiche__hero { margin: 0 0 1cm !important; }
	.fti-fiche__hero .swiper-wrapper { display: block !important; transform: none !important; }
	.fti-fiche__hero .swiper-slide { width: 100% !important; }
	.fti-fiche__hero .swiper-slide:not(:first-child) { display: none !important; }
	.fti-fiche__photo {
		width: 100% !important;
		height: 12cm !important; /* bandeau pleine largeur, hauteur fixe, recadré. */
		object-fit: cover !important;
		border-radius: 6px !important;
		break-inside: avoid;
	}

	/* Contenu sur une seule colonne. */
	.fti-fiche__grid { display: block !important; margin: 0 !important; }
	.fti-fiche__eyebrow { margin: 0 0 6px !important; }
	.fti-fiche__title { margin: 0 0 14px !important; font-size: 20pt !important; color: #000 !important; }
	.fti-fiche__desc { line-height: 1.5 !important; }

	/* Titres de section : gardés avec ce qui suit, blocs de données insécables. */
	.fti-fiche__h2 { font-size: 13pt !important; margin: 18px 0 8px !important; break-after: avoid; }
	/* Le tableau des caractéristiques PEUT se répartir sur deux pages ; seules les LIGNES et
		   l'encadré contact restent insécables. Sans quoi une liste trop longue basculait en bloc
		   sur la page suivante, laissant un vide après le titre « Caractéristiques ». */
	.fti-fiche__spec,
	.fti-fiche__contact { break-inside: avoid; }
	.fti-fiche__spec { padding: 5px 0 !important; } /* lignes resserrées à l'impression. */

	/* Encadré contact : à plat, sans fond couleur, séparé par un filet, en pied de fiche. */
	.fti-fiche__contact {
		position: static !important;
		margin: 24px 0 0 !important;
		padding: 14px 0 0 !important;
		background: none !important;
		border: 0 !important;
		border-radius: 0 !important;
	}
	.fti-fiche__contact-link,
	.fti-fiche__contact-link span,
	.fti-fiche__contact-link svg { color: #000 !important; }
	/* Pas d'URL ajoutée en ::after après les liens téléphone / e-mail. */
	.fti-fiche__contact-link[href^="tel:"]::after,
	.fti-fiche__contact-link[href^="mailto:"]::after { content: none !important; }
	/* La puce « tél. » perd son fond bouton à l'impression. */
	.fti-fiche .fti-fiche__contact-link[href^="tel:"] {
		background: none !important;
		padding: 0 !important;
	}

	/* Liens : noirs, discrets ; les liens « ressources » restent soulignés (repérables). */
	.fti-fiche a { color: #000 !important; text-decoration: none !important; }
	.fti-fiche__ref-link { text-decoration: underline !important; }
}

/* ===========================================================================
 * Garde de spécificité — typographie de la fiche vs typographie globale du kit.
 * Le <body> porte la classe .elementor-kit-6 ; les règles du kit (.elementor-kit-6
 * h1/h2/p, spécificité 0,1,1) s'appliquent aussi à cette fiche rendue par le thème
 * et prennent le pas sur ses classes mono-classe (0,1,0). On réaffirme donc la
 * typographie de la fiche via le conteneur .fti-fiche (0,2,0) pour qu'elle prime.
 * Les marges restent portées par les règles d'origine (non redéclarées ici).
 * =========================================================================== */
.fti-fiche .fti-fiche__title {
	font-size: clamp(1.7rem, 3vw, 2.25rem);
	line-height: 1.2;
	font-weight: 700;
	color: inherit;
	font-family: inherit;
}
.fti-fiche .fti-fiche__h2 {
	font-size: 1.5rem;
	line-height: 1.3;
	font-weight: 700;
	color: inherit;
	font-family: inherit;
}
.fti-fiche .fti-fiche__flash-title {
	font-size: 2.5rem;
	line-height: 1;
	font-weight: 700;
	color: var(--fti-navy);
	font-family: inherit;
}
.fti-fiche .fti-fiche__desc,
.fti-fiche .fti-fiche__desc p,
.fti-fiche .fti-fiche__desc li {
	color: var(--fti-ink);
	font-size: inherit;
	line-height: 1.6;
	font-weight: inherit;
	font-family: inherit;
}
