/* Header BABY Mining — chargé en <link> pour application immédiate (pas dépendant du JS) */

/* Voile sous le menu mobile (sur body, z-index sous la barre sticky) */
#rf-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: rgba(0, 0, 0, 0.42);
  -webkit-tap-highlight-color: transparent;
}

#rf-nav-backdrop.is-visible {
  display: block;
}
#rf-unified-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  background: linear-gradient(180deg, #083a2c 0%, #062f24 100%);
  color: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
  min-height: 88px;
  overflow: visible;
}

#rf-unified-header .rf-header-wrap {
  position: relative;
  width: 80% !important;
  max-width: none !important;
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#rf-unified-header .rf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
  margin-right: 0;
  margin-top: -10px !important;
}

#rf-unified-header .rf-logo {
  width: 170px;
  height: 62px;
  border: 2px solid #d4af37;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff;
  padding: 6px 8px;
  overflow: hidden;
  flex-shrink: 0;
}

#rf-unified-header .rf-logo img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
}

#rf-unified-header .rf-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

#rf-unified-header .rf-brand-text h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 1.6px;
  color: #d4af37;
  font-weight: 900;
}

#rf-unified-header .rf-brand-text p {
  margin: 2px 0 0;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: #e3e8e5;
  font-weight: 700;
}

#rf-unified-header nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(14px, 1.4vw, 22px);
}

#rf-unified-header #rf-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  margin-left: clamp(20px, 3.5vw, 52px);
  min-width: 0;
}

#rf-unified-header nav li {
  position: relative;
}

#rf-unified-header nav a {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  padding: 10px clamp(6px, 0.9vw, 14px);
  line-height: 1;
  letter-spacing: 0.2px;
}

#rf-unified-header nav a:hover,
#rf-unified-header nav a.active {
  color: #d4af37;
}

#rf-unified-header nav li:not(.rf-dropdown) > a.active {
  border-bottom: 2px solid #d4af37;
}

#rf-unified-header .rf-dropdown > a::after {
  content: " ▼";
  font-size: 10px;
  color: #d4af37;
}

#rf-unified-header .rf-submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  background: #0a3d2e;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  padding: 8px;
  display: none;
  z-index: 1400;
}

#rf-unified-header .rf-submenu li {
  width: 100%;
}

#rf-unified-header .rf-submenu a {
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

#rf-unified-header .rf-submenu a:hover,
#rf-unified-header .rf-submenu a.active {
  background: rgba(212, 175, 55, 0.14);
}

#rf-unified-header .rf-dropdown:hover > .rf-submenu {
  display: block;
}

#rf-unified-header .rf-btn {
  background: #d4af37;
  color: #062f24 !important;
  padding: 10px 14px;
  border-radius: 8px;
  border-bottom: 0 !important;
}

#rf-menu-btn {
  display: none;
  font: inherit;
  font-size: 30px;
  cursor: pointer;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  -webkit-appearance: none;
  appearance: none;
}

@media (max-width: 950px) {
  #rf-unified-header .rf-header-wrap {
    width: 98% !important;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    row-gap: 10px;
    position: relative;
    z-index: 2;
  }

  #rf-unified-header .rf-logo {
    width: 154px;
    height: 58px;
  }

  #rf-unified-header .rf-brand-text h1 {
    font-size: 16px;
  }

  #rf-unified-header .rf-brand-text p {
    font-size: 10px;
  }

  #rf-menu-btn {
    display: block;
    order: 2;
    margin-left: auto;
    position: relative;
    z-index: 2100;
    flex-shrink: 0;
  }

  #rf-unified-header .rf-brand {
    order: 1;
    min-width: 0;
  }

  /* Panneau plein écran sous la barre : priorité sur les vieux `nav { }` des pages */
  #rf-unified-header nav#rf-nav {
    display: none !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: var(--rf-nav-top, 88px) !important;
    bottom: auto !important;
    max-height: min(82vh, 720px) !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 12px 0 max(24px, env(safe-area-inset-bottom, 0px)) !important;
    justify-content: flex-start !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    background: #062f24 !important;
    border-top: 1px solid rgba(212, 175, 55, 0.22) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
    flex-basis: auto !important;
    order: 3 !important;
    z-index: 2000 !important;
  }

  #rf-unified-header nav#rf-nav.active {
    display: block !important;
  }

  #rf-unified-header nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 8px 18px 12px;
    gap: 4px;
    max-height: none;
    overflow: visible;
  }

  #rf-unified-header nav a {
    width: 100%;
    padding: 14px 12px;
    border-radius: 10px;
    box-sizing: border-box;
  }

  #rf-unified-header .rf-dropdown > a::after {
    content: " ▼";
    font-size: 10px;
    color: #d4af37;
  }

  #rf-unified-header .rf-dropdown:hover > .rf-submenu {
    display: none;
  }

  #rf-unified-header .rf-submenu {
    position: static;
    display: none;
    min-width: 100%;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.16);
    box-shadow: none;
    padding: 6px 8px;
    border-radius: 10px;
    margin: 4px 0 6px;
  }

  #rf-unified-header .rf-dropdown.open > .rf-submenu {
    display: block;
  }

  #rf-unified-header .rf-submenu a {
    padding: 10px 10px;
    border-radius: 8px;
    color: #eef3f0;
    font-size: 12px;
  }

  #rf-unified-header .rf-submenu a:hover,
  #rf-unified-header .rf-submenu a.active {
    background: transparent;
    color: #d4af37;
  }
}
