/* ========================================
   PANNEAU D'ADMINISTRATION - STYLES
   ======================================== */

/* Écran de connexion admin */
.admin-login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #27ae60 0%, #219150 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.admin-login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-login-header {
    text-align: center;
    margin-bottom: 30px;
}

.admin-login-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.admin-login-header p {
    color: #718096;
    font-size: 14px;
}

/* Container principal */
.admin-container {
    display: flex;
    min-height: 100vh;
    background-color: #f5f7fa;
}

/* ========================================
   SIDEBAR
   ======================================== */
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #27ae60 0%, #219150 100%);
    color: white;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-logo img {
    width: 40px;
    height: 40px;
}

.admin-logo-text {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

/* Menu */
.admin-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-menu-item {
    margin-bottom: 5px;
}

.admin-menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 15px;
    background: transparent;
    border: none;
    color: white;
    font-size: 15px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: left;
}

.admin-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.admin-menu-btn.active {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.admin-menu-btn i {
    width: 20px;
    text-align: center;
}

/* ========================================
   CONTENU PRINCIPAL
   ======================================== */
.admin-content {
    margin-left: 260px;
    flex: 1;
    padding: 30px;
}

/* Header */
.admin-header {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 28px;
    color: #2d3748;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-user-name {
    font-weight: 600;
    color: #2d3748;
}

.admin-logout-btn {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.admin-logout-btn:hover {
    background: #c53030;
    transform: translateY(-2px);
}

/* ========================================
   STATISTIQUES
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-icon.green {
    background: linear-gradient(135deg, #27ae60 0%, #219150 100%);
    color: white;
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.stat-icon.purple {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.stat-label {
    color: #718096;
    font-size: 14px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    font-family: 'Poppins', sans-serif;
}

/* ========================================
   SECTIONS
   ======================================== */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.admin-card h2 {
    font-size: 22px;
    color: #2d3748;
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}

/* ========================================
   TABLEAUX
   ======================================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: #f7fafc;
}

.admin-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table tbody tr:hover {
    background: #f7fafc;
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.success {
    background: #c6f6d5;
    color: #22543d;
}

.badge.warning {
    background: #feebc8;
    color: #7c2d12;
}

.badge.danger {
    background: #fed7d7;
    color: #742a2a;
}

.badge.info {
    background: #bee3f8;
    color: #2c5282;
}

/* ========================================
   BOUTONS
   ======================================== */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-primary {
    background: #27ae60;
    color: white;
}

.btn-primary:hover {
    background: #219150;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-warning {
    background: #ed8936;
    color: white;
}

.btn-warning:hover {
    background: #dd6b20;
}

/* ========================================
   FORMULAIRES
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* ========================================
   GRAPHIQUES
   ======================================== */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* ========================================
   DIVERS
   ======================================== */
.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .admin-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}
