/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    text-decoration: none;
    list-style: none;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f8;
    color: #222;
}

/* LAYOUT */
.layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: #00792e;
    color: #fff;
    display: flex;
    flex-direction: column;
}

.sidebar__logo {
    background: #fff;
    color: #00792e;
    padding: 20px;
    font-weight: bold;
    text-align: center;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 12px;
}

.sidebar__nav a {
    color: #fff;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.3s;
}

.sidebar__nav a:hover,
.sidebar__nav a.active {
    background: rgba(0,0,0,0.25);
}

.sidebar__nav a.logout {
    margin-top: auto;
    background: #b30000;
}
form { display:flex; flex-direction: column; gap: 15px; }
        input, textarea, select, button { padding: 10px; border: 1px solid #ddd; border-radius: 5px; }
        button { background: #028b40; color: #fff; font-weight: bold; cursor: pointer; transition: background 0.3s; }
        button:hover { background: #014b22; color:#fff; }
        h1 { text-align: center; border: 2px dashed #00ff73; padding: 10px; color: #003317; }
        .error { color: red; text-align: center; }
        .success { color: green; text-align: center; }
/* MAIN */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.header {
    background: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.header input {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.header__right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-logout {
    text-decoration: none;
    background: #00792e;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
}

/* CONTENT */
.content {
    padding: 25px;
}

.content h1 {
    margin-bottom: 20px;
}

/* STATS */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.stat h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.stat p {
    font-size: 28px;
    font-weight: bold;
}

/* CARDS */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

/* GRID */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* TABLE */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

thead {
    background: #00792e;
    color: #fff;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

tbody tr:hover {
    background: #f2f2f2;
}

button { padding: 10px; background: #028b40; color: #fff; border: none; border-radius: 5px;font-weight: bold; cursor: pointer; transition: background 0.3s; }
button:hover { background: #014b22; color:#fff; }

/* Sidebar normale */
.sidebar {
    width: 220px;
    transition: transform 0.3s ease;
}
 .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        display: none;
        z-index: 900;
    }

    /* Show classes */
    .sidebar.show {
        left: 0;
    }

    .overlay.show {
        display: block;
    }

    /* Hamburger button */
    .hamburger {
        font-size: 1.5em;
        background: none;
        border: none;
        color: #333;
        cursor: pointer;
        z-index: 1100;
        display: none;
    }
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 220px;
        height: 100%;
        background: #00792e;
        transform: translateX(-100%); /* cachée hors écran */
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .sidebar.show {
        transform: translateX(0); /* visible */
        z-index: 1100;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 900;
    }
    .hamburger {
        display: block;
    }

    .overlay.show {
        display: block;
    }
}
