/* One layout for the application header and the public games catalogue. */
.header, .header.scrolled, .site-header {
  --public-header-height: 84px;
  min-height: var(--public-header-height);
  height: var(--public-header-height);
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: rgba(7,7,11,.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  z-index: 1000;
  transition: background .2s, border-color .2s;
}
.header .header-content, .site-header .topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1320px,calc(100% - 48px));
  height: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  gap: 24px;
}
.header .logo, .site-header .brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.header .logo-img, .site-header .brand img { width: 42px; height: 42px; object-fit: contain; }
.header .nav, .site-header .primary-nav { position: static; inset: auto; transform: none; margin: 0; }
.header .nav-links, .site-header .primary-nav { display: flex; align-items: center; justify-content: center; gap: clamp(16px,1.6vw,26px); margin: 0; padding: 0; list-style: none; }
.header .nav-links a, .site-header .primary-nav a { display: flex; align-items: center; gap: 7px; padding: 13px 0; color: #a5a5af; font-size: 14px; font-weight: 700; line-height: 1.4; white-space: nowrap; text-decoration: none; }
.header .nav-links a:hover, .site-header .primary-nav a:hover { color: #fff; }
.header .nav-links a::after { bottom: 7px; box-shadow: none; }
.header .games-site-nav-entry small, .site-header .new-badge { padding: 3px 5px; border: 1px solid rgba(80,225,166,.24); border-radius: 5px; background: rgba(80,225,166,.1); color: #77efbd; font-size: 7px; font-weight: 900; line-height: normal; }
.header .header-actions { display: flex; flex: 0 0 auto; }
.header .header-actions .btn-dashboard, .site-header .desktop-dashboard { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 50px; padding: 0 26px; gap: 9px; border-radius: 999px; background: linear-gradient(135deg,#ff1748,#e9003e); box-shadow: 0 14px 28px -11px rgba(255,23,72,.72); font-size: 14px; font-weight: 850; }
.header .header-actions .btn-dashboard svg { width: 17px; height: 17px; }
.header .menu-toggle, .site-header .mobile-menu, .header .nav-mobile-dashboard { display: none; }
.header a:focus-visible, .header button:focus-visible, .site-header a:focus-visible, .site-header summary:focus-visible { outline: 2px solid #ff6485; outline-offset: 5px; }
#accueil, #chaos-live-plus, #chaos-plus, #personnage-custom, #avis-communaute { scroll-margin-top: 104px; }

@media (max-width:1180px) {
  .header, .header.scrolled, .site-header { --public-header-height: 80px; }
  .header .header-content, .site-header .topbar { position: static; width: calc(100% - 32px); gap: 12px; }
  .header .logo, .site-header .brand { gap: 9px; font-size: 22px; }
  .header .logo-img, .site-header .brand img { width: 40px; height: 40px; }
  .header .header-actions, .site-header .desktop-dashboard, .site-header .primary-nav { display: none; }
  .header .menu-toggle, .site-header .mobile-menu { display: flex; flex: 0 0 auto; margin: 0 0 0 auto; }
  .site-header .mobile-menu { position: static; }
  .header .menu-toggle, .site-header .mobile-menu summary { width: 46px; height: 46px; align-items: center; justify-content: center; padding: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.04); }
  .header .menu-toggle span, .site-header .mobile-menu summary span { width: 20px; height: 2px; }
  .header .menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .header .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .header .menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .header .nav, .site-header .mobile-panel {
    /* A fixed child of a backdrop-filter header otherwise inherits its 80px box. */
    position: absolute;
    inset: 100% 0 auto;
    width: 100%;
    height: calc(100vh - var(--public-header-height));
    height: calc(100dvh - var(--public-header-height));
    max-height: none;
    box-sizing: border-box;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px 24px max(32px,env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    border-radius: 0;
    background: #0b0b10;
    box-shadow: none;
    transform: none;
    transition: opacity .15s, visibility .15s;
  }
  .header .nav { opacity: 0; visibility: hidden; pointer-events: none; }
  .header .nav.open { opacity: 1; visibility: visible; pointer-events: auto; }
  .site-header .mobile-menu:not([open]) .mobile-panel { display: none; }
  .header .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: min(460px,100%); margin: 0 auto; }
  .header .nav-links li { width: 100%; }
  .header .nav-links a, .site-header .mobile-panel a { display: flex; align-items: center; justify-content: flex-start; gap: 9px; min-height: 52px; width: 100%; padding: 12px 16px; border-radius: 12px; color: #e9e9ef !important; font-size: 18px; font-weight: 700; line-height: 1.4; white-space: normal; }
  .site-header .mobile-panel a { width: min(460px,100%); margin: 0 auto 4px; }
  .header .nav-links a::after { display: none; }
  .header .nav-links a:hover, .site-header .mobile-panel a:hover { background: rgba(255,255,255,.06); }
  .header .nav-mobile-dashboard { display: block; margin-top: 16px; }
  .header .nav-links .nav-dashboard-link, .site-header .mobile-panel .mobile-dashboard { justify-content: center; min-height: 52px; background: #ff003c; color: #fff !important; font-size: 16px !important; }
  .header .nav-dashboard-link svg { width: 18px; height: 18px; flex: 0 0 auto; }
  html:has(.site-header .mobile-menu[open]) { overflow: hidden; }
}
@media (max-width:400px) {
  .header .logo, .site-header .brand { font-size: 19px; gap: 7px; }
  .header .logo-img, .site-header .brand img { width: 36px; height: 36px; }
  .header .nav, .site-header .mobile-panel { padding-inline: 16px; }
}
@media (prefers-reduced-motion:reduce) { .header .nav, .site-header .mobile-panel { transition: none; } }
