﻿/* ==========================================================
   1. CONFIGURATION GÉNÉRALE & POLICES
   ========================================================== */
:root {
    --bg-gradient-start: #052767;
    --bg-gradient-end: #3a0647;
    --header-height: 70px; /* Taille moyenne de ton menu */
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    /* --- SUPPRESSION SCROLLBAR --- */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.page {
    flex-direction: column;
}

@media (max-width: 991.98px) {
    /* Force le conteneur de la sidebar à ne pas prendre d'espace quand le header est là */
    .sidebar-container {
        height: 0;
    }
}

@media (min-width: 992px) {
    .page {
        flex-direction: row;
    }
}

/* Chrome, Safari, Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none !important;
}

/* Correction globale pour les Bootstrap Icons */
.bi {
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
    font-style: normal;
}

/* Wrapper universel pour décaler le contenu sous le menu fixe */
.main-content-wrapper {
    padding-top: var(--header-height);
    min-height: 100vh;
}

/* ==========================================================
   2. CLASSES UTILITAIRES & ANIMATIONS
   ========================================================== */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cursor-pointer {
    cursor: pointer;
}

/* ==========================================================
   3. DASHBOARD & CARTES (KPI / STATS)
   ========================================================== */
.dashboard-wrapper {
    padding: 1rem;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }

.border-start-primary {
    border-left: 5px solid #0d6efd;
}

.border-start-success {
    border-left: 5px solid #198754;
}

.border-start-warning {
    border-left: 5px solid #ffc107;
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.bg-primary-soft {
    background-color: rgba(13, 110, 253, 0.1);
}

.bg-success-soft {
    background-color: rgba(25, 135, 84, 0.1);
}

.bg-warning-soft {
    background-color: rgba(255, 193, 7, 0.1);
}

/* ==========================================================
   4. HERO SECTION (Bandeau de bienvenue)
   ========================================================== */
.hero-card {
    background: linear-gradient(135deg, #052767 0%, #3a0647 100%);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(5, 39, 103, 0.2);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-bg-icon {
    position: absolute;
    right: -30px;
    bottom: -60px;
    font-size: 20rem;
    color: rgba(255, 255, 255, 0.04);
    transform: rotate(-15deg);
    pointer-events: none;
}

.glass-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

/* Style spécifique pour la mascotte Sporty */
.mobile-mascot {
    position: absolute;
    bottom: -5px;
    right: 10px;
    height: 125%;
    z-index: 3;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
    pointer-events: none;
}

/* ==========================================================
   5. CARTES D'ACTION
   ========================================================== */
.action-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

    .action-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }

/* ==========================================================
   6. GESTION DES ERREURS BLAZOR
   ========================================================== */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* ==========================================================
   7. OPTIMISATIONS MOBILE (MAUI / BLAZOR HYBRID)
   ========================================================== */

/* Annule les décalages générés par défaut pour l'encoche (notch) sur mobile */
.page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.top-row {
    padding-top: 0 !important;
}

#app {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Libère l'espace horizontal sur les petits écrans (téléphones) */
@media (max-width: 767.98px) {

    /* Écrase le padding énorme souvent mis sur la balise article/main */
    .content {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Permet aux conteneurs Bootstrap d'utiliser toute la largeur */
    .container, .container-fluid {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}
