/* Styles pour la liste des pistes dans les pages de stations */

.tracklist-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  animation: pulse 1.5s ease-in-out infinite;
}

.tracklist-section {
  margin-top: 3rem;
  padding: 0 1rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.tracklist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.tracklist-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.tracklist-title svg {
  opacity: 0.8;
}

.tracklist-count {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 500;
}

.tracklist-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tracklist-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

.track-item {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.track-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateX(4px);
}

.track-number {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.track-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-meta {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.track-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.track-btn:hover:not(:disabled) {
  background: #a855f7;
  color: #fff;
  transform: scale(1.1);
}

.track-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.track-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.track-btn.playing {
  background: #a855f7;
  color: #fff;
  animation: pulse 1.5s ease-in-out infinite;
}

.track-btn.downloading {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  animation: spin 1s linear infinite;
}

.track-btn.downloaded {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Bouton "Afficher plus" */
.tracklist-show-more {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.show-more-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.show-more-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.show-more-btn:active {
  transform: translateY(0);
}

.show-more-btn svg {
  transition: transform 0.3s ease;
}

.show-more-btn:hover svg {
  transform: translateY(2px);
}

/* Responsive */
@media (max-width: 768px) {
  .tracklist-section {
    margin-top: 2rem;
    padding: 0 0.5rem;
  }
  
  .tracklist-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .tracklist-title {
    font-size: 1.25rem;
  }
  
  .track-item {
    grid-template-columns: 32px 1fr auto;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  
  .track-number {
    font-size: 0.875rem;
  }
  
  .track-title {
    font-size: 0.9375rem;
  }
  
  .track-meta {
    font-size: 0.8125rem;
  }
  
  .track-btn {
    width: 36px;
    height: 36px;
  }
  
  .track-actions {
    gap: 0.375rem;
  }
}

@media (max-width: 480px) {
  .track-item {
    grid-template-columns: 28px 1fr auto;
    gap: 0.5rem;
    padding: 0.625rem;
  }
  
  .track-btn {
    width: 32px;
    height: 32px;
  }
  
  .track-btn svg {
    width: 16px;
    height: 16px;
  }
}
