@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&display=swap');

/* ══════════════════════════════════════════
   TOPBAR PREMIUM v2
══════════════════════════════════════════ */
.topbar {
  background: rgba(4,6,14,.96) !important;
  backdrop-filter: blur(22px) !important;
  -webkit-backdrop-filter: blur(22px) !important;
  border-bottom: 1px solid rgba(255,154,47,.12) !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.50) !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  z-index: 1000 !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 10px !important;
  gap: 8px !important;
}

/* Trait lumineux animé en bas */
.topbar::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 20% !important;
  right: 20% !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(255,154,47,.55), rgba(255,200,100,.35), transparent) !important;
  pointer-events: none !important;
  animation: nova-topbar-glow 5s ease-in-out infinite alternate !important;
}

@keyframes nova-topbar-glow {
  from { left: 30%; right: 30%; opacity: .45; }
  to   { left: 6%;  right: 6%;  opacity: .85; }
}

/* Brand */
.top-brand {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.06rem !important;
  font-weight: 900 !important;
  letter-spacing: -.2px !important;
  background: linear-gradient(90deg, #fff4dc 0%, #ffca6e 32%, #ff9a2f 68%, #ff5e00 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  filter: drop-shadow(0 0 10px rgba(255,154,47,.28)) !important;
}

.top-brand::after { display: none !important; }

/* Actions — flex sur une ligne */
.topbar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 5px !important;
  width: 100% !important;
}

/* Pill salon actif */
#navRooms.top-pill {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  max-width: 160px !important;
  height: 34px !important;
  border-radius: 10px !important;
  padding: 0 10px !important;
  background: rgba(255,154,47,.09) !important;
  border: 1px solid rgba(255,154,47,.20) !important;
  color: #ffb347 !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transition: background .15s, border-color .15s !important;
}

#navRooms.top-pill:hover {
  background: rgba(255,154,47,.16) !important;
  border-color: rgba(255,154,47,.35) !important;
}

#navRooms.top-pill:active { transform: scale(.96) !important; }

/* Icônes */
.top-icon {
  flex-shrink: 0 !important;
  width: 36px !important;
  height: 34px !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.06) !important;
  color: #6a7fa8 !important;
  font-size: 15px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .15s, border-color .15s, color .15s, transform .1s !important;
  cursor: pointer !important;
  padding: 0 !important;
}

.top-icon:hover {
  background: rgba(255,154,47,.11) !important;
  border-color: rgba(255,154,47,.26) !important;
  color: #ff9a2f !important;
}

.top-icon:active { transform: scale(.91) !important; }

/* Bouton Menu — légèrement mis en avant */
#navMenu.top-icon {
  background: rgba(255,154,47,.10) !important;
  border-color: rgba(255,154,47,.22) !important;
  color: #ff9a2f !important;
}

#navMenu.top-icon:hover {
  background: rgba(255,154,47,.20) !important;
  border-color: rgba(255,154,47,.40) !important;
}

/* Hamburger 3 lignes SVG */
.nav-menu-lines {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  align-items: center !important;
  pointer-events: none !important;
}

.nav-menu-lines span {
  display: block !important;
  height: 1.5px !important;
  border-radius: 2px !important;
  background: currentColor !important;
  transition: width .18s !important;
}

.nav-menu-lines span:nth-child(1) { width: 16px !important; }
.nav-menu-lines span:nth-child(2) { width: 12px !important; }
.nav-menu-lines span:nth-child(3) { width: 16px !important; }

#navMenu:hover .nav-menu-lines span { width: 16px !important; }

/* ══════════════════════════════════════════
   MENU DRAWER PREMIUM v2
══════════════════════════════════════════ */
#drawer, .drawer {
  background: linear-gradient(170deg, rgba(5,7,18,.99) 0%, rgba(3,5,12,.995) 100%) !important;
  border-left: 1px solid rgba(255,154,47,.09) !important;
  box-shadow: -32px 0 64px rgba(0,0,0,.60) !important;
}

#drawer .drawer-head, .drawer-head {
  background: linear-gradient(160deg, rgba(10,14,28,.97), rgba(6,9,20,.98)) !important;
  border-bottom: 1px solid rgba(255,154,47,.09) !important;
  padding: 20px 18px 15px !important;
}

.drawer-head h3, #drawerTitle {
  font-family: 'Outfit', sans-serif !important;
  font-size: 21px !important;
  font-weight: 900 !important;
  background: linear-gradient(90deg, #ff9a2f, #ffcc80) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  letter-spacing: -.3px !important;
  line-height: 1.1 !important;
  margin: 0 !important;
}

.drawer-head p, #drawerSub {
  font-family: 'Outfit', sans-serif !important;
  font-size: 12px !important;
  color: #3a4e72 !important;
  margin-top: 4px !important;
  letter-spacing: .1px !important;
}

.drawer-close {
  flex-shrink: 0 !important;
  align-self: flex-start !important;
  margin-top: 1px !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255,154,47,.18) !important;
  background: rgba(255,154,47,.07) !important;
  color: #ff9a2f !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background .18s, transform .1s !important;
}

.drawer-close:hover  { background: rgba(255,154,47,.18) !important; border-color: rgba(255,154,47,.35) !important; }
.drawer-close:active { transform: scale(.9) !important; }

.drawer-body, #drawerBody {
  padding: 14px 12px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255,154,47,.18) transparent !important;
}

/* ── Wallet card ───────────────────────────────────────────────── */
.menu-wallet-card {
  border-radius: 16px !important;
  border: 1px solid rgba(255,154,47,.20) !important;
  background: linear-gradient(135deg, rgba(22,14,5,.97), rgba(34,20,6,.97), rgba(18,11,3,.97)) !important;
  padding: 14px 16px !important;
  margin-bottom: 6px !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 4px 22px rgba(255,154,47,.07), inset 0 1px 0 rgba(255,154,47,.12) !important;
}

.menu-wallet-card::before {
  content: '' !important;
  position: absolute !important;
  top: -30px !important; right: -30px !important;
  width: 100px !important; height: 100px !important;
  border-radius: 50% !important;
  background: radial-gradient(circle, rgba(255,154,47,.07), transparent 70%) !important;
  pointer-events: none !important;
}

.menu-wallet-row {
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
}

.menu-wallet-item {
  flex: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.menu-wallet-sep {
  width: 1px !important;
  height: 28px !important;
  background: rgba(255,154,47,.14) !important;
  margin: 0 12px !important;
  flex-shrink: 0 !important;
}

.menu-wallet-icon {
  font-size: 18px !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.menu-wallet-val {
  font-family: 'Outfit', sans-serif !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  color: #ff9a2f !important;
  line-height: 1 !important;
}

.menu-wallet-val--rep { color: #7ab4ff !important; }

.menu-wallet-lbl {
  font-family: 'Outfit', sans-serif !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #3a5070 !important;
  text-transform: uppercase !important;
  letter-spacing: .8px !important;
  margin-top: 2px !important;
}

/* ── CTA créer compte ──────────────────────────────────────────── */
.menu-register-cta {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 44px !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, rgba(0,210,100,.11), rgba(0,168,80,.07)) !important;
  border: 1px solid rgba(0,220,110,.18) !important;
  color: #00e87a !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  letter-spacing: .2px !important;
  transition: background .18s, border-color .18s !important;
  margin-bottom: 2px !important;
}

.menu-register-cta:hover {
  background: linear-gradient(135deg, rgba(0,230,110,.18), rgba(0,190,90,.13)) !important;
  border-color: rgba(0,240,120,.32) !important;
}

/* ── Séparateur section ────────────────────────────────────────── */
.menu-section-label {
  font-family: 'Outfit', sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #2d3e5c !important;
  text-transform: uppercase !important;
  letter-spacing: 1.4px !important;
  padding: 8px 4px 3px !important;
}

/* ── Menu buttons ──────────────────────────────────────────────── */
.menu-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.menu-btn {
  width: 100% !important;
  min-height: 50px !important;
  padding: 0 14px 0 12px !important;
  border-radius: 13px !important;
  border: 1px solid rgba(255,255,255,.045) !important;
  background: rgba(255,255,255,.022) !important;
  color: #b8ccec !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  text-align: left !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  transition: background .16s, border-color .16s, color .16s, transform .13s !important;
  letter-spacing: .1px !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Barre accent gauche */
.menu-btn::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 18% !important; bottom: 18% !important;
  width: 3px !important;
  border-radius: 0 3px 3px 0 !important;
  background: rgba(255,154,47,0) !important;
  transition: background .16s !important;
}

/* Flèche droite */
.menu-btn::after {
  content: '' !important;
  position: absolute !important;
  right: 14px !important;
  width: 5px !important; height: 5px !important;
  border-right: 1.5px solid rgba(255,154,47,.22) !important;
  border-top: 1.5px solid rgba(255,154,47,.22) !important;
  transform: rotate(45deg) !important;
  transition: border-color .16s, transform .16s !important;
}

.menu-btn:hover {
  background: rgba(255,154,47,.08) !important;
  border-color: rgba(255,154,47,.22) !important;
  color: #fff !important;
  transform: translateX(3px) !important;
}

.menu-btn:hover::before { background: rgba(255,154,47,.65) !important; }

.menu-btn:hover::after {
  border-color: rgba(255,154,47,.60) !important;
  transform: rotate(45deg) translateX(1px) !important;
}

.menu-btn:active { transform: translateX(2px) scale(.99) !important; }

/* Icône + label dans le bouton */
.menu-btn-icon {
  font-size: 17px !important;
  flex-shrink: 0 !important;
  line-height: 1 !important;
}

.menu-btn-label {
  flex: 1 !important;
  min-width: 0 !important;
}

/* Stagger animation à l'ouverture */
.menu-btn:nth-child(1)  { animation: nova-menu-in .22s .02s both !important; }
.menu-btn:nth-child(2)  { animation: nova-menu-in .22s .05s both !important; }
.menu-btn:nth-child(3)  { animation: nova-menu-in .22s .08s both !important; }
.menu-btn:nth-child(4)  { animation: nova-menu-in .22s .11s both !important; }
.menu-btn:nth-child(5)  { animation: nova-menu-in .22s .14s both !important; }
.menu-btn:nth-child(6)  { animation: nova-menu-in .22s .17s both !important; }
.menu-btn:nth-child(7)  { animation: nova-menu-in .22s .20s both !important; }

@keyframes nova-menu-in {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Bouton déconnexion */
.menu-btn--danger {
  background: rgba(160,18,0,.08) !important;
  border-color: rgba(200,35,0,.18) !important;
  color: #d46060 !important;
  margin-top: 10px !important;
}

.menu-btn--danger::before { display: none !important; }
.menu-btn--danger::after  { display: none !important; }

.menu-btn--danger:hover {
  background: rgba(200,28,0,.18) !important;
  border-color: rgba(255,55,55,.30) !important;
  color: #ff9898 !important;
  transform: none !important;
}

/* ══════════════════════════════════════════
   REGISTER MODAL FIX TOTAL
══════════════════════════════════════════ */
#chatnovaRegisterModalCore {
  z-index: 999999 !important;
  pointer-events: auto !important;
}

#chatnovaRegisterModalCore,
#chatnovaRegisterModalCore *,
#chatnovaRegisterModalCore button,
#chatnovaRegisterModalCore input {
  pointer-events: auto !important;
}

#chatnovaRegisterModalCore > div {
  background: linear-gradient(160deg,rgba(8,12,28,.98),rgba(4,6,15,.99)) !important;
  border: 1px solid rgba(255,154,47,.15) !important;
  border-radius: 22px !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(255,154,47,.06) !important;
  position: relative !important;
  pointer-events: auto !important;
}

#registerModalClose {
  position: absolute !important;
  top: 12px !important; right: 12px !important;
  width: 32px !important; height: 32px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255,154,47,.25) !important;
  background: rgba(255,154,47,.10) !important;
  color: #ff9a2f !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  z-index: 10 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent !important;
}

#registerModalClose:hover {
  background: rgba(255,154,47,.25) !important;
}

#registerModalSubmit {
  background: linear-gradient(135deg,#ff9a2f,#c45a00) !important;
  border: none !important;
  color: #fff !important;
  font-family: 'Outfit',sans-serif !important;
  font-weight: 800 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 16px rgba(255,154,47,.28) !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* ══ SCROLL INDICATOR ══ */
.nova-scroll-hint {
  position: sticky;
  bottom: 0;
  height: 48px;
  background: linear-gradient(to top, rgba(4,6,15,.95), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
  pointer-events: none;
  transition: opacity .3s;
}

.nova-scroll-hint::after {
  content: '↓';
  color: #ff9a2f;
  font-size: 14px;
  font-weight: 800;
  animation: nova-bounce 1.2s ease-in-out infinite;
}

@keyframes nova-bounce {
  0%,100% { transform: translateY(0); opacity:.6; }
  50%      { transform: translateY(4px); opacity:1; }
}

/* ══ EVENTS IRC COULEURS ══ */

/* Join → vert */
.msg--event-join {
  border-left: 3px solid #22c55e !important;
  background: rgba(34,197,94,.04) !important;
}
.msg--event-join .msg__nick { color: #22c55e !important; }
.msg--event-join .msg__text { color: #86efac !important; }

/* Part/Quit → gris */
.msg--event-part, .msg--event-quit {
  border-left: 3px solid #4a5a78 !important;
  background: rgba(74,90,120,.04) !important;
}
.msg--event-part .msg__nick,
.msg--event-quit .msg__nick { color: #4a5a78 !important; }
.msg--event-part .msg__text,
.msg--event-quit .msg__text { color: #4a5a78 !important; }

/* Kick/Ban → rouge */
.msg--event-kick, .msg--event-ban {
  border-left: 3px solid #ef4444 !important;
  background: rgba(239,68,68,.06) !important;
}
.msg--event-kick .msg__nick,
.msg--event-ban .msg__nick { color: #ef4444 !important; }
.msg--event-kick .msg__text,
.msg--event-ban .msg__text { color: #fca5a5 !important; }

/* Mode → bleu */
.msg--event-mode {
  border-left: 3px solid #6ea8ff !important;
  background: rgba(110,168,255,.04) !important;
}
.msg--event-mode .msg__nick { color: #6ea8ff !important; }
.msg--event-mode .msg__text { color: #bfdbfe !important; }

/* Highlight → orange vif */
.msg--highlight {
  border-left: 3px solid #ff9a2f !important;
  background: rgba(255,154,47,.08) !important;
}
.msg--highlight .msg__nick { color: #ff9a2f !important; }
.msg--highlight .msg__text { color: #fed7aa !important; font-weight: 600 !important; }

/* Notification highlight inter-salon */
.msg--event-crosshighlight {
  border-left: 3px solid #ef4444 !important;
  background: rgba(239,68,68,.08) !important;
}
.msg--event-crosshighlight .msg__nick { color: #ef4444 !important; font-weight: 800 !important; }
.msg--event-crosshighlight .msg__text { color: #fca5a5 !important; }

/* ── Topbar + composer fixes ── */
.chat-view:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  height: 100dvh !important;
  padding-top: 58px !important;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
}
.chat-view.hidden {
  display: none !important;
}
.chat-main {
  flex: 1 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
.chat-view:not(.hidden) #composerForm,
.chat-view:not(.hidden) .composer {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 999 !important;
  padding-bottom: env(safe-area-inset-bottom, 0px) !important;
}
