/* =========================================================================
   Zarctus Studio UI — Couche 3 : système de design
   -------------------------------------------------------------------------
   Source unique de vérité pour la mise en forme. Aucun hook JS ni aucune
   classe fonctionnelle n'est renommé ici : uniquement de la présentation.

   Sommaire
     01. Jetons
     02. Base & typographie
     03. Layout
     04. Navigation
     05. Composants Tabler (cartes, boutons, formulaires, tables…)
     06. Accueil / catalogue
     07. Barres latérales
     08. Espace membre
     09. Administration
     10. Mini-lecteur, toasts, page de partage
     11. Responsive & impression
   ========================================================================= */

/* =========================================================================
   01. JETONS
   ========================================================================= */
:root,
[data-bs-theme="dark"] {
  color-scheme: dark;

  /* Fonds : échelle d'élévation ----------------------------------------- */
  --studio-bg: #07070c;
  --studio-bg-elevated: #0d0d15;
  --studio-surface: rgba(19, 19, 30, 0.86);
  --studio-surface-strong: #171723;
  --studio-surface-soft: rgba(255, 255, 255, 0.032);
  --studio-surface-softer: rgba(255, 255, 255, 0.018);

  /* Traits --------------------------------------------------------------- */
  --studio-border: rgba(255, 255, 255, 0.075);
  --studio-border-strong: rgba(255, 255, 255, 0.135);

  /* Texte : quatre niveaux, tous lisibles sur --studio-bg ---------------- */
  --studio-text: #f7f5fb;
  --studio-text-soft: #ddd9e6;
  --studio-muted: #a9a5b8;
  --studio-faint: #8b8799;

  /* Accents -------------------------------------------------------------- */
  --studio-purple: #9d6cff;
  --studio-purple-deep: #7046df;
  --studio-purple-soft: rgba(157, 108, 255, 0.13);
  --studio-cyan: #65dce5;
  --studio-coral: #ff7b75;
  --studio-green: #63d69a;
  --studio-amber: #f0b357;
  --studio-gradient: linear-gradient(120deg, var(--studio-purple), var(--studio-cyan));

  /* Profondeur ----------------------------------------------------------- */
  --studio-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
  --studio-shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.24);
  --studio-ring: 0 0 0 3px rgba(157, 108, 255, 0.18);

  /* Rayons --------------------------------------------------------------- */
  --studio-radius-xl: 24px;
  --studio-radius-lg: 18px;
  --studio-radius-md: 13px;
  --studio-radius-sm: 10px;

  /* Rythme --------------------------------------------------------------- */
  --studio-gap: 1.15rem;
  --studio-pad-card: clamp(1rem, 2.2vw, 1.5rem);

  /* Ponts vers Tabler ---------------------------------------------------- */
  --tblr-body-bg: var(--studio-bg);
  --tblr-body-color: var(--studio-text);
  --tblr-card-bg: var(--studio-surface);
  --tblr-card-border-color: var(--studio-border);
  --tblr-border-color: var(--studio-border);
  --tblr-primary: var(--studio-purple);
  --tblr-primary-rgb: 157, 108, 255;
  --tblr-font-family-sans-serif: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tblr-font-family: var(--tblr-font-family-sans-serif);
  --tblr-border-radius: var(--studio-radius-sm);
  --plyr-color-main: var(--studio-purple);
  --plyr-audio-controls-background: transparent;
  --plyr-audio-control-color: #cfcada;
}

/* =========================================================================
   02. BASE & TYPOGRAPHIE
   ========================================================================= */
html {
  background: var(--studio-bg);
  scroll-behavior: smooth;
  /* Les ancres (#songs-editor, #member-settings…) ne passent plus sous la
     barre de navigation collante. */
  scroll-padding-top: 5.5rem;
}

body.zarctus-app {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--studio-text);
  font-family: var(--tblr-font-family-sans-serif);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 6% 0%, rgba(112, 70, 223, 0.15), transparent 30rem),
    radial-gradient(circle at 94% 22%, rgba(101, 220, 229, 0.075), transparent 28rem),
    linear-gradient(180deg, #09090f 0%, #0b0b13 46%, #07070c 100%);
  background-attachment: fixed;
}

/* Trame discrète, estompée vers le bas de page */
body.zarctus-app::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 78%);
}

h1, h2, h3, h4, h5, h6,
.card-title,
.brand-copy strong,
.admin-stat-value,
.admin-stat-value-sm,
.catalog-count strong {
  font-family: "Manrope", "DM Sans", system-ui, sans-serif;
  letter-spacing: -0.035em;
}

h1, h2, h3, h4 {
  color: var(--studio-text);
}

p {
  line-height: 1.65;
}

a {
  color: #b99aff;
  text-underline-offset: 0.2em;
  transition: color 0.16s ease;
}

a:hover {
  color: #d3bcff;
}

.text-muted {
  color: var(--studio-muted) !important;
}

.text-secondary {
  color: var(--studio-text-soft) !important;
}

small,
.small {
  line-height: 1.55;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 5px;
  color: #c9b4ff;
  background: rgba(157, 108, 255, 0.11);
  font-size: 0.88em;
}

hr {
  border-color: var(--studio-border);
  opacity: 1;
}

::selection {
  color: #fff;
  background: rgba(157, 108, 255, 0.55);
}

/* Anneau de focus unique pour tout le site */
:focus-visible {
  outline: 2px solid var(--studio-cyan) !important;
  outline-offset: 3px !important;
}

/* Micro-libellé en capitales (hero, sections) */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #bb9dff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Lien d'évitement : premier élément tabulable de la page */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  z-index: 2000;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  background: var(--studio-purple-deep);
  box-shadow: var(--studio-shadow);
  transform: translate(-50%, -180%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  color: #fff;
  transform: translate(-50%, 0);
}

/* Barres de défilement discrètes */
* {
  scrollbar-color: #3a3646 transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: #3a3646;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: #4d4860;
  background-clip: content-box;
}

/* =========================================================================
   03. LAYOUT
   ========================================================================= */
.container-xxl {
  width: min(100% - 2rem, 1540px);
  max-width: 1540px;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-wrapper {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.page-body {
  flex: 1;
  margin-top: 0;
}

.app-content {
  padding: 1.4rem 0 4rem;
}

.row-cards {
  --tblr-gutter-x: var(--studio-gap);
  --tblr-gutter-y: var(--studio-gap);
}

/* Rythme vertical homogène dans la colonne principale */
.main-stage > .card,
.main-stage > .row,
.main-stage > .alert,
.main-stage > .accordion {
  margin-bottom: var(--studio-gap);
}

.main-stage > *:last-child {
  margin-bottom: 0;
}

/* =========================================================================
   04. NAVIGATION
   ========================================================================= */
.app-topbar {
  /* backdrop-filter crée un contexte d'empilement : sans z-index explicite,
     les menus déroulants de cette barre (avatar, applications) se retrouvent
     peints SOUS la barre de sections collante (.app-nav, z-index 1020). */
  position: relative;
  z-index: 1030;
  min-height: 74px;
  padding: 0;
  border: 0;
  background: rgba(8, 8, 13, 0.82);
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
}

.app-topbar .container-xxl {
  min-height: 74px;
}

.navbar-brand {
  min-width: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--studio-text);
  text-decoration: none;
}

.brand-lockup:hover {
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  color: #fff;
  font-size: 1rem;
  background:
    radial-gradient(circle at 28% 25%, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(135deg, var(--studio-purple), #6b45d0 58%, #3a287d);
  box-shadow: 0 9px 24px rgba(112, 70, 223, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-lockup:hover .brand-mark {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(112, 70, 223, 0.42);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-size: 1.18rem;
  font-weight: 800;
}

.brand-copy small {
  margin-top: 0.3rem;
  color: var(--studio-faint);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* L'ancien logo SVG reste dans le DOM par compatibilité mais n'est plus
   affiché : le lockup typographique le remplace. */
.legacy-brand-image {
  display: none;
}

.app-topbar .navbar-nav {
  align-items: center;
  gap: 0.35rem;
}

.app-topbar .nav-link {
  color: #d3d0dd;
  transition: color 0.16s ease;
}

.app-topbar .nav-link:hover {
  color: #fff;
}

.app-topbar .avatar {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(157, 108, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(157, 108, 255, 0.07);
}

.username {
  color: var(--studio-text);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Barre de sections */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 1020;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--studio-border);
  background: rgba(10, 10, 16, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.app-nav .navbar {
  min-height: 50px;
  padding: 0;
  background: transparent;
}

.app-nav .navbar-nav {
  gap: 0.2rem;
}

.app-nav .nav-item {
  position: relative;
}

.app-nav .nav-link {
  min-height: 50px;
  padding: 0.8rem 1rem;
  color: #a8a4b6;
  font-size: 0.86rem;
  font-weight: 700;
  transition: color 0.18s ease, background 0.18s ease;
}

.app-nav .nav-link i {
  margin-right: 0.4rem;
  color: currentColor !important;
}

.app-nav .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
}

.app-nav .nav-item.active .nav-link {
  color: #fff;
}

.app-nav .nav-item.active::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: -1px;
  left: 1rem;
  height: 2px;
  border-radius: 999px 999px 0 0;
  background: var(--studio-gradient);
  box-shadow: 0 -3px 12px rgba(157, 108, 255, 0.45);
}

.navbar-toggler {
  width: 42px;
  height: 42px;
  border-color: var(--studio-border-strong);
  border-radius: 12px;
}

.dropdown-menu {
  padding: 0.5rem;
  border: 1px solid var(--studio-border-strong);
  border-radius: 14px;
  background: rgba(21, 21, 31, 0.98);
  box-shadow: var(--studio-shadow);
  backdrop-filter: blur(18px);
}

.dropdown-item {
  border-radius: 9px;
  color: var(--studio-text-soft);
  font-size: 0.87rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: #fff;
  background: rgba(157, 108, 255, 0.16);
}

.dropdown-divider {
  border-color: var(--studio-border);
}

.dropdown-menu-card {
  min-width: 260px;
  max-width: 320px;
}

.dropdown-menu-card .card {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dropdown-menu-card .card-header {
  min-height: 0;
  padding: 0.35rem 0.5rem 0.6rem;
  border-bottom: 1px solid var(--studio-border);
}

.dropdown-menu-card .card-title {
  font-size: 0.8rem;
}

.dropdown-menu-card .link-hoverable {
  border-radius: 10px;
  color: var(--studio-text-soft);
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease;
}

.dropdown-menu-card .link-hoverable:hover {
  color: #fff;
  background: rgba(157, 108, 255, 0.16);
}

.dropdown-menu-card .link-hoverable .h5 {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.3;
}

/* =========================================================================
   05. COMPOSANTS TABLER
   ========================================================================= */
.card {
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-lg);
  background: var(--studio-surface);
  box-shadow: var(--studio-shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 58px;
  padding: 1rem 1.2rem;
  border-bottom-color: var(--studio-border);
  border-radius: var(--studio-radius-lg) var(--studio-radius-lg) 0 0;
}

.card-header.main,
.card-header.sidebar {
  background: rgba(255, 255, 255, 0.018);
}

.card-header.main i.icon-header,
.card-header.sidebar i.icon-header {
  color: var(--studio-purple);
}

.card-title {
  color: var(--studio-text);
  font-size: 1rem;
  font-weight: 750;
}

.card-body {
  padding: var(--studio-pad-card);
}

.card-footer {
  border-top-color: var(--studio-border);
  background: rgba(255, 255, 255, 0.018);
}

/* Boutons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 40px;
  border-radius: 11px;
  font-family: var(--tblr-font-family-sans-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    transform 0.16s ease,
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.btn-sm,
.btn-group-sm > .btn {
  min-height: 34px;
  padding: 0.42rem 0.7rem;
  border-radius: 9px;
  font-size: 0.76rem;
}

.btn:hover:not(:disabled):not(.disabled) {
  transform: translateY(-1px);
}

.btn:active:not(:disabled):not(.disabled) {
  transform: translateY(0);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.45;
}

.btn.btn-vannie,
.btn.btn-purple,
.btn.btn-primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--studio-purple), var(--studio-purple-deep));
  box-shadow: 0 8px 20px rgba(112, 70, 223, 0.22);
}

.btn.btn-vannie:hover,
.btn.btn-vannie:focus-visible,
.btn.btn-purple:hover,
.btn.btn-primary:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #ad82ff, #7950e7);
  box-shadow: 0 10px 26px rgba(112, 70, 223, 0.34);
}

.btn.btn-outline-vannie {
  color: #c3a8ff;
  border-color: rgba(157, 108, 255, 0.38);
  background: rgba(157, 108, 255, 0.07);
}

.btn.btn-outline-vannie:hover,
.btn.btn-outline-vannie:focus-visible {
  color: #fff;
  border-color: rgba(157, 108, 255, 0.65);
  background: rgba(157, 108, 255, 0.2);
}

/* Boutons secondaires : socle commun, teinte propre à chaque intention */
.btn-outline-secondary,
.btn-outline-light,
.btn.btn-outline-fred,
.btn-outline-info,
.btn-outline-success,
.btn-outline-warning,
.btn.btn-outline-danger {
  border-color: var(--studio-border-strong);
  background: rgba(255, 255, 255, 0.025);
}

.btn-outline-secondary,
.btn-outline-light {
  color: var(--studio-text-soft);
}

.btn.btn-outline-fred,
.btn-outline-info {
  color: var(--studio-cyan);
}

.btn-outline-success {
  color: var(--studio-green);
}

.btn-outline-warning {
  color: var(--studio-amber);
}

.btn.btn-outline-danger {
  color: var(--studio-coral);
}

.btn-outline-secondary:hover,
.btn-outline-light:hover {
  color: #fff;
  border-color: var(--studio-border-strong);
  background: rgba(255, 255, 255, 0.08);
}

.btn.btn-outline-fred:hover,
.btn-outline-info:hover {
  color: #05171a;
  border-color: var(--studio-cyan);
  background: var(--studio-cyan);
}

.btn-outline-success:hover {
  color: #05190f;
  border-color: var(--studio-green);
  background: var(--studio-green);
}

.btn-outline-warning:hover {
  color: #1c1204;
  border-color: var(--studio-amber);
  background: var(--studio-amber);
}

.btn.btn-outline-danger:hover,
.btn.btn-outline-danger:focus-visible {
  color: #fff;
  border-color: var(--studio-coral);
  background: rgba(255, 123, 117, 0.85);
}

.btn.btn-danger {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #ff6f68, #c93a34);
}

.btn-ghost-light {
  border-color: transparent;
  color: var(--studio-text-soft);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.btn-ghost-light:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* Groupes de boutons : coins arrondis conservés aux extrémités */
.btn-group > .btn:not(:first-child),
.btn-group > .d-inline:not(:first-child) > .btn {
  margin-left: -1px;
}

.btn-close {
  filter: invert(1) grayscale(1) brightness(1.6);
  opacity: 0.6;
}

.btn-close:hover {
  opacity: 1;
}

/* Formulaires ------------------------------------------------------------ */
.form-control,
.form-select,
.input-group-text {
  min-height: 44px;
  border-color: var(--studio-border-strong);
  border-radius: 11px;
  color: var(--studio-text);
  background-color: rgba(7, 7, 12, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

textarea.form-control {
  min-height: 90px;
  line-height: 1.6;
}

.form-control-sm,
.form-select-sm {
  min-height: 36px;
  border-radius: 9px;
  font-size: 0.8rem;
}

.form-control::placeholder {
  color: #6f6c7d;
}

.form-control:focus,
.form-select:focus {
  color: #fff;
  border-color: rgba(157, 108, 255, 0.7);
  background-color: rgba(12, 12, 19, 0.94);
  box-shadow: var(--studio-ring);
}

.form-control[type="file"] {
  padding-top: 0.55rem;
}

.form-control[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 7px;
  color: #d9d2ec;
  background: rgba(157, 108, 255, 0.16);
  font-weight: 700;
}

.form-label {
  margin-bottom: 0.45rem;
  color: var(--studio-text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.input-icon-addon {
  color: var(--studio-faint);
}

.input-group-text {
  color: var(--studio-muted);
}

.form-check-input {
  border-color: var(--studio-border-strong);
  background-color: rgba(255, 255, 255, 0.08);
}

.form-check-input:checked {
  border-color: var(--studio-purple);
  background-color: var(--studio-purple);
}

.form-check-input:focus {
  box-shadow: var(--studio-ring);
}

.form-check-label {
  color: var(--studio-text-soft);
  font-size: 0.82rem;
  cursor: pointer;
}

/* Badges, alertes, listes ------------------------------------------------ */
.badge {
  border-radius: 999px;
  font-family: var(--tblr-font-family-sans-serif);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.alert {
  padding: 0.85rem 1.05rem;
  border: 1px solid;
  border-radius: 13px;
  color: var(--studio-text-soft);
}

.alert-success {
  border-color: rgba(99, 214, 154, 0.35);
  background: rgba(99, 214, 154, 0.09);
}

.alert-danger {
  border-color: rgba(255, 123, 117, 0.35);
  background: rgba(255, 123, 117, 0.09);
}

.alert-warning {
  border-color: rgba(240, 179, 87, 0.35);
  background: rgba(240, 179, 87, 0.09);
}

.alert-info {
  border-color: rgba(101, 220, 229, 0.3);
  background: rgba(101, 220, 229, 0.07);
}

.list-group {
  --tblr-list-group-bg: transparent;
}

.list-group-item {
  padding: 0.75rem 1rem;
  border-color: var(--studio-border);
  color: var(--studio-text-soft);
  background: transparent;
}

.list-group-item-action {
  transition: background 0.16s ease, color 0.16s ease;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

/* Tables ----------------------------------------------------------------- */
.table {
  --tblr-table-bg: transparent;
  --tblr-table-border-color: var(--studio-border);
  --tblr-table-hover-bg: rgba(157, 108, 255, 0.05);
  color: var(--studio-text-soft);
}

.table thead th {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom-color: var(--studio-border-strong);
  color: var(--studio-faint);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.table tbody td {
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  vertical-align: middle;
}

.table tbody tr {
  transition: background 0.14s ease;
}

/* Modales & accordéons --------------------------------------------------- */
.modal-backdrop.show {
  opacity: 0.65;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  overflow: hidden;
  border: 1px solid var(--studio-border-strong);
  border-radius: 18px;
  background: var(--studio-surface-strong);
  box-shadow: var(--studio-shadow);
}

.modal-header,
.modal-footer {
  border-color: var(--studio-border);
  background: rgba(255, 255, 255, 0.02);
}

.modal-title {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.accordion-item {
  border-color: var(--studio-border);
  background: transparent;
}

.accordion-button {
  border-radius: var(--studio-radius-md) !important;
  color: var(--studio-text-soft);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.accordion-button:not(.collapsed) {
  border-radius: var(--studio-radius-md) var(--studio-radius-md) 0 0 !important;
  color: #c3a8ff;
  background: rgba(157, 108, 255, 0.12);
}

.accordion-button::after {
  filter: invert(0.7);
}

.accordion-body {
  border-radius: 0 0 var(--studio-radius-md) var(--studio-radius-md);
  background: rgba(8, 8, 13, 0.45);
}

.progress {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-bar {
  border-radius: 999px;
}

/* =========================================================================
   06. ACCUEIL / CATALOGUE
   ========================================================================= */
.main-stage > .card:first-child,
.music-library-shell,
.admin-dashboard-shell {
  overflow: hidden;
}

.music-library-shell {
  border-radius: var(--studio-radius-xl);
  background: rgba(16, 16, 25, 0.82);
}

/* Bandeau d'accueil ------------------------------------------------------ */
.library-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  min-height: 232px;
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--studio-border);
  background:
    radial-gradient(circle at 89% 22%, rgba(101, 220, 229, 0.16), transparent 27%),
    radial-gradient(circle at 70% 75%, rgba(157, 108, 255, 0.26), transparent 38%),
    linear-gradient(125deg, rgba(18, 18, 30, 0.96), rgba(29, 22, 50, 0.92));
}

/* Anneaux décoratifs */
.library-hero::after {
  content: "";
  position: absolute;
  top: -125px;
  right: -60px;
  width: 340px;
  height: 340px;
  border: 42px solid rgba(255, 255, 255, 0.025);
  border-radius: 50%;
  box-shadow:
    0 0 0 34px rgba(157, 108, 255, 0.025),
    0 0 0 70px rgba(101, 220, 229, 0.018);
}

/* Ligne d'onde en pied de bandeau : rappelle l'univers audio sans image */
.library-hero::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 74px;
  opacity: 0.5;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(157, 108, 255, 0.42) 0 2px,
    transparent 2px 9px
  );
  mask-image:
    linear-gradient(to top, black, transparent),
    radial-gradient(120% 100% at 50% 100%, black 30%, transparent 72%);
  -webkit-mask-image:
    linear-gradient(to top, black, transparent),
    radial-gradient(120% 100% at 50% 100%, black 30%, transparent 72%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
}

.library-heading,
.library-hero-actions {
  position: relative;
  z-index: 1;
}

.library-heading h1,
.member-intro h1,
.admin-login-card h1 {
  margin: 0.75rem 0 0.8rem;
  color: #fff;
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
}

.library-heading h1 span {
  color: transparent;
  background: linear-gradient(90deg, #c3a8ff 0%, #69dfe7 80%);
  background-clip: text;
  -webkit-background-clip: text;
}

.library-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--studio-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.library-hero-actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 1rem;
  min-width: 150px;
}

.catalog-count {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
}

.catalog-count strong {
  color: #fff;
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
}

.catalog-count small {
  margin-top: 0.35rem;
  color: var(--studio-muted);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.music-library-shell > .card-body {
  padding: clamp(1rem, 2.4vw, 1.7rem);
}

/* Barre de filtres : collante sous la navigation ------------------------- */
.songs-filters {
  padding: 0.8rem;
  border: 1px solid var(--studio-border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.songs-filters .form-control,
.songs-filters .form-select {
  min-height: 44px;
}

.songs-filters-toggle {
  display: flex;
  align-items: center;
}

.songs-filters-toggle .form-check {
  padding-left: 2.6rem;
}

.songs-filters-toggle .form-check-input {
  cursor: pointer;
}

/* Bouton « mélanger » : seule touche chaude de l'interface */
button.orange {
  min-width: 44px;
  color: #fff;
  border-color: rgba(255, 156, 89, 0.35);
  background: linear-gradient(135deg, #ff925e, #e35f42);
  box-shadow: 0 8px 18px rgba(227, 95, 66, 0.18);
}

button.orange:hover {
  color: #fff;
  border-color: rgba(255, 156, 89, 0.5);
  background: linear-gradient(135deg, #ffa071, #ed6b4d);
}

/* Liste des titres ------------------------------------------------------- */
#songs-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.song-card {
  position: relative;
  margin-bottom: 0 !important;
  overflow: hidden;
  border: 1px solid var(--studio-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.024);
  box-shadow: none !important;
  backdrop-filter: none;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.song-card:hover {
  z-index: 1;
  transform: translateY(-2px);
  border-color: rgba(157, 108, 255, 0.34);
  background: rgba(157, 108, 255, 0.06);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25) !important;
}

.song-card .card-song {
  padding: 0.75rem !important;
  background: transparent;
}

.song-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.song-card-cover {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px !important;
  background: #111;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.28);
}

.song-card-body {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.song-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.song-card-title {
  display: inline-block;
  max-width: 250px;
  color: #f2f0f6;
  font-size: 0.93rem;
  font-weight: 700 !important;
}

.song-card-category {
  margin-right: 0.25rem !important;
  padding: 0.35rem 0.55rem;
  color: #c8afff;
  background: rgba(157, 108, 255, 0.12) !important;
}

.song-card-date,
.song-card-plays {
  color: var(--studio-faint) !important;
  font-size: 0.73rem;
  white-space: nowrap;
}

.song-card-plays i {
  margin-right: 0.2rem;
}

.song-card-player {
  flex: 1 1 100%;
  min-width: 190px;
}

.song-card-audio {
  width: 100%;
  max-width: 100%;
}

.song-card audio {
  height: 36px;
}

.song-card-unavailable {
  border-color: rgba(240, 179, 87, 0.32);
  background: rgba(240, 179, 87, 0.08);
  color: #e8c48b;
}

.plyr--audio .plyr__controls {
  min-height: 40px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  color: var(--studio-purple);
  background: rgba(7, 7, 12, 0.72);
  box-shadow: none;
}

.song-card-actions {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  gap: 0.35rem;
}

.song-card-actions .btn {
  min-width: 36px;
  min-height: 36px;
  padding: 0.4rem 0.55rem;
}

/* État « en lecture » : liseré animé + fond dégradé ---------------------- */
.song-card.song-card-playing {
  border-color: rgba(101, 220, 229, 0.45);
  background: linear-gradient(90deg, rgba(101, 220, 229, 0.1), rgba(157, 108, 255, 0.08));
}

.song-card.song-card-playing::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--studio-gradient);
}

/* Égaliseur : trois barres animées posées sur la pochette du titre joué */
.song-card.song-card-playing .song-card-cover {
  border-color: rgba(101, 220, 229, 0.55);
  box-shadow: 0 0 0 3px rgba(101, 220, 229, 0.14), 0 7px 16px rgba(0, 0, 0, 0.3);
}

.song-card.song-card-playing .song-card-title {
  color: #fff;
}

.song-card.song-card-favorite {
  border-color: rgba(255, 123, 117, 0.25);
}

.song-card-btn-fav.active {
  color: #fff;
  border-color: rgba(255, 123, 117, 0.5);
  background: rgba(255, 123, 117, 0.16);
}

.song-card-btn-fav.active i {
  color: var(--studio-coral);
}

/* Squelette de chargement : mêmes gabarits que les vraies lignes ---------- */
.song-skeleton {
  animation: none;
  pointer-events: none;
}

.skeleton-block {
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.045) 25%,
    rgba(255, 255, 255, 0.085) 37%,
    rgba(255, 255, 255, 0.045) 63%
  );
  background-size: 400% 100%;
  animation: skeletonSweep 1.4s ease infinite;
}

.skeleton-cover {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 10px;
}

.skeleton-line {
  height: 13px;
}

.skeleton-line-lg {
  width: 58%;
  margin-bottom: 8px;
}

.skeleton-line-sm {
  width: 34%;
  height: 10px;
}

.skeleton-player {
  flex: 1;
  height: 36px;
  border-radius: 10px;
}

@keyframes skeletonSweep {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* =========================================================================
   07. BARRES LATÉRALES
   ========================================================================= */
.app-sidebar {
  align-self: flex-start;
}

.app-sidebar .card {
  overflow: hidden;
  border-radius: 15px;
  background: rgba(15, 15, 23, 0.7);
  box-shadow: none;
}

.app-sidebar .card-header {
  min-height: 50px;
  padding: 0.8rem 1rem;
}

.app-sidebar .card-title {
  font-size: 0.85rem;
}

.app-sidebar .card-title i {
  color: var(--studio-purple);
}

.app-sidebar .list-group-item {
  padding: 0.7rem 1rem;
  font-size: 0.82rem;
}

#sidebar-categories .list-group-item {
  position: relative;
  padding: 0.58rem 1rem;
  border-left: 0 !important;
  font-size: 0.82rem;
}

#sidebar-categories .list-group-item::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 0.7rem;
  border-radius: 50%;
  background: #4f4c5b;
  vertical-align: 0.08em;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

#sidebar-categories .list-group-item.active,
#sidebar-categories .list-group-item:hover,
.sidebar-cat.active {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(157, 108, 255, 0.16), rgba(157, 108, 255, 0.035)) !important;
}

#sidebar-categories .list-group-item.active {
  font-weight: 700;
}

#sidebar-categories .list-group-item.active::before {
  background: var(--studio-purple);
  box-shadow: 0 0 0 4px rgba(157, 108, 255, 0.12);
}

#sidebar-latest img {
  width: 36px !important;
  height: 36px !important;
  object-fit: cover;
  border-radius: 8px !important;
}

#sidebar-latest .list-group-item {
  transition: background 0.16s ease;
}

#sidebar-latest .list-group-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* =========================================================================
   08. ESPACE MEMBRE
   ========================================================================= */
.member-intro {
  position: relative;
  overflow: hidden;
  border-radius: var(--studio-radius-xl);
  background:
    radial-gradient(circle at 87% 18%, rgba(101, 220, 229, 0.13), transparent 24%),
    linear-gradient(125deg, rgba(27, 21, 47, 0.92), rgba(15, 15, 24, 0.9));
}

.member-intro .card-body {
  min-height: 180px;
  padding: clamp(1.4rem, 3vw, 2.4rem);
}

.member-intro h1 {
  max-width: 750px;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
}

.member-intro-icon {
  display: grid;
  width: 112px;
  height: 112px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  font-size: 3.3rem;
  background: radial-gradient(circle, rgba(157, 108, 255, 0.38), rgba(157, 108, 255, 0.07) 58%, transparent 59%);
  box-shadow: 0 0 0 16px rgba(157, 108, 255, 0.035), 0 0 0 34px rgba(101, 220, 229, 0.018);
}

.profile-spotlight {
  overflow: hidden;
  border-color: rgba(157, 108, 255, 0.2);
  background:
    radial-gradient(circle at 8% 15%, rgba(157, 108, 255, 0.14), transparent 35%),
    rgba(18, 18, 28, 0.88);
}

.member-profile-hero .card-body {
  padding: 1.6rem;
}

.member-avatar-lg img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 3px solid rgba(157, 108, 255, 0.58);
  box-shadow: 0 0 0 6px rgba(157, 108, 255, 0.08), 0 15px 30px rgba(0, 0, 0, 0.26);
}

.member-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--studio-border);
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.025);
}

/* Panneaux de réglages : la classe porte désormais un div interne, plus la
   colonne Bootstrap — les gouttières et les bordures ne se chevauchent plus. */
.member-setting-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.25rem;
  border: 1px solid var(--studio-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}

.member-setting-panel form {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.member-setting-panel form > .btn:last-child {
  margin-top: auto;
}

#member-settings h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem !important;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--studio-border);
  color: #ece9f2;
  font-size: 0.92rem;
  font-weight: 750;
}

#member-settings h4 i {
  color: var(--studio-purple);
}

.member-setting-danger {
  border-color: rgba(255, 123, 117, 0.2);
  background: rgba(255, 123, 117, 0.03);
}

.member-setting-danger h4 {
  color: var(--studio-coral) !important;
}

.member-setting-danger h4 i {
  color: var(--studio-coral);
}

/* Connexion / inscription ------------------------------------------------ */
.auth-card {
  overflow: hidden;
  border-radius: var(--studio-radius-lg);
}

.auth-card .card-header {
  background: linear-gradient(90deg, rgba(157, 108, 255, 0.1), transparent);
}

.auth-card-register .card-header {
  background: linear-gradient(90deg, rgba(101, 220, 229, 0.09), transparent);
}

.auth-card .card-body {
  padding: clamp(1.2rem, 3vw, 1.7rem);
}

.form-stacked .form-label {
  font-weight: 700;
}

.form-stacked .btn {
  margin-top: 0.35rem;
}

/* Favoris synchronisés --------------------------------------------------- */
.favorites-panel {
  overflow: hidden;
}

.favorites-panel #member-fav-list {
  border-top: 1px solid var(--studio-border);
}

.member-fav-row {
  gap: 0.9rem;
  padding: 0.85rem 0.25rem;
  transition: background 0.16s ease;
}

.member-fav-row:hover {
  background: rgba(255, 255, 255, 0.025);
}

.member-fav-cover {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid var(--studio-border-strong);
  border-radius: 11px !important;
}

.member-fav-title {
  color: var(--studio-text);
  font-size: 0.92rem;
  font-weight: 700;
}

/* Actions en grappe horizontale d'icônes : la colonne verticale de 170 px
   mangeait la moitié de la ligne sur les écrans moyens. */
.member-fav-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.35rem;
}

.member-fav-actions .btn {
  min-width: 36px;
  min-height: 36px;
  padding: 0.4rem 0.55rem;
}

.member-fav-play {
  transition: transform 0.15s ease;
}

.member-fav-play:hover {
  transform: translateY(-1px) scale(1.04);
}

#member-fav-pagination {
  padding-top: 0.9rem;
  border-top: 1px solid var(--studio-border);
}

/* =========================================================================
   09. ADMINISTRATION
   ========================================================================= */
.admin-login-card {
  max-width: 720px;
  margin: 4rem auto;
  overflow: hidden;
  text-align: center;
  border-radius: var(--studio-radius-xl);
  background:
    radial-gradient(circle at 50% 0%, rgba(157, 108, 255, 0.2), transparent 44%),
    rgba(17, 17, 27, 0.93);
}

.admin-login-card .card-body {
  padding: clamp(2rem, 6vw, 4rem);
}

.admin-login-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.2rem;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--studio-purple), #5b37bc);
  box-shadow: 0 14px 30px rgba(112, 70, 223, 0.3);
}

.admin-login-card h1 {
  margin-top: 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
}

.admin-login-card form {
  max-width: 500px;
  margin: 1.7rem auto 0;
}

.admin-login-error {
  max-width: 500px;
  margin: 1.2rem auto 0;
}

.admin-dashboard-shell {
  border-radius: var(--studio-radius-xl);
  background: rgba(14, 14, 22, 0.86);
}

.admin-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  min-height: 116px;
  padding: 1.5rem 1.7rem;
  background:
    radial-gradient(circle at 80% 0%, rgba(101, 220, 229, 0.08), transparent 35%),
    linear-gradient(110deg, rgba(157, 108, 255, 0.08), transparent 60%) !important;
}

.admin-dashboard-header .card-title {
  font-size: 1.55rem;
}

.admin-header-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--studio-purple), #6440c9);
  box-shadow: 0 10px 25px rgba(112, 70, 223, 0.28);
}

.admin-dashboard-shell > .card-body {
  padding: 1.35rem;
}

/* Navigation interne de l'admin (ancres) --------------------------------- */
.admin-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.35rem;
  padding: 0.5rem;
  border: 1px solid var(--studio-border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-section-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--studio-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s ease, background 0.16s ease;
}

.admin-section-nav a:hover {
  color: #fff;
  background: rgba(157, 108, 255, 0.16);
}

.admin-section-nav a i {
  color: var(--studio-purple);
}

/* Tuiles de métriques : une seule grille, une seule densité --------------- */
.admin-stat-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  margin-bottom: 1.35rem;
}

.admin-stat-card,
.admin-stat-card-sm {
  height: 100%;
  margin: 0;
  border-color: var(--studio-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.admin-stat-card:hover,
.admin-stat-card-sm:hover {
  transform: translateY(-3px);
  border-color: rgba(157, 108, 255, 0.24);
  background: rgba(157, 108, 255, 0.045);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.admin-stat-card .card-body,
.admin-stat-card-sm .card-body {
  padding: 0.95rem 1rem;
}

.admin-stat-icon,
.admin-stat-icon-sm {
  width: 42px;
  height: 42px;
  margin-right: 0.85rem;
  border-radius: 12px;
  font-size: 1.05rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.admin-stat-icon-sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 0.92rem;
  margin-right: 0.7rem;
}

.admin-stat-value {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.15;
}

.admin-stat-value-sm {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.15;
}

.admin-stat-label {
  margin-top: 0.2rem;
  color: var(--studio-faint);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Panneaux ---------------------------------------------------------------- */
.admin-panel {
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
}

.admin-panel .card-header {
  min-height: 50px;
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.022);
}

.admin-panel .card-header .fw-semibold {
  font-family: "Manrope", sans-serif;
  font-weight: 750 !important;
  letter-spacing: -0.02em;
}

.admin-panel .list-group-item {
  border-color: var(--studio-border);
  color: var(--studio-text-soft);
  background: transparent;
}

.admin-top-rank {
  background: linear-gradient(135deg, var(--studio-purple), #6240c4);
}

.admin-top-cover,
.admin-song-thumb {
  border: 1px solid var(--studio-border-strong);
  border-radius: 9px;
  background: #0a0a0f;
}

.admin-plays-badge {
  padding: 0.3em 0.65em;
  border-radius: 7px;
  color: #b795ff;
  background: rgba(157, 108, 255, 0.15);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-table-wrapper thead th {
  background: #15151f;
}

.admin-song-row td:first-child {
  color: var(--studio-faint);
}

.admin-song-row:hover .drag-handle {
  color: var(--studio-purple) !important;
}

/* Bloc « accès Suno » ----------------------------------------------------- */
#suno-credentials {
  border: 1px solid var(--studio-border) !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, 0.02);
}

#suno-credentials .form-control {
  min-height: 40px;
}

/* Import Suno : c'était une .card.song-card, qui héritait de l'habillage
   des lignes du catalogue (survol, translation). Classe corrigée en
   .admin-panel côté template. */
.admin-import-panel .card-header {
  display: block;
}

.admin-import-panel .card-title {
  margin-bottom: 0.15rem;
}

/* =========================================================================
   10. MINI-LECTEUR, TOASTS, PAGE DE PARTAGE
   ========================================================================= */
#zarctus-miniplayer {
  min-height: 74px;
  padding: 0.65rem max(1rem, calc((100vw - 1540px) / 2));
  border-top: 1px solid rgba(157, 108, 255, 0.26);
  background: rgba(12, 12, 19, 0.96);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

#zarctus-miniplayer .mp-cover {
  width: 48px;
  height: 48px;
  border: 1px solid var(--studio-border-strong);
  border-radius: 10px;
}

#zarctus-miniplayer .mp-title {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#zarctus-miniplayer .mp-category {
  color: #b795ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#zarctus-miniplayer .mp-controls button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: none;
  border-radius: 50%;
  color: #c9c5d6;
  font-size: 0.95rem;
  background: none;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

#zarctus-miniplayer .mp-controls button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

#zarctus-miniplayer .mp-controls .mp-btn-play {
  width: 44px;
  height: 44px;
  color: #fff;
  font-size: 1.05rem;
  background: linear-gradient(135deg, var(--studio-purple), var(--studio-purple-deep));
  box-shadow: 0 8px 18px rgba(112, 70, 223, 0.32);
}

#zarctus-miniplayer .mp-controls .mp-btn-play:hover {
  background: linear-gradient(135deg, #ad82ff, #7950e7);
}

#zarctus-miniplayer .mp-progress-bar {
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

#zarctus-miniplayer .mp-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--studio-gradient);
  transition: width 0.1s linear;
}

#zarctus-miniplayer .mp-time {
  min-width: 38px;
  color: var(--studio-faint);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

#zarctus-miniplayer .mp-volume input[type="range"] {
  width: 74px;
  accent-color: var(--studio-purple);
}

#zarctus-miniplayer .mp-volume i {
  color: var(--studio-faint);
}

#zarctus-miniplayer .mp-close {
  border: none;
  color: var(--studio-faint);
  background: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.18s ease;
}

#zarctus-miniplayer .mp-close:hover {
  color: var(--studio-coral);
}

.zarctus-toast {
  border: 1px solid var(--studio-border-strong);
  border-radius: 12px;
  color: #fff;
  font-size: 0.88rem;
  background: rgba(20, 20, 30, 0.96);
  box-shadow: var(--studio-shadow);
  backdrop-filter: blur(14px);
}

.zarctus-toast.toast-fav-add i { color: var(--studio-coral); }
.zarctus-toast.toast-fav-remove i { color: var(--studio-faint); }
.zarctus-toast.toast-success i { color: var(--studio-green); }
.zarctus-toast.toast-info i { color: var(--studio-cyan); }

/* Pied de page ------------------------------------------------------------ */
.footer {
  padding: 2rem 0 2.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--studio-faint);
  background: transparent;
}

.footer-copy {
  font-size: 0.78rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.footer-links a {
  color: var(--studio-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

/* Page de partage (share.php) — même système que le reste du site -------- */
body.zarctus-share {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 3.5rem 0;
}

.share-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  padding: 1rem;
}

.share-card {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius-xl);
  background:
    radial-gradient(circle at 50% 0%, rgba(157, 108, 255, 0.16), transparent 46%),
    rgba(17, 17, 27, 0.9);
  box-shadow: var(--studio-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.share-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--studio-border-strong);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.share-title {
  color: #fff;
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.share-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--studio-muted);
  font-size: 0.82rem;
}

.share-player,
.share-player audio {
  width: 100%;
}

.share-actions .btn {
  border-radius: 999px;
}

.share-back {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

/* =========================================================================
   11. RESPONSIVE & IMPRESSION
   ========================================================================= */
@media (min-width: 992px) {
  .app-sidebar {
    position: sticky;
    top: 68px;
  }

  .song-card-row {
    flex-wrap: nowrap;
  }

  .song-card-player {
    flex: 1 1 210px;
    max-width: 300px;
  }

  .song-card-actions {
    flex: 0 0 auto;
    justify-content: flex-end;
  }
}

@media (max-width: 1199.98px) {
  .library-hero {
    min-height: 218px;
  }

  .song-card-player {
    order: 4;
    flex: 1 1 100%;
    max-width: none;
  }

  .song-card-actions {
    margin-left: auto;
  }
}

@media (max-width: 991.98px) {
  .app-content {
    padding-top: 1rem;
  }

  .app-sidebar {
    order: 2 !important;
  }

  .main-stage {
    order: 1 !important;
  }

  /* Sur mobile, la colonne latérale du catalogue se réduit aux catégories :
     stats et « récentes » font doublon avec la page. */
  .app-sidebar--catalog > .card:not(:has(#sidebar-categories)) {
    display: none;
  }

  /* La colonne membre ne fait que répéter la carte de profil de la page. */
  .app-sidebar--member {
    display: none;
  }

  /* La colonne admin, elle, porte l'unique formulaire de création de
     catégorie : elle reste accessible sur mobile, repliée en haut de page. */
  .app-sidebar--admin {
    order: 1 !important;
  }

  #sidebar-categories .list-group {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 0.4rem;
    padding: 0.65rem;
    scrollbar-width: none;
  }

  #sidebar-categories .list-group::-webkit-scrollbar {
    display: none;
  }

  #sidebar-categories .list-group-item {
    width: auto;
    flex: 0 0 auto;
    border: 1px solid var(--studio-border) !important;
    border-radius: 999px !important;
    white-space: nowrap;
  }

  #sidebar-categories .list-group-item::before {
    display: none;
  }

}

@media (max-width: 767.98px) {
  .container-xxl {
    width: min(100% - 1rem, 1540px);
  }

  .app-topbar,
  .app-topbar .container-xxl {
    min-height: 64px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .brand-copy small {
    display: none;
  }

  .app-nav .navbar {
    padding: 0.35rem 0 0.65rem;
  }

  .app-nav .nav-link {
    min-height: 42px;
    padding: 0.65rem 0.8rem;
    border-radius: 9px;
  }

  .app-nav .nav-item.active::after {
    display: none;
  }

  .app-nav .nav-item.active .nav-link {
    background: rgba(157, 108, 255, 0.12);
  }

  .library-hero {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 1.5rem 1.15rem;
  }

  .library-heading h1 {
    font-size: clamp(1.8rem, 9vw, 2.5rem);
  }

  .library-heading p {
    font-size: 0.9rem;
  }

  .library-hero-actions {
    width: 100%;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .catalog-count {
    align-items: flex-start;
  }

  .catalog-count strong {
    font-size: 2rem;
  }

  .songs-filters {
    padding: 0.6rem;
  }

  .songs-filters-toggle,
  .songs-filters-toggle > div {
    width: 100%;
    justify-content: space-between;
  }

  .song-card .card-song {
    padding: 0.8rem !important;
  }

  .song-card-cover {
    width: 52px;
    height: 52px;
  }

  .song-card-body {
    flex: 1 1 calc(100% - 68px);
  }

  .song-card-title {
    max-width: calc(100vw - 130px);
  }

  .song-card-actions {
    display: grid !important;
    width: 100%;
    grid-template-columns: repeat(4, 1fr);
  }

  .song-card-actions .btn {
    min-width: 0;
  }

  .member-intro-icon {
    position: absolute;
    top: 50%;
    right: -24px;
    width: 95px;
    height: 95px;
    opacity: 0.36;
    transform: translateY(-50%);
  }

  .member-intro .card-body > div {
    position: relative;
    z-index: 1;
    max-width: 86%;
  }

  .member-profile-hero .card-body > .d-flex {
    align-items: flex-start !important;
  }

  .member-profile-hero .flex-shrink-0:last-child {
    width: 100%;
  }

  .member-profile-hero .flex-shrink-0:last-child .btn {
    width: 100%;
  }

  .member-fav-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .admin-dashboard-header {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-dashboard-header > .d-flex:last-child {
    width: 100%;
  }

  .admin-dashboard-header > .d-flex:last-child .btn {
    flex: 1;
  }

  .admin-section-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .admin-section-nav::-webkit-scrollbar {
    display: none;
  }

  #zarctus-miniplayer {
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
  }
}

@media (max-width: 420px) {
  .library-hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .song-card-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .song-card-actions .btn {
    width: 100%;
  }

  .admin-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover:not(:disabled):not(.disabled),
  .song-card:hover,
  .admin-stat-card:hover {
    transform: none;
  }
}

@media print {
  .app-topbar,
  .app-nav,
  .app-sidebar,
  .songs-filters,
  .song-card-actions,
  .admin-section-nav,
  #zarctus-miniplayer,
  #zarctus-toast-container,
  .footer {
    display: none !important;
  }

  body.zarctus-app {
    color: #000;
    background: #fff;
  }

  .card {
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: none;
  }
}
