/* =============================================
   SOCIALNET - Feuille de styles principale
   Thème : Bleu clair & Blanc | Style moderne
   ============================================= */

/* ---- Variables CSS ---- */
:root {
  --primary:        #0A84FF;
  --primary-hover:  #0070E0;
  --primary-light:  #E8F3FF;
  --primary-faint:  #F0F7FF;
  --white:          #FFFFFF;
  --bg:             #F2F5F9;
  --bg-card:        #FFFFFF;
  --border:         #E2E8F0;
  --border-light:   #EEF2F7;
  --text-primary:   #0D1117;
  --text-secondary: #6B7889;
  --text-muted:     #9BAABE;
  --red:            #E53935;
  --red-light:      #FFEBEE;
  --green:          #00C875;
  --gold:           #FFB800;
  --silver:         #A0AEC0;
  --bronze:         #CD7F32;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:      0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      18px;
  --radius-full:    9999px;
  --font:           'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --transition:     all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w:      260px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: inherit;
}

input, textarea {
  font-family: var(--font);
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

img { display: block; }

/* =============================================
   SPLASH SCREEN
   ============================================= */
.splash-screen {
  position: fixed;
  inset: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  z-index: 9999;
  animation: splashFade 0.4s ease 1.6s forwards;
}

.splash-logo {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
}

.splash-s { color: var(--primary); }
.splash-net { color: var(--primary); }

.splash-loader {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.splash-bar {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  animation: splashProgress 1.4s ease forwards;
}

@keyframes splashProgress {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes splashFade {
  to { opacity: 0; pointer-events: none; visibility: hidden; }
}

/* =============================================
   LAYOUT PRINCIPAL (Sidebar + Content)
   ============================================= */
.app-layout {
  display: flex;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* ---- SIDEBAR ---- */
.sidebar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-600px); /* center offset for 1200px max-width */
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  padding: 8px 12px 24px;
  display: block;
}

.sidebar-logo .logo-dot { color: var(--primary); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
}

.nav-item:hover {
  background: var(--primary-faint);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

/* Profil utilisateur dans la sidebar */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border-top: 1px solid var(--border-light);
  margin-top: 8px;
}

.sidebar-user:hover { background: var(--bg); }

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-user-handle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sidebar-logout {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  flex-shrink: 0;
}

.sidebar-logout:hover {
  background: var(--red-light);
  color: var(--red);
}

.sidebar-logout svg { width: 18px; height: 18px; }

/* ---- MAIN CONTENT ---- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  max-width: 680px;
  padding: 0;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
}

/* ---- RIGHT PANEL ---- */
.right-panel {
  width: 300px;
  padding: 24px 16px;
  flex-shrink: 0;
}

/* =============================================
   PAGE HEADER (dans la zone principale)
   ============================================= */
.page-header {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.page-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* =============================================
   CARTES POST
   ============================================= */
.posts-feed { padding: 0; }

.post-card {
  border-bottom: 1px solid var(--border-light);
  padding: 18px 20px;
  transition: background 0.15s;
  animation: fadeInUp 0.3s ease both;
}

.post-card:hover { background: var(--bg); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.post-author-info { flex: 1; }

.post-author-name {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: var(--transition);
}

.post-author-name:hover { color: var(--primary); }

.post-author-handle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.post-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-body {
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--text-primary);
  margin-bottom: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.like-btn:hover { background: var(--red-light); color: var(--red); }
.like-btn.liked { color: var(--red); }
.like-btn.liked:hover { background: var(--red-light); }

.like-btn svg { width: 18px; height: 18px; }

.like-btn.pop { animation: heartPop 0.3s ease; }

@keyframes heartPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* =============================================
   AVATARS
   ============================================= */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.avatar-xs  { width: 28px; height: 28px; }
.avatar-sm  { width: 36px; height: 36px; }
.avatar-md  { width: 44px; height: 44px; }
.avatar-lg  { width: 64px; height: 64px; }
.avatar-xl  { width: 88px; height: 88px; }
.avatar-xxl { width: 110px; height: 110px; }

.avatar-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

/* =============================================
   NOM KINANE (compte spécial)
   ============================================= */
.special-name {
  color: #C62828 !important;
  font-weight: 800 !important;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.verified-badge svg {
  width: 18px;
  height: 18px;
}

/* =============================================
   PROFIL UTILISATEUR
   ============================================= */
.profile-cover {
  height: 160px;
  background: linear-gradient(135deg, #0A84FF 0%, #3B9EFF 50%, #80CAFF 100%);
  position: relative;
}

.profile-header-content {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border-light);
}

.profile-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -55px;
  margin-bottom: 16px;
}

.profile-avatar-wrapper {
  position: relative;
}

.profile-avatar-wrapper .avatar {
  border: 4px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.profile-avatar-upload {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  cursor: pointer;
  transition: var(--transition);
}

.profile-avatar-wrapper:hover .profile-avatar-upload { opacity: 1; }

.profile-avatar-upload svg { width: 22px; height: 22px; color: white; }

.profile-username {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.profile-handle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.profile-stat {
  cursor: pointer;
  transition: var(--transition);
}

.profile-stat:hover .stat-value { color: var(--primary); }

.stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  transition: var(--transition);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* =============================================
   BOUTONS
   ============================================= */
.btn-primary {
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 22px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  border: 2px solid var(--primary);
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10,132,255,0.3);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 9px 22px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  transition: var(--transition);
  white-space: nowrap;
}

.btn-outline:hover {
  border-color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-follow {
  background: var(--text-primary);
  color: white;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 2px solid var(--text-primary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-follow svg { width: 14px; height: 14px; }

.btn-follow:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn-unfollow {
  background: transparent;
  color: var(--red);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--red);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-unfollow svg { width: 14px; height: 14px; }

.btn-unfollow:hover {
  background: var(--red-light);
  transform: translateY(-1px);
}

/* Bouton FAB (Floating Action Button) - nouveau post */
.fab {
  position: fixed;
  bottom: 28px;
  right: calc(50% - 600px + var(--sidebar-w) + 20px);
  background: var(--primary);
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(10,132,255,0.45);
  transition: var(--transition);
  z-index: 200;
  border: none;
  cursor: pointer;
}

.fab:hover {
  background: var(--primary-hover);
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(10,132,255,0.5);
}

.fab svg { width: 24px; height: 24px; }

/* =============================================
   COMPOSER (créer un post - dans le feed)
   ============================================= */
.composer-card {
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
}

.composer-inner {
  display: flex;
  gap: 12px;
}

.composer-fields { flex: 1; }

.composer-input {
  width: 100%;
  min-height: 68px;
  font-size: 1.05rem;
  resize: none;
  color: var(--text-primary);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.composer-input:focus { border-color: var(--primary); }
.composer-input::placeholder { color: var(--text-muted); }

.composer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.composer-char-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.composer-char-count.warning { color: var(--gold); }
.composer-char-count.danger  { color: var(--red); }

/* =============================================
   CHAT
   ============================================= */
.chat-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 65px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  animation: fadeInUp 0.2s ease both;
}

.chat-msg.own {
  flex-direction: row-reverse;
}

/* La wrap prend la largeur du contenu, plafonnée à 72% */
.chat-bubble-wrap {
  max-width: 72%;
  min-width: 0;
}

.chat-bubble-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 0.78rem;
}

.chat-msg.own .chat-bubble-meta {
  flex-direction: row-reverse;
}

.chat-bubble-author {
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.chat-bubble-author:hover { color: var(--primary); }

.chat-bubble-time {
  color: var(--text-muted);
}

/* La bulle elle-même : inline-block → colle au texte */
.chat-bubble {
  display: inline-block;
  max-width: 100%;
  background: var(--bg);
  border-radius: 18px 18px 18px 4px;
  padding: 9px 14px;
  font-size: 0.93rem;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
  border: 1px solid var(--border-light);
  box-sizing: border-box;
}

.chat-msg.own .chat-bubble {
  background: var(--primary);
  color: white;
  border-radius: 18px 18px 4px 18px;
  border-color: transparent;
}

/* Aligner la bulle à droite pour les messages envoyés */
.chat-msg.own .chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Nouvelle bulle animée */
.chat-msg.new-msg {
  animation: fadeInUp 0.22s cubic-bezier(0.4,0,0.2,1) both;
}

.chat-input-bar {
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: var(--white);
}

.chat-textarea {
  flex: 1;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  font-size: 0.93rem;
  color: var(--text-primary);
  resize: none;
  min-height: 44px;
  max-height: 120px;
  line-height: 1.5;
  transition: var(--transition);
}

.chat-textarea:focus {
  border-color: var(--primary);
  outline: none;
  background: var(--white);
}

.chat-textarea::placeholder { color: var(--text-muted); }

.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-send-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

.chat-send-btn svg { width: 18px; height: 18px; }

/* =============================================
   CLASSEMENT (RANKING)
   ============================================= */
.ranking-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.ranking-tab {
  flex: 1;
  padding: 14px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.ranking-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.ranking-tab:hover:not(.active) { color: var(--text-primary); }

.ranking-list { padding: 0; }

.ranking-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
  cursor: pointer;
  animation: fadeInUp 0.3s ease both;
}

.ranking-row:hover { background: var(--bg); }

.ranking-pos {
  font-size: 1.1rem;
  font-weight: 800;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.pos-gold   { color: var(--gold); }
.pos-silver { color: var(--silver); }
.pos-bronze { color: var(--bronze); }
.pos-other  { color: var(--text-muted); }

.ranking-user-info { flex: 1; }

.ranking-user-name {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ranking-user-handle { font-size: 0.82rem; color: var(--text-muted); }

.ranking-score {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Podium (top 3) */
.podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  padding: 32px 20px 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--primary-faint) 0%, transparent 100%);
}

.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.podium-item:hover { transform: translateY(-3px); }

.podium-item.rank-1 .podium-avatar { width: 72px; height: 72px; border: 3px solid var(--gold); }
.podium-item.rank-2 .podium-avatar { width: 58px; height: 58px; border: 3px solid var(--silver); }
.podium-item.rank-3 .podium-avatar { width: 58px; height: 58px; border: 3px solid var(--bronze); }

.podium-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.podium-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3px;
}

.podium-score {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.podium-medal {
  font-size: 1.4rem;
}

.medal-icon {
  width: 22px;
  height: 22px;
}

/* =============================================
   AUTH (Connexion / Inscription)
   ============================================= */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-faint) 0%, #E8F3FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  padding: 40px;
  animation: authSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes authSlide {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-logo span { color: var(--primary); }

.auth-tagline {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 28px;
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 9px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(10,132,255,0.12);
}

.form-input::placeholder { color: var(--text-muted); }

.form-input.error { border-color: var(--red); }

.form-error {
  font-size: 0.82rem;
  color: var(--red);
  margin-top: 5px;
}

.auth-submit {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  margin-top: 8px;
}

/* =============================================
   WIDGET SUGGÉRÉ (panneau droit)
   ============================================= */
.widget-card {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.widget-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}

.suggest-item:not(:last-child) { border-bottom: 1px solid var(--border-light); }

.suggest-info { flex: 1; min-width: 0; }

.suggest-name {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.suggest-followers {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.suggest-follow-btn {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  padding: 5px 12px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-full);
  transition: var(--transition);
  flex-shrink: 0;
}

.suggest-follow-btn:hover {
  background: var(--primary);
  color: white;
}

/* =============================================
   MODALS
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlide {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-weight: 800;
  font-size: 1rem;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.modal-close:hover { background: var(--bg); color: var(--text-primary); }
.modal-close svg { width: 18px; height: 18px; }

.modal-body { padding: 20px; }

/* Compositeur dans le modal */
.post-composer {
  display: flex;
  gap: 12px;
}

.composer-avatar {
  flex-shrink: 0;
}

.composer-textarea {
  flex: 1;
  min-height: 100px;
  font-size: 1rem;
  resize: none;
  color: var(--text-primary);
  line-height: 1.6;
  padding: 4px 0;
}

.composer-textarea::placeholder { color: var(--text-muted); }

.composer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.char-count {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* =============================================
   FOLLOW MODAL LIST
   ============================================= */
.follow-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}

.follow-user-item:last-child { border-bottom: none; }
.follow-user-item:hover { color: var(--primary); }

.follow-user-name {
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =============================================
   ÉTATS VIDES
   ============================================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 12px;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.empty-state-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 280px;
}

/* =============================================
   NOTIFICATIONS TOAST
   ============================================= */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text-primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 9998;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* =============================================
   UTILITAIRES
   ============================================= */
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.text-sm { font-size: 0.875rem; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.p-20 { padding: 20px; }
.w-full { width: 100%; }

/* Divider */
.divider {
  height: 8px;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .right-panel { display: none; }
  .main-content { max-width: none; border-right: none; }
  .sidebar {
    left: 0;
    transform: none;
  }
  .fab { right: 20px; }
}

@media (max-width: 720px) {
  .sidebar {
    width: 68px;
    padding: 16px 8px;
  }
  .nav-item span,
  .sidebar-logo,
  .sidebar-user-info,
  .sidebar-logout { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .sidebar-user { justify-content: center; }
  .main-content { margin-left: 68px; }
  :root { --sidebar-w: 68px; }
  .fab { bottom: 16px; right: 16px; }
}

/* =============================================
   PROFIL — BANNIÈRE GIF
   ============================================= */
.profile-cover-banner {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #000;
}

.profile-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Couleur d'accent sur le profil */
.profile-header-content[style*="--profile-accent"] .stat-value {
  color: var(--profile-accent, var(--primary));
}

/* =============================================
   PROFIL — BOUTONS D'ACTION (row flexible)
   ============================================= */
.profile-action-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-left: auto;
}

/* Bouton d'action compact (Photo, Bannière, Couleur, etc.) */
.btn-action {
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border);
  transition: var(--transition);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  line-height: 1;
}

.btn-action svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: currentColor;
}

.btn-action:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-action-danger {
  color: var(--red);
  border-color: rgba(229,57,53,0.4);
}
.btn-action-danger:hover {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

.btn-action-success {
  color: var(--green);
  border-color: rgba(0,200,117,0.4);
}
.btn-action-success:hover {
  background: rgba(0,200,117,0.08);
  border-color: var(--green);
  color: var(--green);
}

.btn-manage {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  line-height: 1;
}

.btn-manage svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: currentColor;
}

.btn-manage:hover {
  background: linear-gradient(135deg, #16213e, #0f3460);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.btn-danger {
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-danger svg { width: 13px; height: 13px; stroke: currentColor; }

.btn-danger:hover {
  background: #c62828;
  transform: translateY(-1px);
}

/* =============================================
   SÉLECTEUR DE COULEUR
   ============================================= */
.color-picker-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
  margin: 8px 0;
  animation: fadeInUp 0.2s ease;
}

.color-picker-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.2);
  border-color: rgba(255,255,255,0.8);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.color-swatch-custom {
  background: linear-gradient(135deg, #ff6b6b, #ffd93d, #6bcb77, #4d96ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
}

/* =============================================
   BADGE BANNI
   ============================================= */
.banned-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  vertical-align: middle;
}

/* =============================================
   MANAGE PANEL — MODAL
   ============================================= */
.modal-wide {
  max-width: 620px;
}

.modal-sm {
  max-width: 400px;
}

.manage-modal-header {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.manage-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.manage-shield {
  font-size: 1.3rem;
}

.manage-modal-header .modal-title {
  color: #fff;
  font-size: 1.05rem;
}

.manage-modal-header .modal-close {
  color: rgba(255,255,255,0.7);
}

.manage-modal-header .modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.manage-users-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.manage-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
  border-radius: var(--radius-sm);
}

.manage-user-row:last-child { border-bottom: none; }

.manage-user-banned {
  background: rgba(229,57,53,0.04);
}

.manage-user-info {
  flex: 1;
  min-width: 0;
}

.manage-user-name {
  font-weight: 700;
  font-size: 0.92rem;
}

.manage-user-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.manage-ban-reason {
  color: var(--red);
  font-style: italic;
  font-size: 0.75rem;
}

.manage-user-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.manage-btn-profile {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  padding: 5px 12px;
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-full);
  transition: var(--transition);
  cursor: pointer;
}

.manage-btn-profile:hover { background: var(--primary); color: #fff; }

.manage-btn-ban {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  padding: 5px 11px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.manage-btn-ban svg { width: 12px; height: 12px; stroke: currentColor; }

.manage-btn-ban:hover { background: #c62828; }

.manage-btn-unban {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  padding: 5px 11px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.manage-btn-unban svg { width: 12px; height: 12px; stroke: currentColor; }

.manage-btn-unban:hover { background: #00a060; }

/* =============================================
   PAGE DE BAN (écran plein)
   ============================================= */
.ban-screen {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.ban-card {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(229, 57, 53, 0.15);
  animation: banCardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes banCardIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ban-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: banHammer 0.6s ease 0.3s both;
}

@keyframes banHammer {
  0%   { transform: rotate(-30deg) scale(0.8); }
  50%  { transform: rotate(10deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

.ban-title {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--red);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.ban-subtitle {
  color: #888;
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.ban-reason {
  background: rgba(229,57,53,0.1);
  border: 1px solid rgba(229,57,53,0.25);
  border-radius: 10px;
  padding: 14px 18px;
  color: #ccc;
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.ban-reason-label {
  font-weight: 700;
  color: var(--red);
}

.ban-footer {
  font-size: 0.78rem;
  color: #555;
}

/* =============================================
   MESSAGES PRIVÉS — BOÎTE DE RÉCEPTION
   ============================================= */
.dm-inbox-list {
  display: flex;
  flex-direction: column;
}

.dm-inbox-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
  animation: fadeInUp 0.25s ease both;
}

.dm-inbox-item:hover { background: var(--bg); }

.dm-inbox-item.dm-unread { background: var(--primary-faint); }
.dm-inbox-item.dm-unread:hover { background: var(--primary-light); }

.dm-inbox-info {
  flex: 1;
  min-width: 0;
}

.dm-inbox-name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 0.93rem;
  margin-bottom: 3px;
}

.dm-inbox-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
}

.dm-inbox-preview {
  font-size: 0.84rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-inbox-item.dm-unread .dm-inbox-preview {
  color: var(--text-secondary);
  font-weight: 600;
}

.dm-unread-badge {
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* =============================================
   MESSAGES PRIVÉS — EN-TÊTE CONVERSATION
   ============================================= */
.dm-conv-header {
  gap: 12px;
}

.btn-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-back:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.btn-back svg { width: 20px; height: 20px; }

.dm-private-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dm-private-label svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* =============================================
   BOUTON "MESSAGE" SUR LE PROFIL
   ============================================= */
.btn-message {
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--primary);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-message svg { width: 14px; height: 14px; }

.btn-message:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}
