/* ============================================================================
   QUIZ'EM ALL v2.6.5 — VOILE / SQUELETTE DE CHARGEMENT DE SESSION
   ----------------------------------------------------------------------------
   Tant que Firebase Auth n'a pas émis son premier événement, l'utilisateur est
   « inconnu » : on n'affiche donc NI « Invité », NI la puce profil, seulement un
   squelette neutre. Aucune bascule prématurée en mode invité n'est possible.
   ========================================================================== */

/* Zone de choix d'accès (Invité / Connexion / Inscription) : masquée pendant la
   résolution de session, remplacée par le squelette. */
html.qe-auth-loading #accessSwitch {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Carte profil du Hub : jamais « Tu joues en invité » avant résolution. */
html.qe-auth-loading #homePanel .qe-hub-account--guest {
  display: none !important;
}
html.qe-auth-loading #homePanel .qe-hub-shell [data-hub-action="signin"] {
  visibility: hidden !important;
}

/* Barre de compte (puce membre / pilules) : rien tant que la session n'est pas connue. */
html.qe-auth-loading #accountBarMember {
  display: none !important;
}

/* ---------------------------------------------------------------- Squelette */
.qe-auth-skeleton {
  display: none;
  gap: 8px;
  align-items: center;
  padding: 6px 0 10px;
  flex-wrap: wrap;
}
html.qe-auth-loading .qe-auth-skeleton { display: flex; }

.qe-auth-skeleton span {
  display: block;
  height: 34px;
  width: 104px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: qeAuthShimmer 1.15s linear infinite;
}

@media (max-width: 560px) {
  .qe-auth-skeleton span { width: 78px; height: 30px; }
}

@keyframes qeAuthShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .qe-auth-skeleton span { animation: none; }
}
