/* ============================================================
   BASE.CSS
   Reset, variables, typographie, composants Bootstrap override
   ============================================================ */

/* ──────────────────────────────────────────────
   1. VARIABLES
   ────────────────────────────────────────────── */
:root {
    /* Couleurs de marque */
    --primary: #00c853;
    --primary-dark: #009e42;
    --primary-light: #4ade80;
    --warning: #ffc107;
    --danger: #ff1744;

    /* Fonds */
    --bg: #0a0e1a;
    --bg-2: #111827;
    --bg-3: #1a2234;
    --bg-4: #0f172a;

    /* Texte */
    --text: #e5e7eb;
    --text-muted: #9ca3af;
    --text-dark: #111827;

    /* Bordures & rayons */
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 20px;

    /* Espacements */
    --space-block: 4rem;
    --space-block-sm: 2.5rem;

    /* Z-index */
    --z-navbar: 1030;
    --z-sticky: 1020;
    --z-modal: 1055;
    --z-backtop: 999;
    --z-overlay: 1040;

    /* Bootstrap overrides */
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-border-color: var(--border);
    --bs-primary: var(--primary);
    --bs-success: var(--primary);
}

/* ──────────────────────────────────────────────
   2. RESET & TYPOGRAPHIE
   ────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg) !important;
    color: var(--text) !important;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: inherit;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 0.5rem;
}

p {
    margin: 0 0 1rem;
}

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

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

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

/* Texte utilitaire */
.text-muted {
    color: var(--text-muted) !important;
}

.text-success {
    color: var(--primary) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-white {
    color: #fff !important;
}

/* ──────────────────────────────────────────────
   3. BRAND & MARQUEURS
   ────────────────────────────────────────────── */
.brand-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.55rem;
    letter-spacing: 2px;
    color: #fff;
    line-height: 1;
}

.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
    vertical-align: middle;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(255, 23, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 23, 68, 0);
    }
}

@keyframes blink {
    50% {
        opacity: 0.4;
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ──────────────────────────────────────────────
   4. STATUS BADGES
   ────────────────────────────────────────────── */
.status-badge {
    display: inline-block;
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.status-live {
    background: var(--danger);
    color: #fff;
}

.status-ft {
    background: #374151;
    color: #e5e7eb;
}

.status-scheduled {
    background: rgba(0, 200, 83, 0.15);
    color: var(--primary);
}

/* ──────────────────────────────────────────────
   5. BOUTONS BOOTSTRAP OVERRIDE
   ────────────────────────────────────────────── */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
}

.btn-success {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #0a0e1a;
}

.btn-success:hover,
.btn-success:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #0a0e1a;
}

.btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    background: transparent;
}

.btn-outline-light:hover,
.btn-outline-light.active {
    background: #fff;
    border-color: #fff;
    color: #0a0e1a;
}

.btn-outline-success {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}

.btn-outline-success:hover,
.btn-outline-success.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #0a0e1a;
}

.btn-outline-secondary {
    color: var(--text-muted);
    border-color: var(--border-strong);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-dark {
    background: var(--bg-3);
    border-color: var(--border);
    color: #fff;
}

/* ──────────────────────────────────────────────
   6. FORMULAIRES BOOTSTRAP OVERRIDE (dark)
   ────────────────────────────────────────────── */
.form-control,
.form-select {
    background-color: var(--bg-3) !important;
    border: 1px solid var(--border-strong) !important;
    color: var(--text) !important;
    border-radius: var(--radius-sm);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-3) !important;
    border-color: var(--primary) !important;
    color: var(--text) !important;
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.2) !important;
    outline: none;
}

.form-select {
    /*
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    */
}

.form-select option {
    background: var(--bg-3);
    color: var(--text);
}

/* ──────────────────────────────────────────────
   7. DROPDOWN BOOTSTRAP OVERRIDE (dark)
   ────────────────────────────────────────────── */
.dropdown-menu {
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 200px;
}

.dropdown-item {
    color: var(--text-muted);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(0, 200, 83, 0.1);
    color: var(--primary);
}

.dropdown-header {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0.75rem 0.25rem;
}

.dropdown-divider {
    border-color: var(--border);
    margin: 0.4rem 0;
}

/* ──────────────────────────────────────────────
   8. NAVBAR TOGGLER
   ────────────────────────────────────────────── */
.navbar-toggler {
    border: 1px solid var(--border-strong);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23e5e7eb' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ──────────────────────────────────────────────
   9. TABLE BOOTSTRAP OVERRIDE
   ────────────────────────────────────────────── */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
    color: var(--text);
    margin-bottom: 0;
}

/* Table blanche (calendrier) */
.fixtures-table {
    --bs-table-bg: #fff;
    --bs-table-color: #111827;
    --bs-table-hover-bg: #f0fdf4;
    color: #111827;
}

.fixtures-table thead th {
    background: #0a0e1a !important;
    color: #fff !important;
}

/* ──────────────────────────────────────────────
   10. PROGRESS BAR
   ────────────────────────────────────────────── */
.progress {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* ──────────────────────────────────────────────
   11. BADGES
   ────────────────────────────────────────────── */
.badge {
    font-weight: 700;
    padding: 0.4em 0.7em;
    border-radius: 6px;
    font-size: 0.72rem;
    letter-spacing: 0.3px;
}

.badge.bg-success {
    background-color: var(--primary) !important;
    color: #0a0e1a;
}

.badge.bg-danger {
    background-color: var(--danger) !important;
}

.badge.bg-warning {
    background-color: var(--warning) !important;
    color: #0a0e1a;
}

.badge.bg-dark {
    background-color: var(--bg-3) !important;
}

/* ──────────────────────────────────────────────
   12. MODAL BOOTSTRAP OVERRIDE (dark)
   ────────────────────────────────────────────── */
.modal-content {
    background: var(--bg-2);
    border: 1px solid var(--border-strong);
    color: var(--text);
    border-radius: var(--radius);
}

.modal-header {
    border-bottom: 1px solid var(--border);
}

.modal-footer {
    border-top: 1px solid var(--border);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ──────────────────────────────────────────────
   13. BACK TO TOP
   ────────────────────────────────────────────── */
#backTop {
    bottom: 25px;
    right: 25px;
    width: 46px;
    height: 46px;
    display: none;
    z-index: var(--z-backtop);
    border: none;
    box-shadow: 0 8px 20px rgba(0, 200, 83, 0.35);
}

#backTop.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ──────────────────────────────────────────────
   14. SCROLLBAR
   ────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--bg-3);
    border-radius: 5px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: #2a3550;
}

/* ──────────────────────────────────────────────
   15. ACCESSIBILITÉ
   ────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ──────────────────────────────────────────────
   16. UTILITAIRES GÉNÉRAUX
   ────────────────────────────────────────────── */
.rounded-4 {
    border-radius: var(--radius) !important;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.shadow {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.border-secondary {
    border-color: var(--border) !important;
}

/* Espacement cohérent */
.gap-1 {
    gap: 0.25rem !important;
}

.gap-2 {
    gap: 0.5rem !important;
}

.gap-3 {
    gap: 1rem !important;
}

.gap-4 {
    gap: 1.5rem !important;
}

.standing-team {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.standing-team__crest {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    object-fit: contain;
    flex: none;
}

.team-inline {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.team-mini-crest {
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    object-fit: contain;
    flex: none;
}