/* /soiree-musix/style.css */

:root {
  --bg: #07070f;
  --surface: #0f0f1c;
  --surface2: #14142a;
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.18);
  --text: #f0f0f8;
  --muted: #6a6a8a;
  --twitch: #9147ff;

  --m-purple: #a855f7;
  --m-cyan: #22d3ee;
  --m-magenta: #ec4899;
  --m-gold: #ffd166;
  --m-green: #3cffb4;
  --m-red: #ff3c6e;
  --m-glow: rgba(168, 85, 247, .35);

  /* Couleurs par plateforme */
  --pl-spotify: #1ed760;
  --pl-youtube: #ff4444;
  --pl-ytmusic: #ff0000;
  --pl-applemusic: #fa57c1;
  --pl-deezer: #ef5466;
  --pl-soundcloud: #ff7700;
  --pl-amazon: #25d1da;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', ui-monospace, monospace;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(168,85,247,.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 85% 80%, rgba(34,211,238,.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 50% 50%, rgba(236,72,153,.05) 0%, transparent 70%);
}
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; }

.page {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* ── Header ──────────────────────────────────────── */
.sm-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.sm-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem; letter-spacing: 4px;
  background: linear-gradient(90deg, var(--m-purple), var(--m-magenta), var(--m-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  flex: 1;
}
.sm-logo small { color: var(--muted); font-size: .65rem; letter-spacing: 3px; display: block; -webkit-text-fill-color: var(--muted); }
.sm-back, .sm-link {
  font-size: .72rem; letter-spacing: 1px;
  color: var(--muted); padding: .45rem .85rem;
  border: 1px solid var(--border); border-radius: 8px;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: .35rem;
}
.sm-back:hover, .sm-link:hover { border-color: var(--m-purple); color: var(--text); }
.sm-link.primary { background: var(--m-purple); border-color: var(--m-purple); color: #fff; }
.sm-link.primary:hover { background: #9333ea; border-color: #9333ea; }

/* ── Hero ────────────────────────────────────────── */
.sm-hero {
  text-align: center; padding: .5rem 0 2rem;
  animation: fadeUp .6s ease both;
}
.sm-hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: -1px; line-height: 1;
}
.sm-hero h1 .accent {
  background: linear-gradient(90deg, var(--m-purple), var(--m-magenta), var(--m-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sm-hero p { color: var(--muted); margin-top: .5rem; font-size: .8rem; letter-spacing: 2px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ── Cards / surfaces ────────────────────────────── */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
  border: 1px solid var(--border); border-radius: 14px;
  padding: 1.25rem;
}
.card-title {
  font-family: 'Bebas Neue', sans-serif; font-size: .9rem; letter-spacing: 3px;
  color: var(--muted); margin-bottom: 1rem;
  display: flex; align-items: center; gap: .75rem;
}
.card-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1rem; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text); font-size: .8rem; letter-spacing: 1px;
  transition: all .15s; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--m-purple); transform: translateY(-1px); }
.btn-primary { background: var(--m-purple); border-color: var(--m-purple); color: #fff; }
.btn-primary:hover { background: #9333ea; border-color: #9333ea; box-shadow: 0 4px 16px var(--m-glow); }
.btn-danger  { background: var(--m-red); border-color: var(--m-red); color: #fff; }
.btn-sm { padding: .35rem .65rem; font-size: .68rem; }

/* ── Tabs (grosses cards playlist) ────────────────── */
.playlist-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.playlist-tab {
  position: relative;
  background: rgba(168, 85, 247, .04);
  border: 1px solid rgba(168, 85, 247, .2);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  text-align: left;
  cursor: pointer;
  opacity: .55;
  transition: all .2s ease;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "title  count"
    "desc   count";
  column-gap: 1rem;
  row-gap: .35rem;
  align-items: center;
  font-family: inherit;
  color: var(--text);
}
.playlist-tab:hover {
  opacity: .85;
  border-color: rgba(168, 85, 247, .45);
  transform: translateY(-1px);
}
.playlist-tab.active {
  opacity: 1;
  background: linear-gradient(135deg, rgba(168, 85, 247, .18), rgba(168, 85, 247, .04));
  border-color: rgba(168, 85, 247, .65);
  box-shadow: 0 0 28px rgba(168, 85, 247, .18), inset 0 0 0 1px rgba(168, 85, 247, .15);
  cursor: default;
}
.playlist-tab.active::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--m-purple), transparent);
}
.playlist-tab__title {
  grid-area: title;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -.5px;
  line-height: 1;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .55rem;
}
.playlist-tab__title .ico {
  font-size: 1.1rem;
  line-height: 1;
}
.playlist-tab__desc {
  grid-area: desc;
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.4;
  letter-spacing: .3px;
}
.playlist-tab__count {
  grid-area: count;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
}
.playlist-tab__count .num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.4rem;
  color: var(--m-purple);
  line-height: 1;
  letter-spacing: 2px;
}
.playlist-tab.active .playlist-tab__count .num {
  text-shadow: 0 0 12px rgba(168, 85, 247, .5);
}
.playlist-tab__count .unit {
  font-family: 'DM Mono', monospace;
  font-size: .58rem;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: .2rem;
}

@media (max-width: 640px) {
  .playlist-tabs { grid-template-columns: 1fr; gap: .65rem; }
  .playlist-tab { padding: .9rem 1rem; }
  .playlist-tab__title { font-size: 1.25rem; }
  .playlist-tab__count .num { font-size: 1.9rem; }
}

/* ── Filter bar (chips plateforme + note) ─────────── */
.filter-row { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; flex-wrap: wrap; }
.filter-row .lbl { font-size: .68rem; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.chip {
  font-size: .72rem; letter-spacing: .5px; padding: .35rem .7rem;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  transition: all .15s; cursor: pointer;
  display: inline-flex; align-items: center; gap: .3rem;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { color: var(--text); border-color: var(--m-purple); background: rgba(168,85,247,.15); font-weight: 500; }
.chip-spotify.active    { color: var(--pl-spotify);    border-color: var(--pl-spotify);    background: rgba(30,215,96,.1); }
.chip-youtube.active    { color: var(--pl-youtube);    border-color: var(--pl-youtube);    background: rgba(255,68,68,.1); }
.chip-ytmusic.active    { color: var(--pl-ytmusic);    border-color: var(--pl-ytmusic);    background: rgba(255,0,0,.1); }
.chip-applemusic.active { color: var(--pl-applemusic); border-color: var(--pl-applemusic); background: rgba(250,87,193,.1); }
.chip-deezer.active     { color: var(--pl-deezer);     border-color: var(--pl-deezer);     background: rgba(239,84,102,.1); }
.chip-soundcloud.active { color: var(--pl-soundcloud); border-color: var(--pl-soundcloud); background: rgba(255,119,0,.1); }
.chip-amazon.active     { color: var(--pl-amazon);     border-color: var(--pl-amazon);     background: rgba(37,209,218,.1); }

/* ── Song row ─────────────────────────────────────── */
.song-list { display: flex; flex-direction: column; gap: .55rem; margin-top: 1rem; }
.song-row {
  display: grid; grid-template-columns: 60px 1fr auto auto; gap: 1rem;
  align-items: center; padding: .85rem 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color .15s, transform .15s;
}
.song-row:hover { border-color: var(--m-purple); }
.song-cover {
  width: 60px; height: 60px; border-radius: 8px;
  background: linear-gradient(135deg, var(--m-purple), var(--m-magenta));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; flex-shrink: 0;
  background-size: cover; background-position: center;
}
.song-meta { min-width: 0; }
.song-title { font-size: .95rem; font-weight: 500; line-height: 1.3; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-artist { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
.song-by { font-size: .68rem; color: var(--muted); margin-top: .35rem; letter-spacing: .5px; }
.song-by b { color: var(--m-purple); font-weight: 600; }
.song-actions { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.song-rating { display: flex; align-items: center; gap: .35rem; font-size: .8rem; }
.song-rating .v { font-weight: 600; color: var(--m-gold); }
.song-rating .n { font-size: .65rem; color: var(--muted); }
.song-rating.empty { color: var(--muted); font-size: .68rem; font-style: italic; }
.song-ext-link { font-size: .7rem; color: var(--m-cyan); display: inline-flex; align-items: center; gap: .25rem; }
.song-ext-link:hover { color: var(--text); }

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .6rem; letter-spacing: 1px; text-transform: uppercase;
  padding: .15rem .5rem; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted);
}

/* ── Top contributors box ─────────────────────────── */
.top-contrib {
  background: linear-gradient(135deg, rgba(168,85,247,.06), rgba(34,211,238,.03));
  border: 1px solid var(--border); border-radius: 12px;
  padding: 1rem 1.25rem; margin-top: 1.5rem;
}
.top-contrib h3 {
  font-family: 'Bebas Neue', sans-serif; font-size: .9rem; letter-spacing: 3px;
  color: var(--m-cyan); margin-bottom: .75rem;
}
.tc-row { display: flex; justify-content: space-between; padding: .25rem 0; font-size: .85rem; }
.tc-row .pts { color: var(--m-purple); font-weight: 600; }

/* ── Empty state ──────────────────────────────────── */
.empty {
  text-align: center; padding: 3rem 1rem; color: var(--muted);
  font-style: italic; font-size: .85rem;
  background: var(--surface); border: 1px dashed var(--border); border-radius: 12px;
}

/* ── Toast ────────────────────────────────────────── */
.toast {
  position: fixed; right: 1.25rem; bottom: 1.25rem;
  background: var(--surface2); border: 1px solid var(--m-purple); border-radius: 10px;
  padding: .75rem 1rem; font-size: .85rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  animation: toastIn .25s ease both;
  z-index: 1000; max-width: 320px;
}
.toast.error { border-color: var(--m-red); }
.toast.success { border-color: var(--m-green); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Form ─────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .68rem; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.field input, .field select, .field textarea {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  padding: .55rem .75rem; color: var(--text); font-size: .85rem;
  outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--m-purple); }

.hidden { display: none !important; }
