/**
 * Archive : Nos Partenaires de recherche
 * Section grille partenaires groupés par zone géographique et type.
 */

/* ========================================
   Image d'introduction
   ======================================== */

.ri-archive-nos-partenaires-intro-image .img {
	width: 100%;
	height: auto;
	display: block;
}

/* ========================================
   Grille partenaires
   ======================================== */

.ri-partenaires-grille {
	padding-block: var(--ri-block-padding-xl);
	background-color: var(--ri-color-white);
}

/* Zone géographique — grid 2 colonnes */

.ri-partenaires-grille .zone-section {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	padding-top: 100px;
}

.ri-partenaires-grille .zone-section + .zone-section {
	margin-top: 100px;
}

.ri-partenaires-grille .zone-section::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 8px;
	background: linear-gradient(to bottom, var(--ri-sep-color-alt), var(--ri-sep-color-alt) var(--ri-sep-width), transparent var(--ri-sep-width), transparent calc(100% - var(--ri-sep-width)), var(--ri-sep-color-alt) calc(100% - var(--ri-sep-width)));
}

.ri-partenaires-grille .zone-titre {
	grid-column: 1 / -1;
	margin: 0;
	font: 700 var(--ri-size-title-h2) / 1.4 var(--ri-font-1);
	max-width: 410px;
}

/* Type de partenaire */

.ri-partenaires-grille .type-section {
	display: flex;
	flex-direction: column;
	gap: var(--ri-space-lg);
}

/* Logos */

.ri-partenaires-grille .logos-list {
	list-style: none;
	margin: 0;
	padding: 0;
	align-items: center;
}

.ri-partenaires-grille .type-titre {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	font: 500 var(--ri-size-text-body-xl) / 1.5 var(--ri-font-1);
}

.ri-partenaires-grille .type-titre::before {
	content: "";
	display: block;
	flex-shrink: 0;
	width: 8px;
	height: 8px;
	background-color: var(--ri-color-yellow);
}

.ri-partenaires-grille .logo-item {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ri-partenaires-grille .logo-img {
	width: 100%;
	height: auto;
	object-fit: contain;
	max-height: 65px;
}

.ri-partenaires-grille .logo-name {
	font: 700 15px / 1 var(--ri-font-1);
}

/* France — logos sur 7 colonnes */

#france {
	grid-template-columns: 1fr;
}

#france .logos-list {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: var(--ri-space-xl);
}

/* Europe — grille de 7 colonnes pour aligner tous les logos */

#europe {
	grid-template-columns: repeat(7, 1fr);
}

/* Titre et 1ère type-section sur toute la largeur */

#europe .zone-titre,
#europe .type-section:first-of-type {
	grid-column: 1 / -1;
}

#amerique-du-nord .type-section .logos-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--ri-space-xl);
}

#europe .type-section:first-of-type .logos-list,
#france .type-section:first-of-type .logos-list {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: var(--ri-space-xl);
}

#europe .type-section:not(:first-of-type) .logos-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--ri-space-xl);
}

/* 2e et 3e type-section côte à côte, chacune sur ~3 colonnes + gap */

#europe .type-section:nth-of-type(2) {
	grid-column: 1 / 4;
	margin-top: 40px;
}

#europe .type-section:nth-of-type(3) {
	grid-column: 5 / 8;
	margin-top: 40px;
}

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

@media (max-width: 782px) {

	.ri-partenaires-grille .zone-section {
		grid-template-columns: 1fr;
		padding-top: 40px;
		gap: 16px;
	}

	.ri-partenaires-grille .zone-section + .zone-section {
		margin-top: 40px;
	}

	.ri-partenaires-grille .type-section {
		gap: 16px;
	}

	.ri-partenaires-grille .type-titre {
		gap: 8px;
	}

	#france .logos-list {
		grid-template-columns: repeat(3, 1fr);
		gap: var(--ri-space-lg);
	}

	#europe {
		grid-template-columns: 1fr;
	}

	#europe .type-section:nth-of-type(2),
	#europe .type-section:nth-of-type(3) {
		grid-column: 1;
		margin-top: 0;
	}

	#europe .type-section:first-of-type .logos-list,
	#europe .type-section:not(:first-of-type) .logos-list {
		grid-template-columns: repeat(3, 1fr);
		gap: var(--ri-space-lg);
	}

	.ri-partenaires-grille .logo-img {
		max-height: 48px;
	}
}
