/* ============================================================
   FLOWVIBE — Mobile CSS (TikTok-style)
   Chargé seulement sur mobile via PHP détection
   ============================================================ */

/* ── Reset mobile ── */
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  background: #000 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
  overflow-x: hidden;
}
body::before { display: none !important; }
.bg-orb { display: none !important; }

/* ── Header mobile ── */
.mob-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mob-header-logo {
  font-size: 1.3rem; font-weight: 900; letter-spacing: 2px;
  background: linear-gradient(135deg,#00d4ff,#a855f7);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; text-decoration: none;
}
.mob-header-actions { display: flex; align-items: center; gap: 12px; }
.mob-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; cursor: pointer; text-decoration: none; position: relative;
}
.mob-badge {
  position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fe2c55; color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #000;
}

/* ── Bottom nav ── */
.mob-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: 60px; background: rgba(0,0,0,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
}
.mob-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: rgba(255,255,255,0.80);
  font-size: 10px; font-weight: 500; transition: color .15s;
  padding: 6px 0;
}
.mob-nav-item.active { color: #fff; }
.mob-nav-item svg { width: 22px; height: 22px; }
.mob-nav-live {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.mob-nav-live-btn {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg,#fe2c55,#ff6b6b);
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 16px rgba(254,44,85,0.4);
}

/* ── Contenu principal ── */
.mob-content {
  padding-top: 60px; padding-bottom: 72px;
  min-height: 100dvh;
}

/* ── Stories / Lives bar ── */
.mob-lives-bar {
  display: flex; gap: 12px; overflow-x: auto; padding: 12px 16px;
  scrollbar-width: none;
}
.mob-lives-bar::-webkit-scrollbar { display: none; }
.mob-live-item {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 4px; text-decoration: none;
}
.mob-live-ring {
  width: 60px; height: 60px; border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg,#fe2c55,#ff8c00);
  position: relative;
}
.mob-live-ring img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; border: 2px solid #000;
}
.mob-live-ring .mob-live-badge {
  position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  background: #fe2c55; color: #fff; font-size: 8px; font-weight: 800;
  letter-spacing: 0.5px; padding: 1px 5px; border-radius: 3px;
  text-transform: uppercase; border: 1px solid #000;
}
.mob-live-name {
  color: rgba(255,255,255,0.95); font-size: 11px; font-weight: 500;
  max-width: 64px; text-align: center; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.mob-start-live {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 4px; text-decoration: none;
}
.mob-start-live-circle {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 2px dashed rgba(255,255,255,0.55);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}

/* ── Post card ── */
.mob-post {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 14px 16px;
}
.mob-post-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.mob-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.mob-avatar-lg {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover;
}
.mob-post-user { font-size: .88rem; font-weight: 700; color: #fff; }
.mob-post-time { font-size: .72rem; color: rgba(255,255,255,0.70); margin-top: 1px; }
.mob-post-content { font-size: .88rem; line-height: 1.5; color: rgba(255,255,255,0.9); margin-bottom: 10px; }
.mob-post-image {
  width: calc(100% + 32px); margin: 0 -16px 10px;
  max-height: 320px; object-fit: cover;
}
.mob-post-actions {
  display: flex; align-items: center; gap: 20px;
}
.mob-action-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none; color: rgba(255,255,255,0.88);
  font-size: .82rem; cursor: pointer; padding: 4px 0;
}
.mob-action-btn.liked { color: #fe2c55; }
.mob-action-btn svg { width: 18px; height: 18px; }

/* ── Composer ── */
.mob-composer {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.mob-composer-input {
  flex: 1; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
  padding: 9px 14px; color: #fff; font-size: .88rem; outline: none;
  resize: none; min-height: 40px;
}
.mob-composer-input::placeholder { color: rgba(255,255,255,0.65); }
.mob-post-btn {
  background: #fe2c55; color: #fff; border: none; border-radius: 20px;
  padding: 9px 16px; font-size: .82rem; font-weight: 700; cursor: pointer;
  white-space: nowrap; margin-top: 1px;
}

/* ── Lives page ── */
.mob-lives-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 12px 12px;
}
.mob-live-card {
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg,#1a0a2e,#0d1b3e);
  aspect-ratio: 9/16; position: relative;
  text-decoration: none;
}
.mob-live-card-thumb {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.mob-live-card-thumb img {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(254,44,85,0.6);
}
.mob-live-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px 10px;
  background: linear-gradient(to top,rgba(0,0,0,0.8),transparent);
}
.mob-live-card-name { color: #fff; font-size: .78rem; font-weight: 700; }
.mob-live-card-viewers {
  display: flex; align-items: center; gap: 3px;
  color: rgba(255,255,255,0.92); font-size: .7rem; margin-top: 2px;
}
.mob-live-card-badge {
  position: absolute; top: 8px; left: 8px;
  background: #fe2c55; color: #fff; font-size: .65rem; font-weight: 800;
  letter-spacing: 1px; padding: 2px 7px; border-radius: 3px;
}

/* ── Profil ── */
.mob-profile-header {
  padding: 16px;
  background: linear-gradient(to bottom,rgba(168,85,247,0.15),transparent);
}
.mob-profile-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px;
}
.mob-profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; border: 3px solid rgba(168,85,247,0.5);
}
.mob-profile-actions { display: flex; gap: 8px; }
.mob-btn-primary {
  background: #fe2c55; color: #fff; border: none; border-radius: 8px;
  padding: 8px 16px; font-size: .82rem; font-weight: 700; cursor: pointer;
}
.mob-btn-outline {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,0.55); border-radius: 8px;
  padding: 8px 16px; font-size: .82rem; cursor: pointer;
}
.mob-profile-name { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 2px; }
.mob-profile-username { font-size: .82rem; color: rgba(255,255,255,0.80); margin-bottom: 8px; }
.mob-profile-bio { font-size: .85rem; color: rgba(255,255,255,0.95); line-height: 1.4; margin-bottom: 12px; }
.mob-profile-stats {
  display: flex; gap: 20px;
}
.mob-stat { text-align: center; }
.mob-stat-num { font-size: 1rem; font-weight: 700; color: #fff; }
.mob-stat-label { font-size: .72rem; color: rgba(255,255,255,0.80); }

/* Tabs profil */
.mob-tabs {
  display: flex; border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky; top: 52px; background: #000; z-index: 10;
}
.mob-tab {
  flex: 1; padding: 12px; text-align: center;
  color: rgba(255,255,255,0.80); font-size: .85rem; font-weight: 600;
  border-bottom: 2px solid transparent; cursor: pointer;
  background: none; border-top: none; border-left: none; border-right: none;
  transition: all .15s;
}
.mob-tab.active { color: #fff; border-bottom-color: #fe2c55; }

/* Grille photos */
.mob-photos-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 2px;
}
.mob-photo-thumb {
  aspect-ratio: 1; object-fit: cover; width: 100%;
}

/* ── Messagerie ── */
.mob-conv-list { padding: 8px 0; }
.mob-conv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.05);
  text-decoration: none; cursor: pointer;
}
.mob-conv-item:active { background: rgba(255,255,255,0.04); }
.mob-conv-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; flex-shrink: 0; position: relative; }
.mob-online-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: #00ff88; border: 2px solid #000;
}
.mob-conv-info { flex: 1; min-width: 0; }
.mob-conv-name { font-size: .9rem; font-weight: 600; color: #fff; margin-bottom: 2px; }
.mob-conv-preview {
  font-size: .8rem; color: rgba(255,255,255,0.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mob-conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mob-conv-time { font-size: .72rem; color: rgba(255,255,255,0.65); }
.mob-unread-badge {
  width: 18px; height: 18px; border-radius: 50%; background: #fe2c55;
  color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* Chat conversation */
.mob-chat-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 56px;
  background: rgba(0,0,0,0.95); backdrop-filter: blur(12px);
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mob-back-btn {
  width: 32px; height: 32px; background: none; border: none; color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.mob-messages-list {
  padding: 64px 12px 80px; display: flex; flex-direction: column; gap: 8px;
}
.mob-msg-bubble {
  max-width: 75%; padding: 9px 13px; border-radius: 18px;
  font-size: .88rem; line-height: 1.4; word-break: break-word;
}
.mob-msg-bubble.mine {
  background: #fe2c55; color: #fff; align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.mob-msg-bubble.other {
  background: rgba(255,255,255,0.1); color: #fff; align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.mob-chat-input-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(0,0,0,0.95); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 8px;
}
.mob-chat-input {
  flex: 1; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 22px;
  padding: 9px 16px; color: #fff; font-size: .88rem; outline: none;
}
.mob-send-btn {
  width: 40px; height: 40px; border-radius: 50%; background: #fe2c55;
  border: none; color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}

/* ── Section titles ── */
.mob-section-title {
  font-size: .72rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: rgba(255,255,255,0.70);
  padding: 10px 16px 6px;
}

/* ── PWA install banner ── */
#pwa-banner {
  position: fixed; bottom: 80px; left: 12px; right: 12px; z-index: 9999;
  background: rgba(10,8,30,0.98); backdrop-filter: blur(24px);
  border: 1px solid rgba(168,85,247,0.6); border-radius: 18px;
  padding: 16px; display: none; align-items: center; gap: 12px;
  box-shadow: 0 8px 40px rgba(100,50,255,0.3), 0 2px 12px rgba(0,0,0,0.6);
  transform: translateY(20px); opacity: 0;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .35s ease;
}
#pwa-banner.show {
  display: flex;
  animation: pwaSlideUp .35s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes pwaSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.pwa-icon { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.pwa-text { flex: 1; min-width: 0; }
.pwa-title { font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: 3px; }
.pwa-sub   { font-size: .74rem; color: rgba(255,255,255,0.82); line-height: 1.5; }
.pwa-install-btn {
  background: linear-gradient(135deg,#a855f7,#6366f1); color: #fff;
  border: none; border-radius: 10px; padding: 9px 16px;
  font-size: .82rem; font-weight: 700; cursor: pointer; white-space: nowrap;
  flex-shrink: 0; box-shadow: 0 2px 12px rgba(168,85,247,0.4);
}
.pwa-dismiss {
  background: rgba(255,255,255,0.08); border: none; border-radius: 50%;
  color: rgba(255,255,255,0.80); cursor: pointer; font-size: 1rem;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
/* ── Protection téléchargement images ── */
img{-webkit-user-drag:none;user-drag:none;-webkit-user-select:none;user-select:none}
