/* Accueil — cartes profils en carrousel (Splide)
   Couleurs : variables globales Divi
     --gcid-secondary-color #171328  Graphite
     --gcid-primary-color   #8f9da3  Bleu ardoise
     --gcid-heading-color   #5b6469  Gris Froid
     --gcid-m12ktbt1pn      #f2ede7  Grège

   Animation « fil du bois » : le motif de veinage du guide d'identité (p. 5)
   sert de langage de mouvement — les choses se révèlent et se tracent
   verticalement, jamais elles ne rebondissent. Une seule courbe d'easing,
   lente et assurée, pour tenir le registre haut de gamme / institutionnel. */

.home-profils {
	--fil-ease: cubic-bezier(.22, 1, .36, 1);
	--fil-veinage: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='240' viewBox='0 0 160 240'%3E%3Cg fill='none' stroke='%23f2ede7' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M14 0 C22 60 6 120 16 180 C20 210 12 226 14 240'/%3E%3Cpath d='M40 0 C48 54 34 118 44 172 C49 206 38 222 40 240'/%3E%3Cpath d='M68 0 C60 58 76 116 66 174 C61 208 70 224 68 240'/%3E%3Cpath d='M92 0 C100 52 86 114 96 170 C101 206 90 224 92 240'/%3E%3Cpath d='M118 0 C110 62 126 118 116 176 C111 208 120 226 118 240'/%3E%3Cpath d='M146 0 C154 56 140 120 150 178 C155 210 144 226 146 240'/%3E%3C/g%3E%3C/svg%3E");
	position: relative;
	padding-bottom: 76px; /* flèches + pagination sous les cartes */
}

.home-profils .splide__slide {
	display: flex;
}

.home-profil {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	background: #fff;
	border: 1px solid var(--gcid-m12ktbt1pn);
	transition: transform 500ms var(--fil-ease),
	            border-color 500ms var(--fil-ease);
}

.home-profil:hover,
.home-profil:focus-within {
	border-color: var(--gcid-primary-color);
	transform: translateY(-4px);
}

/* Entrée en lice : les cartes se lèvent une à une quand la section arrive
   à l'écran. L'état masqué n'existe que si le JS a posé .anim-ready —
   sans JS, les cartes restent simplement visibles. */
.home-profils.anim-ready .home-profil {
	opacity: 0;
	transform: translateY(22px);
}

.home-profils.anim-ready.est-entre .home-profil {
	opacity: 1;
	transform: none;
	transition: opacity 800ms var(--fil-ease),
	            transform 800ms var(--fil-ease),
	            border-color 500ms var(--fil-ease);
}

.home-profils.anim-ready.est-entre .splide__slide:nth-child(2) .home-profil { transition-delay: 90ms; }
.home-profils.anim-ready.est-entre .splide__slide:nth-child(3) .home-profil { transition-delay: 180ms; }
.home-profils.anim-ready.est-entre .splide__slide:nth-child(4) .home-profil { transition-delay: 270ms; }
.home-profils.anim-ready.est-entre .splide__slide:nth-child(5) .home-profil { transition-delay: 360ms; }

.home-profil__visuel {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--gcid-secondary-color);
}

.home-profil__visuel img,
.home-profil__sans-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* profil sans photo : texture de la charte */
.home-profil__sans-image {
	background: var(--gcid-secondary-color) url(../../../uploads/2026/10/fond-aditech-noir-3.jpg) center / cover;
}

/* Veinage : posé sur le visuel, il glisse lentement au survol, comme une
   lumière qui parcourt le fil du bois. Décoratif, donc transparent au clic. */
.home-profil__visuel::after {
	content: '';
	position: absolute;
	inset: -10% -14% -10% -14%;
	background: var(--fil-veinage) repeat;
	background-size: auto 100%;
	opacity: 0;
	transform: translateX(-14px);
	pointer-events: none;
	transition: opacity 700ms var(--fil-ease), transform 1200ms var(--fil-ease);
}

.home-profil:hover .home-profil__visuel::after,
.home-profil:focus-within .home-profil__visuel::after {
	opacity: .22;
	transform: translateX(0);
}

.home-profil__corps {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 26px 28px 28px;
}

.home-profil__surtitre {
	position: relative;
	margin: 0 0 6px;
	padding: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--gcid-heading-color);
}

.home-profil__titre {
	margin: 0 0 12px;
	padding: 0;
	font-family: var(--et_global_heading_font);
	font-size: 26px;
	line-height: 1.2;
}

.home-profil__titre a {
	color: var(--gcid-secondary-color);
}

.home-profil__accroche {
	flex: 1;
	margin: 0 0 20px;
	padding: 0;
	font-size: 15px;
	line-height: 1.7;
}

.home-profil__lien {
	align-self: flex-start;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--gcid-secondary-color);
	border-bottom: 2px solid var(--gcid-m12ktbt1pn);
	padding-bottom: 4px;
	transition: border-color 400ms var(--fil-ease);
}

.home-profil:hover .home-profil__lien,
.home-profil__lien:focus-visible {
	border-color: var(--gcid-secondary-color);
}

.home-profil__lien span {
	display: inline-block;
	transition: transform 500ms var(--fil-ease);
}

.home-profil:hover .home-profil__lien span,
.home-profil__lien:focus-visible span {
	transform: translateX(6px);
}

/* Flèches en bas à droite, mêmes carrés que la galerie des profils */
.home-profils .splide__arrows {
	position: absolute;
	right: 0;
	bottom: 0;
	display: flex;
	gap: 8px;
}

.home-profils .splide__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--gcid-secondary-color);
	cursor: pointer;
	transition: background-color 400ms var(--fil-ease);
}

.home-profils .splide__arrow:hover,
.home-profils .splide__arrow:focus-visible {
	background: var(--gcid-heading-color);
}

.home-profils .splide__arrow:disabled {
	opacity: .35;
	cursor: default;
}

.home-profils .splide__arrow svg {
	width: 18px;
	height: 18px;
	fill: #fff;
	transition: transform 500ms var(--fil-ease);
}

.home-profils .splide__arrow--prev svg {
	transform: scaleX(-1);
}

.home-profils .splide__arrow--next:hover:not(:disabled) svg {
	transform: translateX(3px);
}

.home-profils .splide__arrow--prev:hover:not(:disabled) svg {
	transform: scaleX(-1) translateX(3px);
}

/* Pagination en bas à gauche */
.home-profils .splide__pagination {
	position: absolute;
	left: 0;
	bottom: 20px;
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.home-profils .splide__pagination li {
	list-style: none;
	padding: 0;
	line-height: 0;
}

.home-profils .splide__pagination__page {
	width: 28px;
	height: 4px;
	padding: 0;
	border: 0;
	background: var(--gcid-m12ktbt1pn);
	cursor: pointer;
	transition: background-color 400ms var(--fil-ease);
}

.home-profils .splide__pagination__page.is-active {
	background: var(--gcid-secondary-color);
}

.home-profils .splide__slide:focus-visible,
.home-profils .splide__track:focus-visible,
.home-profils a:focus-visible {
	outline: 2px solid var(--gcid-secondary-color);
	outline-offset: 2px;
}

/* Mouvement réduit : on garde les changements d'état, on retire les déplacements */
@media (prefers-reduced-motion: reduce) {
	.home-profils *,
	.home-profils *::before,
	.home-profils *::after {
		transition-duration: 1ms !important;
		transition-delay: 0ms !important;
		animation-duration: 1ms !important;
	}
	.home-profils.anim-ready .home-profil {
		opacity: 1;
		transform: none;
	}
	.home-profil:hover,
	.home-profil:focus-within {
		transform: none;
	}
	.home-profil__visuel::after {
		display: none;
	}
}

/* Mobile : les flèches suffisent, la pagination chevauchait la flèche « précédent » */
@media (max-width: 767px) {
	/* Pleine largeur de l'écran : on sort des gouttières de la rangée Divi.
	   La gouttière de 20 px est rendue par l'option « padding » de Splide,
	   calée sur le « gap » pour que la carte suivante soit entièrement masquée. */
	.home-profils {
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding-bottom: 68px;
		overflow-x: clip;
	}
	/* Flèches alignées sur la gouttière des cartes, pas sur le bord de l'écran */
	.home-profils .splide__arrows {
		right: 20px;
	}
	.home-profils .splide__pagination {
		display: none;
	}
}
