/*
 * ═══════════════════════════════════════════════════════════
 * modern.css — Design System principal de Deezer Downloader
 * Auteur  : KAETS
 * Polices : Syne (display) + DM Sans (corps)
 * Thème   : Dark deep-space · Violet accent · Neon green files
 *           Red accent pour l'onglet vidéo
 * ═══════════════════════════════════════════════════════════
 */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ════════════════════════════════════════════════════════════
   TOKENS — Variables CSS globales
   ════════════════════════════════════════════════════════════ */
:root {
  /* Couleurs de fond */
  --bg:    #080c14;
  --bg1:   #0d1220;
  --bg2:   #131929;
  --bg3:   #1a2235;

  /* Bordures */
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.13);

  /* Accent principal — violet */
  --violet:  #7c6bff;
  --violet2: #a78bfa;
  --indigo:  #4f63ff;

  /* Accent secondaire — vert néon (bibliothèque) */
  --neon:  #00f5a0;
  --neon2: #00d4aa;

  /* Accent vidéo — rouge YouTube */
  --yt-red:   #ff3b3b;
  --yt-red2:  #ff6b6b;
  --yt-bg:    rgba(255,59,59,.1);
  --yt-border:rgba(255,59,59,.22);

  /* Texte */
  --text:  #e8edf5;
  --muted: rgba(232,237,245,0.45);
  --muted2:rgba(232,237,245,0.2);

  /* États */
  --success: #10b981;
  --danger:  #f43f5e;
  --warning: #f59e0b;

  /* Rayon de bordure */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --r-xl: 22px;

  /* Transitions */
  --ease:   cubic-bezier(0.4,0,0.2,1);
  --spring: cubic-bezier(0.34,1.56,0.64,1);
  --t:      0.2s;

  /* Ombres */
  --shadow:  0 24px 48px rgba(0,0,0,0.5);
  --glow-v:  0 0 0 3px rgba(124,107,255,0.2);
  --glow-n:  0 0 20px rgba(0,245,160,0.25);
  --glow-yt: 0 0 0 3px rgba(255,59,59,0.2);
}

/* ════════════════════════════════════════════════════════════
   RESET & BASE
   ════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg1); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--violet); }

/* ════════════════════════════════════════════════════════════
   MODAL D'AUTHENTIFICATION
   ════════════════════════════════════════════════════════════ */
.modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,6,14,0.85);
  backdrop-filter: blur(16px);
  z-index: 1000;
  animation: fadeIn .25s var(--ease);
}
.modal.hidden { display: none; }

.auth-container {
  width: 90%; max-width: 420px;
  background: var(--bg1);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 44px 40px;
  box-shadow: var(--shadow);
  animation: slideUp .35s var(--spring);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo i {
  font-size: 36px;
  background: linear-gradient(135deg, var(--violet), var(--neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-logo h1 {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--text);
  margin-top: 10px;
  letter-spacing: -0.5px;
}

.auth-tabs {
  display: flex;
  background: var(--bg2);
  border-radius: var(--r);
  padding: 4px; gap: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  flex: 1; padding: 9px 14px;
  border: none; background: transparent;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600; font-size: 14px;
  cursor: pointer;
  transition: all var(--t) var(--ease);
}
.auth-tab.active { background: var(--bg3); color: var(--text); }
.auth-tab:hover:not(.active) { color: var(--text); }

.auth-form { display: none; animation: fadeIn .2s var(--ease); }
.auth-form.active { display: block; }

.form-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px; font-weight: 700;
  color: var(--text); margin-bottom: 22px;
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px;
}
.form-input {
  width: 100%; padding: 11px 14px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  transition: all var(--t) var(--ease);
}
.form-input:focus {
  outline: none;
  border-color: var(--violet);
  box-shadow: var(--glow-v);
  background: var(--bg3);
}
.form-input::placeholder { color: var(--muted2); }

.form-error { color: var(--danger); font-size: 13px; margin-top: 10px; display: none; }
.form-error.show { display: block; animation: shake .4s; }

/* ════════════════════════════════════════════════════════════
   BOUTONS
   ════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: none; border-radius: var(--r);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all var(--t) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,107,255,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,107,255,.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary { background: var(--bg2); color: var(--text); border: 1px solid var(--border2); }
.btn-secondary:hover { background: var(--bg3); }

.btn-lg { width: 100%; justify-content: center; padding: 13px; font-size: 15px; margin-top: 6px; }

.btn-icon {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted); width: 34px; height: 34px;
  border-radius: var(--r-sm); justify-content: center; padding: 0;
}
.btn-icon:hover { color: var(--text); border-color: var(--border2); }

/* ════════════════════════════════════════════════════════════
   MISE EN PAGE PRINCIPALE
   ════════════════════════════════════════════════════════════ */
.app-container { display: flex; flex-direction: column; min-height: 100vh; }
.app-container.hidden { display: none; }

/* ── Barre de navigation ─────────────────────────────────── */
.navbar {
  background: rgba(8,12,20,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px; height: 60px;
  display: flex; align-items: center; gap: 20px;
  position: sticky; top: 0; z-index: 200;
}

.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 17px; font-weight: 800;
  color: var(--text); flex-shrink: 0; letter-spacing: -0.3px;
}
.brand-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff;
}

.navbar-menu { display: flex; gap: 2px; flex: 1; }

.nav-btn {
  background: transparent; border: none;
  color: var(--muted); padding: 8px 14px;
  border-radius: var(--r); cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: 13.5px;
  display: flex; align-items: center; gap: 7px;
  transition: all var(--t) var(--ease);
}
.nav-btn:hover { color: var(--text); background: var(--bg3); }
.nav-btn.active {
  background: linear-gradient(135deg, rgba(124,107,255,.18), rgba(79,99,255,.18));
  color: var(--violet2);
  border: 1px solid rgba(124,107,255,.25);
}
/* Onglet vidéo actif — rouge YouTube */
.nav-btn[data-tab="video"].active {
  background: var(--yt-bg);
  color: var(--yt-red2);
  border: 1px solid var(--yt-border);
}
.nav-btn i { font-size: 13px; }

.navbar-user { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.user-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 12px 5px 6px;
}
.user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
#currentUser { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── Zone de contenu ─────────────────────────────────────── */
.content {
  flex: 1;
  padding: 32px 28px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.tab-content { display: none; animation: fadeIn .2s var(--ease); }
.tab-content.active { display: block; }

.tab-header { margin-bottom: 24px; }
.tab-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: 24px; font-weight: 800;
  color: var(--text); letter-spacing: -0.5px; margin-bottom: 4px;
}
.tab-header p { color: var(--muted); font-size: 14px; }

/* ════════════════════════════════════════════════════════════
   ONGLET RECHERCHE DEEZER
   ════════════════════════════════════════════════════════════ */
.search-panel {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
}

.search-box { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

.search-input {
  flex: 1; min-width: 200px;
  padding: 11px 16px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--r); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  transition: all var(--t) var(--ease);
}
.search-input:focus { outline: none; border-color: var(--violet); box-shadow: var(--glow-v); }
.search-input::placeholder { color: var(--muted2); }

.search-select {
  padding: 11px 14px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--r); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  cursor: pointer; transition: all var(--t) var(--ease);
}
.search-select:focus { outline: none; border-color: var(--violet); }
.search-select option { background: var(--bg1); }

/* ── Résultats ───────────────────────────────────────────── */
#searchResults {
  display: flex; flex-direction: column;
  border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--border);
}
#searchResults:empty { border: none; }

.result-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  transition: all var(--t) var(--ease);
}
.result-row:last-child { border-bottom: none; }
.result-row:hover { background: var(--bg3); padding-left: 18px; }

.result-thumb {
  width: 50px; height: 50px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0; background: var(--bg3);
}
.result-thumb[src=""] { visibility: hidden; }

.result-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.result-title { font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-sub   { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-actions { flex-shrink: 0; }

/* Bouton de téléchargement résultats */
.dl-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  border: none; color: #fff;
  padding: 8px 16px; border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(124,107,255,.3);
  transition: all var(--t) var(--ease);
}
.dl-btn:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(124,107,255,.45); }
.dl-btn:active { transform: scale(.97); }
.dl-btn.loading { opacity: .65; cursor: wait; pointer-events: none; }

.browse-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg3); border: 1px solid var(--border2); color: var(--text);
  padding: 8px 14px; border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: all var(--t) var(--ease);
}
.browse-btn:hover { border-color: var(--violet2); color: var(--violet2); }

.back-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg1); border-bottom: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
}
.back-bar button {
  background: none; border: none; color: var(--violet2);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}
.back-bar button:hover { text-decoration: underline; }

/* États vides / chargement */
.empty-state, .search-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 48px 20px; color: var(--muted); font-size: 14px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border2);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin .7s linear infinite; flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   ONGLET VIDÉO (yt-dlp)
   ════════════════════════════════════════════════════════════ */
.video-panel {
  display: flex; flex-direction: column; gap: 20px;
}

/* ── Saisie URL ──────────────────────────────────────────── */
.url-input-group {
  display: flex; gap: 10px; align-items: center;
}
.url-input-wrapper {
  flex: 1; position: relative;
}
.url-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}
.url-input {
  width: 100%; padding: 13px 14px 13px 40px;
  background: var(--bg1); border: 1px solid var(--border2);
  border-radius: var(--r); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  transition: all var(--t) var(--ease);
}
.url-input:focus {
  outline: none; border-color: var(--yt-red);
  box-shadow: var(--glow-yt); background: var(--bg2);
}
.url-input::placeholder { color: var(--muted2); }

/* ── Sites supportés ────────────────────────────────────── */
.supported-sites {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.site-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 12px;
  font-size: 12px; color: var(--muted);
  transition: all var(--t) var(--ease);
}
.site-badge:hover { border-color: var(--yt-border); color: var(--yt-red2); }
.site-badge i { font-size: 12px; }

/* ── Aperçu vidéo ───────────────────────────────────────── */
.video-info {
  background: var(--bg1);
  border: 1px solid var(--yt-border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex; flex-direction: column; gap: 24px;
  animation: fadeIn .3s var(--ease);
}
.video-info.hidden { display: none; }

.video-preview {
  display: flex; gap: 18px; align-items: flex-start;
}
.video-thumb {
  width: 140px; height: 80px; object-fit: cover;
  border-radius: var(--r); flex-shrink: 0;
  border: 1px solid var(--border); background: var(--bg3);
}
.video-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.video-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px; font-weight: 700;
  color: var(--text); line-height: 1.3;
}
.video-uploader { font-size: 13px; color: var(--muted); }
.video-duration {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--yt-red2); font-weight: 600;
}
.video-duration::before { content: '⏱'; }

/* ── Sélecteur de format ────────────────────────────────── */
.format-section { display: flex; flex-direction: column; gap: 14px; }

.format-header {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Syne', sans-serif;
  font-size: 14px; font-weight: 700;
  color: var(--text);
}
.format-header i { color: var(--yt-red); }

/* Onglets vidéo / audio */
.format-tabs {
  display: flex; gap: 6px;
  background: var(--bg2);
  padding: 4px; border-radius: var(--r);
  border: 1px solid var(--border);
}
.format-tab {
  flex: 1; padding: 8px 10px;
  background: transparent; border: none;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all var(--t) var(--ease);
}
.format-tab.active { background: var(--bg3); color: var(--text); }
.format-tab:hover:not(.active) { color: var(--text); }

/* Liste des formats disponibles */
.format-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 260px; overflow-y: auto;
  padding-right: 4px;
}

/* Carte de format individuelle */
.format-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--r); cursor: pointer;
  transition: all var(--t) var(--ease);
}
.format-card:hover { background: var(--bg3); border-color: var(--yt-border); }
.format-card.selected {
  background: var(--yt-bg); border-color: var(--yt-red);
  box-shadow: 0 0 0 1px var(--yt-red);
}

/* Pastille radio à gauche */
.format-radio {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 2px solid var(--border2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t) var(--ease);
}
.format-card.selected .format-radio {
  border-color: var(--yt-red); background: var(--yt-red);
}
.format-card.selected .format-radio::after {
  content: ''; width: 6px; height: 6px;
  background: #fff; border-radius: 50%;
}

.format-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.format-label { font-size: 14px; font-weight: 500; color: var(--text); }
.format-meta  { font-size: 11px; color: var(--muted); }

/* Badge ext/résolution à droite */
.format-badge {
  flex-shrink: 0; padding: 3px 9px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; font-size: 11px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .3px;
}
.format-card.selected .format-badge { border-color: var(--yt-red); color: var(--yt-red2); }

/* Bandeau récapitulatif du format sélectionné */
.selected-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--yt-bg); border: 1px solid var(--yt-border);
  border-radius: var(--r); color: var(--yt-red2);
  font-size: 13.5px; font-weight: 600;
  animation: fadeIn .2s var(--ease);
}
.selected-banner.hidden { display: none; }
.selected-banner i { font-size: 16px; flex-shrink: 0; }

/* Zone de téléchargement */
.video-download-zone { display: flex; flex-direction: column; gap: 8px; }
.video-dl-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }

/* ════════════════════════════════════════════════════════════
   ONGLET QUEUE
   ════════════════════════════════════════════════════════════ */
.queue-list { display: flex; flex-direction: column; gap: 8px; }

.queue-item {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color var(--t) var(--ease);
}
.queue-item:hover { border-color: var(--border2); }

.queue-item-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.queue-item-title { font-weight: 600; color: var(--text); font-size: 14px; line-height: 1.4; }

.queue-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .5px;
}
.queue-badge.pending { background: rgba(245,158,11,.15); color: var(--warning); }
.queue-badge.running { background: rgba(124,107,255,.15); color: var(--violet2); }
.queue-badge.done    { background: rgba(16,185,129,.15);  color: var(--success); }
.queue-badge.error   { background: rgba(244,63,94,.15);   color: var(--danger); }

.progress-bar { width: 100%; height: 3px; background: var(--bg3); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--violet), var(--violet2)); transition: width .4s var(--ease); }
.queue-item-sub { color: var(--muted); font-size: 12px; }

/* ════════════════════════════════════════════════════════════
   ONGLET BIBLIOTHÈQUE — Vert néon
   ════════════════════════════════════════════════════════════ */
#filesList { display: flex; flex-direction: column; gap: 12px; }

.files-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 4px;
}
.refresh-btn {
  display: flex; align-items: center; gap: 7px; flex-shrink: 0;
  background: rgba(0,245,160,0.08); border: 1px solid rgba(0,245,160,0.2);
  color: var(--neon); padding: 7px 14px; border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all var(--t) var(--ease);
}
.refresh-btn:hover { background: rgba(0,245,160,0.15); box-shadow: var(--glow-n); }

/* Groupe de fichiers (dossier) */
.file-group {
  background: var(--bg1);
  border: 1px solid rgba(0,245,160,0.14);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 0 30px rgba(0,245,160,0.04);
  transition: box-shadow var(--t) var(--ease);
}
.file-group:hover { box-shadow: 0 0 30px rgba(0,245,160,0.09); }

.file-group-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: rgba(0,245,160,0.06);
  border-bottom: 1px solid rgba(0,245,160,0.1);
  color: var(--neon);
  font-family: 'Syne', sans-serif;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.file-group-count {
  margin-left: auto;
  background: rgba(0,245,160,0.12); color: var(--neon2);
  border-radius: 10px; padding: 2px 8px;
  font-size: 11px; font-weight: 700;
}

/* Ligne de fichier */
.file-row {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 18px;
  border-bottom: 1px solid rgba(0,245,160,0.05);
  transition: all var(--t) var(--ease);
}
.file-row:last-child { border-bottom: none; }
.file-row:hover { background: rgba(0,245,160,0.05); padding-left: 22px; }

/* Badge extension */
.file-ext {
  flex-shrink: 0; width: 42px; text-align: center;
  padding: 5px 0; border-radius: var(--r-sm);
  background: rgba(0,245,160,0.1);
  border: 1px solid rgba(0,245,160,0.2);
  color: var(--neon);
  font-family: 'Syne', sans-serif;
  font-size: 9.5px; font-weight: 800; letter-spacing: .5px;
  text-shadow: 0 0 10px rgba(0,245,160,0.5);
}
/* Variante vidéo — badge rouge */
.file-ext.video {
  background: var(--yt-bg); border-color: var(--yt-border);
  color: var(--yt-red2); text-shadow: none;
}

.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-name { font-size: 13.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { font-size: 11px; color: var(--neon2); font-weight: 600; opacity: .7; }

/* Bouton téléchargement bibliothèque */
.file-dl-btn {
  flex-shrink: 0; width: 34px; height: 34px;
  border: 1px solid rgba(0,245,160,0.2); border-radius: 50%;
  background: rgba(0,245,160,0.08); color: var(--neon);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; cursor: pointer;
  transition: all var(--t) var(--ease);
}
.file-dl-btn:hover { background: var(--neon); color: var(--bg); box-shadow: var(--glow-n); transform: scale(1.1); }
.file-dl-btn:active { transform: scale(.95); }

/* ════════════════════════════════════════════════════════════
   TOASTS
   ════════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 22px; right: 22px;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg1); border: 1px solid var(--border2);
  border-radius: var(--r); padding: 13px 16px;
  color: var(--text); font-size: 13.5px; font-weight: 500;
  min-width: 260px; max-width: 360px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  animation: slideLeft .25s var(--spring);
}
.toast i { font-size: 15px; flex-shrink: 0; }
.toast.success { border-left: 3px solid var(--success); }
.toast.success i { color: var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.error i { color: var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }
.toast.warning i { color: var(--warning); }
.toast.info i  { color: var(--violet2); }

/* ════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════ */
@keyframes fadeIn    { from{opacity:0}            to{opacity:1} }
@keyframes slideUp   { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
@keyframes slideLeft { from{transform:translateX(16px);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes shake     { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
@keyframes spin      { to{transform:rotate(360deg)} }
@keyframes pulse     { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media(max-width:680px){
  .navbar { padding: 0 14px; gap: 10px; height: 56px; }
  .nav-btn span { display: none; }
  .nav-btn { padding: 8px 10px; }
  .nav-btn i { font-size: 15px; }
  .content { padding: 18px 14px; }
  .search-box { flex-direction: column; }
  .search-input { min-width: unset; }
  .url-input-group { flex-direction: column; }
  .url-input-wrapper, .url-input-group .btn { width: 100%; }
  .video-preview { flex-direction: column; }
  .video-thumb { width: 100%; height: 160px; }
  .format-tabs { flex-direction: column; }
  .auth-container { padding: 28px 20px; }
}
