/* =========================================================
   HEADER — sticky bar, navigation, FR/EN switch, mobile menu
   ========================================================= */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(5%, 30px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}

.header.scrolled {
  background: rgba(2, 11, 8, .82);
  border-bottom-color: rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.logo {
  font-size: 34px;
  font-weight: 750;
  letter-spacing: -1.6px;
  white-space: nowrap;
  text-decoration: none;
}
.logo span { font-weight: 300; color: #52dfc9; }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.nav a {
  position: relative;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  transition: color .2s;
}
.nav a:hover, .nav a.active { color: var(--mint); }
.nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 1px; background: var(--mint);
}
.nav .nav-cta { display: none; }

.header-tools { display: flex; align-items: center; gap: 14px; }

/* FR / EN switch */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #1f4a3c;
  border-radius: 30px;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 7px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang-switch button[aria-pressed="true"] { background: var(--mint); color: #00170f; }
.lang-switch button:not([aria-pressed="true"]):hover { color: var(--mint); }

.header-cta { padding: 12px 22px; font-size: 13px; }

/* Hamburger */
.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid #1f4a3c;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px;
  background: #fff; border-radius: 2px; transition: transform .3s, top .3s;
}
.menu-toggle span:nth-child(1) { top: 16px; }
.menu-toggle span:nth-child(2) { top: 24px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 20px; transform: rotate(-45deg); }

/* ---------- Tablet & mobile ---------- */
@media (max-width: 1080px) {
  .nav { gap: 20px; }
}

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .header-cta { display: none; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px max(5%, 20px) 28px;
    background: rgba(2, 11, 8, .97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.open { opacity: 1; transform: none; visibility: visible; }
  .nav a { font-size: 17px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav a.active::after { display: none; }
  .nav .nav-cta {
    display: flex; justify-content: center; margin-top: 20px;
    border: 0; border-radius: 30px; background: var(--mint); color: #00170f; font-weight: 700;
  }
  .header.menu-open { background: rgba(2, 11, 8, .97); }
}

@media (max-width: 640px) {
  :root { --header-h: 66px; }
  .header { padding: 0 16px; gap: 10px; }
  .logo { font-size: 25px; letter-spacing: -1px; }
  .header-tools { gap: 8px; }
  .lang-switch button { padding: 6px 9px; }
}
