/* ==========================================================================
   ANKY CREATIVE HUB - STYLESHEET PRINCIPALE
   Design System : Studio Dashboard Sombre, Noir & Graphite, Épuré & Rapide
   ========================================================================== */

@import url('variables.css');

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

html {
  font-size: 16px;
  background-color: var(--bg-app);
  color-scheme: dark;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar sobre */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: #202534;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #333a50;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input {
  font-family: inherit;
}

/* ==========================================================================
   GLOBAL LAYOUT : SIDEBAR + MAIN AREA
   ========================================================================== */

.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* SIDEBAR (GAUCHE FIXE) */
.app-sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  position: fixed;
  top: 0;
  bottom: var(--player-height);
  left: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 16px 24px;
  z-index: 50;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.sidebar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.sidebar-brand-logo {
  height: 28px;
  width: auto;
  max-width: 150px;
  display: block;
  object-fit: contain;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.sidebar-brand:hover .sidebar-brand-logo {
  transform: scale(1.05);
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-subtle);
  width: 100%;
  margin: 18px 0 14px 0;
}

.sidebar-nav-divider {
  height: 1px;
  background-color: var(--border-subtle);
  width: 100%;
  margin: 10px 0 6px 0;
  opacity: 0.6;
}

.sidebar-nav-group-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 16px 2px;
}

/* Menu de navigation vertical */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.nav-item svg {
  width: 19px;
  height: 19px;
  opacity: 0.75;
  flex-shrink: 0;
  transition: opacity var(--transition);
}

.nav-item:hover {
  background-color: var(--bg-card);
  color: var(--text-white);
}

.nav-item:hover svg {
  opacity: 1;
}

.nav-item.active {
  background-color: #1a1e2b;
  color: var(--text-white);
  font-weight: 700;
  border: 1px solid var(--border-medium);
}

.nav-item.active svg {
  opacity: 1;
  stroke: var(--text-white);
}

/* Badge En direct dynamique pour Twitch */
.nav-live-badge {
  font-size: 0.65rem;
  font-weight: 800;
  background: #ef4444;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: nav-live-pulse 2s infinite ease-in-out;
}

@keyframes nav-live-pulse {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
  100% { transform: scale(0.95); opacity: 0.85; }
}

/* Liens Réseaux Sociaux */
.sidebar-socials {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 8px 4px;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-social-link {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: var(--radius-xs);
  transition: color var(--transition);
}

.sidebar-social-link:hover {
  color: var(--text-white);
}

/* MAIN CONTENT AREA */
.app-main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* TOPBAR HEADER */
.app-topbar {
  height: var(--topbar-height);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 36px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #11141c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 8px 18px;
  width: 100%;
  max-width: 460px;
  transition: border-color var(--transition);
}

.topbar-search-wrap:focus-within {
  border-color: var(--border-medium);
}

.topbar-search-wrap svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.topbar-search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 100%;
}

.topbar-search-input::placeholder {
  color: var(--text-muted);
}

.topbar-shortcut-badge {
  font-size: 0.7rem;
  background: #1a1e2a;
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* APP CONTENT CONTAINER */
.app-content {
  padding: 32px 36px 40px;
  max-width: var(--max-content-width);
  width: 100%;
  margin: 0 auto;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* ==========================================================================
   PAGE: ACCUEIL (HOME)
   ========================================================================== */

/* Section Dividers & Headers */
.section-headline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.section-headline-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-white);
}

.section-headline-line {
  height: 1px;
  background: var(--border-subtle);
  flex-grow: 1;
}

/* Grille de Portails Studio (3x2 Équilibrée, Thématique & Vivante) */
.portals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.portal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  transition: background var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.portal-card:hover {
  background: #171b28;
  transform: translateY(-2px);
}

.portal-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.portal-card:hover .portal-card-icon {
  transform: scale(1.08);
}

.portal-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.portal-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
  line-height: 1.25;
}

.portal-card-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Thématiques Visuelles par Univers */
.portal-music .portal-card-icon {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.28);
}
.portal-music:hover {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.5), 0 0 20px -6px rgba(168, 85, 247, 0.3);
}

.portal-videos .portal-card-icon {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.28);
}
.portal-videos:hover {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.5), 0 0 20px -6px rgba(239, 68, 68, 0.3);
}

.portal-games .portal-card-icon {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}
.portal-games:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.5), 0 0 20px -6px rgba(16, 185, 129, 0.3);
}

.portal-models .portal-card-icon {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.28);
}
.portal-models:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.5), 0 0 20px -6px rgba(245, 158, 11, 0.3);
}

.portal-websites .portal-card-icon {
  background: rgba(14, 165, 233, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.28);
}
.portal-websites:hover {
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.5), 0 0 20px -6px rgba(14, 165, 233, 0.3);
}

.portal-stream .portal-card-icon {
  background: rgba(145, 70, 255, 0.14);
  color: #a78bfa;
  border: 1px solid rgba(145, 70, 255, 0.28);
}
.portal-stream:hover {
  border-color: rgba(145, 70, 255, 0.5);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.5), 0 0 20px -6px rgba(145, 70, 255, 0.3);
}

/* Grille des Dernières Musiques (Accueil) */
.home-tracks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}

.home-track-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.home-track-card:hover {
  background: #181d2a;
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.5);
}

.home-track-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #0d0f16;
}

.home-track-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.home-track-card:hover .home-track-cover {
  transform: scale(1.04);
}

.home-track-play-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-spotify);
  color: #000;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}

.home-track-card:hover .home-track-play-btn {
  opacity: 1;
  transform: translateY(0);
}

.home-track-play-btn:hover {
  transform: scale(1.08) translateY(0);
  background: #1fdf64;
}

.home-track-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-track-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Carte Citation / Signature */
.quote-card {
  background: #11131c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quote-text {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.quote-author {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ==========================================================================
   PAGE: VIDÉOS (VIDEOS)
   ========================================================================== */

/* Filter Bar (Pills sobres) */
.channel-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.channel-pills-group {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.channel-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #141722;
  border: 1px solid var(--border-subtle);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.channel-pill:hover {
  color: var(--text-white);
  background: #1a1f2e;
  border-color: var(--border-medium);
}

.channel-pill.active {
  background: var(--text-white);
  color: #090a0d;
  font-weight: 700;
  border-color: var(--text-white);
}

/* Grille Vidéos */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  cursor: pointer;
}

.video-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.v-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.v-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.v-channel-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(14, 16, 23, 0.85);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.v-dur {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.v-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.v-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.35;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.v-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PAGE: MUSIQUE (MUSIC)
   ========================================================================== */

.music-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.artist-filter-pill, .format-filter-pill {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #141722;
  border: 1px solid var(--border-subtle);
  transition: background var(--transition), color var(--transition);
}

.artist-filter-pill:hover, .format-filter-pill:hover {
  background: #1c2130;
  color: var(--text-white);
}

.artist-filter-pill.active, .format-filter-pill.active {
  background: var(--text-white);
  color: #090a0d;
  font-weight: 700;
  border-color: var(--text-white);
}

/* ALBUMS GRID & CARDS */
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

.album-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
  display: flex;
  flex-direction: column;
}

.album-card:hover {
  background: #181d2a;
  border-color: var(--border-medium);
  transform: translateY(-4px);
}

.album-card-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  background: #0d0f16;
}

.album-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.album-card:hover .album-card-cover {
  transform: scale(1.03);
}

.album-card-play-overlay {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-spotify);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
}

.album-card:hover .album-card-play-overlay {
  opacity: 1;
  transform: translateY(0);
}

.album-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ALBUM DETAIL VIEW */
.album-detail-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.album-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #141722;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  width: fit-content;
}

.album-back-btn:hover {
  color: var(--text-white);
  border-color: var(--border-medium);
  background: #1c2130;
}

.album-header-banner {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  background: linear-gradient(180deg, #181d2a 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.album-header-cover {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.album-header-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.album-header-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.album-header-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-white);
  line-height: 1.1;
}

.album-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.album-play-btn {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-spotify);
  color: #000;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: transform var(--transition);
  width: fit-content;
}

.album-play-btn:hover {
  transform: scale(1.04);
}

/* Spotify Tracklist */
.tracklist-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.track-header-row {
  display: grid;
  grid-template-columns: 50px 3.5fr 2fr 1.5fr 80px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.track-row {
  display: grid;
  grid-template-columns: 50px 3.5fr 2fr 1.5fr 80px;
  padding: 12px 20px;
  align-items: center;
  border-bottom: 1px solid #161924;
  cursor: pointer;
  transition: background var(--transition);
}

.track-row:hover {
  background: #1a1e2b;
}

.track-row.playing {
  background: #16221c;
}

.track-row.playing .track-title-text {
  color: var(--accent-spotify);
}

.track-col-play {
  display: flex;
  align-items: center;
}

.track-num {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.track-play-icon {
  display: none;
  width: 16px;
  height: 16px;
  fill: #fff;
}

.track-row:hover .track-num {
  display: none;
}
.track-row:hover .track-play-icon {
  display: block;
}

.track-info-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.track-avatar {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.track-title-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-white);
}

.track-artist-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.track-album-cell {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.track-header-col-sortable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color var(--transition);
  width: fit-content;
}

.track-header-col-sortable.align-right {
  justify-self: end;
}

.track-header-col-sortable:hover {
  color: var(--text-white);
}

.track-header-col-sortable.active-sort {
  color: var(--text-white);
}

.track-header-col-sortable .sort-indicator {
  font-size: 0.68rem;
  color: var(--accent-spotify);
  display: inline-block;
  line-height: 1;
}

.track-year-cell {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.track-year-badge {
  display: inline-block;
  color: var(--text-muted);
}

.track-dur-cell {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   PAGE: JEUX (GAMES)
   ========================================================================== */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 480px));
  gap: 24px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.game-card-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.game-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .game-card-cover {
  transform: scale(1.02);
}

.game-platform-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.9);
  backdrop-filter: blur(6px);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.game-visits-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(13, 15, 23, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.game-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.game-icon-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #11141f;
  border: 1px solid var(--border-subtle);
  object-fit: cover;
  flex-shrink: 0;
}

.game-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
}

.game-creator {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.game-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.game-screens-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.game-screen-thumb {
  width: 50%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xs);
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  background: #000;
  transition: opacity var(--transition);
}

.game-tags-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  margin-top: auto;
}

.game-tag-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  background: #141722;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}

.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.game-category-chip {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}


/* ==========================================================================
   PERSISTENT SPOTIFY AUDIO PLAYER
   ========================================================================== */

.persistent-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  background: var(--bg-player);
  border-top: 1px solid var(--border-subtle);
  z-index: 100;
  display: flex;
  align-items: center;
}

.player-inner {
  width: 100%;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 280px 1fr 240px;
  align-items: center;
  gap: 20px;
}

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

.player-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #141824;
}

.player-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.player-ctrl-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.p-btn {
  color: var(--text-muted);
  transition: color var(--transition);
  padding: 4px;
}

.p-btn:hover {
  color: var(--text-white);
}

.p-btn.active {
  color: #1ed760;
  text-shadow: 0 0 12px rgba(30, 215, 96, 0.5);
}

.p-btn-play {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--text-white);
  color: #090a0d;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
}

.p-btn-play:hover {
  transform: scale(1.06);
}

.p-timeline-row {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.p-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  min-width: 34px;
  font-variant-numeric: tabular-nums;
}

.p-bar-wrap {
  flex-grow: 1;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.p-bar-bg {
  width: 100%;
  height: 4px;
  background: #202534;
  border-radius: var(--radius-full);
  position: relative;
  transition: height 0.15s ease;
}

.p-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--text-white);
  border-radius: var(--radius-full);
  position: relative;
  transition: background-color 0.15s ease;
}

.p-bar-fill::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
}

.p-bar-wrap:hover .p-bar-bg,
.p-bar-wrap.dragging .p-bar-bg {
  height: 6px;
}

.p-bar-wrap:hover .p-bar-fill,
.p-bar-wrap.dragging .p-bar-fill {
  background: var(--accent-spotify);
}

.p-bar-wrap:hover .p-bar-fill::after,
.p-bar-wrap.dragging .p-bar-fill::after {
  transform: translateY(-50%) scale(1);
}

.player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.volume-slider {
  width: 90px;
  height: 4px;
  background: #202534;
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

/* ==========================================================================
   MODAL VIDÉO
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 860px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-close-btn {
  font-size: 1.2rem;
  color: var(--text-muted);
  padding: 4px 8px;
}
.modal-close-btn:hover {
  color: var(--text-white);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.video-modal-desc-box {
  background: #0d0f16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 16px;
  max-height: 260px;
  overflow-y: auto;
}

.video-modal-desc-text {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   BUTTONS & LIVE BADGES
   ========================================================================== */
.btn-twitch-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #9146ff;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn-twitch-pill:hover {
  background: #772ce8;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(145, 70, 255, 0.4);
  color: #ffffff;
}

.live-dot-pulse {
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: live-pulse-dot-anim 1.6s infinite ease-in-out;
}

.stream-portal-tag {
  color: #c084fc;
}

.website-dot {
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

@keyframes live-pulse-dot-anim {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px currentColor; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* ==========================================================================
   PAGE: STREAM (TWITCH ANKY3D)
   ========================================================================== */
/* Zone Théâtre Stream (Lecteur 16:9 à gauche + Carte Chaîne à droite) */
.stream-theater {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  margin-bottom: 24px;
  align-items: stretch;
}

.stream-player-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.stream-player-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Carte Chaîne & Profil (remplace le chat) */
.stream-channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: border-color var(--transition);
}

.stream-channel-card:hover {
  border-color: var(--border-medium);
}

.stream-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.stream-card-avatar-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
}

.stream-card-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-medium);
}

.stream-card-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.stream-card-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stream-card-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
}

.stream-live-status-pill {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #181d29;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stream-live-status-pill.is-live {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  animation: nav-live-pulse 2s infinite ease-in-out;
}

.stream-card-handle {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.stream-card-handle:hover {
  color: var(--text-white);
}

.stream-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.stream-card-bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  background: #10131c;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.stream-card-meta-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stream-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  padding-bottom: 8px;
  border-bottom: 1px solid #141824;
}

.stream-meta-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stream-meta-row .meta-label {
  color: var(--text-muted);
}

.stream-meta-row .meta-val {
  color: var(--text-white);
  font-weight: 600;
}

.stream-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.btn-twitch-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 18px;
  background: #9146ff;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition);
  text-decoration: none;
}

.btn-twitch-full:hover {
  background: #772ce8;
  transform: translateY(-1px);
}

.btn-discord-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 18px;
  background: #141724;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  text-decoration: none;
}

.btn-discord-full:hover {
  color: var(--text-white);
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.12);
}

.stream-live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stream-live-indicator.is-live {
  color: #ef4444;
}

.live-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4b5563;
}

.stream-live-indicator.is-live .live-indicator-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: live-pulse-dot-anim 1.6s infinite ease-in-out;
}

/* ==========================================================================
   PAGE: SITES WEB & APPLICATIONS
   ========================================================================== */
.websites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 460px));
  gap: 24px;
  margin-bottom: 28px;
}

.website-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.website-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  background: var(--bg-card-hover);
}

.website-card-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.website-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.website-card:hover .website-card-cover {
  transform: scale(1.02);
}

.website-status-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #22c55e;
  background: rgba(13, 15, 23, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.website-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.website-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.website-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.website-icon-thumb {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #11141f;
  border: 1px solid var(--border-subtle);
  padding: 4px;
  object-fit: contain;
}

.website-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
}

.website-card-cat {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.website-domain-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: #171b26;
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  transition: border-color var(--transition), color var(--transition);
}

.website-domain-chip:hover {
  color: var(--text-white);
  border-color: var(--border-medium);
}

.website-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
}

.website-tags-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  margin-top: auto;
}

.website-tag-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  background: #141722;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}

.website-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.website-action-btn {
  padding: 9px 20px;
  font-size: 0.85rem;
}

.website-meta-info {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   FOOTER (LÉGER, SOBRE ET ÉPURÉ)
   ========================================================================== */
.app-site-footer {
  margin-top: 48px;
  background: transparent;
  border-top: 1px solid var(--border-subtle);
  padding: 24px 36px calc(var(--player-height) + 20px) 36px;
  width: 100%;
}

.site-footer-simple {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.footer-brand-logo {
  height: 20px;
  width: auto;
  opacity: 0.85;
  transition: opacity var(--transition);
}

.footer-brand:hover .footer-brand-logo {
  opacity: 1;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-dot {
  color: var(--text-dim);
  font-size: 0.75rem;
}

.footer-legal-btn {
  background: none;
  border: none;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: color var(--transition);
}

.footer-legal-btn:hover {
  color: var(--text-white);
  text-decoration: underline;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: #11141c;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.footer-social-link:hover {
  color: var(--text-white);
  border-color: var(--border-medium);
  background: #171b26;
}

.footer-back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: color var(--transition);
}

.footer-back-to-top:hover {
  color: var(--text-white);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1400px) {
  .portals-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1100px) {
  .portals-grid, .videos-grid, .games-grid, .home-tracks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .websites-grid {
    grid-template-columns: 1fr;
  }
  .stream-theater {
    grid-template-columns: 1fr;
  }
  .stream-chat-container {
    height: 440px;
    min-height: 440px;
  }
}

@media (max-width: 768px) {
  .app-sidebar {
    display: none;
  }
  .app-main {
    margin-left: 0;
    width: 100%;
  }
  .app-content {
    padding: 20px 16px 24px;
  }
  .app-site-footer {
    padding: 20px 16px calc(var(--player-height) + 16px) 16px;
  }
  .stream-profile-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 14px;
  }
  .stream-profile-actions {
    width: 100%;
    justify-content: space-between;
  }
  .site-footer-simple {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
  .footer-left {
    flex-direction: column;
    gap: 6px;
  }
  .portals-grid, .videos-grid, .games-grid, .websites-grid, .home-tracks-grid {
    grid-template-columns: 1fr;
  }
  .track-header-row {
    display: none;
  }
  .track-row {
    grid-template-columns: 36px 1fr 60px;
  }
  .track-album-cell, .track-year-cell {
    display: none;
  }
  .player-inner {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }
  .player-right, .p-timeline-row {
    display: none;
  }
}
