/* ============================================================
   SHUFFLE DRUMMER — Jauge d'expérience (footer)
   Remplace le crédit texte par une barre de progression stylisée
   dont les paliers sont symbolisés par les 8 chats (assets/perso).
   Couleurs : voir variables.css (accent orange). Aucune valeur
   hardcodée qui doublonne un token existant.
   ============================================================ */

.xp-gauge {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
  -webkit-user-select: none;
}

/* libellé « temps restant avant le prochain chat » sous la jauge */
.xp-caption {
  margin-top: 8px;
  font-family: 'Share Tech Mono', 'OCR B', 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--accent-deep);
  text-align: center;
  min-height: 16px;
}

/* ════════════════════════════════════════════════════════════
   PARCOURS DE PROGRESSION (façon jeu vidéo)
   La « route » (rail) est en bas ; les chats se tiennent DEBOUT
   au-dessus, chacun sur son checkpoint (nœud). La ligne ne traverse
   donc jamais les images.
   ════════════════════════════════════════════════════════════ */
.xp-track {
  position: relative;
  width: 100%;
  height: 96px;
}

/* la route */
.xp-rail {
  position: absolute;
  left: 0; right: 0;
  bottom: 14px;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, #d8cdb8 0%, #c4b79e 100%);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.25),
              inset 0 -1px 0 rgba(255,255,255,0.4),
              0 1px 0 rgba(255,255,255,0.3);
  overflow: hidden;
}
.xp-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(180deg,
    var(--accent-light) 0%, var(--accent) 50%,
    var(--accent-deep) 100%);
  box-shadow: 0 0 8px var(--accent-glow-40),
              inset 0 1px 0 rgba(255,255,255,0.4);
  transition: width 0.6s cubic-bezier(.22,.61,.36,1);
}
/* reflet animé qui balaie la route */
.xp-fill::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    transparent 0%, rgba(255,255,255,0.6) 50%, transparent 100%);
  background-size: 50px 100%;
  background-repeat: no-repeat;
  animation: xp-shine 3.2s linear infinite;
  opacity: 0.5;
}
@keyframes xp-shine {
  0%   { background-position: -60px 0; }
  100% { background-position: calc(100% + 60px) 0; }
}

/* ── Checkpoints (nœuds) sur la route ──────────────────── */
.xp-node {
  position: absolute;
  bottom: 19px;                 /* centré sur la route (14 + 10/2) */
  left: 0;
  width: 13px; height: 13px;
  border-radius: 50%;
  transform: translate(-50%, 50%);
  background: radial-gradient(circle at 50% 35%, #efe7d6, #cabfa8);
  border: 2px solid #b3a589;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
  z-index: 3;
  transition: background 0.4s ease, border-color 0.4s ease,
              box-shadow 0.4s ease, width 0.3s ease, height 0.3s ease;
}
.xp-node.lit {
  background: radial-gradient(circle at 50% 35%, var(--accent-light), var(--accent-deep));
  border-color: #fff3e0;
  box-shadow: 0 0 7px var(--accent-bright), 0 1px 2px rgba(0,0,0,0.4);
}
.xp-node.current {
  width: 17px; height: 17px;
  animation: xp-node-pulse 1.6s ease-in-out infinite;
}
@keyframes xp-node-pulse {
  0%, 100% { box-shadow: 0 0 6px var(--accent-bright), 0 1px 2px rgba(0,0,0,0.4); }
  50%      { box-shadow: 0 0 14px var(--accent-bright), 0 1px 2px rgba(0,0,0,0.4); }
}

/* ── Chats — DEBOUT au-dessus de leur checkpoint ───────── */
.xp-step {
  position: absolute;
  bottom: 30px;                 /* posés au-dessus de la route */
  /* left:X% posé en JS ; translate centre horizontalement.
     hauteur posée en JS (croissante par palier). */
  transform: translate(-50%, 0);
  transform-origin: bottom center;
  width: auto;
  cursor: pointer;
  filter: grayscale(0.95) brightness(1.05) opacity(0.45);
  transition: filter 0.4s ease, transform 0.3s ease, bottom 0.3s ease;
  z-index: 4;
  -webkit-user-drag: none;
}
.xp-step.lit {
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.35))
          drop-shadow(0 0 4px var(--accent-dim));
}
.xp-step.current {
  /* grandit par rapport à sa propre taille de base (scale relatif) */
  transform: translate(-50%, 0) scale(1.22);
  filter: drop-shadow(0 0 8px var(--accent-bright))
          drop-shadow(0 3px 3px rgba(0,0,0,0.45));
  animation: xp-glow-pulse 1.8s ease-in-out infinite;
  z-index: 5;
}
/* pulse de lueur (sans toucher au transform → reste centré) */
@keyframes xp-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 5px var(--accent-bright)) drop-shadow(0 3px 3px rgba(0,0,0,0.45)); }
  50%      { filter: drop-shadow(0 0 13px var(--accent-bright)) drop-shadow(0 3px 3px rgba(0,0,0,0.45)); }
}

/* liseré au survol */
.xp-step:hover {
  filter: drop-shadow(0 0 8px var(--accent-bright));
}

/* ── Toast de récompense de palier ──────────────────────── */
.xp-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(30px);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px 14px 16px;
  background: linear-gradient(180deg, #2a1c10 0%, #1a120a 100%);
  border: 1.5px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 24px var(--accent-glow-40);
  font-family: 'Share Tech Mono', 'OCR B', 'Courier New', monospace;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.22,1.2,.36,1);
}
.xp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.xp-toast img {
  height: 56px; width: auto;
  filter: drop-shadow(0 0 10px var(--accent-bright));
  animation: xp-bob 1.6s ease-in-out infinite;
}
@keyframes xp-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.xp-toast .xp-toast-txt { line-height: 1.5; }
.xp-toast .xp-toast-hdr {
  color: var(--accent-light);
  font-size: 11px; letter-spacing: 0.2em; font-weight: 700;
}
.xp-toast .xp-toast-rank {
  color: var(--white);
  font-size: 17px; letter-spacing: 0.12em; font-weight: 700;
  text-shadow: 0 0 10px var(--led-shadow);
}
.xp-toast .xp-toast-sub {
  color: var(--accent-light); opacity: 0.8;
  font-size: 10px; letter-spacing: 0.1em; margin-top: 2px;
}

@media (max-width: 460px) {
  .xp-track { transform: scale(0.84); transform-origin: center bottom; }
}
@media (prefers-reduced-motion: reduce) {
  .xp-fill::before, .xp-step.current, .xp-toast img { animation: none; }
}

/* ── Vignette d'aperçu d'un palier (clic sur un chat) ──────── */
.xp-preview-ov {
  position: fixed; inset: 0; z-index: 10001;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
}
.xp-preview-ov.show { display: flex; }
.xp-preview-card {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 28px 40px 24px;
  background: linear-gradient(180deg, #2a1c10 0%, #140d07 100%);
  border: 1.5px solid var(--accent);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.65), 0 0 30px var(--accent-glow-40);
  animation: acc-pop 0.26s cubic-bezier(.22,1.2,.36,1);
}
.xp-preview-card img {
  height: 168px; width: auto;
  filter: drop-shadow(0 0 16px var(--accent-bright)) drop-shadow(0 4px 6px rgba(0,0,0,0.5));
  animation: xp-bob 2s ease-in-out infinite;
}
.xp-preview-rank {
  color: #fff;
  font-family: 'Share Tech Mono', 'OCR B', 'Courier New', monospace;
  font-size: 22px; letter-spacing: 0.18em; font-weight: 700;
  text-shadow: 0 0 14px var(--led-shadow);
}

/* ════════════════════════════════════════════════════════════
   CARTE DE COMPTE (popup #account-overlay)
   ════════════════════════════════════════════════════════════ */
.acc-overlay {
  position: fixed; inset: 0; z-index: 9999;
  align-items: center; justify-content: center;
  background: rgba(20, 12, 6, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
/* display:flex appliqué par JS (style.display) à l'ouverture */

.acc-card {
  position: relative;
  width: 384px; max-width: 94vw;
  max-height: 88vh;
  overflow-y: auto;
  background: #1a1814;
  border: 1px solid #ff9440aa;
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.8);
  font-family: 'Share Tech Mono', 'OCR B', 'Courier New', monospace;
  padding-bottom: 24px;
  animation: acc-pop 0.28s cubic-bezier(.22,1.2,.36,1);
}
@keyframes acc-pop {
  0%   { opacity: 0; transform: translateY(14px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* bandeau supprimé — le dégradé radial du fond remplace l'effet */
.acc-banner { display: none; }

.acc-body { padding: 0 26px; }

/* avatar centré en haut du popup */
.acc-avatar {
  width: 108px; height: 108px;
  margin: 28px auto 0;
  border-radius: 50%;
  background: #fff;
  border: 3px solid rgba(255,122,26,0.35);
  box-shadow: 0 0 22px var(--accent-glow-40),
              0 8px 20px rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative; z-index: 2;
}
.acc-avatar img {
  height: 88px; width: auto; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

/* badge de grade (pastille) */
.acc-grade-wrap { text-align: center; margin-top: 12px; }
.acc-grade {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 999px;
  background: rgba(255,122,26,0.13);
  border: 1px solid rgba(255,122,26,0.38);
  color: var(--accent-light);
  font-size: 11px; letter-spacing: 0.22em; font-weight: 700;
}

.acc-gauge-wrap { margin: 14px 2px 16px; }

/* champs */
.acc-field { margin-top: 12px; }
.acc-label {
  display: block;
  font-size: 9px; letter-spacing: 0.18em; font-weight: 700;
  color: #ff9440; margin: 0 0 5px 3px;
}
.acc-input, .acc-textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,0.06);
  border: 1px solid #ff944033;
  border-radius: 8px;
  color: #e8ddd0;
  font-family: inherit; font-size: 14px;
  padding: 10px 13px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.acc-textarea { font-size: 13px; resize: vertical; min-height: 168px; line-height: 1.5; }
.acc-input::placeholder, .acc-textarea::placeholder { color: #5a5248; }
.acc-input:focus, .acc-textarea:focus {
  border-color: #ff9440;
  box-shadow: 0 0 0 3px rgba(255,148,64,0.15);
}

/* ── Inventaire kits dans le profil ─────────────────────── */
.acc-kit-inventory {
  margin: 4px 0 14px;
}
.acc-kit-inventory-title {
  font-size: 9px; letter-spacing: 0.18em; font-weight: 700;
  color: #8a7a68; margin: 0 0 8px 3px;
}
.acc-kit-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.acc-kit-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,122,26,0.3);
  background: rgba(255,122,26,0.08);
  font-size: 10px; letter-spacing: 0.12em; font-weight: 700;
  color: var(--accent-light);
}
.acc-kit-chip.locked {
  border-color: rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.03);
  color: #4a3a2a;
}
.acc-kit-chip img {
  width: 26px; height: 26px; object-fit: cover;
  border-radius: 5px; flex-shrink: 0;
}
.acc-kit-chip .acc-kit-lock { font-size: 12px; opacity: 0.5; }

/* bouton fermer (rond, sur le bandeau) */
.acc-close {
  position: absolute; top: 11px; right: 12px; z-index: 3;
  width: 27px; height: 27px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.55);
  color: #fff; font-size: 13px; line-height: 1; cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.acc-close:hover { background: rgba(255,255,255,0.42); transform: scale(1.08); }
