// ===========================
// STYLES GLOBAUX RESPONSIVE
// ===========================

// Configuration de base responsive
html {
    font-size: 16px;
    
    @include respond-below('md') {
        font-size: 14px;
    }
    
    @include respond-below('sm') {
        font-size: 13px;
    }
}

// Container responsive
.container-fluid {
    padding-left: $spacing-md;
    padding-right: $spacing-md;
    
    @include respond-below('md') {
        padding-left: $spacing-sm;
        padding-right: $spacing-sm;
    }
}

// Classes utilitaires pour l'espacement responsive
.p-responsive {
    padding: $spacing-lg;
    
    @include respond-below('md') {
        padding: $spacing-md;
    }
    
    @include respond-below('sm') {
        padding: $spacing-sm;
    }
}

.m-responsive {
    margin: $spacing-lg;
    
    @include respond-below('md') {
        margin: $spacing-md;
    }
    
    @include respond-below('sm') {
        margin: $spacing-sm;
    }
}

.ng-body {
    background: $white-1;
    // overflow-x: hidden; // Commenté pour permettre le scroll horizontal dans les tableaux

    &.pop-in, &.pop-element, &.pop-report {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        overflow: hidden;
    }
}

.ng-header {
    &.pop-in {
        z-index: 1005;
    }
}

.ng-app {
    display: flex;
    height: 100%;
}

app-home-agile, 
app-login {
    width: 100%;
}

app-prospects, app-projects, app-depots-agile, app-finances-agile, app-risques, app-reportings-agile, app-autres-agile {
    position: relative;
    background: #e4e9f7;
    transition: all 0.5s ease;
    display: block;
    z-index: 900;
    overflow: hidden; // Réactivé pour empêcher le scroll sur les composants
    min-height: 100vh; // Hauteur minimale au lieu de fixe
    
    // Desktop: sidebar ouverte
    @include respond-to('md') {
        // left: 277px;
        // width: calc(100% - 277px);
    }
    
    // Mobile: sidebar fermée par défaut
    @include respond-below('md') {
        left: 0;
        width: 100%;
        z-index: 100;
    }
}

// Sidebar fermée sur desktop
.ng-layout.close ~ app-prospects, 
.ng-layout.close ~ app-projects,
.ng-layout.close ~ app-depots-agile,
.ng-layout.close ~ app-finances-agile,
.ng-layout.close ~ app-risques,
.ng-layout.close ~ app-reportings-agile,
.ng-layout.close ~ app-autres-agile {
    @include respond-to('md') {
        left: 78px;
        width: calc(100% - 78px);
    }
    
    @include respond-below('md') {
        left: 0;
        width: 100%;
    }
}