/* ============================================================
   1. STRUCTURE GLOBALE ET RESPONSIVE
   ============================================================ */

body { 
    color: black; 
    background: rgb(37, 8, 186); 
    font-family: 'trebuchet ms', sans-serif; 
    margin: 0;
    padding: 0;
} 

#toute_la_page { 
    width: 95%;          
    max-width: 1400px;   
    margin: 20px auto; 
    background: #FFF; 
    box-shadow: 0px 0px 25px rgba(0,0,0,0.5);
    border-radius: 15px;
    overflow: hidden;
    min-height: 100vh;
} 

/* Conteneur pour aligner le Menu et le Contenu Principal */
.main-content-flex {
    display: flex;
    flex-direction: row; 
    align-items: flex-start;
    padding: 25px;
    gap: 30px;
}

/* Adaptation pour écrans mobiles (Le menu passe au-dessus) */
@media screen and (max-width: 1024px) {
    .main-content-flex {
        flex-direction: column;
    }
    #sidebar_container {
        width: 100% !important;
    }
    .zoom.colonne {
        grid-template-columns: 1fr !important; /* 1 seule icône par ligne sur mobile */
    }
}

/* ============================================================
   2. BANNIÈRE ET HEADER
   ============================================================ */

header {
    position: relative;
    width: 100%;
}

header img { 
    width: 100% !important; 
    height: auto; 
    display: block;
} 

/* Bouton déconnexion en haut à droite */
header p a { 
    text-decoration: none; 
    font-weight: bold;
}

/* ============================================================
   3. TABLEAU DE BORD (DASHBOARD)
   ============================================================ */

.dashboard-stats { 
    display: flex; 
    flex-wrap: wrap;
    gap: 20px; 
    padding: 20px 25px; 
    justify-content: space-around;
    background: #f0f4ff;
    border-bottom: 1px solid #6495ed;
} 

.stat-card { 
    background: white; 
    border-left: 6px solid #2508ba; 
    padding: 15px; 
    border-radius: 10px; 
    flex: 1;
    min-width: 200px; /* Réduit un peu pour que les 4 tiennent bien côte à côte */
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    text-align: center; 
}


.stat-card h4 { margin: 0; color: #555; font-size: 0.9em; text-transform: uppercase; letter-spacing: 1px; }
.stat-card p { margin: 10px 0 0; font-size: 1.8em; font-weight: bold; color: #2508ba; }

/* ============================================================
   4. NAVIGATION (SIDEBAR) ET ICONES (GRID)
   ============================================================ */

#sidebar_container {
    width: 280px;
    flex-shrink: 0;
}

/* LA GRILLE D'ICÔNES (Correction des décalages) */
.zoom.colonne {
    flex: 1;
    display: grid !important; 
    grid-template-columns: repeat(2, 1fr); /* 2 colonnes strictes */
    gap: 25px; 
    margin: 0;
    padding: 0;
}

.colonne div.icon-item { 
    float: none !important; /* Supprime l'ancien float qui créait le décalage */
    margin: 0 !important;
    width: 100% !important; 
    height: 280px; 
    background: #f8fbff; 
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #e0eaff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
} 

.zoom div img { 
    max-width: 90%;
    height: auto;
    -webkit-transition: .3s ease-in-out; 
    transition: .3s ease-in-out; 
} 

.zoom div:hover img { 
    -webkit-transform: scale(1.1); 
    transform: scale(1.1); 
} 

/* ============================================================
   5. STYLES FORMULAIRES ET ÉLÉMENTS INTERNES CONSERVÉS
   ============================================================ */

form { background-color:#e5eeff; padding:15px; border-radius: 10px; } 
fieldset { border: 1px solid #C0C0C0 ; padding:10px; margin-bottom:15px; border-radius: 8px; } 
legend { font-weight:bold; color:blue; padding: 0 10px; } 

table { 
    border-width:1px; border-style:solid; border-color:black; 
    border-collapse:collapse; margin: 20px auto; width: 95%; text-align: center;
} 
th { background-color:#FFEBCD; padding: 12px; border: 1px solid #000; }
td { background-color:#F8F8FF; padding: 10px; border: 1px solid #000; }

input[type=submit], input[type=reset] { 
    padding: 8px 20px;
    border-radius: 50px;
    background-color: #FFF;
    border: 2px solid blue;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

input[type=submit]:hover { background-color: blue; color: white; }

/* ============================================================
   6. FOOTER (D'ORIGINE)
   ============================================================ */

footer { 
    margin-top: 30px;
}
