/* ========================================================
   succes.css — Page Succès / Badges
   ======================================================== */

/* ── Page wrapper ─────────────────────────────────────── */
.succes-page {
  padding: 0 0 120px;
}

/* ── Header ───────────────────────────────────────────── */
.succes-header {
  background: linear-gradient(135deg, var(--orange) 0%, var(--yellow) 100%);
  padding: 20px 20px 28px;
  color: #fff;
  position: relative;
}

.succes-header-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.succes-back-btn {
  background: rgba(255,255,255,0.25);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s;
}
.succes-back-btn:hover { background: rgba(255,255,255,0.4); }

.succes-header-titles { flex: 1; }
.succes-title {
  font-family: 'Nunito', sans-serif;
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 2px;
  line-height: 1.2;
}
.succes-subtitle {
  font-size: 13px;
  opacity: 0.88;
  margin: 0;
}

/* ── Global progress bar ──────────────────────────────── */
.succes-global-progress {
  background: rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 4px;
}

.sgp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sgp-label {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.sgp-count {
  font-size: 13px;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

.sgp-bar {
  height: 10px;
  background: rgba(255,255,255,0.25);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.sgp-fill {
  height: 100%;
  background: #fff;
  border-radius: 10px;
  transition: width 0.7s cubic-bezier(0.4,0,0.2,1);
}

.sgp-levels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sgp-level {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  transition: background 0.3s, color 0.3s;
}
.sgp-level.active {
  background: rgba(255,255,255,0.9);
  color: var(--orange);
}

/* ── Category filter tabs ─────────────────────────────── */
.succes-filters {
  display: flex;
  gap: 8px;
  padding: 16px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.succes-filters::-webkit-scrollbar { display: none; }

.succes-filter-btn {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.succes-filter-btn.active {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

/* ── Section title ────────────────────────────────────── */
.succes-section-title {
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  padding: 18px 16px 10px;
}

/* ── Badge grid ───────────────────────────────────────── */
/* Mobile-first : 2 cols sur très petits écrans, 3 cols ≥ 321px */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

/* ── Badge card base ──────────────────────────────────── */
.badge-card-full {
  background: var(--card);
  border-radius: 16px;
  padding: 16px 10px 14px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: default;
}
.badge-card-full:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* Unlocked state */
.badge-card-full.unlocked {
  border-color: var(--orange);
  box-shadow: 0 4px 16px rgba(255,107,44,0.18);
}

/* Partial state */
.badge-card-full.partial {
  border-color: var(--yellow);
  box-shadow: 0 4px 12px rgba(255,193,7,0.15);
}

/* Locked state */
.badge-card-full.locked {
  filter: grayscale(0.7);
  border-style: dashed;
  opacity: 0.75;
}

/* Newly unlocked pulse */
.badge-card-full.new-unlock {
  animation: badgePulse 1s ease-out 1;
}

@keyframes badgePulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,44,0.6); }
  50%  { box-shadow: 0 0 0 12px rgba(255,107,44,0); }
  100% { box-shadow: 0 4px 16px rgba(255,107,44,0.18); }
}

/* Shimmer on unlocked badges */
.badge-card-full.unlocked::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -60%;
  width: 50%;
  height: 180%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.4) 50%,
    transparent 60%
  );
  transform: skewX(-15deg);
  animation: shimmerBadge 3s ease-in-out infinite;
}

@keyframes shimmerBadge {
  0%   { left: -60%; }
  60%  { left: 120%; }
  100% { left: 120%; }
}

/* ── Badge emoji ──────────────────────────────────────── */
.badge-emoji-wrap {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}

/* ── Badge name ───────────────────────────────────────── */
.badge-name-text {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  display: block;
  margin-bottom: 4px;
}

/* ── Badge description ────────────────────────────────── */
.badge-desc-text {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.35;
  display: block;
  margin-bottom: 6px;
}

/* ── Partial progress bar ─────────────────────────────── */
.badge-progress-wrap {
  margin-top: 6px;
}

.badge-progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 3px;
}

.badge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
  border-radius: 5px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

.badge-progress-text {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}

/* ── Unlock date stamp ────────────────────────────────── */
.badge-unlock-date {
  font-size: 10px;
  color: var(--orange);
  font-weight: 700;
  margin-top: 4px;
  display: block;
}

/* ── "Nouveau" pill ───────────────────────────────────── */
.badge-new-pill {
  position: absolute;
  top: 7px;
  right: 7px;
  background: var(--orange);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Empty state ──────────────────────────────────────── */
.succes-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.succes-empty-icon { font-size: 48px; margin-bottom: 12px; }
.succes-empty-text { font-size: 15px; font-weight: 600; }

/* ── Responsive: 3 cols dès qu'on dépasse 320px ─────── */
@media (min-width: 321px) {
  .badge-grid { grid-template-columns: repeat(3, 1fr); }
}
