/* ═══════════════════════════════════════════════════════════════════════════
   CHEMIN  : zyver_web/css/audio.css
   RÔLE    : Feuille de style autonome de la page zyver_web/audio/index.html.
             Contient le design system commun (repris de css/hub.css : variables,
             reset, splash, header, langue, thème, footer, bouton donate) ainsi
             que les styles propres à l'outil de compression audio.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── VARIABLES CSS — THÈME SOMBRE (défaut) ─────────────────────────────── */
:root {
  --scaffold-bg: #0a0d14;
  --surface: #101422;
  --surface-card: #181e2e;
  --on-surface: #e8edf2;
  --on-surface-sec: #8a9bb0;
  --divider: #2a3d55;

  --success: #00c2a8;
  --warning: #f57c00;
  --danger: #e53935;
  --info: #1a73e8;

  --grad-start: #4dffd2;
  --grad-mid: #2b8fff;
  --grad-end: #5b3fe8;
  --primary: #2b8fff;

  --sp-xs: 4px;
  --sp-s: 8px;
  --sp-m: 16px;
  --sp-l: 24px;
  --sp-xl: 32px;
  --sp-xxl: 48px;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-xl: 24px;
  --r-full: 100px;
}

/* ── VARIABLES CSS — THÈME CLAIR ───────────────────────────────────────── */
:root[data-theme="light"] {
  --scaffold-bg: #f8faff;
  --surface: #eef2fb;
  --surface-card: #ffffff;
  --on-surface: #1c2a3a;
  --on-surface-sec: #5a6b7c;
  --divider: #c5d0de;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--scaffold-bg);
  color: var(--on-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── RTL (Arabe) ────────────────────────────────────────────────────────── */
html[dir="rtl"] .footer-bottom .rcbg,
html[dir="rtl"] .lang-switch {
  direction: rtl;
}

html[dir="rtl"] .lang-menu {
  left: 0;
  right: auto;
}

/* ── TRANSITIONS THÈME ─────────────────────────────────────────────────── */
body,
header,
.stat-item,
.config-block,
.profile-btn,
.file-item,
footer,
.footer-container,
.footer-col,
.nav-link,
.theme-toggle,
.lang-toggle,
.lang-menu,
.btn-primary,
.btn-primary-large,
.section-header {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPLASH SCREEN
   N'est affiché que par JS (audio.js) si le chargement est lent ou en cas
   de souci réseau — jamais par défaut, jamais bloquant.
   ═══════════════════════════════════════════════════════════════════════════ */
#splash {
  position: fixed;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(43, 143, 255, 0.08),
    var(--scaffold-bg) 70%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 80px var(--sp-l) 60px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#splash[hidden] {
  display: none;
}
#splash.visible {
  opacity: 1;
}
#splash.leaving {
  opacity: 0;
}

:root[data-theme="light"] #splash {
  background: radial-gradient(
    circle at center,
    rgba(43, 143, 255, 0.1),
    var(--scaffold-bg) 70%
  );
}

.splash-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  animation: splashIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes splashIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.splash-lottie {
  width: 120px;
  height: 120px;
}

.splash-brand {
  text-align: center;
}

.splash-brand .zyver-text {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(
    135deg,
    var(--grad-start),
    var(--grad-mid),
    var(--grad-end)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.splash-brand .tagline {
  font-size: 12px;
  color: var(--on-surface-sec);
  margin-top: 4px;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
}

.splash-rcbg {
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER / NAVIGATION
   ═══════════════════════════════════════════════════════════════════════════ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 20, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--divider);
}

:root[data-theme="light"] header {
  background: rgba(248, 250, 255, 0.92);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-m) var(--sp-l);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-m);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-s);
  text-decoration: none;
  color: var(--on-surface);
  flex-shrink: 0;
}

.nav-logo img {
  width: 32px;
  height: 32px;
}

.nav-logo span {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  opacity: 0.6;
  -webkit-text-fill-color: var(--on-surface-sec);
  margin-left: 2px;
}

.nav-links {
  display: flex;
  gap: var(--sp-xs);
  list-style: none;
  flex-wrap: wrap;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-m);
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface-sec);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.nav-link:hover {
  color: var(--primary);
  background: rgba(43, 143, 255, 0.08);
}
.nav-link.active {
  color: var(--primary);
  background: rgba(43, 143, 255, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-s);
}

/* ── LANGUAGE SWITCH ───────────────────────────────────────────────────── */
.lang-switch {
  position: relative;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--r-full);
  background: var(--surface-card);
  border: 1px solid var(--divider);
  color: var(--on-surface);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
}

.lang-toggle svg {
  width: 16px;
  height: 16px;
}
.lang-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: var(--surface-card);
  border: 1px solid var(--divider);
  border-radius: var(--r-m);
  list-style: none;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
  z-index: 50;
}

.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-menu li {
  padding: 8px 12px;
  border-radius: var(--r-s);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--on-surface-sec);
}

.lang-menu li:hover {
  background: rgba(43, 143, 255, 0.08);
  color: var(--primary);
}
.lang-menu li.active {
  color: var(--primary);
  background: rgba(43, 143, 255, 0.1);
}

/* ── THEME TOGGLE ──────────────────────────────────────────────────────── */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--r-full);
  background: var(--surface-card);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--on-surface);
  transition: all 0.3s ease;
  flex-shrink: 0;
  position: relative;
}

.theme-toggle:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: rotate(15deg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  position: absolute;
  transition:
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
}

.theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}
.theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0) scale(1);
}
:root[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

/* ── MOBILE NAV TOGGLE ─────────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--on-surface);
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.compress-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-xl) var(--sp-l) var(--sp-xxl);
  flex: 1;
  width: 100%;
}

/* ── HERO COMPACT ──────────────────────────────────────────────────────── */
.compress-hero {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.compress-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: var(--sp-s);
}

.compress-hero p {
  font-size: 15px;
  color: var(--on-surface-sec);
}

/* ═══════════════════════════════════════════════════════════════════════════
   DROP ZONE
   ═══════════════════════════════════════════════════════════════════════════ */
.drop-section {
  margin-bottom: var(--sp-xl);
}

.drop-zone {
  background: var(--surface);
  border: 2px dashed var(--divider);
  border-radius: var(--r-xl);
  padding: var(--sp-xxl) var(--sp-xl);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.drop-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(91, 63, 232, 0.03),
    rgba(43, 143, 255, 0.03)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--grad-end);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(91, 63, 232, 0.12);
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
  opacity: 1;
}

.drop-zone-content {
  position: relative;
  z-index: 1;
}

.drop-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--r-l);
  background: linear-gradient(
    135deg,
    rgba(77, 255, 210, 0.15),
    rgba(43, 143, 255, 0.1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-m);
  color: var(--primary);
}

.drop-icon--audio {
  background: linear-gradient(
    135deg,
    rgba(91, 63, 232, 0.15),
    rgba(43, 143, 255, 0.1)
  );
  color: var(--grad-end);
}

.drop-icon svg {
  width: 36px;
  height: 36px;
}

.drop-zone h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--sp-xs);
}
.drop-zone p {
  font-size: 14px;
  color: var(--on-surface-sec);
  margin-bottom: var(--sp-m);
}

.drop-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: var(--sp-l);
}

.drop-formats span {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--surface-card);
  border: 1px solid var(--divider);
  border-radius: var(--r-full);
  color: var(--on-surface-sec);
}

.btn-select {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-s);
  background: var(--surface-card);
  border: 1px solid var(--divider);
  border-radius: var(--r-m);
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-select:hover {
  background: var(--grad-end);
  border-color: var(--grad-end);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONFIG SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.config-section {
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── STATS BAR ─────────────────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: var(--sp-m);
  margin-bottom: var(--sp-xl);
}

.stat-item {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-l);
  padding: var(--sp-m);
  text-align: center;
}

.stat-item.stat-highlight {
  border-color: var(--primary);
  background: rgba(43, 143, 255, 0.05);
}
.stat-item.stat-success {
  border-color: var(--success);
  background: rgba(0, 194, 168, 0.05);
}

.stat-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface-sec);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.stat-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--on-surface);
}
.stat-highlight .stat-value {
  color: var(--primary);
}
.stat-success .stat-value {
  color: var(--success);
}

/* ── CONFIG BLOCKS ─────────────────────────────────────────────────────── */
.config-block {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-xl);
  padding: var(--sp-l);
  margin-bottom: var(--sp-m);
}

.config-title {
  display: flex;
  align-items: center;
  gap: var(--sp-s);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--sp-m);
}

.config-title svg {
  width: 20px;
  height: 20px;
  color: var(--grad-end);
}

/* ── PROFILES GRID ─────────────────────────────────────────────────────── */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-s);
}

.profile-btn {
  background: var(--surface-card);
  border: 1px solid var(--divider);
  border-radius: var(--r-m);
  padding: var(--sp-m);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
}

.profile-btn:hover {
  border-color: var(--grad-end);
  transform: translateY(-2px);
}

.profile-btn.active {
  border-color: var(--grad-end);
  background: rgba(91, 63, 232, 0.08);
  box-shadow: 0 4px 12px rgba(91, 63, 232, 0.15);
}

.profile-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--on-surface);
  margin-bottom: 2px;
}
.profile-gain {
  display: block;
  font-size: 11px;
  color: var(--success);
  font-weight: 600;
}

/* ── CONFIG ROWS ───────────────────────────────────────────────────────── */
.config-row {
  margin-bottom: var(--sp-m);
}
.config-row:last-child {
  margin-bottom: 0;
}

.config-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface);
  margin-bottom: var(--sp-s);
}

.bitrate-value,
.gain-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--grad-end);
}

/* ── FORMAT SELECTOR (4 formats : MP3 / AAC / WAV / FLAC — pas d'Opus) ──── */
.format-selector {
  display: flex;
  gap: var(--sp-s);
  flex-wrap: wrap;
}

.format-btn {
  flex: 1;
  min-width: 70px;
  background: var(--surface-card);
  border: 1px solid var(--divider);
  border-radius: var(--r-m);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.format-btn:hover {
  border-color: var(--grad-end);
}
.format-btn.active {
  background: var(--grad-end);
  border-color: var(--grad-end);
  color: #fff;
}

/* ── BITRATE / FRÉQUENCE / CANAUX ──────────────────────────────────────── */
.bitrate-selector,
.freq-selector,
.channels-selector {
  display: flex;
  gap: var(--sp-xs);
  flex-wrap: wrap;
}

.br-btn,
.freq-btn,
.ch-btn {
  flex: 1;
  min-width: 55px;
  background: var(--surface-card);
  border: 1px solid var(--divider);
  border-radius: var(--r-s);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--on-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.br-btn:hover,
.freq-btn:hover,
.ch-btn:hover {
  border-color: var(--grad-end);
}
.br-btn.active,
.freq-btn.active,
.ch-btn.active {
  background: var(--grad-end);
  border-color: var(--grad-end);
  color: #fff;
}

/* ── SLIDER ────────────────────────────────────────────────────────────── */
.slider-container {
  position: relative;
}

.slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-card);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--grad-end);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(91, 63, 232, 0.3);
  transition: transform 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--grad-end);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(91, 63, 232, 0.3);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--sp-xs);
  font-size: 11px;
  color: var(--on-surface-sec);
}

/* ── CHECKBOXES ────────────────────────────────────────────────────────── */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-s);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--sp-s);
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface);
  cursor: pointer;
  padding: var(--sp-s);
  border-radius: var(--r-s);
  transition: background 0.2s ease;
}

.checkbox-label:hover {
  background: var(--surface-card);
}
.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--divider);
  border-radius: 4px;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: var(--grad-end);
  border-color: var(--grad-end);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── FILES LIST ────────────────────────────────────────────────────────── */
.files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-m);
}

.btn-clear {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--danger);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--r-s);
  transition: background 0.2s ease;
}

.btn-clear:hover {
  background: rgba(229, 57, 53, 0.1);
}

.files-list {
  display: grid;
  gap: var(--sp-s);
  max-height: 400px;
  overflow-y: auto;
  padding-right: var(--sp-xs);
}

.files-list::-webkit-scrollbar {
  width: 6px;
}
.files-list::-webkit-scrollbar-track {
  background: var(--surface-card);
  border-radius: 3px;
}
.files-list::-webkit-scrollbar-thumb {
  background: var(--divider);
  border-radius: 3px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: var(--sp-m);
  background: var(--surface-card);
  border: 1px solid var(--divider);
  border-radius: var(--r-m);
  padding: var(--sp-s);
  transition: all 0.2s ease;
}

.file-item:hover {
  border-color: var(--grad-end);
}

.file-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-s);
  background: linear-gradient(
    135deg,
    rgba(91, 63, 232, 0.15),
    rgba(43, 143, 255, 0.1)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grad-end);
  flex-shrink: 0;
}

.file-icon svg {
  width: 24px;
  height: 24px;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.file-meta {
  font-size: 11px;
  color: var(--on-surface-sec);
  display: flex;
  gap: var(--sp-s);
}

.file-actions {
  display: flex;
  gap: var(--sp-xs);
}

.file-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--r-s);
  background: var(--surface);
  border: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--on-surface-sec);
  transition: all 0.2s ease;
}

.file-btn:hover {
  background: var(--grad-end);
  border-color: var(--grad-end);
  color: #fff;
}
.file-btn.btn-play:hover {
  background: var(--success);
  border-color: var(--success);
}
.file-btn.btn-delete:hover {
  background: var(--danger);
  border-color: var(--danger);
}
.file-btn svg {
  width: 14px;
  height: 14px;
}

/* ── ACTION BUTTONS ────────────────────────────────────────────────────── */
.action-buttons {
  display: flex;
  gap: var(--sp-m);
  margin-top: var(--sp-l);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-s);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-m);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--grad-end);
  background: var(--surface-card);
}

.btn-primary-large {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-s);
  background: linear-gradient(
    135deg,
    var(--grad-start),
    var(--grad-mid),
    var(--grad-end)
  );
  border: none;
  border-radius: var(--r-m);
  padding: 14px 28px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(91, 63, 232, 0.25);
  transition: all 0.2s ease;
}

.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(91, 63, 232, 0.35);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-s);
  background: linear-gradient(
    135deg,
    var(--grad-start),
    var(--grad-mid),
    var(--grad-end)
  );
  color: #fff;
  border: none;
  border-radius: var(--r-m);
  padding: 12px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(43, 143, 255, 0.25);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(43, 143, 255, 0.35);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--divider);
  border-radius: var(--r-m);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--on-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--grad-end);
  background: var(--surface-card);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROGRESS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.progress-section {
  animation: fadeIn 0.4s ease;
}

.progress-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  text-align: center;
}

.progress-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: var(--sp-l);
}

.progress-bar-container {
  height: 8px;
  background: var(--surface-card);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--sp-m);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--grad-start),
    var(--grad-mid),
    var(--grad-end)
  );
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--on-surface-sec);
  margin-bottom: var(--sp-l);
}

.progress-waveform {
  background: var(--surface-card);
  border-radius: var(--r-m);
  padding: var(--sp-s);
  overflow: hidden;
}
.progress-waveform canvas {
  width: 100%;
  height: 80px;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESULTS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.results-section {
  animation: fadeIn 0.5s ease;
}

.results-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  text-align: center;
}

.results-success {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--sp-l);
}
.results-card h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: var(--sp-l);
}

.results-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--sp-m);
  margin-bottom: var(--sp-xl);
}

.result-stat {
  background: var(--surface-card);
  border: 1px solid var(--divider);
  border-radius: var(--r-m);
  padding: var(--sp-m);
}
.result-stat.result-highlight {
  border-color: var(--primary);
  background: rgba(43, 143, 255, 0.05);
}
.result-stat.result-success {
  border-color: var(--success);
  background: rgba(0, 194, 168, 0.05);
}

.result-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--on-surface-sec);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.result-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--on-surface);
}
.result-highlight .result-value {
  color: var(--primary);
}
.result-success .result-value {
  color: var(--success);
}

.results-actions {
  display: flex;
  gap: var(--sp-m);
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOAST D'ERREUR
   ═══════════════════════════════════════════════════════════════════════════ */
.zyver-toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--danger);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-m);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(229, 57, 53, 0.3);
  z-index: 10000;
  max-width: 400px;
  animation: toastIn 0.3s ease;
}

.zyver-toast.leaving {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes toastOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER — identique au hub, sans info de localisation
   ═══════════════════════════════════════════════════════════════════════════ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--divider);
  padding: var(--sp-xxl) var(--sp-l) var(--sp-l);
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--grad-mid), transparent);
  opacity: 0.5;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-m);
}
.footer-brand .logos {
  display: flex;
  align-items: center;
  gap: var(--sp-m);
}
.footer-brand .logos img {
  height: 38px;
  transition: transform 0.3s ease;
}
.footer-brand .logos img:hover {
  transform: translateY(-3px);
}
.footer-brand .logos .separator {
  width: 1px;
  height: 26px;
  background: var(--divider);
}
.footer-brand p {
  color: var(--on-surface-sec);
  font-size: 13px;
  max-width: 350px;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--on-surface);
  margin-bottom: var(--sp-m);
}

.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: var(--sp-s);
}

.footer-col ul a {
  color: var(--on-surface-sec);
  text-decoration: none;
  font-size: 13px;
  transition:
    color 0.2s ease,
    padding-left 0.2s ease;
  display: inline-block;
}

.footer-col ul a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: var(--sp-l);
  border-top: 1px solid var(--divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-m);
  font-size: 12px;
  color: var(--on-surface-sec);
}

.footer-bottom .rcbg {
  display: flex;
  align-items: center;
  gap: var(--sp-s);
}
.footer-bottom .rcbg img {
  height: 20px;
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BOUTON FLOTTANT DONATE (identique au hub)
   ═══════════════════════════════════════════════════════════════════════════ */
.donate-float {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: linear-gradient(
    135deg,
    var(--grad-start),
    var(--grad-mid),
    var(--grad-end)
  );
  color: #fff;
  padding: 12px 8px;
  border-radius: var(--r-m);
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(43, 143, 255, 0.3);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    padding 0.3s ease;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 1px;
}

.donate-float svg {
  width: 20px;
  height: 20px;
}

.donate-float:hover {
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 12px 32px rgba(43, 143, 255, 0.4);
  padding: 14px 10px;
}

.donate-text {
  font-size: 10px;
  opacity: 0.9;
}

@media (max-width: 1200px) {
  .donate-float {
    left: 12px;
    padding: 10px 6px;
  }
  .donate-text {
    display: none;
  }
  .donate-float svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 760px) {
  .donate-float {
    left: auto;
    right: 16px;
    top: auto;
    bottom: 100px;
    transform: none;
    writing-mode: horizontal-tb;
    padding: 10px 14px;
    border-radius: var(--r-full);
    flex-direction: row;
    gap: 6px;
  }
  .donate-float:hover {
    transform: none;
  }
  .donate-text {
    display: inline;
    font-size: 12px;
  }
  .donate-float svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 420px) {
  .donate-float {
    bottom: 90px;
    right: 12px;
    padding: 8px 12px;
  }
}

/* ── ANIMATIONS D'ENTRÉE FOOTER ────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — 100% mobile-first
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-l);
  }
  .footer-brand {
    grid-column: 1 / -1;
    text-align: center;
    align-items: center;
  }
  .footer-brand .logos {
    justify-content: center;
  }
  .footer-brand p {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: block;
  }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: var(--sp-m);
    border-bottom: 1px solid var(--divider);
    gap: var(--sp-xs);
  }

  .nav-links.open .nav-link {
    padding: var(--sp-s) var(--sp-m);
    border-radius: var(--r-m);
  }
  .nav-links.open .nav-link:hover {
    background: rgba(43, 143, 255, 0.08);
  }

  .compress-main {
    padding: var(--sp-m) var(--sp-m) var(--sp-xl);
  }
  .drop-zone {
    padding: var(--sp-xl) var(--sp-m);
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .profiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .format-selector {
    flex-wrap: wrap;
  }
  .format-btn {
    min-width: 45%;
  }

  .action-buttons {
    flex-direction: column;
  }
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .results-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .results-actions {
    flex-direction: column;
  }
  .results-actions button {
    width: 100%;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--sp-l);
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-col {
    margin: 0 auto;
    max-width: 300px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-m);
  }
  .footer-bottom .rcbg {
    justify-content: center;
  }
  .lang-menu {
    right: auto;
    left: 0;
  }
}

@media (max-width: 420px) {
  .nav-container {
    padding: var(--sp-s) var(--sp-m);
  }
  .nav-logo span {
    font-size: 16px;
  }
  .footer-col ul li a {
    font-size: 12px;
  }
  .footer-bottom {
    font-size: 11px;
    padding: var(--sp-m) var(--sp-s);
  }
  .footer-bottom .rcbg img {
    height: 18px;
  }
}
