* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
  background-color: #0c1317; 
  color: #e9edef; 
  height: 100vh; 
  overflow: hidden; 
  font-family: 'Plus Jakarta Sans', sans-serif; 
  display: flex; 
  flex-direction: column; 
}

/* Arrière-plan animé Néon / Cyberpunk */
.cyber-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 85% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 40%);
}
.neon-glow {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: floatGlow 12s ease-in-out infinite alternate;
}
.glow-1 { top: -120px; left: -120px; background: rgba(56, 189, 248, 0.15); }
.glow-2 { bottom: -120px; right: -120px; background: rgba(168, 85, 247, 0.12); animation-delay: -6s; }

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 50px) scale(1.15); }
}

.wa-app-container { 
  display: flex; 
  width: 100vw; 
  height: calc(100vh - 60px); 
  max-width: 1600px; 
  margin: 0 auto; 
  background: rgba(17, 27, 33, 0.82); 
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6); 
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  z-index: 1;
}

/* Sidebar */
.wa-sidebar { width: 380px; border-right: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; background: rgba(17, 27, 33, 0.9); }
.wa-sidebar-header { padding: 12px 18px; background: rgba(32, 44, 51, 0.85); display: flex; align-items: center; height: 65px; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.wa-user-profile-header { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 0.95rem; }
.wa-header-actions button { background: transparent; border: none; color: #aebac1; font-size: 1.15rem; cursor: pointer; transition: color 0.2s, transform 0.2s; }
.wa-header-actions button:hover { color: #38bdf8; transform: scale(1.1); }

.wa-search-container { padding: 10px 14px; background: transparent; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.wa-search-box { display: flex; align-items: center; background: rgba(32, 44, 51, 0.9); border-radius: 10px; padding: 8px 14px; gap: 12px; color: #8696a0; border: 1px solid rgba(255,255,255,0.04); transition: border-color 0.2s; }
.wa-search-box:focus-within { border-color: rgba(56, 189, 248, 0.4); }
.wa-search-box input { background: transparent; border: none; outline: none; color: #fff; width: 100%; font-size: 0.9rem; }

.wa-chat-list { flex: 1; overflow-y: auto; }
.wa-chat-item { display: flex; align-items: center; padding: 14px 18px; gap: 15px; cursor: pointer; border-bottom: 1px solid rgba(255, 255, 255, 0.03); transition: all 0.2s ease; position: relative; }
.wa-chat-item:hover, .wa-chat-item.active { background: rgba(32, 44, 51, 0.75); }
.wa-chat-item.pinned { background: rgba(56, 189, 248, 0.06); border-left: 3px solid #38bdf8; }

.wa-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #38bdf8, #0284c7); display: flex; align-items: center; justify-content: center; font-weight: bold; color: #fff; overflow: hidden; flex-shrink: 0; box-shadow: 0 2px 10px rgba(56,189,248,0.25); }
.wa-avatar img { width: 100%; height: 100%; object-fit: cover; }

.wa-chat-info { flex: 1; min-width: 0; }
.wa-chat-name-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.wa-chat-name { font-weight: 600; font-size: 0.95rem; color: #e9edef; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.wa-chat-preview { font-size: 0.85rem; color: #8696a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Chat Area */
.wa-chat-area { flex: 1; display: flex; flex-direction: column; background: rgba(11, 20, 26, 0.65); position: relative; }
.wa-chat-header { padding: 12px 20px; background: rgba(32, 44, 51, 0.85); display: flex; align-items: center; justify-content: space-between; height: 65px; z-index: 10; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.wa-chat-actions { display: flex; gap: 18px; }
.wa-chat-actions button { background: none; border: none; color: #aebac1; font-size: 1.15rem; cursor: pointer; transition: color 0.2s, transform 0.2s; }
.wa-chat-actions button:hover { color: #38bdf8; transform: scale(1.1); }

.wa-messages-container { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.wa-welcome-placeholder { margin: auto; text-align: center; color: #8696a0; max-width: 400px; padding: 20px; }
.placeholder-logo-glow { font-size: 4rem; margin-bottom: 15px; color: #38bdf8; animation: floatIcon 3s ease-in-out infinite; text-shadow: 0 0 20px rgba(56,189,248,0.4); }
.wa-welcome-placeholder h3 { color: #fff; margin-bottom: 8px; font-size: 1.2rem; }
.wa-welcome-placeholder p { font-size: 0.9rem; line-height: 1.5; }

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Messages Bubbles */
.wa-message { max-width: 65%; padding: 10px 14px; border-radius: 12px; font-size: 0.9rem; position: relative; word-break: break-word; box-shadow: 0 2px 8px rgba(0,0,0,0.2); animation: fadeInMsg 0.2s ease; }
@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.wa-message.incoming { background: rgba(32, 44, 51, 0.9); align-self: flex-start; border-top-left-radius: 4px; border: 1px solid rgba(255,255,255,0.04); }
.wa-message.outgoing { background: linear-gradient(135deg, #005c4b, #008069); align-self: flex-end; border-top-right-radius: 4px; }
.wa-message-meta { display: flex; justify-content: flex-end; align-items: center; gap: 6px; font-size: 0.7rem; color: #8696a0; margin-top: 4px; }
.wa-message-actions { display: inline-flex; gap: 8px; margin-left: 8px; opacity: 0.75; }
.wa-message-actions i { cursor: pointer; transition: color 0.2s; }
.wa-message-actions i:hover { color: #38bdf8; }

/* Edit mode banner */
.edit-mode-banner {
  background: rgba(32, 44, 51, 0.95);
  padding: 8px 18px;
  font-size: 0.85rem;
  color: #38bdf8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(56, 189, 248, 0.2);
  backdrop-filter: blur(10px);
}
.cancel-edit-btn { background: none; border: none; color: #f43f5e; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 4px; }

/* Input Footer */
.wa-input-footer { padding: 14px 24px; background: rgba(32, 44, 51, 0.85); display: flex; align-items: center; gap: 15px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.wa-input-box { flex: 1; background: rgba(42, 57, 66, 0.9); border-radius: 12px; padding: 10px 16px; display: flex; align-items: center; border: 1px solid rgba(255,255,255,0.05); transition: border-color 0.2s; }
.wa-input-box:focus-within { border-color: rgba(56, 189, 248, 0.4); }
.wa-input-box input { background: transparent; border: none; outline: none; color: #fff; width: 100%; font-size: 0.95rem; }
.wa-send-btn { background: linear-gradient(135deg, #38bdf8, #0284c7); border: none; color: #fff; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 15px rgba(56,189,248,0.3); }
.wa-send-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(56,189,248,0.4); }

/* Badges & Icons */
.badge-admin { background: rgba(244, 63, 94, 0.15); color: #f43f5e; padding: 2px 8px; border-radius: 6px; font-size: 0.65rem; font-weight: 700; border: 1px solid rgba(244,63,94,0.2); }
.pinned-icon { color: #facc15; font-size: 0.8rem; }

/* Modal d'invitation */
.wa-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; z-index: 2000; animation: fadeInModal 0.2s ease; }
.wa-modal-overlay.active { display: flex; }
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}
.wa-modal { background: rgba(17, 27, 33, 0.95); border: 1px solid rgba(255,255,255,0.08); padding: 30px; border-radius: 20px; width: 420px; max-width: 90%; text-align: center; color: #fff; box-shadow: 0 20px 40px rgba(0,0,0,0.6); backdrop-filter: blur(16px); }
.modal-icon-header { font-size: 2.2rem; color: #38bdf8; margin-bottom: 12px; }
.wa-modal h3 { margin-bottom: 10px; font-size: 1.25rem; font-weight: 700; }
.wa-modal p { font-size: 0.85rem; color: #8696a0; margin-bottom: 22px; line-height: 1.5; }
.social-invite-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.social-btn { padding: 12px; border-radius: 10px; font-weight: 600; text-decoration: none; color: #fff; display: flex; align-items: center; justify-content: center; gap: 10px; border: none; cursor: pointer; font-size: 0.9rem; transition: transform 0.2s, filter 0.2s; }
.social-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.social-btn.wa { background: #25d366; }
.social-btn.tg { background: #2481cc; }
.social-btn.tw { background: #1da1f2; }
.social-btn.copy { background: #374151; }
.wa-close-modal { background: transparent; border: 1px solid rgba(255,255,255,0.1); color: #9ca3af; padding: 10px 16px; border-radius: 10px; cursor: pointer; width: 100%; font-weight: 600; transition: 0.2s; }
.wa-close-modal:hover { background: rgba(255,255,255,0.05); color: #fff; }