/* =========================================================
   GENICOTIK : Navigation futuriste
   ========================================================= */

.fx-header {
  position: sticky;
  top: 0;
  z-index: 10050;
  overflow: visible;
  border-bottom: 1px solid rgba(42, 168, 255, 0.12);
  background: linear-gradient(180deg, rgba(8, 12, 22, 0.97) 0%, rgba(8, 12, 22, 0.88) 100%);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

.fx-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(42, 168, 255, 0.5), rgba(77, 195, 255, 0.8), rgba(42, 168, 255, 0.5), transparent);
  opacity: 0.7;
}

.fx-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  min-height: 60px;
  overflow: visible;
}

/* Brand */
.fx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink, #c9d7ff);
  flex-shrink: 0;
  z-index: 2;
}

.fx-brand img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  object-position: center 72%;
  border-radius: 10px;
  filter: drop-shadow(0 0 14px rgba(77, 195, 255, 0.55)) brightness(1.2) saturate(1.25);
  background: rgba(10, 18, 32, 0.6);
}

.fx-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.fx-brand-name {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.22em;
}

.fx-brand-tag {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(77, 195, 255, 0.65);
  font-family: monospace;
  text-transform: uppercase;
}

/* Desktop nav */
.fx-nav-main {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fx-nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fx-nav-item {
  position: relative;
}

.fx-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #a8bddf;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.fx-nav-link .i svg {
  fill: currentColor;
  opacity: 0.85;
}

.fx-nav-link:hover,
.fx-nav-link:focus-visible {
  color: #fff;
  background: rgba(42, 168, 255, 0.08);
  border-color: rgba(42, 168, 255, 0.2);
  outline: none;
}

.fx-nav-link.is-active {
  color: #4dc3ff;
  background: rgba(42, 168, 255, 0.12);
  border-color: rgba(42, 168, 255, 0.35);
  box-shadow: 0 0 20px rgba(42, 168, 255, 0.12);
}

.fx-nav-link--cta {
  background: linear-gradient(135deg, #2aa8ff, #1987e6);
  border-color: rgba(77, 195, 255, 0.4);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(42, 168, 255, 0.3);
}

.fx-nav-link--cta:hover {
  background: linear-gradient(135deg, #4dc3ff, #2aa8ff);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(42, 168, 255, 0.45);
}

.fx-nav-chevron {
  display: inline-flex;
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
  opacity: 0.7;
}

.fx-nav-item.is-open .fx-nav-chevron {
  transform: rotate(90deg);
}

/* Mega menu Expertise */
.fx-mega-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(520px, calc(100vw - 32px));
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(42, 168, 255, 0.3);
  background: linear-gradient(160deg, rgba(12, 18, 32, 0.98), rgba(8, 12, 22, 0.96));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 40px rgba(42, 168, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 10060;
}

.fx-mega-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(77, 195, 255, 0.6), transparent);
}

.fx-nav-item.is-open .fx-mega-panel,
.fx-nav-item:hover .fx-mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.fx-mega-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(42, 168, 255, 0.12);
}

.fx-mega-head span {
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(77, 195, 255, 0.7);
  text-transform: uppercase;
}

.fx-mega-head a {
  font-size: 11px;
  font-weight: 600;
  color: #4dc3ff;
  text-decoration: none;
}

.fx-mega-head a:hover {
  color: #fff;
}

.fx-mega-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.fx-mega-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(77, 140, 255, 0.18);
  background: rgba(15, 22, 39, 0.55);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}

.fx-mega-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--mega-glow, rgba(42, 168, 255, 0.08)), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.fx-mega-card:hover {
  border-color: var(--mega-border, rgba(42, 168, 255, 0.45));
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.fx-mega-card:hover::before {
  opacity: 1;
}

.fx-mega-card.is-active {
  border-color: var(--mega-border, rgba(42, 168, 255, 0.5));
  background: rgba(42, 168, 255, 0.08);
}

.fx-mega-card--violet {
  --mega-glow: rgba(168, 85, 247, 0.12);
  --mega-border: rgba(168, 85, 247, 0.45);
}

.fx-mega-card--green {
  --mega-glow: rgba(49, 208, 170, 0.12);
  --mega-border: rgba(49, 208, 170, 0.45);
}

.fx-mega-card--amber {
  --mega-glow: rgba(255, 184, 77, 0.12);
  --mega-border: rgba(255, 184, 77, 0.45);
}

.fx-mega-card--cyan {
  --mega-glow: rgba(42, 168, 255, 0.12);
  --mega-border: rgba(42, 168, 255, 0.45);
}

.fx-mega-card--rose {
  --mega-glow: rgba(244, 114, 182, 0.12);
  --mega-border: rgba(244, 114, 182, 0.45);
}

.fx-mega-card--teal {
  --mega-glow: rgba(0, 240, 255, 0.12);
  --mega-border: rgba(0, 240, 255, 0.45);
}

.fx-mega-card--fuchsia {
  --mega-glow: rgba(188, 19, 254, 0.12);
  --mega-border: rgba(188, 19, 254, 0.45);
}

.fx-mega-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fx-mega-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(42, 168, 255, 0.1);
  border: 1px solid rgba(42, 168, 255, 0.2);
  flex-shrink: 0;
}

.fx-mega-icon .i {
  width: 18px;
  height: 18px;
}

.fx-mega-icon .i svg {
  fill: #4dc3ff;
}

.fx-mega-card strong {
  font-size: 14px;
  color: #fff;
}

.fx-mega-card span {
  font-size: 11px;
  color: #8ba3d1;
  line-height: 1.4;
}

.fx-mega-arrow {
  margin-top: auto;
  font-size: 11px;
  font-weight: 700;
  color: #4dc3ff;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
}

.fx-mega-card:hover .fx-mega-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Auth zone desktop */
.fx-nav-auth {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(77, 140, 255, 0.15);
}

.fx-nav-auth .fx-nav-link {
  font-size: 12px;
  padding: 7px 12px;
}

.fx-nav-link--dash {
  color: #31d0aa;
  border-color: rgba(49, 208, 170, 0.25);
  background: rgba(49, 208, 170, 0.08);
}

.fx-nav-link--logout {
  color: #ff8a96;
  border-color: rgba(255, 90, 107, 0.25);
  background: rgba(255, 90, 107, 0.06);
}

.fx-nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff5a6b;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hamburger futuriste */
.fx-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(42, 168, 255, 0.3);
  background: rgba(42, 168, 255, 0.06);
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1000001;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.fx-menu-btn:hover {
  border-color: rgba(42, 168, 255, 0.55);
  box-shadow: 0 0 20px rgba(42, 168, 255, 0.15);
}

.fx-menu-btn span {
  display: block;
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: #4dc3ff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s, top 0.3s ease;
  box-shadow: 0 0 6px rgba(77, 195, 255, 0.4);
}

.fx-menu-btn span:nth-child(1) { top: 14px; }
.fx-menu-btn span:nth-child(2) { top: 21px; }
.fx-menu-btn span:nth-child(3) { top: 28px; }

.fx-menu-btn.is-active span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.fx-menu-btn.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.fx-menu-btn.is-active span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* Drawer mobile */
.fx-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 999998;
  background: rgba(2, 6, 18, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.fx-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fx-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100vw);
  z-index: 999999;
  transform: translateX(105%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
}

.fx-drawer.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.fx-drawer-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(10, 14, 26, 0.99) 0%, rgba(14, 20, 36, 0.98) 100%);
  border-left: 1px solid rgba(42, 168, 255, 0.25);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.fx-drawer-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(42, 168, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 168, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  opacity: 0.5;
}

.fx-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(42, 168, 255, 0.15);
  position: relative;
  z-index: 1;
}

.fx-drawer-head strong {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #4dc3ff;
  font-family: monospace;
}

.fx-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(77, 140, 255, 0.25);
  background: rgba(42, 168, 255, 0.06);
  color: #c9d7ff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.fx-drawer-close:hover {
  background: rgba(42, 168, 255, 0.14);
  border-color: rgba(42, 168, 255, 0.45);
}

.fx-drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 24px;
  position: relative;
  z-index: 1;
}

.fx-drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 6px;
  border-radius: 12px;
  border: 1px solid rgba(77, 140, 255, 0.15);
  background: rgba(15, 22, 39, 0.5);
  color: #c9d7ff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.fx-drawer-link .i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.fx-drawer-link:active {
  transform: scale(0.98);
}

.fx-drawer-link.is-active {
  border-color: rgba(42, 168, 255, 0.45);
  background: rgba(42, 168, 255, 0.12);
  color: #4dc3ff;
}

.fx-drawer-link--cta {
  background: linear-gradient(135deg, #2aa8ff, #1987e6);
  border-color: rgba(77, 195, 255, 0.4);
  color: #fff;
  justify-content: center;
  margin-top: 8px;
}

/* Accordion Expertise mobile */
.fx-drawer-accordion {
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid rgba(77, 140, 255, 0.2);
  background: rgba(12, 18, 30, 0.6);
  overflow: hidden;
}

.fx-drawer-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: #c9d7ff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  gap: 10px;
}

.fx-drawer-accordion-btn .i svg {
  fill: #4dc3ff;
}

.fx-drawer-accordion-icon {
  font-size: 12px;
  color: #4dc3ff;
  transition: transform 0.25s;
}

.fx-drawer-accordion.is-open .fx-drawer-accordion-icon {
  transform: rotate(180deg);
}

.fx-drawer-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.fx-drawer-accordion.is-open .fx-drawer-accordion-body {
  max-height: 400px;
}

.fx-drawer-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 12px 20px;
  border-top: 1px solid rgba(77, 140, 255, 0.1);
  color: #a8bddf;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.fx-drawer-sub:hover,
.fx-drawer-sub.is-active {
  background: rgba(42, 168, 255, 0.08);
  color: #4dc3ff;
}

.fx-drawer-sub-desc {
  display: block;
  font-size: 11px;
  color: #7b8aad;
  font-weight: 400;
  margin-top: 2px;
}

.fx-drawer-foot {
  padding: 16px 20px 24px;
  border-top: 1px solid rgba(42, 168, 255, 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.fx-drawer-foot .fx-drawer-link {
  margin-bottom: 0;
  justify-content: center;
  font-size: 14px;
}

/* Responsive breakpoints */
@media (max-width: 1100px) {
  .fx-nav-link {
    padding: 7px 10px;
    font-size: 12px;
  }
  .fx-mega-panel {
    width: min(460px, calc(100vw - 24px));
  }
}

@media (max-width: 960px) {
  .fx-nav-main {
    display: none;
  }
  .fx-menu-btn {
    display: block;
  }
  .fx-brand-tag {
    display: none;
  }
}

@media (min-width: 961px) {
  .fx-drawer,
  .fx-drawer-overlay {
    display: none !important;
  }
}

/* Touch : pas de hover mega menu */
@media (hover: none) {
  .fx-nav-item:hover .fx-mega-panel {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .fx-nav-item.is-open .fx-mega-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
}