:root {
  --vm-bg: #0c0c0f;
  --vm-pink: #fe2c55;
  --vm-cyan: #25f4ee;
  --vm-tabbar-h: 64px;
  --vm-player-h: 44px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--vm-bg);
  color: #fff;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  height: 100%;
}

a { color: var(--vm-cyan); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

/* ---------- Focus states accessibilité ---------- */
:focus-visible {
  outline: 2px solid var(--vm-cyan);
  outline-offset: 2px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

/* ---------- Tab bar (bas, façon appli mobile) ---------- */
.vm-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--vm-tabbar-h);
  display: flex;
  align-items: stretch;
  background: rgba(10, 10, 13, .96);
  border-top: 1px solid rgba(255, 255, 255, .08);
  z-index: 50;
  backdrop-filter: blur(8px);
}
.vm-tab {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #8a8a93;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s;
}
.vm-tab i { font-size: 20px; }
.vm-tab.active, .vm-tab:hover { color: #fff; }
.vm-tab span { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Indicateur actif en haut de l'onglet */
.vm-tab.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--vm-pink);
  border-radius: 0 0 2px 2px;
}

.vm-main { min-height: 100%; padding-bottom: var(--vm-tabbar-h); }

/* ---------- Feed plein écran scroll-snap ---------- */
.vm-feed-body .vm-main { padding-bottom: 0; }
.vm-feed {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.vm-feed::-webkit-scrollbar { display: none; }

.vm-card {
  position: relative;
  height: 100vh;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.vm-card-bg {
  position: absolute; inset: 0;
  overflow: hidden;
  background: var(--c3, #06020f);
}
/* 3 blobs floutés — effet aurora/plasma */
.vm-card-bg::before {
  content: '';
  position: absolute;
  width: 200%; height: 200%;
  top: -50%; left: -50%;
  background:
    radial-gradient(circle 55% at var(--bx1, 25%) var(--by1, 30%), var(--c1, #c01848) 0%, transparent 65%),
    radial-gradient(circle 48% at var(--bx2, 70%) var(--by2, 65%), var(--c2, #2e10a0) 0%, transparent 65%),
    radial-gradient(circle 40% at var(--bx3, 50%) var(--by3, 25%), var(--c2, #2e10a0) 0%, transparent 58%);
  filter: blur(55px) saturate(1.6);
  animation: var(--ba, vmBlobA) var(--bd, 12s) ease-in-out infinite;
}
/* Vignette légère */
.vm-card-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 95% 85% at 50% 45%, transparent 0%, rgba(0,0,0,.42) 100%);
}
/* Accent lumineux orbitant */
.vm-card-accent {
  position: absolute;
  top: calc(50% - 70px); left: calc(50% - 70px);
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.22) 0%, transparent 70%);
  filter: blur(28px);
  animation: vmAccentOrbit var(--ad, 5s) linear infinite;
  z-index: 1;
}
.vm-card-accent-2 {
  position: absolute;
  top: calc(50% - 45px); left: calc(50% - 45px);
  width: 90px; height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16) 0%, transparent 70%);
  filter: blur(18px);
  animation: vmAccentOrbit2 var(--ad2, 3s) linear infinite reverse;
  z-index: 1;
}

/* 6 animations de blob avec caractères distincts */
@keyframes vmBlobA { /* dérive douce */
  0%   { transform: translate(  0%,   0%); }
  20%  { transform: translate(  7%,  11%); }
  40%  { transform: translate( -5%,  17%); }
  60%  { transform: translate( 11%,  -7%); }
  80%  { transform: translate( -3%, -11%); }
  100% { transform: translate(  0%,   0%); }
}
@keyframes vmBlobB { /* orbite circulaire */
  0%   { transform: translate(0,0) rotate(  0deg) scale(1.00); }
  25%  { transform: translate( 8%, 5%) rotate( 90deg) scale(1.08); }
  50%  { transform: translate( 0%,10%) rotate(180deg) scale(0.92); }
  75%  { transform: translate(-8%, 5%) rotate(270deg) scale(1.08); }
  100% { transform: translate(0,0) rotate(360deg) scale(1.00); }
}
@keyframes vmBlobC { /* pulsation rapide */
  0%   { transform: translate(  0%,  0%) scale(1.00); }
  15%  { transform: translate(  4%,  7%) scale(1.16); }
  30%  { transform: translate(  7%,  2%) scale(0.86); }
  45%  { transform: translate(  2%, -5%) scale(1.14); }
  60%  { transform: translate( -6%,  2%) scale(0.88); }
  75%  { transform: translate( -2%,  7%) scale(1.12); }
  90%  { transform: translate(  4%,  3%) scale(0.90); }
  100% { transform: translate(  0%,  0%) scale(1.00); }
}
@keyframes vmBlobD { /* spin pur */
  0%   { transform: translate(0,0) rotate(  0deg); }
  100% { transform: translate(0,0) rotate(360deg); }
}
@keyframes vmBlobE { /* balayage diagonal */
  0%   { transform: translate(  0%,   0%) scale(1.00); }
  33%  { transform: translate( 14%,  12%) scale(1.12); }
  66%  { transform: translate(-13%, -11%) scale(0.88); }
  100% { transform: translate(  0%,   0%) scale(1.00); }
}
@keyframes vmBlobF { /* chaos */
  0%   { transform: translate( 0%, 0%) rotate(  0deg) scale(1.00); }
  12%  { transform: translate(-5%, 8%) rotate( 43deg) scale(1.06); }
  25%  { transform: translate( 9%,-4%) rotate( 90deg) scale(0.93); }
  37%  { transform: translate(-3%,-9%) rotate(133deg) scale(1.09); }
  50%  { transform: translate( 8%, 5%) rotate(180deg) scale(0.91); }
  62%  { transform: translate(-8%, 3%) rotate(223deg) scale(1.07); }
  75%  { transform: translate( 4%,-8%) rotate(270deg) scale(0.94); }
  87%  { transform: translate(-5%,-3%) rotate(313deg) scale(1.05); }
  100% { transform: translate( 0%, 0%) rotate(360deg) scale(1.00); }
}

/* Orbites des accents lumineux */
@keyframes vmAccentOrbit {
  0%   { transform: translate( 130px, -80px); opacity: .55; }
  25%  { transform: translate(  80px, 130px); opacity: .75; }
  50%  { transform: translate(-130px,  80px); opacity: .55; }
  75%  { transform: translate( -80px,-130px); opacity: .75; }
  100% { transform: translate( 130px, -80px); opacity: .55; }
}
@keyframes vmAccentOrbit2 {
  0%   { transform: translate( 90px,  60px); }
  25%  { transform: translate(-60px,  90px); }
  50%  { transform: translate(-90px, -60px); }
  75%  { transform: translate( 60px, -90px); }
  100% { transform: translate( 90px,  60px); }
}


/* infos + actions */
.vm-card-info {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 84px;
  bottom: calc(var(--vm-tabbar-h) + var(--vm-player-h) + 12px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}
.vm-card-author { font-weight: 700; font-size: 17px; }
.vm-card-num { font-size: 12px; font-weight: 700; letter-spacing: .5px; opacity: .65; font-variant-numeric: tabular-nums; margin-bottom: 1px; }
.vm-card-title { font-size: 15px; margin: 4px 0; }
.vm-copy-lyrics { font-size: 13px; cursor: pointer; opacity: .75; margin-left: 4px; }
.vm-copy-lyrics:hover { opacity: 1; }
.vm-card-style {
  font-size: 13px; opacity: .9;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.vm-card-style .bi { color: var(--vm-cyan); }
.vm-card-lyrics {
  font-size: 11px; opacity: .75; margin-top: 6px;
  white-space: pre-wrap; overflow-y: auto;
  flex: 1; min-height: 0;
  line-height: 1.55;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
  /* Appui long sur les paroles = lecture x2 : on neutralise la sélection de
     texte et le menu contextuel natif (iOS/Android) qui gêneraient le geste. */
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}

/* Badge « 2× » affiché tant qu'on maintient l'appui sur les paroles. */
.vm-speed-badge {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.7);
  z-index: 5; pointer-events: none;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 28px; font-weight: 700; letter-spacing: .5px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .12s ease, transform .12s ease;
}
.vm-card.vm-speeding .vm-speed-badge {
  opacity: 1; transform: translate(-50%, -50%) scale(1);
}

.vm-actions {
  position: absolute; right: 12px; bottom: calc(var(--vm-tabbar-h) + var(--vm-player-h) + 24px);
  z-index: 2;
  display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.vm-action {
  background: none; border: none; color: #fff; font-size: 13px;
  cursor: pointer;
  min-width: 44px; min-height: 44px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .2s;
}
.vm-action i { font-size: 30px; display: block; transition: color .2s, transform .2s; }
.vm-action:hover i { transform: scale(1.15); }
.vm-action.active.like i { color: var(--vm-pink); }
.vm-action.active.dislike i { color: var(--vm-cyan); }
.vm-action.like:not(.active):hover i { color: rgba(254,44,85,.7); }
.vm-action.dislike:not(.active):hover i { color: rgba(37,244,238,.7); }
.vm-action small { display: block; margin-top: 2px; }
.vm-action.views { cursor: default; color: rgba(255,255,255,.6); }
.vm-action.views:hover i { transform: none; }
.vm-action.disabled, .vm-action:disabled { cursor: not-allowed; color: rgba(255,255,255,.28); }
.vm-action.disabled:hover i, .vm-action:disabled:hover i { transform: none; }
/* Partage d'une musique privée : grisé mais cliquable (le clic la publie). */
.vm-action.private-share { color: rgba(255,255,255,.32); }
.vm-action.private-share:hover { color: rgba(255,255,255,.7); }
.vm-action.views i { font-size: 26px; }
.vm-action.share i { font-size: 26px; transition: color .2s, transform .2s; }
.vm-action.share:hover i { color: var(--vm-cyan); }

.vm-progress { display: none; }

.vm-mute {
  position: fixed; top: 14px; right: 14px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.45); color: #fff; font-size: 18px;
  cursor: pointer; transition: background .2s;
}
.vm-mute:hover { background: rgba(0,0,0,.7); }

/* Bouton filtre */
.vm-filter-btn {
  position: fixed; top: 14px; right: 12px; z-index: 40;
  width: 44px; height: 44px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.45); color: #fff; font-size: 17px;
  cursor: pointer; transition: background .2s, color .2s;
}
.vm-filter-btn:hover { background: rgba(0,0,0,.7); }
.vm-filter-btn.active { background: var(--vm-pink); }

/* Overlay filtre (bottom sheet) */
.vm-filter-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.vm-filter-hidden { display: none !important; }

/* ── Modale d'administration ── */
.vm-admin-overlay { position: fixed; inset: 0; z-index: 95; display: flex; padding: 12px; }
.vm-admin-hidden { display: none !important; }
.vm-admin-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.vm-admin-panel {
  position: relative; z-index: 1; margin: auto;
  width: 100%; max-width: 680px; max-height: 88vh;
  display: flex; flex-direction: column;
  background: #161619; border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; overflow: hidden; animation: vmSlideUp .2s ease;
}
.vm-admin-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky; top: 0; background: #161619;
}
.vm-admin-topbar { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); background: #161619; }
.vm-admin-body { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.vm-admin-user {
  border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px;
  background: #1b1b1f; display: flex; flex-direction: column; gap: 10px;
}
.vm-admin-user-head { display: flex; align-items: center; gap: 10px; }
.vm-admin-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.vm-admin-user-name { font-weight: 700; }
.vm-admin-counts { font-size: 12px; color: #9a9aa3; }
.vm-admin-inprogress {
  color: #2bd576; font-weight: 600; white-space: nowrap;
}
.vm-admin-inprogress i { margin-right: 2px; animation: vm-spin 1.2s linear infinite; }
@keyframes vm-spin { to { transform: rotate(360deg); } }
.vm-admin-badge {
  font-size: 10px; background: #b58900; color: #000; padding: 1px 6px;
  border-radius: 999px; vertical-align: middle;
}
.vm-admin-section { display: flex; flex-direction: column; gap: 6px; }
.vm-admin-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 8px; background: #141417; border-radius: 8px; font-size: 13px;
}
.vm-admin-row-label i { margin-right: 6px; opacity: .85; }
.vm-admin-row-actions { display: flex; align-items: center; gap: 10px; }
.vm-admin-muted { color: rgba(255,255,255,.4); font-size: 12px; }
.vm-admin-danger {
  display: flex; flex-wrap: wrap; gap: 8px;
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px;
}
.vm-admin-danger .btn { font-size: 12px; }
.vm-admin-profile-edit { gap: 8px; }
.adm-avatar-label {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 13px; color: var(--vm-cyan); width: fit-content;
}
.adm-avatar-preview {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.15);
}
.adm-bio { font-size: 13px; background: #141417; color: #fff; border: 1px solid rgba(255,255,255,.12); }
.adm-bio:focus { background: #141417; color: #fff; border-color: var(--vm-cyan); box-shadow: none; }
.adm-save-profile { width: fit-content; }
.adm-profile-msg { min-height: 1em; }

.vm-filter-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
}
.vm-filter-sheet {
  position: relative; z-index: 1;
  background: #161619;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-bottom: calc(var(--vm-tabbar-h) + 8px);
  max-height: 72vh;
  overflow-y: auto;
  animation: vmSlideUp .22s ease;
}
.vm-filter-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 15px;
  position: sticky; top: 0;
  background: #161619; z-index: 2;
}
.vm-filter-close {
  background: none; border: none; color: #aaa; font-size: 18px;
  cursor: pointer; padding: 0 4px; transition: color .2s;
}
.vm-filter-close:hover { color: #fff; }
.vm-filter-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.vm-filter-toggle i { margin-right: 6px; opacity: .8; }
.vm-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.vm-switch input { opacity: 0; width: 0; height: 0; }
.vm-switch-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255,255,255,.18); border-radius: 24px;
  transition: background .2s;
}
.vm-switch-slider::before {
  content: ""; position: absolute; height: 18px; width: 18px;
  left: 3px; top: 3px; background: #fff; border-radius: 50%;
  transition: transform .2s;
}
.vm-switch input:checked + .vm-switch-slider { background: var(--vm-pink); }
.vm-switch input:checked + .vm-switch-slider::before { transform: translateX(20px); }
.vm-filter-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  cursor: pointer; transition: background .15s;
  font-size: 14px;
}
.vm-filter-item:hover { background: rgba(255,255,255,.06); }
.vm-filter-item.active { color: var(--vm-pink); }
.vm-filter-section-label {
  padding: 14px 16px 4px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
}
.vm-filter-track-title {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vm-filter-count { color: rgba(255,255,255,.4); font-size: 12px; }
.vm-applystyle-preview {
  margin: 4px 16px 8px; padding: 8px 12px;
  background: rgba(255,255,255,.06); border-radius: 10px;
  font-size: 13px; color: rgba(255,255,255,.85); word-break: break-word;
}
.vm-filter-all-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.vm-filter-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.15);
}

.vm-unmute-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(254,44,85,.88);
  backdrop-filter: blur(4px);
  color: #fff; text-align: center;
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; letter-spacing: .01em;
  transition: opacity .3s, transform .3s;
}
.vm-unmute-bar.hidden {
  opacity: 0; pointer-events: none; transform: translateY(-100%);
}

.vm-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; color: #aaa;
}
.vm-empty i { font-size: 48px; }

/* ---------- Auth ---------- */
.vm-auth {
  min-height: calc(100vh - var(--vm-tabbar-h));
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.vm-auth-card {
  width: 100%; max-width: 380px;
  background: #161619;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; padding: 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
}
.vm-logo {
  font-family: 'Righteous', sans-serif;
  font-weight: 400;
  font-size: 30px; margin: 0 0 4px;
}
.vm-logo span {
  background: linear-gradient(135deg, var(--vm-pink), var(--vm-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Create ---------- */
.vm-create, .vm-my { max-width: 640px; margin: 0 auto; padding: 20px 16px calc(var(--vm-tabbar-h) + 20px); }

/* Toggle autogén global */
.vm-autogen-toggle-wrap { display: flex; align-items: center; gap: 8px; }
.vm-autogen-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; min-width: 26px; text-align: center; }
.vm-autogen-on  { color: #22c55e; }
.vm-autogen-off { color: #ef4444; }

/* Pilules de profils */
.vm-pills-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.vm-pills-scroll::-webkit-scrollbar { display: none; }
.vm-pills-row { display: flex; gap: 8px; padding-bottom: 4px; }
.vm-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 20px; flex-shrink: 0;
  font-size: 13px; font-weight: 500; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1);
  color: #8a8a93; transition: all .18s;
}
.vm-pill:hover { border-color: rgba(255,255,255,.25); color: #ddd; }
.vm-pill.active { background: rgba(254,44,85,.12); border-color: var(--vm-pink); color: #fff; }
.vm-pill i { font-size: 11px; }
.vm-pill-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.vm-pill-dot.on  { background: #22c55e; }
.vm-pill-dot.off { background: #ef4444; opacity: .7; }
.vm-dot-on { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; vertical-align: middle; margin-right: 2px; }
.vm-pill-add {
  background: transparent; border: 1.5px dashed rgba(255,255,255,.18);
  color: rgba(255,255,255,.35);
}
.vm-pill-add:hover { border-color: rgba(255,255,255,.45); color: rgba(255,255,255,.7); }

/* Barre d'édition du profil */
.vm-profile-edit-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px; padding: 10px 14px;
}
.vm-profile-name-field { display: flex; flex-direction: column; gap: 3px; flex: 1 1 140px; min-width: 0; }
.vm-profile-name-label { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.55); margin: 0; }
.vm-profile-name-input { background: rgba(255,255,255,.06) !important; border-color: rgba(255,255,255,.12) !important; }
.vm-profile-status-label { font-size: 12px; font-weight: 600; min-width: 36px; }
.vm-del-btn { background: none; border: 1px solid rgba(239,68,68,.4); color: #ef4444; padding: 4px 8px; }
.vm-del-btn:hover { background: rgba(239,68,68,.12); }
.vm-save-msg { font-size: 12px; min-height: 18px; color: #8a8a93; }

/* Prévisualisation paroles existantes dans la modal IA */
.vm-ai-existing-preview {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; padding: 10px 12px; font-size: 12px; color: #8a8a93;
  white-space: pre-wrap; word-break: break-word; max-height: 120px;
  overflow-y: auto; font-family: inherit; margin: 0;
}

/* Bouton IA paroles */
.vm-ai-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 500;
  background: linear-gradient(135deg, rgba(254,44,85,.18), rgba(37,244,238,.18));
  border: 1px solid rgba(254,44,85,.35); color: var(--vm-pink);
  cursor: pointer; transition: all .2s;
}
.vm-ai-btn:hover { background: linear-gradient(135deg, rgba(254,44,85,.3), rgba(37,244,238,.3)); color: #fff; }

/* Modal IA plein écran */
.vm-ai-modal {
  position: fixed; inset: 0; z-index: 200;
  background: var(--vm-bg);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateY(100%); transition: transform .25s ease;
  pointer-events: none;
}
.vm-ai-modal.open { transform: translateY(0); pointer-events: all; }
.vm-ai-modal-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; height: 52px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(10,10,13,.97); backdrop-filter: blur(8px);
}
.vm-ai-close {
  background: none; border: none; color: #8a8a93; font-size: 20px;
  cursor: pointer; padding: 6px; transition: color .2s;
}
.vm-ai-close:hover { color: #fff; }
.vm-ai-modal-title { font-size: 15px; font-weight: 600; color: #fff; }
.vm-ai-modal-body {
  padding: 20px 16px 60px;
  max-width: 640px; width: 100%; margin: 0 auto;
}
.vm-create h2, .vm-my h2 {
  font-family: 'Righteous', sans-serif;
  font-weight: 400;
}
.form-control { background:#161619; border:1px solid rgba(255,255,255,.12); color:#fff; }
.form-control:focus { background:#161619; color:#fff; border-color: var(--vm-pink); box-shadow: 0 0 0 .2rem rgba(254,44,85,.2); }
.btn-primary { background: var(--vm-pink); border-color: var(--vm-pink); font-weight: 700; transition: background .2s, border-color .2s, transform .1s; }
.btn-primary:hover { background:#e02249; border-color:#e02249; }
.btn-primary:active { transform: scale(.97); }

.vm-style-group { margin-bottom: 14px; }
.vm-style-label {
  font-size: 11px; color: #8a8a93; text-transform: uppercase;
  letter-spacing: .06em; font-weight: 700;
  display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
}
.vm-style-label::after {
  content: "▸"; font-size: 10px; transition: transform .15s; margin-left: auto;
}
.vm-style-group.open .vm-style-label::after { transform: rotate(90deg); }
.vm-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
  max-height: 0; overflow: hidden; transition: max-height .25s ease;
}
.vm-style-group.open .vm-chips {
  max-height: 320px; overflow-y: auto;
  -webkit-overflow-scrolling: touch; padding-right: 4px;
}
.vm-chip {
  border: 1px solid rgba(255,255,255,.18); background: transparent; color: #ccc;
  border-radius: 999px; padding: 8px 14px; font-size: 12px;
  min-height: 36px;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap; cursor: pointer;
}
.vm-chip:hover { border-color: rgba(255,255,255,.5); color: #fff; background: rgba(255,255,255,.06); }
.vm-chip.selected { background: var(--vm-pink); border-color: var(--vm-pink); color: #fff; font-weight: 600; }
.vm-style-preview-text { font-size: 13px; color: var(--vm-cyan); word-break: break-word; }

.vm-gen-status { margin-top: 18px; padding: 14px; border-radius: 12px; background:#161619; border:1px solid rgba(255,255,255,.08); }

/* ---------- My tracks ---------- */
.vm-my-list { display: flex; flex-direction: column; gap: 12px; }
#my-sentinel { height: 1px; width: 100%; }
.vm-track {
  background:#161619; border:1px solid rgba(255,255,255,.08); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  transition: background .2s, border-color .2s;
}
.vm-track:hover { background: #1c1c20; border-color: rgba(255,255,255,.18); }
.vm-track-clickable { cursor: pointer; }
.vm-track-clickable:hover { border-color: rgba(255,255,255,.3); }
.vm-track-clickable:hover .vm-track-title::after {
  content: "  ▶";
  color: var(--vm-cyan);
  font-size: 11px;
}
.vm-track-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.vm-track-num { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #9a9aa3; font-variant-numeric: tabular-nums; }
.vm-track-title { font-weight: 700; }
.vm-track-style { font-size: 12px; color: #9a9aa3; }
.vm-badge {
  font-size: 11px; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  transition: background .2s;
}
.vm-badge.pending { background:#3a3a1a; color:#ffd34d; }
.vm-badge.running { background:#16324a; color: var(--vm-cyan); }
.vm-badge.done { background:#16331f; color:#4ade80; }
.vm-badge.failed { background:#3a1717; color:#ff6b6b; }
.vm-track audio { width: 100%; }
.vm-track-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vm-track-actions .btn { font-size: 13px; }

/* ── Tableau de bord publication (Mes musiques · Srbastien) ─────────────── */
.vm-dash {
  margin-bottom: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.vm-dash-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.vm-dash-title {
  font-size: 13px; font-weight: 600; letter-spacing: .3px; color: #d6d6de;
  display: inline-flex; align-items: center; gap: 7px;
}
.vm-dash-title i { color: var(--vm-cyan); }
.vm-dash-rate {
  font-size: 11px; font-weight: 600; color: #cfeffd;
  background: rgba(37,244,238,.1); border: 1px solid rgba(37,244,238,.25);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}

/* Carte « autonomie » (runway) — couleur selon l'urgence. */
.vm-dash-hero {
  position: relative; overflow: hidden;
  border-radius: 16px; padding: 18px 20px;
  border: 1px solid rgba(255,255,255,.1);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,.06), transparent 60%),
    #15151a;
}
.vm-dash-hero::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: var(--vm-cyan);
}
.vm-dash-hero.ok::before     { background: #4ade80; }
.vm-dash-hero.warn::before   { background: #ffd34d; }
.vm-dash-hero.danger::before { background: var(--vm-pink); }
.vm-dash-hero.empty::before  { background: #555; }
.vm-dash-hero.ok     { box-shadow: inset 0 0 0 1px rgba(74,222,128,.18); }
.vm-dash-hero.warn   { box-shadow: inset 0 0 0 1px rgba(255,211,77,.2); }
.vm-dash-hero.danger { box-shadow: inset 0 0 0 1px rgba(254,44,85,.28); }
.vm-dash-rw {
  font-size: 38px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.5px;
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.vm-dash-hero.ok     .vm-dash-rw { color: #4ade80; }
.vm-dash-hero.warn   .vm-dash-rw { color: #ffd34d; }
.vm-dash-hero.danger .vm-dash-rw { color: var(--vm-pink); }
.vm-dash-hero.empty  .vm-dash-rw { color: #9a9aa3; }
.vm-dash-rw-cap {
  font-size: 12px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase; color: #9a9aa3;
}
.vm-dash-rw-sub { margin-top: 7px; font-size: 12px; color: #b9b9c2; }
.vm-dash-rw-sub b { color: #fff; font-weight: 700; }

/* KPI chips */
.vm-dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vm-dash-kpi {
  background: #161619; border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px; padding: 12px 10px; text-align: center;
}
.vm-dash-kpi-v {
  font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums;
  display: inline-flex; align-items: center; gap: 7px;
}
.vm-dash-kpi-v i { font-size: 15px; opacity: .9; }
.vm-dash-kpi-l {
  font-size: 11px; color: #9a9aa3; margin-top: 3px;
  text-transform: uppercase; letter-spacing: .5px;
}
.vm-dash-kpi.pub   .vm-dash-kpi-v { color: #4ade80; }
.vm-dash-kpi.queue .vm-dash-kpi-v { color: var(--vm-cyan); }
.vm-dash-kpi.res   .vm-dash-kpi-v { color: #c7b3ff; }

/* Liste par profil + barre segmentée */
.vm-dash-profiles { display: flex; flex-direction: column; gap: 10px; }
.vm-dash-prof {
  background: #161619; border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px; padding: 11px 13px;
  display: flex; flex-direction: column; gap: 8px;
}
.vm-dash-prof-clickable { cursor: pointer; transition: background .18s, border-color .18s, transform .08s; }
.vm-dash-prof-clickable:hover {
  background: #1d1d22; border-color: rgba(37,244,238,.35);
}
.vm-dash-prof-clickable:active { transform: scale(.995); }
.vm-dash-prof-clickable:focus-visible {
  outline: 2px solid var(--vm-cyan); outline-offset: 2px;
}
.vm-dash-prof-go {
  font-size: 14px; color: #6b6b76; margin-right: 7px; vertical-align: -1px;
  transition: color .18s;
}
.vm-dash-prof-clickable:hover .vm-dash-prof-go { color: var(--vm-cyan); }
.vm-dash-prof-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.vm-dash-prof-name {
  font-size: 13px; font-weight: 600; color: #e7e7ee;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vm-dash-prof-counts {
  font-size: 13px; color: #9a9aa3; white-space: nowrap;
  font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 5px;
}
.vm-dash-prof-counts .sep { color: rgba(255,255,255,.25); }
.vm-dash-prof-counts .c-pub   { color: #4ade80; }
.vm-dash-prof-counts .c-queue { color: var(--vm-cyan); }
.vm-dash-prof-counts .c-res   { color: #c7b3ff; }
.vm-dash-bar {
  display: flex; height: 8px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.06);
}
.vm-dash-bar .seg { height: 100%; transition: width .4s ease; }
.vm-dash-bar .seg.pub   { background: #4ade80; }
.vm-dash-bar .seg.queue { background: var(--vm-cyan); }
.vm-dash-bar .seg.res   { background: rgba(199,179,255,.45); }

/* Légende */
.vm-dash-legend {
  display: flex; flex-wrap: wrap; gap: 16px;
  font-size: 11px; color: #9a9aa3; padding: 0 2px;
}
.vm-dash-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vm-dash-legend .dot {
  width: 9px; height: 9px; border-radius: 50%; display: inline-block;
}
.vm-dash-legend .dot.pub   { background: #4ade80; }
.vm-dash-legend .dot.queue { background: var(--vm-cyan); }
.vm-dash-legend .dot.res   { background: rgba(199,179,255,.55); }
.vm-dash-empty {
  background: #161619; border: 1px dashed rgba(255,255,255,.14);
  border-radius: 14px; padding: 18px; text-align: center;
  font-size: 13px; color: #9a9aa3;
}
.vm-mini-err { font-size: 11px; color:#ff9b9b; white-space: pre-wrap; max-height: 120px; overflow:auto; background:#0e0e10; padding:8px; border-radius:8px; }

/* Barre de progression de génération (page « Mes musiques ») */
.vm-gen-progress {
  position: relative; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,.1); overflow: hidden;
}
.vm-gen-progress-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--vm-cyan), var(--vm-pink));
  width: 0%; transition: width .5s linear;
}
.vm-gen-progress-label { font-size: 11px; color: var(--vm-cyan); margin-top: -2px; }
/* État « en attente » : barre indéterminée animée */
.vm-gen-progress.pending .vm-gen-progress-bar {
  background: repeating-linear-gradient(
    45deg, rgba(255,211,77,.5) 0 10px, rgba(255,211,77,.15) 10px 20px);
  animation: vmGenStripes 1s linear infinite;
  transition: none;
}
@keyframes vmGenStripes { from { background-position: 0 0; } to { background-position: 28px 0; } }
.form-switch .form-check-input { cursor: pointer; }
.form-check-input:checked { background-color: var(--vm-pink); border-color: var(--vm-pink); }

/* ---------- Nav avatar ---------- */
.vm-nav-avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.25);
  transition: border-color .2s;
}
.vm-tab:hover .vm-nav-avatar { border-color: var(--vm-cyan); }

/* ---------- Avatar dans cards feed ---------- */
.vm-card-author {
  display: flex; align-items: center; gap: 8px;
}
.vm-card-author a { color: #fff; font-weight: 700; font-size: 17px; }
.vm-card-author a:hover { color: var(--vm-cyan); }
.vm-author-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,.4); flex-shrink: 0;
}
.vm-card-bio {
  font-size: 12px; opacity: .75; margin-top: 2px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* ---------- Contrôles audio feed ---------- */
.vm-player-bar {
  position: absolute; left: 0; right: 0;
  bottom: var(--vm-tabbar-h);
  z-index: 4;
  display: flex; align-items: center;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  padding: 0 16px 0 4px;
  height: 44px;
}
.vm-player-btn {
  background: none; border: none; color: #fff;
  font-size: 22px; padding: 0 10px;
  min-width: 44px; min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color .2s;
  flex-shrink: 0;
}
.vm-player-btn:hover { color: var(--vm-cyan); }

@keyframes btnPulse {
  0%, 100% { color: #fff; text-shadow: none; }
  50%       { color: var(--vm-pink); text-shadow: 0 0 12px var(--vm-pink); }
}
.vm-btn-pulse { animation: btnPulse 1.4s ease-in-out infinite; }

.vm-seek {
  flex: 1; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.25); cursor: pointer; position: relative;
  margin: 0 4px;
  transition: height .15s;
  align-self: center;
}
.vm-seek:hover, .vm-seek.dragging { height: 6px; }
.vm-seek-fill {
  height: 100%; border-radius: 2px;
  background: rgba(255,255,255,.75);
  pointer-events: none; transition: background .2s;
}
.vm-seek:hover .vm-seek-fill,
.vm-seek.dragging .vm-seek-fill { background: var(--vm-pink); }

.vm-seek-thumb {
  position: absolute;
  top: 50%; transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.5);
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s, transform .1s;
}
.vm-seek:hover .vm-seek-thumb,
.vm-seek.dragging .vm-seek-thumb { opacity: 1; }
.vm-seek.dragging .vm-seek-thumb { transform: translate(-50%, -50%) scale(1.3); }

/* ---------- Profil ---------- */
.vm-profile { max-width: 640px; margin: 0 auto; padding: 24px 16px calc(var(--vm-tabbar-h) + 20px); }
.vm-profile-header {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 24px;
}
.vm-profile-avatar-wrap { position: relative; display: inline-block; margin-bottom: 12px; }
.vm-profile-avatar {
  width: 100px; height: 100px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.2);
  transition: border-color .2s;
}
.vm-profile-avatar-wrap:hover .vm-profile-avatar { border-color: var(--vm-cyan); }

/* ── Indicateur « en ligne » : anneau vert discret ── */
.vm-author-avatar.online,
.vm-profile-avatar.online,
.vm-nav-avatar.online,
.vm-filter-avatar.online,
.vm-admin-avatar.online,
.adm-avatar-preview.online {
  border-color: rgba(34,211,107,.8);
  box-shadow: 0 0 3px rgba(34,211,107,.4);
}
.vm-avatar-edit-btn {
  position: absolute; bottom: 0; right: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--vm-pink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px;
  transition: background .2s, transform .2s;
}
.vm-avatar-edit-btn:hover { background: #e02249; transform: scale(1.1); }
.vm-profile-username {
  font-family: 'Righteous', sans-serif;
  font-weight: 400;
  font-size: 22px; margin: 0 0 6px;
}
.vm-profile-bio { color: #aaa; font-size: 14px; max-width: 360px; margin: 0; white-space: pre-wrap; }
.vm-bio-edit textarea { resize: vertical; }
.vm-follow-btn {
  border: 1px solid rgba(255,255,255,.35); color: #fff;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.vm-follow-btn:hover:not(.following) { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.vm-follow-btn.following { background: var(--vm-pink); border-color: var(--vm-pink); }
.vm-follow-btn.following:hover { background: #e02249; border-color: #e02249; }
.vm-settings-card {
  width: 100%; max-width: 340px; background: #161619;
  border: 1px solid rgba(255,255,255,.08); border-radius: 14px;
  padding: 16px; text-align: left;
}
.vm-settings-card h6 { font-weight: 700; font-size: 14px; }

/* ---------- Overlay navigation ---------- */
.vm-overlay {
  position: fixed;
  inset: 0;
  bottom: var(--vm-tabbar-h);
  z-index: 80;
  background: var(--vm-bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: vmSlideUp .22s ease;
}
.vm-overlay-hidden { display: none; }

@keyframes vmSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.vm-overlay-back {
  position: sticky; top: 0; z-index: 10; flex-shrink: 0;
  width: 100%; height: 44px;
  background: rgba(10,10,13,.92);
  backdrop-filter: blur(8px);
  border: none; border-bottom: 1px solid rgba(255,255,255,.08);
  color: #8a8a93; font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s;
}
.vm-overlay-back:hover { color: #fff; }

/* Bouton retour feed (sur les pages directes) */
.vm-page-back {
  position: sticky; top: 0; z-index: 10;
  width: 100%; height: 44px;
  background: rgba(10,10,13,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #8a8a93; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: color .2s;
}
.vm-page-back:hover { color: #fff; }
/* Caché quand la page est chargée dans l'overlay (qui a son propre bouton) */
.vm-overlay-body .vm-page-back { display: none; }

.vm-overlay-body {
  flex: 1;
  overflow-y: auto;
}

.vm-overlay-loading {
  padding: 60px; text-align: center;
  color: #8a8a93; font-size: 28px;
  animation: vmFadeIn .3s ease;
}
@keyframes vmFadeIn { from { opacity:0; } to { opacity:1; } }

/* ---------- Prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .vm-card-bg { animation: none; }
  .vm-disc { animation: none !important; }
  .vm-btn-pulse { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
