/* ════════════════════════════════════════════════════════════════════════
   IrisKids — me.css (Sprint KID.PROFILE)
   Page /me : style fun, lumineux, encourageant pour enfants 3-12 ans.
   Palette : fond pastel violet/rose, accents IrisKids #7b3fe4 → #a855f7.
   ════════════════════════════════════════════════════════════════════════ */

.me-body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  font-family: 'Baloo 2', system-ui, sans-serif;
  color: #1e1b4b;
  background:
    radial-gradient(circle at 15% 0%,   #f3e8ff 0%, transparent 50%),
    radial-gradient(circle at 85% 100%, #fce7f3 0%, transparent 50%),
    #faf5ff;
  background-attachment: fixed;
  line-height: 1.5;
}

/* ── Main ────────────────────────────────────────────────────────────── */
.me-main {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--ik-header-h, 52px) + 20px) 16px 60px;
}

.me-section { margin-bottom: 32px; }

.me-section-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 16px;
  color: #4c1d95;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.me-count {
  font-family: 'Baloo 2', monospace;
  background: linear-gradient(135deg, #7b3fe4, #a855f7);
  color: #ffffff;
  padding: 2px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

/* ── Hero (header personnalisé) ──────────────────────────────────────── */
.me-hero {
  text-align: center;
  padding: 16px 16px 24px;
}
.me-emoji-big {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 8px;
}
@media (max-width: 480px) {
  .me-emoji-big { font-size: 56px; }
}
.me-emoji-bounce {
  display: inline-block;
  animation: me-bounce 1.6s ease-in-out infinite;
}
@keyframes me-bounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%      { transform: translateY(-12px) rotate(5deg); }
}
.me-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
  color: #4c1d95;
}
.me-pseudo {
  background: linear-gradient(90deg, #7b3fe4, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.me-sub {
  font-size: 17px;
  color: #6b21a8;
  margin: 0;
  max-width: 480px;
  margin-inline: auto;
}
.me-sub a {
  color: #7b3fe4;
  font-weight: 700;
  text-decoration: underline;
}

/* ── Badges grid ─────────────────────────────────────────────────────── */
.me-badges-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px)  { .me-badges-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px)  { .me-badges-grid { grid-template-columns: repeat(5, 1fr); } }

.me-badge {
  position: relative;
  text-align: center;
  padding: 16px 10px 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 2px solid #e9d5ff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: help;
}
.me-badge:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 16px rgba(123, 63, 228, 0.15);
}

.me-badge-emoji {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 6px;
}
.me-badge-label {
  font-size: 14px;
  font-weight: 700;
  color: #4c1d95;
  margin-bottom: 4px;
}
.me-badge-desc {
  font-size: 11px;
  color: #6b7280;
  line-height: 1.3;
  min-height: 28px;
}
.me-badge-date {
  font-size: 11px;
  color: #a855f7;
  font-weight: 600;
  margin-top: 6px;
}
.me-badge-lock {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 14px;
  opacity: 0.55;
}

/* Badge débloqué : couleurs vives */
.me-badge-unlocked {
  background: linear-gradient(135deg, #fef3c7 0%, #fbcfe8 100%);
  border-color: #a855f7;
}
.me-badge-unlocked::before {
  content: '✨';
  position: absolute;
  top: -6px;
  left: -6px;
  font-size: 18px;
  animation: me-sparkle 2s ease-in-out infinite;
}
@keyframes me-sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50%      { transform: scale(1.2) rotate(15deg); opacity: 0.75; }
}

/* Badge verrouillé : grisé + emoji légèrement transparent */
.me-badge-locked .me-badge-emoji { filter: grayscale(80%); opacity: 0.45; }
.me-badge-locked .me-badge-label { color: #9ca3af; }
.me-badge-locked { background: #f9fafb; }

/* ── Records grid ────────────────────────────────────────────────────── */
.me-records-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .me-records-grid { grid-template-columns: repeat(2, 1fr); } }

.me-record {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 2px solid #e9d5ff;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.me-record:hover {
  transform: translateY(-2px);
  border-color: #a855f7;
}
.me-record-emoji {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}
.me-record-emoji-faded { filter: grayscale(70%); opacity: 0.6; }
.me-record-body { flex: 1; min-width: 0; }
.me-record-label {
  font-size: 16px;
  font-weight: 700;
  color: #4c1d95;
  margin-bottom: 2px;
}
.me-record-score {
  font-size: 18px;
  font-weight: 800;
  color: #7b3fe4;
}
.me-record-meta {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.me-record-empty {
  font-size: 13px;
  color: #9ca3af;
  font-style: italic;
}

.me-record-played {
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

/* ── CTA ─────────────────────────────────────────────────────────────── */
.me-cta-section { text-align: center; padding: 16px 0 0; }

.me-cta {
  display: inline-block;
  background: linear-gradient(135deg, #7b3fe4, #a855f7);
  color: #ffffff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(123, 63, 228, 0.3);
}
.me-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(123, 63, 228, 0.4);
}
.me-cta:active { transform: scale(0.96); }
.me-cta-big {
  padding: 18px 40px;
  font-size: 18px;
}

/* ── Loading / Empty states ──────────────────────────────────────────── */
.me-loading, .me-empty {
  text-align: center;
  color: #9ca3af;
  font-style: italic;
  padding: 24px 16px;
  grid-column: 1 / -1;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.me-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: #94a3b8;
  border-top: 1px solid rgba(168, 85, 247, 0.15);
  margin-top: 32px;
}
.me-footer a { color: #94a3b8; text-decoration: none; }
.me-footer a:hover { color: #7b3fe4; }
.me-footer-build { font-family: 'JetBrains Mono', monospace; opacity: 0.5; margin: 4px 0 0; }

/* ── Accessibility : prefers-reduced-motion ─────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .me-emoji-bounce { animation: none; }
  .me-badge-unlocked::before { animation: none; }
  .me-record, .me-badge, .me-cta { transition: none; }
}
