/* ============================================================
   HISTOIRE — CONTENU FLEXIBLE  –  [histoire_contenu]
   Blocs empilables : image+titre+texte, titre+texte, texte,
   image seule, équipe. Posés sur la couleur de fond du site.
   ============================================================ */

.wc-blocs {
	max-width: var(--container-w);
	margin: 0 auto;
	padding: 0 var(--s-2xl);
	display: flex;
	flex-direction: column;
	gap: 6rem;
}

/* ── Bloc générique ───────────────────────────────────────── */

.wc-bloc__titre {
	margin: 0 0 var(--s-ld);
	color: var(--c-text);
	font-family: var(--ff-heading);
	font-size: var(--fs-h2);
	line-height: var(--lh-tight);
	text-wrap: balance;
}

.wc-bloc__texte {
	color: var(--c-text-soft);
	font-size: var(--fs-body);
	line-height: var(--lh-normal);

	& > :first-child { margin-top: 0; }
	& > :last-child  { margin-bottom: 0; }

	& p { margin: 0 0 var(--s-ld); }

	& a {
		color: var(--c-primary);
		text-decoration: underline;
	}
}

/* ── Bloc texte seul / titre + texte (lecture centrée) ────── */

.wc-bloc--texte {
	text-align: center;
}

/* ── Bloc image + titre + texte (2 colonnes) ──────────────── */

.wc-bloc--media {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--s-3xl);
	align-items: center;
}

.wc-bloc__figure {
	margin: 0;
}

.wc-bloc__img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--br-2xl);
	box-shadow: var(--sh-md);
}

/* Image à droite : on inverse l'ordre des colonnes */
.wc-bloc--media-droite .wc-bloc__figure {
	order: 2;
}

/* ── Bloc image seule ─────────────────────────────────────── */

.wc-bloc--image {
	margin: 0;
	text-align: center;

	& .wc-bloc__img {
		margin-inline: auto;
		/* Hauteur bornée + cover : évite une image démesurée ou aplatie */
		height: clamp(18rem, 42vh, 30rem);
		object-fit: cover;
	}
}

.wc-bloc__legende {
	margin-top: var(--s-md);
	color: var(--c-text-muted);
	font-size: var(--fs-small);
	font-style: italic;
}

/* ── Bloc équipe ──────────────────────────────────────────── */

.wc-equipe__titre {
	text-align: center;
	margin-bottom: var(--s-2xl);
}

.wc-equipe__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: var(--s-2xl);
}

.wc-equipe__item {
	text-align: center;
}

.wc-equipe__photo-wrap {
	width: 9rem;
	height: 9rem;
	margin: 0 auto var(--s-ld);
	border-radius: var(--br-circle);
	overflow: hidden;
	border: 3px solid var(--c-cream-700);
	box-shadow: var(--sh-sm);
}

.wc-equipe__photo {
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	display: block;
}

.wc-equipe__nom {
	margin: 0;
	color: var(--c-text);
	font-family: var(--ff-heading);
	font-size: var(--fs-h5);
	line-height: var(--lh-snug);
}

.wc-equipe__fonction {
	margin: var(--s-xs) 0 0;
	color: var(--c-primary);
	font-size: var(--fs-small);
	font-weight: var(--fw-semibold);
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 800px) {
	.wc-blocs {
		gap: var(--s-5xl);
		padding: 0 var(--s-xl);
	}

	/* Image + texte : on empile, image toujours au-dessus */
	.wc-bloc--media {
		grid-template-columns: 1fr;
		gap: var(--s-xl);
	}

	.wc-bloc--media-droite .wc-bloc__figure {
		order: 0;
	}
}
