/* ============================================
   HAFIA FC — Composants Réutilisables
   Buttons, Cards, Badges, Tags, etc.
   ============================================ */

/* ═══════════════════════════════════════════
   BOUTONS
   ═══════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-height: 48px;
}

/* Primary — Vert Hafia avec glow */
.btn--primary {
  background: var(--gradient-green);
  color: var(--bg-primary);
  box-shadow: var(--shadow-glow);
}

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

.btn--primary:active {
  transform: translateY(0);
}

/* Outline — bordure verte */
.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn--outline:hover {
  background: var(--primary-subtle);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Ghost — transparent */
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
}

.btn--ghost:hover {
  background: var(--bg-glass);
  color: var(--primary);
}

/* Glass — glassmorphism */
.btn--glass {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1px solid var(--bg-glass-border);
}

.btn--glass:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Tailles */
.btn--sm {
  padding: 8px 20px;
  font-size: var(--text-xs);
  min-height: 36px;
}

.btn--lg {
  padding: 18px 40px;
  font-size: var(--text-base);
  min-height: 56px;
}

/* Icon only */
.btn--icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn--icon.btn--sm {
  width: 36px;
  height: 36px;
  min-height: 36px;
}

/* Effet ondulation au clic */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.btn:active::after {
  transform: scale(2);
  opacity: 0;
  transition: 0s;
}

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
  position: relative;
}

.card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card__body {
  padding: var(--space-lg);
}

.card__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.card__text {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* Card avec accent vert au hover */
.card--accent:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

/* Card glass */
.card--glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--bg-glass-border);
}

/* ═══════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-full);
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.badge--gold {
  background: rgba(255, 215, 0, 0.1);
  color: var(--accent-gold);
  border-color: rgba(255, 215, 0, 0.2);
}

.badge--red {
  background: rgba(255, 23, 68, 0.1);
  color: var(--accent-red);
  border-color: rgba(255, 23, 68, 0.2);
}

.badge--fill {
  background: var(--primary);
  color: var(--bg-primary);
  border: none;
}

/* ═══════════════════════════════════════════
   TAGS
   ═══════════════════════════════════════════ */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 16px;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-base);
}

.tag:hover,
.tag.is-active {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary);
}

/* ═══════════════════════════════════════════
   STAT NUMBERS
   ═══════════════════════════════════════════ */

.stat {
  text-align: center;
}

.stat__number {
  font-family: var(--font-stats);
  font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-top: var(--space-sm);
}

/* ═══════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════ */

.progress {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  background: var(--gradient-green);
  border-radius: var(--radius-full);
  transition: width var(--duration-slowest) var(--ease-out);
  position: relative;
}

.progress__bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 20px;
  height: 100%;
  background: var(--primary-glow);
  filter: blur(4px);
}

/* ═══════════════════════════════════════════
   AVATAR
   ═══════════════════════════════════════════ */

.avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--border-medium);
  flex-shrink: 0;
}

.avatar--lg {
  width: 64px;
  height: 64px;
}

.avatar--xl {
  width: 96px;
  height: 96px;
  border-width: 3px;
}

.avatar--accent {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

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

/* ═══════════════════════════════════════════
   CHIP / PILL
   ═══════════════════════════════════════════ */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: var(--transition-base);
}

.chip__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary-glow);
}

.chip__dot--live {
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ═══════════════════════════════════════════
   TOOLTIP
   ═══════════════════════════════════════════ */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: 6px 12px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: var(--text-xs);
  white-space: nowrap;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-out),
              transform var(--duration-fast) var(--ease-out);
}

[data-tooltip]:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-12px);
}
