/*
 * Équipe — trombinoscope : le titre en tête, une grille de cartes dessous.
 */

.kahel-contributors {
	padding-top: var(--wp--custom--page--contributors-margin-y);
	padding-bottom: var(--wp--custom--page--contributors-margin-bottom);
}

.kahel-contributors .kahel-contributors-head {
	margin-bottom: var(--wp--custom--page--contributors-head-gap);
}

.kahel-contributors .kahel-contributors-title {
	max-width: var(--wp--custom--page--contributors-title-max);
	margin: 0;
}

/* Sélecteurs renforcés : la remise à zéro des listes de sections (kahel.css)
 * l'emporterait sinon sur la grille. */
.kahel-contributors ul.kahel-contributor-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--wp--custom--page--contributors-gap);
	margin-top: 0;
	margin-bottom: 0;
	padding: 0;
	list-style: none;
}

.kahel-contributors .kahel-contributor {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	margin: 0;
	padding: var(--wp--custom--page--contributor-padding);
	border: 1px solid var(--wp--preset--color--line-soft);
	border-radius: var(--wp--custom--radius--xl);
	background: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--card);
}

.kahel-contributors .kahel-contributor-portrait {
	display: grid;
	place-items: center;
	width: var(--wp--custom--page--contributor-photo);
	aspect-ratio: 1;
	margin-bottom: var(--wp--preset--spacing--40);
	overflow: hidden;
	border-radius: 50%;
	background: var(--wp--preset--color--apricot);
	box-shadow: 0 0 0 4px var(--wp--preset--color--surface), 0 0 0 6px var(--wp--preset--color--apricot);
	transform: rotate(-6deg);
	transition: transform 500ms var(--wp--custom--motion--ease-spring), box-shadow 300ms var(--wp--custom--motion--ease);
}

.kahel-contributors .kahel-contributor:nth-child(even) .kahel-contributor-portrait {
	transform: rotate(5deg);
}

.kahel-contributors .kahel-contributor:hover .kahel-contributor-portrait {
	transform: rotate(0deg) scale(1.06);
	box-shadow: 0 0 0 4px var(--wp--preset--color--surface), 0 0 0 6px var(--wp--preset--color--orange);
}

.kahel-contributors .kahel-contributor-photo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kahel-contributors .kahel-contributor-initiale {
	color: var(--wp--preset--color--orange-deep);
	font-size: calc(var(--wp--custom--page--contributor-photo) * 0.42);
	font-weight: var(--wp--custom--weight--heading);
	line-height: 1;
}

.kahel-contributors .kahel-contributor-name {
	margin: 0;
	overflow-wrap: anywhere;
}

.kahel-contributors ul.kahel-contributor-roles {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.kahel-contributors .kahel-contributor-role {
	margin: 0;
	padding: 5px 10px;
	border: 1px solid var(--wp--preset--color--orange);
	border-radius: var(--wp--custom--radius--pill);
	color: var(--wp--preset--color--orange-deep);
	font-size: var(--wp--preset--font-size--utility);
	font-weight: var(--wp--custom--weight--strong);
	letter-spacing: 0.06em;
	line-height: 1.2;
	text-transform: uppercase;
}

.kahel-contributors .kahel-contributor-desc {
	margin: 14px 0 0;
}

@media (max-width: 1024px) {
	.kahel-contributors ul.kahel-contributor-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 720px) {
	.kahel-contributors ul.kahel-contributor-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.kahel-contributors .kahel-contributor {
		--wp--custom--page--contributor-photo: 76px;
	}
}

/* Sur téléphone : une carte par ligne, en format horizontal compact — photo
 * à gauche, texte à droite — pour que dix membres ne fassent pas dix écrans. */
@media (max-width: 520px) {
	.kahel-contributors ul.kahel-contributor-grid {
		grid-template-columns: 1fr;
	}

	.kahel-contributors .kahel-contributor {
		--wp--custom--page--contributor-photo: 64px;

		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		column-gap: 18px;
		align-items: start;
	}

	.kahel-contributors .kahel-contributor-portrait {
		grid-row: 1 / span 3;
		margin: 4px 0 0;
	}

	.kahel-contributors .kahel-contributor > :not(.kahel-contributor-portrait) {
		grid-column: 2;
	}

	.kahel-contributors ul.kahel-contributor-roles {
		margin-top: 8px;
	}

	.kahel-contributors .kahel-contributor-desc {
		margin-top: 10px;
	}
}
