/* =========================================================
   Manlih MusicBoard — Web Reader
   Palette / typography copied from the macOS DesignSystem files.
   ========================================================= */

:root {
  /* From BrandColors.swift */
  --c-bg:           #0B0B0D;
  --c-surface:      #15161A;
  --c-elevated:     #1E2026;
  --c-surfaceHi:    #252830;
  --c-border:       #2E3140;

  --c-text:         #F5F6F8;
  --c-text-sec:     #A8ADBA;
  --c-muted:        #6B7180;

  --c-green:        #00C896;
  --c-teal:         #00E6A7;
  --c-cyan:         #00D4E6;
  --c-violet:       #7B6EE6;
  --c-warning:      #FFB547;
  --c-danger:       #FF5C7A;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --shadow-pop: 0 24px 48px rgba(0,0,0,0.55), 0 2px 6px rgba(0,0,0,0.4);

  /* Premium gradient — green→teal→cyan→violet, from BrandGradients.swift */
  --grad-premium:   linear-gradient(135deg, #00C896 0%, #00E6A7 35%, #00D4E6 65%, #7B6EE6 100%);
  --grad-premium-h: linear-gradient(90deg,  #00C896 0%, #00D4E6 55%, #7B6EE6 100%);

  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --font-text:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-mono:    "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body {
  height: 100%;
  width: 100%;
  max-width: 100%;
  /* Empêche le zoom par double-tap et le pan horizontal accidentel → comportement
     d'app native. La barre du navigateur ne « tire » plus la page sur les côtés. */
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Pas de rebond élastique (overscroll) qui révèle l'arrière-plan du navigateur. */
  overscroll-behavior: none;
}
body {
  margin: 0;
  font-family: var(--font-text);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}
button { font: inherit; color: inherit; background: transparent; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; }
svg { width: 1em; height: 1em; }
.mono { font-family: var(--font-mono); }

/* =========================================================
   Brand background — three radial orbs, à la BrandBackground.swift
   ========================================================= */
.brand-bg::before, .brand-bg::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.brand-bg::before {
  background:
    radial-gradient(420px 420px at 18% 22%, rgba(0,200,150,0.18), transparent 60%),
    radial-gradient(480px 480px at 88% 78%, rgba(123,110,230,0.18), transparent 60%),
    radial-gradient(360px 360px at 50% 100%, rgba(0,212,230,0.10), transparent 60%);
}
.brand-bg::after {
  background: linear-gradient(180deg, transparent 0%, rgba(11,11,13,0.5) 80%, rgba(11,11,13,0.9) 100%);
}

/* =========================================================
   Brand logo (PNG asset — wide horizontal logo)
   ========================================================= */
.brand-logo-img {
  height: 28px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
  display: block;
}
.brand-logo-img.lg { height: 44px; max-width: 320px; }

.brand-landing { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 22px; }
.brand-loading { display: flex; justify-content: center; margin-bottom: 18px; }

/* =========================================================
   Landing
   ========================================================= */
.landing {
  position: relative;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 40px 20px;
  background: var(--c-bg);
}
.landing-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(420px 420px at 18% 22%, rgba(0,200,150,0.18), transparent 60%),
    radial-gradient(480px 480px at 88% 78%, rgba(123,110,230,0.18), transparent 60%);
}
.landing-card {
  position: relative; z-index: 1;
  width: min(560px, 100%);
  background: linear-gradient(180deg, rgba(30,32,38,0.85), rgba(21,22,26,0.92));
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 26px;
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(20px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.brand-sub {
  color: var(--c-text-sec);
  font-size: 12px;
  margin-top: 2px;
}
.brand-accent {
  background: var(--grad-premium-h);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.landing-card .brand { margin-bottom: 22px; }

.missing-banner {
  position: relative; z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  margin-top: 14px;
  border-radius: var(--r-md);
  background: rgba(255,180,71,0.08);
  border: 1px solid rgba(255,180,71,0.30);
  margin-left: 32px;
  margin-right: 32px;
}
.missing-icon {
  font-size: 22px;
  color: var(--c-warning);
  line-height: 1;
  flex-shrink: 0;
}
.missing-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-warning);
  margin-bottom: 3px;
}
.missing-sub {
  font-size: 12px;
  color: var(--c-text-sec);
  line-height: 1.5;
}

.resume-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: var(--r-md);
  background: rgba(0,200,150,0.07);
  border: 1px solid rgba(0,200,150,0.25);
}
.resume-info { flex: 1; min-width: 0; }
.resume-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c-green);
  margin-bottom: 3px;
}
.resume-file {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.resume-actions { display: inline-flex; gap: 8px; flex-shrink: 0; }
.resume-actions .primary-btn { padding: 8px 14px; font-size: 12px; }
.resume-actions .ghost-btn { padding: 8px 12px; }

/* ---- Server files ---- */
.server-files {
  margin-bottom: 18px;
}
.server-files-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-green);
  margin-bottom: 8px;
}
.server-files-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.server-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  text-align: left;
  transition: background 0.14s, border-color 0.14s;
  width: 100%;
}
.server-file-item:hover {
  background: rgba(0,200,150,0.07);
  border-color: rgba(0,200,150,0.3);
}
.server-file-item.loading {
  opacity: 0.55;
  cursor: wait;
}
/* Avatar circulaire */
.server-file-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a7a5e 0%, #0d4a38 100%);
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.server-file-avatar--loading .server-file-avatar-init {
  color: rgba(255,255,255,0.35);
  font-size: 16px;
}
.server-file-avatar-init {
  color: rgba(255,255,255,0.9);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.server-file-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Info texte */
.server-file-info { flex: 1; min-width: 0; }
.server-file-artist {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Date */
.server-file-date {
  font-size: 11px;
  color: var(--c-muted);
  flex-shrink: 0;
  white-space: nowrap;
  margin-right: 4px;
}
.server-file-arrow {
  width: 16px; height: 16px;
  color: var(--c-muted);
  flex-shrink: 0;
  transition: transform 0.14s, color 0.14s;
}
.server-file-item:hover .server-file-arrow {
  color: var(--c-green);
  transform: translateX(3px);
}

/* ---- End server files ---- */

.landing-drop {
  border: 1.5px dashed rgba(255,255,255,0.14);
  border-radius: var(--r-lg);
  padding: 36px 22px;
  text-align: center;
  background: rgba(255,255,255,0.02);
  transition: all 0.16s ease;
  cursor: pointer;
}
.landing-drop:hover, .landing-drop.is-drag {
  border-color: rgba(0,200,150,0.55);
  background: rgba(0,200,150,0.06);
}
.landing-drop-icon { font-size: 32px; color: var(--c-text-sec); margin-bottom: 10px; }
.landing-drop-title { font-size: 14px; font-weight: 500; color: var(--c-text); }
.landing-drop-title .mono { color: var(--c-green); font-weight: 600; }
.landing-drop-sub { color: var(--c-muted); font-size: 12px; margin: 4px 0 18px; }

.primary-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--grad-premium-h);
  color: #06140F;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(0,200,150,0.30);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(0,200,150,0.38); }
.primary-btn:active { transform: translateY(0); }
.primary-btn svg { font-size: 14px; }

.ghost-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-weight: 500;
  font-size: 12px;
  transition: all 0.15s ease;
}
.ghost-btn:hover { background: rgba(255,255,255,0.08); color: var(--c-text); }

.landing-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--c-border);
  font-size: 11px; color: var(--c-muted);
}
.landing-footer .mono { color: var(--c-text-sec); }

/* =========================================================
   Loading
   ========================================================= */
.loading {
  position: relative;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 40px 20px;
  background: var(--c-bg);
}
.loading-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(420px 420px at 50% 30%, rgba(0,200,150,0.14), transparent 60%),
    radial-gradient(480px 480px at 50% 100%, rgba(123,110,230,0.14), transparent 60%);
}
.loading-card {
  position: relative; z-index: 1;
  width: min(480px, 100%);
  background: linear-gradient(180deg, rgba(30,32,38,0.92), rgba(21,22,26,0.96));
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-pop);
}
.loading-card .brand { justify-content: center; margin-bottom: 18px; }
.spinner {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  position: relative;
}
.spinner > div {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2.5px solid transparent;
  border-top-color: var(--c-green);
  animation: spin 1.1s linear infinite;
}
.spinner > div:nth-child(2) { border-top-color: var(--c-cyan); animation-duration: 1.7s; animation-direction: reverse; inset: 5px; border-width: 2px; }
.spinner > div:nth-child(3) { border-top-color: var(--c-violet); animation-duration: 2.3s; inset: 12px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-size: 15px; font-weight: 600;
  margin-bottom: 18px;
}
.loading-sub {
  font-size: 13px;
  color: var(--c-text-sec);
  margin-top: 12px;
}
.loading-sub strong { color: var(--c-text); font-weight: 700; }
.loading-meta { font-size: 11px; color: var(--c-muted); margin-top: 6px; font-family: var(--font-mono); }

.progress {
  width: 100%; height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.progress-bar {
  width: 0%; height: 100%;
  background: var(--grad-premium-h);
  border-radius: 999px;
  transition: width 0.18s ease;
}

/* =========================================================
   Shell (Projects view)
   ========================================================= */
.shell { position: relative; min-height: 100vh; background: var(--c-bg); }
.shell-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(700px 500px at 18% 8%, rgba(0,200,150,0.08), transparent 60%),
    radial-gradient(800px 600px at 92% 90%, rgba(123,110,230,0.08), transparent 60%);
}
.shell-main {
  position: relative; z-index: 1;
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 32px 140px;
}

.shell-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px;
  background: rgba(11,11,13,0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--c-border);
}
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.topbar-brand .brand-title { font-size: 14px; font-weight: 600; }
.topbar-divider { width: 1px; height: 22px; background: var(--c-border); flex-shrink: 0; }

.topbar-page-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.page-photo {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c-elevated);
  display: grid; place-items: center;
  overflow: hidden;
  color: var(--c-text-sec);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--c-border);
  flex-shrink: 0;
}
.page-photo img { width: 100%; height: 100%; object-fit: cover; }
.page-name { font-weight: 600; font-size: 13px; line-height: 1.1; }
.page-meta { font-size: 11px; color: var(--c-muted); margin-top: 2px; }

.topbar-spacer { flex: 1; }
.readonly-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0,212,230,0.12);
  color: var(--c-cyan);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(0,212,230,0.30);
  white-space: nowrap;
}
.readonly-pill svg { font-size: 10px; }

/* =========================================================
   Page header — title "Projets" + full-width search bar below
   ========================================================= */
.page-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}
.page-header-title { min-width: 0; }

/* Big, prominent search field (Spotify-like), full row width. */
.search-field-lg {
  display: flex; align-items: center; gap: 10px;
  height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  width: 100%;
  transition: all 0.16s ease;
}
.search-field-lg:focus-within {
  background: rgba(255,255,255,0.07);
  border-color: rgba(0,200,150,0.40);
  box-shadow: 0 0 0 4px rgba(0,200,150,0.10);
}
.search-field-lg svg { color: var(--c-muted); font-size: 16px; flex-shrink: 0; }
.search-field-lg input {
  background: transparent;
  border: 0; outline: 0;
  color: var(--c-text);
  font-size: 14px;
  flex: 1;
  min-width: 0;
}
.search-field-lg input::placeholder { color: var(--c-muted); }
.search-clear {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--c-text-sec);
  display: grid; place-items: center;
  font-size: 10px;
  flex-shrink: 0;
}
.search-clear:hover { background: rgba(255,255,255,0.14); color: var(--c-text); }

.page-title {
  /* Font.brand.displayMedium = 34pt bold */
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.05;
  background: var(--grad-premium-h);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.page-subtitle {
  font-size: 13px;
  color: var(--c-text-sec);
  margin-top: 3px;
}
.page-header-spacer { flex: 1; }

/* =========================================================
   Toolbar : type filter buttons on the left, dropdowns right-aligned.
   Always on a single line — horizontal scroll if it overflows.
   ========================================================= */
.toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  min-width: 0;
}
.type-selector {
  display: flex; gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 2px 6px;
  flex: 1 1 auto;
  min-width: 0;
}
.type-selector::-webkit-scrollbar { display: none; }
.type-selector > button { flex: 0 0 auto; }

.toolbar-dropdowns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Dropdown chip : same look as filter chips but with a chevron. */
.chip.chip-dropdown {
  height: 36px;
  padding: 0 12px;
  font-weight: 600;
  font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.05);
}
.chip.chip-dropdown:hover { background: rgba(255,255,255,0.08); color: var(--c-text); }
.chip.chip-dropdown.is-active {
  background: var(--c-active, var(--c-green));
  border-color: var(--c-active, var(--c-green));
  color: rgba(0,0,0,0.85);
}
.chip-chev {
  display: inline-flex; align-items: center;
  font-size: 11px;
  opacity: 0.65;
}
.menu-item-icon { display: inline-flex; align-items: center; font-size: 13px; }
.type-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-weight: 500;
  font-size: 13px;
  transition: all 0.16s ease;
  white-space: nowrap;
}
.type-btn:hover { background: rgba(255,255,255,0.07); color: var(--c-text); }
.type-btn.is-active {
  color: rgba(0,0,0,0.9);
  background: linear-gradient(135deg, var(--c-active, var(--c-green)), color-mix(in srgb, var(--c-active, var(--c-green)) 65%, black));
  border-color: var(--c-active, var(--c-green));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--c-active, var(--c-green)) 35%, transparent);
  font-weight: 600;
}
.type-btn svg { font-size: 13px; }

/* "Tous" type button : icon only, square shape. */
.type-btn-all {
  padding: 0;
  width: 40px;
  justify-content: center;
}
.type-btn-all svg { font-size: 16px; }

/* Small counter badge shown inside filter buttons and dropdown items. */
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px;
  padding: 0 6px;
  height: 16px;
  margin-left: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: var(--c-text-sec);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}
.type-btn.is-active .count-badge,
.chip.is-active .count-badge,
.chip.chip-dropdown.is-active .count-badge {
  background: rgba(0,0,0,0.22);
  color: rgba(0,0,0,0.75);
}
.menu-item .count-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.07);
  color: var(--c-muted);
}
.menu-item .menu-check + .count-badge { margin-left: 4px; }

/* New-project button in header (visible only in Édition mode). */
.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}
.new-project-btn { padding: 10px 16px; font-size: 13px; flex-shrink: 0; }
.new-project-btn svg { font-size: 15px; }

/* =========================================================
   Filter bar : status chips on the left, year+sort on the right
   ========================================================= */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  margin-bottom: 24px;
}
.filter-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
  padding: 2px 2px 4px;
}
.filter-group::-webkit-scrollbar { display: none; }
.filter-group > button { flex: 0 0 auto; }
.filter-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.chip.chip-icon {
  background: rgba(255,255,255,0.04);
}
.filter-label {
  font-size: 10.5px; font-weight: 600;
  color: var(--c-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 2px;
}
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-size: 11.5px;
  font-weight: 500;
  transition: all 0.14s ease;
  white-space: nowrap;
}
.chip:hover { background: rgba(255,255,255,0.07); color: var(--c-text); }
.chip.is-active {
  background: var(--c-active, var(--c-green));
  border-color: var(--c-active, var(--c-green));
  color: rgba(0,0,0,0.85);
  font-weight: 600;
}
.chip svg { font-size: 11px; }

.search-field {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  flex: 1;
  min-width: 180px;
  max-width: 300px;
  margin-left: auto;
}
.search-field svg { color: var(--c-muted); font-size: 13px; }
.search-field input {
  background: transparent;
  border: 0; outline: 0;
  color: var(--c-text);
  font-size: 13px;
  width: 100%;
}
.search-field input::placeholder { color: var(--c-muted); }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  display: inline-grid; place-items: center;
  transition: all 0.14s ease;
  font-size: 13px;
}
.icon-btn:hover { background: rgba(255,255,255,0.07); color: var(--c-text); }

/* =========================================================
   Grid / List of projects
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.projects-list { display: flex; flex-direction: column; gap: 8px; }

/* === Project Card (grid) — mirrors ProjectCard.swift === */
.card {
  position: relative;
  background: rgba(30,32,38,0.55);
  border: 1px solid var(--c-border);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  padding: 12px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: scale(1.02);
  background: rgba(30,32,38,0.85);
  border-color: #3A3E50;
  box-shadow: 0 18px 38px rgba(0,0,0,0.5);
}
.card-cover {
  aspect-ratio: 1 / 1;
  position: relative;
  display: grid; place-items: center;
  overflow: hidden;
  border-radius: 14px;
  /* subtle inner stroke per CoverView */
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Optional centered SF Symbol-style icon — 38% size, 22% opacity per CoverView. */
.cover-icon {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 38%;
  color: rgba(255,255,255,0.22);
}
.cover-icon svg { width: 38%; height: 38%; }

/* (status badge removed from the cover — it's already shown below the card) */

/* Type chip — bottom-left of cover, black translucent capsule (like macOS) */
.cover-type-chip {
  position: absolute;
  left: 10px; bottom: 10px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cover-type-chip svg { font-size: 10px; }

.card-cover-play {
  /* legacy positioning if used standalone */
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-green);
  color: rgba(0,0,0,0.85);
  display: grid; place-items: center;
  font-size: 12px;
  box-shadow: 0 7px 16px rgba(0,200,150,0.5);
  border: 1px solid rgba(255,255,255,0.25);
}
.card-cover-play:hover { transform: scale(1.08); }

.card-body {
  display: flex; flex-direction: column; gap: 6px;
}
.card-name-row {
  display: flex; align-items: center; gap: 7px;
}
/* Small thumb mark shown when the project is rated favori or pas ouf. */
.card-rating-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  flex-shrink: 0;
}
.card-rating-mark.up   { color: var(--c-green); }
.card-rating-mark.down { color: var(--c-danger); }
.card-rating-mark svg { width: 14px; height: 14px; }
.list-row-title .card-rating-mark { width: 14px; height: 14px; }
.card-title {
  /* Font.brand.headline = 16pt semibold */
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-width: 0;
}
.card-music-row {
  display: flex; align-items: center; gap: 10px;
  color: var(--c-muted);
  font-size: 11px;
}
.micro-item {
  display: inline-flex; align-items: center; gap: 3px;
  font-weight: 500;
}
.micro-item svg { font-size: 9px; }
.card-foot-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px;
  color: var(--c-muted);
}
.card-genre { color: var(--c-muted); }
.card-plays {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--c-green);
  font-weight: 500;
}
.card-plays svg { font-size: 9px; }
.card-release { margin-left: auto; color: var(--c-muted); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge.soft {
  background: rgba(255,255,255,0.06);
  color: var(--c-text-sec);
}
.badge.type {
  color: rgba(0,0,0,0.85);
  background: linear-gradient(135deg, var(--c-active, var(--c-green)), color-mix(in srgb, var(--c-active, var(--c-green)) 65%, black));
}
.badge.status {
  color: #fff;
  background: var(--c-status, var(--c-violet));
}
.badge svg { font-size: 9px; }

/* === Project list row === */
.list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px;
  background: rgba(30,32,38,0.55);
  border: 1px solid var(--c-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.14s ease;
}
.list-row:hover { background: rgba(30,32,38,0.95); border-color: #3A3E50; }
.list-cover {
  width: 52px; height: 52px;
  border-radius: 10px;
  overflow: hidden;
  display: grid; place-items: center;
  flex-shrink: 0;
  position: relative;
}
.list-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.list-cover .card-cover-fallback { font-size: 14px; padding: 6px; }
.list-info { flex: 1; min-width: 0; }
.list-row-title {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.list-row-title .name {
  font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.list-row-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--c-muted);
  margin-top: 3px;
}
.list-row-meta .meta-item { display: inline-flex; align-items: center; gap: 3px; }
.list-trailing { display: flex; align-items: center; gap: 8px; }
.list-play {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--c-green);
  color: rgba(0,0,0,0.85);
  display: grid; place-items: center;
  font-size: 10px;
  box-shadow: 0 6px 16px rgba(0,200,150,0.4);
}
.list-play:hover { transform: scale(1.06); }
.year-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0,212,230,0.14);
  border: 1px solid rgba(0,212,230,0.35);
  color: var(--c-cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--c-muted);
}
.empty-state svg { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }
.empty-state-title { font-size: 15px; font-weight: 600; color: var(--c-text); margin-bottom: 4px; }
.empty-state-msg { font-size: 12.5px; }

/* Floating layout toggle */
.layout-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(16px);
  border: 1px solid #3A3E50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.layout-toggle button {
  width: 34px; height: 30px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  transition: all 0.14s ease;
}
.layout-toggle button:hover { color: var(--c-text); }
.layout-toggle button.is-active {
  background: rgba(255,255,255,0.14);
  color: var(--c-text);
}

.app-actions {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 40;
  display: inline-flex;
  gap: 8px;
}
.app-actions .ghost-btn { background: rgba(0,0,0,0.55); backdrop-filter: blur(16px); }

/* =========================================================
   Sort / Year menu
   ========================================================= */
.menu-wrap { position: relative; }
.menu-pop {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  min-width: 220px;
  padding: 6px;
  border-radius: 12px;
  background: var(--c-surface);
  border: 1px solid #3A3E50;
  box-shadow: 0 18px 38px rgba(0,0,0,0.55);
}
.menu-pop .menu-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--c-text-sec);
  font-size: 12.5px;
  text-align: left;
}
.menu-pop .menu-item:hover { background: rgba(255,255,255,0.06); color: var(--c-text); }
.menu-pop .menu-check { margin-left: auto; color: var(--c-green); }
.menu-pop hr { border: 0; border-top: 1px solid var(--c-border); margin: 6px 4px; }
.menu-pop .menu-section {
  padding: 6px 10px 4px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* =========================================================
   Project detail modal — read-only "aperçu"
   ========================================================= */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn 0.18s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

.modal {
  position: relative;
  width: min(820px, 100%);
  max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(21,22,26,0.96), rgba(11,11,13,0.98));
  border: 1px solid #3A3E50;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.7);
  animation: scaleIn 0.20s cubic-bezier(0.2,0.8,0.2,1) both;
}
.modal-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
  background: rgba(21,22,26,0.6);
}
.modal-topbar .back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--c-text-sec);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 8px;
}
.modal-topbar .back:hover { background: rgba(255,255,255,0.05); color: var(--c-text); }
.modal-topbar .title {
  font-weight: 600; font-size: 13.5px;
  flex: 1; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.modal-topbar .close {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--c-text-sec);
}
.modal-topbar .close:hover { background: rgba(255,255,255,0.06); color: var(--c-text); }

/* Modifier / Terminer toggle inside the project pop-up topbar. */
.modify-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.14s ease;
}
.modify-btn:hover { background: rgba(255,255,255,0.08); color: var(--c-text); }
.modify-btn svg { font-size: 13px; }
.modify-btn.is-done {
  background: var(--grad-premium-h);
  color: rgba(0,0,0,0.85);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(0,200,150,0.30);
}
.modify-btn.is-done svg { color: rgba(0,0,0,0.85); }

.modal-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 36px;
}

.detail-header {
  display: flex; gap: 22px;
  margin-bottom: 22px;
}
.detail-cover {
  width: 180px; height: 180px;
  flex-shrink: 0;
  border-radius: 16px;
  overflow: hidden;
  display: grid; place-items: center;
  box-shadow: 0 16px 38px rgba(0,0,0,0.5);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-cover .card-cover-fallback { font-size: 26px; padding: 14px; }
.detail-info { flex: 1; min-width: 0; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.detail-music-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.detail-music-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--c-text-sec);
}
.detail-name {
  /* SwiftUI used .system(size: 30, weight: .heavy) — match exactly */
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.detail-desc {
  font-size: 13px;
  color: var(--c-text-sec);
  line-height: 1.5;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.detail-meta-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--c-muted); }
.detail-meta-row .meta-item { display: inline-flex; align-items: center; gap: 5px; }
.detail-actions-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.detail-actions-row .clip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(0,212,230,0.10);
  color: var(--c-cyan);
  border: 1px solid rgba(0,212,230,0.30);
  font-size: 12px; font-weight: 600;
}
.detail-actions-row .clip-btn:hover { background: rgba(0,212,230,0.18); }
.detail-actions-row .play-all-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--grad-premium-h);
  color: rgba(0,0,0,0.85);
  font-size: 12.5px; font-weight: 700;
  box-shadow: 0 8px 18px rgba(0,200,150,0.30);
}
.detail-actions-row .play-all-btn:hover { transform: translateY(-1px); }

/* Main tracks list (header) */
.main-tracks {
  display: flex; flex-direction: column; gap: 8px;
  max-width: 460px;
  margin-top: 18px;
}
.track-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(30,32,38,0.55);
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: all 0.14s ease;
}
.track-row:hover { background: rgba(30,32,38,0.95); border-color: #3A3E50; }
.track-row.is-current {
  background: rgba(0,200,150,0.08);
  border-color: rgba(0,200,150,0.30);
}
.track-num {
  width: 18px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-muted);
}
.track-row.is-current .track-num { color: var(--c-green); }
.track-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  display: grid; place-items: center;
  color: var(--c-muted);
  font-size: 13px;
  flex-shrink: 0;
}
.track-row.is-current .track-icon { background: rgba(0,200,150,0.16); color: var(--c-green); }
.track-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-dur { font-family: var(--font-mono); font-size: 10.5px; color: var(--c-muted); margin-top: 2px; }

/* Tab switcher */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--c-muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.14s ease;
}
.tab:hover { color: var(--c-text-sec); }
.tab.is-active {
  background: var(--c-elevated);
  color: var(--c-text);
  border: 1px solid rgba(0,200,150,0.30);
}
.tab svg { font-size: 11px; }

.tab-content { padding-top: 18px; border-top: 1px solid var(--c-border); }

/* Files tab */
.files-header { margin-bottom: 14px; }
.files-title { font-size: 16px; font-weight: 600; }
.files-sub { font-size: 12px; color: var(--c-muted); margin-top: 2px; }

.file-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30,32,38,0.45);
  border: 1px solid var(--c-border);
  margin-bottom: 6px;
  transition: all 0.14s ease;
}
.file-row:hover { background: rgba(30,32,38,0.85); }
.file-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.file-icon.audio { background: rgba(0,200,150,0.12); color: var(--c-green); }
.file-icon.master { background: rgba(255,180,71,0.14); color: var(--c-warning); }
.file-icon.visual { background: rgba(123,110,230,0.12); color: var(--c-violet); }
.file-icon.daw { background: rgba(0,212,230,0.12); color: var(--c-cyan); }
.file-icon.document { background: rgba(255,255,255,0.06); color: var(--c-text-sec); }
.file-name { font-weight: 500; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 11px; color: var(--c-muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.file-meta .meta-item { display: inline-flex; align-items: center; gap: 3px; }
.file-tags { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.file-tag {
  padding: 1px 6px; border-radius: 999px;
  font-size: 9px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(255,255,255,0.06); color: var(--c-text-sec);
}
.file-tag.master { background: rgba(0,200,150,0.16); color: var(--c-green); }
.file-tag.final  { background: rgba(0,212,230,0.16); color: var(--c-cyan); }
.file-tag.topline { background: rgba(255,180,71,0.16); color: var(--c-warning); }
.file-tag.clipVideo { background: rgba(123,110,230,0.16); color: var(--c-violet); }

.file-actions { margin-left: auto; display: inline-flex; gap: 4px; flex-shrink: 0; }
.file-actions .icon-btn { width: 30px; height: 30px; }

/* Distribution / Credits / Lyrics */
.kv-grid {
  display: grid; grid-template-columns: 160px 1fr;
  gap: 8px 18px;
  font-size: 13px;
}
.kv-grid .k { color: var(--c-muted); font-weight: 500; font-size: 12px; }
.kv-grid .v { color: var(--c-text); word-break: break-word; }
.kv-grid .v.empty { color: var(--c-muted); font-style: italic; }

.platform-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.platform-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(30,32,38,0.55);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.14s ease;
}
.platform-link:hover { background: rgba(30,32,38,0.95); border-color: #3A3E50; }
.platform-link .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.credits-list { display: flex; flex-direction: column; gap: 6px; }
.credit-row {
  display: grid; grid-template-columns: 160px 1fr;
  gap: 14px; align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(30,32,38,0.45);
  border: 1px solid var(--c-border);
  font-size: 13px;
}
.credit-row .role { color: var(--c-muted); font-weight: 600; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.credit-row .name { color: var(--c-text); font-weight: 500; }

.lyrics-block {
  white-space: pre-wrap;
  font-family: var(--font-text);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--c-text);
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(30,32,38,0.45);
  border: 1px solid var(--c-border);
}
.empty-mini {
  padding: 36px 20px;
  text-align: center;
  color: var(--c-muted);
  font-size: 12.5px;
}
.empty-mini svg { font-size: 28px; opacity: 0.45; margin-bottom: 10px; }
.empty-mini > div:nth-child(2) { font-weight: 600; color: var(--c-text-sec); font-size: 13.5px; margin-bottom: 2px; }

/* =========================================================
   New-project wizard (modal de création en 7 étapes)
   ========================================================= */
.wizard-backdrop {
  position: fixed; inset: 0;
  z-index: 150;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}
.wizard {
  position: relative;
  width: min(860px, 100%);
  height: min(720px, calc(100vh - 40px));
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(21,22,26,0.98), rgba(11,11,13,1));
  border: 1px solid #3A3E50;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.7);
  animation: scaleIn 0.22s cubic-bezier(0.2,0.8,0.2,1);
}

/* Header */
.wizard-header {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--c-border);
  background: rgba(21,22,26,0.55);
}
.wizard-header-left { flex: 1; min-width: 0; }
.wizard-step-mono { font-family: var(--font-mono); font-size: 12px; color: var(--c-muted); margin-bottom: 4px; }
.wizard-step-mono .wizard-step-cur { color: var(--c-green); font-weight: 900; }
.wizard-step-title { font-size: 18px; font-weight: 700; color: var(--c-text); }
.wizard-step-sub { font-size: 12px; color: var(--c-muted); margin-top: 2px; }
.wizard-progress { display: inline-flex; align-items: center; gap: 6px; align-self: center; flex-shrink: 0; }
.wizard-dot {
  display: inline-block;
  width: 8px; height: 6px;
  background: var(--c-elevated);
  border-radius: 999px;
  transition: all 0.25s cubic-bezier(0.2,0.8,0.2,1);
}
.wizard-dot.is-done { background: var(--c-green); }
.wizard-dot.is-current { width: 28px; background: var(--c-green); }
.wizard-close {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--c-text-sec);
  flex-shrink: 0;
}
.wizard-close:hover { background: rgba(255,255,255,0.06); color: var(--c-text); }

/* Body */
.wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 26px 30px;
}

/* Footer */
.wizard-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-top: 1px solid var(--c-border);
  background: rgba(21,22,26,0.55);
}
.wizard-foot-status { text-align: center; }
.wizard-required {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--c-warning);
  font-size: 12px;
  font-weight: 600;
}
.wizard-required svg { font-size: 13px; }
.wizard-footer .primary-btn[disabled] { opacity: 0.4; pointer-events: none; }
.wizard-create-btn { padding: 12px 22px; font-size: 14px; }

/* Section helpers */
.wizard-section { margin: 6px 0; }
.wizard-section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--c-muted);
  margin-bottom: 10px;
  text-align: center;
}
.wizard-sep { border: 0; border-top: 1px solid var(--c-border); margin: 22px 0; }

/* -- Step 1 : Type grid */
.wizard-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.wizard-type-card {
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left;
  padding: 14px;
  border-radius: 14px;
  background: rgba(30,32,38,0.55);
  border: 1px solid var(--c-border);
  transition: all 0.18s ease;
}
.wizard-type-card.is-selected {
  background: color-mix(in srgb, var(--c-active) 8%, transparent);
  border-color: color-mix(in srgb, var(--c-active) 60%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--c-active) 40%, transparent);
}
.wizard-type-head { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 10px; }
.wizard-type-ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c-active) 12%, transparent);
  color: var(--c-active);
  font-size: 20px;
}
.wizard-type-card.is-selected .wizard-type-ico { background: color-mix(in srgb, var(--c-active) 22%, transparent); }
.wizard-type-check { color: var(--c-active); font-size: 18px; }
.wizard-type-name { font-size: 14px; font-weight: 600; color: var(--c-text); margin-bottom: 4px; }
.wizard-type-summary { font-size: 11px; color: var(--c-muted); line-height: 1.4; margin-bottom: 8px; }
.wizard-type-hint { font-size: 11px; font-weight: 600; color: color-mix(in srgb, var(--c-active) 85%, transparent); line-height: 1.35; }

/* -- Step 2 : Name */
.wizard-name-step { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.wizard-name-field { width: min(560px, 100%); }
.wizard-name-input {
  width: 100%;
  padding: 16px 18px;
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--c-text);
  background: rgba(30,32,38,0.6);
  border: 1.5px solid var(--c-border);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.14s ease;
}
.wizard-name-input:focus { border-color: rgba(0,200,150,0.55); background: rgba(30,32,38,0.8); }
.wizard-required-msg {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px;
  color: var(--c-warning);
  font-size: 11.5px;
}

/* -- Cover preview (steps 2, 3, 6) */
.wizard-cover-preview {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0,0,0,0.45);
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.08);
}
.wizard-cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wizard-cover-icon {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.22);
}
.wizard-cover-icon svg { width: 1em; height: 1em; }
.wizard-cover-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 11px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 100%);
}
.wizard-cover-name-text {
  font-family: var(--font-display);
  font-weight: 900;
  color: #fff;
  font-size: 16px;
  line-height: 1.1;
}
.wizard-cover-name-sub {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 3px;
  color: rgba(255,255,255,0.85);
  font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
}

/* -- Step 3 : Cover */
.wizard-cover-step { display: flex; flex-direction: column; gap: 22px; align-items: center; }
.wizard-cover-preview-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wizard-cover-actions { display: inline-flex; gap: 10px; }
.wizard-cover-actions .ghost-btn svg { font-size: 14px; }

.wizard-gradient-row {
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.wizard-gradient {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; color: var(--c-muted);
}
.wizard-gradient.is-selected { color: var(--c-text); }
.wizard-gradient-circle {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-size: 14px;
  border: 2.5px solid transparent;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transition: all 0.18s ease;
}
.wizard-gradient.is-selected .wizard-gradient-circle {
  border-color: rgba(255,255,255,0.9);
  box-shadow: 0 8px 20px rgba(0,0,0,0.45);
}

.wizard-noicon {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  width: min(560px, 100%);
  margin: 0 auto 14px;
  border-radius: 10px;
  background: rgba(30,32,38,0.45);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-size: 11px; font-weight: 600;
}
.wizard-noicon.is-selected {
  background: rgba(0,200,150,0.08);
  border-color: rgba(0,200,150,0.40);
  color: var(--c-green);
}
.wizard-noicon-box {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  display: grid; place-items: center;
  color: var(--c-text-sec);
  font-size: 16px;
}
.wizard-noicon .menu-check { margin-left: auto; color: var(--c-green); }

.wizard-icons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
}
.wizard-icon-tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 4px;
  border-radius: 10px;
  background: transparent;
  color: var(--c-text-sec);
  font-size: 11px;
}
.wizard-icon-tile:hover { background: rgba(255,255,255,0.04); }
.wizard-icon-box {
  width: 50px; height: 50px;
  border-radius: 10px;
  background: rgba(30,32,38,0.5);
  display: grid; place-items: center;
  font-size: 20px;
  color: var(--c-text-sec);
  transition: all 0.18s ease;
}
.wizard-icon-tile.is-selected { color: var(--c-green); }
.wizard-icon-tile.is-selected .wizard-icon-box {
  background: rgba(0,200,150,0.18);
  color: var(--c-green);
}
.wizard-icon-check {
  position: absolute; top: 2px; right: 6px;
  color: var(--c-green);
  font-size: 12px;
}
.wizard-icon-label { line-height: 1; }

/* -- Step 4 : Genres */
.wizard-genre-step { display: flex; flex-direction: column; gap: 18px; }
.wizard-genre-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14px; font-weight: 600;
}
.wizard-genre-head .is-full { color: var(--c-green); }
.wizard-genre-head .link-btn {
  background: transparent; color: var(--c-muted); font-size: 11.5px;
}
.wizard-genre-head .link-btn:hover { color: var(--c-text); }
.wizard-genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.wizard-genre-chip {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(30,32,38,0.55);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-size: 12px; font-weight: 500;
  text-align: center;
  transition: all 0.14s ease;
}
.wizard-genre-chip:hover:not(.is-selected):not(.is-disabled) { background: rgba(255,255,255,0.08); color: var(--c-text); }
.wizard-genre-chip.is-selected {
  background: var(--c-green);
  color: rgba(0,0,0,0.85);
  font-weight: 700;
  border-color: var(--c-green);
}
.wizard-genre-chip.is-disabled { opacity: 0.35; cursor: not-allowed; }

/* -- Step 5 : Status */
.wizard-status-list { display: flex; flex-direction: column; gap: 10px; }
.wizard-status-card,
.wizard-exploitable {
  display: flex; align-items: center; gap: 16px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(30,32,38,0.45);
  border: 1px solid var(--c-border);
  text-align: left;
  transition: all 0.18s ease;
}
.wizard-status-card.is-selected {
  --c-fg: var(--c-active);
  background: color-mix(in srgb, var(--c-active) 7%, transparent);
  border-color: color-mix(in srgb, var(--c-active) 60%, transparent);
}
.wizard-exploitable {
  --c-active: var(--c-violet);
}
.wizard-exploitable.is-on {
  background: rgba(123,110,230,0.08);
  border-color: rgba(123,110,230,0.50);
}
.wizard-status-ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c-active) 12%, transparent);
  color: var(--c-active);
  font-size: 18px;
  flex-shrink: 0;
}
.wizard-status-card.is-selected .wizard-status-ico,
.wizard-exploitable.is-on .wizard-status-ico {
  background: color-mix(in srgb, var(--c-active) 22%, transparent);
}
.wizard-status-body { flex: 1; min-width: 0; }
.wizard-status-name { display: block; font-size: 14px; font-weight: 600; color: var(--c-text); }
.wizard-status-summary {
  display: block; font-size: 11.5px; color: var(--c-muted); margin-top: 3px;
  line-height: 1.4;
}
.wizard-status-check {
  color: var(--c-active);
  font-size: 20px;
  flex-shrink: 0;
}

/* -- Step 6 : Dates */
.wizard-dates-step { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.wizard-big-date {
  width: min(560px, 100%);
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(30,32,38,0.55);
  border: 1px solid var(--c-border);
}
.wizard-big-date-icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.wizard-big-date-meta { flex: 1; min-width: 0; }
.wizard-big-date-label { font-size: 14px; font-weight: 600; color: var(--c-text); }
.wizard-big-date-note { font-size: 11.5px; color: var(--c-muted); margin-top: 3px; line-height: 1.4; }
.wizard-big-date-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  border-radius: 9px;
  padding: 7px 10px;
  color: var(--c-text);
  font-size: 13px;
  outline: none;
  font-family: var(--font-text);
}
.wizard-big-date-input:focus { border-color: rgba(0,200,150,0.45); }

.wizard-warn-banner {
  width: min(560px, 100%);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(255,180,71,0.10);
  color: var(--c-warning);
  font-size: 11.5px;
  font-weight: 500;
}

.wizard-music-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: min(560px, 100%);
}
.wizard-music-cell {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(30,32,38,0.55);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-size: 12px; font-weight: 500;
}
.wizard-music-cell > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.wizard-music-cell svg { font-size: 13px; }
.wizard-bpm {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 4px;
}
.wizard-bpm button {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--c-elevated);
  color: var(--c-text);
  font-weight: 700;
}
.wizard-bpm-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-text);
  min-width: 32px; text-align: center;
}
.wizard-key-input {
  margin-left: auto;
  width: 90px;
  background: transparent;
  border: 0; outline: none;
  color: var(--c-text);
  font-size: 12px;
  text-align: right;
}

/* -- Step 7 : Files (placeholder) */
.wizard-files-step { display: flex; flex-direction: column; gap: 16px; }
.wizard-industry-card {
  display: flex;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c-active) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--c-active) 20%, transparent);
  overflow: hidden;
}
.wizard-industry-strip { width: 3px; background: var(--c-active); }
.wizard-industry-body { padding: 14px 16px; flex: 1; }
.wizard-industry-head {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--c-active);
  font-size: 14px; font-weight: 600;
  margin-bottom: 6px;
}
.wizard-industry-summary { font-size: 12px; color: var(--c-muted); margin-bottom: 4px; }
.wizard-industry-hint { font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, var(--c-active) 85%, transparent); }

.wizard-info-banner {
  display: flex; gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(0,212,230,0.06);
  border: 1px solid rgba(0,212,230,0.22);
  color: var(--c-text-sec);
  font-size: 12.5px;
  line-height: 1.5;
}
.wizard-info-banner svg { font-size: 18px; color: var(--c-cyan); flex-shrink: 0; margin-top: 1px; }
.wizard-info-banner strong { color: var(--c-text); font-weight: 700; }

/* -- Confirm dialog (past release date) */
.wizard-confirm {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55);
  display: grid; place-items: center;
  z-index: 10;
  border-radius: inherit;
}
.wizard-confirm-card {
  width: min(440px, 100%);
  background: var(--c-surface);
  border-radius: 20px;
  padding: 28px 28px 24px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0,0,0,0.55);
}
.wizard-confirm-icon {
  width: 68px; height: 68px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,180,71,0.14);
  color: var(--c-warning);
  font-size: 28px;
}
.wizard-confirm-title { font-size: 16px; font-weight: 700; color: var(--c-text); margin-bottom: 8px; }
.wizard-confirm-msg { font-size: 13px; color: var(--c-text-sec); line-height: 1.55; margin-bottom: 24px; }
.wizard-confirm-msg strong { color: var(--c-text); }
.wizard-confirm-actions { display: flex; justify-content: space-between; gap: 12px; }
.wizard-confirm-actions .ghost-btn,
.wizard-confirm-actions .primary-btn { padding: 10px 16px; font-size: 13px; }

/* -- Mobile responsive */
@media (max-width: 720px) {
  .wizard {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .wizard-header { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .wizard-header-left { width: 100%; }
  .wizard-progress { order: 3; width: 100%; justify-content: center; }
  .wizard-close { position: absolute; top: 10px; right: 12px; }
  .wizard-body { padding: 18px 16px; }
  .wizard-footer { padding: 12px 16px; grid-template-columns: 1fr; gap: 8px; }
  .wizard-footer > * { justify-self: stretch; }
  .wizard-footer .primary-btn { justify-content: center; }
  .wizard-type-grid { grid-template-columns: 1fr 1fr; }
  .wizard-icons-grid { grid-template-columns: repeat(4, 1fr); }
  .wizard-music-row { grid-template-columns: 1fr; }
  .wizard-name-input { font-size: 18px; padding: 13px 14px; }
}

/* =========================================================
   File viewer overlay (image / video)
   ========================================================= */
.viewer-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85);
  display: grid; place-items: center;
  padding: 40px;
  animation: fadeIn 0.16s ease;
}
.viewer-close {
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  display: grid; place-items: center;
  font-size: 14px;
}
.viewer-close:hover { background: rgba(255,255,255,0.16); }
.viewer-content {
  max-width: 100%; max-height: 100%;
  display: grid; place-items: center;
}
.viewer-content img, .viewer-content video {
  max-width: 90vw; max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.viewer-loading { color: #fff; font-size: 13px; text-align: center; }
.viewer-loading .spinner { width: 32px; height: 32px; margin: 0 auto 10px; }

/* =========================================================
   Footer player
   ========================================================= */
.player {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: rgba(11,11,13,0.92);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--c-border);
  padding: 11px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
  cursor: pointer; /* zone entière cliquable → plein-écran */
}
/* Zone gauche : pochette + titre + chevron (zone d'ouverture plein-écran) */
.player-left {
  display: flex; align-items: center; gap: 12px;
  flex: 1; min-width: 0;
  cursor: pointer;
}
.player-left:hover .player-cover { opacity: 0.88; transform: scale(1.03); }
.player-left:hover .player-track-name { color: var(--c-green); }
.player-left:active { opacity: 0.8; }
.player-chevron-up {
  width: 16px; height: 16px; flex-shrink: 0;
  color: var(--c-muted);
  transition: color 0.15s, transform 0.15s;
}
.player-left:hover .player-chevron-up { color: var(--c-green); transform: translateY(-2px); }

/* Badge tag dans le mini-player (demo, master, final…) */
.player-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(0,0,0,0.85);
  background: var(--tag-color, var(--c-muted));
  line-height: 18px;
  flex-shrink: 0;
}

/* Badge tag dans la sheet plein-écran */
.sheet-file-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(0,0,0,0.85);
  background: var(--tag-color, var(--c-muted));
}

.player-cover {
  width: 44px; height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  display: grid; place-items: center;
  transition: opacity 0.15s, transform 0.15s;
}
.player-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.player-cover .card-cover-fallback { font-size: 11px; padding: 4px; }
.player-info { min-width: 0; flex: 1; }
.player-track-name {
  font-weight: 600; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 280px;
  transition: color 0.15s;
}
.player-track-meta {
  font-size: 11px; color: var(--c-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 280px;
  margin-top: 2px;
}
/* Contrôles : ont leur propre cursor et ne propagent pas l'expand */
.player-controls {
  display: inline-flex; gap: 6px; align-items: center;
  cursor: default; /* stoppe la propagation visuelle du cursor: pointer de .player */
}
.player-controls .icon-btn { width: 32px; height: 32px; font-size: 12px; cursor: pointer; }
.player-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-green);
  color: rgba(0,0,0,0.85);
  display: grid; place-items: center;
  font-size: 12px;
  cursor: pointer;
}
.player-play:hover { transform: scale(1.04); }
.player-progress {
  flex: 1; display: flex; align-items: center; gap: 10px;
  min-width: 180px;
  cursor: default;
}
.player-progress .time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--c-muted);
  min-width: 34px;
  text-align: center;
}
.player-progress .track {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  position: relative;
  cursor: pointer;
}
.player-progress .fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--c-green);
  border-radius: 999px;
  width: 0%;
}

/* =========================================================
   Barres de progression scrubbables (mini, plein écran, Lecteur)
   — pastille au survol/pendant le drag + zone de préhension élargie
   ========================================================= */
.player-progress .track,
.sheet-progress .track,
.lib-np-progress .track {
  touch-action: none;          /* le glissement horizontal n'est pas volé par le scroll */
  overflow: visible;
}
/* Zone cliquable/tactile élargie en hauteur, sans changer l'épaisseur visible. */
.player-progress .track::before,
.sheet-progress .track::before,
.lib-np-progress .track::before {
  content: ""; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px;
}
.track .thumb {
  position: absolute; top: 50%; left: 0%;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,0.5);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.13s ease;
  pointer-events: none;
  z-index: 3;
}
/* Apparait au survol de la barre et reste pendant le scrub. */
.player-progress .track:hover .thumb,
.sheet-progress .track:hover .thumb,
.lib-np-progress .track:hover .thumb,
.track.is-scrubbing .thumb {
  transform: translate(-50%, -50%) scale(1);
}
.track.is-scrubbing { filter: brightness(1.06); }
.player-close {
  width: 28px; height: 28px;
  border-radius: 8px;
  color: var(--c-muted);
  display: grid; place-items: center;
  cursor: pointer;
}
.player-close:hover { color: var(--c-text); background: rgba(255,255,255,0.05); }

/* =========================================================
   Inline media loader — shown while the worker locates a clicked file
   ========================================================= */
.media-loader {
  position: fixed;
  bottom: 100px; left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 12px;
  border-radius: 14px;
  background: rgba(15,16,20,0.97);
  border: 1px solid #3A3E50;
  box-shadow: 0 16px 38px rgba(0,0,0,0.6);
  font-size: 12px;
  color: var(--c-text-sec);
  min-width: 280px;
}
.media-loader[hidden] { display: none !important; }
.media-loader .mini-spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--c-green);
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}
.media-loader .loader-text { flex: 1; min-width: 0; line-height: 1.25; }
.media-loader .loader-title strong {
  color: var(--c-text);
  font-weight: 600;
  font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block;
}
.media-loader .loader-meta {
  color: var(--c-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-loader .mini-bar {
  width: 90px; height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
  flex-shrink: 0;
}
.media-loader .mini-bar > div {
  height: 100%;
  background: var(--grad-premium-h);
  border-radius: 999px;
  width: 0%;
  transition: width 0.18s ease;
}

/* =========================================================
   Drop overlay
   ========================================================= */
.drop-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,200,150,0.10);
  backdrop-filter: blur(12px);
  display: grid; place-items: center;
  pointer-events: none;
  animation: fadeIn 0.15s ease;
}
.drop-overlay[hidden] { display: none !important; }
.drop-overlay-inner {
  border: 3px dashed rgba(0,200,150,0.7);
  border-radius: 24px;
  padding: 50px 70px;
  background: rgba(11,11,13,0.6);
  text-align: center;
}
.drop-icon { font-size: 48px; color: var(--c-green); margin-bottom: 12px; }
.drop-overlay-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.drop-overlay-sub { color: var(--c-text-sec); font-size: 13px; }

/* =========================================================
   Save error modal — impossible à rater
   ========================================================= */
.save-err-backdrop {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.75);
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn 0.18s ease;
}
.save-err-modal {
  width: min(620px, 100%);
  background: linear-gradient(180deg, rgba(35,20,25,0.99), rgba(15,15,18,1));
  border: 2px solid var(--c-danger);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(255,92,122,0.25), 0 12px 32px rgba(0,0,0,0.7);
}
.save-err-icon {
  font-size: 56px;
  text-align: center;
  margin-bottom: 14px;
  filter: drop-shadow(0 4px 14px rgba(255,180,71,0.35));
}
.save-err-title {
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 18px;
  color: var(--c-text);
}
.save-err-body {
  white-space: pre-wrap;
  font-family: var(--font-text);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--c-text-sec);
  background: rgba(0,0,0,0.35);
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--c-border);
  margin: 0 0 22px;
  max-height: 280px;
  overflow-y: auto;
}
.save-err-actions {
  display: flex; gap: 12px; justify-content: flex-end;
}
.save-err-actions .primary-btn,
.save-err-actions .ghost-btn { padding: 11px 18px; font-size: 13.5px; }

/* Toast */
.toast-stack { position: fixed; bottom: 100px; right: 20px; z-index: 500; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  background: rgba(21,22,26,0.95);
  border: 1px solid #3A3E50;
  color: var(--c-text);
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 12.5px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.5);
  animation: scaleIn 0.18s ease;
}
.toast.error { border-color: rgba(255,92,122,0.45); }

/* =========================================================
   Card cover action buttons (play + download)
   ========================================================= */
.card-cover-actions {
  position: absolute;
  right: 12px; bottom: 12px;
  z-index: 3;
  display: inline-flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.card:hover .card-cover-actions { opacity: 1; transform: translateY(0); }
/* Touch devices : always show actions (no hover). */
@media (hover: none) {
  .card-cover-actions { opacity: 1; transform: translateY(0); }
}
.card-cover-play, .card-cover-dl {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 7px 16px rgba(0,0,0,0.45);
  transition: transform 0.12s ease;
}
.card-cover-play {
  background: var(--c-green);
  color: rgba(0,0,0,0.85);
  box-shadow: 0 7px 16px rgba(0,200,150,0.5);
}
.card-cover-dl {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);
  color: #fff;
}
.card-cover-play:hover, .card-cover-dl:hover { transform: scale(1.08); }
/* Remove the legacy single-button absolute positioning. */
.card-cover-play { position: static; opacity: 1; transform: none; }

.list-dl {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  display: grid; place-items: center;
  font-size: 11px;
  transition: all 0.14s ease;
}
.list-dl:hover { background: rgba(255,255,255,0.10); color: var(--c-text); }

/* =========================================================
   Mode switch : Aperçu ↔ Édition (topbar)
   ========================================================= */
.mode-switch {
  display: inline-flex;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
}
.mode-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--c-text-sec);
  transition: all 0.14s ease;
  white-space: nowrap;
}
.mode-btn svg { font-size: 12px; }
.mode-btn:hover { color: var(--c-text); }
.mode-btn.is-active {
  background: var(--c-green);
  color: rgba(0,0,0,0.85);
  box-shadow: 0 4px 12px rgba(0,200,150,0.32);
}
.mode-btn.is-active svg { color: rgba(0,0,0,0.85); }

.save-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.save-status[hidden] { display: none; }
.save-status.dirty { background: rgba(255,180,71,0.12); color: var(--c-warning); border: 1px solid rgba(255,180,71,0.35); }
.save-status.saving { background: rgba(0,212,230,0.12); color: var(--c-cyan); border: 1px solid rgba(0,212,230,0.35); }
.save-status.ok { background: rgba(0,200,150,0.10); color: var(--c-green); border: 1px solid rgba(0,200,150,0.30); }
.save-status.err { background: rgba(255,92,122,0.14); color: var(--c-danger); border: 1px solid rgba(255,92,122,0.40); }
.save-status > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.save-status-fix {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: inherit;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 10.5px;
  white-space: nowrap;
  border: 1px solid currentColor;
  flex-shrink: 0;
}
.save-status-fix:hover { background: rgba(255,255,255,0.18); }
.save-status.err .save-status-fix { background: rgba(255,92,122,0.18); }
.save-status.dirty .save-status-fix { background: rgba(255,180,71,0.18); }

/* =========================================================
   Edit-mode bar BELOW the cover (doesn't overlap anything)
   ========================================================= */
.card-edit-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 6px 2px 2px;
  border-top: 1px solid var(--c-border);
}
.card-edit-thumbs { display: inline-flex; gap: 6px; }
.card-edit-bar .thumb {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-size: 13px;
  transition: all 0.12s ease;
}
.card-edit-bar .thumb:hover { background: rgba(255,255,255,0.08); color: var(--c-text); }
.card-edit-bar .thumb:active { transform: scale(0.94); }
.card-edit-bar .thumb-up.is-active {
  background: var(--c-green);
  color: rgba(0,0,0,0.9);
  border-color: var(--c-green);
  box-shadow: 0 4px 12px rgba(0,200,150,0.32);
}
.card-edit-bar .thumb-down.is-active {
  background: var(--c-danger);
  color: #fff;
  border-color: var(--c-danger);
  box-shadow: 0 4px 12px rgba(255,92,122,0.32);
}
.card-edit-bar .status-quick {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.card-edit-bar .status-quick:hover { background: rgba(255,255,255,0.08); color: var(--c-text); }
.card-edit-bar .status-quick svg { font-size: 9px; }
.card-edit-bar .thumb svg { width: 15px; height: 15px; }

.status-quick-menu { min-width: 220px; }

/* Pouces favoris / pas ouf en vue LISTE (à côté du badge de type). */
.list-thumbs { display: inline-flex; gap: 6px; }
.list-thumbs .thumb {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  transition: all 0.12s ease;
}
.list-thumbs .thumb svg { width: 14px; height: 14px; }
.list-thumbs .thumb:hover { background: rgba(255,255,255,0.08); color: var(--c-text); }
.list-thumbs .thumb:active { transform: scale(0.94); }
.list-thumbs .thumb-up.is-active {
  background: var(--c-green); color: rgba(0,0,0,0.9); border-color: var(--c-green);
  box-shadow: 0 4px 12px rgba(0,200,150,0.32);
}
.list-thumbs .thumb-down.is-active {
  background: var(--c-danger); color: #fff; border-color: var(--c-danger);
  box-shadow: 0 4px 12px rgba(255,92,122,0.32);
}

/* =========================================================
   Inline edit affordances in the project detail pop-up
   ========================================================= */
.detail-name-edit {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,200,150,0.30);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--c-text);
  margin: 0 0 8px;
  outline: none;
}
.detail-name-edit:focus { border-color: var(--c-green); background: rgba(255,255,255,0.06); }

.detail-desc-edit {
  display: block;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--c-text);
  font-size: 13.5px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  min-height: 56px;
  margin-bottom: 10px;
}
.detail-desc-edit:focus { border-color: rgba(0,200,150,0.40); }

.badge-edit {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  padding: 4px 12px 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--c-text);
  cursor: pointer;
  outline: none;
  -webkit-appearance: menulist;
}
.badge-edit:focus { border-color: rgba(0,200,150,0.50); }

.detail-music-edit {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
}
.detail-music-edit input {
  background: transparent;
  border: 0; outline: 0;
  color: var(--c-text);
  font-size: 12px;
  width: 70px;
  font-family: var(--font-text);
}
.detail-music-edit-wide input { width: 220px; }
.detail-music-edit:focus-within { border-color: rgba(0,200,150,0.40); }

.meta-item-edit { gap: 4px; }
.meta-item-edit label { font-weight: 600; color: var(--c-text-sec); }
.meta-item-edit input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 3px 6px;
  color: var(--c-text);
  font-size: 11px;
  outline: none;
}
.meta-item-edit input:focus { border-color: rgba(0,200,150,0.50); }

.detail-edit-footer {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

/* Lyrics tab edit */
.lyrics-edit {
  width: 100%;
  min-height: 240px;
  background: rgba(30,32,38,0.45);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--c-text);
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.65;
  outline: none;
  resize: vertical;
}
.lyrics-edit:focus { border-color: rgba(0,200,150,0.40); }

/* Distribution + credits inline inputs */
.inline-edit {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--c-text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.14s ease;
}
.inline-edit:focus { border-color: rgba(0,200,150,0.40); background: rgba(255,255,255,0.06); }
.inline-edit.mono { font-family: var(--font-mono); }

.kv-grid-edit { grid-template-columns: 130px 1fr; }
.platform-link-edit {
  cursor: text;
}
.platform-link-edit input { flex-basis: 100%; margin-top: 4px; }
.platform-link-edit { flex-wrap: wrap; }

.credit-row-edit {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 10px;
  align-items: center;
}
.add-credit-btn {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  border-style: dashed;
}
.credit-del {
  width: 28px; height: 28px;
}

/* =========================================================
   (legacy) Edit panel block — kept for any leftover use
   ========================================================= */
.edit-panel {
  margin-top: 22px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: rgba(0,200,150,0.04);
  border: 1px solid rgba(0,200,150,0.20);
}
.edit-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--c-green);
  margin-bottom: 14px;
}
.edit-row { margin-bottom: 12px; }
.edit-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.edit-label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 5px;
}
.edit-input {
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 13px;
  font-family: var(--font-text);
  outline: none;
  transition: all 0.14s ease;
}
.edit-input:focus {
  border-color: rgba(0,200,150,0.50);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(0,200,150,0.08);
}
textarea.edit-input { resize: vertical; min-height: 56px; line-height: 1.5; }
textarea.edit-input.mono { font-family: var(--font-text); }
select.edit-input { -webkit-appearance: menulist; }

.edit-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.ghost-btn.danger { color: var(--c-danger); border-color: rgba(255,92,122,0.30); }
.ghost-btn.danger:hover { background: rgba(255,92,122,0.10); color: var(--c-danger); }

/* =========================================================
   Mobile fullscreen player sheet (Spotify-style)
   ========================================================= */
.player-sheet {
  position: fixed;
  inset: 0;
  z-index: 130;   /* au-dessus de la rubrique Lecteur (z-index 120) */
  background: linear-gradient(180deg, #15161A 0%, #0B0B0D 100%);
  padding: 12px 20px 24px;
  /* Marges sûres pour les encoches / barres système (iOS). */
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;          /* contenu centré, jamais collé à un bord */
  gap: 18px;
  /* Hidden by default — slid down off-screen. */
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  visibility: hidden;
  overflow-y: auto;
  overflow-x: hidden;           /* jamais de pan horizontal */
  overscroll-behavior: contain;
  touch-action: pan-y;          /* iOS : autorise UNIQUEMENT le scroll vertical */
  -webkit-overflow-scrolling: touch;
}
.player-sheet.is-open {
  transform: translateY(0);
  visibility: visible;
}
.player-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(80% 50% at 50% 0%, rgba(0,200,150,0.16), transparent 60%),
    radial-gradient(60% 40% at 80% 100%, rgba(123,110,230,0.14), transparent 60%);
}
/* Fond d'ambiance : la pochette agrandie et floutée (façon Spotify « Now Playing »). */
.sheet-cover-bg {
  /* Étendu seulement en vertical : en horizontal on reste DANS le sheet pour ne
     jamais créer de débordement latéral (le flou de 70px déborde visuellement). */
  position: absolute; left: 0; right: 0; top: -10%; bottom: -10%;
  z-index: 0;
  pointer-events: none;
  filter: blur(70px) saturate(1.5) brightness(0.55);
  transform: scale(1.1);
  opacity: 0.6;
  overflow: hidden;
}
.sheet-cover-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-cover-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,11,13,0.35) 0%, rgba(11,11,13,0.8) 100%);
}
/* Conteneur centré du contenu (cover + infos + contrôles + file d'attente). */
.sheet-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 18px;
  width: 100%;
  max-width: 480px;     /* taille fixe maxi → centré sur tablette/desktop */
  margin: 0 auto;
}
.sheet-topbar {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding-top: env(safe-area-inset-top, 0);
}
.sheet-topbar .sheet-down { width: 38px; height: 38px; }
.sheet-context {
  flex: 1;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet-cover {
  position: relative; z-index: 1;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 320px;
  margin: 8px auto 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.55);
}
.sheet-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-meta { position: relative; z-index: 1; text-align: center; }
.sheet-badges {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.sheet-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.sheet-badge svg { font-size: 10px; }
.sheet-badge.soft {
  background: rgba(255,255,255,0.08);
  color: var(--c-text-sec);
}
.sheet-track {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}
.sheet-sub { font-size: 13px; color: var(--c-text-sec); }

.sheet-clip {
  position: relative; z-index: 1;
  display: flex; justify-content: center;
}
.sheet-clip-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(0,212,230,0.14);
  border: 1px solid rgba(0,212,230,0.36);
  color: var(--c-cyan);
  font-size: 13px; font-weight: 700;
}
.sheet-clip-btn:active { background: rgba(0,212,230,0.22); }
.sheet-clip-btn svg { font-size: 14px; }

.sheet-queue {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
}
.sheet-queue-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  width: 100%;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: var(--c-text-sec);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--c-border);
}
.sheet-queue-chevron {
  display: inline-flex; align-items: center;
  transition: transform 0.2s ease;
  font-size: 11px;
  margin-left: auto;
}
.sheet-queue.is-open .sheet-queue-chevron { transform: rotate(180deg); }
.sheet-queue-items {
  margin-top: 10px;
  display: flex; flex-direction: column;
  gap: 4px;
  max-height: 38vh;
  overflow-y: auto;
  padding: 4px 2px;
}
.sheet-queue-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  color: var(--c-text);
  font-size: 13px;
}
.sheet-queue-item.is-current {
  background: rgba(0,200,150,0.12);
  border-color: rgba(0,200,150,0.30);
}
.sheet-queue-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-muted);
  min-width: 16px;
  text-align: right;
}
.sheet-queue-item.is-current .sheet-queue-num { color: var(--c-green); }
.sheet-queue-name {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 500;
}
.sheet-queue-dur {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-muted);
}
.sheet-progress { position: relative; z-index: 1; }
.sheet-progress .track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  position: relative;
  cursor: pointer;
}
.sheet-progress .fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--c-green);
  border-radius: 999px;
  width: 0%;
}
.sheet-times {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--c-muted);
}
.sheet-controls {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  gap: 32px;
}
.sheet-side {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--c-text);
  font-size: 18px;
  background: transparent;
}
.sheet-side:active { background: rgba(255,255,255,0.06); }
.sheet-play {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--c-green);
  color: rgba(0,0,0,0.9);
  display: grid; place-items: center;
  font-size: 26px;
  box-shadow: 0 14px 30px rgba(0,200,150,0.45);
}
.sheet-play:active { transform: scale(0.96); }

.sheet-topbar { z-index: 1; }
/* Empêche le défilement de l'arrière-plan quand le plein écran est ouvert (tous écrans). */
body.sheet-open { overflow: hidden; }

/* Grand écran (navigateur d'ordinateur) : vue plein écran « Now Playing » façon
   Spotify — centrée, grande pochette, fond pochette floutée. AVANT : le plein
   écran était désactivé ici (display:none) ; il est désormais actif et responsive. */
@media (min-width: 721px) {
  .player-sheet {
    padding: 0;
    align-items: center;   /* centre horizontalement l'inner */
  }
  .sheet-topbar {
    position: absolute;
    top: 22px; left: 28px; right: 28px;
    padding-top: 0;
  }
  .sheet-inner {
    max-width: 480px;
    margin: auto 0;        /* centre verticalement, scroll propre si trop haut */
    padding: 56px 24px 32px;
    gap: 22px;
  }
  .sheet-cover {
    max-width: 360px;
    margin-top: 0;
    border-radius: 24px;
  }
  .sheet-track { font-size: 30px; }
  .sheet-sub { font-size: 15px; }
  /* La file d'attente reste scrollable sans pousser les contrôles hors de l'écran. */
  .sheet-queue-items { max-height: 28vh; }
}

/* .player-left absorbe la zone de tap → plus besoin de styles sur les sous-éléments. */
.player-cover { background: transparent; }
.player-info { background: transparent; }

/* =========================================================
   Horizontal-scroll filters/categories on mobile
   ========================================================= */
.scrollable-x {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.scrollable-x::-webkit-scrollbar { display: none; }

/* =========================================================
   Mobile (<= 720 px)
   ========================================================= */
@media (max-width: 720px) {
  body.sheet-open { overflow: hidden; }

  /* Topbar mobile : 2 lignes collées, séparées par une ligne. */
  .shell-topbar {
    padding: 8px 14px 0;
    gap: 0;
    display: grid;
    grid-template-areas:
      "brand brand brand"
      "info  info   switch";
    grid-template-columns: auto 1fr auto;
    row-gap: 0;
    align-items: center;
  }
  .topbar-brand {
    grid-area: brand;
    justify-self: center;
    padding: 6px 0 10px;
    border-bottom: 1px solid var(--c-border);
    width: 100%;
    display: flex; justify-content: center;
  }
  .topbar-brand .brand-logo-img { height: 38px; max-width: 220px; }
  .topbar-divider { display: none; }
  .topbar-spacer { display: none; }

  .topbar-page-info {
    grid-area: info;
    display: flex; align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 0;
  }
  .topbar-page-info > div:last-child { display: block; min-width: 0; }
  .page-photo { width: 30px; height: 30px; flex-shrink: 0; }
  .page-name { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-meta { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* La pill "Aperçu" est masquée sur mobile parce que le switch sert déjà à
     basculer le mode. */
  .readonly-pill { display: none; }

  /* Le switch reste fixé à droite de la ligne 2. Le badge save floats en
     toast au-dessus pour ne pas voler de place. */
  .mode-switch { grid-area: switch; justify-self: end; }
  .save-status {
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 110;
    max-width: calc(100vw - 16px);
    grid-area: auto;
    justify-self: auto;
    box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  }
  .save-status > span { max-width: 200px; }

  .shell-main { padding: 16px 14px 200px; }

  /* Title smaller + a bit tighter */
  .page-title { font-size: 26px; }
  .page-subtitle { font-size: 12px; }
  .page-header { gap: 10px; margin-bottom: 14px; }
  .search-field-lg { height: 44px; padding: 0 14px; }
  .search-field-lg input { font-size: 13px; }

  /* Toolbar : type filters on top, dropdowns under, both single-line scroll */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 18px;
  }
  .type-selector {
    width: 100%;
    gap: 7px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, black 14px, black calc(100% - 14px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, black 14px, black calc(100% - 14px), transparent 100%);
  }
  .type-btn { padding: 8px 12px; font-size: 12px; }
  .type-btn svg { font-size: 12px; }
  /* Four dropdowns (Statut, Appréciation, Année, Trier) on a single line. */
  .toolbar-dropdowns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
    overflow: visible;
    justify-content: stretch;
    padding-bottom: 2px;
  }
  .toolbar-dropdowns .menu-wrap { width: 100%; }
  .chip.chip-dropdown {
    height: 38px;
    padding: 0 10px;
    font-size: 12px;
    width: 100%;
    justify-content: space-between;
  }
  .chip.chip-dropdown > span:not(.chip-chev) {
    flex: 1; min-width: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .chip.chip-dropdown svg { flex-shrink: 0; }

  /* Grid : forced 2 columns on mobile */
  .projects-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .card { padding: 8px; gap: 8px; border-radius: 14px; }
  .card-cover { border-radius: 10px; }
  .card-title { font-size: 13px; }
  .card-music-row { font-size: 10px; gap: 7px; }
  .card-foot-row { font-size: 10px; gap: 7px; }
  .badge { padding: 2px 6px; font-size: 8.5px; }
  .badge svg { font-size: 8px; }
  .badge.status.cover-status { padding: 3px 6px; top: 6px; right: 6px; }
  .cover-type-chip { padding: 3px 6px; font-size: 8.5px; left: 6px; bottom: 6px; }
  .card-cover-actions { top: 6px; right: 6px; gap: 4px; }
  .card-cover-play, .card-cover-dl { width: 26px; height: 26px; font-size: 10px; }

  /* List rows */
  .list-row { padding: 9px 11px; gap: 11px; border-radius: 12px; }
  .list-cover { width: 46px; height: 46px; }
  .list-row-title .name { font-size: 13px; }
  .list-row-meta { font-size: 10.5px; gap: 8px; }

  /* Layout toggle + app actions positioning above the player */
  .layout-toggle { right: 14px; bottom: 100px; }
  .app-actions { left: 14px; bottom: 100px; }

  /* Project detail modal */
  .modal { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .modal-scroll { padding: 18px 16px 120px; }
  .detail-header { flex-direction: column; gap: 16px; }
  .detail-cover { width: 100%; max-width: 280px; margin: 0 auto; height: auto; aspect-ratio: 1/1; }
  .detail-name { font-size: 24px; }
  .detail-meta-row { gap: 10px; font-size: 11.5px; }
  .main-tracks { max-width: none; }
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
  .kv-grid, .credit-row { grid-template-columns: 1fr; gap: 4px 0; }

  /* Files tab on mobile */
  .file-row { gap: 10px; padding: 9px 10px; }
  .file-icon { width: 32px; height: 32px; font-size: 12px; }
  .file-name { font-size: 12.5px; }
  .file-meta { font-size: 10.5px; gap: 7px; }
  .file-actions .icon-btn { width: 28px; height: 28px; font-size: 12px; }

  /* Footer mini player on mobile — compact, tap = plein-écran */
  .player {
    padding: 8px 12px;
    gap: 10px;
  }
  /* Sur mobile on garde uniquement pochette + titre + bouton play → tap = plein-écran */
  .player .player-controls > .icon-btn { display: none; } /* prev/next masqués */
  .player .player-progress { display: none; }
  .player .player-close { display: none; }
  .player-chevron-up { display: none; } /* le chevron est superflu sur mobile */
  .player-cover { width: 40px; height: 40px; border-radius: 8px; }
  .player-track-name { font-size: 12.5px; max-width: none; }
  .player-track-meta { font-size: 10.5px; max-width: none; }

  /* File viewer overlay : full-bleed on mobile */
  .viewer-backdrop { padding: 14px; }
  .viewer-content img, .viewer-content video { max-width: 96vw; max-height: 80vh; border-radius: 10px; }
  .viewer-close { top: 12px; right: 12px; }

  /* Loading screen smaller */
  .loading-card { padding: 24px 20px; }
  .loading-title { font-size: 14px; }
  .loading-sub { font-size: 12px; }

  /* Landing : compact spacing */
  .landing-card { padding: 22px; }
  .landing-drop { padding: 30px 18px; }
  .landing-drop-icon { font-size: 28px; }
  .landing-drop-title { font-size: 13px; }

  /* Resume banner */
  .resume-banner { flex-direction: column; align-items: stretch; gap: 10px; }
  .resume-actions { justify-content: flex-end; }

  /* Missing banner */
  .missing-banner { margin-left: 14px; margin-right: 14px; }
}

/* Very small phones */
@media (max-width: 380px) {
  .page-title { font-size: 22px; }
  .projects-grid { gap: 10px; }
  .card { padding: 7px; }
  .card-title { font-size: 12px; }
}

/* =========================================================
   Lecteur complet (bibliothèque) — overlay façon desktop
   ========================================================= */
.topbar-player-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--c-green);
  color: rgba(0,0,0,0.9);
  font-weight: 700; font-size: 13px;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 6px 16px rgba(0,200,150,0.32);
  white-space: nowrap;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.topbar-player-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.topbar-player-btn:active { transform: scale(0.97); }
.topbar-player-btn svg { width: 16px; height: 16px; }

/* Bouton « mode sans distraction » (plein écran) */
.topbar-fs-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 999px;
  color: var(--c-text-sec);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  transition: transform 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.topbar-fs-btn:hover { color: var(--c-text); background: rgba(255,255,255,0.1); transform: translateY(-1px); }
.topbar-fs-btn:active { transform: scale(0.95); }
.topbar-fs-btn svg { width: 18px; height: 18px; }
/* Icône : « entrer » par défaut, « sortir » quand on est en plein écran. */
.topbar-fs-btn .fs-exit { display: none; }
body.is-fullscreen .topbar-fs-btn .fs-enter { display: none; }
body.is-fullscreen .topbar-fs-btn .fs-exit { display: inline; }
body.is-fullscreen .topbar-fs-btn { color: var(--c-green); border-color: rgba(0,200,150,0.4); }
/* Masqué là où l'API plein écran n'existe pas (ex. iPhone Safari → PWA à la place). */
body.fs-unsupported .topbar-fs-btn { display: none; }

.library-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(6,7,9,0.72);
  backdrop-filter: blur(10px);
  display: flex; align-items: stretch; justify-content: center;
  animation: lib-fade 0.18s ease;
}
@keyframes lib-fade { from { opacity: 0; } to { opacity: 1; } }
.library-panel {
  width: 100%; max-width: 920px;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #15161A 0%, #0C0D10 100%);
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  overflow: hidden;
}
.library-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 26px 14px;
}
.library-title {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 800;
  background: linear-gradient(90deg, var(--c-green), var(--c-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.library-close {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--c-text-sec);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
}
.library-close:hover { color: var(--c-text); background: rgba(255,255,255,0.09); }
.library-close svg { width: 18px; height: 18px; }

.library-tabs {
  display: flex; gap: 8px;
  padding: 4px 26px 12px;
  overflow-x: auto; scrollbar-width: none;
}
.library-tabs::-webkit-scrollbar { display: none; }
.lib-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.lib-tab svg { width: 15px; height: 15px; }
.lib-tab:hover { color: var(--c-text); background: rgba(255,255,255,0.07); }
.lib-tab.is-active {
  background: linear-gradient(90deg, var(--c-green), var(--c-cyan));
  color: rgba(0,0,0,0.9); border-color: transparent;
  font-weight: 700;
}

.library-sub {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 0 26px 12px;
}
.lib-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  color: var(--c-text-sec);
  font-size: 12px; font-weight: 600;
}
.lib-chip svg { width: 12px; height: 12px; }
.lib-chip:hover { color: var(--c-text); background: rgba(255,255,255,0.07); }
.lib-chip.is-active {
  background: var(--c-cyan);
  border-color: var(--c-cyan);
  color: rgba(0,0,0,0.9);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,212,230,0.32);
}

.library-body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 8px 18px 40px;
}

/* Rangée de titre */
.lib-list { display: flex; flex-direction: column; gap: 4px; }
.lib-track {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s ease;
}
.lib-track:hover { background: rgba(255,255,255,0.05); }
.lib-track.is-current { background: rgba(0,200,150,0.1); border-color: rgba(0,200,150,0.28); }
.lib-cover {
  width: 46px; height: 46px; flex: none;
  border-radius: 9px; overflow: hidden;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.5);
}
.lib-cover img { width: 100%; height: 100%; object-fit: cover; }
.lib-cover-ic svg, .lib-cover svg { width: 18px; height: 18px; }
.lib-track-main { flex: 1; min-width: 0; }
.lib-track-name {
  font-weight: 600; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-track.is-current .lib-track-name { color: var(--c-green); }
.lib-track-sub {
  font-size: 12px; color: var(--c-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-track-dur { font-family: var(--font-mono); font-size: 11.5px; color: var(--c-muted); flex: none; }
.lib-fav { color: var(--c-green); display: inline-flex; flex: none; }
.lib-fav svg { width: 15px; height: 15px; }
.lib-track-play {
  width: 36px; height: 36px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-green); color: rgba(0,0,0,0.9);
  box-shadow: 0 4px 12px rgba(0,200,150,0.35);
}
.lib-track-play svg { width: 15px; height: 15px; }
.lib-track-play:hover { filter: brightness(1.08); }

/* Section « Tous les projets » (accordéon) */
.lib-proj { border-radius: 12px; margin-bottom: 4px; }
.lib-proj-head {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 12px; cursor: pointer;
  transition: background 0.12s ease;
}
.lib-proj-head:hover { background: rgba(255,255,255,0.05); }
.lib-proj.is-open > .lib-proj-head { background: rgba(255,255,255,0.04); }
.lib-proj-sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.lib-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  color: #fff; font-size: 10px; font-weight: 700;
}
.lib-badge svg { width: 10px; height: 10px; }
.lib-proj-count { font-size: 11.5px; color: var(--c-muted); }
.lib-proj-chev {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  color: var(--c-muted);
  transition: transform 0.2s ease;
}
.lib-proj-chev svg { width: 16px; height: 16px; }
.lib-proj.is-open .lib-proj-chev { transform: rotate(180deg); }
.lib-proj-tracks {
  display: flex; flex-direction: column; gap: 3px;
  padding: 4px 0 8px 16px;
}

/* Playlists */
.lib-pl-cover { background: linear-gradient(135deg, #7B6EE6, #00D4E6); color: rgba(255,255,255,0.92); }
.lib-back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--c-border);
  color: var(--c-text-sec); font-size: 13px; font-weight: 600;
  margin: 4px 0 14px;
}
.lib-back:hover { color: var(--c-text); }
.lib-back svg { width: 15px; height: 15px; }
.lib-pl-detail-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; padding: 0 4px; }
.lib-pl-bigcover {
  width: 88px; height: 88px; flex: none; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7B6EE6, #00D4E6); color: #fff;
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
}
.lib-pl-bigcover svg { width: 32px; height: 32px; }
.lib-pl-title { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.lib-pl-playall {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 10px; padding: 8px 16px; border-radius: 999px;
  background: var(--c-green); color: rgba(0,0,0,0.9);
  font-weight: 700; font-size: 13px;
}
.lib-pl-playall svg { width: 14px; height: 14px; }

/* État vide */
.lib-empty { text-align: center; padding: 60px 20px; color: var(--c-muted); }
.lib-empty-ic { opacity: 0.4; margin-bottom: 12px; }
.lib-empty-ic svg { width: 34px; height: 34px; }
.lib-empty-title { font-weight: 700; font-size: 15px; color: var(--c-text-sec); margin-bottom: 4px; }
.lib-empty-msg { font-size: 13px; }

@media (max-width: 720px) {
  .topbar-player-btn span { display: none; }
  .topbar-player-btn { padding: 9px; }
  .library-panel { max-width: none; }
  .library-head { padding: 16px 18px 10px; }
  .library-tabs, .library-sub { padding-left: 18px; padding-right: 18px; }
  .library-title { font-size: 24px; }
}

/* Carte « en lecture » en haut de la bibliothèque (façon desktop PlayerHeaderCard) */
.library-nowplaying { display: none; }
.library-nowplaying.has-track {
  display: flex; align-items: center; gap: 16px;
  margin: 0 26px 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(0,200,150,0.10), rgba(0,212,230,0.06));
  border: 1px solid var(--c-border);
}
.lib-np-cover {
  width: 72px; height: 72px; flex: none;
  border-radius: 12px; overflow: hidden;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.55);
  box-shadow: 0 10px 24px rgba(0,0,0,0.42);
}
.lib-np-cover img { width: 100%; height: 100%; object-fit: cover; }
.lib-np-cover .lib-cover-ic svg { width: 26px; height: 26px; }
.lib-np-info { flex: 1; min-width: 0; }
.lib-np-name {
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-np-sub {
  font-size: 13px; color: var(--c-text-sec); margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-np-openfs { cursor: pointer; transition: color 0.12s, opacity 0.12s; }
.lib-np-name.lib-np-openfs:hover { color: var(--c-green); }
.lib-np-cover.lib-np-openfs:hover { opacity: 0.9; }
.lib-np-progress { display: flex; align-items: center; gap: 10px; }
.lib-np-progress .time { font-family: var(--font-mono); font-size: 11px; color: var(--c-muted); flex: none; }
.lib-np-progress .track {
  flex: 1; height: 5px; border-radius: 999px;
  background: rgba(255,255,255,0.12); position: relative; cursor: pointer;
}
.lib-np-progress .fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--c-green); border-radius: 999px; width: 0%;
}
.lib-np-controls { display: flex; align-items: center; gap: 8px; flex: none; }
.lib-np-side {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--c-text);
}
.lib-np-side:hover { background: rgba(255,255,255,0.08); }
.lib-np-side svg { width: 18px; height: 18px; }
.lib-np-play {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-green); color: rgba(0,0,0,0.9);
  box-shadow: 0 8px 20px rgba(0,200,150,0.42);
}
.lib-np-play svg { width: 20px; height: 20px; }
.lib-np-play:hover { filter: brightness(1.08); }

@media (max-width: 720px) {
  .library-nowplaying.has-track { margin: 0 18px 12px; gap: 12px; padding: 12px; }
  .lib-np-cover { width: 56px; height: 56px; }
  .lib-np-name { font-size: 16px; }
  .lib-np-play { width: 46px; height: 46px; }
  .lib-np-side { width: 36px; height: 36px; }
}

/* Onglets + sous-filtres de la bibliothèque : liste déroulante sur mobile/tablette */
.library-select {
  display: none;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 14px; font-weight: 600;
}
.library-select:focus { outline: none; border-color: var(--c-cyan); }
@media (max-width: 1024px) {
  .library-tabs-chips, .library-sub-chips { display: none; }
  .library-select { display: block; }
  .library-tabs { overflow: visible; }
}

/* Petit égaliseur animé (onde) affiché SUR LA LIGNE du titre en cours (compact). */
.lib-eq {
  display: inline-flex; align-items: center; justify-content: center; gap: 2.5px;
  height: 18px; width: 18px; flex: none;
}
.lib-eq i {
  width: 2.5px; height: 16px;
  background: var(--c-green);
  border-radius: 2px;
  transform-origin: center;
  animation: lib-eq-bounce 0.85s ease-in-out infinite;
}
.lib-eq i:nth-child(1) { animation-delay: 0s;    }
.lib-eq i:nth-child(2) { animation-delay: 0.24s; }
.lib-eq i:nth-child(3) { animation-delay: 0.46s; }
.lib-eq.is-paused i { animation-play-state: paused; transform: scaleY(0.3); }
@keyframes lib-eq-bounce {
  0%, 100% { transform: scaleY(0.3); }
  50%      { transform: scaleY(1); }
}

/* Ligne / projet mono-audio en cours : illumination renforcée + bordure verte */
.lib-track.is-current,
.lib-proj-head.is-current {
  background: linear-gradient(90deg, rgba(0,200,150,0.18), rgba(0,200,150,0.06));
  border-color: rgba(0,200,150,0.4);
  box-shadow: inset 0 0 0 1px rgba(0,200,150,0.25);
}
.lib-proj-head.is-current { border-radius: 12px; }

/* Petit chevron « ouvrir » sur les lignes de playlist */
.lib-pl-arrow { color: var(--c-muted); display: inline-flex; flex: none; }
.lib-pl-arrow svg { width: 16px; height: 16px; }
.lib-pl-row:hover .lib-pl-arrow { color: var(--c-text); }

/* =========================================================
   Écran de connexion artiste (après sélection du .mbdb)
   ========================================================= */
.artist-login {
  position: relative;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 40px 20px;
  background: var(--c-bg);
}
.artist-login-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(420px 420px at 30% 25%, rgba(0,200,150,0.16), transparent 60%),
    radial-gradient(480px 480px at 75% 75%, rgba(123,110,230,0.16), transparent 60%);
}
.artist-login-card {
  position: relative; z-index: 1;
  width: min(360px, 100%);
  background: linear-gradient(180deg, rgba(30,32,38,0.92), rgba(21,22,26,0.96));
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 32px 28px 28px;
  text-align: center;
  box-shadow: var(--shadow-pop);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
/* Photo / initiales artiste */
.artist-avatar-img {
  width: 88px; height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
  flex-shrink: 0;
}
.artist-avatar-initials {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--grad-premium);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 700; color: rgba(0,0,0,0.75);
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,200,150,0.30);
}
.artist-avatar-img.lg, .artist-avatar-initials.lg {
  width: 112px; height: 112px;
  font-size: 44px;
}
/* Nom de la page */
.artist-login-name {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-text);
  line-height: 1.2;
}
.artist-login-hint {
  font-size: 12px; color: var(--c-muted);
  margin-top: -4px;
}
/* Zone saisie code */
.artist-code-wrap { width: 100%; margin-top: 4px; }
.artist-code-row {
  display: flex; align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 14px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  transition: border-color 0.15s;
}
.artist-code-row:focus-within { border-color: var(--c-cyan); }
.artist-code-input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; outline: none;
  color: var(--c-text); font-size: 14px;
}
.artist-code-input::placeholder { color: var(--c-muted); }
.artist-code-btn {
  width: 30px; height: 30px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad-premium-h);
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,0.8); transition: transform 0.12s, box-shadow 0.12s;
  box-shadow: 0 4px 12px rgba(0,200,150,0.3);
}
.artist-code-btn:hover { transform: scale(1.08); box-shadow: 0 6px 16px rgba(0,200,150,0.4); }
.artist-code-btn svg { width: 15px; height: 15px; }
.artist-login-error {
  font-size: 12px; color: var(--c-danger);
  margin-top: 7px; text-align: left;
  min-height: 0;
}
/* Case "Rester connecté" */
.artist-stay-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  cursor: pointer;
  user-select: none;
}
.artist-stay-chk {
  appearance: none; -webkit-appearance: none;
  width: 16px; height: 16px; flex-shrink: 0;
  border-radius: 5px;
  border: 1.5px solid var(--c-border);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  position: relative;
  transition: border-color 0.14s, background 0.14s;
}
.artist-stay-chk:checked {
  background: var(--c-green);
  border-color: var(--c-green);
}
.artist-stay-chk:checked::after {
  content: "";
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px no-repeat;
}
.artist-stay-label {
  font-size: 12px; color: var(--c-text-sec);
}
.artist-stay-row:hover .artist-stay-label { color: var(--c-text); }

/* =========================================================
   Écran de chargement artiste (indexation cachée)
   ========================================================= */
.artist-loading-wrap {
  position: relative;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 40px 20px;
  background: var(--c-bg);
}
.artist-loading-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(420px 420px at 50% 30%, rgba(0,200,150,0.14), transparent 60%),
    radial-gradient(480px 480px at 50% 100%, rgba(123,110,230,0.14), transparent 60%);
}
.artist-loading-card {
  position: relative; z-index: 1;
  width: min(340px, 100%);
  background: linear-gradient(180deg, rgba(30,32,38,0.92), rgba(21,22,26,0.96));
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.artist-loading-name {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.01em; color: var(--c-text);
}
.artist-loading-label {
  font-size: 12px; color: var(--c-muted);
  margin-top: -6px;
}

/* Durée de l'aperçu (in/out) — petit libellé minimaliste à côté de la durée originale. */
.preview-dur {
  font-size: 9.5px;
  font-family: var(--font-mono);
  color: var(--c-green);
  margin-left: 5px;
  opacity: 0.9;
  white-space: nowrap;
  vertical-align: middle;
}
.lib-np-progress .preview-dur, .sheet-times .preview-dur { font-size: 10px; }
