*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-deep: #070a12;
  --bg-mid: #12182a;
  --accent: #7eb8ff;
  --accent-dim: rgba(126, 184, 255, 0.35);
  --text: #e8eef8;
  --text-muted: rgba(232, 238, 248, 0.65);
  --card-bg: rgba(12, 16, 28, 0.55);
  --card-border: rgba(126, 184, 255, 0.22);
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-pixel: "Press Start 2P", ui-monospace, monospace;
  /* Encoches / safe areas (téléphones) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  /* Padding carte fluide */
  --card-pad-x: clamp(1rem, 4.2vw, 3rem);
  --card-pad-y: clamp(1.35rem, 5vw, 3.5rem);
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button,
.btn-discord,
.enter-btn,
.audio-toggle {
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-sans);
  color: var(--text);
  background: radial-gradient(120% 80% at 50% 120%, #1a1030 0%, var(--bg-deep) 45%),
    radial-gradient(ellipse 100% 60% at 20% 0%, rgba(80, 40, 120, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 80% 10%, rgba(30, 60, 120, 0.25) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 100%);
  overflow-x: hidden;
}

body.has-custom-cursor,
body.has-custom-cursor button,
body.has-custom-cursor a,
body.has-custom-cursor .audio-toggle {
  cursor: none;
}

.ufo-cursor {
  position: fixed;
  left: -100px;
  top: -100px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  margin-left: 0;
  margin-top: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  will-change: left, top;
  filter: drop-shadow(0 2px 6px rgba(100, 180, 255, 0.45));
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ufo-cursor.is-active {
  opacity: 1;
}

.ufo-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Logo HUMA + planète (texte dedans) qui descend du haut à côté du logo */
.huma-corner {
  position: fixed;
  top: calc(0.75rem + var(--safe-top));
  left: calc(0.75rem + var(--safe-left));
  z-index: 40;
  max-width: min(400px, calc(100vw - 2rem));
  pointer-events: auto;
  outline: none;
  overflow: visible;
}

.huma-corner__inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.5rem;
}

.huma-corner__logo {
  display: block;
  width: min(130px, 30vw);
  height: auto;
  flex-shrink: 0;
  align-self: flex-start;
  border-radius: 50%;
  transition: transform 0.22s ease, filter 0.22s ease;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.5));
}

.huma-corner:hover .huma-corner__logo,
.huma-corner:focus-visible .huma-corner__logo {
  transform: scale(1.03);
  filter: drop-shadow(0 6px 20px rgba(100, 160, 255, 0.35));
}

.huma-corner__planet-track {
  position: relative;
  width: min(220px, 48vw);
  flex-shrink: 0;
  align-self: stretch;
  min-width: 0;
  pointer-events: none;
}

.huma-planet-drop {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  transform: translateY(calc(-100% - 18px));
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.33, 1.15, 0.48, 1), opacity 0.35s ease;
}

.huma-corner:hover .huma-planet-drop,
.huma-corner:focus-visible .huma-planet-drop {
  transform: translateY(0);
  opacity: 1;
}

.huma-planet-bubble {
  width: min(210px, 46vw);
  aspect-ratio: 1;
  max-height: min(72vh, 320px);
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 32% 28%, #fffce8 0%, #ffe566 28%, #f0b820 58%, #c49012 100%);
  box-shadow:
    inset 0 -12px 28px rgba(90, 50, 0, 0.25),
    inset 0 8px 20px rgba(255, 255, 255, 0.45),
    0 10px 32px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(240, 184, 32, 0.3);
  border: 2px solid rgba(180, 130, 30, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.75rem 2.1rem;
  position: relative;
  pointer-events: auto;
}

.huma-planet-bubble__text {
  margin: 0;
  font-size: clamp(0.58rem, 1.45vw, 0.72rem);
  line-height: 1.4;
  font-weight: 600;
  color: #152238;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  max-height: 58%;
  overflow: hidden;
  z-index: 2;
  padding: 0 0.2rem;
}

.huma-planet-bubble__pads {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  gap: 0.35rem;
  z-index: 1;
}

.huma-pad {
  width: 2.1rem;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#emperor-flight {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   Monde Panoramique & Balayage Horizontal (Accueil <-> Jeu Arcade)
   ========================================================================== */

.world-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  z-index: 2;
}

.world-track {
  display: flex;
  width: 200vw;
  height: 100%;
  transition: transform 0.95s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

body.is-game-view .world-track {
  transform: translateX(-100vw);
}

.world-screen {
  position: relative;
  width: 100vw;
  height: 100%;
  flex: 0 0 100vw;
  overflow-x: hidden;
  overflow-y: auto;
}

.world-screen--home {
  display: flex;
  align-items: center;
  justify-content: center;
}

.world-screen--game {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1rem + var(--safe-top)) calc(1rem + var(--safe-right)) calc(1rem + var(--safe-bottom))
    calc(1rem + var(--safe-left));
  pointer-events: none;
}

.content > * {
  pointer-events: auto;
}

/* Conteneur d'amarrage du vaisseau mère géant et du cadre (cadre parfaitement centré) */
.mothership-dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: min(56rem, calc(100vw - 2rem));
  position: relative;
  margin: 0 auto;
}

/* Vaisseau Mère OVNI Colossal placé en hauteur au-dessus du cadre sans le décentrer */
.ufo-mothership {
  position: absolute;
  bottom: 100%;
  left: 50%;
  z-index: 10;
  width: clamp(360px, 84vw, 760px);
  opacity: 0;
  transform: translateX(-50%) translateY(-130vh) scale(0.35);
  pointer-events: none;
  filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.8));
}

.mothership-dock.is-ready .ufo-mothership {
  animation:
    mothership-arrive-and-ascend 3.2s cubic-bezier(0.16, 0.95, 0.25, 1) forwards,
    mothership-hover-high 4.5s ease-in-out 3.2s infinite alternate;
}

@keyframes mothership-arrive-and-ascend {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-130vh) scale(0.3) rotate(-3deg);
  }
  42% {
    opacity: 1;
    transform: translateX(-50%) translateY(48px) scale(1.04) rotate(0.8deg); /* Descente au plus près pour poser le cadre */
  }
  62% {
    opacity: 1;
    transform: translateX(-50%) translateY(40px) scale(1.01) rotate(0deg); /* Maintien pendant la matérialisation */
  }
  85% {
    opacity: 1;
    transform: translateX(-50%) translateY(-45px) scale(0.97) rotate(-0.5deg); /* Recul bien haut dans l'espace */
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(-35px) scale(0.98) rotate(0deg); /* Position finale stationnaire en altitude */
  }
}

@keyframes mothership-hover-high {
  0% {
    transform: translateX(-50%) translateY(-35px) scale(0.98) rotate(0deg);
  }
  50% {
    transform: translateX(-50%) translateY(-48px) scale(0.99) rotate(-0.8deg);
  }
  100% {
    transform: translateX(-50%) translateY(-24px) scale(0.97) rotate(0.8deg);
  }
}

.ufo-mothership__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* Réacteur antigravité et balises lumineuses de l'OVNI */
.ufo-ms-engine {
  animation: ms-engine-pulse 1.4s ease-in-out infinite alternate;
}

@keyframes ms-engine-pulse {
  0% {
    opacity: 0.75;
    filter: drop-shadow(0 0 10px #00ffff);
  }
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 25px #00ffff) drop-shadow(0 0 45px #00ffaa);
  }
}

.ufo-ms-light {
  animation: ms-beacon-blink 1.2s ease-in-out infinite alternate;
}
.ufo-ms-light.l1 { animation-delay: 0.1s; }
.ufo-ms-light.l2 { animation-delay: 0.25s; }
.ufo-ms-light.l3 { animation-delay: 0.4s; }
.ufo-ms-light.l4 { animation-delay: 0.55s; }
.ufo-ms-light.l5 { animation-delay: 0.7s; }
.ufo-ms-light.l6 { animation-delay: 0.85s; }
.ufo-ms-light.l7 { animation-delay: 1.0s; }
.ufo-ms-light.l-top { animation-delay: 0.3s; animation-duration: 0.8s; }

@keyframes ms-beacon-blink {
  0%, 20% { opacity: 0.3; }
  50%, 100% { opacity: 1; filter: drop-shadow(0 0 8px #00ffff); }
}

/* Grand rayon tracteur descendant de l'OVNI sur le cadre (qui s'arrête totalement après) */
.ufo-mothership__beam {
  position: absolute;
  top: 72%;
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  width: 140%;
  height: min(700px, 95vh);
  pointer-events: none;
  z-index: -1;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0, 255, 220, 0.45) 0%,
      rgba(0, 210, 255, 0.15) 20px,
      rgba(0, 255, 200, 0.35) 40px,
      transparent 60px
    ),
    radial-gradient(ellipse 65% 100% at 50% 0%, rgba(0, 255, 220, 0.6) 0%, rgba(0, 180, 255, 0.25) 60%, transparent 92%);
  background-size: 100% 80px, 100% 100%;
  clip-path: polygon(32% 0%, 68% 0%, 100% 100%, 0% 100%);
  opacity: 0;
}

.mothership-dock.is-ready .ufo-mothership__beam {
  animation: mothership-tractor-cycle 3.0s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes mothership-tractor-cycle {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
    filter: drop-shadow(0 0 45px #00ffff);
  }
  60% {
    opacity: 0.9;
    transform: translateX(-50%) scaleY(1);
    filter: drop-shadow(0 0 35px #00e5ff);
  }
  80% {
    opacity: 0.3;
    transform: translateX(-50%) scaleY(0.85);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scaleY(0);
    visibility: hidden;
  }
}

.card {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: var(--card-pad-y) var(--card-pad-x);
  border-radius: clamp(0.85rem, 2vw, 1.25rem);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 24px 48px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-40px) scale(0.92);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

.card.is-ready {
  animation: card-beamed-down 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

@keyframes card-beamed-down {
  0% {
    opacity: 0;
    transform: translateY(-45px) scale(0.88);
    filter: drop-shadow(0 0 50px rgba(0, 255, 220, 0.8)) brightness(2.2);
  }
  65% {
    opacity: 0.95;
    transform: translateY(6px) scale(1.02);
    filter: drop-shadow(0 0 25px rgba(0, 255, 220, 0.5)) brightness(1.3);
  }
  85% {
    opacity: 1;
    transform: translateY(-2px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: none;
  }
}

.card-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent-dim), transparent 40%, transparent 60%, rgba(120, 80, 200, 0.15));
  pointer-events: none;
  z-index: -1;
  opacity: 0.9;
}

.card-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(1rem, 3.5vw, 2rem);
  margin-bottom: 0;
}

.avatar {
  width: clamp(6.5rem, 28vw, 10.5rem);
  height: clamp(6.5rem, 28vw, 10.5rem);
  flex-shrink: 0;
  align-self: center;
  border-radius: 0;
  object-fit: contain;
  border: none;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 20px rgba(255, 190, 40, 0.35));
  image-rendering: auto;
  image-rendering: -webkit-optimize-contrast;
  transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1), filter 0.35s ease;
}

.avatar:hover {
  transform: scale(1.06) rotate(-2deg);
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 28px rgba(255, 200, 50, 0.55));
}

.card-titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: 0.15rem;
}

.name {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 4.5vw + 0.4rem, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  border-right: 2px solid transparent;
  filter: drop-shadow(0 2px 10px rgba(60, 120, 200, 0.25));
}

.name__text {
  display: inline-block;
  min-width: 0;
  background: linear-gradient(
    110deg,
    #8fa8c8 0%,
    #d8e8ff 22%,
    #ffffff 38%,
    #b0cce8 48%,
    #f5f9ff 55%,
    #7eb8ff 72%,
    #a8bed8 88%,
    #e8f0f8 100%
  );
  background-size: 240% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: name-shine 4.8s ease-in-out infinite;
}

@keyframes name-shine {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.card.is-ready .name {
  opacity: 1;
  border-right: 3px solid var(--accent);
  width: 0;
  animation: typewriter-name 2.0s steps(40, end) 2.2s forwards, type-caret 0.75s step-end 4.2s infinite;
}

@keyframes typewriter-name {
  to {
    width: 100%;
  }
}

@keyframes type-caret {
  50% {
    border-color: transparent;
  }
}

.tagline {
  margin: 0;
  font-size: clamp(1rem, 2.8vw + 0.35rem, 1.85rem);
  font-weight: 300;
  color: var(--text-muted);
  opacity: 0;
}

.card.is-ready .tagline {
  animation: fade-up 0.6s ease 3.7s forwards;
}

/* Panneau pixel : même largeur que le reste du contenu (aligné sur la bio), centré dans le cadre */
.pixel-panel-host {
  flex: 0 0 auto;
  align-self: stretch;
  margin: 1.75rem 0 0;
  padding: 0;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  opacity: 0;
}

.card.is-ready .pixel-panel-host {
  animation: fade-up 0.55s ease 4.0s forwards;
}

.pixel-panel-host[hidden] {
  display: none !important;
}

/* Panneau pixel futuriste */
.pixel-panel {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  border-radius: 0.55rem;
  padding: 1.15rem 1.25rem;
  min-height: 5.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(6, 12, 28, 0.85) 0%, rgba(2, 5, 16, 0.96) 100%);
  border: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 200, 0.08), 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Surtension lumineuse globale du cadre lors de l'activation du rayon */
.pixel-panel.has-beam {
  border-color: rgba(0, 255, 220, 0.75);
  box-shadow:
    0 0 35px rgba(0, 255, 200, 0.45),
    0 0 12px rgba(0, 220, 255, 0.6),
    inset 0 0 24px rgba(0, 255, 220, 0.25),
    inset 0 0 0 1px rgba(0, 255, 255, 0.5);
}

.pixel-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 200, 0.04) 2px,
    rgba(0, 255, 200, 0.04) 3px
  );
  opacity: 0.6;
  z-index: 1;
}

/* Faisceau lumineux OVNI volumétrique & hyper-animé */
.pixel-panel__ufo-beam {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.25s ease;
  clip-path: polygon(25% 0%, 75% 0%, 98% 100%, 2% 100%);
  background:
    repeating-linear-gradient(
      180deg,
      rgba(0, 255, 220, 0.4) 0%,
      rgba(0, 200, 255, 0.15) 15px,
      rgba(0, 255, 200, 0.35) 30px,
      transparent 45px
    ),
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(0, 255, 220, 0.55) 0%, rgba(0, 180, 255, 0.22) 55%, transparent 90%);
  background-size: 100% 60px, 100% 100%;
}

/* Émetteur soucoupe OVNI au sommet */
.pixel-panel__ufo-beam::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 8px;
  background: linear-gradient(90deg, transparent 0%, #00e5ff 25%, #ffffff 50%, #00e5ff 75%, transparent 100%);
  border-radius: 50%;
  box-shadow:
    0 0 16px #00ffcc,
    0 0 32px #00e5ff,
    0 3px 12px rgba(255, 255, 255, 0.9),
    -24px 0 10px #00ffcc,
    24px 0 10px #00ffcc;
  z-index: 3;
}

/* Ligne de balayage laser descendant en continu */
.pixel-panel__ufo-beam::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(0, 255, 220, 0.6) 50%, transparent 100%);
  filter: drop-shadow(0 0 8px #00ffff);
  opacity: 0;
}

.pixel-panel.has-beam .pixel-panel__ufo-beam {
  opacity: 1;
  animation: ufo-plasma-cascading 0.6s linear infinite, ufo-beam-vibrate 0.12s ease-in-out infinite alternate;
}

.pixel-panel.has-beam .pixel-panel__ufo-beam::after {
  opacity: 1;
  animation: ufo-laser-scan 0.55s cubic-bezier(0.25, 0.8, 0.25, 1) infinite;
}

@keyframes ufo-plasma-cascading {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 0 60px, 0 0;
  }
}

@keyframes ufo-laser-scan {
  0% {
    top: 0%;
    opacity: 0.2;
    transform: scaleX(0.4);
  }
  30% {
    opacity: 1;
    transform: scaleX(0.7);
  }
  100% {
    top: 95%;
    opacity: 0;
    transform: scaleX(1);
  }
}

@keyframes ufo-beam-vibrate {
  0% {
    filter: drop-shadow(0 0 12px rgba(0, 255, 200, 0.6)) brightness(1);
  }
  100% {
    filter: drop-shadow(0 0 24px rgba(0, 255, 220, 0.95)) brightness(1.25);
  }
}

.pixel-panel__line {
  position: relative;
  z-index: 2;
  margin: 0;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: 0.55em 0.95em;
  font-family: var(--font-pixel);
  font-size: clamp(0.62rem, 1.65vw, 0.95rem);
  line-height: 1.65;
  letter-spacing: 0.04em;
  word-spacing: 0.15em;
  color: #e0f7ff;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85), 0 0 14px rgba(0, 255, 220, 0.45),
    2px 3px 0 rgba(10, 30, 60, 0.95);
}

.pixel-panel__word {
  display: inline-flex;
  white-space: nowrap;
}

.pixel-panel__char {
  display: inline-block;
  position: relative;
}

/* Sortie : aspiration téléportée vers le haut dans le faisceau OVNI */
.pixel-panel__line.is-exiting .pixel-panel__char {
  animation: ufo-char-beam-out 0.42s ease-in forwards;
  animation-delay: calc((var(--max-ci) - var(--ci)) * 16ms);
}

/* Entrée : descente téléportée depuis le rayon lumineux de l'OVNI */
.pixel-panel__line.is-entering .pixel-panel__char {
  animation: ufo-char-beam-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.1) forwards;
  animation-delay: calc(var(--ci) * 24ms);
}

@keyframes ufo-char-beam-in {
  0% {
    transform: translateY(-42px) scale(0.12, 2.8);
    opacity: 0;
    filter: drop-shadow(0 0 20px #00ffff) drop-shadow(0 0 35px #00ffaa) brightness(3.5);
    color: #ffffff;
  }
  45% {
    transform: translateY(5px) scale(1.22, 0.85);
    opacity: 0.95;
    filter: drop-shadow(0 0 14px #00ffff) brightness(1.9);
    color: #b3fcff;
  }
  75% {
    transform: translateY(-2px) scale(0.95, 1.05);
    opacity: 1;
    filter: drop-shadow(0 0 8px #00d4ff) brightness(1.3);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: none;
    color: #e0f7ff;
  }
}

@keyframes ufo-char-beam-out {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  35% {
    transform: translateY(-8px) scale(0.85, 1.45);
    opacity: 0.9;
    filter: drop-shadow(0 0 18px #00ffcc) brightness(2.6);
    color: #ffffff;
  }
  100% {
    transform: translateY(-45px) scale(0.08, 3.5);
    opacity: 0;
    filter: blur(3px) brightness(4.5);
    color: #00ffaa;
  }
}

/* ---------- Tablette (paysage / medium) ---------- */
@media (max-width: 1024px) {
  .card-header {
    gap: 1.35rem;
  }

  .huma-corner {
    max-width: min(360px, calc(100vw - 1.5rem - var(--safe-left) - var(--safe-right)));
  }
}

/* ---------- Téléphone & petites largeurs ---------- */
@media (max-width: 640px) {
  .content {
    padding: calc(0.65rem + var(--safe-top)) calc(0.65rem + var(--safe-right)) calc(0.85rem + var(--safe-bottom))
      calc(0.65rem + var(--safe-left));
    align-items: flex-start;
    padding-top: calc(5.5rem + var(--safe-top));
  }

  .ufo-mothership {
    width: clamp(290px, 94vw, 520px);
  }

  .card {
    max-width: 100%;
  }

  .card-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .card-titles {
    width: 100%;
    align-items: center;
  }

  .name {
    white-space: normal;
    max-width: 100%;
  }

  .card.is-ready .name {
    width: auto;
    border-right: none;
    animation: fade-up 0.6s ease 2.2s forwards;
  }

  .pixel-panel {
    padding: 0.85rem 0.75rem;
    min-height: 4rem;
  }

  .pixel-panel__line {
    font-size: clamp(0.48rem, 3.4vw, 0.72rem);
    gap: 0.45em 0.65em;
  }

  .links {
    padding: 0 0.15rem;
  }

  .btn-discord {
    width: 100%;
    max-width: 22rem;
    min-height: 48px;
    box-sizing: border-box;
  }

  .huma-corner {
    top: calc(0.5rem + var(--safe-top));
    left: calc(0.5rem + var(--safe-left));
    max-width: calc(100vw - 1rem - var(--safe-left) - var(--safe-right));
  }

  .huma-corner__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .huma-corner__logo {
    width: min(115px, 42vw);
  }

  .huma-corner__planet-track {
    width: min(240px, calc(100vw - 2rem - var(--safe-left) - var(--safe-right)));
    margin-top: 0.35rem;
    align-self: stretch;
    min-height: min(175px, 46vw);
  }

  .huma-planet-bubble {
    width: min(200px, 78vw);
  }

  .huma-planet-bubble__text {
    font-size: clamp(0.52rem, 2.8vw, 0.68rem);
  }
}

/* Écrans tactiles : zones de clic confortables */
@media (pointer: coarse) {
  .btn-discord {
    min-height: 48px;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .audio-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .enter-btn {
    min-height: 48px;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Petit écran en paysage (téléphone) */
@media (max-height: 520px) and (orientation: landscape) {
  .content {
    padding-top: calc(3.5rem + var(--safe-top));
    align-items: center;
  }

  .card {
    --card-pad-y: clamp(0.85rem, 3vh, 1.5rem);
  }

  .avatar {
    width: clamp(4.5rem, 22vh, 7rem);
    height: clamp(4.5rem, 22vh, 7rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pixel-panel__line.is-exiting .pixel-panel__char,
  .pixel-panel__line.is-entering .pixel-panel__char,
  .pixel-panel__line.is-exiting .pixel-panel__char::after,
  .pixel-panel__line.is-entering .pixel-panel__char::after {
    animation: none !important;
  }

  .huma-planet-drop {
    transition: transform 0.18s ease, opacity 0.18s ease;
  }
}

.bio {
  margin: 2rem 0 2.5rem;
  font-size: clamp(1rem, 2.6vw + 0.4rem, 1.85rem);
  line-height: 1.55;
  color: var(--text-muted);
  opacity: 0;
}

.card.is-ready .bio {
  animation: fade-up 0.6s ease 4.2s forwards;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  justify-content: center;
  width: 100%;
}

.card.is-ready .links {
  animation: fade-up 0.6s ease 4.4s forwards;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.65rem, 2vw, 1.1rem);
  padding: clamp(0.95rem, 2.5vw, 1.2rem) clamp(1.5rem, 5vw, 2.75rem);
  min-height: 2.75rem;
  font-size: clamp(1.1rem, 3.5vw + 0.3rem, 1.9rem);
  max-width: 100%;
  font-weight: 600;
  font-family: var(--font-sans);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.85rem;
  background: linear-gradient(180deg, #7289da 0%, #5865f2 55%, #4752c4 100%);
  box-shadow: 0 8px 28px rgba(88, 101, 242, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-discord:hover,
.btn-discord:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 36px rgba(88, 101, 242, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  filter: brightness(1.06);
}

.btn-discord__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.65s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.btn-discord:hover .btn-discord__icon,
.btn-discord:focus-visible .btn-discord__icon {
  transform: rotate(360deg);
}

.btn-discord__svg {
  display: block;
  width: clamp(1.85rem, 6vw, 2.5rem);
  height: clamp(1.85rem, 6vw, 2.5rem);
}

.btn-discord__label {
  letter-spacing: 0.03em;
}

.enter-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: radial-gradient(circle at 50% 50%, rgba(15, 20, 40, 0.92) 0%, rgba(4, 6, 12, 0.97) 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.enter-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.enter-hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.enter-btn {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2.8vw, 0.95rem);
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  min-height: 44px;
  color: var(--bg-deep);
  background: linear-gradient(180deg, #b8d8ff 0%, var(--accent) 100%);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(126, 184, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}

.enter-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 32px rgba(126, 184, 255, 0.45);
}

.audio-toggle {
  position: fixed;
  bottom: calc(1rem + var(--safe-bottom));
  right: calc(1rem + var(--safe-right));
  z-index: 50;
  width: clamp(3rem, 10vw, 3.5rem);
  height: clamp(3rem, 10vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--accent);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: opacity 0.2s, background 0.2s;
}

.audio-toggle:hover {
  background: rgba(126, 184, 255, 0.12);
}

.audio-toggle[aria-pressed="true"] {
  opacity: 0.6;
}

.audio-icon {
  font-size: 1.45rem;
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Constellations en Flèche Interactives (Aller Droite / Retour Gauche)
   ========================================================================== */

.constellation-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  width: clamp(75px, 9vw, 110px);
  height: clamp(95px, 12vw, 140px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
  outline: none;
}

.constellation-arrow--forward {
  right: calc(1rem + var(--safe-right));
}

.constellation-arrow--back {
  left: calc(1rem + var(--safe-left));
  opacity: 0.85;
  pointer-events: auto;
}

.constellation-arrow.is-visible {
  opacity: 0.85;
  pointer-events: auto;
  animation: constellation-float 3.6s ease-in-out infinite alternate;
}

@keyframes constellation-float {
  0% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(calc(-50% - 6px)) translateX(-3px); }
  100% { transform: translateY(calc(-50% + 4px)) translateX(2px); }
}

.constellation-arrow__glow {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 220, 0.22) 0%, rgba(126, 184, 255, 0.08) 50%, transparent 75%);
  opacity: 0.4;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.constellation-arrow__lines {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 8px rgba(0, 255, 220, 0.45));
  transition: filter 0.3s ease;
}

/* Lignes stellaires */
.c-line {
  fill: none;
  stroke: rgba(126, 184, 255, 0.35);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.c-line.main-arrow {
  stroke-dasharray: 6 3;
  animation: constellation-dash 12s linear infinite;
}

.c-line.center-axis {
  stroke: rgba(0, 255, 220, 0.3);
  stroke-width: 1.2;
}

@keyframes constellation-dash {
  to { stroke-dashoffset: -100; }
}

/* Étoiles individuelles */
.c-star {
  fill: #e8f4ff;
  transition: transform 0.25s ease, fill 0.25s ease, r 0.25s ease;
  transform-origin: center;
  animation: star-twinkle 2.2s ease-in-out infinite alternate;
}

.c-star:nth-child(odd) { animation-delay: 0.4s; }
.c-star:nth-child(3n) { animation-delay: 0.9s; }

.c-star.primary {
  fill: #7effea;
  filter: drop-shadow(0 0 6px #00ffff);
}

.c-star.beacon {
  fill: #ffffff;
  filter: drop-shadow(0 0 10px #00ffff) drop-shadow(0 0 20px #00ffaa);
  animation: beacon-pulse 1.4s ease-in-out infinite alternate;
}

@keyframes star-twinkle {
  0% { opacity: 0.45; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1.15); filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9)); }
}

@keyframes beacon-pulse {
  0% { transform: scale(0.9); opacity: 0.75; }
  100% { transform: scale(1.35); opacity: 1; fill: #00ffff; }
}

/* Proximité & Hover : Scintillement intense */
.constellation-arrow.is-near,
.constellation-arrow:hover,
.constellation-arrow:focus-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1.12);
}

.constellation-arrow.is-near .constellation-arrow__glow,
.constellation-arrow:hover .constellation-arrow__glow {
  opacity: 1;
  transform: scale(1.3);
}

.constellation-arrow.is-near .constellation-arrow__lines,
.constellation-arrow:hover .constellation-arrow__lines {
  filter: drop-shadow(0 0 16px rgba(0, 255, 220, 0.9)) drop-shadow(0 0 30px rgba(0, 200, 255, 0.6));
}

.constellation-arrow.is-near .c-line,
.constellation-arrow:hover .c-line {
  stroke: rgba(0, 255, 220, 0.85);
  stroke-width: 2.2;
}

.constellation-arrow.is-near .c-star,
.constellation-arrow:hover .c-star {
  fill: #ffffff;
  filter: drop-shadow(0 0 8px #00ffff) drop-shadow(0 0 14px #ffea55);
}

/* Tooltip */
.constellation-arrow__tooltip {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  padding: 0.5rem 0.85rem;
  border-radius: 0.45rem;
  background: rgba(6, 12, 28, 0.92);
  border: 1px solid rgba(0, 255, 220, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 12px rgba(0, 255, 220, 0.25);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-pixel);
  font-size: clamp(0.55rem, 1.2vw, 0.68rem);
  color: #00ffff;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
  z-index: 40;
}

.constellation-arrow--forward .constellation-arrow__tooltip {
  right: calc(100% + 14px);
}

.constellation-arrow--back .constellation-arrow__tooltip {
  left: calc(100% + 14px);
  transform: translateY(-50%) translateX(-10px);
}

.constellation-arrow.is-near .constellation-arrow__tooltip,
.constellation-arrow:hover .constellation-arrow__tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   Vue Plein Écran Mini-Jeu d'Arcade Osu! & Arrière-plan Warp Star Wars
   ========================================================================== */

.warp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 1;
}

.emperor-game-view {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: transparent;
  user-select: none;
}

/* Header & ATH (Score, Combo, Chrono) */
.eg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.65rem, 2vh, 1.1rem) clamp(1.2rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(14, 24, 52, 0.85) 0%, rgba(8, 14, 32, 0.7) 100%);
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 10;
}

.eg-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.eg-stat__label {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: rgba(232, 238, 248, 0.65);
}

.eg-stat__val {
  font-family: var(--font-pixel);
  font-size: clamp(0.95rem, 2.2vw, 1.45rem);
  font-weight: 700;
  color: #00ffff;
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.55);
}

.combo-stat .eg-stat__val {
  color: #ffea55;
  transition: transform 0.15s ease;
}

.combo-stat .eg-stat__val.is-active {
  animation: combo-bounce 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
  color: #ff3366;
  text-shadow: 0 0 16px #ff3366;
}

@keyframes combo-bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

.timer-stat .timer-val {
  color: #ff9933;
}

/* Barre de progression du temps */
.eg-timer-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 10;
}

.eg-timer-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ff3344 0%, #ff9900 40%, #00ffcc 100%);
  box-shadow: 0 0 10px #00ffcc;
  transition: width 0.3s linear;
}

/* Arène de jeu plein format avec étoiles visibles en arrière-plan */
.eg-arena {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  background: transparent;
}

#eg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Écran Game Over */
.eg-gameover {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 8, 20, 0.85);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.eg-gameover.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.eg-gameover__box {
  width: min(90%, 480px);
  padding: 2.2rem 1.75rem;
  border-radius: 0.85rem;
  background: linear-gradient(180deg, rgba(16, 26, 56, 0.95) 0%, rgba(8, 14, 30, 0.98) 100%);
  border: 1px solid rgba(0, 240, 255, 0.4);
  box-shadow: 0 10px 45px rgba(0, 0, 0, 0.75), 0 0 35px rgba(0, 255, 200, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.35rem;
}

.eg-gameover__title {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: #d8f0ff;
  letter-spacing: 0.06em;
}

.eg-rank-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.eg-rank-letter {
  font-family: var(--font-pixel);
  font-size: 4.2rem;
  line-height: 1;
  font-weight: 700;
  color: #00ffff;
  animation: rank-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes rank-pulse {
  0% { transform: scale(0.95); }
  100% { transform: scale(1.08); }
}

.eg-rank-title {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: #7effea;
  letter-spacing: 0.05em;
}

.eg-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.35rem;
  width: 100%;
  padding: 1.1rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.eg-res-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.eg-res-lbl {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.eg-res-val {
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: #ffffff;
}

.eg-actions {
  display: flex;
  gap: 0.85rem;
  width: 100%;
  justify-content: center;
}

.eg-btn {
  flex: 1;
  padding: 0.95rem 1.2rem;
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  border-radius: 0.45rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.eg-btn--primary {
  background: linear-gradient(180deg, #00ffff 0%, #00a2ff 100%);
  color: #040814;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 255, 255, 0.35);
}

.eg-btn--primary:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 24px rgba(0, 255, 255, 0.55);
}

.eg-btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e8eef8;
}

.eg-btn--secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.03);
}

@media (max-width: 640px) {
  .constellation-arrow--forward {
    right: calc(0.35rem + var(--safe-right));
  }
  .constellation-arrow--back {
    left: calc(0.35rem + var(--safe-left));
  }
  .eg-header {
    padding: 0.6rem 0.85rem;
  }
  .eg-results-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Hub Audio & Paroles Synchronisées (En bas à gauche)
   ========================================================================== */
.audio-lyrics-hub {
  position: fixed;
  bottom: calc(1.4rem + var(--safe-bottom));
  left: calc(1.4rem + var(--safe-left));
  z-index: 120;
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  pointer-events: auto;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.audio-lyrics-hub[hidden] {
  display: none !important;
}

/* Bouton Audio avec icône musicale par défaut et Play/Pause au survol */
.audio-toggle-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(8, 16, 32, 0.82);
  border: 1px solid rgba(0, 240, 255, 0.45);
  color: #00f0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55), 0 0 16px rgba(0, 240, 255, 0.25);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1),
              background-color 0.2s ease,
              border-color 0.2s ease,
              box-shadow 0.2s ease,
              color 0.2s ease;
  flex-shrink: 0;
  padding: 0;
  outline: none;
}

.audio-toggle-btn:hover {
  transform: scale(1.12);
  border-color: #00ffff;
  color: #ffffff;
  background: rgba(0, 240, 255, 0.25);
  box-shadow: 0 6px 25px rgba(0, 255, 255, 0.45), 0 0 25px rgba(0, 255, 255, 0.4);
}

.audio-toggle-btn:active {
  transform: scale(0.96);
}

/* Gestion de l'affichage des icônes : Défaut (Musique) vs Survol (Pause ou Play) */
.audio-icon-default {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.audio-icon-hover {
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.audio-toggle-btn:hover .audio-icon-default {
  display: none;
}

.audio-toggle-btn.is-playing:hover .audio-icon-hover--pause {
  display: flex;
}

.audio-toggle-btn.is-paused:hover .audio-icon-hover--play {
  display: flex;
}

/* Panneau Carte des Paroles */
.lyrics-card {
  max-width: clamp(260px, 34vw, 440px);
  background: rgba(6, 14, 28, 0.78);
  border: 1px solid rgba(80, 180, 255, 0.25);
  border-radius: 12px;
  padding: 0.65rem 1.05rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55), inset 0 0 16px rgba(0, 240, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.lyrics-card:hover {
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.65), 0 0 22px rgba(0, 240, 255, 0.2);
}

.lyrics-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(120, 190, 255, 0.12);
  padding-bottom: 0.35rem;
}

.lyrics-track-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #7ee8fa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Égaliseur visuel animé au rythme de la musique */
.lyrics-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
  flex-shrink: 0;
}

.lyrics-equalizer .eq-bar {
  width: 2.5px;
  background: #00f0ff;
  border-radius: 1px;
  height: 3px;
  opacity: 0.4;
  transition: height 0.15s ease, opacity 0.15s ease;
}

.audio-lyrics-hub.is-playing .lyrics-equalizer .eq-bar:nth-child(1) {
  animation: eq-bounce 0.8s ease-in-out infinite alternate;
}
.audio-lyrics-hub.is-playing .lyrics-equalizer .eq-bar:nth-child(2) {
  animation: eq-bounce 0.55s ease-in-out 0.15s infinite alternate;
}
.audio-lyrics-hub.is-playing .lyrics-equalizer .eq-bar:nth-child(3) {
  animation: eq-bounce 0.7s ease-in-out 0.3s infinite alternate;
}
.audio-lyrics-hub.is-playing .lyrics-equalizer .eq-bar:nth-child(4) {
  animation: eq-bounce 0.6s ease-in-out 0.1s infinite alternate;
}

@keyframes eq-bounce {
  0% {
    height: 3px;
    opacity: 0.45;
  }
  100% {
    height: 12px;
    opacity: 1;
    filter: drop-shadow(0 0 4px #00f0ff);
  }
}

/* Paroles actives avec glow cyan */
.lyrics-line-active {
  font-family: var(--font-outfit), sans-serif;
  font-size: clamp(0.85rem, 1.15vw, 1.05rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.65);
  min-height: 1.4em;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.lyrics-line-active.is-instrumental {
  color: #a2c8f0;
  font-style: italic;
  font-weight: 400;
  font-size: 0.82rem;
  text-shadow: 0 0 8px rgba(100, 180, 255, 0.35);
}

@media (max-width: 640px) {
  .audio-lyrics-hub {
    bottom: calc(0.75rem + var(--safe-bottom));
    left: calc(0.75rem + var(--safe-left));
    right: calc(0.75rem + var(--safe-right));
    gap: 0.6rem;
  }
  .lyrics-card {
    max-width: none;
    flex: 1;
    padding: 0.5rem 0.75rem;
  }
  .audio-toggle-btn {
    width: 42px;
    height: 42px;
  }
}



