/* ============================================
   FCSM XP — Tableau de bord
   Tokens dark + light, gaming feel
   ============================================ */

:root {
  /* === BASE TOKENS (dark) === */
  --bg-deep: #050B1A;
  --bg-night: #0A1628;
  --bg-elevated: #0E1B33;
  --bg-card: rgba(16, 32, 64, 0.55);
  --bg-card-hover: rgba(22, 44, 86, 0.7);
  --bg-card-solid: #0E1B33;
  --border-subtle: rgba(120, 160, 220, 0.12);
  --border-card: rgba(120, 160, 220, 0.18);
  --border-strong: rgba(120, 160, 220, 0.32);

  --gold: #FEE300;
  --gold-deep: #D4BF00;
  --gold-glow: rgba(254, 227, 0, 0.55);
  --blue: #2A6FDB;
  --blue-bright: #4A90FF;
  --blue-deep: #0A1F4A;
  --success: #22C55E;
  --success-soft: rgba(34, 197, 94, 0.16);
  --danger: #FF5A5F;
  --purple: #8B5CF6;
  --pink: #F472B6;
  --cyan: #22D3EE;

  --text-primary: #F5F8FF;
  --text-secondary: #A8B5CC;
  --text-muted: #6B7B96;
  --text-faint: #4A5872;
  --text-on-gold: #1A1A1A;

  --header-bg: rgba(7, 14, 28, 0.85);
  --subnav-bg: rgba(10, 22, 45, 0.7);
  --footer-bg: rgba(5, 11, 26, 0.92);

  --grid-line: rgba(120, 160, 220, 0.05);
  --star-gold: rgba(254, 227, 0, 0.6);
  --star-blue: rgba(74, 144, 255, 0.6);

  --font-display: "Oswald", "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-signature: "Mr Dafoe", "Pacifico", cursive;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);

  --container-max: 1400px;
  --header-h: 72px;
  --subnav-h: 52px;

  /* === ALIASES pour compatibilité pages secondaires === */
  --bg-surface: var(--bg-card);
  --fcsm-blue: #133478;
  --fcsm-yellow: #FEE300;
}

/* === LIGHT THEME === */
:root[data-theme="light"] {
  --bg-deep: #F0F4FB;
  --bg-night: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #FFFFFF;
  --bg-card-solid: #FFFFFF;
  --border-subtle: rgba(15, 35, 75, 0.08);
  --border-card: rgba(15, 35, 75, 0.12);
  --border-strong: rgba(15, 35, 75, 0.22);

  --gold-glow: rgba(254, 227, 0, 0.4);
  --blue-deep: #DCE7F8;

  --text-primary: #0A1A38;
  --text-secondary: #3F557A;
  --text-muted: #6B7B96;
  --text-faint: #98A4BB;

  --header-bg: rgba(255, 255, 255, 0.9);
  --subnav-bg: rgba(245, 248, 253, 0.85);
  --footer-bg: rgba(255, 255, 255, 0.92);

  --grid-line: rgba(15, 35, 75, 0.04);
  --star-gold: rgba(254, 227, 0, 0.5);
  --star-blue: rgba(42, 111, 219, 0.4);

  --shadow-card: 0 4px 24px rgba(15, 35, 75, 0.08);

  --bg-surface: var(--bg-card);
}

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

html, body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a { color: inherit; }

/* ============================================
   Barres diagonales FCSM (copie exacte SSO)
   ============================================ */
#diagonal-bars {
  position: fixed;
  top: -10vh;
  left: 0;
  width: 55vw;
  height: 120vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.diag-bar {
  position: absolute;
  left: -10%;
  width: 140%;
  height: 72px;
  border-radius: 6px;
  transform: rotate(35deg);
  transform-origin: left top;
}
.diag-bar:nth-child(1) { top:  0%; background: linear-gradient(90deg, rgba(245,200,0,.68) 0%, rgba(245,200,0,.50) 50%, transparent 100%); }
.diag-bar:nth-child(2) { top: 12%; background: linear-gradient(90deg, rgba(245,200,0,.56) 0%, rgba(245,200,0,.38) 50%, transparent 100%); }
.diag-bar:nth-child(3) { top: 24%; background: linear-gradient(90deg, rgba(245,200,0,.44) 0%, rgba(245,200,0,.28) 50%, transparent 100%); }
.diag-bar:nth-child(4) { top: 36%; background: linear-gradient(90deg, rgba(245,200,0,.32) 0%, rgba(245,200,0,.18) 50%, transparent 100%); }
.diag-bar:nth-child(5) { top: 48%; background: linear-gradient(90deg, rgba(245,200,0,.22) 0%, rgba(245,200,0,.12) 50%, transparent 100%); }
.diag-bar:nth-child(6) { top: 60%; background: linear-gradient(90deg, rgba(245,200,0,.13) 0%, rgba(245,200,0,.07) 50%, transparent 100%); }
.diag-bar:nth-child(7) { top: 72%; background: linear-gradient(90deg, rgba(245,200,0,.07) 0%, rgba(245,200,0,.03) 50%, transparent 100%); }
.diag-bar:nth-child(8) { top: 84%; background: linear-gradient(90deg, rgba(245,200,0,.03) 0%, transparent 60%); }
@media (max-width: 600px) { #diagonal-bars { width: 80vw; opacity: .7; } }

/* ============================================
   Stade BONAL — décoration fond droite (SVG)
   ============================================ */
#bg-stadium {
  position: fixed;
  right: -4vw;
  bottom: -4vh;
  width: 58vw;
  max-width: 860px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  transition: opacity 0.4s ease;
}
#bg-stadium img {
  width: 100%;
  height: auto;
  display: block;
}
:root[data-theme="light"] #bg-stadium { opacity: 0.7; }
@media (max-width: 768px) { #bg-stadium { width: 95vw; right: -8vw; opacity: 0.16; } }

/* ============================================
   Background ambiance
   ============================================ */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 900px 600px at 85% 35%, rgba(254, 227, 0, 0.18), transparent 70%),
    radial-gradient(ellipse 1100px 700px at 15% 70%, rgba(42, 111, 219, 0.22), transparent 70%),
    radial-gradient(ellipse 1400px 900px at 50% 0%, rgba(20, 50, 110, 0.6), transparent 70%),
    linear-gradient(180deg, #07101F 0%, #050B1A 60%, #030611 100%);
  transition: background 0.4s ease;
}
:root[data-theme="light"] .app-bg {
  background:
    radial-gradient(ellipse 900px 600px at 85% 25%, rgba(254, 227, 0, 0.12), transparent 70%),
    radial-gradient(ellipse 1100px 700px at 15% 70%, rgba(42, 111, 219, 0.10), transparent 70%),
    linear-gradient(180deg, #F4F8FE 0%, #ECF1FA 100%);
}
.app-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 40%, black 30%, transparent 80%);
}
.app-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 1px at 20% 25%, var(--star-gold) 0, transparent 2px),
    radial-gradient(circle 1px at 75% 15%, var(--star-blue) 0, transparent 2px),
    radial-gradient(circle 1px at 90% 60%, var(--star-gold) 0, transparent 2px),
    radial-gradient(circle 1px at 35% 80%, var(--star-blue) 0, transparent 2px),
    radial-gradient(circle 1px at 10% 50%, var(--star-gold) 0, transparent 2px),
    radial-gradient(circle 1px at 65% 90%, var(--star-blue) 0, transparent 2px);
}

/* ============================================
   Header (deux niveaux : nav principale + sous-nav)
   ============================================ */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
}
/* En scroll bas : seul header-main remonte, la subnav reste visible en haut */
.header-main {
  transition: transform 0.32s cubic-bezier(.2,.9,.3,1);
}
.app-header.is-hidden .header-main {
  transform: translateY(-100%);
}
/* La subnav reste au top même quand header-main est caché */
.subnav {
  transition: transform 0.32s cubic-bezier(.2,.9,.3,1);
}
.app-header.is-hidden .subnav {
  transform: translateY(calc(-1 * var(--header-h)));
}

.header-main {
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner {
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* ===== Logo FCSM XP ===== */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}
.brand-shield {
  width: 44px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(254, 227, 0, 0.25));
}
/* === Signature : typo identitaire jaune (Mr Dafoe), overlay sur display === */
.signature, [data-signature] {
  font-family: var(--font-signature) !important;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0 !important;
  text-transform: none !important;
  display: inline-block;
  transform: rotate(-3deg);
  line-height: 1;
}
:root[data-theme="light"] .signature,
:root[data-theme="light"] [data-signature] { color: var(--gold-deep); }

.brand-wordmark {
  display: flex;
  align-items: baseline;
  line-height: 1;
  gap: 8px;
}
.brand-wordmark .fcsm {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--text-primary);
}
.brand-wordmark .xp {
  font-family: var(--font-signature);
  font-weight: 400;
  font-size: 32px;
  color: var(--gold);
  transform: rotate(-3deg);
  display: inline-block;
  line-height: 0.8;
  margin-left: 2px;
}

/* ===== Nav principale ===== */
.nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 4px;
}
.nav a {
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s ease;
  position: relative;
}
.nav a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}
:root[data-theme="light"] .nav a:hover {
  background: rgba(15, 35, 75, 0.05);
}
.nav a.active {
  background: var(--gold);
  color: var(--text-on-gold);
  font-weight: 600;
  box-shadow: 0 0 24px rgba(254, 227, 0, 0.4);
}
.nav a svg { width: 16px; height: 16px; }

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.lions-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 8px;
  border-radius: var(--radius-pill);
  background: rgba(254, 227, 0, 0.08);
  border: 1px solid rgba(254, 227, 0, 0.4);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--gold);
  cursor: pointer;
  transition: all 0.18s;
}
:root[data-theme="light"] .lions-pill {
  background: rgba(254, 227, 0, 0.12);
  color: var(--gold-deep);
}
.lions-pill:hover {
  background: rgba(254, 227, 0, 0.18);
  box-shadow: 0 0 20px rgba(254, 227, 0, 0.3);
}
.lions-coin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFD740, var(--gold) 60%, var(--gold-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1A1A1A;
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.3), 0 0 8px rgba(254, 227, 0, 0.4);
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8A00, #FF5722);
  border: 2px solid var(--gold);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 14px;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ===== Sous-nav N1 ===== */
.subnav {
  height: var(--subnav-h);
  background: var(--subnav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav-inner {
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.subnav-item {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s;
  position: relative;
}
.subnav-item:hover { color: var(--text-primary); }
.subnav-item.active {
  color: var(--text-primary);
  background: rgba(254, 227, 0, 0.08);
  border: 1px solid rgba(254, 227, 0, 0.3);
}
:root[data-theme="light"] .subnav-item.active {
  background: rgba(254, 227, 0, 0.15);
  border: 1px solid rgba(254, 227, 0, 0.4);
  color: var(--text-primary);
}
.subnav-item .count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}
:root[data-theme="light"] .subnav-item .count {
  background: rgba(15, 35, 75, 0.06);
}
.subnav-item.active .count {
  background: rgba(254, 227, 0, 0.2);
  color: var(--gold);
}

/* ============================================
   Layout
   ============================================ */
.app-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 32px;
  padding-top: calc(var(--header-h) + var(--subnav-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::before {
  content: "";
  width: 4px;
  height: 20px;
  background: var(--gold);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(254, 227, 0, 0.6);
}
.section-title .badge {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(254, 227, 0, 0.12);
  color: var(--gold);
  border: 1px solid rgba(254, 227, 0, 0.3);
}
:root[data-theme="light"] .section-title .badge {
  color: var(--gold-deep);
}

/* ============================================
   Hero — niveau actuel + photo backdrop
   ============================================ */
.hero {
  position: relative;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(20, 50, 110, 0.55) 0%, rgba(10, 25, 60, 0.55) 100%);
  border: 1px solid var(--border-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  padding: 44px 48px;
  min-height: 380px;
  isolation: isolate;
  box-shadow: var(--shadow-card);
}
:root[data-theme="light"] .hero {
  background: linear-gradient(135deg, rgba(20, 50, 110, 0.45) 0%, rgba(10, 25, 60, 0.45) 100%);
  color: #F5F8FF;
}
:root[data-theme="light"] .hero .hero-greet,
:root[data-theme="light"] .hero .hero-meta,
:root[data-theme="light"] .hero .progress-meta {
  color: rgba(255, 255, 255, 0.65);
}
:root[data-theme="light"] .hero .hero-greet b,
:root[data-theme="light"] .hero .hero-xp-target b,
:root[data-theme="light"] .hero .progress-meta b {
  color: #FFFFFF;
}
:root[data-theme="light"] .hero .hero-eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

/* Backdrop hero : silhouette de stade en SVG (placeholder Strapi)
   — pas d'image distante pour rester fiable et offline-ready */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 600' preserveAspectRatio='xMidYMid slice'><defs><linearGradient id='sky' x1='0' x2='0' y1='0' y2='1'><stop offset='0' stop-color='%231A3978'/><stop offset='1' stop-color='%230A1F4A'/></linearGradient><radialGradient id='lights' cx='50%25' cy='30%25' r='60%25'><stop offset='0' stop-color='%23F5C518' stop-opacity='0.18'/><stop offset='1' stop-color='%23F5C518' stop-opacity='0'/></radialGradient></defs><rect width='1600' height='600' fill='url(%23sky)'/><rect width='1600' height='600' fill='url(%23lights)'/><g fill='%230A1A38' opacity='0.7'><path d='M0 480 L160 460 L320 470 L480 450 L640 465 L800 445 L960 460 L1120 450 L1280 465 L1440 455 L1600 470 L1600 600 L0 600 Z'/></g><g fill='%23F5C518' opacity='0.06'><circle cx='200' cy='480' r='1.5'/><circle cx='240' cy='475' r='1.2'/><circle cx='280' cy='482' r='1.5'/><circle cx='320' cy='478' r='1.2'/><circle cx='360' cy='484' r='1.5'/><circle cx='400' cy='476' r='1.2'/><circle cx='440' cy='480' r='1.5'/><circle cx='480' cy='474' r='1.2'/><circle cx='520' cy='482' r='1.5'/><circle cx='560' cy='478' r='1.2'/><circle cx='600' cy='484' r='1.5'/><circle cx='640' cy='476' r='1.2'/><circle cx='680' cy='480' r='1.5'/><circle cx='720' cy='474' r='1.2'/><circle cx='760' cy='482' r='1.5'/><circle cx='800' cy='478' r='1.2'/><circle cx='840' cy='484' r='1.5'/><circle cx='880' cy='476' r='1.2'/><circle cx='920' cy='480' r='1.5'/><circle cx='960' cy='474' r='1.2'/><circle cx='1000' cy='482' r='1.5'/><circle cx='1040' cy='478' r='1.2'/><circle cx='1080' cy='484' r='1.5'/><circle cx='1120' cy='476' r='1.2'/><circle cx='1160' cy='480' r='1.5'/><circle cx='1200' cy='474' r='1.2'/><circle cx='1240' cy='482' r='1.5'/><circle cx='1280' cy='478' r='1.2'/><circle cx='1320' cy='484' r='1.5'/><circle cx='1360' cy='476' r='1.2'/><circle cx='1400' cy='480' r='1.5'/></g><g stroke='%23F5C518' stroke-width='1' opacity='0.18' fill='none'><line x1='180' y1='420' x2='180' y2='460'/><line x1='420' y1='415' x2='420' y2='460'/><line x1='800' y1='410' x2='800' y2='460'/><line x1='1180' y1='415' x2='1180' y2='460'/><line x1='1420' y1='420' x2='1420' y2='460'/><circle cx='180' cy='418' r='6' fill='%23F5C518' fill-opacity='0.5'/><circle cx='420' cy='413' r='6' fill='%23F5C518' fill-opacity='0.5'/><circle cx='800' cy='408' r='8' fill='%23F5C518' fill-opacity='0.6'/><circle cx='1180' cy='413' r='6' fill='%23F5C518' fill-opacity='0.5'/><circle cx='1420' cy='418' r='6' fill='%23F5C518' fill-opacity='0.5'/></g></svg>");
  background-size: cover;
  background-position: center;
  mask-image: linear-gradient(90deg, transparent 0%, black 30%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 30%, black 70%, transparent 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 500px at 80% 50%, rgba(254, 227, 0, 0.22), transparent 60%),
    radial-gradient(ellipse 500px 400px at 20% 100%, rgba(42, 111, 219, 0.3), transparent 60%);
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, transparent, black 40%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, black 40%, black 80%, transparent);
  z-index: -1;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
  position: relative;
}
.hero-greet {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-greet b { color: #fff; font-weight: 600; }
.hero-season-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(254, 227, 0, 0.1);
  border: 1px solid rgba(254, 227, 0, 0.3);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.5px;
}
.hero-season-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}
.hero-tier-wrap { position: relative; display: inline-block; }
.hero-tier {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(72px, 10vw, 144px);
  line-height: 0.9;
  letter-spacing: -1px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #FFFFFF 0%, #DDE6F5 60%, #95A8C7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
  position: relative;
}
.hero-tier-shadow {
  position: absolute;
  inset: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(72px, 10vw, 144px);
  line-height: 0.9;
  letter-spacing: -1px;
  text-transform: uppercase;
  -webkit-text-stroke: 1px rgba(254, 227, 0, 0.25);
  color: transparent;
  transform: translate(4px, 4px);
  z-index: -1;
}
.hero-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 28px;
}
.hero-meta .sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.hero-xp { margin-top: 36px; }
.hero-xp-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}
.hero-xp-current {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hero-xp-current .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}
:root[data-theme="light"] .hero-xp-current .num { color: #FFFFFF; }
.hero-xp-current .lbl {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--gold);
  letter-spacing: 2px;
}
.hero-xp-current .lbl.signature {
  font-size: 56px;
  margin-left: 4px;
  margin-bottom: -4px;
}
.hero-xp-target b .signature { font-size: 22px; vertical-align: -2px; margin: 0 2px; }
.stat-label .signature { font-size: 16px; vertical-align: -3px; margin-right: 2px; }
.section-title .signature { font-size: 32px; vertical-align: -6px; margin: 0 2px; }
.hero-xp-target {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  text-align: right;
}
.hero-xp-target b {
  color: #fff;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1px;
}

.progress {
  position: relative;
  height: 14px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: var(--radius-pill);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #FFA500 0%, #FFD740 55%, #FEE300 100%);
  border-radius: var(--radius-pill);
  position: relative;
  box-shadow: 0 0 14px rgba(254, 227, 0, 0.6), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  transition: width 1.2s cubic-bezier(.2,.9,.3,1);
}
/* Ghost fill statique : part légèrement AVANT la fin du jaune pour couvrir le bord arrondi */
.progress::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--fill-pct, 0%) - 8px);
  width: calc((100% - var(--fill-pct, 0%)) * 0.5 + 8px);
  background: linear-gradient(
    90deg,
    rgba(254, 227, 0, 0.55) 0%,
    rgba(254, 227, 0, 0.22) 55%,
    transparent 100%
  );
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
  pointer-events: none;
  z-index: 2;
  transition: left 1.2s cubic-bezier(.2,.9,.3,1), width 1.2s cubic-bezier(.2,.9,.3,1);
}
/* Shimmer blanc doux sur le fill jaune */
.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer-fill 3.2s ease-in-out infinite;
  border-radius: inherit;
}
@keyframes shimmer-fill {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.progress-meta b { color: var(--gold); font-weight: 600; }

/* Niveau emblem */
.tier-emblem {
  width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.tier-disc { position: relative; width: 200px; height: 200px; }
.tier-disc-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(254, 227, 0, 0.4);
  animation: rotate 40s linear infinite;
}
.tier-disc-ring.r2 {
  inset: 14px;
  border: 1px solid rgba(254, 227, 0, 0.2);
  animation-duration: 24s;
  animation-direction: reverse;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.tier-disc-core {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #FFE078, var(--gold) 50%, #B8860B 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #1A1A1A;
  font-family: var(--font-display);
  box-shadow:
    0 0 60px rgba(254, 227, 0, 0.5),
    inset 0 -4px 16px rgba(0, 0, 0, 0.25),
    inset 0 4px 16px rgba(255, 255, 255, 0.3);
}
.tier-disc-core .lbl {
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
  opacity: 0.7;
}
.tier-disc-core .num {
  font-size: 86px;
  font-weight: 700;
  line-height: 1;
  margin-top: -4px;
}
/* Bloc "XP restant avant prochain niveau" (remplace les étoiles) */
.tier-next-xp-block {
  text-align: center;
  padding: 12px 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  width: 100%;
}
.tier-next-missing-lbl {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.85) !important;
  letter-spacing: 0.5px;
  text-transform: none;
  margin-bottom: 4px;
}
.tier-next-missing-val {
  font-size: 22px;
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 1px;
  line-height: 1;
  margin-bottom: 6px;
}
.tier-next-missing-val .signature {
  font-size: 18px;
  margin-left: 4px;
}
.tier-next-unlock-lbl {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.85) !important;
  letter-spacing: 0.5px;
  text-transform: none;
}
.tier-next-name-val {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 2px;
  color: #fff;
  margin-top: 3px;
}
:root[data-theme="light"] .tier-next-xp-block {
  background: rgba(19, 52, 120, 0.08);
  border-color: rgba(19, 52, 120, 0.15);
}
:root[data-theme="light"] .tier-next-missing-lbl,
:root[data-theme="light"] .tier-next-unlock-lbl {
  color: rgba(19, 52, 120, 0.55);
}
:root[data-theme="light"] .tier-next-missing-val {
  color: #B8890A;
}
:root[data-theme="light"] .tier-next-name-val {
  color: var(--fcsm-blue);
}

/* ============================================
   Stats row
   ============================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.stat {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.stat:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent, var(--gold)), transparent);
  opacity: 0.5;
}
.stat-head { display: flex; align-items: center; justify-content: space-between; }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--icon-bg, rgba(254, 227, 0, 0.12));
  color: var(--accent, var(--gold));
  border: 1px solid var(--icon-border, rgba(254, 227, 0, 0.25));
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-trend {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--success-soft);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.stat-trend.dim {
  background: rgba(120, 140, 180, 0.1);
  color: var(--text-muted);
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.stat-value .unit {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 1px;
  font-weight: 500;
}
.stat.gold { --accent: var(--gold-deep); --icon-bg: rgba(254,227,0,0.1); --icon-border: rgba(254,227,0,0.3); }
.stat.blue { --accent: var(--blue-bright); --icon-bg: rgba(74,144,255,0.1); --icon-border: rgba(74,144,255,0.3); }
.stat.green { --accent: var(--success); --icon-bg: rgba(34,197,94,0.1); --icon-border: rgba(34,197,94,0.3); }

/* ============================================
   Bandeau "Inside" — photos d'ambiance
   ============================================ */
.inside {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 220px;
  border: 1px solid var(--border-card);
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-card);
}
/* Inside : placeholder visuel — sera remplacé par photo Strapi */
.inside-photo {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 800px 500px at 75% 40%, rgba(254, 227, 0, 0.35), transparent 70%),
    radial-gradient(ellipse 600px 400px at 30% 80%, rgba(74, 144, 255, 0.4), transparent 70%),
    linear-gradient(135deg, #1A3978 0%, #0A1F4A 60%, #050B1A 100%);
}
.inside-photo::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 400' preserveAspectRatio='xMidYMid slice'><g fill='%23F5C518' opacity='0.08'><path d='M0 320 L1600 320 L1600 400 L0 400 Z'/></g><g stroke='%23F5C518' stroke-width='1.5' fill='none' opacity='0.25'><path d='M0 280 Q400 250 800 280 T1600 280'/><path d='M0 300 Q400 270 800 300 T1600 300'/></g><g fill='%23F5C518' opacity='0.5'><circle cx='200' cy='180' r='2'/><circle cx='450' cy='160' r='2'/><circle cx='700' cy='170' r='2'/><circle cx='950' cy='155' r='2'/><circle cx='1200' cy='175' r='2'/><circle cx='1400' cy='165' r='2'/></g><g stroke='%23F5C518' stroke-width='1' opacity='0.3' fill='none'><line x1='200' y1='180' x2='200' y2='270'/><line x1='450' y1='160' x2='450' y2='270'/><line x1='700' y1='170' x2='700' y2='270'/><line x1='950' y1='155' x2='950' y2='270'/><line x1='1200' y1='175' x2='1200' y2='270'/><line x1='1400' y1='165' x2='1400' y2='270'/></g></svg>");
  background-size: cover;
  background-position: center bottom;
}
.inside-photo-label {
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(254, 227, 0, 0.5);
  border: 1px dashed rgba(254, 227, 0, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 1;
}
.inside-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 11, 26, 0.92) 0%, rgba(5, 11, 26, 0.4) 60%, transparent 100%),
              linear-gradient(180deg, transparent 40%, rgba(5, 11, 26, 0.7) 100%);
}
.inside-content {
  position: relative;
  padding: 28px 32px;
  max-width: 60%;
  color: #F5F8FF;
}
.inside-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.inside-eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--gold);
}
.inside-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 8px;
  color: #FFFFFF;
}
.inside-desc {
  font-size: 13px;
  color: rgba(245, 248, 255, 0.7);
  line-height: 1.5;
  max-width: 480px;
}
.inside-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}
.inside-cta:hover {
  background: var(--gold);
  color: var(--text-on-gold);
  border-color: var(--gold);
}

/* ============================================
   Two-column: Reco produit + Activité
   ============================================ */
.row-2col {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
.panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-card);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head .section-title { font-size: 18px; }
.panel-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.18s;
}
.panel-link:hover { color: var(--gold); }

/* Reco produit avec photo */
.reco {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: stretch;
}
.reco-img {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse 200px 200px at 70% 30%, rgba(254, 227, 0, 0.25), transparent 70%),
    linear-gradient(135deg, #1A3978 0%, #0A1F4A 100%);
  border: 1px solid var(--border-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reco-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(254, 227, 0, 0.6);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.reco-img-placeholder svg {
  width: 38px;
  height: 38px;
  opacity: 0.7;
}
.reco-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.4) 100%),
    repeating-linear-gradient(135deg, transparent 0 20px, rgba(254, 227, 0, 0.04) 20px 21px);
  pointer-events: none;
}
.reco-tier-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 5px 10px;
  background: var(--gold);
  color: #1A1A1A;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 1;
}
.reco-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.reco-cat {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue-bright);
  font-weight: 600;
}
.reco-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: 0.5px;
  color: var(--text-primary);
}
.reco-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.reco-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-subtle);
}
.reco-price {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
}
:root[data-theme="light"] .reco-price { color: var(--gold-deep); }
.reco-price .coin {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFD740, var(--gold) 60%, var(--gold-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1A1A1A;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 0 8px rgba(254, 227, 0, 0.4);
}
.reco-cta {
  padding: 10px 18px;
  background: var(--gold);
  color: #1A1A1A;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.reco-cta:hover {
  box-shadow: 0 0 24px rgba(254, 227, 0, 0.5);
  transform: translateY(-1px);
}

/* Activité timeline */
.activity { display: flex; flex-direction: column; gap: 4px; }
.activity-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.activity-item:last-child { border-bottom: 0; }
.activity-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--act-bg, rgba(254,227,0,0.1));
  color: var(--act-c, var(--gold));
  border: 1px solid var(--act-bd, rgba(254,227,0,0.2));
}
.activity-icon svg { width: 16px; height: 16px; }
.activity-item.gain { --act-bg: rgba(34,197,94,0.1); --act-c: var(--success); --act-bd: rgba(34,197,94,0.25); }
.activity-item.spend { --act-bg: rgba(255,90,95,0.08); --act-c: var(--danger); --act-bd: rgba(255,90,95,0.2); }
.activity-item.convert { --act-bg: rgba(254,227,0,0.1); --act-c: var(--gold); --act-bd: rgba(254,227,0,0.25); }
.activity-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.activity-title {
  font-size: 13px; font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity-meta { font-size: 11px; color: var(--text-muted); letter-spacing: 0.3px; }
.activity-amt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
}
.activity-amt.pos { color: var(--success); }
.activity-amt.neg { color: var(--danger); }
.activity-amt.gold { color: var(--gold); }
:root[data-theme="light"] .activity-amt.gold { color: var(--gold-deep); }

/* ============================================
   Gagnez des XP
   ============================================ */
.earn {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-card);
}
.earn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.earn-tip {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.earn-tip svg { width: 14px; height: 14px; color: var(--gold); }

.earn-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.earn-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: rgba(20, 40, 80, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
:root[data-theme="light"] .earn-card {
  background: rgba(245, 248, 253, 0.6);
}
.earn-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--earn-c, var(--gold));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.2s;
}
.earn-card:hover {
  background: rgba(30, 60, 110, 0.4);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
:root[data-theme="light"] .earn-card:hover {
  background: rgba(255, 255, 255, 0.95);
}
.earn-card:hover::after { transform: scaleY(1); }
.earn-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--earn-bg, rgba(254,227,0,0.1));
  color: var(--earn-c, var(--gold));
  border: 1px solid var(--earn-bd, rgba(254,227,0,0.25));
}
.earn-icon svg { width: 20px; height: 20px; }
.earn-card.purple { --earn-c: var(--purple); --earn-bg: rgba(139,92,246,0.12); --earn-bd: rgba(139,92,246,0.3); }
.earn-card.green { --earn-c: var(--success); --earn-bg: rgba(34,197,94,0.12); --earn-bd: rgba(34,197,94,0.3); }
.earn-card.blue { --earn-c: var(--blue-bright); --earn-bg: rgba(74,144,255,0.12); --earn-bd: rgba(74,144,255,0.3); }
.earn-card.gold { --earn-c: var(--gold); --earn-bg: rgba(254,227,0,0.1); --earn-bd: rgba(254,227,0,0.3); }
.earn-card.pink { --earn-c: var(--pink); --earn-bg: rgba(244,114,182,0.12); --earn-bd: rgba(244,114,182,0.3); }
.earn-card.cyan { --earn-c: var(--cyan); --earn-bg: rgba(34,211,238,0.12); --earn-bd: rgba(34,211,238,0.3); }
.earn-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.earn-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.earn-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.earn-reward {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: rgba(254, 227, 0, 0.1);
  border: 1px solid rgba(254, 227, 0, 0.3);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
:root[data-theme="light"] .earn-reward { color: var(--gold-deep); background: rgba(254, 227, 0, 0.15); }
.earn-reward svg { width: 12px; height: 12px; }

.earn-mystery {
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background:
    linear-gradient(120deg, rgba(139, 92, 246, 0.08) 0%, rgba(254, 227, 0, 0.08) 100%);
  border: 1px dashed rgba(254, 227, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 14px;
}
.earn-mystery-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(254, 227, 0, 0.1);
  border: 1px solid rgba(254, 227, 0, 0.3);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.earn-mystery-icon svg { width: 22px; height: 22px; }
.earn-mystery-text { flex: 1; }
.earn-mystery-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}
:root[data-theme="light"] .earn-mystery-title { color: var(--gold-deep); }
.earn-mystery-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

/* ============================================
   Footer DS — photo backdrop, 4 cols, gold accent
   ============================================ */
.app-footer {
  position: relative;
  margin-top: 56px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
  isolation: isolate;
  border-top: 2px solid var(--gold);
  box-shadow: 0 -2px 24px rgba(254, 227, 0, 0.18);
}
.footer-photo {
  position: absolute; inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 600px 400px at 70% 40%, rgba(254, 227, 0, 0.15), transparent 70%),
    linear-gradient(135deg, #0F1A2E 0%, #050B1A 100%);
}
.footer-photo::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 500' preserveAspectRatio='xMidYMid slice'><defs><pattern id='dots' width='6' height='6' patternUnits='userSpaceOnUse'><circle cx='1' cy='1' r='0.5' fill='%23F5C518' opacity='0.15'/></pattern></defs><rect width='1600' height='500' fill='url(%23dots)' opacity='0.5'/><g fill='%23F5C518' opacity='0.04' font-family='Oswald' font-size='320' font-weight='700'><text x='-50' y='420'>FCSM</text></g></svg>");
  background-size: cover;
  background-position: right center;
  opacity: 0.7;
}
.footer-overlay {
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(5, 11, 26, 0.95) 0%, rgba(5, 11, 26, 0.7) 50%, rgba(5, 11, 26, 0.5) 100%);
}
:root[data-theme="light"] .footer-photo {
  background:
    radial-gradient(ellipse 600px 400px at 70% 40%, rgba(254, 227, 0, 0.12), transparent 70%),
    linear-gradient(135deg, #FFFFFF 0%, #F0F4FB 100%);
}
:root[data-theme="light"] .footer-overlay {
  background: linear-gradient(90deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.2) 100%);
}

.footer-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 48px 40px 24px;
}
.footer-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}
.footer-shield { width: 52px !important; height: 56px !important; flex-shrink: 0; }
.footer-club-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--text-primary);
  line-height: 1.1;
}
.footer-club-since {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2.5px;
  color: var(--gold);
  margin-top: 4px;
}
:root[data-theme="light"] .footer-club-since { color: var(--gold-deep); }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-bottom: 40px;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}
:root[data-theme="light"] .footer-col h4 { color: var(--gold-deep); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.18s;
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.footer-credit-line { display: flex; align-items: center; gap: 6px; }
.footer-credit-line b { color: var(--text-primary); font-weight: 700; }

/* ============================================
   Theme toggle (bottom-right)
   ============================================ */
.theme-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: flex;
  align-items: center;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}
:root[data-theme="light"] .theme-toggle {
  box-shadow: 0 8px 32px rgba(15, 35, 75, 0.12);
  background: #FFFFFF;
}
.theme-toggle button {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}
.theme-toggle button:hover { color: var(--text-primary); }
.theme-toggle button.active {
  background: var(--gold);
  color: var(--text-on-gold);
}
.theme-toggle svg { width: 16px; height: 16px; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .tier-emblem { order: -1; flex-direction: row; gap: 20px; align-self: flex-start; align-items: center; width: auto; }
  .tier-disc { width: 120px; height: 120px; flex-shrink: 0; min-width: 120px; }
  .tier-disc-core .num { font-size: 52px; }
  .tier-disc-core .lbl { font-size: 9px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .row-2col { grid-template-columns: 1fr; }
  .earn-list { grid-template-columns: 1fr 1fr; }
  .reco { grid-template-columns: 160px 1fr; gap: 16px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; }
  .inside-content { max-width: 80%; }
  .theme-toggle { right: 16px; bottom: 16px; }
}
@media (max-width: 720px) {
  .header-inner { padding: 0 16px; gap: 12px; }
  .nav { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; padding: 16px; background: var(--header-bg); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-card); gap: 4px; }
  .nav.open { display: flex; }
  .nav a { width: 100%; justify-content: flex-start; }
  .mobile-menu-btn { display: flex; }
  .brand-wordmark .fcsm { font-size: 12px; letter-spacing: 2px; }
  .brand-wordmark .xp { font-size: 18px; letter-spacing: 3px; }
  .subnav-inner { padding: 0 16px; }
  .app-main { padding: 18px; padding-top: calc(var(--header-h) + var(--subnav-h) + 16px); gap: 20px; }
  .hero { padding: 28px 22px; min-height: 0; border-radius: var(--radius-lg); }
  .hero-tier, .hero-tier-shadow { font-size: 64px; }
  .hero-xp-current .num { font-size: 38px; }
  .hero-xp-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero-xp-target { text-align: left; }
  .stats { grid-template-columns: 1fr; }
  .stat-value { font-size: 36px; }
  .reco { grid-template-columns: 1fr; }
  .reco-img { aspect-ratio: 16/9; }
  .reco-foot { flex-direction: column; align-items: stretch; }
  .reco-cta { width: 100%; justify-content: center; }
  .earn-list { grid-template-columns: 1fr; }
  .earn-card { flex-wrap: wrap; }
  .earn-reward { margin-left: auto; }
  .panel { padding: 20px; }
  .lions-pill { padding: 6px 12px 6px 6px; font-size: 14px; }
  .lions-coin { width: 22px; height: 22px; font-size: 10px; }
  .avatar { width: 36px; height: 36px; }
  .header-right { gap: 8px; }
  .inside { height: 200px; }
  .inside-content { padding: 22px; max-width: 100%; }
  .inside-title { font-size: 24px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-content { padding: 32px 18px 18px; }
  .footer-head { margin-bottom: 32px; }
  .footer-bottom { padding: 18px 0 8px; }
  .theme-toggle {
    right: 50%;
    transform: translateX(50%);
    bottom: 16px;
  }
}
