/* ═══════════════════════════════════════════════════════════════
   RSHADOW — CORE DESIGN SYSTEM
   Palette : Noir · Rouge · Blanc
   Typo    : Bebas Neue (display) · Inter (body)
   ═══════════════════════════════════════════════════════════════ */

/* ─── GOOGLE FONTS ─── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;900&display=swap');

/* ─── RESET ─── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ─── FOND SHADOW BOXING GLOBAL (toutes pages) ─── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url('/img/shadow-bg.jpg') center/cover no-repeat;
    opacity: 0.13;
    pointer-events: none;
}

/* Le contenu passe par-dessus */
body>* {
    position: relative;
    z-index: 1;
}

#nav-placeholder {
    z-index: 1000 !important;
}


a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
}

button,
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

/* ─── TOKENS ─── */
:root {
    /* Couleurs */
    --black: #0a0a0a;
    --black-2: #111111;
    --black-3: #1a1a1a;
    --border: #222222;
    --border-light: #2e2e2e;

    --white: #ffffff;
    --white-soft: #f0f0f0;

    --gray-1: #888888;
    --gray-2: #555555;
    --gray-3: #333333;

    --red: #e63946;
    --red-dark: #c1121f;
    --red-faint: rgba(230, 57, 70, 0.08);
    --red-glow: rgba(230, 57, 70, 0.25);

    /* Typographie */
    --font-display: 'Bebas Neue', 'Impact', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;

    /* Tailles de texte */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.375rem;
    --text-2xl: 1.75rem;
    --text-3xl: 2.25rem;
    --text-4xl: 3rem;
    --text-5xl: 4rem;
    --text-hero: 5.5rem;

    /* Espacement */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 5rem;

    /* Layout */
    --max-width: 1400px;
    --nav-height: 72px;

    /* Transitions */
    --t-fast: 150ms ease;
    --t-base: 250ms ease;
    --t-slow: 400ms ease;

    /* Rayons */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 16px;

    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-red: 0 4px 24px var(--red-glow);
}

/* ─── RESPONSIVE TOKENS ─── */
@media (max-width: 992px) {
    :root {
        --text-hero: 4rem;
        --text-5xl: 3rem;
        --text-4xl: 2.25rem;
    }
}

@media (max-width: 768px) {
    :root {
        --text-hero: 2.8rem;
        --text-5xl: 2.25rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --nav-height: 64px;
    }
}

@media (max-width: 480px) {
    :root {
        --text-hero: 2.2rem;
        --text-5xl: 1.75rem;
    }
}

/* ─── TYPOGRAPHIE ─── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.05;
    color: var(--white);
}

h1 {
    font-size: var(--text-hero);
}

h2 {
    font-size: var(--text-5xl);
}

h3 {
    font-size: var(--text-4xl);
}

h4 {
    font-size: var(--text-3xl);
}

h5 {
    font-size: var(--text-2xl);
}

h6 {
    font-size: var(--text-xl);
}

p {
    color: var(--gray-1);
    font-size: var(--text-base);
}

/* Utilitaires texte */
.text-red {
    color: var(--red) !important;
}

.text-white {
    color: var(--white) !important;
}

.text-gray {
    color: var(--gray-1) !important;
}

.text-sm {
    font-size: var(--text-sm);
}

.text-xs {
    font-size: var(--text-xs);
}

.text-center {
    text-align: center;
}

.text-upper {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Label display (Bebas) */
.label {
    font-family: var(--font-display);
    font-size: var(--text-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-1);
}

/* ─── LAYOUT ─── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-top: var(--nav-height);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }
}

/* ─── FLEXBOX & GRID UTILITAIRES ─── */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-col {
    flex-direction: column;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

/* ─── BOUTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--r-md);
    transition: all var(--t-base);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

/* Rouge (CTA principal) */
.btn-red {
    background: var(--red);
    color: var(--white);
    border-color: var(--red);
}

.btn-red:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-red);
}

/* Outline rouge */
.btn-outline {
    background: transparent;
    color: var(--red);
    border-color: var(--red);
}

.btn-outline:hover {
    background: var(--red);
    color: var(--white);
    transform: translateY(-2px);
}

/* Outline blanc */
.btn-white {
    background: transparent;
    color: var(--white);
    border-color: var(--border-light);
}

.btn-white:hover {
    border-color: var(--white);
    transform: translateY(-2px);
}

/* Tailles */
.btn-lg {
    padding: 16px 40px;
    font-size: var(--text-xl);
}

.btn-sm {
    padding: 8px 18px;
    font-size: var(--text-sm);
}

/* Legacy buttons (compatibilité index.html) */
.btn-gold {
    background: var(--red);
    color: var(--white);
    padding: 14px 32px;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--r-md);
    transition: all var(--t-base);
    display: inline-block;
}

.btn-gold:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-red);
}

.btn-dark {
    background: transparent;
    color: var(--white);
    padding: 14px 32px;
    font-family: var(--font-display);
    font-size: var(--text-lg);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--r-md);
    border: 2px solid var(--border-light);
    transition: all var(--t-base);
    display: inline-block;
}

.btn-dark:hover {
    border-color: var(--white);
    transform: translateY(-2px);
}

/* ─── CARDS ─── */
.card {
    background: var(--black-2);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--space-xl);
    transition: all var(--t-base);
}

.card:hover {
    border-color: var(--border-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ─── FORMULAIRES ─── */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-family: var(--font-display);
    font-size: var(--text-xs);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-1);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--black-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--white);
    font-size: var(--text-base);
    font-family: var(--font-body);
    transition: border-color var(--t-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--red);
    outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--gray-2);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

/* ─── BADGE ─── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    font-family: var(--font-display);
    font-size: var(--text-xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 4px;
}

.badge-red {
    background: var(--red);
    color: var(--white);
}

.badge-live {
    background: var(--red-faint);
    color: var(--red);
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.badge-ready {
    background: rgba(0, 200, 100, 0.08);
    color: #00c864;
    border: 1px solid rgba(0, 200, 100, 0.25);
}

/* ─── DIVIDERS ─── */
.divider {
    height: 1px;
    background: var(--border);
    margin: var(--space-xl) 0;
}

.divider-red {
    background: linear-gradient(90deg, transparent, var(--red), transparent);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ─── SPINNER ─── */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 22px;
    height: 22px;
    border-width: 2px;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red);
}

/* ─── SELECTION ─── */
::selection {
    background: var(--red);
    color: var(--white);
}

/* ─── RESPONSIVE HELPERS ─── */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ─── LIGUES & PLAYOFFS TYPOGRAPHY FIXES ─── */
.my-league-title, .my-league-badge, .stat-value, .stat-label, 
.section-title, .rank-cell, .points-cell, .calendar-day, 
.league-title, .league-stat-value, .page-title, .page-badge, 
.country-fighters, .country-label, .req-value, .info-title,
.playoffs-title, .playoffs-badge, .access-title,
.bracket-icon, .qualified-rank, .qualified-avatar,
.btn-primary, .btn-secondary, .standings-table th,
.calendar-month, .calendar-status {
    font-family: var(--font-display);
}