:root {
  --bg: #101010;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.5);
  --badge-bg: rgba(255, 255, 255, 0.08);
  --badge-border: rgba(255, 255, 255, 0.04);
  --glow: 0 0 16.5px #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  scrollbar-width: none;
}
body::-webkit-scrollbar { display: none; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Satoshi", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #fff; color: var(--bg); }

/* ---------- Écran d'entrée ---------- */
.enter {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(16, 16, 16, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  user-select: none;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.enter span { font-size: 30px; font-weight: 700; }
.enter.hidden { opacity: 0; visibility: hidden; }

/* ---------- Volume ---------- */
.volume {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 10;
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 15px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}
body.entered .volume { opacity: 1; }

.volume-btn {
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.volume-btn svg { width: 28px; height: 28px; }
.i-off, .muted .i-on { display: none; }
.muted .i-off { display: block; }

.volume input {
  width: 0;
  margin-left: 0;
  opacity: 0;
  appearance: none;
  -webkit-appearance: none;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(var(--text), var(--text)) 0 / var(--fill, 100%) 100% no-repeat, var(--text-dim);
  cursor: pointer;
  transition: width 0.3s ease, margin 0.3s ease, opacity 0.3s ease;
}
.volume:hover input,
.volume:focus-within input { width: 110px; margin-left: 12px; opacity: 1; }
.volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 0; height: 0; }
.volume input::-moz-range-thumb { width: 0; height: 0; border: 0; }

/* ---------- Pages (défilement vertical avec aimantation) ---------- */
.pages {
  height: 100vh;
  height: 100dvh;
  overflow: hidden; /* le défilement entre pages est géré en JS */
  will-change: filter;
}

.page {
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  scrollbar-width: none;
}
.page::-webkit-scrollbar { display: none; }

/* Points à droite */
.dots {
  position: fixed;
  right: 18px;
  top: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
}
body.entered .dots { opacity: 1; }
.dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--text-dim);
  cursor: pointer;
  transition: height 0.3s ease, background 0.3s ease;
}
.dots button.active { height: 22px; background: var(--text); }

/* Indicateur « Scroll for more » */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: var(--text-dim);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  translate: -50% 0;
  transition: color 0.2s ease;
}
.scroll-hint:hover { color: var(--text); }
.scroll-hint strong { font-weight: 500; letter-spacing: 0.02em; }
.scroll-hint svg { width: 20px; height: 20px; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }
.scroll-hint.gone { opacity: 0 !important; pointer-events: none; transition: opacity 0.3s ease; }

/* Deuxième page */
.second {
  display: grid;
  place-items: center;
  padding: 60px 40px;
}
.intro { width: min(1150px, 100%); }
.intro h2 {
  margin-bottom: 16px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.intro-box {
  padding: 28px 26px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(10px);
}
.intro-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
}
.intro-list li::marker { color: var(--text); }
.intro-list strong { color: var(--text); font-weight: 700; }

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.6);
  text-underline-offset: 3px;
  cursor: pointer;
  vertical-align: bottom;
  transition: text-decoration-color 0.2s ease;
}
.inline-link:hover { text-decoration-color: var(--text); }
.inline-link img { width: 17px; height: 17px; object-fit: contain; }

/* Cartes */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 116px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(10px);
}
.card-body { flex: 1; min-width: 0; }
.card-body h3 { font-size: 18px; font-weight: 500; line-height: 1.2; }
.card-corner {
  position: absolute;
  top: 12px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color 0.2s ease;
}
a.card-corner:hover { color: var(--text); }
.card-corner svg { width: 12px; height: 12px; }

/* Statut Discord */
.pres-avatar { position: relative; flex: none; width: 74px; height: 74px; }
.pres-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 0, 0, 0.15);
}
.pres-status {
  position: absolute;
  right: 0;
  bottom: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid var(--bg);
  background: #80848e;
}
.pres-status[data-status="online"] { background: #23a55a; }
.pres-status[data-status="idle"] { background: #f0b232; }
.pres-status[data-status="dnd"] { background: #f23f43; }
.pres-status[data-status="dnd"]::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 50%;
  height: 3px;
  border-radius: 2px;
  background: var(--bg);
  translate: 0 -50%;
}

.pres-name { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.pres-name h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pres-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.pres-tag img { width: 13px; height: 13px; }
.pres-tag[hidden], .pres-art[hidden] { display: none; }
.pres-line {
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pres-line b { color: var(--text); font-weight: 700; }
.pres-line.dim { color: rgba(255, 255, 255, 0.6); }
.pres-art {
  flex: none;
  width: 72px;
  height: 72px;
  margin-top: 14px;
  border-radius: 10px;
  object-fit: cover;
  filter: grayscale(1);
}

/* Horloge */
.clock { width: 70px; height: 70px; flex: none; }
.clock-face { fill: #f0f0f0; stroke: #c0c0c0; stroke-width: 1.5; }
.clock line { stroke-linecap: round; }
.tick { stroke: #cccccc; stroke-width: 1; }
.tick.major { stroke: #999999; stroke-width: 2; }
.hand-h { stroke: #111; stroke-width: 3.5; }
.hand-m { stroke: #111; stroke-width: 2.2; }
.hand-s { stroke: #cc2020; stroke-width: 1.3; }
.clock-pin { fill: #cc2020; }
.clock-pin-in { fill: #111; }
#clockTime { font-size: 18px; font-variant-numeric: tabular-nums; }
.clock-date { margin-top: 2px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.6); }
.clock-you { margin-top: 2px; font-size: 11.5px; color: rgba(255, 255, 255, 0.35); }

/* Troisième page : lecteur */
.third {
  position: relative;
  display: grid;
  place-items: center;
  padding: 60px 40px;
  overflow: hidden;
}
.np-bg {
  position: absolute;
  inset: -15%;
  background: center / cover no-repeat;
  filter: blur(90px) grayscale(1) brightness(0.75);
  transform: scale(1.1);
  opacity: 0.85;
  transition: background-image 0.6s ease;
}
.np {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1020px, 100%);
  height: min(505px, 78vh);
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
}
/* La pochette floutée donne la couleur de la carte */
.np::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: var(--np-cover) center / cover no-repeat;
  filter: blur(70px) grayscale(1);
  opacity: 0.9;
}
.np::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.18);
}

.np-head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px 15px 15px;
}
.np-cover {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.np-main { flex: 1; min-width: 0; }
.np-title {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-artist { color: rgba(255, 255, 255, 0.55); font-weight: 400; }
#npTitle a { color: inherit; text-decoration: none; }
#npTitle a:hover { text-decoration: underline; text-underline-offset: 3px; }
.np-row { display: flex; align-items: center; gap: 10px; }
.np-time {
  flex: none;
  min-width: 32px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}
.np-time:last-of-type { text-align: right; }
.np-bar {
  position: relative;
  flex: 1;
  height: 14px;
  cursor: pointer;
}
.np-bar::before,
.np-bar span {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  translate: 0 -50%;
}
.np-bar::before { right: 0; background: rgba(255, 255, 255, 0.3); }
.np-bar span { width: 0; background: #fff; transition: width 0.25s linear; }
.np-bar:hover::before, .np-bar:hover span { height: 4px; }

.np-ctrl { display: flex; align-items: center; gap: 10px; margin-left: 14px; }
.np-ctrl button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.2s ease, transform 0.15s ease;
}
.np-ctrl button:hover { color: #fff; }
.np-ctrl button:active { transform: scale(0.9); }
.np-ctrl svg { width: 17px; height: 17px; }
.np-ctrl .np-play { color: #fff; }
.np-ctrl .np-play svg { width: 26px; height: 26px; }
.np .i-pause, .np.playing .i-play { display: none; }
.np.playing .i-pause { display: block; }

.np-lyrics {
  position: relative;
  flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 7%, #000 80%, transparent);
  mask-image: linear-gradient(transparent, #000 7%, #000 80%, transparent);
}
.np-lines {
  padding: 0 70px;
  transition: transform 0.6s cubic-bezier(.25, .8, .25, 1);
}
.np-line {
  margin: 0;
  padding: 7px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  opacity: 0.18;
  filter: blur(2.5px);
  cursor: pointer;
  transform-origin: left center;
  transition: opacity 0.45s ease, filter 0.45s ease, transform 0.45s ease;
}
.np-line:hover { opacity: 0.6; filter: none; }
.np-line[data-dist="0"] { opacity: 1; filter: none; transform: scale(1.03); }
.np-line[data-dist="1"] { opacity: 0.55; filter: blur(0.6px); }
.np-line[data-dist="2"] { opacity: 0.3; filter: blur(1.5px); }
.np-line[data-dist="-1"] { opacity: 0.3; filter: blur(1.2px); }
/* Paroles non synchronisées : liste simple, nette */
.np.unsynced .np-lyrics { overflow-y: auto; scrollbar-width: none; }
.np.unsynced .np-lines { padding-top: 30px; padding-bottom: 60px; }
.np.unsynced .np-line { opacity: 0.8; filter: none; cursor: default; padding: 8px 0; }
/* Mode synchro */
.np-sync-bar {
  margin: 0 20px 6px 15px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.25);
}
.np.syncing .np-line { opacity: 0.35; transition: opacity 0.2s ease, transform 0.2s ease; }
.np.syncing .np-line.done { opacity: 0.6; }
.np.syncing .np-line.next { opacity: 1; transform: scale(1.03); }
.np-empty {
  padding-top: 70px;
  text-align: center;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.5);
}

/* Animation « pop » quand la page arrive à l'écran */
.pop { opacity: 0; transform: scale(0.94); }
.pop.in { animation: pop 0.55s cubic-bezier(.2, 1.4, .4, 1) forwards; animation-delay: calc(var(--d, 0) * 0.09s); }
@keyframes pop { to { opacity: 1; transform: scale(1); } }

/* ---------- Profil ---------- */
.profile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 26px 16px;
}

.avatar {
  flex: none;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, 0.4);
  background: #1a1a1a;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0);
  user-select: none;
}
.avatar.empty { background: radial-gradient(circle at 35% 30%, #2a2a2a, #121212); }

.info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.name {
  font-size: 39.5px;
  font-weight: 700;
  line-height: 1;
  text-shadow: var(--glow);
  cursor: default;
}

.badges {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 100px;
  background: var(--badge-bg);
  border: 2px solid var(--badge-border);
}
.badge {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: #fff;
  filter: drop-shadow(#fff 0 0 2.5px);
  cursor: default;
  transition: transform 0.2s ease;
}
.badge:hover { transform: translateY(-2px); }
.badge svg,
.badge img { width: 20px; height: 20px; object-fit: contain; user-select: none; }
.badge img { filter: grayscale(1) brightness(1.6); }

.socials {
  display: flex;
  align-items: center;
  gap: 8px;
}
.social {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  filter: drop-shadow(#fff 1px 0 7px);
  transition: transform 0.2s ease;
}
.social:hover { transform: translateY(-3px); }
.social svg { width: 36px; height: 36px; }

/* ---------- Compteur de vues ---------- */
.views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  font-variant-numeric: tabular-nums;
  cursor: default;
}
.views[hidden] { display: none; }
.views svg { width: 18px; height: 18px; filter: drop-shadow(#fff 0 0 4px); color: #fff; }

/* ---------- Apparition en fondu ---------- */
.reveal {
  opacity: 0;
  transform: translateY(8px);
}
body.entered .reveal {
  animation: fadeIn 0.8s ease forwards;
  animation-delay: calc(0.15s + var(--d, 0) * 0.15s);
}
@keyframes fadeIn { to { opacity: 1; transform: none; } }

/* ---------- Infobulle ---------- */
.tooltip {
  position: fixed;
  z-index: 50;
  max-width: 260px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  background: rgba(20, 20, 20, 0.39);
  border: 1px solid rgba(26, 26, 26, 0.2);
  backdrop-filter: blur(8px);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.tooltip.show { opacity: 1; transform: translate(-50%, -100%) translateY(-10px); }

/* ---------- Notification de copie ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.07);
  border: 2px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
  .profile { flex-direction: column; gap: 22px; text-align: center; }
  .avatar { width: 140px; height: 140px; }
  .info { align-items: center; }
  .name { font-size: 34px; }
  .volume { height: 52px; padding: 0 12px; }
  .dots { right: 10px; }
  .second { padding: 60px 20px; }
  .intro h2 { font-size: 30px; }
  .cards { grid-template-columns: 1fr; }
  .third { padding: 60px 14px; }
  .np-head { flex-wrap: wrap; }
  .np-cover { width: 52px; height: 52px; }
  .np-row { flex-wrap: wrap; }
  .np-ctrl { width: 100%; justify-content: center; margin: 6px 0 0; gap: 22px; }
  .np-lines { padding: 0 22px; }
  .np-line { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition: none !important; }
}
