/* Body Reset */
body.leboursier {
  margin: 0;
  padding: 0;
  background-color: #FFFFFF;
}

/* Base Header */
body.leboursier .header {
  display: grid; 
  grid-template-columns: 1fr auto 1fr;
  align-items: center; 
  padding: 16px 32px; 
  max-width: 1280px;
  height: auto; 
  border-bottom: 1px solid var(--border); 
  background-color: #FFFFFF;
  position: sticky; 
  top: 0; 
  z-index: 100;
  margin: 0 auto;
}

@media (min-width: 1025px) {
  body.leboursier .header {
    grid-template-columns: auto 1fr auto;
    gap: 32px;
  }
}

body.leboursier .logo-link { 
  display: flex; 
  align-items: center; 
  height: auto;
  max-width: 140px;
  grid-column: 2;
  justify-self: center;
}

@media (min-width: 641px) {
  body.leboursier .logo-link {
    max-width: 200px;
  }
}

@media (min-width: 1025px) {
  body.leboursier .logo-link {
    grid-column: 1;
    justify-self: start;
    margin-right: auto;
  }
}

body.leboursier .logo-link img { 
  height: auto;
  width: 100%; 
}

/* Desktop Nav placement */
body.leboursier .nav-links {
  grid-column: 2;
}

/* Nav Links */
body.leboursier .nav-links { 
  display: flex; 
  align-items: center; 
  overflow-x: auto;
  overflow-y: clip;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  padding: 12px 0;
}

body.leboursier .nav-links::-webkit-scrollbar {
  display: none;
}

body.leboursier .nav-links.is-dragging {
  cursor: grabbing;
}

body.leboursier .nav-links > ul {
  display: flex; 
  gap: 12px;
  align-items: center; 
  list-style: none;
  margin: 0;
  padding: 0;
  width: max-content;
}

body.leboursier .nav-links li {
  position: relative;
}

body.leboursier .nav-links a { 
  font-family: var(--font-secondary); 
  font-size: 14px; 
  font-weight: 600; 
  padding-bottom: 4px; 
  border-bottom: 2px solid transparent; 
  white-space: nowrap; 
  color: var(--text-main);
  text-decoration: none;
}

body.leboursier .nav-links a.active,
body.leboursier .nav-links a:hover { 
  color: var(--primary-red); 
  border-bottom-color: var(--primary-red); 
}

/* Dropdowns */
body.leboursier .nav-links li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  margin-bottom: 3px;
  vertical-align: middle;
  opacity: 0.3;
}

body.leboursier .nav-links .sub-menu {
  position: fixed;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  display: none;
  z-index: 1000;
  list-style: none;
  margin: 0;
}

body.leboursier .nav-links .sub-menu a {
  display: block;
  padding: 8px 16px;
  font-weight: 500;
  border-bottom: none;
}

body.leboursier .nav-links .sub-menu a:hover {
  background: #f9f9f9;
  color: var(--primary-red);
}

/* Header Right Actions */
body.leboursier .header-right { 
  display: flex; 
  align-items: center; 
  grid-column: 3;
  justify-self: end;
}

@media (min-width: 1025px) {
  body.leboursier .header-right {
    margin-left: 16px;
  }
}

body.leboursier .header-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

@media (min-width: 768px) {
  body.leboursier .header-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

body.leboursier .header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  margin-right: 8px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #FFF;
  color: var(--text-muted);
  cursor: pointer;
}

body.leboursier .header-search-btn:hover {
  background: #f9f9f9;
}

body.leboursier .header-search-kbd {
  font-family: var(--font-secondary);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  color: var(--text-muted);
  background: var(--bg-ticker);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 5px;
}

@media (max-width: 767px) {
  body.leboursier .header-search-kbd {
    display: none;
  }
  body.leboursier .header-search-btn {
    width: 34px;
    padding: 0;
  }
}

body.leboursier .header-search-btn .icon-svg svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

body.leboursier .btn-login {
  display: inline-flex;
  justify-content: center;
  font-family: var(--font-secondary);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #FFF;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer; 
  white-space: nowrap; 
  color: var(--text-main);
  text-decoration: none;
  min-width: 0;
  align-items: center;
}

@media (min-width: 641px) {
  body.leboursier .btn-login {
    font-size: 12px;
    padding: 6px 16px;
    min-width: 80px;
  }
}

body.leboursier .btn-login:hover {
  background: #f9f9f9;
}

body.leboursier .btn-subscribe { 
  display: inline-flex;
  justify-content: center;
  font-family: var(--font-secondary); 
  font-size: 12px; 
  font-weight: 600; 
  background: var(--accent-yellow); 
  color: #000; 
  border: none; 
  padding: 4px 8px; 
  border-radius: 6px; 
  cursor: pointer; 
  white-space: nowrap; 
  text-decoration: none;
  min-width: 0;
  align-items: center;
}

@media (min-width: 641px) {
  body.leboursier .btn-subscribe {
    font-size: 12px;
    padding: 6px 16px;
    min-width: 80px;
  }
}

body.leboursier .btn-subscribe:hover {
  filter: brightness(0.95);
}

/* Ticker */
body.leboursier .ticker { 
  border-top: 2px solid var(--primary-red); 
  border-bottom: 1px solid var(--border); 
  background-color: var(--bg-ticker); 
  height: 40px; 
  display: flex; 
  align-items: center; 
  overflow: hidden; 
  padding: 0 32px; 
  margin: 0 auto;
  max-width: 1280px;
}

body.leboursier .ticker-items {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

body.leboursier .ticker-track {
  display: inline-flex;
  gap: 32px;
  align-items: center;
  cursor: grab;
  will-change: transform;
}

body.leboursier .ticker-track.is-animating {
  animation: ticker-scroll 30s linear infinite;
}

@keyframes ticker-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

body.leboursier .ticker-item { 
  font-family: var(--font-secondary); 
  font-size: 14px; 
  display: inline-flex; 
  gap: 8px; 
  white-space: nowrap; 
  text-decoration: none;
  align-items: center;
  padding-right: 32px;
  position: relative;
}

body.leboursier .ticker-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 14px;
  background: #d3d3d7;
}

body.leboursier .ticker-item .name { font-weight: 600; color: var(--text-muted); }
body.leboursier .ticker-item .val { font-weight: 600; color: var(--text-main); }
body.leboursier .ticker-item .change.up { color: #15803D; font-weight: 600; }
body.leboursier .ticker-item .change.down { color: var(--primary-red); font-weight: 600; }
body.leboursier .ticker-item .change.neutral { color: #6b7280; font-weight: 600; }


/* Mobile Nav Toggle */
body.leboursier .mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-main);
  padding: 4px;
  grid-column: 1;
  justify-self: start;
}

@media (max-width: 1024px) {
  body.leboursier .mobile-nav-toggle {
    display: block;
  }
}


/* Mobile Nav Drawer */
body.leboursier .mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1250;
  pointer-events: none;
}
body.leboursier .mobile-nav-backdrop.is-open {
  display: block;
  pointer-events: auto;
}

body.leboursier .mobile-nav-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(340px, 88vw);
  height: 100vh;
  overflow-y: auto;
  background: #fff;
  box-shadow: 4px 0 18px rgba(0,0,0,0.12);
  transform: translateX(-105%);
  transition: transform 0.25s ease;
  z-index: 1350;
  padding: 24px;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
body.leboursier .mobile-nav-drawer.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

body.leboursier .mobile-nav-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

body.leboursier .mobile-nav-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  max-width: 44px;
  max-height: 44px;
}

body.leboursier .nav-links-mobile {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.leboursier .nav-links-mobile a {
  font-family: var(--font-secondary);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  display: block;
}

body.leboursier .nav-links-mobile a.active {
  color: var(--primary-red);
}

body.leboursier .nav-links-mobile .sub-menu {
  list-style: none;
  padding: 8px 0 0 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.leboursier .nav-links-mobile .sub-menu a {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}


/* Responsive */
@media (max-width: 1200px) {
  body.leboursier .header { padding: 16px 24px; gap: 20px; }
  body.leboursier .nav-links > ul { gap: 8px; }
  body.leboursier .nav-links a { font-size: 13px; }
  body.leboursier .header-right { margin-left: 0; }
}

@media (max-width: 1024px) {
  body.leboursier .nav-links { display: none; }
}

@media (max-width: 640px) {
  body.leboursier .logo-link { max-width: 150px; }
  body.leboursier .header { padding: 8px 12px; gap: 8px; }
  body.leboursier .ticker { padding: 0 16px; overflow-x: auto; }
}
