/**
 * Page d'accueil (maquette 2026) — blocs cda/hp-*.
 * Valeurs reprises de la maquette 1920 px (contenu 1220 px), adaptées en dessous.
 */

.hp-hero,
.hp-section {
	--hp-blue: #0c4684;
	--hp-blue-dark: #08305c;
	--hp-orange: #e9551c;
	--hp-orange-dark: #c64818;
	--hp-teal: #50bcbc;
	--hp-grey: #f5f5f5;
	--hp-ink: #2d2d2d;
	box-sizing: border-box;
	margin-block: 0;
	font-family: inherit;
}

.hp-hero *,
.hp-section * {
	box-sizing: border-box;
}

/* Pleine largeur malgré la gouttière de .wp-block-post-content (règles legacy en !important). */
#single-wrapper .wp-block-post-content > :is(.hp-section, .hp-hero) {
	width: calc(100% + 2 * var(--cda-site-gutter, 16px)) !important;
	max-width: none !important;
	margin-inline: calc(-1 * var(--cda-site-gutter, 16px)) !important;
	margin-block: 0 !important;
}

@media (max-width: 991px) {
	#single-wrapper .wp-block-post-content > :is(.hp-section, .hp-hero) {
		width: calc(100% + 2 * var(--cda-site-gutter-mobile, 16px)) !important;
		margin-inline: calc(-1 * var(--cda-site-gutter-mobile, 16px)) !important;
	}
}

/* Mots en orange (titre du bandeau, format « Orange CDA » de l'éditeur). */
.cda-accent {
	color: #e9551c;
}

/* ---------- Structure commune ---------- */

.hp-section {
	padding: 50px clamp(16px, 2.6vw, 50px);
	background: #fff;
	color: var(--hp-ink);
}

.hp-section__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 50px;
	max-width: 1220px;
	margin: 0 auto;
	text-align: center;
}

.hp-title {
	margin: 0;
	color: var(--hp-blue);
	font-size: clamp(26px, 1.1rem + 1.4vw, 38px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-wrap: balance;
}

.hp-title--orange {
	color: var(--hp-orange);
}

.hp-rule {
	display: block;
	width: 306px;
	max-width: 60%;
	height: 3px;
	margin-top: -14px;
	background: var(--hp-teal);
}

.hp-text {
	max-width: 1100px;
	font-size: 16px;
	line-height: 1.5;
}

.hp-text p {
	margin: 0;
}

.hp-text p + p {
	margin-top: 1.5em;
}

.hp-empty {
	margin: 0;
	font-size: 16px;
}

.hp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	background: var(--hp-orange);
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.15s ease;
}

.hp-btn:hover,
.hp-btn:focus-visible {
	background: var(--hp-orange-dark);
	color: #fff;
}

.hp-btn--blue {
	background: var(--hp-blue);
}

.hp-btn--blue:hover,
.hp-btn--blue:focus-visible {
	background: var(--hp-blue-dark);
}

.hp-hero a:focus-visible,
.hp-section a:focus-visible,
.hp-section button:focus-visible,
.hp-section [tabindex]:focus-visible {
	outline: 3px solid var(--hp-teal);
	outline-offset: 3px;
}

/* ---------- Bandeau d'ouverture ---------- */

.hp-hero {
	display: grid;
	grid-template-columns: minmax(16px, 1fr) minmax(0, 720px) minmax(0, 850px);
	background: var(--hp-grey);
}

.hp-hero__content {
	display: flex;
	grid-column: 2;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	text-align: center;
}

.hp-hero__logo {
	width: 290px;
	max-width: 70%;
	color: var(--hp-blue);
	line-height: 0;
}

.hp-hero__logo svg,
.hp-hero__logo img {
	display: block;
	width: 100%;
	height: auto;
}

.hp-hero__flag {
	display: block;
	width: 196px;
	height: 3px;
	margin-top: 22px;
	background: linear-gradient(90deg, #0055a4 0 33.33%, #fff 33.33% 66.66%, #ef4135 66.66%);
}

.hp-hero__kicker {
	margin: 12px 0 0;
	color: var(--hp-blue);
	font-size: 24px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hp-hero__title {
	margin: 24px 0 0;
	color: var(--hp-blue);
	font-size: clamp(24px, 0.9rem + 1.6vw, 38px);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hp-hero__media {
	position: relative;
	grid-column: 3;
	min-height: 418px;
	overflow: hidden;
}

.hp-hero .hp-hero__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- Familles de machines ---------- */

.hp-tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 372px));
	justify-content: center;
	gap: 50px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hp-tile {
	margin: 0;
}

.hp-tile__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	aspect-ratio: 1;
	height: 100%;
	padding: 29px 24px 24px;
	background: var(--hp-blue);
	color: #fff;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

a.hp-tile__inner:hover,
a.hp-tile__inner:focus-visible {
	background: var(--hp-blue-dark);
	color: #fff;
}

.hp-tile__media {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: 157px;
}

.hp-tile .hp-tile__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 157px;
	object-fit: contain;
	transition: transform 0.2s ease;
}

a.hp-tile__inner:hover .hp-tile__img {
	transform: translateY(-4px);
}

.hp-tile__title {
	margin-top: 22px;
	font-size: clamp(24px, 1rem + 1vw, 32px);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hp-tile__text {
	max-width: 320px;
	margin-top: 22px;
	font-size: 16px;
	line-height: 1.5;
}

/* ---------- Compteur ---------- */

.hp-counter__value {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: min(533px, 100%);
	min-height: 51px;
	margin: 0;
	padding: 4px 24px;
	background: #e4ebf3;
	color: var(--hp-blue);
	font-size: clamp(24px, 1rem + 1.2vw, 34px);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	letter-spacing: 0.08em;
}

.hp-counter .hp-title {
	margin-top: 0;
}

/* ---------- Cartes (machines, salons) ---------- */

/* Cartes centrées quel que soit leur nombre (un seul salon à venir, quatre machines…). */
.hp-cards {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 50px;
	width: 100%;
}

.hp-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 25px;
	min-height: 531px;
	padding: 35px 25px 30px;
	background: var(--hp-grey);
	box-shadow: 6px 6px 5.9px -4px rgba(0, 0, 0, 0.39);
	text-align: center;
}

.hp-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 162px;
	height: 195px;
}

.hp-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hp-card__title {
	margin: 0;
	color: var(--hp-blue);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hp-card__subtitle {
	margin: 4px 0 0;
	color: var(--hp-blue);
	font-size: 18px;
	line-height: 1.2;
}

.hp-card__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
}

.hp-card__bullets {
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.45;
	list-style: none;
}

.hp-card__arrow {
	color: var(--hp-orange);
	font-size: 16px;
	font-weight: 700;
}

.hp-card__action {
	margin-top: auto;
}

/* ---------- Expertises par secteur ---------- */

.hp-sectors {
	background: var(--hp-blue);
	color: #fff;
}

.hp-sectors .hp-title,
.hp-sectors .hp-text {
	color: #fff;
}

.hp-carousel {
	display: grid;
	grid-template-columns: 25px minmax(0, 1fr) 25px;
	align-items: center;
	gap: 50px;
	width: 100%;
}

.hp-carousel__track {
	display: grid;
	grid-auto-columns: calc((100% - 100px) / 3);
	grid-auto-flow: column;
	gap: 50px;
	margin: 0;
	padding: 4px 0;
	overflow-x: auto;
	list-style: none;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.hp-carousel__track::-webkit-scrollbar {
	display: none;
}

.hp-carousel__slide {
	margin: 0;
	scroll-snap-align: start;
}

.hp-carousel__nav {
	position: relative;
	width: 25px;
	height: 43px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.hp-carousel__nav::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 26px;
	height: 26px;
	border-top: 4px solid var(--hp-teal);
	border-left: 4px solid var(--hp-teal);
	transform: translate(-25%, -50%) rotate(-45deg);
}

.hp-carousel__nav--next::before {
	transform: translate(-75%, -50%) rotate(135deg);
}

.hp-carousel__nav:disabled {
	opacity: 0.35;
	cursor: default;
}

.hp-carousel.is-static .hp-carousel__nav {
	visibility: hidden;
}

.hp-sector {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 25px;
	height: 100%;
	padding: 0 4px;
	text-align: center;
}

.hp-sector__picto {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 111px;
	height: 84px;
}

.hp-sector__picto img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hp-sector__picto img.is-photo {
	border-radius: 4px;
	object-fit: cover;
}

.hp-sector__title {
	margin: 0;
	color: #fff;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hp-sector__text {
	flex: 1;
	max-width: 260px;
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
}

/* ---------- Salons ---------- */

.hp-cards > * {
	flex: 0 1 350px;
	min-width: 0;
}

.hp-cards--salons > * {
	flex-basis: 348px;
}

.hp-salon {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 25px;
	min-height: 499px;
	padding: 25px;
	background: var(--hp-grey);
	box-shadow: 3px 3px 4px rgba(0, 0, 0, 0.25);
}

.hp-salon__title {
	margin: 0;
	color: var(--hp-blue);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.hp-salon__visual {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 129px;
	height: 129px;
}

.hp-salon__visual img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.hp-salon__facts {
	display: flex;
	flex-direction: column;
	gap: 22px;
	width: 100%;
	max-width: 265px;
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: left;
}

.hp-salon__fact {
	display: flex;
	align-items: center;
	gap: 18px;
	font-size: 16px;
	line-height: 1.15;
}

.hp-salon__fact .hp-salon__picto {
	flex: 0 0 33px;
	width: 33px;
	height: 33px;
	object-fit: contain;
	transform: scale(1.5);
}

/* ---------- Références clients ---------- */

.hp-references {
	background: var(--hp-grey);
}

.hp-refs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 188px));
	justify-content: center;
	gap: 50px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hp-ref {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 25px;
	color: inherit;
	text-decoration: none;
}

.hp-ref__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: 1;
}

.hp-ref__logo img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	/* Fonds blancs des logos JPG fondus dans le gris de la section. */
	mix-blend-mode: multiply;
	transition: transform 0.2s ease;
}

.hp-ref:hover .hp-ref__logo img {
	transform: scale(1.04);
}

.hp-ref__name {
	color: var(--hp-blue);
	font-size: 18px;
	font-weight: 700;
}

.hp-ref__sector {
	color: var(--hp-teal);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.15;
	text-transform: uppercase;
}

.hp-ref__sector > span {
	display: block;
}

/* ---------- Chiffres clés ---------- */

.hp-figures {
	padding-block: 25px;
	background: var(--hp-blue);
	color: #fff;
}

.hp-figures__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 25px 100px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hp-figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 25px;
	min-width: 142px;
	max-width: 302px;
}

.hp-figure__value {
	font-size: clamp(44px, 2rem + 2vw, 64px);
	font-weight: 700;
	line-height: 0.75;
}

.hp-figure__label {
	max-width: 302px;
	font-size: 16px;
	line-height: 1.2;
	text-transform: uppercase;
	text-wrap: balance;
}

/* ---------- Tablette ---------- */

@media (max-width: 1100px) {
	.hp-tiles {
		grid-template-columns: repeat(2, minmax(0, 372px));
		gap: 30px;
	}

	.hp-cards {
		gap: 30px;
	}

	.hp-refs {
		grid-template-columns: repeat(3, minmax(0, 188px));
		gap: 30px;
	}

	.hp-carousel {
		gap: 24px;
	}

	.hp-carousel__track {
		grid-auto-columns: calc((100% - 30px) / 2);
		gap: 30px;
	}

	.hp-figures__list {
		gap: 25px 60px;
	}
}

@media (max-width: 899px) {
	.hp-hero {
		grid-template-columns: 1fr;
	}

	.hp-hero__content {
		grid-column: 1;
		padding: 40px 16px;
	}

	.hp-hero__media {
		grid-column: 1;
		min-height: 0;
		aspect-ratio: 850 / 418;
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
	.hp-section__inner {
		gap: 32px;
	}

	.hp-rule {
		margin-top: -8px;
	}

	.hp-tiles {
		grid-template-columns: minmax(0, 372px);
	}

	.hp-cards > * {
		flex-basis: 100%;
		max-width: 372px;
	}

	.hp-tile__inner {
		aspect-ratio: auto;
		padding-bottom: 32px;
	}

	.hp-card,
	.hp-salon {
		min-height: 0;
	}

	.hp-refs {
		grid-template-columns: repeat(2, minmax(0, 188px));
		gap: 24px;
	}

	.hp-carousel {
		grid-template-columns: 25px minmax(0, 1fr) 25px;
		gap: 12px;
	}

	.hp-carousel__track {
		grid-auto-columns: 100%;
		gap: 24px;
	}

	.hp-btn {
		font-size: 18px;
	}

	.hp-figures__list {
		flex-direction: column;
		align-items: center;
		gap: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hp-carousel__track {
		scroll-behavior: auto;
	}

	.hp-tile__img,
	.hp-ref__logo img,
	.hp-btn,
	.hp-tile__inner {
		transition: none;
	}
}
