/* ===== Parazia — compléments « HUD » : écran de connexion + historique des achats ===== */

/* ---------- Écran de connexion ---------- */
.gate, body.halloween .gate {
  position: fixed !important; inset: 0 !important; z-index: 90 !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  padding: 120px 16px 40px !important; overflow: auto !important;
  background: var(--bg) !important;
}
.gate.hidden, body.halloween .gate.hidden { display: none !important; } /* une fois connecté, l'écran disparaît */
.gate .drops { display: none !important; }
.gate-card, body.halloween .gate-card {
  width: min(480px, 100%) !important; max-width: 100% !important; box-sizing: border-box !important;
  padding: 0 !important; text-align: left !important; overflow: hidden !important;
  background: var(--surface) !important; border: 1px solid var(--line-2) !important; border-radius: 12px !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55) !important; backdrop-filter: none !important;
}
.gate-card::before { display: none !important; }
.gate-card > img, body.halloween .gate-card > img {
  float: left !important; width: 56px !important; height: 56px !important; margin: 18px 16px 18px 20px !important;
  border-radius: 8px !important; object-fit: contain !important; background: var(--surface-2) !important; border: 1px solid var(--line-2) !important;
}
.gate-card .gate-k, body.halloween .gate-card .gate-k {
  margin: 24px 20px 0 92px !important; font-size: 10px !important; letter-spacing: 2.5px !important;
  text-transform: uppercase !important; color: var(--acc) !important; font-weight: 700 !important;
}
.gate-card h2, body.halloween .gate-card h2 {
  margin: 4px 20px 0 92px !important; font-size: 22px !important; letter-spacing: -.2px !important; color: var(--text) !important; font-weight: 700 !important;
  padding-bottom: 18px !important;
}
.gate-card h2::after { content: ""; display: block; clear: both; }
.gate-card > p:not(.gate-k), body.halloween .gate-card > p:not(.gate-k) {
  clear: both; margin: 0 !important; max-width: none !important; padding: 18px 20px 6px !important;
  border-top: 1px solid var(--line) !important; color: var(--muted) !important; font-size: 13px !important; line-height: 1.65 !important;
}
.pz-gate-steps { list-style: none; margin: 0; padding: 8px 20px 4px; display: grid; gap: 6px; }
.pz-gate-steps li {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: center;
  padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 8px;
  font-size: 12.5px; color: var(--text); line-height: 1.4;
}
.pz-gate-steps li b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--acc-soft); color: var(--acc); font-size: 11px; font-weight: 800; }
.pz-gate-steps li span small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.gate-card .gate-btn, body.halloween .gate-card .gate-btn {
  display: flex !important; width: calc(100% - 40px) !important; box-sizing: border-box !important; margin: 14px 20px 0 !important; height: 46px !important;
  border-radius: 8px !important; font-size: 12px !important; font-weight: 800 !important; letter-spacing: .08em !important; text-transform: uppercase !important;
  background: #5865f2 !important; border: 1px solid #5865f2 !important; color: #fff !important; box-shadow: none !important;
}
.gate-card .gate-btn:hover { filter: brightness(1.08); }
.pz-gate-foot {
  margin: 14px 0 0; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--bg);
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: var(--dim); font-size: 10.5px; letter-spacing: .4px;
}
.pz-gate-foot b { color: var(--muted); font-weight: 600; }
@media (max-width: 520px) {
  .gate, body.halloween .gate { padding-top: 150px !important; align-items: flex-start !important; }
  .gate-card .gate-k, .gate-card h2 { margin-left: 92px !important; }
}

/* ---------- Historique des achats ---------- */
.history-heading { align-items: center !important; }
.pz-history-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pz-history-actions .history-refresh, .pz-history-actions .pz-pdf-btn {
  height: 36px !important; padding: 0 14px !important; border-radius: 7px !important; font: 800 10.5px var(--font) !important;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer; box-shadow: none !important;
}
.pz-pdf-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--acc) !important; border: 1px solid var(--acc) !important; color: #fff !important; }
.pz-pdf-btn:hover { filter: brightness(1.1); }
.pz-pdf-btn[disabled] { opacity: .6; cursor: wait; filter: none; }
.pz-pdf-btn svg { width: 14px; height: 14px; fill: currentColor; }
.pz-history-count { font-size: 11px; color: var(--muted); margin-top: 6px; }
.pz-history-count b { color: var(--text); }

.purchase-history, body.halloween .purchase-history {
  max-height: 420px; overflow-y: auto; padding-right: 6px; gap: 6px !important;
  scrollbar-width: thin; scrollbar-color: var(--line-2) transparent;
}
.purchase-history::-webkit-scrollbar { width: 6px; }
.purchase-history::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.purchase-row, body.halloween .purchase-row {
  grid-template-columns: 128px 1fr auto !important; gap: 14px !important; padding: 10px 14px !important;
  background: var(--surface-2) !important; border: 1px solid var(--line) !important; border-left: 3px solid var(--acc) !important; border-radius: 8px !important;
}
.purchase-date { color: var(--muted) !important; font-size: 10px !important; letter-spacing: .08em !important; }
.purchase-products { font-size: 12.5px !important; color: var(--text) !important; font-weight: 700 !important; }
.purchase-meta { font-size: 10.5px !important; color: var(--dim) !important; margin-top: 2px !important; }
.purchase-status, body.halloween .purchase-status {
  display: inline-block; margin-top: 5px; padding: 1px 7px; border-radius: 4px; font-size: 10px !important; font-weight: 700 !important;
  color: var(--ok) !important; background: rgba(63, 179, 127, .12) !important; border: 1px solid rgba(63, 179, 127, .35) !important;
}
.purchase-total, body.halloween .purchase-total { color: var(--text) !important; font-size: 13px !important; font-weight: 800 !important; }
.purchase-empty { border-radius: 8px !important; font-size: 12px !important; color: var(--muted) !important; background: var(--surface-2) !important; border: 1px dashed var(--line-2) !important; }
@media (max-width: 700px) { .purchase-row, body.halloween .purchase-row { grid-template-columns: 1fr !important; } }
