/*!
 * ER Chauffage - Header & footer globaux ([er_chauffage_header] / [er_chauffage_footer]).
 * Toutes les règles sont scopées sous .erh-site-header / .erh-site-footer / .erh-mobile-menu.
 */

@font-face {
	font-family: "ERH Inter";
	src: url("../fonts/inter-latin-var.woff2") format("woff2-variations"),
		url("../fonts/inter-latin-var.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

.erh-site-header,
.erh-site-footer,
.erh-mobile-menu {
	--erh-primary: #45B8AE;
	--erh-primary-light: #65C8BE;
	--erh-primary-dark: #278F87;
	--erh-primary-ink: #1E7770;
	--erh-cta: #218078;      /* turquoise lisible avec texte blanc (4,75:1) */
	--erh-cta-hover: #17655F;
	--erh-dark: #14232D;
	--erh-text: #162536;
	--erh-muted: #5B6676;
	--erh-topbar: #F4F8F8;
	--erh-line: #E4ECEC;
	font-family: "ERH Inter", Inter, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.erh-site-header *, .erh-site-header *::before, .erh-site-header *::after,
.erh-mobile-menu *, .erh-mobile-menu *::before, .erh-mobile-menu *::after,
.erh-site-footer *, .erh-site-footer *::before, .erh-site-footer *::after { box-sizing: border-box; }
.erh-site-header ul, .erh-site-footer ul, .erh-mobile-menu ul { margin: 0; padding: 0; list-style: none; }
.erh-site-header p, .erh-site-footer p, .erh-mobile-menu p { margin: 0; }
.erh-site-header a, .erh-site-footer a, .erh-mobile-menu a { text-decoration: none; transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
.erh-site-header svg, .erh-site-footer svg, .erh-mobile-menu svg { display: inline-block; flex-shrink: 0; }
.erh-site-header img, .erh-site-footer img, .erh-mobile-menu img { max-width: 100%; height: auto; }
.erh-site-header :focus-visible, .erh-site-footer :focus-visible, .erh-mobile-menu :focus-visible { outline: 3px solid var(--erh-primary-dark); outline-offset: 3px; border-radius: 6px; }
.erh-site-footer :focus-visible { outline-color: var(--erh-primary-light); }
.erh-site-header .erh-sr-only, .erh-site-footer .erh-sr-only, .erh-mobile-menu .erh-sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.erh-layout-container { width: 100%; max-width: 1248px; margin: 0 auto; padding: 0 24px; }
/* Header : conteneur plus large pour loger logo + 6 liens + téléphone + bouton sur une ligne */
.erh-site-header .erh-layout-container { max-width: 1440px; padding: 0 32px; }

/* Lien d'évitement (clavier) */
.erh-site-header .erh-skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 10001;
	padding: 10px 16px;
	border-radius: 10px;
	background: var(--erh-dark);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}
.erh-site-header .erh-skip-link:focus { top: 12px; }

/* Conteneurs Elementor qui accueillent les shortcodes (header/footer/pages) : on retire leur
 * padding par défaut (10 px) qui créait un espace entre le header et la première section. */
.e-con:has(.erh-site-header),
.e-con:has(.erh-site-footer),
.e-con:has(.erh-home),
.e-con:has(.erh-about),
.e-con:has(.erh-services-page),
.e-con:has(.erh-contact-page) {
	--padding-top: 0px;
	--padding-bottom: 0px;
	--padding-left: 0px;
	--padding-right: 0px;
	padding: 0 !important;
}

/* =====================================================================
 * HEADER — barre supérieure
 * =================================================================== */
.erh-site-header { position: relative; z-index: 999; }
.erh-topbar { background: var(--erh-topbar); border-bottom: 1px solid var(--erh-line); }
.erh-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 42px; }
.erh-topbar__zone,
.erh-topbar__hours { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.3; color: var(--erh-muted); white-space: nowrap; }
.erh-topbar__zone { min-width: 0; }
.erh-topbar__zone svg,
.erh-topbar__hours svg { color: var(--erh-primary-ink); }
.erh-topbar__main { font-weight: 600; color: var(--erh-text); }
.erh-topbar__sub { overflow: hidden; text-overflow: ellipsis; }
.erh-topbar__hours { margin-left: auto; }
.erh-topbar__sep { display: inline-block; width: 1px; height: 14px; margin: 0 6px; background: #C9D5D8; }

.erh-social { display: flex; align-items: center; gap: 6px; }
.erh-social a {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	color: var(--erh-primary-ink);
}
.erh-social a:hover { background: #E3F3F1; color: var(--erh-primary-ink); }

/* =====================================================================
 * HEADER — barre principale
 * =================================================================== */
.erh-mainbar { background: #fff; border-bottom: 1px solid rgba(16, 24, 40, .06); }
.erh-mainbar__inner { display: flex; align-items: center; gap: 28px; min-height: 96px; transition: min-height .25s ease; }

.erh-brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; color: var(--erh-dark); }
.erh-brand:hover { color: var(--erh-dark); }
.erh-brand__img { display: block; width: auto; max-width: 240px; max-height: 52px; object-fit: contain; }
.erh-brand__mark { display: inline-flex; color: var(--erh-primary); }
.erh-brand__mark svg { width: 44px; height: 34px; }
.erh-brand__text { display: flex; flex-direction: column; gap: 3px; }
.erh-brand__name { font-size: 18px; font-weight: 800; line-height: 1.1; letter-spacing: .02em; text-transform: uppercase; }
.erh-brand__sub { font-size: 9.5px; font-weight: 600; line-height: 1.2; letter-spacing: .12em; text-transform: uppercase; color: var(--erh-primary-ink); }

/* Navigation */
.erh-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.erh-nav__list { display: flex; align-items: center; gap: clamp(16px, 1.8vw, 30px); }
.erh-nav__list > li { margin: 0; padding: 0; }
.erh-nav__list > li > a {
	position: relative;
	display: inline-block;
	padding: 10px 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--erh-text);
	white-space: nowrap;
}
.erh-nav__list > li > a::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 2px;
	height: 2px;
	border-radius: 2px;
	background: var(--erh-primary);
	transform: scaleX(0);
	transition: transform .25s ease;
}
.erh-nav__list > li > a:hover { color: var(--erh-primary-ink); }
.erh-nav__list > li > a:hover::after { transform: scaleX(.5); }
.erh-nav__list > .current-menu-item > a,
.erh-nav__list > .current_page_item > a,
.erh-nav__list > li > a[aria-current="page"] { color: var(--erh-primary-ink); font-weight: 600; }
.erh-nav__list > .current-menu-item > a::after,
.erh-nav__list > .current_page_item > a::after,
.erh-nav__list > li > a[aria-current="page"]::after { transform: scaleX(1); }

/* Actions : téléphone + devis */
.erh-mainbar__actions { display: flex; align-items: center; gap: 20px; flex-shrink: 0; margin-left: auto; }
.erh-phone { display: inline-flex; align-items: center; gap: 10px; color: var(--erh-dark); }
.erh-phone:hover { color: var(--erh-primary-ink); }
.erh-phone__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #E8F5F3; color: var(--erh-primary-ink); }
.erh-phone__text { display: flex; flex-direction: column; gap: 2px; }
.erh-phone__label { font-size: 12px; font-weight: 500; line-height: 1.2; color: var(--erh-muted); }
.erh-phone__number { font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap; }

.erh-header-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 24px;
	border-radius: 12px;
	background: var(--erh-cta);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	box-shadow: 0 6px 16px rgba(33, 128, 120, .22);
}
.erh-header-cta:hover { background: var(--erh-cta-hover); color: #fff; }
.erh-header-cta svg { transition: transform .2s ease; }
.erh-header-cta:hover svg { transform: translateX(3px); }

/* Bouton menu (mobile/tablette) — neutralise les styles de boutons du thème */
.erh-site-header button.erh-burger,
.erh-mobile-menu button.erh-mobile-menu__close {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: none;
	place-items: center;
	width: 46px !important;
	height: 46px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--erh-line) !important;
	border-radius: 12px !important;
	background: #fff !important;
	box-shadow: none !important;
	color: var(--erh-dark) !important;
	line-height: 1 !important;
	cursor: pointer;
}
.erh-site-header button.erh-burger:hover,
.erh-mobile-menu button.erh-mobile-menu__close:hover { background: #F2F8F7 !important; color: var(--erh-primary-ink) !important; }
.erh-mobile-menu button.erh-mobile-menu__close { display: grid; }

/* =====================================================================
 * HEADER — sticky (classe posée par layout.js)
 * La barre supérieure défile normalement, la barre principale reste fixée, plus compacte.
 * =================================================================== */
.erh-site-header { --erh-admin-offset: 0px; }
body.admin-bar .erh-site-header { --erh-admin-offset: 32px; }
.erh-site-header.is-stuck .erh-mainbar {
	position: fixed;
	top: var(--erh-admin-offset);
	left: 0;
	right: 0;
	z-index: 999;
	box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
	animation: erh-header-in .3s ease;
}
.erh-site-header.is-stuck .erh-mainbar__inner { min-height: 74px; }
.erh-site-header.is-stuck .erh-brand__img { max-height: 44px; }
@keyframes erh-header-in { from { transform: translateY(-100%); } to { transform: none; } }

/* =====================================================================
 * MENU MOBILE (panneau coulissant)
 * =================================================================== */
.erh-mobile-menu[hidden] { display: none !important; }
.erh-mobile-menu { position: fixed; inset: 0; z-index: 100000; color: var(--erh-text); line-height: 1.5; }
.erh-mobile-menu__overlay { position: absolute; inset: 0; background: rgba(20, 35, 45, .55); opacity: 0; transition: opacity .3s ease; }
.erh-mobile-menu__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(380px, 88vw);
	overflow-y: auto;
	background: #fff;
	box-shadow: -12px 0 40px rgba(16, 24, 40, .18);
	transform: translateX(100%);
	transition: transform .3s ease;
}
.erh-mobile-menu.is-open .erh-mobile-menu__overlay { opacity: 1; }
.erh-mobile-menu.is-open .erh-mobile-menu__panel { transform: none; }
.erh-mobile-menu__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--erh-line); }
.erh-brand--small .erh-brand__name { font-size: 15px; }
.erh-brand--small .erh-brand__sub { font-size: 8px; }
.erh-brand--small .erh-brand__mark svg { width: 36px; height: 28px; }
.erh-brand--small .erh-brand__img { max-height: 40px; }
.erh-mobile-nav { padding: 8px 20px; }
.erh-mobile-nav__list > li > a {
	display: flex;
	align-items: center;
	padding: 15px 4px;
	border-bottom: 1px solid #EEF3F3;
	font-size: 17px;
	font-weight: 600;
	color: var(--erh-text);
}
.erh-mobile-nav__list > li > a:hover { color: var(--erh-primary-ink); }
.erh-mobile-nav__list > .current-menu-item > a,
.erh-mobile-nav__list > .current_page_item > a,
.erh-mobile-nav__list > li > a[aria-current="page"] { color: var(--erh-primary-ink); box-shadow: inset 3px 0 0 var(--erh-primary); padding-left: 14px; }
.erh-mobile-menu__foot { display: grid; gap: 14px; margin-top: auto; padding: 20px; border-top: 1px solid var(--erh-line); background: var(--erh-topbar); }
.erh-phone--block { padding: 10px 12px; border-radius: 12px; background: #fff; }
.erh-header-cta--block { width: 100%; }
.erh-mobile-menu__foot .erh-social { justify-content: center; }
html.erh-menu-open, html.erh-menu-open body { overflow: hidden; }

/* =====================================================================
 * FOOTER compact — A. Newsletter / B. Footer principal (3 colonnes + liens) / C. Barre légale
 * =================================================================== */
/* Repli si un cache sert encore l'ancien HTML : seul le footer natif d'Astra est visé. */
body.erh-no-theme-footer #colophon.site-footer { display: none !important; }
/* Auteur des articles masqué (repli CSS si le thème n'utilise pas le filtre astra_post_author). */
body.erh-hide-author .entry-meta .posted-by,
body.erh-hide-author .entry-meta .byline,
body.erh-hide-author .ast-author-meta,
body.erh-hide-author .ast-single-author-box,
body.erh-hide-author .wp-block-post-author,
body.erh-hide-author .wp-block-post-author-name { display: none !important; }

.erh-site-footer {
	--erh-ft-bg: #0E1A23;
	--erh-ft-line: rgba(255, 255, 255, .08);
	--erh-ft-ico-bg: #13303A;
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	background: var(--erh-ft-bg);
	color: rgba(255, 255, 255, .72);
	font-size: 15px;
	line-height: 1.55;
}
.erh-site-footer .erh-layout-container { max-width: 1280px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- A. Newsletter (une ligne) ---------- */
.erh-ft-nl { padding: 24px 0; border-bottom: 1px solid var(--erh-ft-line); background: rgba(255, 255, 255, .02); }

/* ---------- B. Footer principal ---------- */
.erh-ft-main { padding-top: 40px; padding-bottom: 32px; }
.erh-ft-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 330px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.erh-ft-logo { display: inline-block; margin-bottom: 14px; }
.erh-ft-logo__img { display: block; width: auto; max-width: 200px; max-height: 52px; object-fit: contain; }
.erh-site-footer .erh-ft-name { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: .01em; text-transform: uppercase; color: #fff; }
.erh-ft-name span { color: var(--erh-primary-light); }
.erh-site-footer .erh-ft-sub { margin: 6px 0 0; font-size: 11px; font-weight: 600; line-height: 1.3; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.erh-site-footer .erh-ft-about { max-width: 400px; margin: 14px 0 0; font-size: 14.5px; line-height: 1.65; color: rgba(255, 255, 255, .7); }
.erh-site-footer .erh-social--footer { gap: 10px; margin-top: 18px; }
.erh-social--footer a { width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: #fff; }
.erh-social--footer a svg { width: 18px; height: 18px; }
.erh-social--footer a:hover { border-color: var(--erh-primary); background: var(--erh-primary); color: var(--erh-dark); }

/* Titres de colonnes */
.erh-ft-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.erh-ft-ico {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--erh-ft-ico-bg);
	box-shadow: inset 0 0 0 1px rgba(101, 200, 190, .14);
	color: var(--erh-primary-light);
}
.erh-ft-ico svg { width: 20px; height: 20px; }
.erh-site-footer .erh-ft-title { margin: 0; padding: 0; font-family: inherit; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: 0; text-transform: none; color: #fff; }

/* Carte horaires (compacte) */
.erh-ft-card {
	padding: 24px;
	border: 1px solid rgba(101, 200, 190, .16);
	border-radius: 16px;
	background: rgba(20, 38, 49, .7);
}
.erh-ft-hours { margin: 0; padding: 0; }
.erh-ft-hours__row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--erh-ft-line); font-size: 15px; line-height: 1.35; color: #fff; }
.erh-ft-hours__row:last-child { border-bottom: 0; padding-bottom: 0; }
.erh-ft-hours dt, .erh-ft-hours dd { margin: 0; font-weight: 400; }
.erh-ft-hours dd { white-space: nowrap; color: rgba(255, 255, 255, .85); }
.erh-site-footer .erh-ft-hours dd.erh-ft-hours__urgent { color: #F79009; font-weight: 700; }

/* Informations */
.erh-ft-contact { display: grid; gap: 14px; }
.erh-ft-contact li { display: flex; align-items: center; gap: 14px; margin: 0; }
.erh-ft-contact__label { display: block; font-size: 13px; line-height: 1.3; color: rgba(255, 255, 255, .6); }
.erh-site-footer .erh-ft-contact__value { display: block; font-size: 16px; font-weight: 700; line-height: 1.35; color: #fff; overflow-wrap: anywhere; }
.erh-site-footer a.erh-ft-contact__value:hover { color: var(--erh-primary-light); }

/* Liens rapides : une seule ligne */
.erh-ft-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--erh-ft-line); }
.erh-ft-links__label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--erh-primary-light); }
.erh-site-footer .erh-ft-links__list { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.erh-ft-links__list li { margin: 0; }
.erh-site-footer .erh-ft-links__list a { font-size: 15px; color: rgba(255, 255, 255, .78); }
.erh-site-footer .erh-ft-links__list a:hover,
.erh-site-footer .erh-ft-links__list .current-menu-item > a,
.erh-site-footer .erh-ft-links__list a[aria-current="page"] { color: var(--erh-primary-light); }

/* ---------- C. Barre légale ---------- */
.erh-site-footer__bottom { border-top: 1px solid var(--erh-ft-line); background: rgba(0, 0, 0, .15); }
.erh-site-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 17px; padding-bottom: 17px; font-size: 13.5px; line-height: 1.4; color: rgba(255, 255, 255, .62); }
.erh-site-footer__credit { margin-left: 14px; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .22); white-space: nowrap; }
.erh-site-footer__credit a { color: rgba(255, 255, 255, .85); font-weight: 600; }
.erh-site-footer__credit a:hover { color: var(--erh-primary-light); }
.erh-site-footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
.erh-site-footer__legal li { margin: 0; }
.erh-site-footer__legal li + li::before { content: ""; display: inline-block; width: 1px; height: 13px; margin: 0 16px; vertical-align: -1px; background: rgba(255, 255, 255, .22); }
.erh-site-footer__legal a { color: rgba(255, 255, 255, .7); }
.erh-site-footer__legal a:hover { color: var(--erh-primary-light); }

/* =====================================================================
 * RESPONSIVE
 * =================================================================== */
@media (max-width: 1360px) {
	.erh-mainbar__inner { gap: 20px; }
	.erh-nav__list { gap: 16px; }
	.erh-topbar__sub { display: none; }
	.erh-topbar__zone .erh-topbar__sep { display: none; }
}

/* Tablette : navigation repliée dans le menu, téléphone + devis conservés */
@media (max-width: 1280px) {
	.erh-site-header .erh-layout-container { padding: 0 24px; }
	.erh-nav { display: none; }
	.erh-site-header button.erh-burger { display: grid; }
	.erh-phone__label { display: none; } /* « Une question ? » masqué sur tablette */
	.erh-mainbar__actions { gap: 14px; }
	.erh-mainbar__inner { min-height: 84px; }
}
/* Petite tablette : téléphone en icône seule */
@media (max-width: 900px) {
	.erh-mainbar__actions > .erh-phone .erh-phone__text { display: none; }
	.erh-mainbar__actions > .erh-phone .erh-phone__icon { width: 46px; height: 46px; }
}
@media (max-width: 1100px) {
	.erh-ft-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
	.erh-ft-brand { grid-column: 1 / -1; }
	.erh-site-footer .erh-ft-about { max-width: 640px; }
}

@media (max-width: 782px) {
	body.admin-bar .erh-site-header { --erh-admin-offset: 46px; }
}

/* Mobile : logo + icône téléphone + menu */
@media (max-width: 767px) {
	.erh-layout-container { padding: 0 16px; }
	.erh-topbar { display: none; }
	.erh-mainbar__inner,
	.erh-site-header.is-stuck .erh-mainbar__inner { min-height: 70px; gap: 12px; }
	.erh-brand__name { font-size: 15px; }
	.erh-brand__sub { font-size: 8px; letter-spacing: .12em; }
	.erh-brand__mark svg { width: 36px; height: 28px; }
	.erh-brand__img { max-height: 42px; }
	.erh-mainbar__actions { gap: 10px; }
	.erh-mainbar__actions > .erh-header-cta { display: none; } /* repris dans le menu */
	.erh-mainbar__actions > .erh-phone .erh-phone__text { display: none; }
	.erh-mainbar__actions > .erh-phone .erh-phone__icon { width: 46px; height: 46px; }
	.erh-site-header .erh-layout-container { padding: 0 16px; }

	.erh-ft-nl { padding: 24px 0; }
	.erh-ft-main { padding-top: 32px; padding-bottom: 24px; }
	.erh-ft-top { grid-template-columns: 1fr; gap: 28px; }
	.erh-ft-card { padding: 20px; }
	.erh-ft-links { align-items: flex-start; flex-direction: column; gap: 10px; margin-top: 24px; }
	.erh-site-footer .erh-ft-links__list { gap: 8px 20px; }
	.erh-site-footer__bottom-inner { flex-direction: column; align-items: flex-start; padding-top: 16px; padding-bottom: 16px; }
	.erh-site-footer__legal li + li::before { margin: 0 12px; }
	.erh-site-footer__credit { display: block; margin: 4px 0 0; padding: 0; border: 0; }
}

@media (max-width: 600px) {
	body.admin-bar .erh-site-header.is-stuck { --erh-admin-offset: 0px; } /* barre admin non fixe sur petit mobile */
}

@media (prefers-reduced-motion: reduce) {
	.erh-site-header *, .erh-mobile-menu *, .erh-site-footer * { transition: none !important; animation: none !important; }
}
