/* ------------------------------------------------------------------- nav
   Même structure et comportement que la barre de PanicMC (marque, liens,
   pastille, Boutique, burger), habillage acier : plaque, liseré, bande danger
   sous la barre, rivets aux coins. */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--plate-3) 0, var(--plate) 38%, #1f2329 100%);
  border-top: 3px solid var(--line-strong);
  box-shadow: 0 6px 24px #0008;
}

/* Bande danger de 6 px collée sous la barre : le rappel de la bannière beta. */
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 6px;
  background: repeating-linear-gradient(45deg, var(--danger) 0 14px, var(--black) 14px 28px);
  box-shadow: 0 2px 0 #0e0f11;
  pointer-events: none;
}

.nav > .shell {
  width: 100%;
  height: 100%;
}

.nav-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Rivets : coins gauches posés par .nav-inner, coins droits par .nav-right. */
.nav-inner::before,
.nav-inner::after,
.nav-right::before,
.nav-right::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #c7ccd4 0 1px, #6b7280 2px, #3b4048 3px, #22252b 4px);
  box-shadow: 0 1px 1px #0009;
  pointer-events: none;
}

.nav-inner::before { top: 7px; left: -14px; }
.nav-inner::after { bottom: 7px; left: -14px; }
.nav-right::before { top: 7px; right: -14px; }
.nav-right::after { bottom: 7px; right: -14px; }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  color: var(--yellow);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--black);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
  box-shadow: inset 0 0 0 1px var(--line);
}

.brand-mark img {
  width: 30px;
  height: 30px;
}

.brand-name {
  font: 700 19px/1 var(--font-ui);
  letter-spacing: 0.04em;
  color: var(--yellow);
  text-shadow: 0 2px 0 var(--black);
}

.nav-links {
  display: flex;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.nav-links a {
  position: relative;
  padding: 9px 13px;
  font: 600 15px/1.2 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--plate-2);
  text-decoration: none;
}

.nav-links a.on {
  color: var(--yellow);
}

/* Lien actif : soulignement en bande danger. */
.nav-links a.on::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 3px;
  background: var(--hazard-thin);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-shop {
  padding: 9px 22px 12px;
  gap: 7px;
}

.nav-shop svg {
  flex-shrink: 0;
  margin-left: -2px;
}

/* ---------------------------------------------------------- pastille live */
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--dim);
}

.live.up {
  color: var(--ok);
  background: #1e2f1b;
  border-color: #2f4a2a;
}

.live.up i {
  background: var(--ok);
  animation: livePulse 2.4s infinite;
}

.live.down {
  color: var(--red);
  background: #2f1b1b;
  border-color: #4a2a2a;
}

.live.down i {
  background: var(--red);
}

.live.maint {
  color: var(--yellow);
  background: #2f2a1b;
  border-color: #4a422a;
}

.live.maint i {
  background: var(--yellow);
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 #80ff7299; }
  70% { box-shadow: 0 0 0 7px #80ff7200; }
  100% { box-shadow: 0 0 0 0 #80ff7200; }
}

@media (prefers-reduced-motion: reduce) {
  .live.up i {
    animation: none;
  }
}

.burger {
  display: none;
}

/* ------------------------------------------------- tablette : menu burger */
@media (max-width: 1020px) {
  .live-label {
    display: none;
  }
  .live {
    padding: 8px 9px;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: 0;
    z-index: 5;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    background: var(--plate);
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px #000a;
    clip-path: polygon(var(--bevel) 0, calc(100% - var(--bevel)) 0, 100% var(--bevel), 100% calc(100% - var(--bevel)), calc(100% - var(--bevel)) 100%, var(--bevel) 100%, 0 calc(100% - var(--bevel)), 0 var(--bevel));
    display: none;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 13px 14px;
    font-size: 16px;
  }
  .nav-links a.on::after {
    left: 0;
    right: auto;
    top: 8px;
    bottom: 8px;
    width: 4px;
    height: auto;
    background: var(--hazard-thin);
  }
  .burger {
    display: grid;
  }
}

/* -------------------------------------- téléphone : le logo et l'icône */
@media (max-width: 620px) {
  .nav-inner {
    gap: 8px;
  }
  .nav .brand-name {
    display: none;
  }
  .nav-shop {
    padding: 9px 12px 12px;
  }
  .nav-shop-label {
    display: none;
  }
  .nav-inner::before,
  .nav-inner::after {
    left: -11px;
  }
  .nav-right::before,
  .nav-right::after {
    right: -11px;
  }
}
