/* ==========================================================================
   LMS CONSOLE PRO - MAIN CSS (main.css)
   Extracted from index.html to follow Rule 2 (Non-monolithic frontend)
   ========================================================================== */

/* 1. Global Shell & Body */
html,
body {
    height: 100% !important;
    overflow: hidden !important;
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #F1F5F9;
}

#app-shell {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
}

/* 2. Main content area flex chain */
#app-shell>main {
    flex: 1 1 0% !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
    min-height: 0 !important;
    min-width: 0 !important;
}

/* 3. Content-area : toujours overflow hidden, scroll géré par les enfants */
#content-area {
    flex: 1 1 0% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    min-height: 0 !important;
    min-width: 0 !important;
}

/* 4. Section View Management */
.view-section:not(.hidden) {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 0% !important;
    min-height: 0 !important;
    width: 100% !important;
    overflow-y: auto !important;
    align-items: stretch !important;
    padding: 1.5rem !important; /* Ajout du padding global supprimé par erreur */
}

/* 5. Table View Utility Classes
   Instead of hacking global IDs, we use specific classes for views
   that need an edge-to-edge spreadsheet-like UI. */

.table-view-section:not(.hidden) {
    padding: 0 !important;
    overflow: hidden !important;
}

.table-view-section:not(.hidden) > .table-view-card {
    flex: 1 1 0% !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
    height: 100% !important;
    border-radius: 0 !important;
}

/* 6. Utility Classes */
.shrink-0 {
    flex-shrink: 0 !important;
}

.flex-1 {
    flex: 1 1 0% !important;
}

.custom-scroll {
    scrollbar-width: thin;
    scrollbar-color: #E2E8F0 transparent;
}

.custom-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scroll::-webkit-scrollbar-thumb {
    background-color: #E2E8F0;
    border-radius: 20px;
}

/* 7. Specific View Fixes */
#view-map:not(.hidden) {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-height: 500px;
}

#view-map:not(.hidden) .glide-card-static {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}
