/* Phyruse : page minimaliste centrée sur fond sombre flou. */
:root {
  --bg: #07090D;
  --ink: #F4F7FB;
  --soft: #8A97A8;
  --accent: #93CCFF;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.5 var(--body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
[hidden] { display: none !important; }

/* Fond */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.bg i:nth-child(1) { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: #1F66AD; }
.bg i:nth-child(2) { width: 38vmax; height: 38vmax; right: -10vmax; bottom: -12vmax; background: #3B3F9E; animation-delay: -6s; }
.bg i:nth-child(3) { width: 24vmax; height: 24vmax; right: 20%; top: 10%; background: #0E3A5C; opacity: .4; animation-delay: -11s; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.12); } }
.bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 30%, rgba(7, 9, 13, .85) 100%); }

main {
  position: relative; z-index: 1; min-height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding-block: 40px 200px; text-align: center;
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Profil Discord */
.avatar { position: relative; width: 124px; height: 124px; margin-bottom: 4px; }
.avatar > img, .avatar > div:not([hidden]) {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .12), 0 10px 50px rgba(147, 204, 255, .25);
  background: linear-gradient(150deg, #14263B, #0A1220); font: 800 56px/1 var(--body); color: var(--accent);
}
.dot { position: absolute; right: 4px; bottom: 6px; width: 26px; height: 26px; border-radius: 50%; border: 5px solid #0B0F16; background: #747F8D; }
.dot[data-s="online"] { background: #3BA55D; }
.dot[data-s="idle"] { background: #FAA61A; }
.dot[data-s="dnd"] { background: #ED4245; }

h1 { margin: 0; font: 800 clamp(34px, 9vw, 44px)/1.1 var(--body); letter-spacing: .02em; text-shadow: 0 0 24px rgba(147, 204, 255, .55); overflow-wrap: anywhere; }
.handle { margin: -6px 0 0; color: var(--soft); font-size: 15px; font-weight: 700; }
.activity {
  display: inline-flex; align-items: center; gap: 8px; max-width: min(100%, 360px); margin: 2px 0 0; padding: 6px 14px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px;
  font-size: 14px; font-weight: 700; color: var(--ink);
}
.activity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.bio { margin: 0; min-height: 1.5em; color: var(--soft); }
.bio::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -.15em; background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin: 8px 0 0; padding: 0; list-style: none; max-width: 340px; }
.socials a { display: grid; place-items: center; width: 48px; height: 48px; color: var(--ink); opacity: .75; transition: transform .2s, opacity .2s, color .2s, filter .2s; }
.socials a:hover { opacity: 1; color: var(--accent); transform: translateY(-3px) scale(1.12); filter: drop-shadow(0 0 10px rgba(147, 204, 255, .8)); }
svg.ic { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Lecteur */
.players {
  position: fixed; z-index: 5; left: 50%; transform: translateX(-50%);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: min(420px, calc(100% - 32px));
  display: flex; flex-direction: column; gap: 10px;
}
.spotify { position: relative; }
.spotify iframe { display: block; border-radius: 14px; color-scheme: normal; }
.shuffle {
  position: absolute; right: 10px; top: -14px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(20, 28, 40, .9); border: 1px solid rgba(255, 255, 255, .18); color: var(--ink); transition: background .15s, color .15s;
}
.shuffle:hover { background: var(--accent); color: var(--bg); }
.shuffle svg { width: 15px; height: 15px; }
.dock {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.dock .b { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; transition: background .15s; }
.dock .b:hover { background: rgba(255, 255, 255, .12); }
.dock .play { width: 42px; height: 42px; background: var(--ink); color: var(--bg); }
.dock .play:hover { background: var(--accent); }
.dock svg { width: 17px; height: 17px; fill: currentColor; }
.now { flex: 1; min-width: 0; text-align: left; }
.now strong { display: block; font-size: 14px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now span { display: block; font-size: 12px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 3px; margin-top: 4px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); }
#vol { -webkit-appearance: none; appearance: none; width: 64px; height: 20px; background: transparent; margin: 0; flex: none; }
#vol::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p, 60%), rgba(255, 255, 255, .2) var(--p, 60%)); }
#vol::-moz-range-track { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
#vol::-moz-range-progress { height: 3px; background: var(--accent); }
#vol::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: #fff; border: 0; }
#vol::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 0; }

/* Écran d'entrée */
.gate {
  position: fixed; inset: 0; z-index: 20; width: 100%; display: grid; place-items: center;
  background: rgba(7, 9, 13, .78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: opacity .6s ease, visibility .6s;
}
.gate span { font: 700 clamp(18px, 4.5vw, 24px) var(--body); letter-spacing: .12em; animation: pulse 2.4s ease-in-out infinite; }
.gate.gone { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes pulse { 50% { opacity: .45; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
