:root {
    --blue-900: #042C53;
    --blue-800: #0C447C;
    --blue-700: #185FA5;
    --blue-500: #378ADD;
    --gray-900: #2C2C2A;
    --gray-700: #5F5E5A;
    --gray-400: #888780;
    --gray-200: #B4B2A9;
    --gray-100: #D3D1C7;
    --gray-50: #F1EFE8;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
}

/* LOGIN */
#login-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LAYOUT */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: var(--blue-900);
    color: white;
    padding: 20px;
}

.sidebar h2 {
    margin-bottom: 30px;
}

.sidebar a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin: 10px 0;
}

.sidebar a:hover,
.sidebar a.active {
    color: white;
}

/* MAIN */
.main {
    flex: 1;
    padding: 20px;
}

/* TOPBAR */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.top-btn {
    background: #2563eb;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
}

/* CARD */
.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

/* TABLE GLOBAL */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

/* BADGE GLOBAL */
.badge {
    background: #e0e7ff;
    color: #3730a3;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
}

/* FORM GLOBAL (réutilisable) */
.form-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.form-card {
    width: 100%;
    max-width: 700px;
    background: white;
    padding: 30px;
    border-radius: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 10px;
}

/* ACTIONS FORM */
.form-actions {
    display: flex;
    gap: 10px;
}

.save-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
}

.cancel-btn {
    background: #eee;
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
}


.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card { background: white; padding: 24px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
  .card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--gray-400); margin-bottom: 8px; }
  .card p  { font-size: 36px; font-weight: 700; color: var(--blue-900); }
  .card small { font-size: 12px; color: #e53e3e; font-weight: 600; }
  .logout { font-size: 13px; color: #ccc; text-decoration: none; }
  .logout:hover { color: white; }




/* RESPONSIVE ADMIN */
@media (max-width: 992px) {
    .admin-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 16px 20px;
    }

    .sidebar h2 {
        margin-bottom: 16px;
        text-align: center;
    }

    .sidebar nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
    }

    .sidebar a {
        margin: 0;
    }

    .main {
        width: 100%;
        padding: 20px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* MOBILE SMALL */
@media (max-width: 640px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

    .sidebar nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .topbar {
        text-align: center;
        align-items: center;
    }
}