/* app.css — Navigation unifiée desktop/mobile et coque applicative Phase 2.
   Utilise l'en-tête sombre collant (.global-nav) et le tiroir unique (.global-nav__drawer).
   Supprime les doubles barres de navigation et corrige le surlignage d'icône active. */

body.nav-drawer-open {
  overflow: hidden;
}

.app-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--wz-blue, #33ccff);
  color: #111315;
  font-weight: 700;
  text-decoration: none;
}

.app-skip-link:focus {
  left: 16px;
  top: 14px;
}

/* ---- En-tête collant sombre ---- */
.global-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  width: 100%;
  background: rgba(18, 19, 22, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.global-nav__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.global-nav__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.global-nav__logo {
  display: block;
  height: 36px;
  width: auto;
  object-fit: contain;
}

.global-nav__portal-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(51, 204, 255, 0.16);
  border: 1px solid rgba(51, 204, 255, 0.35);
  color: #7ee3ff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.global-nav__menu {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0 auto 0 6px;
  min-width: 0;
}

.global-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.global-nav__link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.global-nav__link.is-active,
.global-nav__link[aria-current="page"] {
  color: #33ccff;
  background: rgba(51, 204, 255, 0.12);
}

.global-nav__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  background: #94a3b8;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.global-nav__status-dot.is-operational {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

.global-nav__status-dot.is-degraded,
.global-nav__status-dot.is-maintenance {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}

.global-nav__status-dot.is-unavailable,
.global-nav__status-dot.is-error {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.24);
}

.global-nav__status-dot.is-checking {
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

.app-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: #33ccff;
  color: #111315;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
}

.app-nav-badge[hidden] {
  display: none !important;
}

.global-nav__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.global-nav__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: #33ccff;
  color: #111315;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  border: 2px solid transparent;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.global-nav__cta-btn:hover {
  background: #5cd8ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(51, 204, 255, 0.28);
}

/* État actif distinct du bouton Déposer uniquement quand on EST sur depot.html */
.global-nav__cta-btn.is-active,
.global-nav__cta-btn[aria-current="page"] {
  background: #ffffff;
  color: #111315;
  border-color: #33ccff;
  box-shadow: 0 0 0 3px rgba(51, 204, 255, 0.35);
}

.global-nav__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.18s ease;
}

.global-nav__hamburger:hover {
  background: rgba(255, 255, 255, 0.12);
}

.global-nav__hamburger svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

/* ---- Tiroir mobile unique ---- */
.global-nav__overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.56);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.global-nav__overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.global-nav__drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1010;
  width: min(300px, 84vw);
  background: #121316;
  color: #ffffff;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s ease;
  box-shadow: -14px 0 38px rgba(0, 0, 0, 0.35);
}

.global-nav__drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.global-nav__drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.global-nav__drawer-logo {
  display: block;
  height: 26px;
  width: auto;
  object-fit: contain;
}

.global-nav__close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
}

.global-nav__close-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.global-nav__drawer-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  flex: 1 1 auto;
  overflow-y: auto;
}

.global-nav__drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.global-nav__drawer-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.global-nav__drawer-link--cta {
  background: #33ccff;
  color: #111315;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 16px;
  margin: 4px 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.global-nav__drawer-link--cta:hover {
  background: #61d8ff;
  color: #111315;
}

.global-nav__drawer-link.is-active,
.global-nav__drawer-link[aria-current="page"] {
  background: rgba(51, 204, 255, 0.14);
  color: #33ccff;
  border-color: rgba(51, 204, 255, 0.35);
}

.global-nav__drawer-link--cta.is-active,
.global-nav__drawer-link--cta[aria-current="page"] {
  background: #ffffff;
  color: #111315;
  border-color: #33ccff;
}

.global-nav__drawer-footer {
  padding: 12px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.global-nav__drawer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.global-nav__drawer-meta a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
  padding: 5px 0;
}

.global-nav__drawer-meta a:hover,
.global-nav__drawer-meta a.is-active {
  color: #33ccff;
}

/* ---- Footer sombre unifié WazeEditor ---- */
.waze-footer {
  width: 100%;
  background: #121316;
  color: rgba(255, 255, 255, 0.85);
  padding: 44px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.waze-footer__inner {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(2, minmax(160px, 1fr));
  gap: 32px;
}

.waze-footer__brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.waze-footer__icon {
  display: block;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
}

.waze-footer__title {
  display: block;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
}

.waze-footer__tagline {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
}

.waze-footer__note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
  max-width: 380px;
}

.waze-footer__wimrtg {
  margin: 12px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #7ee3ff;
  text-transform: uppercase;
}

.waze-footer__heading {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
}

.waze-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.waze-footer__col a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.18s ease;
}

.waze-footer__col a:hover {
  color: #33ccff;
}

.waze-footer__bottom {
  max-width: 1140px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.56);
}

@media (max-width: 1060px) {
  .global-nav__menu,
  .global-nav__actions {
    display: none;
  }

  .global-nav__hamburger {
    display: inline-flex;
  }

  .global-nav__container {
    height: 56px;
    padding: 0 14px;
    gap: 10px;
  }

  .global-nav__logo {
    height: 26px;
  }

  .global-nav__portal-tag {
    font-size: 0.68rem;
    padding: 2px 8px;
    letter-spacing: 0.02em;
  }

  .waze-footer__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
