/* Onglet Musique simplifié : en-tête compact, une seule carte en haut, onglets collants,
   playlists discrètes quand il n'y en a pas, découverte sur une rangée, titre en cours mis en avant. */

/* En-tête : « Musique » et le sélecteur Musiques / Klips sur la même ligne. */
#hubMusicView .hub-music-heading { display: flex; align-items: center; gap: 10px; }
#hubMusicView .hub-music-heading > div:first-child { flex: 0 1 auto; min-width: 0; }
#hubMusicView #hubMusicViewKicker { display: none; }
#hubMusicView #hubMusicViewTitle { margin: 0; }
#hubMusicView .hub-music-heading .hub-music-space-switcher { display: inline-flex; flex: 0 0 auto; gap: 2px; width: auto; margin: 0 0 0 auto; padding: 3px; border: 1px solid var(--app-line, #2f333b); border-radius: 999px; background: rgba(255, 255, 255, .04); }
#hubMusicView .hub-music-heading .hub-music-space-switcher button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--app-muted, #aaa); font-size: .7rem; font-weight: 800; }
#hubMusicView .hub-music-heading .hub-music-space-switcher button.is-active { background: var(--app-orange, #ff6a3d); color: #160700; box-shadow: none; }
#hubMusicView .hub-music-heading .hub-music-space-switcher .app-new-badge { display: none; }
#hubMusicView .hub-music-heading #hubRandomTrack { flex: 0 0 auto; }

/* Une seule carte en haut : « Reprendre » si une écoute attend, sinon la Kafmusique du jour. */
#hubMusicView.has-resume #hubDailyKafmusic { display: none !important; }
#hubMusicView .hub-music-resume { margin: 0 12px 10px; }
#hubMusicView .hub-music-resume[hidden] { display: none; }
#hubMusicView .hub-music-resume .hub-resume-card { grid-template-columns: 54px minmax(0, 1fr) 40px; padding: 8px; border-radius: 14px; background: linear-gradient(110deg, rgba(255, 106, 61, .16), rgba(255, 255, 255, .03) 70%); }
#hubMusicView .hub-music-resume .hub-resume-card > b { width: 38px; height: 38px; }

/* Recherche et onglets Titres / Albums / Radio restent sous la main en faisant défiler. */
#hubMusicView .hub-music-toolbar { position: sticky; top: var(--app-header-height, 62px); z-index: 6; padding-top: 6px; padding-bottom: 6px; background: var(--app-bg, #0f1013); box-shadow: 0 10px 14px -12px rgba(0, 0, 0, .8); }

/* Playlists : une simple ligne avec « Nouvelle playlist » quand il n'y en a aucune. */
#hubMusicView .hub-community-playlists.is-empty { padding-top: 8px; padding-bottom: 8px; }
#hubMusicView .hub-community-playlists.is-empty .hub-community-heading { align-items: center; margin: 0; }
#hubMusicView .hub-community-playlists.is-empty .hub-community-heading .app-kicker { display: none; }
#hubMusicView .hub-community-playlists.is-empty .hub-community-heading h2 { margin: 0; font-size: .9rem; }
#hubMusicView .hub-community-playlists.is-empty .hub-community-playlist-grid { display: none; }

/* Découverte : une seule rangée de pochettes à balayer. */
#hubMusicView .hub-discovery-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 46%); grid-template-columns: none; gap: 8px; overflow-x: auto; padding-bottom: 2px; scroll-snap-type: x proximity; scrollbar-width: none; }
#hubMusicView .hub-discovery-list::-webkit-scrollbar { display: none; }
#hubMusicView .hub-discovery-list article { scroll-snap-align: start; }
#hubMusicView .hub-discovery-list > p { grid-column: auto; }

/* Le titre en cours d'écoute ressort dans le catalogue, à la couleur de sa pochette. */
#hubMusicView .hub-track-card.is-current { border-color: var(--hub-track-accent, var(--app-orange, #ff6a3d)); background: linear-gradient(110deg, color-mix(in srgb, var(--hub-track-accent, #ff6a3d) 20%, transparent), transparent 75%); box-shadow: 0 0 0 1px var(--hub-track-accent, #ff6a3d), 0 8px 26px -10px var(--hub-track-accent, #ff6a3d); }
#hubMusicView .hub-track-card.is-current .hub-track-copy strong { color: var(--hub-track-accent, #ff6a3d); }
#hubMusicView .hub-track-card.is-current .hub-track-copy small::after { content: " · EN ÉCOUTE"; color: var(--hub-track-accent, #ff6a3d); font-weight: 900; }
