/**
 * ============================================================
 * EEC HEADER — Styles institutionnels
 * Mobile-first, accessible, responsive
 * ============================================================
 */

:root {
	--eec-header-height: 88px;
	--eec-topbar-height: 40px;
	--eec-drawer-offset: calc(var(--eec-topbar-height) + var(--eec-header-height));
}

/* Ancien header GP masqué si résidu */
.site-header {
	display: none !important;
}

/* === TOP BAR === */
.eec-top-bar {
	background: var(--eec-blue-deep);
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
	line-height: 1.4;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	overflow: visible;
}

.eec-top-bar__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 8px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--eec-topbar-height);
	overflow: visible;
}

.eec-top-bar__left,
.eec-top-bar__right {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

.eec-top-bar__right {
	flex-shrink: 0;
}

.eec-top-bar__contact {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.eec-top-bar__contact:hover {
	color: var(--eec-yellow);
}

.eec-top-bar__contact i {
	font-size: 12px;
	opacity: 0.7;
}

.eec-top-bar__separator {
	opacity: 0.3;
}

.eec-top-bar__social {
	display: inline-flex;
	gap: 12px;
}

.eec-top-bar__social a {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.eec-top-bar__social a:hover {
	background: var(--eec-yellow);
	color: var(--eec-blue-deep);
	transform: translateY(-1px);
}

.eec-top-bar .eec-lang-switch {
	color: rgba(255, 255, 255, 0.92);
}

.eec-top-bar .eec-lang-switch a.active {
	color: var(--eec-yellow);
}

.eec-top-bar .eec-lang-switch a:focus-visible {
	outline-color: var(--eec-yellow);
}

.eec-header__nav-lang {
	display: none;
}

.eec-header__nav-lang .eec-lang-switch {
	justify-content: center;
	font-size: 15px;
	color: var(--eec-blue-deep);
	padding: 12px 0 4px;
}

.eec-header__nav-lang .eec-lang-switch a.active {
	color: var(--eec-blue);
}

.eec-header__nav-lang .eec-lang-switch a:focus-visible {
	outline-color: var(--eec-blue);
}

/* === MAIN HEADER === */
.eec-header {
	background: #ffffff;
	box-shadow: 0 2px 12px rgba(20, 44, 82, 0.06);
	position: sticky;
	top: 0;
	z-index: 100;
	transition: box-shadow 0.3s ease;
}

.eec-header__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 16px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: var(--eec-header-height);
}

.eec-header__logo.eec-header__logo-link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--eec-blue);
	flex-shrink: 0;
}

/* Fond blanc sous le logo institutionnel (PNG fond noir → lisibilité). */
.eec-header__logo-link .eec-header__logo-picture {
	background: #ffffff;
	padding: 5px 12px;
	border-radius: 10px;
	box-shadow: 0 1px 5px rgba(20, 44, 82, 0.1);
	line-height: 0;
}

.eec-header__logo-link > .eec-header__logo-img {
	background: #ffffff;
	padding: 5px 12px;
	border-radius: 10px;
	box-shadow: 0 1px 5px rgba(20, 44, 82, 0.1);
	box-sizing: content-box;
}

.eec-header__logo-picture--mobile {
	display: none;
}

.eec-header__logo-img {
	height: 64px;
	width: auto;
	max-width: 180px;
	object-fit: contain;
	transition: opacity 0.2s ease;
	background: transparent;
}

.eec-header__logo-link:hover .eec-header__logo-img,
.eec-header__logo:hover .eec-header__logo-img {
	opacity: 0.85;
}

.eec-header__logo-img--mobile {
	display: none;
}

.eec-header__logo-text {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
	min-width: 0;
}

.eec-header__logo-heading {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.eec-header__logo-title,
.eec-header__brand-name {
	font-family: "Playfair Display", Georgia, serif;
	font-size: 26px;
	font-weight: 700;
	color: var(--eec-blue);
	letter-spacing: 1px;
}

.eec-header__logo-sticker {
	display: inline-block;
	padding: 3px 9px;
	font-family: "Lato", sans-serif;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var(--eec-blue-deep);
	background: linear-gradient(135deg, var(--eec-yellow) 0%, var(--eec-yellow-deep) 100%);
	border-radius: 999px;
	box-shadow: 0 1px 4px rgba(20, 44, 82, 0.15);
	line-height: 1.2;
	white-space: nowrap;
}

.eec-header__logo-subtitle,
.eec-header__brand-tagline {
	font-size: 11px;
	font-weight: 500;
	color: #6b6b6b;
	text-transform: uppercase;
	letter-spacing: 1.2px;
	margin-top: 3px;
}

.eec-header__menu-toggle {
	display: none;
	order: 3;
	background: transparent;
	border: 1px solid var(--eec-border-soft);
	border-radius: 6px;
	width: 44px;
	height: 44px;
	cursor: pointer;
	padding: 0;
	align-items: center;
	justify-content: center;
}

.eec-header__hamburger {
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	width: 20px;
}

.eec-header__hamburger span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--eec-blue);
	border-radius: 1px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.eec-header__menu-toggle[aria-expanded="true"] .eec-header__hamburger span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.eec-header__menu-toggle[aria-expanded="true"] .eec-header__hamburger span:nth-child(2) {
	opacity: 0;
}

.eec-header__menu-toggle[aria-expanded="true"] .eec-header__hamburger span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

.eec-header__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
	order: 2;
}

.eec-header__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px;
}

.eec-header__menu > li {
	position: relative;
	list-style: none;
}

.eec-header__menu > li > a {
	display: inline-block;
	padding: 12px 18px;
	font-size: 15px;
	font-weight: 500;
	color: var(--eec-text);
	text-decoration: none;
	border-radius: 6px;
	transition: background-color 0.2s ease, color 0.2s ease;
	position: relative;
}

.eec-header__menu > li > a:hover,
.eec-header__menu > li.current-menu-item > a,
.eec-header__menu > li.current-menu-ancestor > a {
	color: var(--eec-blue);
	background: var(--eec-cream);
}

.eec-header__menu > li.current-menu-item > a::after {
	content: "";
	position: absolute;
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 24px;
	height: 2px;
	background: var(--eec-green);
}

.eec-header__menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: #ffffff;
	border: 1px solid var(--eec-border-soft);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(20, 44, 82, 0.12);
	padding: 8px;
	list-style: none;
	margin: 8px 0 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
	z-index: 120;
}

.eec-header__menu li:hover > .sub-menu,
.eec-header__menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.eec-header__menu .sub-menu li {
	list-style: none;
}

.eec-header__menu .sub-menu a {
	display: block;
	padding: 10px 14px;
	font-size: 14px;
	color: var(--eec-text);
	text-decoration: none;
	border-radius: 4px;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.eec-header__menu .sub-menu a:hover,
.eec-header__menu .sub-menu a:focus-visible {
	background: var(--eec-cream);
	color: var(--eec-blue);
	outline: none;
}

.eec-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
	order: 4;
}

.eec-header__donate-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 22px;
	background: var(--eec-yellow);
	color: var(--eec-blue-deep);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	border-radius: 6px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	box-shadow: 0 2px 8px rgba(244, 208, 63, 0.35);
}

.eec-header__donate-btn:hover {
	background: var(--eec-yellow-deep);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
	color: var(--eec-blue-deep);
}

.eec-header__donate-btn i {
	font-size: 13px;
}

body.eec-menu-open {
	overflow: hidden;
}

@media (max-width: 768px) {
	.eec-header__logo-img:not(.eec-header__logo-img--mobile) {
		max-width: 120px;
		height: 56px;
	}
}

@media (max-width: 1024px) {
	.eec-header__logo-subtitle {
		display: none;
	}

	.eec-top-bar__address {
		display: none;
	}
}

@media (max-width: 880px) {
	.eec-header__inner {
		display: grid;
		grid-template-columns: 1fr auto auto;
		grid-template-rows: auto;
		align-items: center;
		column-gap: 16px;
		row-gap: 0;
	}

	.eec-header__logo {
		grid-column: 1;
		grid-row: 1;
	}

	.eec-header__actions {
		grid-column: 2;
		grid-row: 1;
		justify-self: end;
	}

	.eec-header__menu-toggle {
		grid-column: 3;
		grid-row: 1;
		display: inline-flex;
		justify-self: end;
	}

	.eec-header__logo-picture--desktop {
		display: none;
	}

	.eec-header__logo-picture--mobile {
		display: block;
	}

	.eec-header__logo-img--desktop {
		display: none;
	}

	.eec-header__logo-img--mobile {
		display: block;
		height: 54px;
		max-width: 88px;
	}

	.eec-header__logo-title,
	.eec-header__brand-name {
		font-size: 22px;
	}

	.eec-top-bar__inner {
		padding: 6px 20px;
		flex-wrap: wrap;
	}

	.eec-top-bar__left {
		display: none;
	}

	.eec-top-bar__right {
		width: 100%;
		justify-content: center;
	}

	.eec-header__nav {
		grid-column: 1 / -1;
		position: fixed;
		left: 0;
		right: 0;
		top: var(--eec-drawer-offset);
		bottom: 0;
		overflow-y: auto;
		background: #ffffff;
		flex-direction: column;
		align-items: stretch;
		padding: 16px 24px 32px;
		box-shadow: 0 12px 24px rgba(20, 44, 82, 0.08);
		transform: translateY(-110%);
		transition: transform 0.3s ease;
		z-index: 99;
		justify-content: flex-start;
	}

	.eec-header__nav.is-open {
		transform: translateY(0);
	}

	.eec-header__menu {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 0;
	}

	.eec-header__menu > li > a {
		padding: 14px 16px;
		border-bottom: 1px solid var(--eec-border-soft);
		border-radius: 0;
	}

	.eec-header__menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: none;
		background: var(--eec-cream);
		margin: 0;
		padding-left: 16px;
		border-radius: 0;
	}

	.eec-header__donate-btn span {
		display: none;
	}

	.eec-header__donate-btn {
		padding: 10px 14px;
	}

	.eec-header__nav-lang {
		display: block;
		margin-top: 8px;
		padding-top: 16px;
		border-top: 1px solid var(--eec-border-soft);
	}
}

@media (max-width: 480px) {
	.eec-header__inner {
		padding: 12px 16px;
		column-gap: 12px;
	}

	.eec-header__logo-subtitle,
	.eec-header__brand-tagline {
		display: none;
	}

	.eec-header__logo-heading {
		gap: 6px;
	}

	.eec-header__logo-sticker {
		font-size: 9px;
		padding: 2px 7px;
	}

	.eec-top-bar {
		font-size: 12px;
	}
}

/* Pleine largeur home — évite colonne étroite + widgets résiduels */
.eec-full-width .inside-article,
.eec-full-width .entry-content {
	max-width: 100%;
}

.home .site-content .content-area {
	width: 100%;
	float: none;
}

.home .widget-area,
.home .sidebar {
	display: none !important;
}
