/**
 * Single Référence (CPT nos-references)
 */

/* =========================================
   Hero — hauteur fixe pour ce CPT
   ========================================= */

.single-nos-references .ri-hero-banner {
	min-height: 531px;
	height: auto;
}

@media (max-width: 782px) {

	.single-nos-references .ri-hero-banner {
		min-height: 435px;
	}
}

/* =========================================
   Section chevauchante
   surtitre + titre (col. gauche) / image (col. droite)
   ========================================= */

.ri-ref-header {
	position: relative;
	z-index: 10;
	margin-top: -280px;
	margin-bottom: 48px;
}

.ri-ref-header .ri-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 90px;
	align-items: stretch;
}

/* ── Colonne gauche : surtitre + titre en haut, référent en bas ── */

.ri-ref-header .ref-col-content {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ri-ref-header .ref-heading {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ri-ref-header .ref-surtitre {
	color: var(--ri-color-grey-mid);
}

.ri-ref-header .ref-titre {
	margin: 0;
	font: 700 40px/48px var(--ri-font-1);
	color: var(--ri-color-grey-mid);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ri-ref-header .ref-titre .accent {
	color: var(--ri-color-yellow);
}

/* Référent — calé en bas de la colonne */

.ri-ref-header .ref-referent {
	position: relative;
	background-color: var(--ri-color-grey-light);
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: auto;
	padding-top: 80px;
	overflow: visible;
}

.ri-ref-header .referent-photo {
	position: absolute;
	top: 0;
	left: 24px;
	transform: translateY(-50%);
}

.ri-ref-header .referent-photo img {
	display: block;
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
}

.ri-ref-header .referent-inner {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 0 24px 40px;
}

.ri-ref-header .referent-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ri-ref-header .referent-nom {
	margin: 0;
	font: 700 16px/1.5 var(--ri-font-1);
}

.ri-ref-header .referent-poste {
	margin: 0;
	font: 400 15px/1.5 var(--ri-font-1);
}

.ri-ref-header .referent-cta {
	flex-shrink: 0;
	padding: 12px 16px;
	background-color: var(--ri-color-teal);
	color: var(--ri-color-grey-mid);
	font: 700 15px/1 var(--ri-font-1);
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ── Colonne droite : image ── */

.ri-ref-header .ref-col-image {
	line-height: 0;
}

.ri-ref-header .ref-col-image img {
	display: block;
	width: 100%;
	height: 560px;
	object-fit: cover;
}

/* =========================================
   Responsive mobile
   ========================================= */

@media (min-width: 783px) {

	.ri-ref-header .referent-poste {
		max-width: 67%;
	}
}

@media (max-width: 1000px) {

	.ri-ref-header .ri-container {
		grid-template-columns: 1fr;
		gap: 60px;
	}

	.ri-ref-header .ref-col-content {
		display: contents;
	}

	.ri-ref-header .ref-heading {
		order: 1;
		gap: 12px;
	}

	.ri-ref-header .ref-col-image {
		order: 2;
	}

	.ri-ref-header .ref-referent {
		order: 3;
		margin-top: 0;
		padding-top: 40px;
	}
}

@media (max-width: 782px) {

	.ri-ref-header {
		margin-top: -273px;
		margin-bottom: 40px;
	}

	.ri-ref-header .referent-inner {
		padding: 0 16px 24px;
	}

	.ri-ref-header .referent-poste {
		font: 400 14px / 1.5 var(--ri-font-1);
	}

	.ri-ref-header .referent-photo {
		left: 16px;
	}

	.ri-ref-header .referent-photo img {
		width: 62px;
		height: 62px;
	}

	.ri-ref-header .referent-nom,
	.ri-ref-header .referent-cta {
		font-size: 14px;
	}

	.ri-ref-header .ref-titre {
		font: 700 24px/1.2 var(--ri-font-1);
	}

	.ri-ref-header .ref-col-image img {
		height: 375px;
	}
}
