/**
 * Nos Formateurs page template – Legal Family
 * Brand: #105050 (primary), #E67E22 (accent), Anuphan + Montserrat
 */

/* ── Entrance animation ──────────────────────────────── */
@keyframes formateurReveal {
	from {
		opacity: 0;
		transform: translateY(28px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.nos-formateurs-wrapper {
	--lf-primary: #105050;
	--lf-primary-deep: #0c3d3d;
	--lf-accent: #E67E22;
	--lf-accent-hover: #d35400;
	--lf-bg: #ffffff;
	--lf-warm-bg: #faf8f5;
	--lf-text: #333333;
	--lf-overlap: 140px;
	padding-top: 0 !important;
	overflow-x: hidden;
}

/* ── Hero ─────────────────────────────────────────────── */
.nos-formateurs-hero {
	background: var(--lf-warm-bg);
	width: 100%;
	padding: 56px 20px calc(64px + var(--lf-overlap));
	position: relative;
}

.nos-formateurs-hero__inner {
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
	animation: fadeInUp 0.6s ease both;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.nos-formateurs-hero h1.nos-formateurs-hero__title {
	font-family: "Anuphan", sans-serif;
	color: var(--lf-primary);
	font-size: 42px;
	font-weight: 800;
	margin: 0 0 0.75rem;
	line-height: 1.15;
	letter-spacing: -0.5px;
}

.nos-formateurs-hero__intro {
	color: var(--lf-primary);
	font-size: 1.05rem;
	font-weight: 500;
	line-height: 1.7;
	opacity: 0.85;
}

.nos-formateurs-hero__intro p {
	margin: 0 0 0.5rem;
}

.nos-formateurs-hero__intro p:last-child {
	margin-bottom: 0;
}

/* Decorative accent bar below hero text */
.nos-formateurs-hero__inner::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	background: var(--lf-accent);
	margin: 1.5rem auto 0;
	border-radius: 2px;
	animation: accentGrow 0.5s 0.4s ease both;
}

@keyframes accentGrow {
	from { width: 0; }
	to { width: 56px; }
}

.nos-formateurs-hero__line {
	width: 100%;
	margin-top: 28px;
	height: 2px;
	background: var(--lf-primary);
	opacity: 0.15;
	flex-shrink: 0;
}

/* ── Layout (sidebar + grid) ──────────────────────────── */
.nos-formateurs-layout {
	background: var(--lf-primary);
	width: 100%;
	margin: 0;
	padding: 0;
}

.nos-formateurs-layout__inner {
	display: grid;
	grid-template-columns: 200px 1fr;
	column-gap: 32px;
	align-items: stretch;
	max-width: 1400px;
	min-height: 600px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ── Sidebar ──────────────────────────────────────────── */
.nos-formateurs-sidebar {
	width: 100%;
	padding: 0.5rem 0 2.5rem 0;
	align-self: stretch;
}

@media (min-width: 1024px) {
	.nos-formateurs-sidebar__nav {
		position: sticky;
		top: 100px;
	}
}

.nos-formateurs-sidebar__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nos-formateurs-sidebar__list li {
	margin-bottom: 0.1rem;
}

.nos-formateurs-sidebar__link {
	display: block;
	padding: 0.45rem 0 0.45rem 0.85rem;
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
	font-size: 0.9375rem;
	line-height: 1.5;
	border-left: 2px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease, padding-left 0.2s ease;
}

.nos-formateurs-sidebar__link:hover {
	color: #fff;
	border-left-color: rgba(255, 255, 255, 0.35);
	padding-left: 1rem;
}

.nos-formateurs-sidebar__link.is-active {
	color: #fff;
	font-weight: 700;
	border-left-color: var(--lf-accent);
	padding-left: 1rem;
}

/* ── Main content area ────────────────────────────────── */
.nos-formateurs-main {
	width: 100%;
	padding: 0 2rem 3.5rem 0;
	min-width: 0;
	margin-top: calc(-1 * var(--lf-overlap));
	position: relative;
	z-index: 2;
}

/* ── Instructor grid ─────────────────────────────────── */
.nos-formateurs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	margin-bottom: 2rem;
}

/* ── Instructor card ─────────────────────────────────── */
.nos-formateurs-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	border-radius: 12px;
	overflow: hidden;
	background: transparent;
	box-shadow: none;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
	            box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	animation: formateurReveal 0.5s ease both;
}

/* Staggered entrance */
.nos-formateurs-card:nth-child(1) { animation-delay: 0s; }
.nos-formateurs-card:nth-child(2) { animation-delay: 0.06s; }
.nos-formateurs-card:nth-child(3) { animation-delay: 0.12s; }
.nos-formateurs-card:nth-child(4) { animation-delay: 0.15s; }
.nos-formateurs-card:nth-child(5) { animation-delay: 0.2s; }
.nos-formateurs-card:nth-child(6) { animation-delay: 0.25s; }
.nos-formateurs-card:nth-child(7) { animation-delay: 0.28s; }
.nos-formateurs-card:nth-child(8) { animation-delay: 0.32s; }
.nos-formateurs-card:nth-child(9) { animation-delay: 0.36s; }

.nos-formateurs-card:hover {
	transform: translateY(-2px);
}

/* Photo container */
.nos-formateurs-card__photo {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #eef2f2;
}

.nos-formateurs-card__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.nos-formateurs-card:hover .nos-formateurs-card__photo img {
	transform: scale(1.06);
}

/* Hover overlay on photo */
.nos-formateurs-card__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.nos-formateurs-card:hover .nos-formateurs-card__overlay {
	opacity: 1;
}

.nos-formateurs-card__cta {
	display: inline-flex;
	align-items: center;
	padding: 10px 20px;
	background: #f5f1eb;
	color: var(--lf-primary);
	font-family: "Anuphan", sans-serif;
	font-size: 14px;
	font-weight: 700;
	border-radius: 999px;
	white-space: nowrap;
	transition: background 0.2s ease;
}

.nos-formateurs-card:hover .nos-formateurs-card__cta {
	background: #ebe6de;
}

/* Caption inside photo (gradient overlay at bottom) */
.nos-formateurs-card__caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 60%);
	color: #fff;
}

.nos-formateurs-card__name {
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.nos-formateurs-card__specialty {
	font-size: 14px;
	font-weight: 400;
	color: #fff;
	opacity: 0.95;
	line-height: 1.4;
}

/* Empty state */
.nos-formateurs-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 3rem 2rem;
	color: rgba(255, 255, 255, 0.75);
	font-size: 1rem;
}

/* ── Tablet ───────────────────────────────────────────── */
@media (max-width: 1024px) {
	.nos-formateurs-wrapper {
		--lf-overlap: 110px;
	}

	.nos-formateurs-layout__inner {
		grid-template-columns: 200px 1fr;
		column-gap: 24px;
	}

	.nos-formateurs-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
}

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 768px) {
	.nos-formateurs-layout {
		padding-top: 0;
	}

	.nos-formateurs-layout__inner {
		display: block;
		transform: none;
		padding: 0 16px;
	}

	.nos-formateurs-sidebar {
		flex: none;
		width: 100%;
		padding: 1.25rem 0;
		margin-top: 0;
		position: static;
	}

	.nos-formateurs-sidebar__list {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 0;
		padding-bottom: 0.25rem;
		-webkit-overflow-scrolling: touch;
	}

	.nos-formateurs-sidebar__list li {
		flex: 0 0 auto;
		margin-bottom: 0;
	}

	.nos-formateurs-sidebar__link {
		white-space: nowrap;
		padding: 0.35rem 0.75rem;
		border-left: none;
		border-bottom: 2px solid transparent;
		font-size: 0.875rem;
	}

	.nos-formateurs-sidebar__link:hover {
		padding-left: 0.75rem;
		border-left: none;
		border-bottom-color: rgba(255, 255, 255, 0.35);
	}

	.nos-formateurs-sidebar__link.is-active {
		padding-left: 0.75rem;
		border-left: none;
		border-bottom-color: var(--lf-accent);
	}

	.nos-formateurs-main {
		margin-top: 0;
		padding: 1.25rem 0 2rem;
	}

	.nos-formateurs-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.nos-formateurs-hero {
		padding: 2rem 1rem 1.5rem;
	}

	.nos-formateurs-hero h1.nos-formateurs-hero__title {
		font-size: 1.65rem;
	}

	.nos-formateurs-hero__intro {
		font-size: 0.95rem;
	}

	.nos-formateurs-card {
		animation-delay: 0s !important;
	}
}

@media (max-width: 480px) {
	.nos-formateurs-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}
