/* public/css/defi-du-jour.css */

.quest-page {
  max-width: 720px;
  margin: 32px auto;
  padding: 0 16px;
}

.quest-login-gate {
  background: var(--panel);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
}

.quest-login-gate h1 {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Orbitron', 'Bungee', var(--font-sans);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quest-login-gate p {
  color: var(--muted);
  margin: 0 0 20px;
}

.quest-login-gate .login-button-google {
  border-radius: 8px;
  justify-content: center;
  width: auto;
}

.quest-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quest-header-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.quest-header-row h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-family: 'Orbitron', 'Bungee', var(--font-sans);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.quest-countdown {
  font-size: 13px;
  color: var(--muted);
  margin-left: 2px;
}

/* Fix mobile : icône flamme cachée sur mobile */
@media (max-width: 768px) {
  .quest-nav-icon {
    display: none !important;
  }
}

/* ─── Streak ────────────────────────────────────────────────────────────── */
.streak-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 18px 16px;
}

.streak-track {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
}

.streak-track::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

.streak-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.streak-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--muted);
}

.streak-step.done .streak-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.streak-step.current .streak-dot {
  background: rgba(34, 211, 238, 0.15);
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.streak-xp {
  font-size: 10px;
  color: var(--muted);
}

.streak-step.done .streak-xp {
  color: var(--text);
}

.streak-label {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 14px 0 0;
}

/* ─── Quêtes ────────────────────────────────────────────────────────────── */
.quest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quest-card {
  background: var(--panel);
  border-radius: 12px;
  padding: 14px;
}

.quest-card.completed {
  opacity: 0.65;
}

.quest-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.quest-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.quest-card-title i {
  color: #a78bfa;
  font-size: 14px;
}

.quest-xp-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.quest-card-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quest-progress-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.quest-progress-fill {
  height: 100%;
  background: var(--accent);
}

.quest-progress-label {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.quest-play-btn {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.quest-play-btn:hover {
  background: #e6e6e6;
}

.quest-done {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(99, 153, 34, 0.15);
  color: #97c459;
}

@media (max-width: 600px) {
  .streak-dot {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
  .streak-xp {
    font-size: 9px;
  }
}

.quest-xp-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  z-index: 9999;
}

/* ─── Streak max ────────────────────────────────────────────────────────── */
.streak-dot.max {
  background: linear-gradient(135deg, #ffd166, #f97316);
  border-color: rgba(255, 209, 102, 0.8);
  color: #111;
  animation: streak-pulse 1.5s ease-in-out infinite;
}

@keyframes streak-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 209, 102, 0.4); }
  50%       { box-shadow: 0 0 28px rgba(255, 209, 102, 0.85); }
}

.streak-xp.gold {
  color: #ffd166;
  font-weight: 700;
}

.badge-max {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 209, 102, 0.08);
  border: 1px solid rgba(255, 209, 102, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 12px;
  font-size: 13px;
  color: #ffd166;
  font-weight: 600;
  text-align: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .badge-max { font-size: 12px; padding: 8px 12px; }
}
