/* ============================================================================
   QUIZ'EM ALL v1.1.20 — FICHE JOUEUR ADMIN (préfixe qapc-*, fichier additif)
   4 zones : en-tête joueur · stats de réponses · dernières parties · actions.
   Les actions sont visuellement SÉPARÉES de la lecture (liseré rouge, fond sombre)
   pour éviter les clics accidentels. Mobile d'abord, thème or/metal existant.
   ============================================================================ */

.qapc-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.qapc-modal.hidden { display: none; }
.qapc-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .68); }
.qapc-dialog {
  position: relative; width: min(720px, 100%); max-height: calc(100dvh - 32px);
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 20px 18px 18px; box-sizing: border-box;
  background: linear-gradient(180deg, rgba(24, 24, 30, .98), rgba(10, 10, 14, .99));
  border: 1px solid rgba(212, 175, 55, .45); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .65);
}
.qapc-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border: 1px solid rgba(212, 175, 55, .4); border-radius: 12px; background: rgba(20, 20, 26, .9);
  color: var(--gold-2, #e7c87a); font-size: 1.4rem; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.qapc-close:active { transform: scale(.94); }

/* ---------- Zones ---------- */
.qapc-zone {
  margin: 0 0 14px; padding: 14px; border: 1px solid rgba(58, 58, 66, .9); border-radius: 14px;
  background: rgba(20, 20, 26, .75);
}
.qapc-zone-title { margin: 0 0 10px; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-2, #e7c87a); }

/* ---------- Zone 1 : en-tête ---------- */
.qapc-head-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qapc-head-txt { flex: 1; min-width: 180px; }
.qapc-pseudo { margin: 0 0 2px; font-size: 1.25rem; color: #fff; }
.qapc-sub { margin: 0 0 6px; font-size: .82rem; color: #a3a3b0; }
.qapc-badges { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qapc-badge--ban { border-color: rgba(255, 107, 107, .6); color: #ff6b6b; }
.qapc-head-games { text-align: center; padding: 8px 14px; border: 1px solid rgba(212, 175, 55, .35); border-radius: 12px; background: rgba(212, 175, 55, .08); }
.qapc-head-games strong { display: block; font-size: 1.5rem; color: var(--gold-1, #fbefc0); }
.qapc-head-games span { font-size: .72rem; color: #a3a3b0; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Zone 2 : stats côte à côte ---------- */
.qapc-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.qapc-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px;
  border: 1px solid rgba(58, 58, 66, .9); border-radius: 12px; background: rgba(28, 28, 36, .9); text-align: center;
}
.qapc-stat-val { font-size: 1.3rem; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.qapc-stat-lbl { font-size: .7rem; color: #9a9aa5; text-transform: uppercase; letter-spacing: .05em; }
.qapc-stat--ok .qapc-stat-val { color: #7dde8b; }
.qapc-stat--ko .qapc-stat-val { color: #ff8a8a; }

/* ---------- Zone 3 : historique ---------- */
.qapc-mode-filter {
  display: block; width: 100%; min-height: 44px; margin: 0 0 10px; padding: 6px 12px; box-sizing: border-box;
  border: 1px solid rgba(212, 175, 55, .35); border-radius: 10px;
  background: rgba(20, 20, 26, .95); color: #e6e6ee; font: inherit; font-size: .9rem;
}
.qapc-hist-wrap { overflow-x: auto; }
.qapc-hist { width: 100%; border-collapse: collapse; font-size: .85rem; }
.qapc-hist th, .qapc-hist td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(58, 58, 66, .7); white-space: nowrap; }
.qapc-hist th { color: #9a9aa5; font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
.qapc-hist td { color: #e6e6ee; }
.qapc-hist-score { color: var(--gold-2, #e7c87a); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Zone 4 : actions SÉPARÉES de la lecture ---------- */
.qapc-zone--actions {
  border: 1px dashed rgba(255, 107, 107, .45);
  background: linear-gradient(180deg, rgba(40, 18, 20, .55), rgba(24, 12, 14, .75));
}
.qapc-actions-note { margin: 0 0 10px; font-size: .78rem; color: #c9a0a0; }
.qapc-actions-row { display: flex; flex-wrap: wrap; gap: 8px; }
.qapc-actions-row .admin-action-btn { min-height: 44px; }

/* ---------- Zone « Activité & connexions » (v1.1.22, lecture seule) ---------- */
.qapc-act-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.qapc-act-cell {
  display: flex; flex-direction: column; gap: 3px; padding: 10px;
  border: 1px solid rgba(58, 58, 66, .9); border-radius: 12px; background: rgba(28, 28, 36, .9);
}
.qapc-act-val { font-size: .95rem; font-weight: 700; color: #fff; line-height: 1.3; }
.qapc-act-lbl { font-size: .68rem; color: #9a9aa5; text-transform: uppercase; letter-spacing: .05em; }

@media (prefers-reduced-motion: reduce) {
  .qapc-close:active, .qapc-modal { transition: none; }
}
