/* =====================================================
   SITE NAV — nav bar identique à la page d'accueil
   Version pleine largeur, fond cacao plein (pages app).
   Self-contained (valeurs littérales, pas de dépendance
   aux variables d'index.html).
   ===================================================== */

.site-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #1f1a03;                 /* Cacao plein */
  box-shadow: 0 2px 12px rgba(31, 26, 3, .18);
}
.nav-inner {
  width: 100%;
  padding: .9rem max(clamp(1.5rem, 5vw, 4rem), env(safe-area-inset-right))
                 .9rem max(clamp(1rem, 2.5vw, 2rem), env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img { height: 30px; width: auto; display: block; }

/* Groupe de liens central (pilule glassy) */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  background: rgba(252, 255, 233, .12);
  border-radius: 9999px;
  padding: 4px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links li { list-style: none; }
.nav-links a {
  font-family: 'Urbanist', system-ui, sans-serif;
  font-weight: 400;
  font-size: .82rem;
  color: #fcffe9;
  text-decoration: none;
  letter-spacing: .02em;
  padding: .4rem 1.15rem;
  border-radius: 9999px;
  white-space: nowrap;
  transition: background .18s, color .2s;
  display: inline-block;
}
.nav-links a:hover { background: rgba(252, 255, 233, .15); }
.nav-links a.active { background: #d9ff50; color: #1f1a03 !important; }

/* Actions à droite */
.nav-actions {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-actions li { list-style: none; }

/* Compte — menu déroulant (condense les actions de droite) */
.nav-account { flex-shrink: 0; }
.nav-account .dropdown-toggle { display: inline-flex; align-items: center; gap: .4rem; }
.nav-account .dropdown-menu {
  border: none;
  border-radius: .85rem;
  box-shadow: 0 8px 28px rgba(31, 26, 3, .22);
  padding: .4rem;
  min-width: 230px;
}
.nav-account .dropdown-header {
  font-family: 'Urbanist', system-ui, sans-serif;
  font-weight: 700;
  color: #1f1a03;
}
.nav-account .dropdown-item {
  font-family: 'Urbanist', system-ui, sans-serif;
  font-size: .9rem;
  border-radius: .55rem;
  padding: .5rem .75rem;
  display: flex;
  align-items: center;
}
.nav-account .dropdown-item:hover { background: rgba(217, 255, 80, .25); color: #1f1a03; }
.nav-account .dropdown-item.text-danger:hover { background: rgba(220, 53, 69, .12); }

/* Bouton login (outline pilule) */
.nav-login,
.nav-actions .app-nav-btn,
.nav-account .app-nav-btn {
  font-family: 'Urbanist', system-ui, sans-serif;
  font-weight: 500;
  font-size: .8rem;
  color: #fcffe9 !important;
  text-decoration: none;
  padding: .45rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(252, 255, 233, .35);
  background: rgba(252, 255, 233, .12);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: border-color .2s, background .2s, color .2s, transform .15s;
}
.nav-login:hover,
.nav-actions .app-nav-btn:hover,
.nav-account .app-nav-btn:hover { background: rgba(252, 255, 233, .22); color: #fcffe9 !important; }

/* CTA lichen */
.nav-cta,
.nav-actions .app-nav-btn--cta {
  font-family: 'Urbanist', system-ui, sans-serif;
  font-weight: 500;
  font-size: .8rem;
  background: #d9ff50;
  color: #1f1a03 !important;
  padding: .45rem 1.25rem;
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid #d9ff50;
  transition: background .2s, transform .15s;
}
.nav-cta:hover,
.nav-actions .app-nav-btn--cta:hover { background: #ceff00; transform: translateY(-1px); color: #1f1a03 !important; }

.nav-actions .app-nav-btn--danger:hover {
  background: rgba(220, 53, 69, .9);
  border-color: rgba(220, 53, 69, .95);
  color: #fff !important;
}

/* Statut utilisateur (texte discret) */
.nav-user {
  font-family: 'Urbanist', system-ui, sans-serif;
  font-size: .78rem;
  color: rgba(252, 255, 233, .6);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}
@media (max-width: 1300px) {
  .nav-user { display: none; }
}

/* Burger (mobile) */
.nav-burger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: .5rem 0;
  color: #fcffe9;
  font-family: 'Urbanist', system-ui, sans-serif;
  font-weight: 400;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  align-items: center;
  gap: .55rem;
}
.nav-burger .burger-icon { display: block; flex-shrink: 0; width: 18px; height: 8px; }

@media (max-width: 1023px) {
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-account { display: none; }
  .nav-burger { display: inline-flex; min-height: 44px; }
  .nav-inner { padding-top: max(.85rem, env(safe-area-inset-top)); }
}

/* Menu mobile plein écran */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #1f1a03;
  display: flex;
  flex-direction: column;
  padding: max(1.4rem, env(safe-area-inset-top)) max(2rem, env(safe-area-inset-right))
           max(2.5rem, env(safe-area-inset-bottom)) max(2rem, env(safe-area-inset-left));
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu-top { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 3.5rem; }
.mobile-menu-close {
  display: flex; align-items: center; gap: .5rem;
  background: none; border: none; cursor: pointer;
  font-family: 'Urbanist', system-ui, sans-serif;
  font-weight: 400; font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(252, 255, 233, .5);
}
.mobile-menu-close svg { width: 16px; height: 16px; stroke: rgba(252, 255, 233, .5); stroke-width: 1.5; fill: none; }
.mobile-menu-nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.mobile-menu-nav a {
  font-family: 'Urbanist', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(2rem, 9vw, 3.5rem);
  line-height: 1.15;
  color: #fcffe9;
  text-decoration: none;
  letter-spacing: -.02em;
  transition: color .15s;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  padding: 0;
}
.mobile-menu-nav a:hover { color: #d9ff50; }
.mobile-menu-bottom { display: flex; flex-direction: column; gap: .75rem; padding-top: 2rem; border-top: 1px solid rgba(252, 255, 233, .1); }
.mobile-menu-bottom a, .mobile-menu-bottom button {
  font-family: 'Urbanist', system-ui, sans-serif;
  font-size: .95rem; color: rgba(252, 255, 233, .55);
  text-decoration: none; transition: color .15s;
  background: none; border: none; text-align: left; padding: 0; cursor: pointer;
}
.mobile-menu-bottom a:hover, .mobile-menu-bottom button:hover { color: #fcffe9; }
