/* Fond commun du site: dégradé bleu nuit et canvas d'étoiles (assets/starfield.js). */
:root {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(0, 112, 218, 0.18), transparent 52%),
    #050b18;
}

/* Le corps doit rester transparent pour laisser voir le canvas placé derrière. */
body { background: transparent; }

#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Barre de navigation commune (assets/nav.js) */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  height: 82px;
  margin: 0;
  padding-inline: max(32px, calc((100vw - 1600px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 11, 24, 0.84);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(197, 219, 255, 0.12);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #f4f8ff;
  font-family: "Source Sans 3", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
}

.brand-logo { display: block; width: 42px; height: 42px; flex: 0 0 auto; object-fit: contain; }

.nav-actions { position: relative; display: flex; align-items: center; gap: 12px; }

.login-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 5px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.login-button:hover { border-color: #fff; background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav-account-avatar { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.72); border-radius: 50%; background: var(--nav-avatar-color, #66e4ff); color: #071323; font-size: 0.88rem; font-weight: 700; }
.nav-account-avatar[hidden], .nav-account-avatar-image[hidden], .nav-account-avatar-letter[hidden] { display: none !important; }
.nav-account-avatar-image { width: 100%; height: 100%; object-fit: cover; }

.burger-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 5px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.burger-button:hover, .burger-button[aria-expanded="true"] { background: rgba(255, 255, 255, 0.1); }

.burger-line { display: block; width: 19px; height: 1.5px; background: currentColor; transition: transform 180ms ease; }
.burger-button[aria-expanded="true"] .burger-line:first-child { transform: translateY(6.5px) rotate(45deg); }
.burger-button[aria-expanded="true"] .burger-line:nth-child(2) { opacity: 0; }
.burger-button[aria-expanded="true"] .burger-line:last-child { transform: translateY(-6.5px) rotate(-45deg); }

.site-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 210px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: #101725;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
}

.site-menu[hidden] { display: none; }

.site-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 3px;
  color: #f4f8ff;
  font-size: 0.92rem;
  text-decoration: none;
}

.site-menu a:hover { background: rgba(255, 255, 255, 0.1); }

@media (max-width: 760px) {
  .navbar { height: 68px; padding-inline: 16px; }
  .nav-actions { gap: 8px; }
  .brand-logo { width: 38px; height: 38px; }
  .login-button { min-height: 38px; padding: 0 10px; }
  .burger-button { width: 38px; height: 38px; }
}

@media (max-width: 390px) {
  .brand { font-size: 1.05rem; }
  .brand-logo { width: 34px; height: 34px; }
  .login-button { font-size: 0.82rem; }
}
