/*
Theme Name: AEC Art Eco Conseil
Author: NR Partners
Description: Theme local pour la copie du site vitrine Art Eco Conseil.
Version: 1.0.0
Text Domain: aec-art-eco-conseil
*/

@font-face {
	font-family: "Space Grotesk";
	src: url("assets/fonts/space-grotesk-600.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Inter";
	src: url("assets/fonts/inter-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   AEC — Header + Footer (Personnaliser > CSS additionnel)
   Kadence-safe : classes only, zéro id. Préfixe : aec-hd / aec-ft
   Full-width : neutralisation des wrappers Kadence (:has) sur desktop+mobile.
   ========================================================================== */

/* ---------- FULL-WIDTH HEADER : neutraliser les contraintes Kadence ----------
   Cause racine (inspecteur) : .site-container interne à la rangée header porte
   width:971px + padding-inline:24px. On le neutralise nommément, c'est LUI qui
   rogne — pas seulement les wrappers parents. Solution éprouvée (halbwax, islm). */
#masthead .site-container,
#main-header .site-container,
#mobile-header .site-container,
.site-header-row-container-inner .site-container,
.site-header-row-container-inner,
.site-header-inner-wrap,
.site-header-upper-inner-wrap,
.site-top-header-inner-wrap,
.site-header-item:has(.aec-hd-wrap),
.mobile-html:has(.aec-hd-wrap),
.mobile-html-inner:has(.aec-hd-wrap),
.header-html:has(.aec-hd-wrap) {
	max-width: none !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* ---------- HEADER ---------- */
.aec-hd-wrap {
	position: relative;
	width: 100vw;
	margin-inline: calc(50% - 50vw);
	background: #F7F7F5;
	border-bottom: 1px solid #E3E1DC;
}
.aec-hd {
	max-width: 1240px;
	margin-inline: auto;
	padding: 6px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.aec-hd__logo { display: flex; align-items: center; flex-shrink: 0; }
.aec-hd__logo img { height: 64px; width: auto; display: block; }
.aec-hd__nav { display: flex; align-items: center; gap: 28px; }

/* Sous-menu déroulant "Nos métiers" */
.aec-hd__has-sub { position: relative; }
.aec-hd__sub-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.02em;
	color: #082B4B;
	background: transparent;
	border: 0;
	padding: 6px 0;
	cursor: pointer;
}
.aec-hd__sub-toggle::after {
	content: "";
	width: 8px; height: 8px;
	border-right: 2px solid #082B4B;
	border-bottom: 2px solid #082B4B;
	transform: rotate(45deg) translateY(-2px);
	transition: transform .2s ease;
}
.aec-hd__has-sub:hover .aec-hd__sub-toggle::after { transform: rotate(225deg) translateY(-2px); }
.aec-hd__sub {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(8px);
	min-width: 260px;
	background: #fff;
	border: 1px solid #E3E1DC;
	box-shadow: 0 16px 32px rgba(4,31,54,0.12);
	padding: 8px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
	z-index: 1000;
}
.aec-hd__has-sub:hover .aec-hd__sub {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(4px);
}
.aec-hd__sub a {
	display: block;
	padding: 10px 14px;
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 500;
	font-size: 14px;
	color: #082B4B;
	text-decoration: none;
	border-radius: 2px;
	transition: background-color .15s ease, color .15s ease;
}
.aec-hd__sub a:hover { background: #F7F7F5; color: #B76531; }
.aec-hd__nav a:not(.aec-btn) {
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.02em;
	color: #082B4B;
	text-decoration: none;
	padding: 6px 0;
	position: relative;
	transition: color .18s ease;
}
.aec-hd__nav a:not(.aec-btn)::after {
	content: "";
	position: absolute;
	left: 0; bottom: 0;
	width: 0; height: 2px;
	background: #B76531;
	transition: width .2s ease;
}
.aec-hd__nav a:not(.aec-btn):hover { color: #B76531; }
.aec-hd__nav a:not(.aec-btn):hover::after { width: 100%; }
.aec-hd .aec-btn {
	display: inline-flex;
	align-items: center;
	padding: 11px 22px;
	background: #B76531;
	color: #fff;
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 2px;
	border: 1px solid #B76531;
	transition: background-color .18s ease;
}
.aec-hd .aec-btn:hover { background: #9C5629; color: #fff; }

/* Burger (desktop masque) */
.aec-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	cursor: pointer;
}
.aec-burger span {
	display: block;
	width: 26px;
	height: 2px;
	background: #082B4B;
	margin-inline: auto;
	transition: transform .25s ease, opacity .2s ease;
}

/* ---------- MOBILE ---------- */
@media (max-width: 980px) {
	.aec-hd { padding-inline: 16px; }
	.aec-burger { display: flex; }
	.aec-hd__nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: #F7F7F5;
		border-bottom: 1px solid #E3E1DC;
		padding: 8px 16px 20px;
		box-shadow: 0 12px 24px rgba(4,31,54,0.08);
		z-index: 999;
	}
	.aec-hd-wrap.is-open .aec-hd__nav { display: flex; }
	.aec-hd__nav a:not(.aec-btn) {
		padding: 14px 0;
		border-bottom: 1px solid #E9E7E2;
		font-size: 16px;
	}
	.aec-hd__nav a:not(.aec-btn)::after { display: none; }
	.aec-hd .aec-btn { margin-top: 14px; justify-content: center; text-align: center; }
	.aec-hd-wrap.is-open .aec-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.aec-hd-wrap.is-open .aec-burger span:nth-child(2) { opacity: 0; }
	.aec-hd-wrap.is-open .aec-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	/* Sous-menu en accordéon sur mobile */
	.aec-hd__has-sub { width: 100%; }
	.aec-hd__sub-toggle {
		width: 100%;
		justify-content: space-between;
		padding: 14px 0;
		border-bottom: 1px solid #E9E7E2;
		font-size: 16px;
	}
	.aec-hd__sub {
		position: static;
		left: auto;
		right: auto;
		top: auto;
		transform: none;
		opacity: 1;
		visibility: visible;
		width: 100%;
		min-width: 0;
		max-width: 100%;
		box-shadow: none;
		border: 0;
		padding: 0 0 0 16px;
		display: none;
		background: transparent;
		box-sizing: border-box;
	}
	.aec-hd__has-sub.is-sub-open .aec-hd__sub { display: block; }
	/* Neutraliser le transform du :hover desktop qui reste actif au tap mobile
	   et décale le sous-menu hors écran (translateX résiduel). */
	.aec-hd__has-sub:hover .aec-hd__sub,
	.aec-hd__has-sub.is-sub-open .aec-hd__sub {
		transform: none !important;
		left: auto !important;
		right: auto !important;
	}
	.aec-hd__has-sub.is-sub-open .aec-hd__sub-toggle::after { transform: rotate(225deg) translateY(-2px); }
	.aec-hd__sub a { padding: 12px 0; border-bottom: 1px solid #EEEDEA; }
	.aec-hd__sub a:hover { background: transparent; }
}

/* ---------- FOOTER (full-bleed 100vw) ---------- */
.aec-ft-wrap {
	width: 100vw;
	margin-inline: calc(50% - 50vw);
	background: #041F36;
	color: #C9D2DC;
}
.aec-ft {
	max-width: 1240px;
	margin-inline: auto;
	padding: 64px 24px 32px;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 48px;
}
.aec-ft__brand {
	text-align: center;
}
@media (max-width: 780px) {
	.aec-ft { grid-template-columns: 1fr; gap: 32px; padding: 48px 20px 28px; }
}
.aec-ft h4 {
	font-family: 'Space Grotesk', sans-serif;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 16px;
}
.aec-ft p { margin: 0 0 8px; font-size: 15px; line-height: 1.6; }
.aec-ft a { color: #C9D2DC; text-decoration: none; transition: color .18s ease; }
.aec-ft a:hover { color: #DDA980; }
.aec-ft__brand img { height: 68px; width: auto; margin: 0 auto 18px; display: block; filter: brightness(0) invert(1); opacity: 0.92; }
.aec-ft__brand .aec-ft__baseline { text-align: center; }
.aec-ft__brand p { margin-inline: auto; }
.aec-ft__links { list-style: none; margin: 0; padding: 0; }
.aec-ft__links li { margin-bottom: 10px; font-size: 15px; }
.aec-ft__baseline {
	color: #DDA980;
	font-family: 'Space Grotesk', sans-serif;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 12px;
}
.aec-ft-bottom {
	border-top: 1px solid rgba(255,255,255,0.1);
	max-width: 1240px;
	margin-inline: auto;
	padding: 20px 24px;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 13px;
	color: #7E8B99;
}
.aec-ft-bottom a { color: #7E8B99; }
