/* ============================================================
   Audrey Header Footer — v2.0 — Frontend CSS
   Auteur : Julien Laboé
   ============================================================ */

/* --- Reset partiel ----------------------------------------- */
.ahf-site-header *,
.ahf-site-footer * {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.ahf-site-header {
	position: relative;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	background: var(--ahf-header-bg);
	/* border-bottom gérée via CSS dynamique */
}

/* Sticky */
body.ahf-sticky-enabled .ahf-site-header {
	position: sticky;
	transition: box-shadow .3s ease;
}
body.ahf-sticky-enabled .ahf-site-header.is-scrolled {
	box-shadow: 0 2px 24px rgba(0, 0, 0, .07);
}

/* Conteneur global */
.ahf-container {
	width: min(calc(100% - 56px), var(--ahf-container-width));
	margin: 0 auto;
}

/* Inner header : 3 colonnes — logo | nav | actions */
.ahf-header-inner {
	min-height: var(--ahf-header-height);
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0 40px;
	padding-top: var(--ahf-header-pt, 0px);
	padding-bottom: var(--ahf-header-pb, 0px);
	padding-left: var(--ahf-header-px, 0px);
	padding-right: var(--ahf-header-px, 0px);
}

/* --- Logo -------------------------------------------------- */
.ahf-brand { display: flex; align-items: center; }
.ahf-brand-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--ahf-header-text);
}
.ahf-logo {
	display: block;
	width: auto;
	height: auto;
	max-height: var(--ahf-logo-max-h);
	max-width: 200px;
	object-fit: contain;
}
.ahf-logo-mobile { display: none; }

/* Texte marque (fallback sans logo) */
.ahf-brand-text-wrap {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.ahf-brand-title {
	font-family: var(--ahf-font-brand);
	font-size: var(--ahf-brand-size);
	font-weight: 600;
	line-height: 1.15;
	color: var(--ahf-header-text);
}
.ahf-brand-baseline {
	font-family: var(--ahf-font-nav);
	font-size: var(--ahf-baseline-size);
	letter-spacing: .06em;
	text-transform: uppercase;
	opacity: .6;
	color: var(--ahf-header-text);
}

/* --- Navigation desktop ------------------------------------ */
.ahf-main-nav {
	display: flex;
	justify-content: center;
	align-items: center;
}
.ahf-nav-list {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0 42px;
}
.ahf-nav-list li { position: relative; }
.ahf-nav-list > li > a {
	font-family: var(--ahf-font-nav);
	font-size: var(--ahf-nav-size);
	font-weight: var(--ahf-nav-weight);
	color: var(--ahf-header-text);
	text-decoration: none;
	line-height: 1.3;
	letter-spacing: .01em;
	display: inline-block;
	padding: 4px 0;
	position: relative;
	transition: color .22s ease;
}
/* Underline animé au hover */
.ahf-nav-list > li > a::after {
	content: '';
	position: absolute;
	left: 0; bottom: -2px;
	width: 0; height: 1.5px;
	background: var(--ahf-header-hover);
	transition: width .26s ease;
}
.ahf-nav-list > li > a:hover,
.ahf-nav-list .current-menu-item > a,
.ahf-nav-list .current_page_item > a {
	color: var(--ahf-header-hover);
}
.ahf-nav-list > li > a:hover::after,
.ahf-nav-list .current-menu-item > a::after,
.ahf-nav-list .current_page_item > a::after {
	width: 100%;
}

/* Sous-menus (depth 2) */
.ahf-nav-list .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% + 10px);
	left: 50%;
	transform: translateX(-50%);
	min-width: 200px;
	background: var(--ahf-header-bg);
	box-shadow: 0 8px 32px rgba(0,0,0,.10);
	border-radius: 8px;
	padding: 8px 0;
	list-style: none;
	z-index: 100;
}
.ahf-nav-list li:hover > .sub-menu { display: block; }
.ahf-nav-list .sub-menu li a {
	font-family: var(--ahf-font-nav);
	font-size: 14px;
	color: var(--ahf-header-text);
	text-decoration: none;
	display: block;
	padding: 10px 18px;
	transition: color .18s ease, background .18s ease;
}
.ahf-nav-list .sub-menu li a:hover {
	color: var(--ahf-header-hover);
	background: rgba(0,0,0,.04);
}

/* --- Actions header (socials + CTA + hamburger) ------------ */
.ahf-header-actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

/* Socials header */
.ahf-socials { display: flex; align-items: center; gap: var(--ahf-social-gap, 10px); }
.ahf-social-link {
	width: var(--ahf-social-btn-size, 36px);
	height: var(--ahf-social-btn-size, 36px);
	display: inline-flex; align-items: center; justify-content: center;
	background: transparent;
	border: none !important;
	outline: none !important;
	border-radius: 50%;
	color: var(--ahf-header-text);
	text-decoration: none;
	transition: color .2s ease, transform .2s ease, background .2s ease;
}
.ahf-social-link svg {
	width: var(--ahf-social-icon-size, 20px);
	height: var(--ahf-social-icon-size, 20px);
	fill: currentColor;
	pointer-events: none;
}
.ahf-social-link:hover {
	color: var(--ahf-header-hover);
	transform: translateY(-2px);
}

/* CTA header */
.ahf-header-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	height: 40px;
	padding: 0 22px;
	background: var(--ahf-btn-bg);
	color: var(--ahf-btn-text);
	border: 1.5px solid var(--ahf-btn-border);
	border-radius: var(--ahf-btn-radius);
	font-family: var(--ahf-font-nav);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .04em;
	white-space: nowrap;
	box-shadow: none;
	outline: none;
	-webkit-appearance: none;
	transition: background .22s ease, color .22s ease, border-color .22s ease, transform .18s ease;
}
.ahf-header-cta:hover {
	background: var(--ahf-accent);
	border-color: var(--ahf-accent);
	color: #fff;
	transform: translateY(-1px);
}
/* Jamais de border rouge/rose WP sur les liens */
.ahf-site-header a:focus,
.ahf-site-header a:active,
.ahf-site-header button:focus,
.ahf-site-header button:active {
	outline: 2px solid var(--ahf-header-hover);
	outline-offset: 2px;
	box-shadow: none !important;
}

/* --- Hamburger : CACHÉ sur desktop, visible uniquement mobile --- */
.ahf-site-header .ahf-mobile-toggle {
	display: none !important; /* masqué desktop — forcé contre Hello Elementor */
	border: 0;
	background: transparent;
	padding: 8px;
	cursor: pointer;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
}
.ahf-mobile-toggle {
	display: none !important;
}
.ahf-mobile-toggle span {
	display: block;
	width: 26px; height: 2px;
	background: var(--ahf-header-text);
	border-radius: 2px;
	transition: transform .24s ease, opacity .24s ease, width .24s ease;
}
.ahf-mobile-toggle.is-open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.ahf-mobile-toggle.is-open span:nth-child(2) {
	opacity: 0; width: 0;
}
.ahf-mobile-toggle.is-open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   MENU MOBILE (panel slide-in)
   ============================================================ */
.ahf-mobile-panel {
	position: fixed;
	top: 0; right: 0;
	width: min(92vw, 360px);
	height: 100dvh;
	background: var(--ahf-header-bg);
	box-shadow: -6px 0 40px rgba(0,0,0,.14);
	z-index: 10001;
	transform: translateX(100%);
	transition: transform .32s cubic-bezier(.4,0,.2,1);
}
.ahf-mobile-panel:not([hidden]) { transform: translateX(0); }
.ahf-mobile-panel[hidden] { display: block !important; } /* on gère via transform */

.ahf-mobile-panel-inner {
	display: flex; flex-direction: column;
	height: 100%;
	padding: 28px 28px 32px;
	overflow-y: auto;
}
.ahf-mobile-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 32px;
}
.ahf-mobile-brand {
	font-family: var(--ahf-font-brand);
	font-size: 18px;
	font-weight: 600;
	color: var(--ahf-header-text);
}
.ahf-mobile-close {
	border: 0;
	background: transparent;
	padding: 4px;
	cursor: pointer;
	color: var(--ahf-header-text);
	opacity: .7;
	transition: opacity .2s;
}
.ahf-mobile-close:hover { opacity: 1; }
.ahf-mobile-close svg { stroke-width: 1.8; }

/* Nav mobile */
.ahf-mobile-nav .ahf-nav-list {
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
}
.ahf-mobile-nav .ahf-nav-list > li { width: 100%; }
.ahf-mobile-nav .ahf-nav-list > li > a {
	font-family: var(--ahf-font-nav);
	font-size: var(--ahf-nav-size);
	font-weight: 500;
	color: var(--ahf-header-text);
	text-decoration: none;
	display: block;
	padding: 14px 0;
	border-bottom: 1px solid rgba(0,0,0,.07);
	transition: color .2s ease, padding-left .2s ease;
}
.ahf-mobile-nav .ahf-nav-list > li > a::after { display: none; }
.ahf-mobile-nav .ahf-nav-list > li > a:hover {
	color: var(--ahf-header-hover);
	padding-left: 6px;
}
.ahf-mobile-nav .ahf-nav-list .sub-menu {
	display: block;
	position: static;
	transform: none;
	box-shadow: none;
	background: transparent;
	border-radius: 0;
	padding: 0 0 0 16px;
}
.ahf-mobile-nav .ahf-nav-list .sub-menu li a {
	font-size: 14px;
	padding: 10px 0;
	color: var(--ahf-header-text);
	opacity: .75;
}

/* CTA mobile */
.ahf-mobile-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 28px;
	height: 48px;
	background: var(--ahf-btn-bg);
	color: var(--ahf-btn-text);
	border: 1.5px solid var(--ahf-btn-border);
	border-radius: var(--ahf-btn-radius);
	font-family: var(--ahf-font-nav);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	letter-spacing: .04em;
	transition: background .22s ease, color .22s ease;
}
.ahf-mobile-cta:hover {
	background: var(--ahf-accent);
	border-color: var(--ahf-accent);
	color: #fff;
}

.ahf-mobile-panel .ahf-socials {
	margin-top: 28px;
	justify-content: flex-start;
}

/* Overlay */
.ahf-mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.4);
	z-index: 10000;
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity .32s ease;
}
.ahf-mobile-overlay:not([hidden]) { opacity: 1; }
.ahf-mobile-overlay[hidden] { display: block !important; pointer-events: none; }

body.ahf-mobile-open { overflow: hidden; }

/* ============================================================
   FOOTER
   ============================================================ */
.ahf-footer-wave {
	display: block;
	line-height: 0;
	overflow: hidden;
	height: 48px;
	background: var(--ahf-footer-bg); /* fallback */
}
/* La vague est optionnelle, si on préfère une transition nette on peut la cacher */

.ahf-site-footer {
	background: var(--ahf-footer-bg);
	color: var(--ahf-footer-text);
	font-family: var(--ahf-font-footer);
	font-size: var(--ahf-footer-font-size);
	margin-top: 64px;
}

.ahf-footer-body { padding: 64px 0 40px; }

/* Grid footer 4 colonnes */
.ahf-footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 48px;
	align-items: start;
}

/* Col brand */
.ahf-footer-logo-wrap { margin-bottom: 18px; }
.ahf-footer-logo-img {
	max-height: 80px;
	max-width: 160px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}
.ahf-footer-brand-name {
	font-family: var(--ahf-font-brand);
	font-size: 22px;
	font-weight: 600;
	color: var(--ahf-footer-text);
}
.ahf-footer-tagline {
	font-family: var(--ahf-font-brand);
	font-size: 15px;
	font-style: italic;
	color: var(--ahf-footer-text);
	line-height: 1.5;
	margin-bottom: 12px;
	opacity: .9;
}
.ahf-footer-desc {
	font-size: var(--ahf-footer-font-size);
	color: var(--ahf-footer-muted);
	line-height: 1.75;
	margin-bottom: 22px;
}

/* Socials footer */
.ahf-socials-footer { margin-top: 18px; }
.ahf-socials-footer .ahf-social-link {
	width: 36px; height: 36px;
	background: rgba(255,255,255,.09);
	border: 1px solid rgba(255,255,255,.16);
	border-radius: 50%;
	color: var(--ahf-footer-text);
}
.ahf-socials-footer .ahf-social-link:hover {
	background: var(--ahf-accent);
	border-color: var(--ahf-accent);
	color: #fff;
	transform: translateY(-2px);
}

/* Titres de colonnes footer */
.ahf-footer-col-title {
	font-family: var(--ahf-font-brand);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ahf-accent);
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.ahf-footer-col-title::after {
	content: '';
	flex: 1;
	height: 1px;
	background: rgba(255,255,255,.12);
}

/* Nav footer — aligné à gauche */
.ahf-footer-nav .ahf-nav-list,
.ahf-footer-nav .ahf-nav-footer {
	list-style: none;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 10px;
}
.ahf-footer-nav .ahf-nav-list a,
.ahf-footer-nav .ahf-nav-footer a {
	font-family: var(--ahf-font-footer);
	font-size: var(--ahf-footer-font-size);
	color: var(--ahf-footer-muted);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: color .2s ease, padding-left .2s ease;
}
.ahf-footer-nav .ahf-nav-list a::before,
.ahf-footer-nav .ahf-nav-footer a::before {
	content: '→';
	font-size: 11px;
	opacity: 0;
	transform: translateX(-4px);
	transition: opacity .2s ease, transform .2s ease;
}
.ahf-footer-nav .ahf-nav-list a:hover,
.ahf-footer-nav .ahf-nav-footer a:hover {
	color: var(--ahf-footer-text);
	padding-left: 4px;
}
.ahf-footer-nav .ahf-nav-list a:hover::before,
.ahf-footer-nav .ahf-nav-footer a:hover::before {
	opacity: 1;
	transform: translateX(0);
}

/* Contact list */
.ahf-contact-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.ahf-contact-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--ahf-footer-muted);
	font-size: var(--ahf-footer-font-size);
	line-height: 1.55;
}
.ahf-contact-icon {
	width: 16px; height: 16px;
	flex-shrink: 0;
	margin-top: 2px;
	opacity: .6;
}
.ahf-contact-icon svg { width: 16px; height: 16px; }
.ahf-contact-item a {
	color: var(--ahf-footer-muted);
	text-decoration: none;
	transition: color .2s ease;
}
.ahf-contact-item a:hover { color: var(--ahf-footer-text); }

/* CTA footer */
.ahf-footer-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	height: 42px;
	padding: 0 22px;
	background: transparent;
	color: var(--ahf-footer-text);
	border: 1.5px solid rgba(255,255,255,.35);
	border-radius: var(--ahf-btn-radius);
	font-family: var(--ahf-font-nav);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: .05em;
	text-decoration: none;
	transition: background .22s ease, border-color .22s ease, color .22s ease;
}
.ahf-footer-cta:hover {
	background: var(--ahf-accent);
	border-color: var(--ahf-accent);
	color: #fff;
}
.ahf-cta-arrow { transition: transform .22s ease; }
.ahf-footer-cta:hover .ahf-cta-arrow { transform: translateX(3px); }

/* Badge artisan */
.ahf-footer-badge {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 24px;
	opacity: .65;
	font-size: 12px;
	color: var(--ahf-footer-muted);
	letter-spacing: .04em;
}

/* Bottom bar */
.ahf-footer-bottom {
	border-top: 1px solid rgba(255,255,255,.10);
	padding: 20px 0;
}
.ahf-footer-bottom-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.ahf-footer-copyright {
	font-size: 13px;
	color: var(--ahf-footer-muted);
	opacity: .7;
}
.ahf-footer-legal {
	display: flex;
	gap: 24px;
}
.ahf-footer-legal a {
	font-size: 13px;
	color: var(--ahf-footer-muted);
	text-decoration: none;
	opacity: .7;
	transition: opacity .2s ease;
}
.ahf-footer-legal a:hover { opacity: 1; }

/* ============================================================
   RESPONSIVENESS — tablette 980–1180px
   ============================================================ */
@media (max-width: 1180px) {
	.ahf-header-inner { gap: 0 24px; }
	.ahf-nav-list { gap: 0 26px; }
	.ahf-footer-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
	.ahf-footer-col-cta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
	.ahf-footer-col-cta .ahf-footer-badge { margin-top: 0; align-self: center; }
}

@media (max-width: 980px) {
	/* Hamburger visible à partir de 980px */
	.ahf-site-header .ahf-mobile-toggle,
	.ahf-mobile-toggle { display: flex !important; }
	/* Nav + CTA header + socials header masqués */
	.ahf-main-nav { display: none !important; }
	.ahf-header-actions .ahf-socials { display: none; }
	.ahf-header-actions .ahf-header-cta { display: none; }

	.ahf-header-inner {
		grid-template-columns: 1fr auto;
		min-height: 80px;
	}
	.ahf-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 767px) {
	.ahf-container { width: min(calc(100% - 32px), var(--ahf-container-width)); }

	/* Logo mobile */
	.ahf-logo-desktop { display: none; }
	.ahf-logo-mobile { display: block; }

	.ahf-footer-grid { grid-template-columns: 1fr; gap: 32px; }
	.ahf-footer-body { padding: 48px 0 32px; }
	.ahf-footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
	.ahf-footer-col-cta { grid-column: auto; flex-direction: column; }
	.ahf-site-footer { margin-top: 40px; }
}

/* Élimination padding top si injection auto active */
body.ahf-auto-enabled { padding-top: 0 !important; }
