/*!
 * Gestion Équipe ENA — front-end styles
 * Design « timbres illustrés » inspiré de l'école d'architecture.
 */

.ena-ge-wrapper {
	/* Palette alignée sur l'identité du site (thème Soledad) : bleu ENA. */
	--ena-ge-accent: #005a8d;
	--ena-ge-accent-dark: #003a60;
	--ena-ge-highlight: #d0d71b;
	--ena-ge-ink: #101314;
	--ena-ge-muted: #55606a;
	--ena-ge-section-bg: #f2f7fb;
	--ena-ge-section-border: rgba(0, 90, 141, 0.16);
	--ena-ge-card: #ffffff;
	--ena-ge-radius: 12px;
	--ena-ge-gap: 22px;
	font-family: inherit;
	color: var(--ena-ge-ink);
	margin: 8px 0 48px;
	max-width: 100%;
}

.ena-ge-wrapper * {
	box-sizing: border-box;
}

.ena-ge-wrapper img {
	max-width: 100%;
	height: auto;
}

/* ---------- Sections ---------- */

.ena-ge-section {
	background: var(--ena-ge-section-bg);
	border: 1px solid var(--ena-ge-section-border);
	border-radius: 18px;
	padding: 30px 24px 26px;
	margin: 0 0 36px;
	scroll-margin-top: 90px;
}

.ena-ge-section:last-child {
	margin-bottom: 0;
}

.ena-ge-section-head {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.ena-ge-illu {
	flex: 0 0 auto;
	width: 132px;
	height: 82px;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 6px 16px rgba(9, 30, 45, 0.14);
}

.ena-ge-illu img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ena-ge-head-text {
	flex: 1 1 220px;
	min-width: 200px;
}

.ena-ge-section-title {
	position: relative;
	margin: 0 0 10px;
	font-size: 26px;
	line-height: 1.2;
	font-weight: 700;
	color: var(--ena-ge-ink);
	padding-bottom: 10px;
}

.ena-ge-section-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 58px;
	height: 3px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--ena-ge-accent) 0 58%, var(--ena-ge-highlight) 58% 100%);
}

.ena-ge-section-count {
	margin: 0;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ena-ge-accent-dark);
}

/* ---------- Grid ---------- */

.ena-ge-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--ena-ge-gap);
}

/* ---------- Stamp card ---------- */

.ena-ge-stamp {
	position: relative;
	background: var(--ena-ge-card);
	border-radius: var(--ena-ge-radius);
	padding: 12px;
	box-shadow: 0 6px 18px rgba(9, 30, 45, 0.08);
	transition: transform 0.28s ease, box-shadow 0.28s ease;
	isolation: isolate;
	cursor: pointer;
}

/* Whole stamp is a link to the member profile. */
.ena-ge-stamp-cover {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	border-radius: inherit;
	text-decoration: none;
}

/* Visually hidden but accessible label for the cover link. */
.ena-ge-wrapper .screen-reader-text,
.ena-ge-wrapper.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Visible call-to-action inside each stamp. */
.ena-ge-profile-btn {
	align-self: center;
	display: inline-block;
	margin-top: 14px;
	padding: 7px 16px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #fff;
	background: var(--ena-ge-accent);
	border-radius: 999px;
	transition: background 0.2s ease;
}

.ena-ge-stamp:hover .ena-ge-profile-btn,
.ena-ge-stamp:focus-within .ena-ge-profile-btn {
	background: var(--ena-ge-accent-dark);
}

/* Perforated border (small notches reveal the section background). */
.ena-ge-stamp::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 2;
	background:
		radial-gradient(circle 4.5px at 50% 0, var(--ena-ge-section-bg) 96%, transparent 100%) top center / 16px 9px repeat-x,
		radial-gradient(circle 4.5px at 50% 100%, var(--ena-ge-section-bg) 96%, transparent 100%) bottom center / 16px 9px repeat-x,
		radial-gradient(circle 4.5px at 0 50%, var(--ena-ge-section-bg) 96%, transparent 100%) left center / 9px 16px repeat-y,
		radial-gradient(circle 4.5px at 100% 50%, var(--ena-ge-section-bg) 96%, transparent 100%) right center / 9px 16px repeat-y;
}

.ena-ge-stamp:hover,
.ena-ge-stamp:focus-within {
	transform: translateY(-6px);
	box-shadow: 0 16px 32px rgba(9, 30, 45, 0.18);
}

.ena-ge-stamp-inner {
	position: relative;
	z-index: 0;
	border: 1px dashed rgba(0, 90, 141, 0.5);
	border-radius: 7px;
	overflow: hidden;
	background: #fff;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.ena-ge-photo {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: linear-gradient(160deg, #eef4fa 0%, #e2edf5 100%);
}

.ena-ge-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.ena-ge-stamp:hover .ena-ge-photo img {
	transform: scale(1.06);
}

.ena-ge-photo.is-placeholder img {
	object-fit: contain;
	padding: 16% 20%;
}

.ena-ge-body {
	padding: 14px 12px 16px;
	text-align: center;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.ena-ge-name {
	margin: 0 0 6px;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--ena-ge-ink);
}

.ena-ge-func {
	margin: 0 0 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--ena-ge-accent-dark);
}

.ena-ge-desc {
	margin: 0 0 12px;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--ena-ge-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ena-ge-badge {
	align-self: center;
	margin-top: auto;
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 5px 11px;
	border-radius: 999px;
	background: rgba(0, 90, 141, 0.16);
	color: var(--ena-ge-accent-dark);
}

.ena-ge-email {
	position: relative;
	z-index: 3;
	margin: 10px 0 0;
	font-size: 12px;
	overflow-wrap: anywhere;
}

.ena-ge-email a {
	color: var(--ena-ge-muted);
	text-decoration: none;
}

.ena-ge-email a:hover,
.ena-ge-email a:focus {
	color: var(--ena-ge-accent-dark);
	text-decoration: underline;
}

.ena-ge-photo-note {
	margin: 8px 0 0;
	font-size: 10.5px;
	font-style: italic;
	color: #8a97a1;
}

/* ---------- Empty state ---------- */

.ena-ge-empty {
	margin: 0;
	padding: 34px 16px;
	text-align: center;
	border: 1px dashed var(--ena-ge-section-border);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.6);
	color: var(--ena-ge-muted);
	font-size: 15px;
}

/* ---------- Pagination ---------- */

.ena-ge-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin-top: 26px;
}

.ena-ge-page-btn,
.ena-ge-page-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border-radius: 9px;
	border: 1px solid var(--ena-ge-section-border);
	background: #fff;
	color: var(--ena-ge-ink);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ena-ge-page-btn:hover,
.ena-ge-page-num:hover,
.ena-ge-page-btn:focus,
.ena-ge-page-num:focus {
	background: rgba(0, 90, 141, 0.14);
	border-color: var(--ena-ge-accent);
	color: var(--ena-ge-accent-dark);
	text-decoration: none;
}

.ena-ge-page-num.is-current {
	background: var(--ena-ge-accent);
	border-color: var(--ena-ge-accent);
	color: #fff;
	cursor: default;
}

.ena-ge-page-btn.is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.ena-ge-page-dots {
	padding: 0 2px;
	color: var(--ena-ge-muted);
}

.ena-ge-page-total {
	flex: 1 1 100%;
	text-align: center;
	margin-top: 4px;
	font-size: 12.5px;
	color: var(--ena-ge-muted);
}

/* ---------- Single profile page ---------- */

.ena-ge-profile {
	margin: 16px auto 56px;
	max-width: 1040px;
}

.ena-ge-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
	font-size: 13px;
	color: var(--ena-ge-muted);
}

.ena-ge-breadcrumb a {
	color: var(--ena-ge-accent-dark);
	text-decoration: none;
	font-weight: 600;
}

.ena-ge-breadcrumb a:hover,
.ena-ge-breadcrumb a:focus {
	text-decoration: underline;
}

.ena-ge-profile-card {
	display: grid;
	grid-template-columns: minmax(260px, 380px) 1fr;
	gap: 30px;
	background: var(--ena-ge-card);
	border: 1px solid var(--ena-ge-section-border);
	border-radius: 18px;
	padding: 28px;
	box-shadow: 0 10px 28px rgba(9, 30, 45, 0.1);
}

.ena-ge-profile-media {
	text-align: center;
	align-self: start;
}

.ena-ge-profile-photo {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	display: block;
	border-radius: 14px;
	border: 1px dashed rgba(0, 90, 141, 0.45);
	background: linear-gradient(160deg, #eef4fa 0%, #e2edf5 100%);
}

.ena-ge-profile-photo.is-placeholder {
	object-fit: contain;
	padding: 12%;
}

.ena-ge-profile-media .ena-ge-photo-note {
	margin-top: 10px;
}

.ena-ge-profile-info .ena-ge-badge {
	align-self: flex-start;
	margin: 0 0 12px;
	text-decoration: none;
}

.ena-ge-profile-info .ena-ge-badge:hover,
.ena-ge-profile-info .ena-ge-badge:focus {
	background: rgba(0, 90, 141, 0.22);
}

.ena-ge-profile-name {
	margin: 0 0 8px;
	font-size: 30px;
	line-height: 1.18;
	font-weight: 800;
	color: var(--ena-ge-ink);
}

.ena-ge-profile-func {
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 600;
	color: var(--ena-ge-accent-dark);
}

.ena-ge-profile-label {
	color: var(--ena-ge-muted);
	font-weight: 600;
}

.ena-ge-profile-email a {
	color: var(--ena-ge-accent-dark);
	text-decoration: none;
	word-break: break-word;
}

.ena-ge-profile-email a:hover,
.ena-ge-profile-email a:focus {
	text-decoration: underline;
}

.ena-ge-profile-h2 {
	position: relative;
	margin: 0 0 12px;
	font-size: 19px;
	font-weight: 800;
	color: var(--ena-ge-ink);
	padding-bottom: 8px;
}

.ena-ge-profile-h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 46px;
	height: 3px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--ena-ge-accent) 0 58%, var(--ena-ge-highlight) 58% 100%);
}

.ena-ge-profile-desc {
	margin-top: 18px;
}

.ena-ge-profile-desc p {
	line-height: 1.7;
	margin: 0 0 12px;
}

.ena-ge-profile-block {
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid var(--ena-ge-section-border);
}

.ena-ge-profile-block p {
	line-height: 1.7;
	margin: 0 0 10px;
}

.ena-ge-chips {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.ena-ge-chips li {
	background: rgba(0, 90, 141, 0.12);
	color: var(--ena-ge-accent-dark);
	font-size: 12.5px;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 999px;
}

.ena-ge-profile-meta {
	margin: 20px 0 0;
	font-size: 12.5px;
	color: var(--ena-ge-muted);
}

.ena-ge-profile-nav {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 14px;
	margin-top: 24px;
}

.ena-ge-nav-item {
	flex: 1 1 46%;
	max-width: 46%;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 14px 18px;
	background: var(--ena-ge-card);
	border: 1px solid var(--ena-ge-section-border);
	border-radius: 12px;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(9, 30, 45, 0.06);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ena-ge-nav-item:hover,
.ena-ge-nav-item:focus {
	border-color: var(--ena-ge-accent);
	box-shadow: 0 8px 20px rgba(9, 30, 45, 0.12);
}

.ena-ge-nav-item.is-empty {
	visibility: hidden;
	border: 0;
	padding: 0;
	box-shadow: none;
}

.ena-ge-nav-next {
	text-align: right;
	align-self: flex-end;
}

.ena-ge-nav-dir {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ena-ge-muted);
}

.ena-ge-nav-name {
	font-size: 14px;
	font-weight: 700;
	color: var(--ena-ge-ink);
}

.ena-ge-profile-back {
	margin: 26px 0 0;
	text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.ena-ge-grid {
		grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
		--ena-ge-gap: 18px;
	}

	.ena-ge-profile-card {
		grid-template-columns: minmax(220px, 300px) 1fr;
		gap: 22px;
		padding: 22px;
	}
}

@media (max-width: 768px) {
	.ena-ge-section {
		padding: 24px 16px 20px;
		border-radius: 14px;
	}

	.ena-ge-grid {
		grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
		--ena-ge-gap: 14px;
	}

	.ena-ge-section-title {
		font-size: 22px;
	}

	.ena-ge-illu {
		width: 104px;
		height: 66px;
	}

	.ena-ge-desc {
		-webkit-line-clamp: 2;
		font-size: 12px;
	}

	.ena-ge-profile-card {
		grid-template-columns: 1fr;
	}

	.ena-ge-profile-media {
		max-width: 320px;
		margin: 0 auto;
		width: 100%;
	}

	.ena-ge-profile-name {
		font-size: 25px;
	}

	.ena-ge-profile-nav {
		flex-direction: column;
	}

	.ena-ge-nav-item,
	.ena-ge-nav-item.is-empty {
		max-width: 100%;
		flex: 1 1 auto;
	}

	.ena-ge-nav-next {
		text-align: left;
		align-self: stretch;
	}
}

@media (max-width: 520px) {
	.ena-ge-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		--ena-ge-gap: 12px;
	}

	.ena-ge-stamp {
		padding: 9px;
	}

	.ena-ge-name {
		font-size: 14px;
	}

	.ena-ge-func {
		font-size: 12px;
	}

	.ena-ge-badge {
		font-size: 10px;
		padding: 4px 9px;
	}

	.ena-ge-desc {
		display: none;
	}

	.ena-ge-profile {
		margin-top: 8px;
	}

	.ena-ge-profile-card {
		padding: 16px;
	}

	.ena-ge-profile-name {
		font-size: 22px;
	}
}

@media (max-width: 340px) {
	.ena-ge-grid {
		grid-template-columns: 1fr;
	}
}

/* Print: keep stamps tidy. */
@media print {
	.ena-ge-pagination {
		display: none;
	}

	.ena-ge-stamp {
		box-shadow: none;
		border: 1px solid #ddd;
	}
}
