/**
 * Nom du fichier : admin-style.css
 * Description : Styles pour l'interface d'administration.
 * Auteur : Sylvain SCATTOLINI
 * Date : 2025-02-20
 * Version : 1.1
 */

 html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

 body {
    font-family: Arial, sans-serif;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
    color: #333;
    min-height: 100%;
}

h1 {
    margin:0;
}

/*  **************************************** content 
main {
    display: flex;
    flex-direction: row;
    flex: 1;
    background: #fff;
}
*/

/* ---- CONTENEUR PRINCIPAL ---- */
main {
    flex: 1;
    margin-top: 60px; /* Même hauteur que le header */
    margin-bottom: 30px; /* Hauteur du footer */
    overflow-y: auto; /* Permettre le défilement du contenu */
    flex-direction: row;
    transition: margin-left 0.3s ease-in-out; /* Animation fluide */
}

/* ---- CONTENU PRINCIPAL ---- */
#content {
    flex-grow: 1;
    padding-left: 10px;
    transition: margin-left 0.8s ease-in-out; /* Animation du déplacement */
}

footer {
    background: #343a40;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    height: 30px;

    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/*  **************************************** header */
/* ---- HEADER ---- */
header {
    background-color: #007BFF;
    color: #fff;
    padding: 0px 0px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px; /* Assurer une hauteur constante */

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Assurer qu'il reste au-dessus du contenu */

}

p {
    margin: 0;
}

/* ---- MENU HAMBURGER À GAUCHE ---- */
.hamburger-menu {
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    width: 140px; /* Même largeur que le logo */
    text-align: left;
    padding: 10px;
}

/* ---- TITRE CENTRÉ ---- */
header h1 {
    flex-grow: 1;
    text-align: center;
    margin: 0;
    font-size: 1.5rem;
}

/* ---- LOGO À DROITE ---- */
header .logo {
    height: 50px;
    width: 140px;
    background-color: #ffffff;
    mask-image: url('../img/logo.svg');
    -webkit-mask-image: url('../img/logo.svg');
    mask-repeat: no-repeat;
    -webkit-mask-repeat: no-repeat;
    mask-position: right;
    -webkit-mask-position: right;
}

/* ---- MENU LATERAL DÉCALÉ (SOUS LE HEADER) ---- */
nav#side-menu {
    position: fixed;
    left: 0;
    top: 60px; /* Décalé sous le header */
    width: 200px;
    height: calc(100vh - 60px); /* Ajuster la hauteur sous le header */
    background-color: #343a40;
    color: white;
    padding: 0px;
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%); /* Caché par défaut */
}

nav#side-menu ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

nav#side-menu li {
    margin-bottom: 5px;
}

nav#side-menu a {
    color: #ffffff;
    text-decoration: none;
    display: block;
    padding: 10px;
    transition: background 0.3s ease;
}

nav#side-menu a:hover {
    background: #ffc107;
}

/* ---- MENU OUVERT ---- */
nav#side-menu.active {
    transform: translateX(0);
}

/* ---- QUAND LE MENU EST OUVERT, LE CONTENU SE DECAL ---- */
main.menu-open #content {
    margin-left: 220px; /* Décale le contenu de la largeur du menu */
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.2rem;
    }
    .hamburger-menu {
        font-size: 1.8rem;
    }
}