/**
 * Services municipaux — intro wow
 * Primary #00aeef · Secondary #044cd0 · Ink #252525
 */

.bt-services {
	--bt-cyan: #00aeef;
	--bt-blue: #044cd0;
	--bt-ink: #252525;
	--bt-muted: #5c6770;
	--bt-line: rgba(4, 76, 208, 0.14);
	--bt-soft: rgba(0, 174, 239, 0.1);
	--bt-radius: 4px;
	color: var(--bt-ink);
	margin: 0 0 3.5rem;
}

/* Break out of Helix content column for full-bleed hero */
.bt-services__hero {
	position: relative;
	isolation: isolate;
	display: grid;
	align-items: end;
	min-height: clamp(18rem, 48vh, 28rem);
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-bottom: 2.25rem;
	overflow: hidden;
	background: linear-gradient(135deg, #033a9e, #00aeef 70%);
	animation: bt-services-fade-up 0.75s ease both;
}

.bt-services__hero-media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.bt-services__hero-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 40%;
	display: block;
	transform: scale(1.04);
	animation: bt-services-ken 12s ease-out both;
}

.bt-services__hero-veil {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(4, 40, 110, 0.18) 0%, rgba(4, 40, 110, 0.55) 55%, rgba(4, 30, 80, 0.78) 100%),
		linear-gradient(90deg, rgba(4, 76, 208, 0.35), transparent 55%);
	pointer-events: none;
}

.bt-services__hero-copy {
	position: relative;
	z-index: 1;
	width: min(920px, calc(100% - 2.5rem));
	margin: 0 auto;
	padding: 2.5rem 0 2.35rem;
	color: #fff;
	animation: bt-services-fade-up 0.8s ease 0.12s both;
}

.bt-services__eyebrow {
	margin: 0 0 0.45rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #9fe4ff;
}

.bt-services__title {
	margin: 0 0 0.65rem;
	font-size: clamp(1.85rem, 3.4vw, 2.65rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: #fff;
	max-width: 16ch;
}

.bt-services__lead {
	margin: 0;
	max-width: 34rem;
	font-size: 1.05rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.88);
}

.bt-services__list {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	max-width: 920px;
	margin: 0 auto;
	padding: 0 0.25rem;
}

.bt-services__link {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 1rem 1.15rem;
	padding: 1rem 1.15rem;
	text-decoration: none;
	color: inherit;
	border: 1px solid transparent;
	border-radius: var(--bt-radius);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 251, 253, 0.96));
	box-shadow: 0 1px 0 var(--bt-line);
	opacity: 0;
	transform: translateY(14px);
	animation: bt-services-fade-up 0.55s ease var(--bt-delay, 0ms) forwards;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.bt-services__link:hover,
.bt-services__link:focus {
	transform: translateY(-2px);
	border-color: rgba(0, 174, 239, 0.35);
	box-shadow: 0 14px 30px rgba(4, 76, 208, 0.12);
	text-decoration: none;
	color: inherit;
}

.bt-services__thumb,
.bt-services__icon {
	width: 4.25rem;
	height: 4.25rem;
	border-radius: var(--bt-radius);
	overflow: hidden;
	flex-shrink: 0;
}

.bt-services__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bt-services__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--bt-soft);
	color: var(--bt-blue);
	transition: background 0.2s ease, color 0.2s ease;
}

.bt-services__link:hover .bt-services__icon {
	background: linear-gradient(135deg, var(--bt-cyan), var(--bt-blue));
	color: #fff;
}

.bt-services__body {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
}

.bt-services__name {
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--bt-blue);
	letter-spacing: -0.01em;
}

.bt-services__link:hover .bt-services__name {
	color: var(--bt-cyan);
}

.bt-services__excerpt {
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--bt-muted);
}

.bt-services__cta {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--bt-muted);
	white-space: nowrap;
	transition: color 0.2s ease, transform 0.2s ease;
}

.bt-services__link:hover .bt-services__cta {
	color: var(--bt-blue);
	transform: translateX(3px);
}

.bt-services__empty {
	max-width: 920px;
	margin: 0 auto;
	padding: 1.25rem;
	background: var(--bt-soft);
	border-left: 3px solid var(--bt-cyan);
}

@keyframes bt-services-fade-up {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes bt-services-ken {
	from {
		transform: scale(1.08);
	}
	to {
		transform: scale(1.02);
	}
}

@media (max-width: 767px) {
	.bt-services__hero {
		min-height: 16.5rem;
	}

	.bt-services__hero-copy {
		width: calc(100% - 1.75rem);
		padding: 1.75rem 0 1.6rem;
	}

	.bt-services__title {
		max-width: none;
	}

	.bt-services__link {
		grid-template-columns: auto minmax(0, 1fr);
		padding: 0.9rem 0.95rem;
	}

	.bt-services__cta {
		display: none;
	}

	.bt-services__thumb,
	.bt-services__icon {
		width: 3.4rem;
		height: 3.4rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bt-services__hero,
	.bt-services__hero-copy,
	.bt-services__hero-img,
	.bt-services__link {
		animation: none !important;
		transition: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

/* Hide Helix duplicate page title if still injected above content */
body.view-category.layout-services .article-details > .page-header,
body.view-category.layout-services .sp-page-title,
body.com-content.view-category.layout-services .page-header:not(.bt-services *),
body.view-category.layout-demarches .article-details > .page-header,
body.view-category.layout-demarches .sp-page-title,
body.com-content.view-category.layout-demarches .page-header:not(.bt-services *) {
	display: none;
}
