* {
  box-sizing: border-box;
}

:root {
  --panel: rgba(18, 18, 44, 0.64);
  --border: rgba(150, 165, 255, 0.34);
  --blue: #5865f2;
  --purple: #9d6cff;
  --pink: #d84dff;
  --text: #f6f4ff;
  --muted: #cfc9ed;
  --green: #66ff9a;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: #060313;
}

.hidden {
  display: none !important;
}

.background {
  position: fixed;
  inset: 0;
  background-image: url("media-web/Background_Soundboard.jpeg");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.02), rgba(0,0,0,0.22));
}

.panel,
.sidebar {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.035) inset,
    0 20px 70px rgba(0,0,0,0.34);
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.35);
}

.login-card {
  width: min(430px, 90vw);
  padding: 30px;
  text-align: center;
}

.login-card img {
  width: 280px;
  max-width: 80%;
  margin-bottom: 10px;
}

.login-card input {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(150,165,255,.35);
  background: rgba(8,8,24,.62);
  color: white;
  font-weight: 700;
}

.login-card button {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
}

.main-logo {
  position: fixed;
  top: 0;
  left: 50%;
  width: min(520px, 35vw);
  transform: translateX(-50%);
  z-index: 5;
}

.discord-neon {
  position: fixed;
  left: 50%;
  top: 59%;
  width: min(1080px, 68vw);
  transform: translate(-50%, -50%);
  opacity: 0.58;
  z-index: 1;
  filter:
    drop-shadow(0 0 18px rgba(255, 60, 230, 0.55))
    drop-shadow(0 0 52px rgba(135, 80, 255, 0.45));
  pointer-events: none;
}

.app-shell {
  position: relative;
  z-index: 3;
  width: min(1320px, 88vw);
  height: 58vh;
  margin: 325px auto 0;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 20px;
}

.sidebar {
  padding: 20px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(30,30,72,.66), rgba(18,18,44,.54));
}

.profile {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
  font-weight: 900;
}

.profile h2 {
  margin: 0;
  font-size: 18px;
}

.profile p {
  margin: 4px 0 0;
  color: var(--green);
  font-size: 12px;
}

nav {
  display: grid;
  gap: 10px;
}

nav button {
  border: 0;
  border-radius: 14px;
  padding: 14px;
  text-align: left;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

nav button.active,
nav button:hover {
  color: white;
  background: linear-gradient(90deg, rgba(88,101,242,.58), rgba(157,108,255,.38));
}

.members-box {
  margin-top: auto;
  padding: 16px;
  border-radius: 16px;
  background: rgba(9, 10, 30, 0.55);
  border: 1px solid rgba(102, 255, 154, 0.24);
}

.members-box strong {
  display: block;
  color: var(--green);
  margin-bottom: 10px;
}

.member {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.member::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.main-panel {
  padding: 32px;
  background: linear-gradient(180deg, rgba(30,30,72,.64), rgba(24,18,58,.56));
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

h1 {
  margin: 0;
  font-size: 30px;
}

.section-title span {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.sound-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 20px;
}

.sound-grid button {
  min-height: 120px;
  border: 1px solid rgba(145, 150, 255, 0.34);
  border-radius: 20px;
  background: rgba(19, 18, 48, 0.72);
  color: white;
  font-size: 36px;
  cursor: pointer;
  transition: 0.16s ease;
}

.sound-grid button:hover {
  transform: translateY(-2px);
  background: rgba(88, 101, 242, 0.35);
}

.sound-grid span {
  display: block;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 900;
}

.add-sound {
  color: #ff9df1 !important;
}

.sound-list,
.stats-grid {
  display: grid;
  gap: 12px;
}

.sound-list div,
.stats-grid div,
.empty-state,
.settings-box {
  padding: 18px;
  border-radius: 16px;
  background: rgba(19, 18, 48, 0.65);
  border: 1px solid rgba(145, 150, 255, 0.28);
  color: var(--muted);
}

.stats-grid {
  grid-template-columns: repeat(2, 1fr);
}

.stats-grid strong {
  display: block;
  color: white;
  font-size: 32px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  background: rgba(0, 0, 0, 0.50);
}

.modal-backdrop.active {
  display: grid;
}

.editor-modal {
  position: relative;
  width: min(980px, 88vw);
  padding: 28px;
  background: rgba(18, 18, 44, 0.78);
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: white;
  font-size: 26px;
  cursor: pointer;
}

.upload-zone {
  height: 110px;
  border: 1px dashed rgba(210, 160, 255, 0.52);
  border-radius: 18px;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(8, 8, 24, 0.48);
  cursor: pointer;
}

.editor-tools {
  display: none;
  margin-top: 20px;
}

.editor-tools.active {
  display: block;
}

#waveCanvas {
  width: 100%;
  height: 150px;
  border-radius: 16px;
  background: rgba(8, 8, 24, 0.65);
}

.trim-row {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--purple);
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

#audioPreview {
  width: 100%;
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.editor-actions button {
  border: 0;
  border-radius: 14px;
  padding: 14px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
}
/* PATCH V7.1 - Profil, membres connectés, favoris/statistiques */

.avatar.image-avatar,
#settingsAvatar.image-avatar {
  background-size: cover !important;
  background-position: center !important;
  color: transparent !important;
}

.avatar.big {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  font-size: 22px;
}

.profile-setting-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.profile-setting-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.settings-btn {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
}

.member {
  display: grid !important;
  grid-template-columns: 10px 28px 1fr;
  align-items: center;
  gap: 8px;
}

.member::before {
  content: none !important;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 8px rgba(102,255,154,.75);
}

.member-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
  color: white;
}

.sound-grid button small {
  display: block;
  margin-top: 6px;
  color: rgba(246,244,255,.65);
  font-size: 11px;
  font-weight: 800;
}

.stats-title {
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 20px;
}

.button-stats {
  display: grid;
  gap: 10px;
}

.button-stats div {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  border-radius: 14px;
  background: rgba(19, 18, 48, 0.65);
  border: 1px solid rgba(145, 150, 255, 0.28);
}

.button-stats strong {
  color: var(--green);
}
/* PATCH V7.2 - Lecteur audio custom mauve */

#audioPreview {
  display: none;
}

.custom-player {
  width: 100%;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(88,101,242,.78), rgba(157,108,255,.72), rgba(216,77,255,.68));
  display: grid;
  grid-template-columns: 42px 1fr 105px 42px;
  gap: 12px;
  align-items: center;
  box-shadow:
    inset 0 0 18px rgba(255,255,255,.08),
    0 0 22px rgba(157,108,255,.25);
}

.player-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(10, 8, 28, .55);
  font-weight: 900;
  cursor: pointer;
}

.player-btn:hover {
  background: rgba(255,255,255,.16);
}

.player-timeline {
  height: 8px;
  border-radius: 999px;
  background: rgba(10, 8, 28, .55);
  overflow: hidden;
  cursor: pointer;
}

.player-progress {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffffff, #59e6ff);
  box-shadow: 0 0 12px rgba(255,255,255,.65);
}

#playerTime {
  font-size: 13px;
  font-weight: 800;
  color: white;
  text-align: center;
}
/* PATCH V7.3 - Slider durée + lecteur synchronisé */

.two-sliders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.two-sliders label {
  min-width: 0;
}

.custom-player {
  grid-template-columns: 42px 1fr 110px 42px !important;
}

.player-timeline {
  position: relative;
}

.player-timeline::after {
  content: "Extrait sélectionné";
  position: absolute;
  left: 0;
  top: -22px;
  font-size: 11px;
  color: rgba(246,244,255,.65);
  font-weight: 800;
}
/* PATCH V7.4 - Lecteur de référence + curseur rouge */

.reference-player {
  display: grid;
  grid-template-columns: 42px 1fr 115px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(8, 8, 24, 0.58);
  border: 1px solid rgba(145, 150, 255, 0.28);
}

#referenceSeek {
  width: 100%;
  accent-color: #ff3b3b;
}

#referenceTime {
  font-size: 13px;
  font-weight: 900;
  color: white;
  text-align: right;
}

.editor-actions {
  grid-template-columns: 1fr !important;
}

.player-progress {
  background: linear-gradient(90deg, #ff3bff, #59e6ff) !important;
}

#waveCanvas {
  cursor: crosshair;
}
.logout-btn {
  width: 100%;
  margin-bottom: 18px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 120, 160, 0.35);
  border-radius: 13px;
  color: #ffd7e3;
  background: rgba(255, 60, 120, 0.12);
  font-weight: 900;
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(255, 60, 120, 0.22);
}
/* PATCH V7.5 - Déconnexion en haut à droite */

.logout-btn {
  padding: 11px 16px;
  border: 1px solid rgba(255, 120, 160, 0.35);
  border-radius: 14px;
  color: #ffd7e3;
  background: rgba(255, 60, 120, 0.14);
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.logout-btn:hover {
  background: rgba(255, 60, 120, 0.24);
}

.top-logout {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 60;
}
/* PATCH V7.5 - Déconnexion en haut à droite */

.logout-btn {
  padding: 11px 16px;
  border: 1px solid rgba(255, 120, 160, 0.35);
  border-radius: 14px;
  color: #ffd7e3;
  background: rgba(255, 60, 120, 0.14);
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.logout-btn:hover {
  background: rgba(255, 60, 120, 0.24);
}

.top-logout {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 60;
}
/* PATCH V7.5 FIX - Déconnexion en haut à droite */

.logout-btn {
  padding: 11px 16px;
  border: 1px solid rgba(255, 120, 160, 0.35);
  border-radius: 14px;
  color: #ffd7e3;
  background: rgba(255, 60, 120, 0.14);
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.logout-btn:hover {
  background: rgba(255, 60, 120, 0.24);
}

.top-logout {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 60;
}
/* PATCH V7.5.1 - Corrige bouton déconnexion */

.top-logout {
  position: fixed !important;
  top: 22px !important;
  right: 28px !important;
  left: auto !important;
  width: auto !important;
  min-width: 130px !important;
  max-width: 180px !important;
  z-index: 60 !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
}

.logout-btn {
  width: auto !important;
  margin: 0 !important;
  padding: 11px 18px !important;
}
/* PATCH V7.6 - Logo animé + paramètres password */

.main-logo {
  animation: chillLogoPulse 3.8s ease-in-out infinite, chillLogoGlitch 9s infinite;
  transform-origin: center;
}

@keyframes chillLogoPulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 12px rgba(89,230,255,.45))
      drop-shadow(0 0 24px rgba(216,77,255,.45));
  }
  50% {
    filter:
      drop-shadow(0 0 22px rgba(89,230,255,.85))
      drop-shadow(0 0 46px rgba(216,77,255,.75));
  }
}

@keyframes chillLogoGlitch {
  0%, 92%, 100% { transform: translateX(-50%) skew(0deg); }
  93% { transform: translateX(calc(-50% - 2px)) skew(1deg); }
  94% { transform: translateX(calc(-50% + 3px)) skew(-1deg); }
  95% { transform: translateX(-50%) skew(0deg); }
}

.settings-box input {
  width: 100%;
  margin-top: 10px;
  padding: 13px;
  border-radius: 13px;
  border: 1px solid rgba(150,165,255,.35);
  background: rgba(8,8,24,.62);
  color: white;
  font-weight: 700;
}

.settings-message {
  margin-top: 10px;
  font-weight: 800;
}

.settings-message.success {
  color: var(--green);
}

.settings-message.error {
  color: #ff8aa8;
}
/* PATCH ADMIN - Gestion des comptes */

.admin-create-box,
.admin-users-box {
  padding: 18px;
  border-radius: 16px;
  background: rgba(19, 18, 48, 0.65);
  border: 1px solid rgba(145, 150, 255, 0.28);
  margin-bottom: 18px;
}

.admin-create-box h2,
.admin-users-box h2 {
  margin-top: 0;
}

.admin-create-box input,
.admin-create-box select,
.admin-user-row input,
.admin-user-row select {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(150,165,255,.35);
  background: rgba(8,8,24,.62);
  color: white;
  font-weight: 700;
}

.admin-create-box button,
.admin-user-row button {
  margin-top: 10px;
  padding: 11px 13px;
  border: 0;
  border-radius: 12px;
  color: white;
  font-weight: 900;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
}

.admin-user-row {
  display: grid;
  grid-template-columns: 1.2fr .8fr 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  margin-top: 10px;
  border-radius: 14px;
  background: rgba(8,8,24,.42);
  border: 1px solid rgba(145,150,255,.20);
}

.admin-user-row strong {
  color: white;
}

.admin-user-row small {
  color: var(--muted);
}

.admin-user-row .danger {
  background: rgba(255, 70, 120, 0.25);
  border: 1px solid rgba(255, 110, 150, 0.35);
}

#adminMessage.success {
  color: var(--green);
  font-weight: 900;
}

#adminMessage.error {
  color: #ff8aa8;
  font-weight: 900;
}
/* PATCH V7.8 - Surnom public */

.settings-label {
  display: block;
  margin-top: 12px;
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 900;
}
/* PATCH V7.9 - Scroll admin + logo lo-fi + surnom admin */

body {
  overflow: hidden;
}

.main-panel {
  overflow: hidden !important;
}

.page {
  max-height: calc(58vh - 64px);
  overflow-y: auto;
  padding-right: 10px;
}

.page::-webkit-scrollbar {
  width: 10px;
}

.page::-webkit-scrollbar-track {
  background: rgba(8, 8, 24, 0.35);
  border-radius: 999px;
}

.page::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blue), var(--purple));
  border-radius: 999px;
}

.main-logo {
  animation: lofiFloatLogo 5.5s ease-in-out infinite !important;
  filter:
    drop-shadow(0 0 14px rgba(89,230,255,.48))
    drop-shadow(0 0 26px rgba(157,108,255,.50))
    drop-shadow(0 8px 22px rgba(0,0,0,.22)) !important;
}

@keyframes lofiFloatLogo {
  0%, 100% {
    transform: translateX(-50%) translateY(0px);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

.admin-user-row {
  grid-template-columns: 1.25fr 1fr .8fr 1fr auto auto auto !important;
}

.admin-user-row input,
.admin-user-row select {
  min-width: 0;
}

@media (max-width: 1200px) {
  .admin-user-row {
    grid-template-columns: 1fr !important;
  }

  .page {
    max-height: none;
  }

  body {
    overflow: auto;
  }
}
/* PATCH V7.9 - Scroll admin + logo lo-fi + surnom admin */

body {
  overflow: hidden;
}

.main-panel {
  overflow: hidden !important;
}

.page {
  max-height: calc(58vh - 64px);
  overflow-y: auto;
  padding-right: 10px;
}

.page::-webkit-scrollbar {
  width: 10px;
}

.page::-webkit-scrollbar-track {
  background: rgba(8, 8, 24, 0.35);
  border-radius: 999px;
}

.page::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blue), var(--purple));
  border-radius: 999px;
}

.main-logo {
  animation: lofiFloatLogo 5.5s ease-in-out infinite !important;
  filter:
    drop-shadow(0 0 14px rgba(89,230,255,.48))
    drop-shadow(0 0 26px rgba(157,108,255,.50))
    drop-shadow(0 8px 22px rgba(0,0,0,.22)) !important;
}

@keyframes lofiFloatLogo {
  0%, 100% {
    transform: translateX(-50%) translateY(0px);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

.admin-user-row {
  grid-template-columns: 1.25fr 1fr .8fr 1fr auto auto auto !important;
}

.admin-user-row input,
.admin-user-row select {
  min-width: 0;
}

@media (max-width: 1200px) {
  .admin-user-row {
    grid-template-columns: 1fr !important;
  }

  .page {
    max-height: none;
  }

  body {
    overflow: auto;
  }
}
/* PATCH V8 - Accueil OAuth Discord propre */

.login-screen {
  background: rgba(0, 0, 0, 0.12) !important;
}

.login-card {
  margin-top: 120px;
}

.login-card img {
  display: none !important;
}

.discord-login-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  color: white;
  text-decoration: none;
  font-weight: 900;
  background: linear-gradient(135deg, #5865f2, #7289da);
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.32);
}

.discord-login-btn:hover {
  filter: brightness(1.12);
}

.main-logo {
  z-index: 70 !important;
  opacity: 1 !important;
  filter:
    drop-shadow(0 0 18px rgba(89,230,255,.72))
    drop-shadow(0 0 34px rgba(157,108,255,.65)) !important;
}

.login-screen .login-card {
  z-index: 80;
}

.top-logout.hidden {
  display: none !important;
}
/* PATCH V8 - Accueil OAuth Discord propre */

.login-screen {
  background: rgba(0, 0, 0, 0.12) !important;
}

.login-card {
  margin-top: 120px;
}

.login-card img {
  display: none !important;
}

.discord-login-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  color: white;
  text-decoration: none;
  font-weight: 900;
  background: linear-gradient(135deg, #5865f2, #7289da);
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.32);
}

.discord-login-btn:hover {
  filter: brightness(1.12);
}

.main-logo {
  z-index: 70 !important;
  opacity: 1 !important;
  filter:
    drop-shadow(0 0 18px rgba(89,230,255,.72))
    drop-shadow(0 0 34px rgba(157,108,255,.65)) !important;
}

.login-screen .login-card {
  z-index: 80;
}

.top-logout.hidden {
  display: none !important;
}
/* PATCH V8.1 - Login Discord seulement */

.login-card {
  width: min(460px, 90vw);
  padding: 34px;
}

.login-card h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.login-card p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 22px;
}

.discord-login-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  font-size: 16px;
  border: 1px solid rgba(150, 165, 255, 0.45);
}

.discord-login-btn::before {
  content: "☯";
  margin-right: 10px;
  font-size: 20px;
}



/* PATCH V8.4 - Bouton retour accueil ChillRoom */
.home-return-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  background: rgba(18, 12, 38, 0.72);
  border: 1px solid rgba(255, 82, 220, 0.55);
  box-shadow: 0 0 18px rgba(255, 64, 220, 0.48), inset 0 0 18px rgba(91, 135, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.home-return-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(255, 64, 220, 0.68), inset 0 0 22px rgba(91, 135, 255, 0.22);
}

.home-return-arrow {
  font-size: 30px;
  line-height: 1;
  color: #ff5de8;
}

.home-return-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.home-return-text strong {
  font-size: 15px;
  font-weight: 900;
}

.home-return-text small {
  margin-top: 5px;
  font-size: 12px;
  opacity: 0.78;
}

@media (max-width: 700px) {
  .home-return-btn {
    top: 14px;
    left: 14px;
    padding: 11px 13px;
  }

  .home-return-text small {
    display: none;
  }
}

/* PATCH V8.4 - Bouton retour accueil ChillRoom */
.home-return-btn {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  background: rgba(18, 12, 38, 0.72);
  border: 1px solid rgba(255, 82, 220, 0.55);
  box-shadow: 0 0 18px rgba(255, 64, 220, 0.48), inset 0 0 18px rgba(91, 135, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.home-return-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(255, 64, 220, 0.68), inset 0 0 22px rgba(91, 135, 255, 0.22);
}

.home-return-arrow {
  font-size: 30px;
  line-height: 1;
  color: #ff5de8;
}

.home-return-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.home-return-text strong {
  font-size: 15px;
  font-weight: 900;
}

.home-return-text small {
  margin-top: 5px;
  font-size: 12px;
  opacity: 0.78;
}

@media (max-width: 700px) {
  .home-return-btn {
    top: 14px;
    left: 14px;
    padding: 11px 13px;
  }

  .home-return-text small {
    display: none;
  }
}

/* PATCH_V104_HOME_BUTTON_FIX */
.home-return-arrow {
  display: none !important;
}

.home-return-btn {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.auth-status-text {
  margin: 0 0 14px 0;
  font-size: 0.92rem;
  opacity: 0.82;
}

/* PATCH_V105_AUTH_BRIDGE_STYLE */
.home-return-arrow {
  display: none !important;
}

.home-return-btn {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.home-return-text {
  letter-spacing: 0.01em;
}

.auth-status-text {
  margin: 0 0 14px 0;
  font-size: 0.92rem;
  opacity: 0.82;
}

/* PATCH_V1014_UI_TEXT_FIX */
.home-return-arrow {
  display: none !important;
}

.home-return-btn {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.sound-icon,
.nav-icon,
.tab-icon,
.button-icon,
.icon {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", system-ui, sans-serif !important;
}
/* ==========================================================
   PATCH V10.21 - Harmonisation boutons global
   ========================================================== */

.top-btn {
  position: fixed;
  top: 24px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;

  background: rgba(18, 12, 38, 0.72);
  border: 1px solid rgba(255, 82, 220, 0.55);

  color: #fff;
  text-decoration: none;

  box-shadow:
    0 0 18px rgba(255, 64, 220, 0.48),
    inset 0 0 18px rgba(91, 135, 255, 0.14);

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  transition: all 0.2s ease;
}

.top-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 28px rgba(255, 64, 220, 0.68),
    inset 0 0 22px rgba(91, 135, 255, 0.22);
}

/* Position */
.top-btn-left {
  left: 24px;
}

.top-btn-right {
  right: 24px;
}


/* PATCH_V1022_DISCORD_ONLY_UI */

#homeReturnBtn,
#logoutBtn,
.chill-top-action {
  position: fixed !important;
  top: 20px !important;
  z-index: 9999 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: 8px 16px !important;

  border-radius: 12px !important;
  border: 1px solid rgba(185, 132, 255, 0.42) !important;

  background:
    linear-gradient(135deg, rgba(91, 78, 214, 0.72), rgba(127, 55, 183, 0.72)) !important;

  color: #ffffff !important;
  text-decoration: none !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;

  box-shadow:
    0 8px 24px rgba(13, 8, 38, 0.35),
    inset 0 0 16px rgba(255, 255, 255, 0.08) !important;

  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease !important;
}

#homeReturnBtn:hover,
#logoutBtn:hover,
.chill-top-action:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(224, 171, 255, 0.72) !important;
  box-shadow:
    0 10px 28px rgba(124, 70, 255, 0.34),
    inset 0 0 18px rgba(255, 255, 255, 0.12) !important;
}

#homeReturnBtn,
.chill-top-action-left {
  left: 24px !important;
}

#logoutBtn,
.chill-top-action-right {
  right: 24px !important;
}

.discord-settings-clean {
  width: 100%;
  min-height: 100%;
}

.discord-settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.discord-settings-header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
}

.discord-settings-header span {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.discord-settings-card,
.discord-admin-notice {
  border: 1px solid rgba(170, 130, 255, 0.30);
  border-radius: 18px;
  background: rgba(23, 10, 54, 0.72);
  box-shadow: inset 0 0 28px rgba(120, 80, 255, 0.08);
  padding: 24px;
  margin-bottom: 18px;
}

.discord-settings-card h3 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 22px;
}

.discord-account-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.discord-account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.discord-account-name {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.discord-account-sub,
.discord-settings-note,
.discord-settings-card p,
.discord-admin-notice {
  color: rgba(255, 255, 255, 0.76);
  font-size: 15px;
  line-height: 1.55;
}

.discord-settings-note {
  margin-top: 18px;
}

.discord-settings-card-muted {
  opacity: 0.92;
}
/* PATCH_V1023_DISCORD_ONLY_CLEAN */

#homeReturnBtn,
#logoutBtn,
.chill-top-action {
  position: fixed !important;
  top: 20px !important;
  z-index: 9999 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: 8px 16px !important;

  border-radius: 12px !important;
  border: 1px solid rgba(185, 132, 255, 0.42) !important;

  background: linear-gradient(135deg, rgba(91, 78, 214, 0.74), rgba(127, 55, 183, 0.74)) !important;

  color: #ffffff !important;
  text-decoration: none !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;

  box-shadow:
    0 8px 24px rgba(13, 8, 38, 0.35),
    inset 0 0 16px rgba(255, 255, 255, 0.08) !important;

  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease !important;
}

#homeReturnBtn:hover,
#logoutBtn:hover,
.chill-top-action:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(224, 171, 255, 0.72) !important;
  box-shadow:
    0 10px 28px rgba(124, 70, 255, 0.34),
    inset 0 0 18px rgba(255, 255, 255, 0.12) !important;
}

#homeReturnBtn,
.chill-top-action-left {
  left: 24px !important;
}

#logoutBtn,
.chill-top-action-right {
  right: 24px !important;
}

.discord-settings-placeholder,
.discord-admin-notice {
  border: 1px solid rgba(170, 130, 255, 0.30);
  border-radius: 18px;
  background: rgba(23, 10, 54, 0.72);
  box-shadow: inset 0 0 28px rgba(120, 80, 255, 0.08);
  padding: 24px;
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.55;
}

.discord-settings-placeholder h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.discord-settings-placeholder p {
  margin: 8px 0;
}
/* PATCH_V1024_DISCORD_ONLY_FINAL */

#homeReturnBtn,
#logoutBtn,
.chill-top-action {
  position: fixed !important;
  top: 20px !important;
  z-index: 9999 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 34px !important;
  padding: 8px 16px !important;

  border-radius: 12px !important;
  border: 1px solid rgba(185, 132, 255, 0.42) !important;

  background: linear-gradient(135deg, rgba(91, 78, 214, 0.74), rgba(127, 55, 183, 0.74)) !important;

  color: #ffffff !important;
  text-decoration: none !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;

  box-shadow:
    0 8px 24px rgba(13, 8, 38, 0.35),
    inset 0 0 16px rgba(255, 255, 255, 0.08) !important;

  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

#homeReturnBtn {
  left: 24px !important;
}

#logoutBtn {
  right: 24px !important;
}

.settings-discord-only-final {
  display: grid;
  gap: 18px;
}

.discord-settings-card,
.discord-admin-notice-final {
  border: 1px solid rgba(170, 130, 255, 0.30);
  border-radius: 18px;
  background: rgba(23, 10, 54, 0.72);
  box-shadow: inset 0 0 28px rgba(120, 80, 255, 0.08);
  padding: 24px;
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.80);
  font-size: 15px;
  line-height: 1.55;
}

.discord-settings-card h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.discord-settings-card p {
  margin: 8px 0;
}

.discord-settings-card-muted {
  opacity: 0.92;
}

.discord-admin-notice-final {
  margin-top: 0;
  margin-bottom: 18px;
  font-weight: 700;
}

.admin-user-row input[id^="display-"],
.admin-user-row input[id^="pass-"],
.admin-user-row .admin-save-display,
.admin-user-row .admin-change-password {
  display: none !important;
}
/* PATCH_V1030_SIDEBAR_LABEL_CLEAN */

.nav-clean-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  min-width: 18px;
  margin-right: 6px;
  font-family: "Segoe UI Symbol", "Segoe UI Emoji", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1;
}

.nav-clean-label {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.nav-btn,
.menu-item,
button[data-page],
a[data-page] {
  gap: 0 !important;
}

/* PATCH_V1031_TOP_BUTTONS_LOCK */

#homeReturnBtn.sb-top-button-lock,
#logoutBtn.sb-top-button-lock {
  position: fixed !important;
  top: 20px !important;
  z-index: 999999 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  min-height: 34px !important;
  height: 34px !important;
  padding: 8px 16px !important;

  border-radius: 12px !important;
  border: 1px solid rgba(185, 132, 255, 0.42) !important;
  background: linear-gradient(135deg, rgba(91, 78, 214, 0.78), rgba(127, 55, 183, 0.78)) !important;

  color: #ffffff !important;
  text-decoration: none !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;

  box-shadow:
    0 8px 24px rgba(13, 8, 38, 0.35),
    inset 0 0 16px rgba(255, 255, 255, 0.08) !important;

  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;

  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  animation: none !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

#homeReturnBtn.sb-top-button-lock {
  left: 24px !important;
  right: auto !important;
}

#logoutBtn.sb-top-button-lock {
  right: 24px !important;
  left: auto !important;
}

#homeReturnBtn.sb-top-button-lock:hover,
#logoutBtn.sb-top-button-lock:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(224, 171, 255, 0.72) !important;
}

.sb-top-button-ghost-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
