/* ===== GLOBAL ===== */
body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
}

/* ===== LOGIN PAGE ===== */
.login-body {
    background: linear-gradient(135deg, #FFF, #FFF);
    height: 100vh;
}

.login-container {
    height: 90vh;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    background: rgba(255,255,255,200);
    animation: fadeIn 0.6s ease-in-out;
}

.form-control {
    border-radius: 12px;
    padding: 12px;
}

.btn-login {
    border-radius: 12px;
    padding: 12px;
    transition: 0.3s;
}
.custom-input {
    height: 40px;
    margin: 0 auto; /* centre l'input */
}
.btn-login:hover {
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== DASHBOARD ===== */
.dashboard-body {
    background: #f4f6f9;
}




/* ===== SIDEBAR ===== */
.sidebar {
    height: 100vh;
    width: 250px;
    position: fixed;
    background: linear-gradient(180deg, #f30b0b, #f30b0b);
    color: white;
}

.sidebar a {
    display: block;
    padding: 14px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: 0.3s;
    font-weight: 500;
}

.sidebar a:hover,
.sidebar a.active {
    background: #0d6efd;
    color: white;
    border-left: 4px solid white;
}

.main-content {
    margin-left: 250px;
    padding: 30px;
}

/* ===== TOPBAR ===== */
.topbar {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
}

/* ===== STAT CARDS ===== */
.stat-card {
    border-radius: 15px;
    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 18px;

}
/* ===== INFO CARDS (STYLE IMAGE FOURNIE) ===== */
.info-card {
    color: white;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
}

.info-card h6 {
    opacity: 0.9;
}

.info-card h2 {
    font-size: 36px;
    font-weight: bold;
}

.info-card i {
    opacity: 0.4;
}

.info-card:hover {
    transform: translateY(-5px);
}

.more-info {
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.9;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 10px;
    cursor: pointer;
}
/* ============================= */
/* RESPONSIVE DESIGN DASHBOARD */
/* ============================= */

/* ===== TABLETTE (max 992px) ===== */
@media (max-width: 992px) {

    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
        padding: 20px;
    }

    .info-card h2 {
        font-size: 22px;
    }
}


/* ===== PETITE TABLETTE (max 768px) ===== */
@media (max-width: 768px) {

    /* Sidebar devient cachée */
    .sidebar {
        position: fixed;
        left: -250px;
        width: 250px;
        height: 100%;
        transition: 0.3s;
        z-index: 999;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .info-card {
        padding: 20px;
    }

    .info-card h2 {
        font-size: 20px;
    }

    canvas {
        height: 250px !important;
    }
}


/* ===== MOBILE (max 576px) ===== */
@media (max-width: 576px) {

    .sidebar-header img {
        width: 50px;
    }

    .sidebar h5 {
        font-size: 16px;
    }

    .info-card {
        padding: 18px;
    }

    .info-card h6 {
        font-size: 14px;
    }

    .info-card h2 {
        font-size: 18px;
    }

    .more-info {
        font-size: 13px;
    }

    .topbar h5 {
        font-size: 16px;
    }

    .topbar small {
        font-size: 12px;
    }
}
/* ===== SIDEBAR MOBILE ===== */
@media (max-width: 991px) {

    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        width: 260px;
        height: 100%;
        transition: 0.3s ease;
        z-index: 1000;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0 !important;
    }
}

/* Overlay sombre */
.sidebar-overlay {
    display: none;
}

@media (max-width: 991px) {
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        z-index: 999;
        display: none;
    }

    .sidebar-overlay.active {
        display: block;
    }
}