/**
 * Barre de navigation — pilules synthwave (Orbitron), même univers que le convertisseur.
 * Inclus par site_shell.css ; chargé après les <style> inline sur index*.html.
 */

.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 0;
  backdrop-filter: blur(24px) saturate(1.15);
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.58) 0%,
    rgba(0, 12, 32, 0.38) 100%
  );
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-family: "Orbitron", "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease,
    transform 0.25s ease, background 0.25s ease;
  position: relative;
  padding: 11px 20px;
  border-radius: 999px;
  background: linear-gradient(
    165deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(12px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.2;
}

.nav-link::before,
.nav-link::after {
  display: none !important;
}

.nav-link:hover {
  color: #00d4ff;
  border-color: rgba(0, 212, 255, 0.5);
  background: linear-gradient(
    165deg,
    rgba(0, 212, 255, 0.14) 0%,
    rgba(0, 212, 255, 0.05) 100%
  );
  box-shadow: 0 0 22px rgba(0, 212, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.45);
  background: linear-gradient(
    165deg,
    rgba(0, 255, 136, 0.12) 0%,
    rgba(0, 212, 255, 0.06) 100%
  );
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-link:active {
  transform: translateY(0);
}

.language-selector {
  margin-left: 4px;
}

.language-selector select {
  font-family: "Orbitron", "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 11px 38px 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background-color: rgba(8, 16, 36, 0.75);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300d4ff' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
  color: rgba(255, 255, 255, 0.92);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  min-height: 42px;
  line-height: 1.25;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.language-selector select:hover {
  border-color: rgba(0, 212, 255, 0.55);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.language-selector select:focus {
  outline: none;
  border-color: rgba(0, 212, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.language-selector select option {
  background: #0a0f1e;
  color: #fff;
  padding: 8px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 999px;
  background: linear-gradient(
    165deg,
    rgba(0, 212, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  border: 1px solid rgba(0, 212, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav-toggle:hover {
  border-color: rgba(0, 255, 136, 0.4);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.2);
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #00d4ff, #00ff88);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.user-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 1024px) {
  .nav-links {
    gap: 8px;
  }
  .nav-link {
    padding: 10px 16px;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 0 16px;
  }
  .nav-links {
    position: fixed;
    top: 72px;
    right: -100%;
    flex-direction: column;
    align-items: stretch;
    background: rgba(8, 12, 28, 0.96);
    backdrop-filter: blur(22px) saturate(1.2);
    border: 1px solid rgba(0, 212, 255, 0.22);
    border-radius: 16px;
    padding: 18px;
    gap: 12px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 220px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55),
      0 0 40px rgba(0, 212, 255, 0.08);
    z-index: 999;
  }
  .nav-links.active {
    right: 16px;
  }
  .nav-toggle {
    display: flex;
    order: 1;
  }
  .user-section {
    order: 2;
  }
  .nav-link {
    width: 100%;
    justify-content: center;
    padding: 13px 18px;
    font-size: 0.68rem;
  }
  .language-selector {
    margin-left: 0;
    width: 100%;
  }
  .language-selector select {
    width: 100%;
    text-align: center;
    padding-left: 16px;
    background-position: right 16px center;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 12px;
  }
  .nav-links {
    top: 68px;
    min-width: calc(100vw - 32px);
    right: -100%;
    padding: 16px;
  }
  .nav-links.active {
    right: 16px;
  }
}
