/**
 * Floating Pill Menu - Ultra Modern Navigation
 * Style: Framer / Linear inspired
 */

.floating-pill-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;

  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;

  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* Visible par défaut - pas besoin de scroll pour l'afficher */
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
}

/* Animation au scroll (optionnel - peut être activé via JS) */
.floating-pill-nav.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
  pointer-events: none;
}

/* Cache le menu quand on n'est pas sur le welcome screen ou une page statique */
body:not(.is-welcome):not(.static-page) .floating-pill-nav {
  display: none;
}

/* Logo section */
.floating-pill-logo {
  display: flex;
  align-items: center;
  padding: 4px 12px 4px 8px;
  margin-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.floating-pill-logo img {
  height: 20px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.floating-pill-logo:hover img {
  opacity: 1;
}

/* Links container */
.floating-pill-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Individual link */
.floating-pill-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 8px 16px;
  border-radius: 999px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.floating-pill-links a:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.05);
}

/* Active state */
.floating-pill-links a.active {
  color: #000;
  background: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

/* Sessions button - styled like links */
.sessions-menu-btn {
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 8px 16px;
  border-radius: 999px;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}

.sessions-menu-btn:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}

/* Mobile - collapse to hamburger */
@media (max-width: 768px) {
  .floating-pill-nav {
    top: 16px;
    padding: 6px 10px;
    gap: 2px;
  }

  .floating-pill-logo {
    padding: 4px 8px;
    margin-right: 4px;
  }

  .floating-pill-logo img {
    height: 18px;
  }

  .floating-pill-links {
    gap: 2px;
  }

  .floating-pill-links a {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Very small mobile - hide some links */
@media (max-width: 480px) {
  .floating-pill-links a:not(.priority) {
    display: none;
  }
}

/* Hover glow effect on pill */
.floating-pill-nav::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.02)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.floating-pill-nav:hover::before {
  opacity: 1;
}
