/* ═══════════════════════════════════════════════════════
   AUTH.CSS — modal connexion + leaderboard
   Dépend de : base.css
   ═══════════════════════════════════════════════════════ */

/* ── Modal auth overlay ──────────────────────────────── */
.auth-modal {
  display: none;
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(1,1,8,.82);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  animation: amFade .25s ease;
}
.auth-modal.on { display: flex; }
@keyframes amFade { from { opacity: 0; } to { opacity: 1; } }

.auth-modal-box {
  background: var(--panel);
  border: 1px solid var(--gold-line);
  padding: 2.4rem 2rem 2rem;
  max-width: 360px; width: 90%;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  position: relative; overflow: hidden;
  animation: amRise .3s cubic-bezier(.2,.8,.3,1);
  box-shadow: 0 0 60px var(--gold-glow), 0 0 120px rgba(0,0,0,.8);
}
@keyframes amRise { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }

.am-deco {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.am-icon {
  font-size: 2rem; line-height: 1;
  color: var(--gold);
  filter: drop-shadow(0 0 10px var(--gold-glow));
}

.am-title {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.3rem; font-weight: 800;
  letter-spacing: .08em; color: var(--white);
  margin: 0;
}

.am-sub {
  font-size: .82rem; color: var(--muted);
  text-align: center; line-height: 1.6;
  margin: 0;
}
.am-sub strong { color: var(--gold-lt); }

.am-providers { display: flex; flex-direction: column; gap: 9px; width: 100%; }

.am-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: .75rem 1rem;
  border: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif; font-size: .8rem; font-weight: 600;
  cursor: pointer; transition: all .2s; letter-spacing: .03em;
  background: rgba(255,255,255,.04); color: var(--white);
}
.am-btn:hover { background: rgba(255,255,255,.09); border-color: var(--gold-line); }

.am-skip {
  background: none; border: none;
  font-family: 'DM Sans', sans-serif; font-size: .76rem;
  color: var(--muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
  transition: color .2s;
}
.am-skip:hover { color: var(--gold-lt); }

.am-note {
  font-size: .68rem; color: var(--dim);
  text-align: center; line-height: 1.5;
  margin: 0;
}

/* ── Menu utilisateur ────────────────────────────────── */
.user-menu {
  position: fixed;
  background: var(--panel); border: 1px solid var(--gold-line);
  padding: .9rem 1.1rem;
  min-width: 200px; z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  animation: amRise .2s ease;
}

.um-name  { font-size: .82rem; font-weight: 600; color: var(--white); }
.um-email { font-size: .68rem; color: var(--dim); margin: 3px 0 12px; }

.um-logout {
  width: 100%; background: none;
  border: 1px solid var(--border); color: var(--muted);
  font-family: 'DM Sans', sans-serif; font-size: .72rem; font-weight: 600;
  letter-spacing: .06em; padding: .5rem; cursor: pointer;
  text-transform: uppercase; transition: all .2s;
}
.um-logout:hover { border-color: var(--ko-bd); color: var(--ko-tx); }

/* ── Modal leaderboard ───────────────────────────────── */
.lb-modal {
  display: none;
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(1,1,8,.85);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
  animation: amFade .25s ease;
}
.lb-modal.on { display: flex; }

.lb-box {
  background: var(--panel);
  border: 1px solid var(--gold-line);
  max-width: 440px; width: 92%;
  max-height: 85vh; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  animation: amRise .3s cubic-bezier(.2,.8,.3,1);
  box-shadow: 0 0 60px var(--gold-glow), 0 0 120px rgba(0,0,0,.8);
}

.lb-deco {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.lb-header {
  padding: 1.4rem 1.5rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.lb-title { display: flex; flex-direction: column; gap: 2px; }
.lb-title h2 {
  font-family: 'Shippori Mincho', serif;
  font-size: 1rem; font-weight: 800;
  color: var(--white); margin: 0; letter-spacing: .06em;
}
.lb-title span {
  font-size: .65rem; color: var(--gold-lt);
  letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
}

.lb-close {
  background: none; border: none; color: var(--muted);
  font-size: 1.1rem; cursor: pointer; padding: .2rem .4rem;
  transition: color .2s; line-height: 1;
}
.lb-close:hover { color: var(--white); }

.lb-scroll { overflow-y: auto; flex: 1; padding: .8rem .8rem 1.2rem; }

.lb-loading,
.lb-empty {
  text-align: center; color: var(--dim);
  font-size: .8rem; padding: 2rem 1rem;
}

.lb-row {
  display: flex; align-items: center; gap: 11px;
  padding: .7rem .8rem;
  border: 1px solid transparent;
  margin-bottom: 3px;
  transition: background .15s;
}
.lb-row:hover { background: var(--gold-pale); }
.lb-row.lb-top { border-color: rgba(212,168,67,.15); background: rgba(212,168,67,.04); }

.lb-pos { width: 28px; text-align: center; font-size: .9rem; flex-shrink: 0; }
.lb-rank { font-size: .7rem; color: var(--dim); font-weight: 600; }

.lb-av {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--rim); object-fit: cover; flex-shrink: 0;
}
.lb-av-init {
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); color: var(--gold-lt);
  font-size: .65rem; font-weight: 700;
}

.lb-info { flex: 1; min-width: 0; }
.lb-name { font-size: .8rem; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-sub  { font-size: .62rem; color: var(--dim); margin-top: 1px; }

.lb-score {
  font-family: 'Shippori Mincho', serif;
  font-size: 1.1rem; font-weight: 800;
  color: var(--gold-lt); flex-shrink: 0;
}

.lb-row.lb-top:nth-child(1) .lb-score { color: #ffd700; }
.lb-row.lb-top:nth-child(2) .lb-score { color: #c0c0c0; }
.lb-row.lb-top:nth-child(3) .lb-score { color: #cd7f32; }
