/* ========================================
   ROLAND TRADING - MAIN STYLES
   ======================================== */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--gray-900);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dark body for trading platform feel */
body.dark-theme {
  background-color: var(--secondary);
  color: var(--gray-100);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  h4 { font-size: var(--text-xl); }
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== NAVBAR ===== */
.navbar-roland {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--secondary-lighter);
  padding: var(--space-4) 0;
  transition: var(--transition-base);
}

.navbar-roland .navbar-brand {
  font-family: var(--font-display);
  font-weight: var(--font-extrabold);
  font-size: var(--text-xl);
  color: var(--white);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.navbar-roland .navbar-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.navbar-roland .nav-link {
  color: var(--gray-300);
  font-weight: var(--font-medium);
  padding: var(--space-2) var(--space-4);
  transition: var(--transition-fast);
  position: relative;
}

.navbar-roland .nav-link:hover,
.navbar-roland .nav-link.active {
  color: var(--white);
}

.navbar-roland .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-4);
  right: var(--space-4);
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* ===== BUTTONS ===== */
.btn {
  font-family: var(--font-primary);
  font-weight: var(--font-semibold);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  color: var(--white);
}

.btn-secondary {
  background: var(--secondary-light);
  color: var(--white);
  border: 1px solid var(--secondary-lighter);
}

.btn-secondary:hover {
  background: var(--secondary-lighter);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-gold {
  background: var(--gradient-gold);
  color: var(--secondary);
  font-weight: var(--font-bold);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-gold);
  color: var(--secondary);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

/* ===== CARDS ===== */
.card-roland {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: var(--transition-base);
}

.card-roland:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-dark {
  background: var(--secondary-light);
  border-color: var(--secondary-lighter);
}

.card-dark:hover {
  border-color: var(--primary);
}

/* Contest Card */
.contest-card {
  background: var(--secondary-light);
  border: 1px solid var(--secondary-lighter);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  /* Alignement hauteur : la card s'étire à la hauteur de sa colonne
     (Bootstrap row stretch) et passe en flex column pour pouvoir
     pousser le bouton final au fond via mt-auto. */
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Description uniformisée à 2 lignes (ellipsis si dépasse, min-height
   pour réserver l'espace même si le texte est court). */
.contest-card > p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(var(--text-sm) * var(--leading-relaxed) * 2);
}

/* Bouton final toujours en bas — absorbe le delta de hauteur du bloc
   temps (présent pour active/upcoming, absent pour completed). */
.contest-card > a.btn {
  margin-top: auto;
}

.contest-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: var(--transition-fast);
}

.contest-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.contest-card:hover::before {
  opacity: 1;
}

/* Featured contest — pricing-tier variant of contest-card.
   Card légèrement plus grande (scale lg+), ruban "À la une" qui dépasse
   en haut, border or marquée. Bande or top dessinée via inset box-shadow
   qui respecte automatiquement les coins arrondis (pas de bleed possible
   contrairement à un ::before rectangulaire avec overflow:visible).
   Mobile : pas de scale, fallback propre. */
.contest-card-featured {
  position: relative;
  overflow: visible; /* laisse le ruban dépasser */
  border-color: rgba(245, 158, 11, 0.5);
  background:
    radial-gradient(85% 55% at 100% 0%, rgba(245, 158, 11, 0.09) 0%, transparent 58%),
    var(--secondary-light);
  box-shadow:
    inset 0 4px 0 0 var(--accent-gold),
    inset 0 0 0 1px rgba(245, 158, 11, 0.12);
}

@media (min-width: 992px) {
  .contest-card-featured {
    transform: scale(1.05);
    z-index: 2;
  }
}

/* Bande or désormais dessinée par le box-shadow inset — neutralise le ::before
   du parent .contest-card pour éviter qu'il déborde des coins arrondis. */
.contest-card-featured::before {
  display: none;
}

.contest-card-featured:hover {
  border-color: var(--accent-gold);
  box-shadow:
    inset 0 4px 0 0 var(--accent-gold),
    inset 0 0 0 1px rgba(245, 158, 11, 0.22),
    0 24px 32px -8px rgba(0, 0, 0, 0.4),
    0 0 32px rgba(245, 158, 11, 0.2);
}

@media (min-width: 992px) {
  .contest-card-featured:hover {
    transform: scale(1.05) translateY(-4px);
  }
}

/* Ruban "À la une" stuck au bord supérieur de la card */
.contest-feat-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--gradient-gold);
  color: var(--secondary);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: var(--font-extrabold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  box-shadow:
    0 6px 14px -2px rgba(245, 158, 11, 0.4),
    0 1px 2px rgba(0, 0, 0, 0.3);
  z-index: 3;
  white-space: nowrap;
  pointer-events: none;
}

.contest-feat-ribbon svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.5;
  fill: var(--secondary);
  stroke: var(--secondary);
}

.contest-card .prize-badge {
  background: var(--gradient-gold);
  color: var(--secondary);
  font-weight: var(--font-bold);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.status-badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-upcoming {
  background: var(--info-light);
  color: var(--info);
}

.status-ended {
  background: var(--gray-200);
  color: var(--gray-600);
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: var(--gradient-hero);
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(99, 102, 241, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.06) 0%, transparent 40%);
  pointer-events: none;
  animation: heroGradientShift 8s ease-in-out infinite alternate;
}

@keyframes heroGradientShift {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* Animated Particles */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 12s ease-in-out infinite;
}

.particle-1 {
  width: 6px;
  height: 6px;
  background: var(--primary-light);
  top: 20%;
  left: 15%;
  animation-delay: 0s;
  animation-duration: 14s;
}

.particle-2 {
  width: 4px;
  height: 4px;
  background: var(--accent-gold);
  top: 60%;
  left: 80%;
  animation-delay: 2s;
  animation-duration: 10s;
}

.particle-3 {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  top: 75%;
  left: 25%;
  animation-delay: 4s;
  animation-duration: 16s;
}

.particle-4 {
  width: 3px;
  height: 3px;
  background: var(--primary);
  top: 30%;
  left: 70%;
  animation-delay: 1s;
  animation-duration: 11s;
}

.particle-5 {
  width: 5px;
  height: 5px;
  background: var(--success);
  top: 50%;
  left: 10%;
  animation-delay: 3s;
  animation-duration: 13s;
}

.particle-6 {
  width: 4px;
  height: 4px;
  background: var(--primary-light);
  top: 15%;
  left: 55%;
  animation-delay: 5s;
  animation-duration: 15s;
}

@keyframes particleFloat {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) translateX(0);
  }
  10% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.3;
    transform: translateY(-60px) translateX(30px);
  }
  90% {
    opacity: 0.6;
  }
}

/* Grid Overlay */
.hero-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
  animation: gridFadeIn 2s ease-out forwards;
  opacity: 0;
}

@keyframes gridFadeIn {
  to { opacity: 1; }
}

/* Staggered Fade-Up Animation */
.hero-fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-section .hero-title {
  font-size: var(--text-6xl);
  font-weight: var(--font-extrabold);
  color: var(--white);
  margin-bottom: var(--space-6);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

@media (max-width: 768px) {
  .hero-section .hero-title {
    font-size: var(--text-4xl);
  }
}

.hero-text-glow {
  text-shadow: 0 0 40px rgba(99, 102, 241, 0.4), 0 0 80px rgba(99, 102, 241, 0.15);
}

.hero-section .hero-subtitle {
  font-size: var(--text-xl);
  color: var(--gray-400);
  margin-bottom: var(--space-8);
  max-width: 640px;
  line-height: var(--leading-relaxed);
}

/* Play Video Button */
.btn-play-video {
  position: relative;
}

.btn-play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 50%;
  margin-right: 4px;
  transition: background var(--transition-base);
}

.btn-play-video:hover .btn-play-icon {
  background: rgba(99, 102, 241, 0.35);
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-12);
  align-items: center;
}

.hero-stat {
  text-align: center;
}

.hero-stat .stat-value {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  color: var(--white);
}

.hero-stat .stat-label {
  font-size: var(--text-sm);
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-stat-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.hero-stat-desc {
  font-size: 0.7rem;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--secondary-lighter);
}

@media (max-width: 768px) {
  .hero-stat-divider {
    display: none;
  }
  .hero-stats {
    gap: var(--space-4);
    flex-wrap: wrap;
  }
  .hero-stat .stat-value {
    font-size: var(--text-2xl);
  }
}

/* ===== SECTIONS ===== */
.section {
  padding: var(--space-20) 0;
}

.section-dark {
  background: var(--secondary);
}

.section-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-500);
  margin-bottom: var(--space-12);
}

.section-dark .section-title {
  color: var(--white);
}

.section-dark .section-subtitle {
  color: var(--gray-400);
}

/* ===== HOW IT WORKS — refined editorial ===== */
.how-it-works {
  position: relative;
  overflow: hidden;
}

.how-it-works-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(245, 158, 11, 0.05) 0%, transparent 65%),
    radial-gradient(50% 60% at 50% 100%, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.how-steps {
  position: relative;
  z-index: 1;
}

@media (min-width: 992px) {
  .how-steps::before {
    content: '';
    position: absolute;
    top: calc(var(--space-8) + 1.55rem);
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg,
      transparent 0%,
      rgba(245, 158, 11, 0.35) 14%,
      rgba(99, 102, 241, 0.3) 50%,
      rgba(245, 158, 11, 0.35) 86%,
      transparent 100%);
    pointer-events: none;
    z-index: 0;
  }
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: var(--space-3);
}

.step-card {
  position: relative;
  background: linear-gradient(180deg, var(--secondary-light) 0%, rgba(30, 41, 59, 0.55) 100%);
  border: 1px solid var(--secondary-lighter);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6) var(--space-8);
  text-align: left;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.step-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 60% at 50% 0%, rgba(99, 102, 241, 0.09) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.step-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 30%, var(--primary-light) 70%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.step-card:hover {
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.55);
}

.step-card:hover::before,
.step-card:hover::after {
  opacity: 1;
}

.step-index {
  position: relative;
  display: block;
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: var(--font-extrabold);
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--space-4);
  z-index: 2;
}

.step-rule {
  position: relative;
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, transparent 100%);
  margin-bottom: var(--space-5);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
}

.step-card:hover .step-rule {
  width: 64px;
}

.step-glyph {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.18);
  color: var(--primary-light);
  transition: var(--transition-base);
  z-index: 2;
}

.step-glyph svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.step-card:hover .step-glyph {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: var(--white);
}

.step-title {
  position: relative;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--white);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
  z-index: 2;
}

.step-description {
  position: relative;
  color: var(--gray-400);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  margin: 0;
  z-index: 2;
}

@media (max-width: 991.98px) {
  .step-index {
    font-size: 2.75rem;
  }
}

/* ===== RANKINGS / LEADERBOARD ===== */
.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.podium-place {
  text-align: center;
  padding: var(--space-6);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  position: relative;
}

.podium-place.first {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.2) 0%, transparent 100%);
  border: 1px solid var(--accent-gold);
  border-bottom: none;
  min-height: 200px;
  order: 2;
}

.podium-place.second {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.2) 0%, transparent 100%);
  border: 1px solid var(--gray-400);
  border-bottom: none;
  min-height: 160px;
  order: 1;
}

.podium-place.third {
  background: linear-gradient(180deg, rgba(180, 83, 9, 0.2) 0%, transparent 100%);
  border: 1px solid #B45309;
  border-bottom: none;
  min-height: 120px;
  order: 3;
}

.podium-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  border: 3px solid;
  margin: 0 auto var(--space-3);
  overflow: hidden;
  background: var(--secondary-lighter);
}

.podium-place.first .podium-avatar {
  border-color: var(--accent-gold);
  width: 100px;
  height: 100px;
}

.podium-place.second .podium-avatar {
  border-color: var(--gray-400);
}

.podium-place.third .podium-avatar {
  border-color: #B45309;
}

.podium-rank {
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  margin-bottom: var(--space-2);
}

.podium-place.first .podium-rank {
  color: var(--accent-gold);
}

.podium-place.second .podium-rank {
  color: var(--gray-400);
}

.podium-place.third .podium-rank {
  color: #B45309;
}

.podium-name {
  color: var(--white);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.podium-profit {
  color: var(--success);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
}

/* Leaderboard Table */
/*
 * TRA-117 — SEPT COLONNES DANS UNE COLONNE DE PAGE ÉTROITE.
 *
 * `overflow: hidden` clippait ; il ne laissait donc au navigateur qu'une seule issue
 * quand la place manquait : casser le contenu des cellules. Sur la fiche publique
 * (`col-lg-8`, ~856 px pour sept colonnes) cela donnait `+71,34 %` sur TROIS lignes,
 * un drapeau séparé de son pays, et des noms de traders sur trois lignes.
 *
 * `overflow-x: auto` est le motif déjà employé par les autres tableaux larges du dépôt
 * (`templates/Payments/my_payments.php`, `templates/Payout/index.php`,
 * `templates/Rankings/dashboard_contest.php`) : le tableau défile quand il ne rentre
 * pas, au lieu d'être haché. `overflow-y: hidden` conserve le clip des coins arrondis.
 */
.leaderboard-table {
  background: var(--secondary-light);
  border-radius: var(--radius-xl);
  overflow-x: auto;
  overflow-y: hidden;
}

.leaderboard-table table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table th {
  background: var(--secondary);
  color: var(--gray-400);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: 1px;
  padding: var(--space-4) var(--space-3);
  text-align: left;
}

/*
 * ⛔ `white-space: nowrap` — AUCUNE VALEUR FORMATÉE NE SE COUPE.
 *
 * `PerformanceHelper::format()` et son miroir `formatPerf()` rendent « +71,34 % » —
 * espace ORDINAIRE avant le signe pourcent, et espace ordinaire aussi en séparateur
 * de milliers (« +1 240,50 % »). Ce sont autant de points de coupure. La chaîne, elle,
 * est verrouillée au caractère près par `PerformanceHelperTest` et
 * `tests/js/leaderboard-format.test.js` : remplacer ces espaces par des insécables
 * ferait diverger PHP et JS. La réparation est donc ICI, et nulle part ailleurs.
 * Elle protège du même coup « 🇨🇮 Côte d'Ivoire », « $10 000,00 » et « 74% ».
 */
.leaderboard-table td {
  padding: var(--space-4) var(--space-3);
  border-bottom: 1px solid var(--secondary-lighter);
  color: var(--gray-300);
  white-space: nowrap;
}

/*
 * La SEULE colonne qui garde le droit de revenir à la ligne : le trader. Un nom
 * composé (« Fogan Koko Gregorio BADJAGBO ») tenu sur une seule ligne pousserait le
 * tableau au défilement horizontal sur tous les écrans, y compris là où il rentre ;
 * en le laissant revenir à la ligne, c'est LUI qui absorbe le manque de place, et les
 * six autres colonnes gardent leur valeur d'un seul tenant.
 * Colonne 2 dans les DEUX tableaux qui portent cette classe (fiche publique et
 * `/rankings/dashboard/{id}`) — vérifié dans les deux gabarits de ligne JS.
 *
 * ⚠️ Les `<th>`, eux, gardent le droit de revenir à la ligne : forcer « SOLDE DE
 *    DÉPART » et « WIN RATE » sur une seule ligne coûterait ~70 px pris à la colonne
 *    Trader, qui repasserait à trois lignes. Un en-tête sur deux lignes est lisible ;
 *    une valeur coupée en trois ne l'est pas.
 */
.leaderboard-table td:nth-child(2) {
  white-space: normal;
}

.leaderboard-table tr:last-child td {
  border-bottom: none;
}

.leaderboard-table tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.rank-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
}

.rank-1 { background: var(--accent-gold); color: var(--secondary); }
.rank-2 { background: var(--gray-400); color: var(--secondary); }
.rank-3 { background: #B45309; color: var(--white); }
.rank-default { background: var(--secondary-lighter); color: var(--gray-400); }

/* ===== FORMS ===== */
.form-control-roland {
  background: var(--secondary-light);
  border: 1px solid var(--secondary-lighter);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  color: var(--white);
  font-size: var(--text-base);
  transition: var(--transition-fast);
}

.form-control-roland:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-control-roland::placeholder {
  color: var(--gray-500);
}

.form-label-roland {
  color: var(--gray-300);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-2);
  display: block;
}

.form-select-roland {
  background: var(--secondary-light) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394A3B8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 1rem center/12px 12px;
  border: 1px solid var(--secondary-lighter);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  padding-right: var(--space-10);
  color: var(--white);
  font-size: var(--text-base);
  appearance: none;
  cursor: pointer;
}

/* ===== AUTH PAGES ===== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  padding: var(--space-6);
}

.auth-card {
  background: var(--secondary-light);
  border: 1px solid var(--secondary-lighter);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  width: 100%;
  max-width: 440px;
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-title {
  color: var(--white);
  font-size: var(--text-2xl);
  text-align: center;
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  color: var(--gray-400);
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--gray-500);
  font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--secondary-lighter);
}

/* ===== DASHBOARD ===== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

.dashboard-sidebar {
  width: 280px;
  background: var(--secondary);
  border-right: 1px solid var(--secondary-lighter);
  padding: var(--space-6);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
}

.dashboard-main {
  flex: 1;
  margin-left: 280px;
  background: var(--secondary-light);
  min-height: 100vh;
}

/* Sidebar mobile : barre + hamburger + backdrop (masqués en desktop ≥992px) */
.dashboard-mobile-topbar { display: none; }
.dashboard-backdrop { display: none; }
.dashboard-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  background: var(--secondary-light);
  border: 1px solid var(--secondary-lighter);
  border-radius: var(--radius-lg);
  color: var(--white);
  cursor: pointer;
}

@media (max-width: 992px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
    z-index: var(--z-modal);          /* au-dessus du backdrop une fois ouvert */
    transition: var(--transition-base);
    box-shadow: var(--shadow-xl, 0 10px 40px rgba(0, 0, 0, 0.45));
  }

  .dashboard-sidebar.show {
    transform: translateX(0);
  }

  .dashboard-main {
    margin-left: 0;
    min-width: 0;          /* flex-item : autorise la réduction sous la largeur min-content du contenu */
  }

  .dashboard-mobile-topbar {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--secondary);
    border-bottom: 1px solid var(--secondary-lighter);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
  }

  body.has-verification-banner .dashboard-mobile-topbar {
    top: 44px;
  }

  .dashboard-backdrop.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: var(--z-modal-backdrop);
  }
}

/* En-tête de page dashboard : empile titre / actions sur petit écran (<576px) */
@media (max-width: 575.98px) {
  .dashboard-topbar {
    flex-wrap: wrap;
    gap: var(--space-3);
  }
  .dashboard-topbar > div:last-child {
    width: 100%;
  }
  .dashboard-topbar .btn-primary {
    flex: 1;
    justify-content: center;
  }

  /* Groupes de boutons de bannière (probation…) : empilés pleine largeur */
  .dashboard-action-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-action-group > * {
    width: 100%;
  }
  .dashboard-action-group button,
  .dashboard-action-group a {
    width: 100%;
    justify-content: center;
  }

  /* Petits écrans : padding de contenu réduit (plus d'air, évite le cumul de marges) */
  .dashboard-content {
    padding: var(--space-4) !important;
  }
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  color: var(--gray-400);
  text-decoration: none;
  transition: var(--transition-fast);
  margin-bottom: var(--space-1);
}

.sidebar-nav-item:hover {
  background: var(--secondary-light);
  color: var(--white);
}

.sidebar-nav-item.active {
  background: var(--primary);
  color: var(--white);
}

/* Stats Cards */
.stat-card {
  background: var(--secondary);
  border: 1px solid var(--secondary-lighter);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.stat-card .stat-icon.primary {
  background: rgba(99, 102, 241, 0.2);
  color: var(--primary);
}

.stat-card .stat-icon.success {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.stat-card .stat-icon.warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.stat-card .stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--white);
  margin-bottom: var(--space-1);
}

.stat-card .stat-label {
  color: var(--gray-400);
  font-size: var(--text-sm);
}

/* ===== FOOTER ===== */
.footer-roland {
  background: var(--secondary);
  border-top: 1px solid var(--secondary-lighter);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: var(--font-extrabold);
  font-size: var(--text-xl);
  color: var(--white);
  margin-bottom: var(--space-4);
}

.footer-description {
  color: var(--gray-400);
  margin-bottom: var(--space-6);
  max-width: 300px;
}

.footer-title {
  color: var(--white);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-3);
}

.footer-links a {
  color: var(--gray-400);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  border-top: 1px solid var(--secondary-lighter);
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-copyright {
  color: var(--gray-500);
  font-size: var(--text-sm);
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: var(--transition-fast);
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
}

/* ===== UTILITIES ===== */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--gray-500) !important; }
.text-white { color: var(--white) !important; }

.bg-success-subtle { background: var(--success-light) !important; }
.bg-danger-subtle { background: var(--danger-light) !important; }
.bg-warning-subtle { background: var(--warning-light) !important; }

/* Profit/Loss indicators */
/*
 * TRA-117 — `.profit-positive` NE POSE PLUS LE SIGNE, elle ne fait plus que la COULEUR.
 *
 * Un `::before { content: '+' }` vivait ici et ajoutait un `+` devant tout ce que la
 * classe habillait. Or les QUATRE porteurs vivants de la classe apportent déjà leur
 * propre signe : `templates/Contests/view.php` et `templates/Dashboard/contests.php`
 * par `formatPerf()` / `PerformanceHelper::format()` (qui posent le signe eux-mêmes,
 * c'est leur contrat et il est verrouillé par des tests des deux côtés),
 * `templates/Profile/index.php` et `templates/Rankings/dashboard_contest.php` par un
 * `+` littéral. Résultat à l'écran : `++8,17 %`.
 *
 * ⚠️ LE DÉFAUT NE SE VOYAIT QUE SUR LES VALEURS POSITIVES — `.profit-negative` n'a
 *    jamais eu de `::before`, donc `-3,72 %` était juste. C'est ce qui l'a fait passer.
 * ⚠️ Le `::before` était aussi une BOÎTE EN LIGNE de plus dans la cellule, donc un
 *    point de coupure de plus : c'est lui qui isolait le `+` sur sa propre ligne dans
 *    « + / +71,34 / % ». Ne pas le réintroduire « pour aider » un futur appelant :
 *    le signe est la responsabilité du formateur, jamais de la feuille de style.
 */
.profit-positive {
  color: var(--success);
}

.profit-negative {
  color: var(--danger);
}

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--secondary-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-weight: var(--font-semibold);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: var(--text-xl);
}

.avatar-xl {
  width: 100px;
  height: 100px;
  font-size: var(--text-3xl);
}

/* Badges */
.badge-roland {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, var(--secondary-lighter) 25%, var(--secondary-light) 50%, var(--secondary-lighter) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast Notifications */
.toast-roland {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  background: var(--secondary-light);
  border: 1px solid var(--secondary-lighter);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-tooltip);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-base);
}

.toast-roland.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-roland.success {
  border-left: 4px solid var(--success);
}

.toast-roland.error {
  border-left: 4px solid var(--danger);
}

/* Filters */
.filter-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
}

.filter-tab {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--secondary-light);
  border: 1px solid var(--secondary-lighter);
  color: var(--gray-400);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-tab:hover {
  border-color: var(--primary);
  color: var(--white);
}

.filter-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Progress Bar */
.progress-roland {
  height: 8px;
  background: var(--secondary-lighter);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-roland .progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* Countdown Timer */
.countdown {
  display: flex;
  gap: var(--space-4);
}

.countdown-item {
  text-align: center;
}

.countdown-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--white);
  background: var(--secondary);
  border: 1px solid var(--secondary-lighter);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  min-width: 70px;
}

.countdown-label {
  font-size: var(--text-xs);
  color: var(--gray-500);
  text-transform: uppercase;
  margin-top: var(--space-2);
}

/* ===== ALERT SYSTEM ===== */
.alert-container {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-tooltip);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 400px;
}

.alert-roland {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--secondary-light);
  border: 1px solid var(--secondary-lighter);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: translateX(100%);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.alert-roland.show {
  opacity: 1;
  transform: translateX(0);
}

.alert-roland.hide {
  opacity: 0;
  transform: translateX(100%);
}

.alert-roland.success {
  border-left: 4px solid var(--success);
}

.alert-roland.error {
  border-left: 4px solid var(--danger);
}

.alert-roland.warning {
  border-left: 4px solid var(--warning);
}

.alert-roland.info {
  border-left: 4px solid var(--info);
}

.alert-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.alert-roland.success .alert-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.alert-roland.error .alert-icon {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.alert-roland.warning .alert-icon {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.alert-roland.info .alert-icon {
  background: rgba(59, 130, 246, 0.2);
  color: var(--info);
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  color: var(--white);
  margin-bottom: var(--space-1);
}

.alert-message {
  font-size: var(--text-sm);
  color: var(--gray-400);
  line-height: var(--leading-relaxed);
}

.alert-close {
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.alert-close:hover {
  color: var(--white);
}

/* ===== STICKY EMAIL VERIFICATION BANNER ===== */
.email-verification-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: linear-gradient(135deg, var(--warning) 0%, #D97706 100%);
  padding: var(--space-2) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  box-shadow: var(--shadow-md);
  min-height: 44px;
}

.email-verification-banner .banner-content {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--secondary);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.email-verification-banner .banner-icon {
  width: 20px;
  height: 20px;
  background: rgba(15, 23, 42, 0.2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.email-verification-banner .banner-text strong {
  font-weight: var(--font-bold);
}

.email-verification-banner .btn-resend {
  background: var(--secondary);
  color: var(--white);
  border: none;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}

.email-verification-banner .btn-resend:hover {
  background: var(--secondary-light);
}

/* Adjust body padding when banner is present */
body.has-verification-banner {
  padding-top: 44px;
}

body.has-verification-banner .navbar-roland {
  top: 44px;
}

body.has-verification-banner .alert-container {
  top: calc(var(--space-6) + 44px);
}

@media (max-width: 768px) {
  .alert-container {
    left: var(--space-4);
    right: var(--space-4);
    max-width: none;
  }
  
  .email-verification-banner {
    padding: var(--space-2) var(--space-3);
    gap: var(--space-2);
    min-height: 40px;
  }
  
  .email-verification-banner .banner-content {
    flex: 1;
    justify-content: center;
    text-align: center;
    gap: var(--space-1);
  }
  
  .email-verification-banner .btn-resend {
    padding: var(--space-1) var(--space-2);
    font-size: 11px;
  }
  
  body.has-verification-banner {
    padding-top: 40px;
  }
  
  body.has-verification-banner .navbar-roland {
    top: 40px;
  }
  
  body.has-verification-banner .alert-container {
    top: calc(var(--space-6) + 40px);
  }
}

/* ===== LEADERBOARD SECTION HEADER (eyebrow + meta chips) ===== */
.section-leaderboard {
  position: relative;
  overflow: hidden;
}

.lb-section-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 40% at 50% 0%, rgba(99, 102, 241, 0.06) 0%, transparent 65%),
    radial-gradient(40% 50% at 50% 100%, rgba(245, 158, 11, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Eyebrow combine .section-eyebrow (gold uppercase) + dot live pulsant */
.lb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.lb-live-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  display: inline-block;
  position: relative;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: lbPulse 2s ease-out infinite;
}

@keyframes lbPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Meta chips row : participants · countdown · prize pool */
.lb-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.lb-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid var(--secondary-lighter);
  border-radius: var(--radius-full);
  color: var(--gray-300);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lb-meta-chip strong {
  color: var(--white);
  font-weight: var(--font-bold);
}

.lb-meta-chip svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  color: var(--primary-light);
}

.lb-meta-chip-gold {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-gold-light);
}

.lb-meta-chip-gold strong {
  color: var(--accent-gold-light);
}

.lb-meta-chip-gold svg {
  color: var(--accent-gold);
}

.lb-countdown {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* ===== FAQ DISCLOSURE INLINE (home) — pattern custom, pas un accordion Bootstrap.
   Animation height via grid-template-rows 0fr → 1fr (pas de JS pour la transition). ===== */
.faq-disclosure {
  border-top: 1px solid var(--secondary-lighter);
}

.faq-item {
  border-bottom: 1px solid var(--secondary-lighter);
}

.faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  padding: var(--space-5) var(--space-2);
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  letter-spacing: -0.01em;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-q:hover,
.faq-q[aria-expanded="true"] {
  color: var(--primary-light);
}

.faq-q-text {
  flex: 1;
}

.faq-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--primary-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.faq-q[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
}

/* Animation height : grid-template-rows 0fr → 1fr permet de transitionner
   vers une hauteur "auto" sans calcul JS. */
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-q[aria-expanded="true"] + .faq-a {
  grid-template-rows: 1fr;
}

.faq-a-inner {
  overflow: hidden;
  min-height: 0;
}

.faq-a p {
  color: var(--gray-400);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  margin: 0;
  padding: 0 var(--space-2) var(--space-5);
}

@media (max-width: 768px) {
  .faq-q {
    font-size: var(--text-base);
    padding: var(--space-4) var(--space-1);
  }
  .faq-a p {
    font-size: var(--text-sm);
    padding: 0 var(--space-1) var(--space-4);
  }
}

/* ===== HOME LEADERBOARD (Contest Ranking) ===== */
.home-leaderboard {
  background: var(--secondary-light);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--secondary-lighter);
}

.home-leaderboard-header {
  display: grid;
  grid-template-columns: 80px 1fr 120px;
  padding: var(--space-3) var(--space-6);
  background: var(--secondary);
  color: var(--gray-500);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-leaderboard-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px;
  padding: var(--space-4) var(--space-6);
  align-items: center;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
  transition: background var(--transition-fast);
}

.home-leaderboard-row:last-child {
  border-bottom: none;
}

.home-leaderboard-row:hover {
  background: rgba(99, 102, 241, 0.04);
}

/* Gold row highlight */
.home-leaderboard-row.lb-row-gold {
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid var(--accent-gold);
}

.home-leaderboard-row.lb-row-gold:hover {
  background: rgba(245, 158, 11, 0.1);
}

/* Silver row */
.home-leaderboard-row.lb-row-silver {
  background: rgba(148, 163, 184, 0.03);
}

/* Bronze row */
.home-leaderboard-row.lb-row-bronze {
  background: rgba(180, 83, 9, 0.03);
}

.lb-col-rank {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-col-trader {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.lb-col-profit {
  text-align: right;
}

.lb-rank-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  color: var(--gray-400);
  background: var(--secondary);
  border: 1px solid var(--secondary-lighter);
}

.lb-rank-badge.lb-rank-1 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.3));
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.lb-rank-badge.lb-rank-2 {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.15), rgba(148, 163, 184, 0.25));
  color: var(--gray-300);
  border-color: var(--gray-400);
}

.lb-rank-badge.lb-rank-3 {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.15), rgba(217, 119, 6, 0.2));
  color: #D97706;
  border-color: #B45309;
}

.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
  font-size: var(--text-xs);
  flex-shrink: 0;
}

.lb-name {
  color: var(--white);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
}

.lb-profit-value {
  color: var(--success);
  font-weight: var(--font-bold);
  font-size: var(--text-base);
  font-family: var(--font-display);
}

.lb-row-gold .lb-profit-value {
  color: var(--accent-gold);
  font-size: var(--text-lg);
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.lb-row-gold .lb-name {
  color: var(--accent-gold-light);
  font-weight: var(--font-bold);
}

.lb-row-silver .lb-name,
.lb-row-bronze .lb-name {
  font-weight: var(--font-bold);
}

@media (max-width: 576px) {
  .home-leaderboard-header,
  .home-leaderboard-row {
    grid-template-columns: 56px 1fr 90px;
    padding-left: var(--space-3);
    padding-right: var(--space-3);
  }

  .lb-name {
    font-size: var(--text-xs);
  }
}
