/*
Theme Name: Éco'novalis
Theme URI: https://econovalis.fr
Author: Éco'novalis
Author URI: https://econovalis.fr
Description: Thème personnalisé Éco'novalis – Expert en rénovation énergétique
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: econovalis
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', 'Open Sans', sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ===== VARIABLES ===== */
:root {
  --eco-green: #2d7a3a;
  --eco-green-dark: #1e5628;
  --eco-green-light: #3da14d;
  --eco-accent: #f5a623;
  --eco-white: #ffffff;
  --eco-bg-light: #f7faf7;
  --eco-text: #1a1a1a;
  --eco-text-light: #555;
  --header-height: 80px;
}

/* ===== HEADER ===== */
#eco-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: #ffffff;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  z-index: 9999;
  display: flex;
  align-items: center;
}

.eco-header-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* Logo */
.eco-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.eco-logo img {
  height: 40px;
  width: auto;
}
.eco-logo-tagline {
  font-size: 0.78rem;
  color: var(--eco-text-light);
  font-style: italic;
  white-space: nowrap;
}

/* Nav */
.eco-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.eco-nav li {
  position: relative;
}
.eco-nav > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--eco-text);
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.eco-nav > li > a:hover,
.eco-nav > li.current-menu-item > a,
.eco-nav > li.current-menu-ancestor > a {
  color: var(--eco-green);
  background: rgba(45, 122, 58, 0.07);
}
.eco-nav > li > a .eco-chevron {
  font-size: 0.6rem;
  transition: transform 0.2s;
}
.eco-nav > li:hover > a .eco-chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.eco-nav .eco-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 8px;
  min-width: 220px;
  list-style: none;
  z-index: 100;
  border: 1px solid rgba(0,0,0,0.06);
}
.eco-nav li:hover > .eco-dropdown { display: block; }
.eco-dropdown li a {
  display: block;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--eco-text);
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.eco-dropdown li a:hover {
  background: var(--eco-bg-light);
  color: var(--eco-green);
}

/* CTA Button */
.eco-header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--eco-accent);
  color: #fff;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.4);
}
.eco-header-cta:hover {
  background: #d4890a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 166, 35, 0.5);
}

/* Hamburger mobile */
.eco-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.eco-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--eco-text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Mobile menu */
.eco-mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 20px;
  z-index: 9998;
}
.eco-mobile-menu.open { display: block; }
.eco-mobile-menu ul { list-style: none; }
.eco-mobile-menu ul li a {
  display: block;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--eco-text);
  border-radius: 8px;
  transition: background 0.15s;
}
.eco-mobile-menu ul li a:hover { background: var(--eco-bg-light); color: var(--eco-green); }
.eco-mobile-menu .eco-mobile-sub { padding-left: 16px; }
.eco-mobile-menu .eco-mobile-cta {
  display: block;
  margin-top: 16px;
  padding: 14px;
  background: var(--eco-accent);
  color: #fff;
  text-align: center;
  border-radius: 12px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* ===== MAIN CONTENT ===== */
#eco-content {
  min-height: 60vh;
}

/* ===== FOOTER ===== */
#eco-footer {
  background: var(--eco-green-dark);
  color: rgba(255,255,255,0.85);
  padding: 60px 5vw 30px;
}
.eco-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.eco-footer-brand img { height: 40px; margin-bottom: 14px; }
.eco-footer-brand p { font-size: 0.88rem; color: rgba(255,255,255,0.6); line-height: 1.7; margin-bottom: 20px; }
.eco-footer-socials { display: flex; gap: 10px; }
.eco-footer-socials a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.eco-footer-socials a:hover { background: var(--eco-accent); }
.eco-footer-col h4 {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 16px;
}
.eco-footer-col ul { list-style: none; }
.eco-footer-col ul li { margin-bottom: 10px; }
.eco-footer-col ul li a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.eco-footer-col ul li a:hover { color: var(--eco-accent); }
.eco-footer-col .eco-footer-contact-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.85rem; color: rgba(255,255,255,0.6);
  margin-bottom: 12px;
}
.eco-footer-contact-item span:first-child { font-size: 1rem; flex-shrink: 0; }
.eco-footer-bottom {
  max-width: 1200px;
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.eco-footer-bottom a { color: rgba(255,255,255,0.4); transition: color 0.2s; }
.eco-footer-bottom a:hover { color: var(--eco-accent); }
.eco-footer-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.eco-footer-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem; font-weight: 700;
  color: rgba(255,255,255,0.5);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .eco-header-inner { padding: 0 24px; }
  .eco-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .eco-nav, .eco-logo-tagline, .eco-header-cta { display: none; }
  .eco-hamburger { display: flex; }
  .eco-footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .eco-footer-bottom { flex-direction: column; text-align: center; }
}

/* === LOGO AJUSTEMENTS === */
.eco-logo img,
.eco-logo .custom-logo {
  height: 40px !important;
  width: auto !important;
  max-height: 40px !important;
  object-fit: contain !important;
  display: block !important;
  vertical-align: middle !important;
}
.eco-logo a {
  display: flex !important;
  align-items: center !important;
  line-height: 1 !important;
}
/* Forcer header à ne pas déborder */
#eco-header {
  overflow: visible;
}
.eco-header-inner {
  height: var(--header-height);
  overflow: visible;
}

/* === LOGO STRICT === */
#eco-header .eco-logo,
#eco-header .eco-logo a {
  display: flex !important;
  align-items: center !important;
  height: 60px !important;
  max-height: 60px !important;
  overflow: hidden !important;
}
#eco-header .eco-logo img,
#eco-header .eco-logo .custom-logo,
#eco-header .eco-logo .custom-logo-link img {
  height: 50px !important;
  width: auto !important;
  max-height: 50px !important;
  max-width: 180px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
}
#eco-header .eco-logo .custom-logo-link {
  display: flex !important;
  align-items: center !important;
  height: 50px !important;
  overflow: hidden !important;
}
