/* ============================================
   HAFIA FC — Base Styles
   Reset, Typography, Utilities
   ============================================ */

/* ═══════════════════════════════════════════
   RESET & BOX MODEL
   ═══════════════════════════════════════════ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
  cursor: none; /* Curseur custom */
}

/* Masquer le curseur natif sur desktop */
@media (pointer: fine) {
  body, a, button, [role="button"] {
    cursor: none !important;
  }
}

/* Réactiver le curseur natif sur mobile/tactile */
@media (pointer: coarse) {
  body, a, button, [role="button"] {
    cursor: auto !important;
  }
}

/* ═══════════════════════════════════════════
   ÉLÉMENTS DE BASE
   ═══════════════════════════════════════════ */

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-color);
}

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

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  color: inherit;
  outline: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-tight);
  font-weight: 700;
}

/* ═══════════════════════════════════════════
   TYPOGRAPHIE
   ═══════════════════════════════════════════ */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.display--hero {
  font-size: clamp(var(--text-5xl), 10vw, var(--text-8xl));
  line-height: 0.95;
}

.display--section {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-6xl));
  line-height: 1;
}

.display--card {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  line-height: 1.1;
}

.heading {
  font-family: var(--font-heading);
}

.heading--lg {
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
}

.heading--md {
  font-size: clamp(var(--text-lg), 2.5vw, var(--text-2xl));
}

.heading--sm {
  font-size: clamp(var(--text-base), 2vw, var(--text-xl));
}

.text--lg {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.text--sm {
  font-size: var(--text-sm);
}

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

.text--stats {
  font-family: var(--font-stats);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
}

.text--accent {
  color: var(--primary);
}

.text--gold {
  color: var(--accent-gold);
}

.text--muted {
  color: var(--text-muted);
}

.text--secondary {
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════ */

::selection {
  background-color: var(--primary);
  color: var(--bg-primary);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-dark);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ═══════════════════════════════════════════
   FOCUS STYLES
   ═══════════════════════════════════════════ */

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════ */

/* Text alignment */
.u-text-center { text-align: center; }
.u-text-left { text-align: left; }
.u-text-right { text-align: right; }

/* Flex utilities */
.u-flex { display: flex; }
.u-flex-center { display: flex; align-items: center; justify-content: center; }
.u-flex-between { display: flex; align-items: center; justify-content: space-between; }
.u-flex-col { display: flex; flex-direction: column; }
.u-flex-wrap { flex-wrap: wrap; }
.u-gap-sm { gap: var(--space-sm); }
.u-gap-md { gap: var(--space-md); }
.u-gap-lg { gap: var(--space-lg); }
.u-gap-xl { gap: var(--space-xl); }

/* Grid */
.u-grid { display: grid; }

/* Spacing */
.u-mt-md { margin-top: var(--space-md); }
.u-mt-lg { margin-top: var(--space-lg); }
.u-mt-xl { margin-top: var(--space-xl); }
.u-mb-md { margin-bottom: var(--space-md); }
.u-mb-lg { margin-bottom: var(--space-lg); }
.u-mb-xl { margin-bottom: var(--space-xl); }
.u-py-2xl { padding-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.u-py-3xl { padding-top: var(--space-3xl); padding-bottom: var(--space-3xl); }
.u-py-4xl { padding-top: var(--space-4xl); padding-bottom: var(--space-4xl); }

/* Visibility */
.u-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.u-hidden { display: none !important; }

/* Mobile/Desktop visibility */
@media (max-width: 767px) {
  .u-hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
  .u-hide-desktop { display: none !important; }
}

/* Animations */
.u-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.u-fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.u-scale-in {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.u-scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Aspect ratios */
.u-aspect-16-9 { aspect-ratio: 16 / 9; }
.u-aspect-4-3 { aspect-ratio: 4 / 3; }
.u-aspect-1-1 { aspect-ratio: 1 / 1; }

/* Overflow */
.u-overflow-hidden { overflow: hidden; }

/* Position */
.u-relative { position: relative; }
.u-absolute { position: absolute; }
