/*
 * Art Zinc Toiture — En-tête + navigation.
 *
 * Fixe, transparent au-dessus du hero, barre vert profond au défilement.
 * Desktop : menu horizontal + déroulant « Nos Métiers ». Mobile : burger + panneau.
 * Couleurs de la maquette : crème #F3F0E6, vif #DDF49F, vert profond #111A00.
 *
 * Structure (walker AZT_Nav_Walker) :
 *   <ul.azt-nav__list> <li> <div.azt-nav__row><a> + <button.azt-nav__toggle></div>
 *       <ul.azt-nav__sub><li><a></li></ul> </li> </ul>
 */

.azt-header {
	--h-creme: #f3f0e6;
	--h-vif: #ddf49f;
	--h-ink: #111a00;
	--h-bar: rgba(17, 26, 0, 0.92);
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 80;
	background: transparent; /* header sans fond, superposé au contenu */
}

.azt-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: clamp(12px, 1.8vw, 22px) clamp(16px, 4vw, 64px);
}

/* --- Logo (compact : pente + AZT ; 2 variantes clair/foncé) --- */
.azt-header__logo {
	display: block;
	line-height: 0;
	flex: 0 0 auto;
}
.azt-header__logo-img {
	display: block;
	height: clamp(40px, 4.4vw, 58px);
	width: auto;
}
.azt-header__logo-img--dark { display: none; }
.azt-header--on-light .azt-header__logo-img--light { display: none; }
.azt-header--on-light .azt-header__logo-img--dark { display: block; }

/* --- Conteneur nav --- */
.azt-nav {
	display: flex;
	align-items: center;
}
.azt-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(14px, 1.9vw, 30px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.azt-nav__list li {
	position: relative;
	margin: 0;
}

/* --- Ligne lien + chevron --- */
.azt-nav__row {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* --- Liens de 1er niveau --- */
.azt-nav__row > a {
	display: inline-flex;
	align-items: center;
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 600;
	font-size: 10.5px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	color: rgba(243, 240, 230, 0.82);
	white-space: nowrap;
	transition: color 0.25s ease;
}
.azt-nav__list > li > .azt-nav__row > a:hover,
.azt-nav__list > li > .azt-nav__row > a:focus-visible,
.azt-nav__list > li.current-menu-item > .azt-nav__row > a,
.azt-nav__list > li.current-menu-parent > .azt-nav__row > a,
.azt-nav__list > li.current-menu-ancestor > .azt-nav__row > a {
	color: var(--h-vif);
}

/* CTA = dernier item de 1er niveau (Contact & Devis). */
.azt-nav__list > li:last-child > .azt-nav__row > a {
	background: var(--h-vif);
	color: var(--h-ink);
	padding: 12px 18px;
	letter-spacing: 0.14em;
	transition: background-color 0.25s ease, color 0.25s ease;
}
.azt-nav__list > li:last-child > .azt-nav__row > a:hover,
.azt-nav__list > li:last-child > .azt-nav__row > a:focus-visible {
	background: var(--h-creme);
	color: var(--h-ink);
}

/* --- Chevron déroulant --- */
.azt-nav__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	padding: 4px;
	margin: 0;
	color: rgba(243, 240, 230, 0.82);
	cursor: pointer;
	line-height: 0;
}
.azt-nav__toggle svg {
	width: 10px;
	height: 10px;
	transition: transform 0.3s ease;
}
.menu-item-has-children.is-open > .azt-nav__row .azt-nav__toggle svg {
	transform: rotate(180deg);
}

/* --- Sous-menu (desktop) --- */
.azt-nav__sub {
	position: absolute;
	top: calc(100% + 14px);
	left: -18px;
	min-width: 250px;
	margin: 0;
	padding: 10px;
	list-style: none;
	background: var(--h-bar);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
	-webkit-backdrop-filter: blur(9px);
	backdrop-filter: blur(9px);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}
.azt-nav__list > li.menu-item-has-children:hover > .azt-nav__sub,
.azt-nav__list > li.menu-item-has-children:focus-within > .azt-nav__sub,
.azt-nav__list > li.menu-item-has-children.is-open > .azt-nav__sub {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.azt-nav__sub li a {
	display: block;
	padding: 11px 14px;
	font-family: "Montserrat", system-ui, sans-serif;
	font-weight: 500;
	font-size: 11.5px;
	letter-spacing: 0.03em;
	text-decoration: none;
	color: rgba(243, 240, 230, 0.86);
	transition: background-color 0.2s ease, color 0.2s ease;
}
.azt-nav__sub li a:hover,
.azt-nav__sub li a:focus-visible {
	background: rgba(221, 244, 159, 0.12);
	color: var(--h-vif);
}

/* --- Thème « on-light » : header foncé sur fond clair (sections crème, pages
   intérieures). Le CTA garde son fond vif. --- */
.azt-header--on-light .azt-nav__row > a { color: rgba(17, 26, 0, 0.8); }
.azt-header--on-light .azt-nav__list > li > .azt-nav__row > a:hover,
.azt-header--on-light .azt-nav__list > li > .azt-nav__row > a:focus-visible,
.azt-header--on-light .azt-nav__list > li.current-menu-item > .azt-nav__row > a,
.azt-header--on-light .azt-nav__list > li.current-menu-parent > .azt-nav__row > a,
.azt-header--on-light .azt-nav__list > li.current-menu-ancestor > .azt-nav__row > a { color: #364700; }
.azt-header--on-light .azt-nav__toggle { color: rgba(17, 26, 0, 0.8); }
.azt-header--on-light .azt-burger span { background: var(--h-ink); }

/* --- Burger (caché en desktop) --- */
.azt-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}
.azt-burger span {
	display: block;
	width: 26px;
	height: 2px;
	margin: 0 auto;
	background: var(--h-creme);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

/* =========================================================
   Responsive — burger + panneau plein écran sous 1024px
   ========================================================= */
@media (max-width: 1023px) {
	.azt-burger {
		display: flex;
	}
	.azt-nav {
		position: fixed;
		inset: 0;
		z-index: -1;
		flex-direction: column;
		justify-content: flex-start;
		padding: clamp(90px, 16vh, 130px) clamp(20px, 6vw, 48px) 48px;
		background: var(--h-ink);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-12px);
		transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
	}
	.azt-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
	}
	.azt-nav__list > li {
		border-bottom: 1px solid rgba(243, 240, 230, 0.12);
	}
	.azt-nav__row {
		justify-content: space-between;
		width: 100%;
	}
	.azt-nav__row > a {
		flex: 1;
		font-size: 15px;
		letter-spacing: 0.06em;
		padding: 20px 2px;
	}
	.azt-nav__toggle {
		padding: 18px 8px;
	}
	.azt-nav__toggle svg {
		width: 14px;
		height: 14px;
	}
	/* CTA pleine largeur dans le panneau */
	.azt-nav__list > li:last-child {
		border-bottom: 0;
		margin-top: 22px;
	}
	.azt-nav__list > li:last-child > .azt-nav__row > a {
		justify-content: center;
		padding: 18px;
		font-size: 13px;
	}
	/* Sous-menu = accordéon */
	.azt-nav__sub {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		min-width: 0;
		background: none;
		box-shadow: none;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		padding: 0 0 10px 14px;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.35s ease;
	}
	.azt-nav__list > li.menu-item-has-children:hover > .azt-nav__sub {
		max-height: 0; /* neutralise le hover desktop en mobile */
	}
	.azt-nav__list > li.menu-item-has-children.is-open > .azt-nav__sub {
		max-height: 420px;
	}
	.azt-nav__sub li a {
		font-size: 13.5px;
		padding: 12px 8px;
	}

	/* Panneau ouvert */
	body.azt-nav-open {
		overflow: hidden;
	}
	body.azt-nav-open .azt-nav {
		opacity: 1;
		visibility: visible;
		transform: none;
		z-index: 70;
	}
	body.azt-nav-open .azt-burger span:nth-child(1) {
		transform: translateY(7px) rotate(45deg);
	}
	body.azt-nav-open .azt-burger span:nth-child(2) {
		opacity: 0;
	}
	body.azt-nav-open .azt-burger span:nth-child(3) {
		transform: translateY(-7px) rotate(-45deg);
	}
	body.azt-nav-open .azt-header {
		background: var(--h-bar);
	}
	/* Panneau ouvert : le panneau est sombre → on force le chrome clair. */
	body.azt-nav-open .azt-nav__row > a,
	body.azt-nav-open .azt-nav__toggle,
	body.azt-nav-open .azt-nav__sub li a {
		color: rgba(243, 240, 230, 0.86) !important;
	}
	body.azt-nav-open .azt-burger span {
		background: var(--h-creme) !important;
	}
	body.azt-nav-open .azt-header__logo-img--light { display: block !important; }
	body.azt-nav-open .azt-header__logo-img--dark { display: none !important; }
}

/* Décalage du contenu sous le header fixe (hors page d'accueil, cf. header.php). */
.azt-header-spacer {
	height: clamp(70px, 9vw, 104px);
}

@media (prefers-reduced-motion: reduce) {
	.azt-header,
	.azt-nav,
	.azt-nav__sub,
	.azt-nav__toggle svg,
	.azt-burger span {
		transition: none !important;
	}
}

/* =========================================================
   Pied de page (design maquette, couleurs codées en dur → OK partout)
   ========================================================= */
.azt-footer {
	/* position/z-index indispensables : sur l'accueil, le calque de fond de la
	   maquette est en position:fixed;z-index:0 et masquerait un footer non
	   positionné (les éléments positionnés se peignent au-dessus du flux). */
	position: relative;
	z-index: 1;
	background: #111a00;
	color: #f3f0e6;
	font-family: "Montserrat", system-ui, sans-serif;
	padding: clamp(48px, 6vw, 76px) clamp(16px, 4vw, 64px) 36px;
}
.azt-footer__grid {
	max-width: 1500px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 34px;
}
.azt-footer__logo {
	display: block;
	height: clamp(48px, 5vw, 68px);
	width: auto;
}
.azt-footer__about {
	margin: 14px 0 0;
	font-size: 13.5px;
	line-height: 1.75;
	font-weight: 300;
	color: rgba(243, 240, 230, 0.66);
}
.azt-footer__contact {
	font-size: 13.5px;
	line-height: 1.9;
	font-weight: 300;
}
.azt-footer__addr {
	margin: 0 0 8px;
	color: rgba(243, 240, 230, 0.66);
}
.azt-footer__contact a,
.azt-footer__todo {
	display: block;
	color: #f3f0e6;
	text-decoration: none;
}
.azt-footer__contact a:hover {
	color: #ddf49f;
}
.azt-footer__todo {
	color: #ddf49f;
}
.azt-footer__links {
	display: flex;
	flex-direction: column;
	gap: 9px;
	align-items: flex-start;
}
.azt-footer__links a {
	font-size: 13px;
	color: rgba(243, 240, 230, 0.66);
	text-decoration: none;
	transition: color 0.2s ease;
}
.azt-footer__links a:hover {
	color: #ddf49f;
}
.azt-footer__social {
	display: flex;
	gap: 9px;
	align-items: flex-start;
}
.azt-footer__social a,
.azt-footer__social span {
	width: 42px;
	height: 42px;
	border: 1px solid rgba(243, 240, 230, 0.16);
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(243, 240, 230, 0.66);
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease;
}
.azt-footer__social svg {
	width: 19px;
	height: 19px;
	display: block;
}
.azt-footer__social a:hover,
.azt-footer__social a:focus-visible {
	color: #ddf49f;
	border-color: #ddf49f;
}
.azt-footer__bottom {
	max-width: 1500px;
	margin: clamp(36px, 5vw, 60px) auto 0;
	padding-top: 22px;
	border-top: 1px solid rgba(243, 240, 230, 0.16);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 24px;
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(243, 240, 230, 0.42);
}
.azt-footer__credit a {
	color: #ddf49f;
	text-decoration: none;
}
.azt-footer__credit a:hover {
	text-decoration: underline;
}
