:root {
  --bg:          #060606;
  --fg:          #EDE7DA;
  --dim:         #9A9184;
  --dim-2:       #5C564A;

  --gold:        #C9A65B;
  --gold-hi:     #E8CF9C;

  --surface:     rgba(255, 255, 255, .028);
  --surface-hi:  rgba(255, 255, 255, .05);
  --stroke:      rgba(201, 166, 91, .14);
  --stroke-hi:   rgba(201, 166, 91, .3);

  --font:         "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Playfair Display", "Times New Roman", serif;
  --spring: cubic-bezier(.22, 1, .36, 1);

  --mx: 50vw;
  --my: 30vh;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

/* Plusieurs blocs sont en display:flex : sans ça, [hidden] serait ignoré. */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(201, 166, 91, .28); }

/* Veines de marbre noir — fines diagonales blanches et dorées sur fond onyx */
body::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 2;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .09' numOctaves='4' seed='11' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Halo très sombre : onyx profond, avec de fines veines lumineuses
   (blanches et dorées) comme du marbre noir poli, pas un néon */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 38% at 50% -8%,  rgba(201, 166, 91, .1),  transparent 70%),
    radial-gradient(46% 30% at 10% 22%,  rgba(255, 255, 255, .035), transparent 70%),
    radial-gradient(52% 32% at 92% 78%,  rgba(201, 166, 91, .07), transparent 72%),
    linear-gradient(124deg, transparent 21%, rgba(255,255,255,.045) 21.6%, transparent 22.4%),
    linear-gradient(124deg, transparent 21.8%, rgba(255,255,255,.02) 22.6%, transparent 23.6%),
    linear-gradient(66deg,  transparent 44%, rgba(201,166,91,.05) 44.7%, transparent 45.6%),
    linear-gradient(152deg, transparent 61%, rgba(255,255,255,.03) 61.6%, transparent 62.5%),
    linear-gradient(38deg,  transparent 76%, rgba(201,166,91,.04) 76.6%, transparent 77.5%),
    radial-gradient(120% 70% at 50% 50%, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* Halo qui suit le curseur — activé en JS sur desktop seulement */
.spot {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s var(--spring);
  background: radial-gradient(
    260px 260px at var(--mx) var(--my),
    rgba(201, 166, 91, .07),
    transparent 70%
  );
}
.has-spot .spot { opacity: 1; }

/* Lecteur YouTube : rogné à 1px, mais l'iframe garde une vraie taille
   sinon YouTube refuse de lancer la lecture. */
.yt {
  position: fixed;
  left: 0; bottom: 0;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: .01;
  pointer-events: none;
  z-index: -1;
}
.yt iframe { width: 320px; height: 180px; border: 0; }

.wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, 440px);
  margin-inline: auto;
  min-height: 100svh;
  padding-block:
    calc(3.25rem + env(safe-area-inset-top))
    calc(6.25rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.75rem, 5vw, 2.25rem);
}

/* ---------- Profil ---------- */

.profile { text-align: center; }

.avatar {
  position: relative;
  width: clamp(92px, 26vw, 108px);
  aspect-ratio: 1;
  margin: 0 auto 1.1rem;
  display: grid;
  place-items: center;
  isolation: isolate;
}

/* Anneau doré qui tourne lentement — un filet de laiton, pas un arc-en-ciel */
.avatar__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    #6E5636, #E8CF9C, #B8935C, #3F5A44, #6E5636, #C9A65B, #6E5636
  );
  filter: blur(.5px);
  animation: spin 7s linear infinite;
}

.avatar__inner {
  position: relative;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0A0A0A;
  box-shadow: 0 18px 44px -16px rgba(180, 142, 74, .5);
  overflow: hidden;
}

.avatar__mono {
  font-size: clamp(2rem, 6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -.03em;
  color: rgba(241, 231, 211, .55);
  user-select: none;
}

.avatar__inner img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

.name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5.8vw, 2.15rem);
  font-weight: 600;
  letter-spacing: .015em;
  line-height: 1.15;
}

.bio {
  margin: .95rem auto 0;
  max-width: 34ch;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .01em;
  line-height: 1.6;
  color: var(--dim);
}

.bio::before, .bio::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  margin: 0 .55em;
  vertical-align: middle;
  background: linear-gradient(90deg, transparent, var(--stroke-hi));
}
.bio::after { background: linear-gradient(90deg, var(--stroke-hi), transparent); }

/* ---------- Carte Discord ---------- */
/* Un petit encart contenu, pas une deuxième page d'accueil : juste
   « voici mon Discord », posé à côté du reste. */

.dc {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .7rem .9rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow:
    inset 0 1px 0 rgba(232, 207, 156, .05),
    0 14px 30px -24px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(24px);
          backdrop-filter: blur(24px);
  transition: background-color .35s var(--spring), border-color .35s var(--spring),
              box-shadow .45s var(--spring), transform .45s var(--spring);
}

@media (hover: hover) {
  .dc:hover {
    background: var(--surface-hi);
    border-color: var(--stroke-hi);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px -20px rgba(180, 142, 74, .5);
  }
}

.dc__avatar {
  position: relative;
  flex: none;
  width: 42px; height: 42px;
}

.dc__avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #0A0A0A;
  box-shadow: inset 0 0 0 1px rgba(201, 166, 91, .16);
}

.dc__dot {
  position: absolute;
  right: -2px; bottom: -2px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--presence, #6E6250);
  box-shadow:
    0 0 0 3px var(--bg),
    0 0 10px -2px var(--presence, #6E6250);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .5s var(--spring), transform .5s var(--spring),
              background-color .4s var(--spring), box-shadow .4s var(--spring);
}

.dc__dot.is-live { opacity: 1; transform: none; }

.dc__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .18rem;
}

.dc__row {
  display: flex;
  align-items: center;
  gap: .35rem;
  min-width: 0;
}

.dc__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.dc__badges {
  display: flex;
  align-items: center;
  gap: .28rem;
  flex: none;
}

.dc__badges img {
  width: 15px; height: 15px;
  display: block;
  object-fit: contain;
}

.dc__status {
  display: flex;
  align-items: center;
  gap: .3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
  color: var(--dim);
}

.dc__status-emoji { width: 15px; height: 15px; flex: none; }

/* ---------- Activité en cours ---------- */

.act {
  padding: .85rem .95rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow:
    inset 0 1px 0 rgba(232, 207, 156, .05),
    0 14px 30px -24px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(24px);
          backdrop-filter: blur(24px);
}

.act__label {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 .65rem;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--dim-2);
}

.act__label::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--status, #3F6B4A);
  box-shadow: 0 0 9px -1px var(--status, #3F6B4A);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

.act__body {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.act__art {
  position: relative;
  flex: none;
  width: 58px; height: 58px;
}

.act__art-big {
  width: 100%; height: 100%;
  border-radius: 13px;
  object-fit: cover;
  background: #0A0A0A;
  box-shadow: inset 0 0 0 1px rgba(201, 166, 91, .16);
}

.act__art-mini {
  position: absolute;
  right: -5px; bottom: -5px;
  width: 22px; height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: #0A0A0A;
  box-shadow: 0 0 0 3px var(--bg);
}

.act__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.act__text > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.act__name {
  font-family: var(--font-display);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .01em;
}

.act__line {
  font-size: .8rem;
  color: var(--dim);
}

.act__time {
  margin-top: .15rem;
  font-size: .72rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--dim-2);
}

/* ---------- Cartes ---------- */

.links {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .8rem .95rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  box-shadow:
    inset 0 1px 0 rgba(232, 207, 156, .05),
    0 14px 30px -24px rgba(0, 0, 0, .7);
  -webkit-backdrop-filter: blur(24px);
          backdrop-filter: blur(24px);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition:
    background-color .35s var(--spring),
    border-color .35s var(--spring),
    box-shadow .45s var(--spring),
    transform .45s var(--spring);
}

/* Reflet qui balaie la carte au survol */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 38%,
    rgba(232, 207, 156, .08) 50%,
    transparent 62%
  );
  transform: translateX(-100%);
  transition: transform .9s var(--spring);
}

.card > * { position: relative; z-index: 1; }

/* Pas de pastille colorée pleine : juste le trait de l'icône teinté à la
   couleur de marque (--brand, déjà posée sur chaque .card), sur une
   surface neutre cohérente avec le reste de l'UI. */
.card__tile {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface-hi);
  border: 1px solid var(--stroke);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(232, 207, 156, .05);
  transition: border-color .45s var(--spring), box-shadow .45s var(--spring),
              background-color .45s var(--spring), transform .45s var(--spring);
}
.card__tile svg { width: 22px; height: 22px; }


.card__text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.card__title {
  font-family: var(--font-display);
  font-size: .96rem;
  font-weight: 600;
  letter-spacing: .012em;
}

.card__chev {
  flex: none;
  width: 18px; height: 18px;
  color: var(--dim-2);
  transition: transform .45s var(--spring), color .35s var(--spring);
}
.card__chev svg { width: 100%; height: 100%; }

@media (hover: hover) {
  .card:hover {
    background: var(--surface-hi);
    border-color: var(--stroke-hi);
    transform: translateY(-2px);
    box-shadow: 0 18px 40px -18px var(--glow);
  }
  .card:hover::after { transform: translateX(100%); }
  .card:hover .card__tile {
    transform: scale(1.05);
    border-color: color-mix(in srgb, var(--brand) 55%, var(--stroke-hi));
    box-shadow: 0 10px 24px -12px var(--glow);
  }
  .card:hover .card__chev { color: var(--fg); transform: translateX(3px); }
}

.card:active {
  transform: scale(.985);
  background: var(--surface-hi);
}

.card:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* ---------- Pied ---------- */

.foot {
  text-align: center;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim-2);
}

/* ---------- Pastille musique ---------- */

.np {
  position: fixed;
  z-index: 5;
  left: 50%;
  bottom: calc(1.15rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: .6rem;
  max-width: min(100% - 2.5rem, 300px);
  padding: .4rem .75rem .4rem .4rem;
  border-radius: 999px;
  background: rgba(238, 220, 180, .05);
  border: 1px solid var(--stroke);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
          backdrop-filter: blur(28px) saturate(1.4);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition:
    opacity .6s var(--spring),
    transform .6s var(--spring),
    background-color .35s var(--spring),
    border-color .35s var(--spring);
}

.np.is-ready {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.np:active { transform: translate(-50%, 0) scale(.97); }
.np:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

@media (hover: hover) {
  .np:hover { background: var(--surface-hi); border-color: var(--stroke-hi); }
}

.np.is-on {
  background: var(--surface-hi);
  border-color: var(--stroke-hi);
}

.np__art {
  position: relative;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  overflow: hidden;
  background: #0A0A0A;
  box-shadow: inset 0 0 0 1px rgba(201, 166, 91, .18);
}
.np__art img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.np.is-on .np__art img { animation: spin 9s linear infinite; }

.np__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.np__title {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.np__progress {
  position: relative;
  margin-top: .34rem;
  height: 3px;
  border-radius: 2px;
  background: rgba(201, 166, 91, .16);
  overflow: hidden;
}

.np__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6E5636, #E8CF9C);
  transition: width .5s linear;
}

.np__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 19px; height: 19px;
  color: var(--dim);
  transition: color .35s var(--spring);
}
.np.is-on .np__icon { color: var(--fg); }

.np__eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 15px;
}
.np__eq i {
  width: 2px;
  height: 55%;
  border-radius: 1px;
  background: currentColor;
  animation: eq .85s ease-in-out infinite alternate;
}
.np__eq i:nth-child(2) { animation-delay: .18s; }
.np__eq i:nth-child(3) { animation-delay: .36s; }
.np__eq i:nth-child(4) { animation-delay: .10s; }

.np__muted { width: 19px; height: 19px; }

.np.is-on .np__eq   { display: flex; }
.np.is-on .np__muted { display: none; }

@keyframes eq {
  from { height: 22%; }
  to   { height: 100%; }
}

/* ---------- Tablette / desktop ---------- */

@media (min-width: 768px) {
  .wrap { width: min(100% - 4rem, 468px); gap: 2.4rem; }
  .card { padding: .95rem 1.1rem; border-radius: 17px; gap: 1rem; }
  .card__tile { width: 50px; height: 50px; border-radius: 12px; }
  .card__tile svg { width: 25px; height: 25px; }
  .card__title { font-size: 1.1rem; }
}

/* ---------- Apparition ---------- */

@media (prefers-reduced-motion: no-preference) {
  .profile, .dc, .act, .card, .foot {
    animation: rise .9s var(--spring) backwards;
  }
  .profile           { animation-delay: .04s; }
  .dc                { animation-delay: .10s; }
  .act               { animation-delay: .16s; }
  .card:nth-child(1) { animation-delay: .22s; }
  .card:nth-child(2) { animation-delay: .29s; }
  .card:nth-child(3) { animation-delay: .36s; }
  .card:nth-child(4) { animation-delay: .43s; }
  .foot              { animation-delay: .52s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .avatar__ring, .np__art img { animation: none !important; }
}
