/* ============================================================
   PPC HOT — Global CSS
   Palette : rouge #FF4D4D · or sombre #E8A020 · violet #9D4EDD
   ============================================================ */
:root {
  /* Fonds */
  --fond:       #07060D;
  --surface:    #100F1A;
  --surface2:   #181627;
  --surface3:   #201E32;
  --surface4:   #282640;

  /* Textes */
  --texte:      #F2F0FC;
  --texte-dim:  #9896B8;
  --texte-mute: #4E4C70;

  /* Couleurs principales HOT */
  --rouge:      #FF4D4D;
  --rouge-dark: #CC2222;
  --rouge-glow: rgba(255,77,77,0.28);
  --or:         #E8A020;
  --or-light:   #F0C040;
  --or-dark:    #B07810;
  --violet:     #9D4EDD;
  --violet-light:#BF80FF;
  --rose:       #FF6080;

  /* Gradients */
  --grad-hot:     linear-gradient(135deg, #E8A020 0%, #FF4D4D 50%, #9D4EDD 100%);
  --grad-primary: linear-gradient(135deg, #FF4D4D 0%, #9D4EDD 100%);
  --grad-or:      linear-gradient(135deg, #E8A020 0%, #F0C040 100%);
  --grad-premium: linear-gradient(135deg, #E8A020, #FBBF24, #E8A020);
  --grad-dark:    linear-gradient(to top, rgba(7,6,13,0.95), transparent 60%);

  /* État */
  --vert:   #34D399;
  --jaune:  #FBBF24;
  --bleu:   #60A5FA;

  /* UI */
  --bordure:   rgba(255,255,255,0.07);
  --bordure2:  rgba(255,255,255,0.12);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow:    0 4px 24px rgba(0,0,0,0.5);
  --shadow-rouge: 0 4px 20px rgba(255,77,77,0.35);
  --shadow-or:    0 4px 20px rgba(232,160,32,0.3);
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'Courier New', monospace;
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); background: var(--fond); color: var(--texte); line-height: 1.55; min-height: 100vh; -webkit-font-smoothing: antialiased; }
img  { display: block; max-width: 100%; }
a    { color: var(--or-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--or); }
button { font-family: var(--font-body); cursor: pointer; }
input, textarea, select { font-family: var(--font-body); }

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--fond); }
::-webkit-scrollbar-thumb { background: var(--rouge); border-radius: 2px; }

/* ── BOUTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 700; border: none; cursor: pointer;
  text-decoration: none; transition: all 0.18s; font-family: var(--font-body);
  white-space: nowrap;
}
.btn--primary { background: var(--grad-primary); color: #fff; box-shadow: var(--shadow-rouge); }
.btn--primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn--hot { background: var(--grad-hot); color: #fff; box-shadow: var(--shadow-rouge); }
.btn--hot:hover { opacity: 0.9; transform: translateY(-1px); }
.btn--premium { background: var(--grad-premium); background-size: 200% auto; color: #07060D; font-weight: 800; animation: shimmer 3s linear infinite; }
.btn--ghost { background: var(--surface2); border: 1px solid var(--bordure2); color: var(--texte); }
.btn--ghost:hover { border-color: rgba(255,77,77,0.3); color: var(--rouge); }
.btn--danger { background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.3); color: #FCA5A5; }
.btn--outline { background: transparent; border: 1.5px solid rgba(255,77,77,0.4); color: var(--rouge); }
.btn--outline:hover { background: rgba(255,77,77,0.08); }
.btn--sm  { padding: 8px 16px; font-size: 0.8rem; }
.btn--xs  { padding: 5px 10px; font-size: 0.72rem; }
.btn--lg  { padding: 14px 28px; font-size: 1rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

@keyframes shimmer { to { background-position: 200% center; } }

/* ── FORMULAIRES ──────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--texte-dim); margin-bottom: 6px; }
.form-label .req { color: var(--rouge); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 14px;
  background: var(--surface2); border: 1px solid var(--bordure2);
  border-radius: var(--radius-sm); color: var(--texte);
  font-size: 0.875rem; outline: none; transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: rgba(255,77,77,0.5);
  box-shadow: 0 0 0 3px rgba(255,77,77,0.1);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--texte-mute); }
.form-textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.form-hint { font-size: 0.72rem; color: var(--texte-mute); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── ALERTS ───────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 16px; }
.alert--error   { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: #FCA5A5; }
.alert--success { background: rgba(52,211,153,0.1);  border: 1px solid rgba(52,211,153,0.3);  color: #6EE7B7; }
.alert--info    { background: rgba(232,160,32,0.1);   border: 1px solid rgba(232,160,32,0.3);  color: #FCD34D; }
.alert--warn    { background: rgba(251,191,36,0.1);   border: 1px solid rgba(251,191,36,0.25); color: #FDE68A; }

/* ── BADGES ───────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--radius-xs); font-size: 0.7rem; font-weight: 700; }
.badge--premium { background: rgba(232,160,32,0.15); border: 1px solid rgba(232,160,32,0.3); color: var(--or-light); }
.badge--verifie { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.25); color: #34D399; }
.badge--hot     { background: rgba(255,77,77,0.12);  border: 1px solid rgba(255,77,77,0.25);  color: var(--rouge); }

/* ── AVATARS ──────────────────────────────────────────────── */
.avatar { border-radius: 50%; overflow: hidden; background: var(--surface3); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xs { width: 30px; height: 30px; font-size: 1rem; }
.avatar--sm { width: 40px; height: 40px; font-size: 1.2rem; }
.avatar--md { width: 52px; height: 52px; font-size: 1.5rem; }
.avatar--lg { width: 72px; height: 72px; font-size: 2rem; }
.avatar--xl { width: 96px; height: 96px; font-size: 2.5rem; }
.avatar--premium { box-shadow: 0 0 0 2.5px var(--or); }

/* ── APP LAYOUT ───────────────────────────────────────────── */
.app-page  { display: flex; min-height: 100vh; }
.sidebar   { width: 260px; flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--bordure); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-main  { flex: 1; padding: 28px; max-width: calc(100vw - 260px); min-height: 100vh; }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar__logo { padding: 20px 20px 16px; border-bottom: 1px solid var(--bordure); }
.sidebar__logo-text { font-size: 1.4rem; font-weight: 900; background: var(--grad-hot); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sidebar__logo-badge { font-size: 0.6rem; font-weight: 700; color: var(--rouge); letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar__nav { padding: 14px 10px; flex: 1; }
.sidebar__link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 2px;
  font-size: 0.875rem; font-weight: 500; color: var(--texte-dim);
  text-decoration: none; transition: all 0.15s; position: relative;
}
.sidebar__link:hover { background: var(--surface2); color: var(--texte); }
.sidebar__link.active { background: rgba(255,77,77,0.12); color: var(--rouge); font-weight: 700; }
.sidebar__link .icon { font-size: 1.1rem; width: 22px; text-align: center; }
.sidebar__badge { margin-left: auto; background: var(--rouge); color: #fff; border-radius: 10px; padding: 1px 6px; font-size: 0.65rem; font-weight: 800; }
.sidebar__user { padding: 14px 16px; border-top: 1px solid var(--bordure); display: flex; align-items: center; gap: 10px; }
.sidebar__user-name { font-size: 0.82rem; font-weight: 700; }
.sidebar__user-sub  { font-size: 0.7rem; color: var(--texte-mute); }
.sidebar__logout { margin-left: auto; color: var(--texte-mute); font-size: 1.1rem; padding: 5px; border-radius: 8px; }
.sidebar__logout:hover { color: var(--rouge); background: var(--surface2); }

/* ── TOPBAR MOBILE ────────────────────────────────────────── */
.app-topbar { display: none; background: var(--surface); border-bottom: 1px solid var(--bordure); padding: 12px 16px; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.topbar__logo { font-size: 1.2rem; font-weight: 900; background: var(--grad-hot); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.topbar__burger { background: none; border: none; color: var(--texte-dim); font-size: 1.4rem; padding: 4px; }
.topbar__notif  { position: relative; color: var(--texte-dim); font-size: 1.2rem; }
.topbar__dot    { position: absolute; top: 0; right: 0; width: 7px; height: 7px; background: var(--rouge); border-radius: 50%; border: 1px solid var(--surface); }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 199; }

/* ── PAGE HEADER ──────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.page-header p  { color: var(--texte-dim); font-size: 0.875rem; margin-top: 4px; }

/* ── CARDS ────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--radius); padding: 20px; }
.card__title { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-mute); margin-bottom: 14px; }

/* ── PROFIL CARDS (grille) ────────────────────────────────── */
.profil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.profil-card { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.profil-card:hover { border-color: rgba(255,77,77,0.3); transform: translateY(-2px); }
.profil-card__photo { height: 190px; position: relative; overflow: hidden; background: var(--surface2); }
.profil-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.profil-card__overlay { position: absolute; inset: 0; background: var(--grad-dark); }
.profil-card__info  { position: absolute; bottom: 10px; left: 10px; right: 10px; }
.profil-card__name  { font-size: 0.88rem; font-weight: 700; color: #fff; }
.profil-card__sub   { font-size: 0.72rem; color: rgba(255,255,255,0.75); }
.profil-card__body  { padding: 10px 12px; }

/* ── MESSAGES ─────────────────────────────────────────────── */
.messages-layout { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 80px); }
.conv-list { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--radius) 0 0 var(--radius); overflow-y: auto; }
.conv-item { display: flex; gap: 10px; padding: 13px 14px; border-bottom: 1px solid var(--bordure); cursor: pointer; transition: background 0.15s; }
.conv-item:hover { background: var(--surface2); }
.conv-item.active { background: rgba(255,77,77,0.08); border-left: 2px solid var(--rouge); }
.conv-item__name   { font-size: 0.875rem; font-weight: 700; }
.conv-item__preview{ font-size: 0.78rem; color: var(--texte-mute); }
.chat-zone { display: flex; flex-direction: column; background: var(--fond); border: 1px solid var(--bordure); border-left: none; border-radius: 0 var(--radius) var(--radius) 0; overflow: hidden; height: 100%; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.message { display: flex; gap: 8px; align-items: flex-end; max-width: 72%; }
.message--me { margin-left: auto; flex-direction: row-reverse; }
.message__bubble { padding: 9px 13px; border-radius: var(--radius-sm); font-size: 0.875rem; line-height: 1.5; }
.message--me    .message__bubble { background: var(--grad-primary); color: #fff; border-radius: var(--radius-sm) var(--radius-sm) 4px var(--radius-sm); }
.message--other .message__bubble { background: var(--surface2); border-radius: var(--radius-sm) var(--radius-sm) var(--radius-sm) 4px; }
.message__time { font-size: 0.62rem; color: var(--texte-mute); margin-top: 3px; }
.chat-input-wrap { padding: 12px 14px; border-top: 1px solid var(--bordure); background: var(--surface); display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0; }
.chat-input { flex: 1; padding: 10px 14px; background: var(--surface2); border: 1px solid var(--bordure2); border-radius: var(--radius-sm); color: var(--texte); font-size: 0.875rem; resize: none; max-height: 100px; outline: none; }
.chat-input:focus { border-color: rgba(255,77,77,0.4); }
.chat-send { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-primary); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; box-shadow: var(--shadow-rouge); flex-shrink: 0; }

/* ── SYSTEM MESSAGES (moderation) ────────────────────────── */
.msg-systeme-standalone { display: flex; justify-content: center; margin: 8px 16px; }
.msg-systeme-standalone span { padding: 8px 14px; border-radius: var(--radius-sm); font-size: 0.78rem; line-height: 1.55; text-align: center; max-width: 380px; }
.msg-systeme-standalone--warn  span { background: rgba(251,191,36,0.1);  border: 1px solid rgba(251,191,36,0.25);  color: #FDE68A; }
.msg-systeme-standalone--block span { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); color: #FCA5A5; }
.message__bubble--bloque { background: rgba(248,113,113,0.12) !important; text-decoration: line-through; opacity: 0.6; }

/* ── TOGGLE ───────────────────────────────────────────────── */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--bordure); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row__text h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.toggle-row__text p  { font-size: 0.75rem; color: var(--texte-mute); }
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; }
.toggle-switch input { opacity: 0; position: absolute; }
.toggle-slider { position: absolute; inset: 0; border-radius: 12px; background: var(--surface3); transition: background 0.25s; }
.toggle-switch input:checked + .toggle-slider { background: var(--rouge); }
.toggle-slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: left 0.25s; }
.toggle-switch input:checked + .toggle-slider::after { left: 23px; }

/* ── CHIPS ────────────────────────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-xs); background: var(--surface2); border: 1px solid var(--bordure2); font-size: 0.72rem; font-weight: 500; color: var(--texte-dim); }

/* ── PAGINATION ───────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 7px 13px; border-radius: var(--radius-sm); font-size: 0.82rem; text-decoration: none; }
.pagination a    { background: var(--surface); border: 1px solid var(--bordure); color: var(--texte); }
.pagination a:hover { border-color: var(--rouge); color: var(--rouge); }
.pagination span { background: var(--rouge); color: #fff; font-weight: 700; }

/* ── EMPTY STATE ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state__icon { font-size: 3rem; display: block; margin-bottom: 14px; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; }
.empty-state p  { color: var(--texte-dim); font-size: 0.875rem; }

/* ── NOTIF FLASH ──────────────────────────────────────────── */
[data-auto-dismiss] { animation: fadeOut 0.4s ease 4s forwards; }
@keyframes fadeOut { to { opacity: 0; height: 0; padding: 0; margin: 0; overflow: hidden; } }

/* ── PREMIUM BADGE GLOW ───────────────────────────────────── */
.premium-glow { box-shadow: 0 0 20px rgba(232,160,32,0.4); }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .app-main { max-width: 100%; padding: 18px; }
  .sidebar  { display: none; }
  .app-topbar { display: flex; }
  .app-main { padding-top: 72px; }
  .form-row { grid-template-columns: 1fr; }
  .messages-layout { grid-template-columns: 1fr; height: calc(100dvh - 60px); }
}
@media (max-width: 480px) {
  .profil-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── SIDEBAR MOBILE OPEN ──────────────────────────────────── */
.sidebar.open { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 200; width: 280px; }
.sidebar-overlay.open { display: block; }
