/* ============================================================================
   SongLink — Styles spécifiques
   Version : 1.0.0 (VNCT Design System)
   
   Ce fichier contient UNIQUEMENT les styles propres à SongLink.
   Variables, thèmes, FAB, modals, toasts, nav, version badge
   sont gérés par vnct-design-system.css et vnct-common.js.
   ============================================================================ */

/* ── Layout ── */
.container {
  position: relative; z-index: 1;
  max-width: 560px; margin: 0 auto;
  padding: var(--space-8) var(--space-5) var(--space-12);
}

.header { text-align: center; margin-bottom: var(--space-10); }
.logo {
  font-size: var(--text-2xl); font-weight: var(--font-bold);
  letter-spacing: var(--tracking-tight); margin-bottom: var(--space-2);
  color: var(--text-primary);
}
.logo span { color: var(--accent); }
.subtitle {
  color: var(--text-muted); font-size: var(--text-sm);
  font-weight: var(--font-light); letter-spacing: 0.5px;
}

/* ── Input zone ── */
.input-zone {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}
.input-zone .title {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}
.input-row {
  display: flex; gap: var(--space-3);
}
.input-row input {
  flex: 1; background: var(--bg-primary); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4);
  color: var(--text-primary); font-family: var(--font-family); font-size: var(--text-sm);
  outline: none; transition: border-color 0.2s;
}
.input-row input:focus { border-color: var(--accent); }
.input-row input::placeholder { color: var(--text-muted); opacity: 0.6; }
.input-row button {
  padding: var(--space-3) var(--space-6); border: none; border-radius: var(--radius-md);
  background: var(--accent); color: #000;
  font-family: var(--font-family); font-size: var(--text-sm); font-weight: var(--font-semibold);
  cursor: pointer; transition: all 0.25s; white-space: nowrap;
}
.input-row button:hover {
  box-shadow: var(--neon-shadow-md); transform: translateY(-1px);
}
.input-row button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.supported-platforms {
  margin-top: var(--space-3); font-size: var(--text-xs); color: var(--text-muted);
}

/* ── Result ── */
.result {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  margin-bottom: var(--space-6);
}
.result .song-preview {
  display: flex; align-items: center; gap: var(--space-4);
  margin-bottom: var(--space-5); text-align: left;
}
.result .song-preview img {
  width: 80px; height: 80px; border-radius: var(--radius-md);
  object-fit: cover; flex-shrink: 0;
}
.result .song-preview .song-info { flex: 1; min-width: 0; }
.result .song-preview .song-title {
  font-weight: var(--font-semibold); font-size: var(--text-base);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result .song-preview .song-artist {
  color: var(--text-muted); font-size: var(--text-sm); margin-top: 2px;
}
.result .song-preview .song-platforms {
  font-size: var(--text-xs);
  color: var(--accent); margin-top: var(--space-2);
}
.result .link-box {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--bg-tertiary); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.result .link-box input {
  flex: 1; background: none; border: none;
  color: var(--accent); font-family: monospace; font-size: var(--text-sm);
  outline: none;
}
.result .link-box .copy-btn {
  background: var(--accent); color: #000; border: none;
  border-radius: var(--radius-md); padding: var(--space-2) var(--space-4);
  font-family: var(--font-family); font-size: var(--text-xs); font-weight: var(--font-semibold);
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.result .link-box .copy-btn:hover { box-shadow: var(--neon-shadow-sm); }
.result .expires { font-size: var(--text-xs); color: var(--text-muted); }
.result .expires strong { color: var(--warning); }

.new-btn {
  margin-top: var(--space-4);
  background: var(--bg-tertiary); border: 1px solid var(--border-default);
  color: var(--text-primary); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-6); font-family: var(--font-family); font-size: var(--text-sm);
  font-weight: var(--font-medium); cursor: pointer; transition: all 0.2s;
}
.new-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── History ── */
.history { margin-top: var(--space-8); }
.history .history-title {
  font-size: var(--text-sm);
  color: var(--text-muted); margin-bottom: var(--space-3);
  display: flex; align-items: center; gap: var(--space-2);
}
.history .history-title .count {
  background: var(--bg-tertiary); border: 1px solid var(--border-default);
  border-radius: var(--radius-full); padding: 2px 10px; font-size: var(--text-xs);
}
.history-item {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-2); display: flex; align-items: center; gap: var(--space-3);
  transition: border-color 0.2s;
}
.history-item:hover { border-color: var(--accent); }
.history-item img {
  width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0;
}
.history-item .no-thumb {
  width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: var(--bg-tertiary); display: flex; align-items: center;
  justify-content: center; font-size: 1.2rem;
}
.history-item .info { flex: 1; min-width: 0; }
.history-item .info .name {
  font-size: var(--text-sm); font-weight: var(--font-medium);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-item .info .meta {
  font-size: var(--text-xs);
  color: var(--text-muted); margin-top: 2px;
}
.history-item .info .meta .timer { color: var(--warning); font-weight: var(--font-bold); }
.history-item .actions { display: flex; gap: 6px; flex-shrink: 0; }
.history-item .actions button {
  background: var(--bg-tertiary); border: 1px solid var(--border-default);
  color: var(--text-muted); border-radius: var(--radius-md);
  padding: 6px 12px; font-family: var(--font-family); font-size: var(--text-xs);
  font-weight: var(--font-medium); cursor: pointer; transition: all 0.2s;
}
.history-item .actions button:hover { border-color: var(--accent); color: var(--accent); }
.history-item .actions a.action-link {
  background: var(--bg-tertiary); border: 1px solid var(--border-default);
  color: var(--text-muted); border-radius: var(--radius-md);
  padding: 6px 12px; font-family: var(--font-family); font-size: var(--text-xs);
  font-weight: var(--font-medium); cursor: pointer; transition: all 0.2s;
  text-decoration: none; display: flex; align-items: center;
}
.history-item .actions a.action-link:hover { border-color: var(--accent); color: var(--accent); }
.history-item .actions button.delete-btn:hover { border-color: var(--danger); color: var(--danger); }

/* ── Toast (utilisé par le JS) ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-tertiary); border: 1px solid var(--border-default);
  color: var(--text-primary);
  padding: var(--space-3) var(--space-6); border-radius: var(--radius-lg);
  font-size: var(--text-sm); z-index: 300; opacity: 0;
  transition: opacity 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ── Loading ── */
.loading { display: none; text-align: center; margin-top: var(--space-3); }
.loading .spinner {
  display: inline-block; width: 24px; height: 24px;
  border: 3px solid var(--border-default); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading .label { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-2); }

.fade-in { animation: sl-fadeIn 0.3s ease; }
@keyframes sl-fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Responsive ── */
@media (max-width: 480px) {
  .input-row { flex-direction: column; }
  .input-row button { width: 100%; }
}
