.wp-block-lpd-carte-antennes.lpd-branch-map {
	--lpd-map-black: var(--wp--preset--color--black, #1b1212);
	--lpd-map-white: var(--wp--preset--color--white, #eff1f2);
	--lpd-map-purple: var(--wp--preset--color--purple, #43358b);
	--lpd-map-dark-blue: var(--wp--preset--color--dark-blue, #232d71);
	box-sizing: border-box;
	width: 100%;
	max-width: 1000px;
	margin-inline: auto;
	container: lpd-branch-map / inline-size;
}

.lpd-branch-map__hint {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .75rem;
	width: fit-content;
	max-width: min(100%, 760px);
	margin: 0 auto .5rem;
	padding: .35rem .5rem;
	color: var(--lpd-map-dark-blue);
	font-size: clamp(1rem, 1.7vw, 1.25rem);
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
}

.lpd-branch-map__hint-icon {
	position: relative;
	flex: 0 0 auto;
	width: 1.1rem;
	height: 1.5rem;
	border: 2px solid currentColor;
	border-radius: .65rem;
}

.lpd-branch-map__hint-icon::before {
	position: absolute;
	top: .2rem;
	left: 50%;
	width: 2px;
	height: .38rem;
	border-radius: 2px;
	background: currentColor;
	content: "";
	transform: translateX(-50%);
}

.lpd-branch-map__stage {
	position: relative;
	box-sizing: border-box;
	min-height: 750px;
	padding: 12px 8px;
	overflow: hidden;
	background: transparent;
	isolation: isolate;
}

.lpd-branch-map__map {
	position: relative;
	z-index: 1;
	left: 50%;
	width: min(85%, 850px);
	margin: 0;
	transform: translateX(-50%);
}

.lpd-branch-map__svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.lpd-branch-map__department-underlay,
.lpd-branch-map__department {
	stroke-width: 3px;
	vector-effect: non-scaling-stroke;
}

.lpd-branch-map__department-underlay {
	pointer-events: none;
	transform-box: fill-box;
	transform-origin: center;
	transition: filter 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.lpd-branch-map__department {
	cursor: pointer;
	outline: none;
	touch-action: manipulation;
	transform-box: fill-box;
	transform-origin: center;
	transition: filter 160ms ease, transform 160ms ease, stroke-width 160ms ease;
}

.lpd-branch-map__department:hover {
	filter: brightness(1.08) saturate(1.12) drop-shadow(0 4px 3px rgb(27 18 18 / 28%));
}

.lpd-branch-map__department:focus-visible {
	outline: none;
	filter: brightness(1.08) saturate(1.08) drop-shadow(0 3px 3px rgb(27 18 18 / 30%));
}

.lpd-branch-map__department.is-active {
	filter: none;
	transform: translate(-4px, -4px);
}

.lpd-branch-map__department-underlay.is-active {
	fill: #595656 !important;
	stroke: #595656 !important;
	opacity: .46;
	filter: blur(.7px) drop-shadow(4px 5px 2px rgb(64 61 61 / 35%));
	transform: translate(1px, 2px);
}

.lpd-branch-map__department.is-unassigned {
	cursor: default;
	filter: grayscale(.55) opacity(.64);
}

.lpd-branch-map__cards {
	position: absolute;
	z-index: 3;
	inset: 0;
	pointer-events: none;
}

.lpd-branch-map__card {
	position: absolute;
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-sizing: border-box;
	width: clamp(310px, 32%, 390px);
	min-height: 158px;
	margin: 0;
	padding: 1.15rem 1.35rem 1.3rem;
	clip-path: polygon(0 0, 97% 2%, 100% 94%, 4% 100%);
	color: var(--lpd-branch-card-text);
	background: var(--lpd-branch-accent);
	filter: drop-shadow(10px 12px 5px rgb(64 61 61 / 42%));
	font-family: var(--wp--preset--font-family--roboto-condensed, "Roboto Condensed", sans-serif);
	pointer-events: none;
}

.lpd-branch-map__card[hidden] {
	display: none;
}

.wp-block-lpd-carte-antennes.lpd-branch-map .lpd-branch-map__card,
.wp-block-lpd-carte-antennes.lpd-branch-map .lpd-branch-map__card * {
	color: var(--wp--preset--color--white, #eff1f2) !important;
}

.lpd-branch-map__card[data-anchor="northwest"] {
	top: 8%;
	left: 2%;
	width: clamp(350px, 38%, 460px);
	transform: rotate(-1deg);
}

.lpd-branch-map__card[data-anchor="north"] {
	top: 7%;
	left: 50%;
	width: clamp(320px, 33%, 400px);
	transform: translateX(-50%) rotate(.8deg);
}

.lpd-branch-map__card[data-anchor="northeast"] {
	top: 0;
	right: auto;
	left: 52%;
	width: clamp(340px, 36%, 430px);
	transform: translateX(-50%) rotate(1deg);
}

.lpd-branch-map__card[data-anchor="east"] {
	top: 36%;
	right: 1%;
	width: clamp(310px, 32%, 390px);
	transform: rotate(-.8deg);
}

.lpd-branch-map__card[data-anchor="southwest"] {
	bottom: 18%;
	left: 2%;
	width: clamp(300px, 30%, 365px);
	transform: rotate(-1.3deg);
}

.lpd-branch-map__eyebrow,
.lpd-branch-map__card-title,
.lpd-branch-map__address {
	margin: 0;
	color: inherit;
	font-size: clamp(1.15rem, 2.1cqw, 1.7rem);
	line-height: 1.32;
	text-align: center;
}

.lpd-branch-map__eyebrow {
	font-weight: 800 !important;
}

.lpd-branch-map__card-title {
	font-weight: 800 !important;
}

.lpd-branch-map__address {
	margin-top: .2rem;
	font-style: normal;
	font-weight: 400 !important;
}

.lpd-branch-map__address span,
.lpd-branch-map__address strong {
	display: block;
	max-width: 17rem;
	margin-inline: auto;
}

.lpd-branch-map__address strong {
	margin-top: .15rem;
	font-weight: 400 !important;
}

.lpd-branch-map__department-list {
	display: none;
}

.lpd-branch-map__department-button {
	display: inline-flex;
	align-items: center;
	gap: .38rem;
	min-height: 42px;
	margin: 0;
	padding: .45rem .7rem;
	border: 2px solid var(--lpd-map-dark-blue);
	border-radius: 999px;
	color: var(--lpd-map-dark-blue);
	background: transparent;
	box-shadow: none;
	font: inherit;
	font-size: .84rem;
	line-height: 1;
	cursor: pointer;
	transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.lpd-branch-map__department-button strong {
	font-size: 1rem;
	font-weight: 900;
}

.lpd-branch-map__department-button:hover {
	background: color-mix(in srgb, var(--lpd-map-dark-blue) 10%, transparent);
	transform: translateY(-2px);
}

.lpd-branch-map__department-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--yellow, #ffed00);
	outline-offset: 3px;
}

.lpd-branch-map__department-button.is-active {
	color: var(--lpd-map-white);
	background: var(--lpd-map-dark-blue);
}

/* Composition compacte lorsque la carte partage la ligne avec un autre contenu. */
@media (min-width: 782px) {
	.wp-block-column .wp-block-lpd-carte-antennes.lpd-branch-map {
		max-width: 900px;
	}

	.wp-block-column .lpd-branch-map__stage {
		min-height: min(580px, 65cqw);
	}

	.wp-block-column .lpd-branch-map__map {
		width: min(76%, 650px);
	}

	.wp-block-column .lpd-branch-map__card {
		width: clamp(260px, 34%, 330px);
		min-height: 128px;
		padding: .9rem 1.1rem 1rem;
		filter: drop-shadow(8px 9px 4px rgb(64 61 61 / 42%));
	}

	.wp-block-column .lpd-branch-map__card[data-anchor="northwest"] {
		width: clamp(300px, 42%, 380px);
	}

	.wp-block-column .lpd-branch-map__card[data-anchor="north"] {
		width: clamp(280px, 38%, 340px);
	}

	.wp-block-column .lpd-branch-map__card[data-anchor="northeast"] {
		width: clamp(290px, 40%, 365px);
	}

	.wp-block-column .lpd-branch-map__card[data-anchor="east"] {
		width: clamp(260px, 34%, 330px);
	}

	.wp-block-column .lpd-branch-map__card[data-anchor="southwest"] {
		width: clamp(260px, 34%, 315px);
	}

	.wp-block-column .lpd-branch-map__eyebrow,
	.wp-block-column .lpd-branch-map__card-title,
	.wp-block-column .lpd-branch-map__address {
		font-size: clamp(.95rem, 2.1cqw, 1.35rem);
	}
}

@container lpd-branch-map (max-width: 900px) {
	.lpd-branch-map__stage {
		min-height: min(900px, 82cqw);
		padding: 8px;
	}

	.lpd-branch-map__card[data-anchor="northwest"] {
		width: min(96%, 460px);
	}

	.lpd-branch-map__card[data-anchor="north"] {
		width: min(90%, 400px);
	}

	.lpd-branch-map__card[data-anchor="northeast"] {
		width: min(94%, 430px);
	}

	.lpd-branch-map__card[data-anchor="east"] {
		width: min(90%, 390px);
	}

	.lpd-branch-map__card[data-anchor="southwest"] {
		width: min(90%, 365px);
	}
}

@media (max-width: 781px) {
	.lpd-branch-map__hint {
		align-items: flex-start;
		padding-inline: .25rem;
		font-size: 1rem;
		text-align: left;
	}

	.lpd-branch-map__stage {
		display: flex;
		flex-direction: column;
		gap: clamp(.85rem, 4cqw, 1.25rem);
		min-height: 0;
		padding: 6px;
		overflow: visible;
	}

	.lpd-branch-map__cards {
		position: relative;
		inset: auto;
		order: -1;
		width: 100%;
	}

	.lpd-branch-map__card[data-anchor] {
		position: relative;
		inset: auto;
		width: 100%;
		height: 160px;
		min-height: 160px;
		padding: .9rem 1rem 1rem;
		transform: none;
	}

	.lpd-branch-map__department-button {
		min-width: 64px;
		justify-content: center;
	}

	.lpd-branch-map__department-button span {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lpd-branch-map__department,
	.lpd-branch-map__department-button {
		transition: none;
	}
}

@media (forced-colors: active) {
	.lpd-branch-map__department:focus-visible,
	.lpd-branch-map__department.is-active {
		stroke: Highlight;
	}

	.lpd-branch-map__department-button.is-active {
		color: HighlightText;
		background: Highlight;
	}
}
