/**
 * EEC DEPARTMENTS — Grille 3×2 photos + couleurs identitaires
 */

.eec-departments {
	padding: 96px 24px 80px;
	background: var(--eec-blue-light, #e8f0f8);
	position: relative;
}

.eec-departments__container {
	max-width: 1280px;
	margin: 0 auto;
}

/* Header */
.eec-departments__header {
	text-align: center;
	margin-bottom: 56px;
}

.eec-departments__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 18px;
	background: #fff;
	border: 1px solid var(--eec-border);
	border-radius: 24px;
	font-family: Lato, sans-serif;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 2px;
	color: var(--eec-blue);
	margin: 0 0 16px;
	box-shadow: 0 2px 8px rgba(20, 44, 82, 0.06);
}

.eec-departments__eyebrow i {
	font-size: 12px;
	color: var(--eec-yellow-deep);
}

.eec-departments__title {
	font-family: "Playfair Display", Georgia, serif;
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 700;
	color: var(--eec-blue);
	line-height: 1.2;
	margin: 0 0 16px;
}

.eec-departments__lead {
	font-size: 17px;
	color: var(--eec-text-light);
	line-height: 1.6;
	max-width: 720px;
	margin: 0 auto;
}

/* Grille */
.eec-departments__grid {
	list-style: none;
	padding: 0;
	margin: 0 0 56px;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

.eec-departments__item {
	list-style: none;
}

/* Carte */
.eec-departments__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 4px 20px rgba(20, 44, 82, 0.06);
	transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	border-top: 4px solid var(--dept-color, var(--eec-blue));
}

.eec-departments__card:hover {
	transform: translateY(-6px);
	box-shadow: 0 16px 36px rgba(20, 44, 82, 0.14);
}

.eec-departments__card:focus-visible {
	outline: 2px solid var(--dept-color);
	outline-offset: 4px;
}

/* Image */
.eec-departments__card-image {
	position: relative;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--eec-blue-deep);
}

.eec-departments__card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease-out;
}

.eec-departments__card:hover .eec-departments__card-image img {
	transform: scale(1.06);
}

.eec-departments__card-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.4);
	font-size: 80px;
}

/* Icône superposée */
.eec-departments__card-icon {
	position: absolute;
	bottom: 16px;
	left: 16px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--dept-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
	z-index: 2;
	transition: transform 0.3s;
}

.eec-departments__card:hover .eec-departments__card-icon {
	transform: scale(1.08) rotate(-4deg);
}

.eec-departments__card-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		180deg,
		transparent 50%,
		rgba(0, 0, 0, 0.35) 100%
	);
	pointer-events: none;
	z-index: 1;
}

/* Body */
.eec-departments__card-body {
	padding: 24px 22px 26px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.eec-departments__card-title {
	font-family: "Playfair Display", Georgia, serif;
	font-size: 22px;
	font-weight: 700;
	color: var(--eec-blue);
	margin: 0 0 12px;
	line-height: 1.3;
	transition: color 0.2s;
}

.eec-departments__card:hover .eec-departments__card-title {
	color: var(--dept-color);
}

.eec-departments__card-description {
	font-size: 14.5px;
	color: var(--eec-text);
	line-height: 1.65;
	margin: 0 0 20px;
	flex: 1;
}

.eec-departments__card-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: Lato, sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	color: var(--dept-color);
	transition: gap 0.25s;
	margin-top: auto;
}

.eec-departments__card:hover .eec-departments__card-cta {
	gap: 12px;
}

.eec-departments__card-cta i {
	font-size: 11px;
	transition: transform 0.2s;
}

/* CTA bas */
.eec-departments__cta {
	text-align: center;
}

.eec-departments__cta-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 32px;
	background: var(--eec-blue);
	color: #fff;
	border-radius: 8px;
	font-family: Lato, sans-serif;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.eec-departments__cta-btn:hover {
	background: var(--eec-blue-deep);
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(20, 44, 82, 0.25);
	color: #fff;
}

.eec-departments__cta-btn:focus-visible {
	outline: 2px solid var(--eec-green-deep);
	outline-offset: 3px;
}

.eec-departments__cta-btn i {
	font-size: 12px;
	transition: transform 0.2s;
}

.eec-departments__cta-btn:hover i {
	transform: translateX(4px);
}

@media (max-width: 1024px) {
	.eec-departments__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
}

@media (max-width: 768px) {
	.eec-departments {
		padding: 64px 16px 56px;
	}

	.eec-departments__header {
		margin-bottom: 36px;
	}

	.eec-departments__grid {
		grid-template-columns: 1fr;
		gap: 20px;
		margin-bottom: 36px;
	}

	.eec-departments__card-body {
		padding: 20px 18px 22px;
	}

	.eec-departments__card-title {
		font-size: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eec-departments__card,
	.eec-departments__card-image img,
	.eec-departments__card-icon,
	.eec-departments__card-cta,
	.eec-departments__cta-btn {
		transition: none !important;
	}

	.eec-departments__card:hover,
	.eec-departments__cta-btn:hover {
		transform: none !important;
	}

	.eec-departments__card:hover .eec-departments__card-image img,
	.eec-departments__card:hover .eec-departments__card-icon {
		transform: none !important;
	}
}
