/* =============================================
   TECHMEET — Pages: Chat · Notifications · Profile · Admin · Settings
   ============================================= */

/* ─── CHAT LIST ───────────────────────────── */
.chat-list { display: flex; flex-direction: column; }
.chat-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: var(--ease-fast);
  position: relative;
  overflow: hidden;
}
.chat-row:active { background: var(--bg-hover); }
.chat-row.unread .chat-last { color: var(--text-1); font-weight: 600; }
.chat-body { flex: 1; min-width: 0; }
.chat-row-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; gap: 6px; }
.chat-name   { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.chat-time   { font-size: 12px; color: var(--text-3); flex-shrink: 0; white-space: nowrap; }
.chat-row-bot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.chat-last   { font-size: 13px; color: var(--text-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-unread-badge {
  min-width: 20px; height: 20px;
  background: var(--blue-light); color: white;
  font-size: 11px; font-weight: 800;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px; flex-shrink: 0;
}
.chat-typing { font-size: 13px; color: var(--blue-glow); font-style: italic; }

/* Online indicator */
.online-ring { position: relative; display: inline-flex; flex-shrink: 0; }
.online-ring .dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 11px; height: 11px;
  background: var(--green); border-radius: 50%;
  border: 2.5px solid var(--bg-dark);
}

/* ─── CHAT DETAIL ─────────────────────────── */
.chat-detail-page { background: var(--bg-root); }
.chat-detail-topbar {
  height: var(--topbar-h);
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 10px; gap: 8px;
  flex-shrink: 0; z-index: 10;
  overflow: hidden;
}
.cdt-user { flex: 1; min-width: 0; }
.cdt-name   { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdt-status { font-size: 12px; color: var(--green); }

.chat-bg {
  flex: 1;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(37,99,235,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(6,182,212,0.04) 0%, transparent 50%),
    url('../../img/chat-bg.png') repeat,
    var(--bg-root);
  background-size: auto, auto, 420px auto, auto;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 14px 12px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 0;
}
.chat-bg::-webkit-scrollbar { display: none; }

/* Date separator */
.chat-date-sep {
  text-align: center; font-size: 11px; color: var(--text-3);
  font-weight: 600; margin: 4px 0;
  display: flex; align-items: center; gap: 8px;
}
.chat-date-sep::before, .chat-date-sep::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Bubbles */
.msg { display: flex; flex-direction: column; max-width: 78%; }
.msg-in  { align-self: flex-start; }
.msg-out { align-self: flex-end; align-items: flex-end; }
.bubble {
  padding: 10px 14px;
  font-size: 15px; line-height: 1.55;
  word-break: break-word;
}
.msg-in .bubble {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: 18px 18px 18px 4px; color: var(--text-1);
}
.msg-out .bubble {
  background: var(--blue);
  border-radius: 18px 18px 4px 18px; color: white;
}
.bubble-image {
  width: 200px; height: 150px;
  border-radius: 14px; object-fit: cover;
}
.msg-status {
  font-size: 10px; color: var(--text-3);
  margin-top: 3px; padding: 0 4px;
  display: flex; align-items: center; gap: 3px;
}
.msg-out .msg-status { color: rgba(255,255,255,0.55); }
.msg-seen { color: var(--cyan); }

/* Voice bubble */
.voice-bubble {
  display: flex; align-items: center; gap: 8px; min-width: 140px;
}
.voice-wave { display: flex; align-items: center; gap: 2px; flex: 1; }
.voice-bar {
  width: 3px; border-radius: 2px;
  background: currentColor; opacity: 0.7;
  animation: voiceBar 0.8s ease-in-out infinite alternate;
}
@keyframes voiceBar {
  from { transform: scaleY(0.4); }
  to   { transform: scaleY(1); }
}

/* Lecteur de message vocal (VoicePlayer.js) */
.vp { display: flex; align-items: center; gap: 8px; min-width: 200px; max-width: 260px; }
.vp-btn {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  border: none; background: rgba(255,255,255,0.14); color: inherit;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.msg-in .vp-btn { background: var(--blue); color: #fff; }
.vp-btn:active { transform: scale(0.94); }
.vp-error .vp-btn { background: var(--red); color: #fff; }
.vp-body { flex: 1; min-width: 0; }
.vp-wave {
  display: flex; align-items: center; gap: 2px; height: 28px;
  cursor: pointer; touch-action: none; user-select: none;
}
.vp-bar { flex: 1; min-width: 2px; max-width: 4px; border-radius: 2px; background: currentColor; opacity: 0.35; transition: opacity .1s; }
.vp-bar.on { opacity: 1; }
.vp-meta { display: flex; align-items: center; gap: 6px; font-size: 11px; opacity: 0.8; margin-top: 2px; }
.vp-time { font-variant-numeric: tabular-nums; min-width: 32px; }
.vp-mic { display: inline-flex; opacity: 0.6; }
.vp-listened .vp-mic { color: var(--cyan, #22d3ee); opacity: 1; }
.vp-mine .vp-mic { display: none; }
.vp-speed {
  margin-left: auto; border: none; border-radius: 10px; padding: 1px 7px;
  background: rgba(255,255,255,0.14); color: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
}
.vp-fail { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 11px; }
.vp-err { color: #fecaca; font-weight: 600; }
.msg-in .vp-err { color: var(--red); }
.vp-retry, .vp-discard {
  border: none; border-radius: 10px; padding: 3px 8px; font-size: 11px; font-weight: 700; cursor: pointer;
  background: rgba(255,255,255,0.18); color: inherit;
}
.vp-spin { animation: vpSpin 0.9s linear infinite; }
@keyframes vpSpin { to { transform: rotate(360deg); } }

/* Mini-lecteur épinglé : vocal qui continue hors de sa conversation (VoicePlayer.js) */
.vp-mini {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 6px 10px; background: var(--bg-card); border-bottom: 1px solid var(--border);
  position: relative; z-index: 5;
}
.vp-mini-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; border: none; padding: 0;
  background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.vp-mini-btn svg { width: 18px; height: 18px; }
.vp-mini-info {
  flex: 1; min-width: 0; border: none; background: none; padding: 0; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; color: var(--text-1);
}
.vp-mini-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-mini-bar { display: block; height: 3px; border-radius: 2px; background: var(--border); overflow: hidden; }
.vp-mini-bar span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .25s linear; }
.vp-mini-time { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.vp-mini-speed {
  border: none; border-radius: 10px; padding: 2px 7px; flex-shrink: 0;
  background: var(--bg-card2); color: var(--text-2); font-size: 11px; font-weight: 700; cursor: pointer;
}
.vp-mini-close { border: none; background: none; color: var(--text-3); padding: 4px; cursor: pointer; flex-shrink: 0; display: flex; }

/* Enregistrement / préécoute (VoiceComposer.js) — par-dessus la barre de saisie */
.vc-panel {
  position: absolute; left: 0; top: 0; bottom: 0; right: 58px; z-index: 25;
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--bg-card); border-radius: 22px;
}
.vc-panel.vc-full { right: 0; }
.vc-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: pulse 1s infinite; flex-shrink: 0; }
.vc-timer { font-size: 15px; font-weight: 700; color: var(--text-1); min-width: 40px; font-variant-numeric: tabular-nums; }
.vc-timer.vc-warn { color: #ef4444; }
.vc-slide { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.vc-level { flex: 1; display: flex; align-items: center; justify-content: center; gap: 3px; height: 24px; }
.vc-level span { width: 4px; height: 100%; border-radius: 2px; background: #ef4444; transform: scaleY(0.2); transition: transform .1s; }
.vc-icon {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; border: none; padding: 0;
  background: none; color: var(--text-2); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.vc-trash { color: var(--red, #ef4444); }
.vc-stop { color: #ef4444; }
.vc-send {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; border: none; padding: 0;
  background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.vc-send:disabled { opacity: 0.5; }
.vc-wave { flex: 1; min-width: 0; color: var(--text-1); }
.vc-lock-hint {
  position: absolute; right: 6px; bottom: calc(100% + 8px); z-index: 26;
  width: 34px; padding: 8px 0; border-radius: 17px; background: var(--bg-card); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-2);
  animation: vcLockFloat 1.2s ease-in-out infinite alternate;
}
@keyframes vcLockFloat { from { margin-bottom: 0; } to { margin-bottom: 6px; } }
.chat-vocal-btn.vc-holding { transform: scale(1.35); background: #ef4444; }
@media (max-width: 360px) {
  .vp { min-width: 170px; }
  .vc-panel { gap: 6px; padding: 0 8px; }
  .vc-slide { font-size: 11px; }
}
.voice-dur { font-size: 12px; opacity: 0.7; flex-shrink: 0; }

/* Sticker dans bulle */
.msg-sticker .bubble {
  background: none !important; border: none !important;
  font-size: 36px; padding: 4px !important;
}

/* ─── CHAT INPUT BAR ──────────────────────── */
.chat-input-bar {
  position: relative;
  display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 12px;
  padding-bottom: calc(8px + var(--safe-b));
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  flex-shrink: 0; z-index: 10;
}
.chat-input-wrap {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: 22px; padding: 4px 8px 4px 14px;
  min-height: 42px;
}
.chat-input-field {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  font-size: 14px; color: var(--text-1);
  resize: none; padding: 8px 0; line-height: 1.4;
  max-height: 120px; font-family: inherit;
}
.chat-input-field::placeholder { color: var(--text-3); }

.chat-emoji-btn, .chat-sticker-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text-3); padding: 6px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: color 0.2s;
}
.chat-emoji-btn:active, .chat-sticker-btn:active { color: var(--text-1); }

.chat-media-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: var(--bg-card2); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background 0.2s;
}
.chat-media-btn:active { background: var(--border); }

.chat-send-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: none; background: var(--blue); color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: transform 0.15s, background 0.2s;
}
.chat-send-btn:active { transform: scale(0.92); }

.chat-vocal-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: none; background: var(--blue); color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background 0.2s, transform 0.1s;
}
.chat-vocal-btn:active { transform: scale(1.08); }

/* ─── Panels flottants ────────────────────── */
.chat-emoji-panel {
  position: absolute; bottom: 62px; left: 0; right: 0;
  z-index: 50; border-radius: 16px 16px 0 0;
  overflow: hidden; box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.chat-emoji-panel em-emoji-picker {
  width: 100% !important; max-width: 100% !important;
  border-radius: 16px 16px 0 0 !important;
  border: none !important; --border-radius: 0px; --shadow: none;
}

.chat-sticker-panel {
  position: absolute; bottom: 62px; left: 0; right: 0;
  background: var(--bg-card); border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0; padding: 16px 12px; z-index: 50;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  max-height: 280px; overflow-y: auto;
}
.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.sticker-item {
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 6px; cursor: pointer;
  text-align: center; transition: transform 0.15s;
}
.sticker-item:active { transform: scale(0.92); }
.sticker-emoji { font-size: 28px; line-height: 1; }
.sticker-label { font-size: 10px; color: var(--text-3); margin-top: 4px; font-weight: 600; }

.chat-media-panel {
  position: absolute; bottom: 62px; left: 0; right: 0;
  background: var(--bg-card); border-top: 1px solid var(--border);
  border-radius: 16px 16px 0 0; padding: 20px 16px;
  display: flex; justify-content: space-around;
  z-index: 50; box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  flex-wrap: wrap; gap: 8px;
}
.media-opt {
  background: none; border: none; cursor: pointer;
  text-align: center; padding: 8px 12px;
  border-radius: 12px; transition: background 0.15s;
  min-width: 70px;
}
.media-opt:active { background: var(--bg-card2); }
.media-opt-icon  { font-size: 32px; margin-bottom: 6px; }
.media-opt-label { font-size: 12px; color: var(--text-2); font-weight: 600; white-space: nowrap; }

/* Barre vocal */
.vocal-recording-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 62px; background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; z-index: 20;
}
.vocal-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ef4444; animation: pulse 1s infinite; flex-shrink: 0;
}
.vocal-timer { font-size: 16px; font-weight: 700; color: var(--text-1); min-width: 36px; }
.vocal-hint  { font-size: 12px; color: var(--text-3); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── NOTIFICATIONS ───────────────────────── */
.notif-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  background: var(--bg-dark); flex-shrink: 0;
}
.notif-tab {
  flex: 1; padding: 12px 4px;
  text-align: center; font-size: 14px; font-weight: 600;
  color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--ease-fast);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notif-tab.active { color: var(--blue-light); border-bottom-color: var(--blue-light); }

.notif-list { display: flex; flex-direction: column; }
.notif-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: var(--ease-fast);
  position: relative; overflow: hidden;
}
.notif-row:active { background: var(--bg-hover); }
.notif-row.unread { background: rgba(37,99,235,0.04); }
.notif-av-wrap    { position: relative; flex-shrink: 0; }
.notif-type-icon {
  position: absolute; bottom: -2px; right: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; border: 2px solid var(--bg-dark);
}
.notif-type-icon.like    { background: var(--red); }
.notif-type-icon.comment { background: var(--blue); }
.notif-type-icon.follow  { background: var(--purple); }
.notif-type-icon.check   { background: var(--green); }
.notif-type-icon.message { background: var(--cyan-dark); }

.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: 14px; line-height: 1.45; color: var(--text-1); word-break: break-word; }
.notif-text b { font-weight: 700; }
.notif-time   { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.notif-thumb  {
  width: 46px; height: 46px; border-radius: var(--r-sm);
  object-fit: cover; flex-shrink: 0;
  background: var(--bg-card2);
}
.notif-unread-dot {
  position: absolute; top: 50%; right: 14px;
  transform: translateY(-50%);
  width: 8px; height: 8px;
  background: var(--blue-light); border-radius: 50%;
  flex-shrink: 0;
}
.notif-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ─── PROFILE ─────────────────────────────── */
.profile-page { background: var(--bg-root); }
.profile-cover {
  height: 160px;
  background: linear-gradient(135deg, #1e3a8a, #1e40af, #0c4a6e);
  position: relative; flex-shrink: 0; overflow: hidden;
}
.profile-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 50%, rgba(6,182,212,0.2) 0%, transparent 60%);
}
.profile-cover-edit-btn {
  position: absolute; bottom: 10px; right: 10px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-full); padding: 6px 12px;
  font-size: 12px; font-weight: 600; color: white;
  cursor: pointer; display: flex; align-items: center; gap: 5px;
  /* z-index 3 (> .profile-av-section qui vaut 2) — ce bloc avatar est tiré
     vers le haut (margin-top négatif) et chevauche le bas de la couverture ;
     sans ceci son rectangle transparent interceptait le tap avant qu'il
     n'atteigne ce bouton ("rien ne se passe" au clic sur Modifier). */
  z-index: 3; white-space: nowrap;
}
.profile-av-section {
  padding: 0 14px;
  margin-top: -44px;
  position: relative; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 12px; gap: 8px;
}
.profile-av-ring {
  padding: 3px; background: var(--bg-root); border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}
.profile-av-edit {
  position: absolute; bottom: 4px; right: 4px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-card2); border: 2px solid var(--bg-root);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 12px;
}

.profile-info { padding: 0 14px 16px; }
.profile-name-row {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.profile-name {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-handle { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.profile-bio { font-size: 14px; color: var(--text-2); line-height: 1.55; margin-bottom: 12px; word-break: break-word; }
.profile-meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.profile-meta-item { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.profile-meta-item svg { color: var(--text-3); flex-shrink: 0; }

/* Stats — flex avec min-width pour ne pas trop compresser */
.profile-stats {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden; margin-bottom: 14px;
  background: var(--bg-card);
}
.p-stat {
  flex: 1;
  min-width: 0; /* empêche débordement */
  padding: 12px 4px; text-align: center;
  border-right: 1px solid var(--border);
  cursor: pointer; transition: var(--ease-fast);
}
.p-stat:last-child { border-right: none; }
.p-stat:active { background: var(--bg-hover); }
.p-stat-val {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 800; color: var(--text-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.p-stat-lbl {
  font-size: 10px; color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.3px; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.profile-action-row { display: flex; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.profile-action-row .btn { flex: 1; min-width: 0; }

/* Profile tabs */
.profile-tabs {
  display: flex; border-bottom: 1px solid var(--border);
  background: var(--bg-dark); flex-shrink: 0;
  position: sticky; top: 0; z-index: 10;
}
.p-tab {
  flex: 1; padding: 12px 4px;
  text-align: center; font-size: 13px; font-weight: 600;
  color: var(--text-2); cursor: pointer;
  border-bottom: 2.5px solid transparent;
  transition: var(--ease-fast);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.p-tab.active { color: var(--blue-light); border-bottom-color: var(--blue-light); }

/* About */
.about-section { padding: 14px; }
.about-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden; margin-bottom: 12px;
}
.about-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.about-row:last-child { border-bottom: none; }
.about-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.about-val  { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.about-lbl  { font-size: 12px; color: var(--text-2); margin-top: 1px; }

/* Services grid on profile */
.services-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.service-tile {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px; text-align: center;
  cursor: pointer; transition: var(--ease-fast);
}
.service-tile:active { transform: scale(0.97); }
.service-tile-icon  { font-size: 26px; margin-bottom: 6px; }
.service-tile-name  { font-size: 13px; font-weight: 700; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.service-tile-price { font-size: 12px; color: var(--cyan); font-weight: 600; white-space: nowrap; }

/* ─── ADMIN DASHBOARD ─────────────────────── */
.admin-header {
  background: linear-gradient(135deg, #0d1f4a, #091832);
  padding: 16px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.admin-welcome { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.admin-sub     { font-size: 13px; color: var(--text-2); }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding: 14px;
}
.admin-stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden;
}
.admin-stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.admin-stat-card.blue::before   { background: var(--blue-light); }
.admin-stat-card.cyan::before   { background: var(--cyan); }
.admin-stat-card.purple::before { background: var(--purple); }
.admin-stat-card.red::before    { background: var(--red); }
.admin-stat-card.green::before  { background: var(--green); }
.admin-stat-card.orange::before { background: var(--orange); }
.admin-stat-icon { font-size: 24px; }
.admin-stat-val {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 800; color: var(--text-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-stat-lbl   { font-size: 12px; color: var(--text-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-stat-delta { font-size: 11px; font-weight: 600; margin-top: 2px; }
.admin-stat-delta.up   { color: var(--green); }
.admin-stat-delta.down { color: var(--red); }

.admin-section { padding: 0 14px 12px; }
.admin-section-title {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  margin-bottom: 10px; padding-top: 4px;
}
.admin-block { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.admin-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.admin-row:last-child { border-bottom: none; }
.admin-row-info { flex: 1; min-width: 0; }
.admin-row-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row-sub  { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row-btns { display: flex; gap: 6px; flex-shrink: 0; }

.admin-quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.admin-quick-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 14px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-md); cursor: pointer; transition: var(--ease-fast);
  overflow: hidden;
}
.admin-quick-btn:active { background: var(--bg-hover); transform: scale(0.97); }
.admin-quick-icon  { font-size: 24px; }
.admin-quick-label { font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }

/* ─── SETTINGS ────────────────────────────── */
.settings-section { padding: 14px 14px 4px; }
.settings-section-label {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 8px; padding: 0 2px;
}
.settings-group {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; margin-bottom: 14px;
}
.settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: var(--ease-fast);
  overflow: hidden;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:active { background: var(--bg-hover); }
.settings-row-icon {
  width: 36px; height: 36px; border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.settings-row-info { flex: 1; min-width: 0; }
.settings-row-label { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-row-sub   { font-size: 12px; color: var(--text-2); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-row-right { color: var(--text-3); flex-shrink: 0; display: flex; align-items: center; gap: 6px; }
.settings-row-val   { font-size: 13px; color: var(--text-2); white-space: nowrap; }

/* ─── Responsive Social ──────────────────── */

@media (max-width: 480px) {
  /* Chat */
  .chat-row { padding: 10px 12px; gap: 10px; }
  .chat-name  { font-size: 14px; }
  .chat-last  { font-size: 12px; }
  .chat-time  { font-size: 11px; }
  .bubble     { font-size: 14px; padding: 9px 12px; }
  .bubble-image { width: 170px; height: 130px; }
  .chat-input-bar { padding: 6px 10px; padding-bottom: calc(6px + var(--safe-b)); gap: 6px; }

  /* Notifs */
  .notif-row  { padding: 10px 12px; gap: 10px; }
  .notif-text { font-size: 13px; }
  .notif-thumb { width: 42px; height: 42px; }

  /* Profile */
  .profile-cover  { height: 140px; }
  .profile-name   { font-size: 20px; }
  .profile-bio    { font-size: 13px; }
  .profile-info   { padding: 0 12px 14px; }
  .profile-av-section { padding: 0 12px; }
  .p-stat-val     { font-size: 15px; }

  /* Admin */
  .admin-stats     { gap: 8px; padding: 10px; }
  .admin-stat-card { padding: 12px; }
  .admin-stat-val  { font-size: 20px; }
  .admin-stat-icon { font-size: 20px; }

  /* Stickers */
  .sticker-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .sticker-emoji { font-size: 24px; }
  .sticker-item  { padding: 8px 4px; }

  /* Settings */
  .settings-row { padding: 11px 12px; }
  .settings-row-label { font-size: 14px; }
}

@media (max-width: 360px) {
  /* Chat */
  .chat-row { padding: 9px 10px; gap: 8px; }
  .chat-name { font-size: 13px; }
  .msg       { max-width: 85%; }
  .bubble    { font-size: 13px; padding: 8px 11px; }
  .bubble-image { width: 150px; height: 110px; }
  .chat-send-btn, .chat-vocal-btn { width: 38px; height: 38px; }
  .chat-media-btn { width: 36px; height: 36px; }

  /* Notifs */
  .notif-row  { padding: 9px 10px; gap: 8px; }
  .notif-text { font-size: 12px; }
  .notif-time { font-size: 11px; }
  .notif-thumb { width: 38px; height: 38px; }
  .notif-tab  { font-size: 12px; padding: 10px 2px; }

  /* Profile */
  .profile-cover  { height: 120px; }
  .profile-name   { font-size: 18px; }
  .profile-bio    { font-size: 12px; }
  .profile-info   { padding: 0 10px 12px; }
  .profile-av-section { padding: 0 10px; margin-top: -38px; }
  /* Avatar réduit */
  .profile-av-ring .av-2xl { width: 80px; height: 80px; font-size: 26px; }
  .p-stat-val { font-size: 14px; }
  .p-stat-lbl { font-size: 9px; letter-spacing: 0.1px; }
  .p-tab      { font-size: 11px; padding: 10px 2px; }
  .profile-action-row .btn { font-size: 12px; padding: 8px 10px; }
  /* stats : passe 4 en 2x2 sur 320px */
  .profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-radius: var(--r-md);
  }
  .p-stat { border-right: none; border-bottom: 1px solid var(--border); }
  .p-stat:nth-child(odd) { border-right: 1px solid var(--border); }
  .p-stat:nth-last-child(-n+2) { border-bottom: none; }

  /* Admin */
  .admin-stat-val   { font-size: 18px; }
  .admin-stat-card  { padding: 10px; }
  .admin-quick-btn  { padding: 10px; }
  .admin-quick-icon { font-size: 20px; }
  .admin-quick-label { font-size: 11px; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 8px; }

  /* Stickers — 3 colonnes sur 320px */
  .sticker-grid  { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .sticker-emoji { font-size: 22px; }

  /* Settings */
  .settings-row-label { font-size: 13px; }
  .settings-row-sub   { font-size: 11px; }
  .settings-section   { padding: 10px 10px 4px; }
}

/* ─── GROUPES : affichage façon WhatsApp ───────────────────────── */
#group-chat-messages.gc-view { gap: 0; padding: 8px 8px 14px; }
#page-group-chat { position: relative; }
.gc-day { display: flex; justify-content: center; margin: 10px 0 6px; position: sticky; top: 4px; z-index: 2; }
.gc-day span {
  background: var(--bg-card); color: var(--text-2); font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.15);
}
.gc-row { display: flex; align-items: flex-start; gap: 6px; margin-top: 2px; position: relative; }
.gc-row.gc-first { margin-top: 8px; }
.gc-row.mine { justify-content: flex-end; }
.gc-row .gc-av { width: 30px; height: 30px; flex-shrink: 0; visibility: hidden; }
.gc-row.gc-first .gc-av { visibility: visible; }
.gc-col { max-width: 80%; min-width: 0; position: relative; display: flex; flex-direction: column; }
.gc-row.mine .gc-col { align-items: flex-end; }
.gc-swipe-icon {
  position: absolute; left: -34px; top: 50%; transform: translateY(-50%) scale(.6);
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg-card); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s, transform .15s;
}
.gc-row.gc-swiping .gc-swipe-icon { opacity: 1; transform: translateY(-50%) scale(1); }

.gc-bubble {
  position: relative; padding: 6px 8px 7px 9px; border-radius: 8px;
  font-size: 15px; line-height: 1.4; word-break: break-word;
  background: var(--bg-card2); color: var(--text-1); box-shadow: 0 1px .5px rgba(0,0,0,.13);
  min-width: 70px;
}
.gc-bubble.mine { background: var(--blue); color: #fff; }
/* Queue de la bulle : seulement sur le 1er message d'une série */
.gc-row.gc-first.theirs .gc-bubble { border-top-left-radius: 0; }
.gc-row.gc-first.mine .gc-bubble { border-top-right-radius: 0; }
.gc-row.gc-first .gc-bubble:not(.gc-bare)::before {
  content: ''; position: absolute; top: 0; width: 8px; height: 13px; background: inherit;
}
.gc-row.gc-first.theirs .gc-bubble:not(.gc-bare)::before { left: -8px; clip-path: polygon(100% 0, 0 0, 100% 100%); }
.gc-row.gc-first.mine .gc-bubble:not(.gc-bare)::before { right: -8px; clip-path: polygon(0 0, 100% 0, 0 100%); }

.gc-name { display: none; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.gc-row.gc-first .gc-name { display: flex; align-items: baseline; gap: 6px; }
.gc-role { font-size: 11px; font-weight: 500; color: var(--text-3); }

.gc-bubble .msg-text { white-space: pre-wrap; }
.gc-spacer { display: inline-block; width: 52px; height: 1px; }
.gc-bubble.mine .gc-spacer { width: 68px; }
.gc-meta {
  position: absolute; right: 7px; bottom: 4px; font-size: 11px; line-height: 1;
  display: inline-flex; align-items: center; gap: 3px; color: var(--text-3); white-space: nowrap;
}
.gc-bubble.mine .gc-meta { color: rgba(255,255,255,.75); }
.gc-tick svg { width: 15px; height: 15px; }
/* Vocal, position… : l'heure passe sous le contenu */
.gc-bubble:not(.gc-media) .voice-bubble, .gc-bubble [data-grp-map] { margin-bottom: 14px; }
.gc-bubble [data-grp-map] + div { margin-bottom: 0; }
.gc-bubble [data-grp-map] { margin-bottom: 6px; }
.gc-bubble:has([data-grp-map]) { padding-bottom: 20px; }

/* Photo / vidéo : remplit la bulle, heure posée sur l'image */
.gc-bubble.gc-media { padding: 3px; }
.gc-bubble.gc-media .gc-name, .gc-bubble.gc-media .gc-quote { margin: 3px 6px 4px; }
.gc-media-el { display: block; width: 260px; max-width: 100%; max-height: 320px; object-fit: cover; border-radius: 6px; }
.gc-caption { padding: 5px 6px 2px; }
.gc-bubble.gc-media:not(:has(.gc-caption)) .gc-meta {
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); right: 10px; bottom: 9px;
  background: linear-gradient(transparent, rgba(0,0,0,.35)); padding: 6px 4px 2px 10px; border-radius: 0 0 6px 0;
}
.gc-bubble.gc-media:has(.gc-caption) .gc-caption::after { content: ''; display: inline-block; width: 52px; }
.gc-bubble.mine.gc-media:has(.gc-caption) .gc-caption::after { width: 68px; }

/* Sticker / GIF : sans bulle, heure dans une pastille */
.gc-bubble.gc-bare { background: none; box-shadow: none; padding: 2px 2px 18px; }
.gc-bubble.gc-bare .gc-meta { background: rgba(0,0,0,.45); color: #fff; padding: 3px 6px; border-radius: 8px; right: 2px; bottom: 0; }

.gc-quote {
  border-radius: 6px; padding: 4px 8px; margin-bottom: 4px; font-size: 13px; cursor: pointer;
  background: rgba(0,0,0,.08);
}
.gc-bubble.mine .gc-quote { background: rgba(0,0,0,.15); }
.gc-bubble.mine .gc-quote div:first-child { filter: brightness(1.6); }

/* Réactions : pastille qui chevauche le bas de la bulle */
.gc-col .grp-reactions { margin-top: -6px !important; padding: 0 8px; position: relative; z-index: 1; }
.gc-col .grp-reactions span { box-shadow: 0 1px 2px rgba(0,0,0,.2); border-radius: 12px !important; padding: 2px 7px !important; }

.gc-row.gc-flash .gc-bubble { animation: gcFlash 1.2s ease; }
@keyframes gcFlash { 0%, 60% { filter: brightness(.75); } 100% { filter: none; } }

#gc-down {
  position: absolute; right: 14px; bottom: calc(var(--gc-bar-h, 76px) + 12px); z-index: 20;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--bg-card); color: var(--text-2); box-shadow: 0 2px 6px rgba(0,0,0,.3);
  display: none; align-items: center; justify-content: center;
}
#gc-down.show { display: flex; }
.gc-down-count:not(:empty) {
  position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--green, #22c55e); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
