/* La Fleur – Carte interactive de la côte atlantique */
.lfam {
	--lfam-sea: #dce8ee;
	--lfam-land: #f3ebdc;
	--lfam-ink: #1e2a3d;
	--lfam-paper: #f8f4ea;
	--lfam-accent: #b08a4e;
	--u: calc(var(--w, 900) * .01px); /* 1% de la largeur de la carte (mis à jour en JS) */
	--s: clamp(7px, calc(var(--u) * 1.3), 13px);
	position: relative;
	width: 100%;
	max-width: var(--lfam-max, none); /* la largeur suit la colonne Divi ; --lfam-max pour la limiter */
	color: var(--lfam-ink);
	font-family: inherit;
	line-height: 1.35;
	box-sizing: border-box;
}
.lfam *, .lfam *::before, .lfam *::after { box-sizing: border-box; }

.lfam-stage {
	position: relative;
	aspect-ratio: var(--lfam-ar, 1000 / 1185.3);
	background: var(--lfam-sea);
	border: 1px solid rgba(30, 42, 61, .25);
	border-radius: 6px;
	overflow: hidden;
}
.lfam-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lfam-land { fill: var(--lfam-land); stroke: var(--lfam-ink); stroke-width: 1.1; stroke-linejoin: round; }
.lfam-grat { fill: none; stroke: #7e97ab; stroke-width: .8; stroke-dasharray: 3 7; opacity: .7; }

.lfam-deg {
	position: absolute; left: 1.2%; transform: translateY(-120%);
	font-size: clamp(8px, calc(var(--u) * 1.2), 12px); color: #6c8498; letter-spacing: .04em; pointer-events: none;
}
.lfam-sea {
	position: absolute; transform: translate(-50%, -50%);
	font-style: italic; letter-spacing: .32em; text-transform: none; color: #5f7d93;
	font-size: clamp(9px, calc(var(--u) * 1.9), 19px); white-space: nowrap; pointer-events: none;
}
.lfam-sea--sm { font-size: clamp(8px, calc(var(--u) * 1.5), 15px); letter-spacing: .25em; }
.lfam-compass {
	position: absolute; width: 9%; transform: translate(-50%, -50%); color: var(--lfam-ink); pointer-events: none; overflow: visible;
}

.lfam-title {
	position: absolute; right: 3%; top: 4.5%;
	background: var(--lfam-paper); border: 1px solid var(--lfam-ink); border-radius: 8px;
	box-shadow: 0 0 0 3px var(--lfam-paper), 0 0 0 4px rgba(30, 42, 61, .5);
	padding: calc(var(--u) * 1.2) calc(var(--u) * 2.6); text-align: center; pointer-events: none;
}
.lfam-title strong { display: block; font-style: italic; font-weight: 500; font-size: clamp(11px, calc(var(--u) * 2.6), 26px); }
.lfam-title span { display: block; color: #5f7d93; font-size: clamp(8px, calc(var(--u) * 1.4), 14px); }

/* Points */
.lfam-pts { list-style: none; margin: 0; padding: 0; }
.lfam-pts li { margin: 0; padding: 0; }
.lfam-pt {
	position: absolute; width: 0; height: 0; text-decoration: none; color: var(--c, var(--lfam-ink));
	border: 0; box-shadow: none; z-index: 2;
}
.lfam-pt::after { content: ""; position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%; }
.lfam-pt:hover, .lfam-pt:focus-visible, .lfam-pt.is-active { z-index: 5; }
.lfam-pt:focus-visible { outline: none; }
.lfam-pt:focus-visible .lfam-ic { outline: 2px solid var(--lfam-accent); outline-offset: 3px; }
.lfam-pt.is-off { display: none; }

.lfam-ic {
	position: absolute; left: calc(var(--s) / -2); top: calc(var(--s) / -2); width: var(--s); height: var(--s);
	background: var(--c, var(--lfam-ink)); display: block; transition: transform .15s ease;
}
.lfam-ic[data-shape="circle"] { border-radius: 50%; }
.lfam-ic[data-shape="square"] { transform: scale(.82); }
.lfam-ic[data-shape="triangle"] { clip-path: polygon(50% 4%, 100% 94%, 0 94%); }
.lfam-ic[data-shape="down"] { clip-path: polygon(0 6%, 100% 6%, 50% 96%); }
.lfam-ic[data-shape="diamond"] { transform: rotate(45deg) scale(.7); }
.lfam-pt:hover .lfam-ic, .lfam-pt.is-active .lfam-ic { transform: scale(1.35); }
.lfam-pt:hover .lfam-ic[data-shape="diamond"], .lfam-pt.is-active .lfam-ic[data-shape="diamond"] { transform: rotate(45deg) scale(.95); }
.lfam-pt:hover .lfam-ic[data-shape="square"], .lfam-pt.is-active .lfam-ic[data-shape="square"] { transform: scale(1.1); }

.lfam-pt.is-featured .lfam-ic { --s2: calc(var(--s) * 1.15); width: var(--s2); height: var(--s2); left: calc(var(--s2) / -2); top: calc(var(--s2) / -2); }
.lfam-pt.is-featured::before {
	content: ""; position: absolute; width: calc(var(--s) * 2.3); height: calc(var(--s) * 2.3);
	left: calc(var(--s) * -1.15); top: calc(var(--s) * -1.15); border: 2px solid var(--c); border-radius: 50%; background: rgba(255, 255, 255, .55);
}
.lfam-pt.is-featured .lfam-ic { z-index: 1; }
.lfam-pt.is-featured .lfam-lb { font-weight: 700; font-size: clamp(10px, calc(var(--u) * 1.9), 17px); }

.lfam-lb {
	position: absolute; white-space: nowrap; font-size: clamp(8px, calc(var(--u) * 1.5), 14px); font-weight: 500;
	color: var(--c); pointer-events: none;
	text-shadow: 0 0 2px var(--lfam-land), 0 0 2px var(--lfam-land), 0 0 3px var(--lfam-land), 0 0 4px var(--lfam-sea);
}
.lfam-pt[data-pos="r"] .lfam-lb, .lfam-lb { left: calc(var(--s) * .9 + 3px); top: 0; transform: translateY(-50%); }
.lfam-pt[data-pos="l"] .lfam-lb { left: auto; right: calc(var(--s) * .9 + 3px); top: 0; transform: translateY(-50%); }
.lfam-pt[data-pos="t"] .lfam-lb { left: 0; right: auto; top: auto; bottom: calc(var(--s) * .9 + 2px); transform: translateX(-50%); }
.lfam-pt[data-pos="b"] .lfam-lb { left: 0; right: auto; top: calc(var(--s) * .9 + 2px); transform: translateX(-50%); }
.lfam-pt[data-pos="tr"] .lfam-lb { left: calc(var(--s) * .5); right: auto; top: auto; bottom: calc(var(--s) * .6); transform: none; }
.lfam-pt[data-pos="tl"] .lfam-lb { left: auto; right: calc(var(--s) * .5); top: auto; bottom: calc(var(--s) * .6); transform: none; }
.lfam-pt[data-pos="br"] .lfam-lb { left: calc(var(--s) * .5); right: auto; top: calc(var(--s) * .6); transform: none; }
.lfam-pt[data-pos="bl"] .lfam-lb { left: auto; right: calc(var(--s) * .5); top: calc(var(--s) * .6); transform: none; }
.lfam-pt.is-nolabel .lfam-lb { visibility: hidden; }
.lfam-pt:hover .lfam-lb, .lfam-pt.is-active .lfam-lb { font-weight: 700; }

/* Légende (filtre) */
.lfam-legend {
	position: absolute; left: 3%; bottom: 3.5%; z-index: 3;
	background: var(--lfam-paper); border: 1px solid var(--lfam-ink); border-radius: 8px; padding: calc(var(--u) * 1) calc(var(--u) * 1.6);
	display: flex; flex-direction: column; gap: calc(var(--u) * .3);
}
.lfam-lg {
	all: unset; box-sizing: border-box; display: flex; align-items: center; gap: .7em; cursor: pointer;
	font-size: clamp(8px, calc(var(--u) * 1.55), 14px); padding: 2px 0; color: var(--lfam-ink); position: relative;
}
.lfam-lg .lfam-ic { position: relative; left: 0; top: 0; flex: none; width: 1em; height: 1em; }
.lfam-lg[aria-pressed="false"] { opacity: .4; text-decoration: line-through; }
.lfam-lg:focus-visible { outline: 2px solid var(--lfam-accent); outline-offset: 2px; }

/* Carte de survol */
.lfam-card {
	position: absolute; z-index: 20; width: min(300px, 78%); background: var(--lfam-paper); color: var(--lfam-ink);
	border: 1px solid var(--lfam-ink); border-radius: 10px; overflow: hidden;
	box-shadow: 0 10px 30px rgba(16, 24, 40, .25); font-size: 14px;
}
.lfam-card[hidden] { display: none; }
.lfam-card figure { margin: 0; position: relative; background: #cfd9e0; aspect-ratio: 16 / 10; }
.lfam-card img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.lfam-card figcaption {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 8px 3px; font-size: 10px; line-height: 1.2; color: #fff;
	background: linear-gradient(transparent, rgba(0, 0, 0, .55)); opacity: .9;
}
.lfam-cb { padding: 14px 16px 16px; }
.lfam-cb h3 { margin: 0 0 6px; padding: 0; font-size: 18px; line-height: 1.2; color: var(--lfam-ink); }
.lfam-cb p { margin: 0 0 12px; padding: 0; font-size: 14px; }
.lfam-btn, .lfam-btn:visited {
	display: inline-block; background: var(--lfam-ink); color: #fff !important; text-decoration: none !important;
	padding: 9px 16px; border-radius: 999px; font-size: 13px; letter-spacing: .03em; line-height: 1;
}
.lfam-btn:hover, .lfam-btn:focus-visible { background: var(--lfam-accent); }
.lfam-x {
	all: unset; display: none; position: absolute; right: 8px; top: 8px; z-index: 2; width: 30px; height: 30px; line-height: 30px;
	text-align: center; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--lfam-ink); cursor: pointer; font-size: 20px;
}

/* Liste visible de tous les lieux (liens internes / SEO) */
.lfam-index { margin-top: 20px; }
.lfam-index summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.lfam-index-group h3 { margin: 14px 0 4px; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.lfam-index-group ul { list-style: none; margin: 0; padding: 0; columns: 3 160px; column-gap: 24px; }
.lfam-index-group li { margin: 0 0 3px; break-inside: avoid; }
.lfam-index-group a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(30, 42, 61, .25); }
.lfam-index-group a:hover { border-bottom-color: currentColor; }

/* Mobile : fiche en bas d'écran */
@media (max-width: 640px) {
	.lfam-card {
		position: fixed; left: 8px; right: 8px; bottom: 8px; top: auto !important; width: auto; max-height: 80vh; overflow: auto;
		border-radius: 14px;
	}
	.lfam-card figure { aspect-ratio: 16 / 9; }
	.lfam-x { display: block; }
	.lfam-title { padding: 6px 10px; }
	.lfam-legend { padding: 5px 8px; }
	.lfam-lg { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) { .lfam-ic { transition: none; } }

/* ---------- Page d'un lieu : titre | 2 colonnes (image, texte) | carte ---------- */
.lfam-single .lfam-single-wrap { padding-top: 40px; padding-bottom: 60px; }
.lfam-single .lfam-sp-head { margin: 0 0 28px; }
.lfam-single .lfam-sp-title { margin: 0; padding: 0; }
.lfam-sp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.lfam-sp-cols--text { grid-template-columns: 1fr; }
.lfam-sp-img { margin: 0; }
.lfam-sp-img img, .lfam-sp-photo { display: block; width: 100%; height: auto; border-radius: 5px; }
.lfam-sp-img figcaption { margin-top: 6px; font-size: 12px; opacity: .7; }
.lfam-sp-img figcaption a { color: inherit; }
.lfam-sp-text > :first-child { margin-top: 0; }
.lfam-sp-more { margin-top: 64px; }
.lfam-sp-more-title { margin: 0 0 24px; }
.lfam-single .lfam { max-width: none; }
@media (max-width: 800px) {
	.lfam-sp-cols { grid-template-columns: 1fr; gap: 24px; }
	.lfam-sp-more { margin-top: 44px; }
}

/* ---- Mode « sélection » (formulaire Formidable Forms) ---- */
.lfam--select button.lfam-pt { background: none; padding: 0; margin: 0; font: inherit; cursor: pointer; -webkit-appearance: none; appearance: none; }
.lfam--select .lfam-pt::before {
	content: ""; position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; box-sizing: border-box;
	border-radius: 50%; border: 3px solid var(--c, var(--lfam-ink)); background: rgba(255, 255, 255, .85);
	transform: scale(.4); opacity: 0; transition: transform .15s ease, opacity .15s ease; pointer-events: none;
}
.lfam--select .lfam-pt .lfam-ic { z-index: 1; }
.lfam--select .lfam-pt.is-selected::before { transform: scale(1); opacity: 1; }
.lfam--select .lfam-pt.is-selected .lfam-lb { font-weight: 700; }
.lfam--select .lfam-pt.is-missing { opacity: .45; }
