﻿/* Variables CSS */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white-color: #ffffff;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Navigation */
.main-nav {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.nav-item {
    flex: 1;
    text-align: center;
}

.nav-link {
    display: block;
    padding: 1.5rem 2rem;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

    .nav-link:hover,
    .nav-link.active {
        background: var(--primary-color);
        color: var(--white-color);
        border-bottom-color: var(--secondary-color);
    }

/* Cartes statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #f5f5f5; /* blanc cassé */
    font-size: 0.9rem;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.6); /* rend visible sur fond clair */
}

/*.stat-label {
    color: var(--gray-color);
    font-size: 0.9rem;
}*/

/* Filtres */
.filter-section {
    background: var(--white-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.form-group {
    margin-bottom: 0;
}

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 500;
        color: var(--dark-color);
    }

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.3rem;
    font-size: 1rem;
    transition: var(--transition);
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

/* Boutons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.3rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white-color);
}

    .btn-primary:hover {
        background: #5a67d8;
        transform: translateY(-2px);
    }

.btn-secondary {
    background: var(--gray-color);
    color: var(--white-color);
}

    .btn-secondary:hover {
        background: #5a6268;
    }

/* Tableaux */
.table-container {
    background: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

    .data-table th,
    .data-table td {
        padding: 1rem;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
    }

    .data-table th {
        background: var(--light-color);
        font-weight: 600;
        position: sticky;
        top: 0;
        color: var(--dark-color);
    }

    .data-table tr:hover {
        background: var(--light-color);
    }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 1rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--white-color);
    cursor: pointer;
    border-radius: 0.3rem;
    transition: var(--transition);
}

    .page-btn:hover,
    .page-btn.active {
        background: var(--primary-color);
        color: var(--white-color);
        border-color: var(--primary-color);
    }

/* Badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.2rem;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.status-ouvert {
    background: #fff3cd;
    color: #856404;
}

.status-ferme {
    background: #d4edda;
    color: #155724;
}

.status-livre {
    background: #d1ecf1;
    color: #0c5460;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-link {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.8rem;
    }

        .data-table th,
        .data-table td {
            padding: 0.5rem;
        }
}

@media (max-width: 480px) {
    .stat-card {
        padding: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Utilitaires */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.hidden {
    display: none;
}

/* Graphiques */
.chart-container {
    background: var(--white-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Login spécifique */
.login-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.error-panel {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 1rem;
    border-radius: 0.3rem;
    margin-bottom: 1.5rem;
}

.dashboard-grids {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2 colonnes sur desktop */
    gap: 20px;
    margin-bottom: 20px;
}

/* Sur petits écrans, passer à une colonne */
@media screen and (max-width: 768px) {
    .dashboard-grids {
        grid-template-columns: 1fr; /* 1 colonne pour mobile */
    }
}