/* ================================================================== */
/* Max-Music — thème Deezer revisité aux couleurs Max-Hosting           */
/* ================================================================== */

:root {
  --bg: #05070f;
  --bg-soft: #080d18;
  --panel: #0a1220;
  --panel-2: #0e1728;
  --panel-3: #121d31;
  --neutral: #1b2436;
  --neutral-soft: rgba(255, 255, 255, 0.06);
  --text: #e9eef7;
  --muted: #8a95a9;
  --faint: #5f6a7e;

  --primary: #1a9fff;
  --primary-2: #3fd4ff;
  --primary-deep: #1268d8;
  --cyan: #35d0ff;
  --violet: #8b5cf6;
  --pink: #f062b5;
  --emerald: #25c98d;
  --amber: #f5a623;
  --danger: #f25f6b;

  --deezer: #a238ff;
  --spotify: #1ed760;
  --youtube: #ff3d3d;

  --radius: 16px;
  --radius-sm: 10px;
  --player-h: 92px;
  --sidebar-w: 252px;
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(26, 159, 255, 0.13), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(63, 212, 255, 0.08), transparent 55%),
    radial-gradient(700px 500px at 60% 110%, rgba(139, 92, 246, 0.07), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: rgba(26, 159, 255, 0.35);
  color: #fff;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.skip-link:focus {
  left: 10px;
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #263248 transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: #253148;
  border: 2px solid transparent;
  border-radius: 10px;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: #34435f;
  background-clip: content-box;
}

/* ================================================================== */
/* Structure                                                           */
/* ================================================================== */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  height: calc(100dvh - var(--player-h));
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  position: relative;
}

.view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 26px 34px 54px;
  scroll-behavior: smooth;
  outline: none;
}

.view > * {
  animation: fadeUp 0.35s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ================================================================== */
/* Sidebar                                                             */
/* ================================================================== */

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  padding: 22px 14px 16px;
  overflow-y: auto;
  background:
    radial-gradient(340px 240px at 0% 0%, rgba(26, 159, 255, 0.13), transparent 70%),
    linear-gradient(180deg, rgba(9, 15, 27, 0.98), rgba(5, 8, 15, 0.99));
  border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 212, 255, 0.5), transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  color: var(--primary-2);
  background: linear-gradient(135deg, rgba(26, 159, 255, 0.26), rgba(63, 212, 255, 0.08));
  border: 1px solid rgba(63, 212, 255, 0.38);
  box-shadow: 0 0 26px rgba(26, 159, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-mark.sm {
  width: 46px;
  height: 46px;
  margin: 0 auto;
}

.brand-mark.sm svg {
  width: 25px;
  height: 25px;
}

.brand-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.brand-blue {
  color: var(--primary-2);
}

.brand-silver {
  color: #dfe7f3;
}

.brand-sub {
  margin: -8px 8px 0;
  font-size: 11px;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.brand-sub strong {
  color: var(--muted);
  font-weight: 600;
}

.nav-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-title {
  margin: 0;
  padding: 4px 12px 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-item .ico {
  width: 19px;
  height: 19px;
  flex: none;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(26, 159, 255, 0.2), rgba(26, 159, 255, 0.03));
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 4px;
  background: var(--primary-2);
  box-shadow: 0 0 12px var(--primary-2);
}

.nav-count {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  color: #b9e9ff;
  background: rgba(26, 159, 255, 0.22);
}

.nav-badge {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #ffd79a;
  background: rgba(245, 166, 35, 0.16);
}

.source-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.source-dot.deezer {
  color: var(--deezer);
  background: var(--deezer);
}

.source-dot.spotify {
  color: var(--spotify);
  background: var(--spotify);
}

.source-dot.youtube {
  color: var(--youtube);
  background: var(--youtube);
}

.source-item.unconfigured {
  opacity: 0.62;
}

.playlist-mini {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 2px;
}

.playlist-mini a {
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--faint);
  font-size: 12.5px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-mini a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.playlist-mini .empty-mini {
  padding: 4px 12px;
  font-size: 11.5px;
  color: var(--faint);
  font-style: italic;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mini-user .login-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(63, 212, 255, 0.28);
  background: linear-gradient(135deg, rgba(26, 159, 255, 0.14), rgba(63, 212, 255, 0.04));
  color: #cfeeff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.16s;
}

.mini-user .login-mini:hover {
  border-color: rgba(63, 212, 255, 0.55);
  background: linear-gradient(135deg, rgba(26, 159, 255, 0.22), rgba(63, 212, 255, 0.08));
}

.mini-user .login-mini svg {
  width: 17px;
  height: 17px;
}

.mini-user .who {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.mini-user .who .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.mini-user .who .who-meta {
  min-width: 0;
}

.mini-user .who .who-name {
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-user .who .who-role {
  font-size: 10.5px;
  color: var(--faint);
}

.legal {
  margin: 0;
  padding: 0 6px;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--faint);
}

.legal a {
  color: var(--muted);
  text-decoration: none;
}

.legal a:hover {
  color: var(--primary-2);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(2, 5, 12, 0.68);
  backdrop-filter: blur(4px);
}

/* ================================================================== */
/* Topbar                                                              */
/* ================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 72px;
  padding: 0 28px;
  background: linear-gradient(180deg, rgba(5, 7, 15, 0.96), rgba(5, 7, 15, 0.8));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.menu-btn {
  display: none;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 640px;
  height: 44px;
  padding: 0 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.075);
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.search:focus-within {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(63, 212, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(26, 159, 255, 0.13);
}

.search-ico {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--muted);
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 0 11px;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
}

.search input::placeholder {
  color: #6d788c;
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search-kbd {
  flex: none;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--neutral);
  background: rgba(255, 255, 255, 0.04);
  color: var(--faint);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.16s;
}

.chip:hover {
  color: var(--text);
  border-color: rgba(63, 212, 255, 0.4);
  background: rgba(26, 159, 255, 0.1);
}

.chip .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(37, 201, 141, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 7px rgba(37, 201, 141, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 201, 141, 0);
  }
}

/* Compte / menu */
.user-area {
  position: relative;
}

.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #03101f;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(26, 159, 255, 0.28);
  transition: 0.16s;
}

.login-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  max-width: 210px;
  padding: 3px 11px 3px 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.16s;
}

.user-btn:hover {
  border-color: rgba(63, 212, 255, 0.42);
  background: rgba(26, 159, 255, 0.1);
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-btn .uname {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 70;
  width: 234px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, #0d1729, #080e19);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(26, 159, 255, 0.07);
  animation: pop 0.16s ease;
}

.user-menu .menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 5px;
}

.user-menu .menu-head .avatar {
  width: 36px;
  height: 36px;
}

.user-menu .menu-head strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu .menu-head span {
  display: block;
  font-size: 11px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu a,
.user-menu button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.user-menu a:hover,
.user-menu button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.user-menu svg {
  width: 16px;
  height: 16px;
}

.user-menu .sep {
  height: 1px;
  margin: 5px 4px;
  background: rgba(255, 255, 255, 0.06);
}

.user-menu .danger {
  color: #ff9aa2;
}

.user-menu .danger:hover {
  background: rgba(242, 95, 107, 0.12);
  color: #ffb4ba;
}

.badge-admin {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(63, 212, 255, 0.16);
  color: #9fe6ff;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ================================================================== */
/* Boutons / icônes                                                    */
/* ================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: 0.16s;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #03101f;
  box-shadow: 0 10px 26px rgba(26, 159, 255, 0.26);
}

.btn.primary:hover {
  filter: brightness(1.07);
}

.btn.ghost {
  background: transparent;
  border-color: var(--neutral);
  color: var(--muted);
}

.btn.ghost:hover {
  color: var(--text);
  border-color: rgba(63, 212, 255, 0.4);
  background: rgba(26, 159, 255, 0.08);
}

.btn.danger {
  background: rgba(242, 95, 107, 0.12);
  border-color: rgba(242, 95, 107, 0.35);
  color: #ff9aa2;
}

.btn.danger:hover {
  background: rgba(242, 95, 107, 0.2);
}

.btn.full {
  width: 100%;
}

.btn.small {
  padding: 7px 12px;
  font-size: 12.5px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: 0.16s;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.icon-btn.sm {
  width: 32px;
  height: 32px;
}

.icon-btn.sm svg {
  width: 17px;
  height: 17px;
}

.icon-btn.active {
  color: var(--primary-2);
  background: rgba(26, 159, 255, 0.14);
}

.play-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #03101f;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(26, 159, 255, 0.45);
  transition: transform 0.15s, filter 0.15s;
}

.play-btn:hover {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.play-btn svg {
  width: 21px;
  height: 21px;
}

.like-btn svg {
  width: 19px;
  height: 19px;
}

.like-btn.active {
  color: var(--pink);
}

.like-btn.active svg path {
  fill: currentColor;
}

button.active-soft,
.like-btn.active {
  color: var(--pink);
}

/* ================================================================== */
/* Contenu : en-têtes, sections, hero                                  */
/* ================================================================== */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.page-head h1 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.page-head p {
  margin: 8px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-2);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--primary-2);
}

.section {
  margin-top: 34px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.section-link {
  flex: none;
  color: var(--primary-2);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: 0.16s;
}

.section-link:hover {
  background: rgba(26, 159, 255, 0.12);
}

/* Hero */
.hero {
  position: relative;
  min-height: 312px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  align-items: center;
  gap: 24px;
  padding: 36px 40px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(63, 212, 255, 0.16);
  background:
    radial-gradient(620px 320px at 88% 18%, rgba(26, 159, 255, 0.3), transparent 62%),
    radial-gradient(520px 300px at 12% 100%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(120deg, #0a1930, #070e1a 58%, #0a1627);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(63, 212, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 212, 255, 0.055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 70% 40%, #000 0%, transparent 68%);
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: -10%;
  background-size: cover;
  background-position: center;
  filter: blur(34px) saturate(1.4);
  opacity: 0.24;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 50px);
  font-weight: 880;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero h1 .grad {
  background: linear-gradient(100deg, #eafaff 0%, var(--primary-2) 45%, #7fbcff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0;
  max-width: 530px;
  color: #a5b3c9;
  font-size: 14px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.hero-actions .play-btn {
  width: 48px;
  height: 48px;
}

.hero-actions .play-btn svg {
  width: 22px;
  height: 22px;
}

.hero-now {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.hero-now img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.hero-now .hm {
  min-width: 0;
}

.hero-now .hm strong {
  display: block;
  max-width: 250px;
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-now .hm span {
  display: block;
  max-width: 250px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 2px;
  color: var(--faint);
  font-size: 11.5px;
}

.hero-meta strong {
  color: var(--muted);
  font-weight: 600;
}

.hero-art {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
}

.hero-art-inner {
  position: relative;
  width: min(250px, 100%);
  aspect-ratio: 1;
  border-radius: 18px;
  transform: rotate(3deg);
  box-shadow: 0 34px 70px -20px rgba(0, 0, 0, 0.85), 0 0 80px rgba(26, 159, 255, 0.26);
}

.hero-art-inner img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-art-inner::after {
  content: "";
  position: absolute;
  inset: 10% -10% -16% 10%;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(63, 212, 255, 0.35), rgba(139, 92, 246, 0.2));
  filter: blur(46px);
  z-index: -1;
}

.hero-eq {
  position: absolute;
  right: -10px;
  bottom: -10px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  padding: 7px 9px;
  border-radius: 10px;
  background: rgba(6, 12, 22, 0.82);
  border: 1px solid rgba(63, 212, 255, 0.28);
  backdrop-filter: blur(6px);
}

.hero-eq i {
  width: 3px;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  animation: eq 1s ease-in-out infinite;
}

.hero-eq i:nth-child(2) {
  animation-delay: -0.35s;
}
.hero-eq i:nth-child(3) {
  animation-delay: -0.6s;
}
.hero-eq i:nth-child(4) {
  animation-delay: -0.2s;
}

@keyframes eq {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}

/* ================================================================== */
/* Cartes                                                              */
/* ================================================================== */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 18px;
}

.grid-cards.small {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}

.card {
  position: relative;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
  transition: transform 0.22s ease, border-color 0.22s, background 0.22s, box-shadow 0.22s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(63, 212, 255, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  box-shadow: 0 22px 46px -26px rgba(0, 0, 0, 0.95);
}

.card-art {
  position: relative;
  aspect-ratio: 1;
  margin-bottom: 11px;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1422;
}

.card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card:hover .card-art img {
  transform: scale(1.055);
}

.card.artist .card-art {
  border-radius: 50%;
  margin-inline: auto;
  width: 86%;
}

.card-title {
  display: block;
  padding: 0 2px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-title:hover {
  color: var(--primary-2);
}

.card-sub {
  padding: 2px 2px 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #03101f;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  transition: 0.2s ease;
  box-shadow: 0 10px 24px rgba(26, 159, 255, 0.5);
}

.card:hover .card-play,
.card:focus-within .card-play {
  opacity: 1;
  transform: none;
}

.card-play svg {
  width: 18px;
  height: 18px;
}

.card-play:hover {
  filter: brightness(1.08);
  transform: scale(1.06);
}

.card .src-dot {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(5, 7, 15, 0.7);
  box-shadow: 0 0 8px currentColor;
}

.src-dot.deezer {
  color: var(--deezer);
  background: var(--deezer);
}
.src-dot.spotify {
  color: var(--spotify);
  background: var(--spotify);
}
.src-dot.youtube {
  color: var(--youtube);
  background: var(--youtube);
}

/* Genres */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 14px;
}

.genre-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 118px;
  padding: 15px;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: linear-gradient(130deg, var(--g1, #0d2a52), var(--g2, #061322));
  transition: transform 0.2s, border-color 0.2s;
}

.genre-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--g-img, none);
  background-size: cover;
  background-position: center;
  opacity: 0.42;
  mix-blend-mode: luminosity;
  transition: transform 0.4s ease, opacity 0.3s;
}

.genre-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.58));
}

.genre-card span {
  position: relative;
  z-index: 1;
}

.genre-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
}

.genre-card:hover::before {
  transform: scale(1.06);
  opacity: 0.55;
}

.genre-card .genre-arrow {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

.genre-card .genre-arrow svg {
  width: 13px;
  height: 13px;
}

/* ================================================================== */
/* Listes de titres                                                    */
/* ================================================================== */

.track-list {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.018);
}

.track-row {
  display: grid;
  grid-template-columns: 34px 48px minmax(0, 1.5fr) minmax(0, 1fr) 64px 78px;
  align-items: center;
  gap: 12px;
  padding: 7px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.042);
  transition: background 0.14s;
}

.track-row:last-child {
  border-bottom: 0;
}

.track-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.track-row.playing {
  background: linear-gradient(90deg, rgba(26, 159, 255, 0.15), rgba(26, 159, 255, 0.02) 55%, transparent);
}

.track-row.playing .track-title {
  color: var(--primary-2);
}

.track-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: 0.14s;
}

.track-index:hover {
  color: var(--primary-2);
  background: rgba(26, 159, 255, 0.12);
}

.track-index .idx {
  line-height: 1;
}

.track-index .row-play-ico {
  display: none;
  width: 15px;
  height: 15px;
}

.track-row:hover .track-index .idx {
  display: none;
}

.track-row:hover .track-index .row-play-ico {
  display: block;
}

.track-index .eq-bars {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.track-index .eq-bars i {
  width: 2.5px;
  height: 100%;
  border-radius: 2px;
  background: var(--primary-2);
  animation: eq 0.9s ease-in-out infinite;
}

.track-index .eq-bars i:nth-child(2) {
  animation-delay: -0.3s;
}
.track-index .eq-bars i:nth-child(3) {
  animation-delay: -0.55s;
}

.track-row.playing .track-index .idx,
.track-row.playing .track-index .row-play-ico {
  display: none;
}

.track-row.playing .track-index .eq-bars {
  display: flex;
}

.track-cover {
  width: 44px;
  height: 44px;
  border-radius: 7px;
  object-fit: cover;
  background: #0b1422;
  cursor: pointer;
}

.track-main {
  min-width: 0;
  cursor: pointer;
}

.track-title {
  display: block;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-album {
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-duration {
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.track-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1px;
  opacity: 0.45;
  transition: opacity 0.15s;
}

.track-row:hover .track-actions {
  opacity: 1;
}

.track-actions .icon-btn {
  width: 30px;
  height: 30px;
}

.track-actions .icon-btn svg {
  width: 16px;
  height: 16px;
}

.track-actions .like-btn.active {
  opacity: 1;
}

/* ================================================================== */
/* En-têtes de détail (artiste / album / genre)                        */
/* ================================================================== */

.detail-head {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  padding: 6px 0 28px;
  flex-wrap: wrap;
}

.detail-art {
  width: 196px;
  height: 196px;
  flex: none;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 26px 60px -20px rgba(0, 0, 0, 0.85), 0 0 60px rgba(26, 159, 255, 0.15);
  background: #0b1422;
}

.detail-art.round {
  border-radius: 50%;
}

.detail-info {
  min-width: 0;
  flex: 1;
  padding-bottom: 4px;
}

.detail-kind {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(26, 159, 255, 0.14);
  color: #a9e4ff;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-title {
  margin: 12px 0 8px;
  font-size: clamp(28px, 5vw, 54px);
  font-weight: 880;
  letter-spacing: -0.045em;
  line-height: 1.02;
  word-break: break-word;
}

.detail-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.detail-sub .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.detail-actions .play-btn {
  width: 46px;
  height: 46px;
}

/* ================================================================== */
/* Recherche / onglets                                                 */
/* ================================================================== */

.tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 20px 0 22px;
}

.tabs .tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: 0.16s;
}

.tabs .tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

.tabs .tab.active {
  color: #cdefff;
  border-color: rgba(63, 212, 255, 0.4);
  background: rgba(26, 159, 255, 0.17);
}

.tabs .tab .tab-count {
  margin-left: 5px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 700;
}

.tabs .tab.active .tab-count {
  color: #8fd8ff;
}

.tabs .tabs-sep {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.08);
}

.source-section {
  margin-top: 26px;
}

.source-section:first-of-type {
  margin-top: 0;
}

.source-section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.source-section-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid currentColor;
}

.source-badge.deezer {
  color: #c99aff;
  background: rgba(162, 56, 255, 0.1);
}
.source-badge.spotify {
  color: #8df0b3;
  background: rgba(30, 215, 96, 0.1);
}
.source-badge.youtube {
  color: #ff9d9d;
  background: rgba(255, 61, 61, 0.1);
}

.source-section-head .count {
  margin-left: auto;
  color: var(--faint);
  font-size: 11.5px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(245, 166, 35, 0.25);
  background: rgba(245, 166, 35, 0.06);
  color: #e9d2a8;
  font-size: 12.5px;
  line-height: 1.55;
}

.notice svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  color: var(--amber);
}

.notice a {
  color: #ffd79a;
  font-weight: 650;
}

.notice strong {
  color: #fff;
}

/* ================================================================== */
/* États vides / chargement                                            */
/* ================================================================== */

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 58px 24px;
  text-align: center;
  border: 1px dashed var(--neutral);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.014);
}

.state svg {
  width: 40px;
  height: 40px;
  color: var(--faint);
}

.state h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
}

.state p {
  margin: 0;
  max-width: 460px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.state .btn {
  margin-top: 4px;
}

.skeleton-block {
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  background-size: 220% 100%;
  animation: shimmer 1.35s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -220% 0;
  }
}

.skeleton-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 18px;
}

.skeleton-card {
  height: 236px;
  border-radius: var(--radius);
}

.skeleton-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-row {
  height: 58px;
  border-radius: 10px;
}

.loader-line {
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-2), transparent);
  background-size: 200% 100%;
  animation: loadline 1.1s linear infinite;
}

@keyframes loadline {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* Source config cards */
.sources-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.source-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.03);
}

.source-card .source-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
}

.source-card .source-logo.deezer {
  color: #dbb6ff;
  background: rgba(162, 56, 255, 0.14);
}
.source-card .source-logo.spotify {
  color: #8df0b3;
  background: rgba(30, 215, 96, 0.14);
}
.source-card .source-logo.youtube {
  color: #ffadad;
  background: rgba(255, 61, 61, 0.14);
}

.source-card .source-info {
  min-width: 0;
}

.source-card .source-info strong {
  display: block;
  font-size: 13.5px;
}

.source-card .source-info span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.source-card .source-status {
  margin-left: auto;
  flex: none;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.source-status.on {
  color: #8df0b3;
  background: rgba(37, 201, 141, 0.13);
  border: 1px solid rgba(37, 201, 141, 0.3);
}

.source-status.off {
  color: #ffd79a;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.28);
}

.source-card code {
  padding: 1.5px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: #b8e8ff;
  font-size: 10.5px;
}

/* ================================================================== */
/* Lecteur                                                             */
/* ================================================================== */

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(340px, 1.35fr) minmax(180px, 1fr);
  align-items: center;
  gap: 18px;
  height: var(--player-h);
  padding: 0 20px;
  background: linear-gradient(180deg, rgba(9, 15, 27, 0.97), rgba(4, 7, 14, 0.995));
  border-top: 1px solid rgba(63, 212, 255, 0.14);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(22px);
}

.player::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 212, 255, 0.65), transparent);
}

.np {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.np-cover-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  flex: none;
  border-radius: 9px;
  overflow: hidden;
  background: #0b1422;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.np-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.np-eq {
  position: absolute;
  inset: auto 4px 3px 4px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  opacity: 0;
  transition: opacity 0.2s;
}

.np-eq i {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--primary-2), rgba(26, 159, 255, 0.4));
  transform-origin: bottom;
  animation: eq 1s ease-in-out infinite;
}

.np-eq i:nth-child(2) {
  animation-delay: -0.3s;
}
.np-eq i:nth-child(3) {
  animation-delay: -0.6s;
}
.np-eq i:nth-child(4) {
  animation-delay: -0.15s;
}

.player.is-playing .np-eq {
  opacity: 1;
}

.player.is-playing .np-cover {
  opacity: 0.72;
}

.np-meta {
  min-width: 0;
}

.np-title {
  display: block;
  max-width: 100%;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-title:hover {
  color: var(--primary-2);
}

.np-artist {
  margin-top: 2px;
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player .like-btn {
  flex: none;
}

.pc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
  max-width: 660px;
  justify-self: center;
}

.pc-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pc-timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.time {
  flex: none;
  min-width: 36px;
  color: var(--faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.seek {
  flex: 1;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 16px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-2) 0 var(--fill, 0%),
    rgba(255, 255, 255, 0.13) var(--fill, 0%) 100%
  );
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.13);
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 4px;
  background: var(--primary-2);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 9px rgba(63, 212, 255, 0.85);
  opacity: 0;
  transition: opacity 0.15s;
}

input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb {
  opacity: 1;
}

input[type="range"]::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 9px rgba(63, 212, 255, 0.85);
}

.pr {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.player-source {
  display: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
}

.player-source.visible {
  display: inline-flex;
}

.player-source.deezer {
  color: #d4b0ff;
  background: rgba(162, 56, 255, 0.13);
  border-color: rgba(162, 56, 255, 0.32);
}
.player-source.spotify {
  color: #8df0b3;
  background: rgba(30, 215, 96, 0.13);
  border-color: rgba(30, 215, 96, 0.32);
}
.player-source.youtube {
  color: #ffa4a4;
  background: rgba(255, 61, 61, 0.13);
  border-color: rgba(255, 61, 61, 0.32);
}

.volume {
  width: 86px;
}

.yt-shell {
  position: fixed;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* File d'attente */
.queue-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: var(--player-h);
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: 92vw;
  padding: 20px;
  background: linear-gradient(180deg, #0b1524, #060b14);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -30px 0 60px rgba(0, 0, 0, 0.5);
  animation: slideInRight 0.22s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.queue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.queue-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.queue-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.queue-list {
  flex: 1;
  overflow-y: auto;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: 0.14s;
}

.queue-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.queue-item.current {
  background: rgba(26, 159, 255, 0.13);
}

.queue-item img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex: none;
}

.queue-item .qm {
  min-width: 0;
}

.queue-item .qm strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item .qm span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-item .qtime {
  margin-left: auto;
  color: var(--faint);
  font-size: 10.5px;
  flex: none;
}

/* ================================================================== */
/* Modales                                                             */
/* ================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 12, 0.74);
  backdrop-filter: blur(7px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: 92dvh;
  overflow-y: auto;
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(26, 159, 255, 0.12), transparent 65%),
    linear-gradient(180deg, #0d1729, #080e19);
  box-shadow: 0 44px 90px rgba(0, 0, 0, 0.65), 0 0 70px rgba(26, 159, 255, 0.08);
  animation: pop 0.2s ease;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-card.compact-card {
  width: min(420px, 100%);
}

.modal-card h2 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.modal-card .muted {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  transition: 0.15s;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.modal-close svg {
  width: 17px;
  height: 17px;
}

.auth-head {
  margin-bottom: 18px;
  text-align: center;
}

.auth-head h2 {
  margin: 12px 0 5px;
  font-size: 23px;
}

.auth-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.auth-social {
  margin-bottom: 18px;
}

.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  background: #5865f2;
  color: #fff;
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
  transition: 0.16s;
}

.discord-btn:hover {
  filter: brightness(1.08);
}

.discord-btn svg {
  width: 20px;
  height: 20px;
}

.auth-sep {
  position: relative;
  margin: 18px 0 0;
  text-align: center;
  color: var(--faint);
  font-size: 11px;
}

.auth-sep::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.auth-sep span {
  position: relative;
  padding: 0 10px;
  background: #0a1120;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: 0.16s;
}

.field input:focus {
  border-color: rgba(63, 212, 255, 0.5);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(26, 159, 255, 0.13);
}

.field input::placeholder {
  color: #5f6a7e;
}

.field-error {
  min-height: 0;
  color: #f7a0a8;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.field-error:empty {
  display: none;
}

.form-error {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(242, 95, 107, 0.3);
  background: rgba(242, 95, 107, 0.1);
  color: #ffaeb5;
  font-size: 12px;
}

.auth-switch {
  margin: 14px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
}

.auth-switch button {
  border: 0;
  background: none;
  color: var(--primary-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}

.auth-switch button:hover {
  text-decoration: underline;
}

/* Ajout à une playlist */
.add-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 300px;
  overflow-y: auto;
  margin: 0 0 14px;
}

.add-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: 0.15s;
}

.add-item:hover {
  border-color: rgba(63, 212, 255, 0.3);
  background: rgba(26, 159, 255, 0.1);
}

.add-item .add-count {
  margin-left: auto;
  color: var(--faint);
  font-size: 11px;
}

.add-item .plus {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(26, 159, 255, 0.16);
  color: var(--primary-2);
  font-size: 15px;
  line-height: 1;
}

/* ================================================================== */
/* Toasts                                                             */
/* ================================================================== */

.toasts {
  position: fixed;
  right: 18px;
  bottom: calc(var(--player-h) + 16px);
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 3px solid var(--primary);
  background: linear-gradient(180deg, #0e192b, #0a111d);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.22s ease;
  pointer-events: auto;
}

.toast.success {
  border-left-color: var(--emerald);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warn {
  border-left-color: var(--amber);
}

.toast svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
  color: var(--primary-2);
}

.toast.success svg {
  color: var(--emerald);
}
.toast.error svg {
  color: var(--danger);
}
.toast.warn svg {
  color: var(--amber);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ================================================================== */
/* Responsive                                                          */
/* ================================================================== */

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 250px;
    padding: 32px;
  }

  .hero-art-inner {
    width: 210px;
  }
}

@media (max-width: 1024px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: var(--player-h);
    z-index: 60;
    width: 282px;
    transform: translateX(-104%);
    transition: transform 0.25s ease;
    box-shadow: 30px 0 70px rgba(0, 0, 0, 0.55);
  }

  .sidebar.open {
    transform: none;
  }

  .menu-btn {
    display: inline-grid;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) 230px;
  }

  .hero-art-inner {
    width: 195px;
  }
}

@media (max-width: 820px) {
  .topbar {
    height: 66px;
    padding: 0 18px;
    gap: 10px;
  }

  .view {
    padding: 22px 20px 44px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 28px;
  }

  .hero-art {
    display: none;
  }

  .hero h1 {
    font-size: clamp(28px, 6vw, 40px);
  }

  .player {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    height: var(--player-h);
    padding: 9px 16px 8px;
  }

  .np {
    grid-column: 1;
    grid-row: 1;
  }

  .np-cover-wrap {
    width: 44px;
    height: 44px;
  }

  .player > .like-btn {
    display: none;
  }

  .pc {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }

  .pc-timeline {
    display: none;
  }

  .pr {
    display: none;
  }

  .player.is-mobile-timeline .pc-timeline {
    display: flex;
  }

  .queue-panel {
    width: 100%;
    max-width: 100%;
  }

  .detail-head {
    gap: 18px;
  }

  .detail-art {
    width: 150px;
    height: 150px;
  }

  .detail-title {
    font-size: clamp(26px, 7vw, 40px);
  }
}

@media (max-width: 640px) {
  :root {
    --player-h: 118px;
  }

  .view {
    padding: 18px 15px 40px;
  }

  .topbar {
    padding: 0 14px;
  }

  .search {
    height: 40px;
  }

  .search-kbd {
    display: none;
  }

  .top-actions .chip {
    display: none;
  }

  .grid-cards {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .card {
    padding: 9px;
  }

  .card-title {
    font-size: 12.5px;
  }

  .card-sub {
    font-size: 11px;
  }

  .card-play {
    width: 36px;
    height: 36px;
    opacity: 1;
    transform: none;
  }

  .card-play svg {
    width: 15px;
    height: 15px;
  }

  .section {
    margin-top: 26px;
  }

  .section-head h2 {
    font-size: 18px;
  }

  .genre-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }

  .genre-card {
    min-height: 96px;
    padding: 12px;
    font-size: 13.5px;
  }

  .track-row {
    grid-template-columns: 30px 42px minmax(0, 1fr) 64px;
    gap: 9px;
    padding: 7px 9px;
  }

  .track-cover {
    width: 40px;
    height: 40px;
  }

  .track-album,
  .track-duration {
    display: none;
  }

  .track-actions {
    opacity: 1;
  }

  .detail-head {
    align-items: flex-start;
    padding-bottom: 20px;
  }

  .detail-art {
    width: 118px;
    height: 118px;
    border-radius: 12px;
  }

  .detail-info {
    flex: 1 1 100%;
  }

  .detail-title {
    margin-top: 8px;
    font-size: clamp(24px, 8vw, 34px);
  }

  .detail-actions .btn {
    padding: 8px 12px;
    font-size: 12.5px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .modal-card {
    padding: 24px 20px;
  }

  .toasts {
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .np-title {
    font-size: 12.5px;
  }

  .pc-controls .icon-btn.sm {
    width: 30px;
    height: 30px;
  }

  .play-btn {
    width: 40px;
    height: 40px;
  }

  .hero-meta {
    gap: 8px 12px;
  }

  .hero-now {
    max-width: 100%;
  }

  .hero-actions {
    gap: 8px;
  }

  .hero-actions .btn {
    padding: 9px 13px;
    font-size: 12.5px;
  }
}

@media (max-width: 420px) {
  .user-btn .uname {
    display: none;
  }

  .user-btn {
    padding: 3px;
    border: 0;
    background: none;
  }

  .detail-actions .play-btn {
    display: none;
  }

  .skeleton-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
