/* Nav auth — profil + menu déroulant (comme site legacy) */

.user-profile {
  position: relative;
  z-index: 20;
}

.user-pill__avatar-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: visible;
  border: 2px solid var(--border);
  display: block;
  background: var(--surface);
  position: relative;
  flex-shrink: 0;
}

.user-pill__avatar-wrap > img:not(.deco-layer) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.user-pill__chev {
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s var(--ease);
}

.user-pill.active .user-pill__chev {
  transform: rotate(180deg);
}

.user-pill.active {
  border-color: rgba(155, 140, 248, 0.45);
  background: rgba(155, 140, 248, 0.08);
}

.premium-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--nav-dropdown-bg, rgba(0, 0, 0, 0.02));
  backdrop-filter: var(--nav-dropdown-blur, blur(6px));
  -webkit-backdrop-filter: var(--nav-dropdown-blur, blur(6px));
  border: 1px solid var(--nav-dropdown-border, rgba(255, 255, 255, 0.04));
  border-radius: 14px;
  width: 268px;
  padding: 0;
  display: none;
  flex-direction: column;
  z-index: 1000;
  box-shadow: var(--nav-dropdown-shadow, none);
  overflow: visible;
  max-height: min(70vh, 520px);
  transition:
    background 0.4s var(--ease),
    border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease),
    backdrop-filter 0.4s var(--ease),
    -webkit-backdrop-filter 0.4s var(--ease);
}

.premium-dropdown.open {
  display: flex;
}

.premium-dropdown__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  overflow: visible;
  flex-shrink: 0;
  transition: border-color 0.4s var(--ease);
}

.header--scrolled .premium-dropdown__head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.premium-dropdown__avatar {
  width: 72px;
  height: 72px;
  position: relative;
  flex-shrink: 0;
  overflow: visible;
  border-radius: 0;
}

.premium-dropdown__avatar > img:not(.deco-layer) {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}

.premium-dropdown__meta {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.premium-dropdown__name {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.premium-dropdown__role {
  font-size: 11px;
  font-weight: 800;
  color: #e76f51;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

.premium-dropdown__role--vip { color: #ff9500; }
.premium-dropdown__role--staff { color: var(--accent, #9b8cf8); }
.premium-dropdown__role--founder { color: #ffd700; }

.pd-staff-link {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.25);
  border-radius: 8px;
  color: #f5a623;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  font-family: inherit;
  width: fit-content;
  transition: background 0.2s, border-color 0.2s;
}

.pd-staff-link:hover {
  background: rgba(245, 166, 35, 0.18);
  border-color: rgba(245, 166, 35, 0.4);
}

.premium-dropdown__body {
  padding: 10px 0 8px;
  position: relative;
  z-index: 3;
  background: transparent;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  border-radius: 0 0 14px 14px;
}

.avatar-stack {
  position: relative;
  overflow: visible !important;
}

.avatar-stack > img:not(.deco-layer) {
  position: relative;
  z-index: 1;
}

.pd-item {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.65);
  padding: 10px 20px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.pd-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.header--scrolled .pd-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Décoration Discord — cadre carré centré sur le cercle avatar (sans border-radius) */
.deco-layer,
.cm-pe-preview-avatar-deco,
.cm-avatar-stack-deco,
.cm-public-avatar-deco,
.avatar-deco {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 118%;
  height: 118%;
  max-width: none !important;
  max-height: none !important;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  object-fit: contain;
  border-radius: 0 !important;
}

.pg-avatar-box .deco-layer,
.pg-avatar-box .avatar-deco {
  width: 118%;
  height: 118%;
}

.user-pill__avatar-wrap .deco-layer,
.avatar-stack--sm .deco-layer {
  width: 118%;
  height: 118%;
}

.premium-dropdown__avatar .deco-layer,
.avatar-stack--md .deco-layer {
  width: 118%;
  height: 118%;
}

.pg-avatar-box > img:not(.deco-layer) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  display: block;
}

.pd-item--premium {
  color: #ff9500;
  font-weight: 700;
  background: rgba(247, 127, 0, 0.08);
}

.pd-item--premium:hover {
  background: rgba(247, 127, 0, 0.14);
}

.pd-item--logout {
  color: #e76f51;
  margin-top: 4px;
}

.pd-item--staff {
  color: #f5a623;
  border-top: 1px solid rgba(245, 166, 35, 0.15);
  margin-top: 4px;
  padding-top: 12px;
}

@media (max-width: 768px) {
  .premium-dropdown {
    right: -8px;
    width: min(268px, calc(100vw - 24px));
  }
  #navUsername {
    display: inline;
    max-width: 88px;
    font-size: 0.68rem;
  }
  .user-pill {
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    max-width: min(168px, 42vw);
    gap: 0.35rem;
  }
  .user-pill__chev {
    display: none;
  }
}

.nav__link--tv {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
  vertical-align: middle;
}

.nav__links {
  align-items: center;
}

.nav__links > li {
  display: flex;
  align-items: center;
}

.nav-tv-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-deep, #6b5ce7), var(--accent, #9b8cf8));
  color: #fff;
  box-shadow: 0 4px 12px rgba(155, 140, 248, 0.28);
  transform: translateY(1px);
}
