/* Styles spécifiques à l'interface d'administration */

/* Page de connexion */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--fruit-red), var(--fruit-orange));
}

.login-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--fruit-red);
    margin-bottom: 1rem;
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 1.1rem;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 4px solid #c62828;
}

/* Interface d'administration */
.admin-interface {
    min-height: 100vh;
    background: var(--light-bg);
}

.admin-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-logo i {
    font-size: 2rem;
    color: var(--fruit-red);
}

.admin-logo h1 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.admin-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.admin-nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: var(--light-pink);
    color: var(--fruit-red);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user span {
    color: var(--text-color);
    font-weight: 500;
}

/* Sections d'administration */
.admin-section {
    display: none;
    padding: 2rem;
}

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

.admin-section h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* Tableau de bord */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.stat-card:nth-child(1) .stat-icon {
    background: var(--fruit-red);
}

.stat-card:nth-child(2) .stat-icon {
    background: var(--fruit-orange);
}

.stat-card:nth-child(3) .stat-icon {
    background: var(--fruit-yellow);
}

.stat-card:nth-child(4) .stat-icon {
    background: var(--fruit-green);
}

.stat-content h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0;
}

.stat-content p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.dashboard-actions {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.dashboard-actions h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* En-têtes de section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.section-actions .search-box {
    position: relative;
}

.section-actions .search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.section-actions .search-box input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    width: 250px;
}

.section-actions select {
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    background: var(--white);
}

/* Tables d'administration */
.admin-table-container {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    background: var(--light-bg);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: var(--light-bg);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-en_attente {
    background: #fff3e0;
    color: #f57c00;
}

.status-approuvee {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-rejetee {
    background: #ffebee;
    color: #c62828;
}

/* Boutons d'action */
.action-buttons-table {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.btn-approve {
    background: var(--fruit-green);
    color: var(--white);
    border: none;
}

.btn-reject {
    background: var(--fruit-red);
    color: var(--white);
    border: none;
}

.btn-edit {
    background: var(--fruit-yellow);
    color: var(--white);
    border: none;
}

.btn-delete {
    background: #666;
    color: var(--white);
    border: none;
}

/* Statistiques détaillées */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.stats-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.stats-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.stat-item-name {
    font-weight: 500;
    color: var(--text-color);
}

.stat-item-count {
    background: var(--fruit-orange);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Modal de confirmation */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.modal-body {
    margin-bottom: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .admin-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .section-actions .search-box input {
        width: 100%;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .admin-table-container {
        overflow-x: auto;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 2rem;
        margin: 1rem;
    }
    
    .admin-section {
        padding: 1rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}
