*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --yellow: #fcbc1c;
  --coral: #f34156;
  --bg: #060917;
  --bg-card: #0e1220;
  --border: rgba(252,188,28,0.12);
  --text: #ffffff;
  --text-muted: #8a92a6;
  --nav-height: 64px;
}

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Didact Gothic', sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

/* ── Header ── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6,9,23,0.97);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.app-header img { height: 38px; width: auto; max-width: 180px; object-fit: contain; }

/* ── Contenu scrollable ── */
.app-content {
  position: fixed;
  top: 48px;
  bottom: var(--nav-height);
  left: 0; right: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Vues ── */
.view { display: none; padding: 0.75rem 0.85rem 1.5rem; min-height: 100%; }
.view.active { display: block; }

/* ── Bottom nav ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(6,9,23,0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Jost', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}
.nav-btn svg { width: 20px; height: 20px; }
.nav-btn.active { color: var(--yellow); }
.nav-btn.active svg { filter: drop-shadow(0 0 6px rgba(252,188,28,0.5)); }

/* ── Titres ── */
.section-label {
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.4rem;
}
h2 {
  font-family: 'Jost', sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}
h2 span { color: var(--yellow); }

/* ── Carte événement ── */
.event-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0.65rem;
  transition: border-color 0.2s;
}
.event-card:active { border-color: rgba(252,188,28,0.4); }
.event-card img { width: 100%; max-height: 180px; object-fit: contain; background: #060917; display: block; }
.event-body { padding: 0.75rem; }
.event-badge {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--yellow);
  color: #060917;
  border-radius: 4px;
  padding: 0.2em 0.6em;
  margin-bottom: 0.5rem;
}
.event-badge.red { background: var(--coral); color: #fff; }
.event-title {
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 0.2rem;
}
.event-meta { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.85rem; }

/* ── Boutons ── */
.btn {
  display: inline-block;
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.65em 1.4em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.btn-primary { background: var(--yellow); color: #060917; }
.btn-primary:active { opacity: 0.8; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.btn-block { display: block; width: 100%; text-align: center; }

/* ── Fidélité ── */
.points-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  margin-bottom: 0.85rem;
}
.points-num {
  font-family: 'Jost', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1;
}
.points-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; font-family: 'Jost', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }

.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 0.85rem; }
.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.4rem;
  text-align: center;
  transition: border-color 0.2s;
}
.badge-card.unlocked { border-color: rgba(252,188,28,0.4); }
.badge-card.locked { opacity: 0.4; }
.badge-icon { font-size: 1.8rem; display: block; margin-bottom: 0.4rem; }
.badge-name { font-family: 'Jost', sans-serif; font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.badge-card.unlocked .badge-name { color: var(--yellow); }

.progress-bar-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  height: 6px;
  margin: 0.5rem 0 0.25rem;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: 99px;
  transition: width 0.6s ease;
}
.progress-label { font-size: 0.7rem; color: var(--text-muted); display: flex; justify-content: space-between; }

/* ── Admin ── */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.admin-card h3 {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.stat-row { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.stat-box {
  flex: 1;
  background: rgba(252,188,28,0.06);
  border: 1px solid rgba(252,188,28,0.15);
  border-radius: 10px;
  padding: 0.85rem 0.5rem;
  text-align: center;
}
.stat-box-num { font-family: 'Jost', sans-serif; font-size: 1.3rem; font-weight: 900; color: var(--yellow); }
.stat-box-lbl { font-size: 0.6rem; color: var(--text-muted); font-family: 'Jost', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.1rem; }

.input-field {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.7em 1em;
  color: var(--text);
  font-family: 'Didact Gothic', sans-serif;
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
  outline: none;
  transition: border-color 0.2s;
}
.input-field:focus { border-color: rgba(252,188,28,0.5); }

/* ── Action cards fidélité ── */
.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.65rem;
  transition: border-color 0.2s;
}
.action-card.done {
  border-color: rgba(252,188,28,0.4);
  opacity: 0.6;
  pointer-events: none;
}
.pts-badge {
  background: var(--yellow);
  color: #060917;
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 0.3em 0.8em;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.action-card.done .pts-badge { background: rgba(252,188,28,0.3); color: var(--yellow); }
.confirm-row {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  gap: 0.75rem;
}
.confirm-row.visible { display: flex; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--yellow);
  color: #060917;
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.7em 1.5em;
  border-radius: 50px;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Récompenses ── */
.reward-card {
  background: var(--bg-card);
  border: 1px solid rgba(252,188,28,0.3);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.reward-card.locked-reward { border-color: var(--border); opacity: 0.75; }
.reward-pts {
  font-family: 'Jost', sans-serif;
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--yellow);
  background: rgba(252,188,28,0.1);
  border: 1px solid rgba(252,188,28,0.25);
  border-radius: 5px;
  padding: 0.15em 0.6em;
}
.reward-status.available {
  font-family: 'Jost', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #060917;
  background: var(--yellow);
  border-radius: 5px;
  padding: 0.15em 0.6em;
}
.reward-missing {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'Jost', sans-serif;
  font-weight: 700;
}
.reward-confirm {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.reward-confirm.visible { display: block; }

/* ── Carousel scrollbar masqué ── */
#humoristesCarousel::-webkit-scrollbar { display: none; }

/* ── Pulse animation ── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* ── Login admin ── */
.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 2rem;
  text-align: center;
}
.login-wrap h2 { margin-bottom: 0.5rem; }
.login-wrap p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.5rem; }

/* ── Couleurs par onglet ── */
/* Shows : jaune (défaut, inchangé) */

/* Fidélité : jaune */
#btn-fidelite.active { color: var(--yellow); }
#btn-fidelite.active svg { filter: drop-shadow(0 0 6px rgba(252,188,28,0.5)); }
#view-fidelite .section-label { color: var(--yellow); }
#view-fidelite h2 span { color: var(--yellow); }

/* Vote/Macha : jaune */
#btn-macha.active { color: var(--yellow); }
#btn-macha.active svg { filter: drop-shadow(0 0 6px rgba(252,188,28,0.5)); }
#view-macha .section-label { color: var(--yellow); }
#view-macha h2 span { color: var(--yellow); }

#btn-galerie.active { color: var(--yellow); }
#btn-galerie.active svg { filter: drop-shadow(0 0 6px rgba(252,188,28,0.5)); }
#view-galerie .section-label { color: var(--yellow); }
#view-galerie h2 span { color: var(--yellow); }
