for/* ========== RESET & TOKENS ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #111827;              /* fond global + cartes (clé du neumorphisme) */
  --bg-soft: #0f172a;
  --bg-deep: #020617;
  --text-main: #e5e7eb;
  --text-soft: #9ca3af;
  --accent: #f97316;
  --accent-soft: #fb923c;
  --accent-strong: #ea580c;
  --shadow-dark: 14px 14px 26px rgba(0, 0, 0, 0.9);
  --shadow-light: -10px -10px 22px rgba(148, 163, 184, 0.22);
  --radius-pill: 999px;
  --radius-card: 24px;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #1f2937 0, var(--bg-deep) 60%);
  color: var(--text-main);
}

/* ========== APP SHELL ========== */

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ----- Sidebar ----- */

.sidebar {
  width: 260px;
  padding: 26px 18px 22px;
  background: var(--bg);
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.9),
    10px 0 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: #f9fafb;
  letter-spacing: 0.04em;
}

.sidebar-logo::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 32%;
  background: radial-gradient(circle at 30% 0%, #fed7aa 0, #fdba74 22%, var(--accent) 60%, var(--accent-strong) 100%);
  box-shadow:
    0 0 18px rgba(249, 115, 22, 0.7),
    0 10px 20px rgba(0, 0, 0, 0.9);
}

/* Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font-size: 14px;
  text-decoration: none;
  background: var(--bg);
  box-shadow:
    6px 6px 12px rgba(0, 0, 0, 0.8),
    -5px -5px 12px rgba(148, 163, 184, 0.18);
  transition:
    box-shadow 0.12s ease,
    transform 0.08s ease,
    color 0.12s ease;
}

.sidebar-nav a:hover {
  transform: translateY(-1px);
  color: #f9fafb;
}

.sidebar-nav a.is-active {
  color: #020617;
  background: radial-gradient(circle at 20% 0%, #fed7aa 0, #fdba74 20%, var(--accent) 55%, var(--accent-strong) 100%);
  box-shadow:
    0 12px 26px rgba(249, 115, 22, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.25);
}

.link {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
}

.link:hover {
  color: #f9fafb;
}

/* ----- Main ----- */

.main {
  flex: 1;
  padding: 26px 32px 32px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f9fafb;
}

/* ========== BOUTONS (NEUMORPHISM) ========== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: radial-gradient(circle at 30% 0%, #fed7aa 0, #fdba74 22%, var(--accent) 60%, var(--accent-strong) 100%);
  color: #020617;
  box-shadow:
    0 14px 30px rgba(249, 115, 22, 0.65),
    0 0 0 1px rgba(248, 250, 252, 0.16);
  transform: translateY(0);
  transition:
    box-shadow 0.12s ease,
    transform 0.12s ease,
    filter 0.12s ease;
}

.btn-primary:hover {
  filter: brightness(1.07);
  box-shadow:
    0 16px 36px rgba(249, 115, 22, 0.8),
    0 0 0 1px rgba(248, 250, 252, 0.2);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.95),
    inset 0 2px 6px rgba(15, 23, 42, 0.9);
}

/* ========== CARDS (NEUMORPHISM) ========== */

.table-card {
  background: var(--bg);
  border-radius: var(--radius-card);
  padding: 20px 22px 32px 22px;
  box-shadow: var(--shadow-dark), var(--shadow-light);
  border: 1px solid rgba(15, 23, 42, 0.9);
  position: relative;
  overflow: hidden;
}

.table-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%);
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* ========== TABLE (SI TU EN UTILISES ENCORE) ========== */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--text-main);
  position: relative;
  z-index: 1;
}

.table th,
.table td {
  padding: 10px 8px;
  text-align: left;
}

.table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-soft);
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

.table tbody tr {
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
  transition: background 0.1s ease, transform 0.08s ease;
}

.table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.7);
}

.table tbody tr:hover {
  background: rgba(30, 64, 175, 0.28);
  transform: translateY(-1px);
}

/* ========== PILLS DE FILTRE ========== */

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.pill {
  border: none;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-soft);
  background: var(--bg);
  box-shadow:
    7px 7px 14px rgba(0, 0, 0, 0.85),
    -5px -5px 12px rgba(148, 163, 184, 0.2),
    inset 0 0 0 1px rgba(30, 41, 59, 0.9);
  transition:
    box-shadow 0.15s ease,
    background 0.15s ease,
    color 0.12s ease,
    transform 0.08s ease;
}

.pill:hover {
  transform: translateY(-1px);
  box-shadow:
    9px 9px 18px rgba(0, 0, 0, 0.9),
    -6px -6px 14px rgba(148, 163, 184, 0.26),
    inset 0 0 0 1px rgba(51, 65, 85, 0.96);
}

.pill.is-active {
  color: #020617;
  background: radial-gradient(circle at 20% 0%, #fed7aa 0, #fdba74 18%, var(--accent) 55%, var(--accent-strong) 100%);
  box-shadow:
    0 10px 24px rgba(249, 115, 22, 0.7),
    inset 0 2px 4px rgba(255, 255, 255, 0.25);
}

/* ========== GRILLE DE CARTES VINYLES ========== */

.vinyl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

/* Carte */
.vinyl-card {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px 14px 16px;
  box-shadow: var(--shadow-dark), var(--shadow-light);
  border: 1px solid rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Cover carrée */
.vinyl-cover {
  position: relative;
  border-radius: 10px;      /* ton radius */
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.9),
    10px 10px 24px rgba(0, 0, 0, 0.95),
    -8px -8px 20px rgba(148, 163, 184, 0.2);
  aspect-ratio: 1 / 1;
}

.vinyl-cover-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 0%, rgba(248, 250, 252, 0.18), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(91, 33, 182, 0.5), transparent 55%);
}

/* Image de pochette en cover */
.vinyl-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Texte sur la cover */
.vinyl-cover-label {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #f9fafb;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

/* Bouton play rond */
.play-button {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #020617;
  font-size: 18px;
  background: radial-gradient(circle at 30% 0%, #fed7aa 0, #fdba74 28%, var(--accent) 70%, var(--accent-strong) 100%);
  box-shadow:
    0 14px 32px rgba(249, 115, 22, 0.8),
    0 0 0 1px rgba(248, 250, 252, 0.16),
    inset 0 1px 3px rgba(255, 255, 255, 0.32);
  transition:
    transform 0.1s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.play-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.play-button:active {
  transform: translateY(2px);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.95),
    inset 0 2px 6px rgba(15, 23, 42, 0.95);
}

/* Texte sous la cover */
.vinyl-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vinyl-title {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
}

.vinyl-artist {
  font-size: 13px;
  color: var(--text-soft);
}

.vinyl-actions {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-soft);
}

.tiny-link {
  color: var(--text-soft);
  text-decoration: none;
}

.tiny-link:hover {
  color: #f9fafb;
  text-decoration: underline;
}

.tiny-sep {
  margin: 0 4px;
}

/* ========== FORMULAIRE NEUMORPHIQUE ========== */

.form-stack {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

/* Vrais champs dark, plus de blanc */
.field {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  border: none !important;
  box-sizing: border-box;
  width: 100%;
  border-radius: var(--radius-pill);
  background: var(--bg); /* même couleur que la carte */
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-main);
  box-shadow:
    8px 8px 16px rgba(0, 0, 0, 0.9),
    -6px -6px 14px rgba(148, 163, 184, 0.18);
  transition:
    box-shadow 0.15s ease,
    background 0.15s ease,
    transform 0.08s ease;
}

textarea.field {
  border-radius: 18px;
  min-height: 72px;
  resize: vertical;
}

.field::placeholder {
  color: #6b7280;
}

/* Focus avec glow orange */
.field:focus {
  outline: none;
  background: var(--bg-soft);
  box-shadow:
    inset 0 0 0 1px var(--accent-soft),
    0 0 0 1px rgba(251, 146, 60, 0.5),
    0 10px 24px rgba(251, 146, 60, 0.45);
  transform: translateY(-1px);
}

.form-stack button[type="submit"] {
  align-self: flex-start;
  margin-top: 8px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 600px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}


.form-search-inline .form-field {
  width: 100%;
}

.form-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.form-search-row .field {
  flex: 1;
}

.form-search-row .btn-primary {
  white-space: nowrap;
}

.form-layout-2col {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .form-layout-2col {
    grid-template-columns: 1fr;
  }
}

.form-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-preview .preview-cover {
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.9),
    10px 10px 24px rgba(0, 0, 0, 0.95),
    -8px -8px 20px rgba(148, 163, 184, 0.2);
  aspect-ratio: 1 / 1;
  position: relative;
}

.form-preview .preview-cover .vinyl-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-preview .preview-meta .vinyl-title {
  font-size: 16px;
  font-weight: 600;
  color: #f9fafb;
}

.form-preview .preview-meta .vinyl-artist {
  font-size: 14px;
  color: var(--text-soft);
}




/* ========== bouton ajouter a la collection ========== */
.vinyl-actions .btn-collection {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
  color: #020617;
  background: radial-gradient(circle at 30% 0%, #fed7aa 0, #fdba74 22%, var(--accent) 60%, var(--accent-strong) 100%);
  box-shadow:
    0 10px 24px rgba(249, 115, 22, 0.65),
    0 0 0 1px rgba(248, 250, 252, 0.16);
  transition:
    transform 0.1s ease,
    box-shadow 0.12s ease,
    filter 0.12s ease;
}

.vinyl-actions .btn-collection:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.vinyl-actions .btn-collection:active {
  transform: translateY(1px);
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.95),
    inset 0 2px 5px rgba(15, 23, 42, 0.9);
}


/* ========== HOME ========== */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg);
  border-radius: 22px;
  padding: 14px 18px;
  box-shadow: var(--shadow-dark), var(--shadow-light);
  border: 1px solid rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #f9fafb;
}

.metric-sub {
  font-size: 12px;
  color: var(--text-soft);
}

/* layout des sections d'accueil */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr);
  gap: 24px;
  margin-top: 10px;
}

@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

.home-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.home-section-header h2 {
  margin: 0;
  font-size: 16px;
  color: #f9fafb;
}

/* genres les plus présents */
.top-genres-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.genre-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  box-shadow:
    7px 7px 14px rgba(0, 0, 0, 0.9),
    -6px -6px 14px rgba(148, 163, 184, 0.22);
  font-size: 12px;
  color: var(--text-main);
}

.genre-name {
  font-weight: 500;
}

.genre-count {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  font-size: 11px;
  color: var(--text-soft);
}



