/* ============================================
   ESBTech Header – Custom Styles
   Applied via Ecomall Child Theme
   ============================================ */

:root {
  --esb-blue: #1565C0;
  --esb-blue-dark: #0D47A1;
  --esb-blue-mid: #1976D2;
  --esb-blue-light: #E3F2FD;
  --esb-accent: #FF6D00;
  --esb-accent-dark: #E65100;
  --esb-cta: #00897B;
  --esb-cta-dark: #00695C;
  --esb-white: #ffffff;
  --esb-gray: #F5F7FA;
  --esb-border: #E0E6EF;
  --esb-text: #1A2340;
  --esb-muted: #5A6A85;
  --esb-radius: 6px;
}

/* ── TOP BAR ── */
.esb-topbar {
  background: var(--esb-blue-dark);
  color: rgba(255,255,255,.85);
  font-size: 12px;
  padding: 6px 0;
  line-height: 1.4;
}
.esb-topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.esb-topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.esb-topbar-left span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,.85);
}
.esb-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.esb-topbar-right a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  transition: color .2s;
}
.esb-topbar-right a:hover { color: #fff; }
.esb-topbar-sep { opacity: .35; }
.esb-topbar i {
  font-size: 13px;
  vertical-align: -1px;
}

/* ── NAV OVERRIDE – couleurs bleues ESBTech ── */
.ts-header .header-bottom {
  background: var(--esb-blue) !important;
  border-bottom: 1px solid var(--esb-blue-dark) !important;
}
.ts-header .header-middle {
  background: var(--esb-white) !important;
  border-bottom: 1px solid var(--esb-border) !important;
  box-shadow: none !important;
}
.ts-header .header-top {
  background: var(--esb-blue-dark) !important;
  border-bottom: none !important;
}

/* Nav links */
.ts-header .header-bottom .main-menu > ul > li > a,
.ts-header .header-bottom .main-menu > ul > li > span {
  color: rgba(255,255,255,.88) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  padding: 13px 14px !important;
  border-bottom: 2px solid transparent !important;
  transition: color .2s, border-color .2s !important;
}
.ts-header .header-bottom .main-menu > ul > li:hover > a,
.ts-header .header-bottom .main-menu > ul > li.current-menu-item > a {
  color: #fff !important;
  border-bottom-color: rgba(255,255,255,.55) !important;
  background: transparent !important;
}

/* ── CONFIGURATEUR – bouton orange ── */
.ts-header .header-bottom .main-menu > ul > li.menu-item-configurateur > a,
.ts-header .header-bottom .main-menu > ul > li.esb-configurateur > a {
  background: var(--esb-accent) !important;
  color: #fff !important;
  border-radius: var(--esb-radius) !important;
  margin: 7px 4px !important;
  padding: 7px 14px !important;
  border-bottom: none !important;
  font-weight: 500 !important;
  transition: background .2s !important;
}
.ts-header .header-bottom .main-menu > ul > li.menu-item-configurateur > a:hover,
.ts-header .header-bottom .main-menu > ul > li.esb-configurateur > a:hover {
  background: var(--esb-accent-dark) !important;
}

/* ── DEVIS – bouton vert teal ── */
.ts-header .header-bottom .main-menu > ul > li.menu-item-devis > a,
.ts-header .header-bottom .main-menu > ul > li.esb-devis > a {
  background: var(--esb-cta) !important;
  color: #fff !important;
  border-radius: var(--esb-radius) !important;
  margin: 7px 4px !important;
  padding: 7px 14px !important;
  border-bottom: none !important;
  font-weight: 500 !important;
  transition: background .2s !important;
}
.ts-header .header-bottom .main-menu > ul > li.menu-item-devis > a:hover,
.ts-header .header-bottom .main-menu > ul > li.esb-devis > a:hover {
  background: var(--esb-cta-dark) !important;
}

/* ── OFFRES & PROMOS – jaune doré ── */
.ts-header .header-bottom .main-menu > ul > li.menu-item-offres > a,
.ts-header .header-bottom .main-menu > ul > li.esb-offres > a {
  color: #FFD54F !important;
}
.ts-header .header-bottom .main-menu > ul > li.menu-item-offres > a:hover,
.ts-header .header-bottom .main-menu > ul > li.esb-offres > a:hover {
  color: #FFEA70 !important;
}

/* ── LOGO area ── */
.ts-header .logo-wrapper a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.esb-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--esb-blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.esb-logo-icon span {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.3px;
  font-family: inherit;
}

/* ── ESB NAV BAR – icônes devant les liens ── */
.esb-nav-icon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: middle;
}
.esb-nav-icon i {
  font-size: 14px;
  vertical-align: -1px;
  opacity: .85;
}

/* ── MOBILE IMPROVEMENTS ── */
.ts-header .ts-mobile-icon-toggle span,
.ts-header .ts-mobile-icon-toggle span::before,
.ts-header .ts-mobile-icon-toggle span::after {
  background: var(--esb-blue) !important;
}

/* Mobile CTA bar */
.esb-mobile-ctas {
  display: none;
}
@media (max-width: 767px) {
  .esb-topbar { display: none; }
  .esb-mobile-ctas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 15px;
    background: var(--esb-white);
    border-bottom: 1px solid var(--esb-border);
  }
  .esb-mobile-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 12px;
    border-radius: var(--esb-radius);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity .2s;
  }
  .esb-mobile-cta:hover { opacity: .88; }
  .esb-mobile-cta-config {
    background: var(--esb-accent);
    color: #fff !important;
  }
  .esb-mobile-cta-devis {
    background: var(--esb-cta);
    color: #fff !important;
  }
  .esb-mobile-cta i {
    font-size: 15px;
  }
}

/* ── STICKY header compact ── */
.ts-header.has-sticky.is-sticky .esb-topbar {
  display: none !important;
}
.ts-header.has-sticky.is-sticky .header-middle {
  box-shadow: 0 2px 12px rgba(21,101,192,.1) !important;
}

/* ── Mega menu dropdown polish ── */
.ts-header .header-bottom .main-menu .sub-menu,
.ts-header .header-bottom .main-menu .mega-menu-wrapper {
  border-top: 3px solid var(--esb-blue) !important;
  border-radius: 0 0 var(--esb-radius) var(--esb-radius) !important;
  box-shadow: 0 8px 24px rgba(21,101,192,.12) !important;
}

/* ── Search bar ── */
.ts-header .search-form .form-input {
  border-color: var(--esb-border) !important;
  background: var(--esb-gray) !important;
  border-radius: var(--esb-radius) !important;
}
.ts-header .search-form .form-input:focus {
  border-color: var(--esb-blue) !important;
  background: #fff !important;
}
.ts-header .search-form .btn-search {
  background: var(--esb-blue) !important;
  border-radius: 0 var(--esb-radius) var(--esb-radius) 0 !important;
}

/* Cart & wishlist icon accent */
.ts-header .shopping-cart-wrapper .cart-count,
.ts-header .my-wishlist-wrapper .count {
  background: var(--esb-accent) !important;
}
