/* Colonnes par catégorie — styles front */

.hsacc-block {
	max-width: 100%;
	margin-inline: auto;
}

.hsacc__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 18px;
}

.hsacc__heading {
	margin: 0;
	color: #111;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.hsacc__more {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	color: #111;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-decoration: none;
	text-transform: uppercase;
}

.hsacc__more-arrow {
	transition: transform 180ms ease;
}

.hsacc__more:hover .hsacc__more-arrow,
.hsacc__more:focus-visible .hsacc__more-arrow {
	transform: translateX(4px);
}

.hsacc {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0;
}

.hsacc__card {
	position: relative;
	display: flex;
	min-height: 530px;
	overflow: hidden;
	background-color: #101418;
	isolation: isolate;
}

/* --- Image et voile --------------------------------------------------- */

.hsacc__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

/* Deux classes : indispensable pour passer devant « .elementor img { height: auto } ». */
.hsacc__media .hsacc__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
	transition: transform 500ms ease;
}

.hsacc--zoom .hsacc__card:hover .hsacc__media .hsacc__img,
.hsacc--zoom .hsacc__card:focus-within .hsacc__media .hsacc__img {
	transform: scale(1.04);
}

/* Voile de couleur : au-dessus de l'image, sous les textes. */
.hsacc__veil {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-color: transparent;
	pointer-events: none;
}

.hsacc__overlay {
	--hsacc-overlay: rgba(0, 0, 0, 0.55);
	--hsacc-spread: 70%;
	position: absolute;
	inset: 0;
	background-image: linear-gradient(
		var(--hsacc-angle, 180deg),
		var(--hsacc-overlay) 0%,
		transparent var(--hsacc-spread)
	);
}

/* --- Contenu ---------------------------------------------------------- */

.hsacc__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 32px;
	width: 100%;
	padding: 36px 36px 32px;
}

.hsacc__eyebrow {
	margin: 0;
	color: #f5b301;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
}

/* Catégorie maintenue en haut : display:contents sort le surtitre et le titre
   de leur conteneur, la marge automatique repousse le reste vers le bas. */
.hsacc--eyebrow-top .hsacc__card-head {
	display: contents;
}

.hsacc--eyebrow-top .hsacc__eyebrow {
	margin-bottom: auto;
}

.hsacc__title {
	margin: 22px 0 0;
	color: #fff;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
	text-wrap: balance;
	transition: color 200ms ease;
}

.hsacc__permalink {
	color: inherit;
	text-decoration: none;
}

/* Toute la colonne devient cliquable sans imbriquer de lien. */
.hsacc__permalink::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
}

.hsacc__permalink:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.hsacc__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	transition: color 200ms ease;
}

.hsacc__arrow {
	transition: transform 200ms ease;
}

.hsacc__card:hover .hsacc__arrow {
	transform: translateX(4px);
}

.hsacc-empty {
	padding: 24px;
	border: 1px dashed #c3c4c7;
	color: #50575e;
	text-align: center;
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 1024px) {
	.hsacc {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hsacc__card {
		min-height: 460px;
	}
}

/* Tablettes comprises : même comportement qu'en mobile. */
@media (max-width: 1024px) {
	.hsacc {
		grid-template-columns: minmax(0, 1fr);
	}

	.hsacc__card {
		min-height: 400px;
	}

	.hsacc__inner {
		padding: 24px;
		gap: 24px;
	}

	.hsacc__title {
		font-size: 19px;
	}

	/* Texte groupé au centre de la colonne. */
	.hsacc--m-center .hsacc__inner {
		align-items: center;
		justify-content: center;
		text-align: center;
	}

	.hsacc--m-center .hsacc__card-head {
		width: 100%;
	}

	/* Lien masqué visuellement, toujours accessible au clavier. */
	.hsacc--m-no-cta .hsacc__cta {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.hsacc--m-no-cta .hsacc__cta:focus-visible {
		position: static;
		width: auto;
		height: auto;
		margin: 0;
		clip: auto;
		clip-path: none;
	}
}

/* Tablettes comprises : même comportement qu'en mobile. */
@media (max-width: 1024px) {
	.hsacc__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hsacc__more-arrow,
	.hsacc__title,
	.hsacc__media .hsacc__img,
	.hsacc__arrow,
	.hsacc__cta {
		transition: none;
	}
}

/* Nom de catégorie cliquable : au-dessus du lien étiré de la carte. */
.hsacc__eyebrow a {
	position: relative;
	z-index: 3;
	color: inherit;
	text-decoration: none;
}

.hsacc__eyebrow a:hover,
.hsacc__eyebrow a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}
