/* ═══════════════════════════════════════════════════════════
   TOP 5 CONNECTÉS — Rappelz Snow NG
   À ajouter à la fin de style.css
   ═══════════════════════════════════════════════════════════ */

/* ── Section wrapper ───────────────────────────────────────── */
#online {
  position: relative;
  overflow: hidden;
}

#online::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(20,60,110,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.online-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

/* ── Compteur pill ─────────────────────────────────────────── */
.online-counter {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ice-bright);
  background: linear-gradient(135deg, rgba(11,18,37,0.9), rgba(13,22,48,0.9));
  border: 1px solid var(--border-glow);
  padding: .55rem 1.5rem;
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(90,180,240,.15), inset 0 1px 0 rgba(141,212,255,.08);
}

/* Dot pulsant */
.online-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-ok);
  box-shadow: 0 0 10px var(--green-ok);
  flex-shrink: 0;
}
.online-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--green-ok);
  opacity: 0;
  animation: ripple-dot 2s ease-out infinite;
}
@keyframes ripple-dot {
  0%   { opacity: .6; transform: scale(.6); }
  100% { opacity: 0;  transform: scale(2); }
}

/* ── Carte Top 5 ───────────────────────────────────────────── */
.top5-card {
  width: 100%;
  max-width: 540px;
  background: var(--bg-panel);
  border: 1px solid var(--border-ice);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0,0,0,.5),
    0 0 40px rgba(90,180,240,.08),
    inset 0 1px 0 rgba(141,212,255,.06);
  position: relative;
}

/* Barre lumineuse en haut */
.top5-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    var(--ice-dim) 25%,
    var(--ice-bright) 50%,
    var(--ice-dim) 75%,
    transparent);
}

/* ── Header carte ──────────────────────────────────────────── */
.top5-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ice-dim);
  background: linear-gradient(135deg, rgba(13,22,48,.8), rgba(11,18,37,.6));
  border-bottom: 1px solid var(--border-ice);
}

.top5-crown { font-size: 1rem; filter: drop-shadow(0 0 6px rgba(200,168,75,.7)); }

/* ── Lignes joueurs ────────────────────────────────────────── */
.top5-list {
  list-style: none;
  margin: 0;
  padding: .4rem 0;
}

.top5-item {
  display: grid;
  grid-template-columns: 2.2rem 2rem 1fr auto;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.5rem;
  border-bottom: 1px solid rgba(30,58,95,.4);
  transition: background .18s;
  animation: row-in .4s both ease-out;
  position: relative;
}
.top5-item:last-child { border-bottom: none; }
.top5-item:hover { background: rgba(90,180,240,.05); }

/* Reflet latéral au hover */
.top5-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--ice-dim), transparent);
  opacity: 0;
  transition: opacity .2s;
}
.top5-item:hover::before { opacity: 1; }

@keyframes row-in {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Rang */
.top5-rank {
  text-align: center;
  font-family: 'Cinzel Decorative', serif;
  font-size: .75rem;
  font-weight: 900;
  color: var(--text-muted);
  line-height: 1;
}

/* Médailles top 3 */
.top5-item:nth-child(1) .top5-rank {
  color: var(--gold-bright);
  text-shadow: 0 0 12px rgba(232,200,106,.6);
  font-size: .85rem;
}
.top5-item:nth-child(2) .top5-rank {
  color: #c0c8d8;
  text-shadow: 0 0 8px rgba(192,200,216,.4);
}
.top5-item:nth-child(3) .top5-rank {
  color: #cd8c60;
  text-shadow: 0 0 8px rgba(205,140,96,.3);
}

/* Ligne de fond colorée pour le #1 */
.top5-item:nth-child(1) {
  background: linear-gradient(90deg, rgba(200,168,75,.06), transparent 60%);
}

/* Avatar race */
.top5-avatar {
  width: 2rem; height: 2rem;
  background: var(--bg-deep);
  border: 1px solid var(--border-ice);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Nom */
.top5-name {
  font-family: 'Cinzel', serif;
  font-size: .85rem;
  font-weight: 600;
  color: var(--snow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: .03em;
}

/* Badge niveau */
.top5-level {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: .22rem .65rem;
  border-radius: 4px;
  background: rgba(90,180,240,.1);
  border: 1px solid rgba(90,180,240,.2);
  color: var(--ice);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .2s, border-color .2s;
}
.top5-item:nth-child(1) .top5-level {
  background: rgba(200,168,75,.12);
  border-color: rgba(200,168,75,.3);
  color: var(--gold-bright);
}
.top5-item:hover .top5-level {
  background: rgba(90,180,240,.18);
  border-color: rgba(90,180,240,.4);
}

/* ── États vides / chargement ──────────────────────────────── */
.top5-loading,
.top5-empty {
  padding: 1.8rem 1.5rem;
  text-align: center;
  font-style: italic;
  font-size: .92rem;
  color: var(--text-muted);
  list-style: none;
}

/* ── Lien classement ───────────────────────────────────────── */
.top5-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8rem 1rem;
  border-top: 1px solid var(--border-ice);
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ice-dim);
  text-decoration: none;
  background: rgba(90,180,240,.03);
  transition: background .18s, color .18s;
}
.top5-more:hover {
  background: rgba(90,180,240,.08);
  color: var(--ice-bright);
}
.top5-more::after {
  content: '→';
  transition: transform .2s;
}
.top5-more:hover::after { transform: translateX(4px); }

/* ── Nav active link ───────────────────────────────────────── */
nav a.active { color: var(--ice-bright) !important; }
nav a.active::after { transform: scaleX(1) !important; }
