/* ============================================================
   SITE UI — design system global (pages publiques)
   Chargé sur tout le site via include/head.pug, APRÈS
   index.css / btn.css. Complète le thème sans le remplacer.
   ============================================================ */

:root {
  --ui-bg-card: rgba(10, 4, 38, 0.55);
  --ui-bg-glass: rgba(18, 8, 48, 0.45);
  --ui-border: #2e0a63;
  --ui-border-hi: #4b1090;
  --ui-accent: #c400c4;
  --ui-accent-soft: rgba(196, 0, 196, 0.25);
  --ui-focus: #3ec6ff;
  --ui-text: #eceafe;
  --ui-muted: #9a94c2;
  --ui-danger: #fe2660;
  --ui-success: #10b981;
  --ui-input-bg: rgba(255, 255, 255, 0.05);
}

/* ---------- Cartes : glassmorphisme ---------- */

.project-card {
  background: var(--ui-bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--ui-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.project-card:hover {
  border-color: var(--ui-border-hi);
  box-shadow: 0 0 40px rgba(52, 0, 112, 0.8);
}

.item-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--ui-border-hi);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.item-card:hover {
  border-color: var(--ui-accent);
  box-shadow: 0 0 25px rgba(196, 0, 196, 0.25);
}

.login {
  background: var(--ui-bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---------- Boutons colorés (globaux, avant : admin.css) ---------- */

.btn-blue {
  background: linear-gradient(135deg, #4956e3, #3b82f6);
  color: #fff;
}

.btn-green {
  background: linear-gradient(135deg, #0ea371, #0b7f59);
  color: #fff;
}

.btn-red {
  background: linear-gradient(135deg, #d3134c, #8f0a33);
  color: #fff;
}

/* ---------- Chips (.choice-btn, partout) ---------- */

.choice-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ui-border-hi);
  border-radius: 999px;
  color: var(--ui-muted);
  box-shadow: none;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.choice-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: var(--ui-accent);
  transform: none;
}

/* ---------- Inputs (thème sombre par défaut) ---------- */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
textarea,
select {
  font-family: inherit;
  color: var(--ui-text);
  background: var(--ui-input-bg);
  border: 1px solid var(--ui-border-hi);
  border-radius: 10px;
  padding: 8px 12px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

select option {
  background: #14092e;
  color: var(--ui-text);
}

input::placeholder,
textarea::placeholder {
  color: #6f6a99;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 3px var(--ui-accent-soft);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  cursor: pointer;
}

/* ---------- Stepper quantité (menu, buy-entrace) ---------- */

.number-input {
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 165px;
  height: 44px;
  margin: 0 auto;
  border: 1px solid var(--ui-border-hi);
  border-radius: 12px;
  background: var(--ui-input-bg);
}

.input-number {
  flex: 1;
  width: 60px;
  height: 100%;
  padding: 0 4px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ui-text);
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.input-number::-webkit-outer-spin-button,
.input-number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-number:focus {
  box-shadow: none;
  border: none;
}

.btn-input {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 100%;
  border: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ui-text);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-input.minus {
  border-right: 1px solid var(--ui-border-hi);
}

.btn-input.plus {
  border-left: 1px solid var(--ui-border-hi);
}

.btn-input:hover {
  background: var(--ui-accent-soft);
  color: #fff;
}

.btn-input:active {
  background: rgba(196, 0, 196, 0.45);
}

/* ---------- Panneaux QR (compte, billets) ---------- */

.qr-panel {
  box-sizing: border-box;
  width: min(450px, calc(100% - 24px));
  margin: 0 auto;
  padding: clamp(20px, 6vw, 50px);
  border-radius: 16px;
  background-color: #fff;
  text-align: center;
}

.qr-panel canvas,
canvas#qrcode {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* Carte-panneau responsive (billet QR, messages) */
.panel-card {
  box-sizing: border-box;
  width: min(560px, 100%);
  margin: 0 auto;
  text-align: center;
}

/* Tuile responsive (billetterie, choix) */
.tile-card {
  box-sizing: border-box;
  width: min(320px, 100%);
  margin: 0 auto;
  text-align: center;
}

/* ---------- Tables (harmonisation globale) ---------- */

table th {
  color: #cfa8ff;
  background: #170a3a;
  border-bottom: 1px solid var(--ui-border-hi);
}

table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

table tr:hover td {
  transform: none;
  background: rgba(196, 0, 196, 0.07);
}

/* ---------- Divers responsive ---------- */

.container img,
.eventDiv img,
img.pic-border {
  max-width: 100%;
  height: auto;
}

@media (max-width: 680px) {
  .login {
    width: min(560px, 92%);
  }

  .flex-div {
    gap: 24px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .item-card,
  .choice-btn,
  .btn-input {
    transition: none;
  }
}
