/* ========================================
   NAVBAR MEGA PANEL + TOP BAR
   Préfixe: mnx-
   ======================================== */

/* ── ANIMATIONS ── */
@keyframes mnx-phone-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes mnx-glitch-1 {
  0%, 90%, 100% { clip-path: inset(0 0 0 0); transform: translateX(0); }
  92% { clip-path: inset(20% 0 40% 0); transform: translateX(-2px); }
  94% { clip-path: inset(60% 0 10% 0); transform: translateX(2px); }
  96% { clip-path: inset(30% 0 30% 0); transform: translateX(-1px); }
  98% { clip-path: inset(0 0 70% 0); transform: translateX(1px); }
}

@keyframes mnx-glitch-2 {
  0%, 90%, 100% { clip-path: inset(0 0 0 0); transform: translateX(0); opacity: 0; }
  92% { clip-path: inset(40% 0 20% 0); transform: translateX(2px); opacity: 1; }
  94% { clip-path: inset(10% 0 60% 0); transform: translateX(-2px); opacity: 1; }
  96% { clip-path: inset(50% 0 10% 0); transform: translateX(1px); opacity: 1; }
  98% { clip-path: inset(0 0 50% 0); transform: translateX(-1px); opacity: 1; }
}

@keyframes mnx-dot-pulse {
  0%, 100% { opacity: 0.6; box-shadow: 0 0 4px rgba(34,197,94,0.4); }
  50% { opacity: 1; box-shadow: 0 0 8px rgba(34,197,94,0.8); }
}

/* ── TOP INFO BAR ── */
.mnx-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 38px;
  background: rgba(6,12,24,0.98);
  border-bottom: none;
  position: relative;
  z-index: 1001;
}

.mnx-topbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.mnx-topbar-link {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: inherit;
}

.mnx-topbar-link svg {
  flex-shrink: 0;
}

.mnx-topbar-sep {
  width: 1px;
  height: 14px;
  background: rgba(0,229,255,0.08);
}

/* Phone scroll */
.mnx-phone-scroll-wrapper {
  overflow: hidden;
  width: 110px;
  display: inline-block;
}

.mnx-phone-scroll {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: inline-block;
  animation: mnx-phone-scroll 8s linear infinite;
}

/* Email glitch */
.mnx-glitch-wrapper {
  position: relative;
  display: inline-block;
}

.mnx-glitch-base {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
  animation: mnx-glitch-1 4s ease-in-out infinite;
}

.mnx-glitch-layer {
  position: absolute;
  top: 0;
  left: 0;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: rgba(0,229,255,0.4);
  letter-spacing: 0.5px;
  animation: mnx-glitch-2 4s ease-in-out infinite;
  pointer-events: none;
}

/* Center badges */
.mnx-topbar-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mnx-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 3px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 1.5px;
}

.mnx-badge-green {
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.15);
  color: #22c55e;
  font-weight: 700;
}

.mnx-badge-cyan {
  background: rgba(0,229,255,0.03);
  border: 1px solid rgba(0,229,255,0.08);
  color: rgba(255,255,255,0.25);
}

.mnx-badge-version {
  background: rgba(0,229,255,0.03);
  border: 1px solid rgba(0,229,255,0.06);
  color: rgba(255,255,255,0.2);
  letter-spacing: 1px;
}

.mnx-badge-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #22c55e;
}

.mnx-dot-pulse {
  animation: mnx-dot-pulse 2s ease infinite;
}

/* Badges sans contour dans la topbar */
.mnx-topbar .mnx-badge,
.mnx-topbar .mnx-badge-green,
.mnx-topbar .mnx-badge-cyan,
.mnx-topbar .mnx-badge-version {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Right hours */
.mnx-topbar-right {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
}

/* ── MAIN NAVBAR ── */
.mnx-navbar-wrapper {
  position: relative;
  z-index: 1000;
  background: #070d1a;
}

/* Ligne decorative cyan — desactivee */
.mnx-navbar-wrapper::after {
  display: none;
}

.mnx-navbar-wrapper.mnx-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.mnx-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 70px;
  background: #070d1a;
  border-bottom: none;
  position: relative;
  z-index: 20;
}

.mnx-navbar.mnx-mega-open {
  border-bottom: none;
}

.mnx-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.mnx-logo .mn-logo-img {
  height: 50px;
  width: auto;
}

/* Nav links container */
.mnx-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}

.mnx-nav-item {
  height: 100%;
  display: flex;
  align-items: center;
}

.mnx-nav-link {
  font-family: 'Exo 2', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
  cursor: pointer;
  position: relative;
  height: auto;
}

.mnx-nav-link:hover {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.07);
}

.mnx-nav-link.active {
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
}

/* Underline indicator (disabled in Variante 1 — using bg highlight instead) */
.mnx-nav-link::after {
  display: none;
}

/* Chevron rotation */
.mnx-chevron {
  transition: transform 0.3s;
}

.mnx-has-mega.open .mnx-chevron {
  transform: rotate(180deg);
}

/* CTA button — Variante 1: outline cyan */
.mnx-cta-btn {
  padding: 8px 16px;
  border-radius: 6px;
  background: rgba(0, 229, 255, 0.10);
  border: 1px solid rgba(0, 229, 255, 0.35);
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #00e5ff;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s;
}

.mnx-cta-btn:hover {
  background: rgba(0, 229, 255, 0.18);
  border-color: #00e5ff;
  color: #00e5ff;
}

/* Mobile toggle */
.mnx-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mnx-tbar {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.5);
  border-radius: 1px;
  transition: all 0.3s;
}

/* ── MEGA PANEL ── */
.mnx-mega-panel {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  z-index: 15;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mnx-mega-panel.open {
  max-height: 400px;
}

.mnx-mega-inner {
  background: #080e1c;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 32px 48px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

/* Section label */
.mnx-mega-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: rgba(0,229,255,0.3);
  letter-spacing: 2px;
}

.mnx-mega-label-line {
  flex: 1;
  height: 1px;
  background: rgba(0,229,255,0.04);
}

/* Grid */
.mnx-mega-grid {
  display: grid;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
}

.mnx-mega-grid-4 { grid-template-columns: repeat(4, 1fr); }
.mnx-mega-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Mega item — Variante 1: cartes avec fond et bordure subtils */
.mnx-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  text-decoration: none;
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.07);
  transition: background 0.2s, border-color 0.2s;
}

.mnx-mega-item:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.22);
}

.mnx-mega-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 7px;
  flex-shrink: 0;
  background: rgba(0, 229, 255, 0.10);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00e5ff;
  transition: all 0.2s;
}

.mnx-mega-icon svg {
  width: 16px;
  height: 16px;
  stroke: #00e5ff;
  fill: none;
  stroke-width: 1.5;
}

.mnx-mega-item:hover .mnx-mega-icon {
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
}

.mnx-mega-title {
  font-family: 'Exo 2', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.mnx-mega-item:hover .mnx-mega-title {
  color: #fff;
}

.mnx-mega-desc {
  font-family: 'Exo 2', sans-serif;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
}

/* Footer CTA inside mega panel */
.mnx-mega-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,229,255,0.04);
}

.mnx-mega-footer span {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.15);
  letter-spacing: 1.5px;
}

.mnx-mega-footer a {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  color: #00e5ff;
  letter-spacing: 1.5px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mnx-mega-footer a:hover {
  text-decoration: underline;
}

/* ── SPACER for sticky ── */
.mnx-navbar-spacer {
  display: none;
  height: 70px;
}

.mnx-navbar-spacer.active {
  display: block;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .mnx-mega-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mnx-mega-grid-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1075px) {
  .mnx-topbar {
    display: none;
  }

  .mnx-navbar {
    padding: 0 20px;
    height: 60px;
  }

  .mnx-logo .mn-logo-img {
    height: 34px;
  }

  .mnx-nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    height: auto;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(6,12,24,0.98);
    border-bottom: 1px solid rgba(0,229,255,0.08);
    padding: 10px 0;
    z-index: 999;
  }

  .mnx-nav-links.mnx-open {
    display: flex;
    overflow-y: auto;
    max-height: calc(100vh - 60px);
    -webkit-overflow-scrolling: touch;
  }

  .mnx-nav-item {
    width: 100%;
    height: auto;
  }

  .mnx-nav-link {
    width: 100%;
    padding: 14px 20px;
    height: auto;
    font-size: 14px;
  }

  .mnx-nav-link::after {
    display: none;
  }

  .mnx-mobile-toggle {
    display: flex;
  }

  .mnx-cta-btn {
    display: none;
  }

  .mnx-mega-grid-4,
  .mnx-mega-grid-2 {
    grid-template-columns: 1fr;
  }

  .mnx-navbar-spacer.active {
    height: 60px;
  }

  .mnx-navbar-wrapper .mnx-mega-panel {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    width: 100%;
  }

  .mnx-navbar-wrapper .mnx-mega-panel.open {
    max-height: 1000px;
  }

  .mnx-nav-links {
    overflow-y: visible !important;
  }

  .mnx-mega-inner {
    padding: 10px 20px 20px 20px;
    background: rgba(0,10,20,0.98);
  }

  .mnx-has-mega {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
  }

  .mnx-has-mega .mnx-mega-panel {
    position: static !important;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .mnx-has-mega .mnx-mega-panel.open {
    max-height: 600px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mnx-has-mega .mnx-mega-inner {
    padding: 10px 15px 15px 15px;
  }

  .mnx-has-mega .mnx-mega-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   HEADER — Fix hauteur mobile < 480px
   ============================================================ */
@media (max-width: 480px) {

  /* --- Navbar principale --- */
  .mnx-navbar {
    height: 50px !important;
    padding: 0 12px !important;
  }

  /* --- Logo --- */
  .mnx-logo .mn-logo-img {
    height: 28px !important;
  }

  /* --- Toggle hamburger --- */
  .mnx-mobile-toggle {
    gap: 4px !important;
    padding: 6px !important;
  }

  .mnx-tbar {
    width: 18px !important;
    height: 1.5px !important;
  }

  /* --- Nav links container (mode ouvert) --- */
  .mnx-nav-links.mnx-open {
    top: 50px !important;
    max-height: calc(100vh - 50px) !important;
  }

  .mnx-nav-link {
    padding: 12px 16px !important;
    font-size: 13px !important;
  }

  /* --- Mega panel inner --- */
  .mnx-mega-inner {
    padding: 8px 12px 12px 12px !important;
  }

  .mnx-mega-item {
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  .mnx-mega-icon {
    width: 34px !important;
    height: 34px !important;
  }

  .mnx-mega-title {
    font-size: 13px !important;
  }

  .mnx-mega-desc {
    font-size: 10px !important;
  }

  /* --- Spacer --- */
  .mnx-navbar-spacer.active {
    height: 50px !important;
  }

  /* --- Mega panel top offset --- */
  .mnx-mega-panel {
    top: 50px !important;
  }
}
