/* ================================================
   HELIOS — Barre de navigation globale
   Pour supprimer : retirer nav.css + nav.js de chaque page
   ================================================ */

/* ── Décale le contenu sous la barre ── */
body.has-helios-nav {
  padding-top: 52px;
}

/* ── Barre principale ── */
#helios-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  z-index: 99999;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 0;
  background: rgba(5, 5, 18, 0.96);
  border-bottom: 1px solid rgba(201, 168, 76, 0.18);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Logo ── */
#hn-logo {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #c9a84c;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 28px;
}

/* ── Liens de navigation ── */
#hn-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
#hn-links a {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
#hn-links a:hover {
  color: #c9a84c;
  background: rgba(201, 168, 76, 0.07);
}
#hn-links a.hn-active {
  color: #c9a84c;
  background: rgba(201, 168, 76, 0.08);
  cursor: default;
}

/* ── Zone droite ── */
#hn-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* TikTok status */
#hn-tiktok {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(201, 168, 76, 0.2);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  transition: border-color 0.3s, color 0.3s;
}
#hn-tiktok.live {
  border-color: rgba(255, 60, 80, 0.5);
  color: #ff6b7a;
}
#hn-tiktok-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
  transition: background 0.3s;
}
#hn-tiktok.live #hn-tiktok-dot {
  background: #ff4d6a;
  box-shadow: 0 0 6px rgba(255, 77, 106, 0.8);
  animation: hn-pulse 1.5s infinite;
}
@keyframes hn-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Sélecteur de langue */
#hn-lang {
  position: relative;
}
#hn-lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
#hn-lang-btn:hover {
  border-color: rgba(201, 168, 76, 0.45);
  color: #c9a84c;
}
#hn-lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(10, 10, 22, 0.98);
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: 6px;
  min-width: 150px;
  overflow: hidden;
  display: none;
  z-index: 100000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
#hn-lang-dropdown.open { display: block; }
#hn-lang-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
#hn-lang-dropdown button:hover,
#hn-lang-dropdown button.hn-lang-active {
  background: rgba(201, 168, 76, 0.08);
  color: #c9a84c;
}

/* Avatar + rôle */
#hn-user {
  display: flex;
  align-items: center;
  gap: 8px;
}
#hn-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #c9a84c;
  overflow: hidden;
  flex-shrink: 0;
}
#hn-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
#hn-role {
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  white-space: nowrap;
}
#hn-role.role-admin {
  color: #ff4d6a;
  background: rgba(255, 77, 106, 0.12);
  border: 1px solid rgba(255, 77, 106, 0.3);
}
#hn-role.role-user {
  color: rgba(201, 168, 76, 0.7);
  background: rgba(201, 168, 76, 0.07);
  border: 1px solid rgba(201, 168, 76, 0.2);
}

/* ── Séparateur vertical ── */
.hn-vsep {
  width: 1px;
  height: 22px;
  background: rgba(201, 168, 76, 0.12);
  flex-shrink: 0;
}

/* ── Mode jeu : barre cachée, slide au survol du trigger ── */
body.hn-game-mode #helios-navbar {
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.2s ease;
  pointer-events: none;
}
body.hn-game-mode.hn-nav-open #helios-navbar {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
body.hn-game-mode.hn-nav-open {
  padding-top: 52px;
}

/* Zone de déclenchement invisible en haut de la page jeu */
#hn-game-trigger {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 16px;
  z-index: 100000;
  background: transparent;
  cursor: default;
}

/* ════════════════════════════════════════════════════
   RESPONSIVE — Barre de navigation
   ════════════════════════════════════════════════════ */

/* ── Tablette (≤ 768px) ── */
@media (max-width: 768px) {
  #helios-navbar { padding: 0 14px; gap: 0; }
  #hn-logo { font-size: 15px; letter-spacing: 3px; margin-right: 16px; }
  #hn-links a { padding: 6px 10px; font-size: 10px; letter-spacing: 1px; }
  #hn-tiktok { padding: 3px 8px; font-size: 10px; }
  #hn-lang-btn { padding: 4px 8px; font-size: 10px; }
  #hn-role { display: none; }
}

/* ── Mobile (≤ 540px) ── */
@media (max-width: 540px) {
  #helios-navbar { padding: 0 10px; height: 46px; }
  body.has-helios-nav { padding-top: 46px; }
  #hn-logo { font-size: 14px; letter-spacing: 2px; margin-right: 8px; }

  /* Liens : scroll horizontal silencieux */
  #hn-links {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 1;
    min-width: 0;
  }
  #hn-links::-webkit-scrollbar { display: none; }
  #hn-links a {
    padding: 5px 8px;
    font-size: 9px;
    letter-spacing: 0;
    white-space: nowrap;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  /* Zone droite : masque les éléments secondaires */
  #hn-tiktok span.hn-tiktok-label { display: none; }
  #hn-lang-btn span:last-child    { display: none; }
  .hn-vsep { display: none; }

  #hn-lang-btn { padding: 4px 6px; min-height: 32px; display: inline-flex; align-items: center; }
  #hn-tiktok   { padding: 3px 6px; }
  #hn-avatar   { width: 26px; height: 26px; font-size: 11px; }

  /* Dropdown langue : plein écran sur mobile */
  #hn-lang-dropdown {
    position: fixed;
    top: 46px;
    right: 8px;
    left: auto;
    min-width: 160px;
  }
  #hn-lang-dropdown button { padding: 12px 14px; min-height: 44px; }
}

/* ── Très petit (≤ 360px) ── */
@media (max-width: 360px) {
  #helios-navbar { height: 42px; }
  body.has-helios-nav { padding-top: 42px; }
  #hn-logo { display: none; }
  #hn-links a { padding: 5px 6px; font-size: 9px; }
  #hn-right { gap: 4px; }
  #hn-avatar { width: 22px; height: 22px; font-size: 10px; }
  #hn-lang-dropdown { top: 42px; }
}

/* ── Touch targets ── */
#hn-links a,
#hn-lang-btn,
#hn-lang-dropdown button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
