:root {
    --primary-color: #0d47a1; /* Bleu foncé */
    --secondary-color: #1565c0; /* Bleu moyen */
    --light-blue: #e3f2fd; /* Bleu très clair */
    --accent-color: #ffab00; /* Jaune/Orange pour les accents */
    --text-color: #212121; /* Gris foncé pour le texte */
    --background-color: #f5f5f5; /* Gris clair pour le fond */
    --white: #ffffff;
    --danger-color: #d32f2f; /* Rouge pour les suppressions */
    --success-color: #388e3c; /* Vert pour les succès */
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* --- Styles Généraux --- */
body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-top: 0;
}

h2, h3 {
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
    margin-bottom: 25px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- Barre de Navigation --- */
nav {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
nav .logo {
    font-size: 1.5rem;
    font-weight: bold;
}
nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 20px;
}
nav a {
    color: var(--white);
    font-weight: 500;
}
nav a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* --- Boutons --- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-primary { background-color: var(--secondary-color); }
.btn-primary:hover { background-color: var(--primary-color); }

.btn-danger { background-color: var(--danger-color); }
.btn-danger:hover { background-color: #b71c1c; }

.btn-success { background-color: var(--success-color); }
.btn-success:hover { background-color: #2e7d32; }

.btn svg {
    width: 1em;
    height: 1em;
    margin-right: 8px;
    vertical-align: -0.125em;
    fill: currentColor;
}

.form-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(13, 71, 161, 0.2);
    outline: none;
}

/* --- Tableaux --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
th {
    background-color: var(--primary-color);
    color: var(--white);
}
tr:nth-child(even) {
    background-color: #f9f9f9;
}
tr:hover {
    background-color: var(--light-blue);
}
td.actions a {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 5px;
    color: var(--white);
    font-size: 0.9rem;
    text-decoration: none;
    margin-right: 5px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

td.actions a:hover {
    transform: scale(1.1);
    opacity: 0.9;
    text-decoration: none;
}

.actions .btn-success { background-color: var(--success-color); }
.actions .btn-danger { background-color: var(--danger-color); }


/* --- Messages d'alerte --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: 500;
}
.alert-danger {
    color: var(--danger-color);
    background-color: #ffcdd2;
    border: 1px solid var(--danger-color);
}
.alert-success {
    color: var(--success-color);
    background-color: #c8e6c9;
    border: 1px solid var(--success-color);
}

.badge-manager {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-color);
    background-color: var(--accent-color);
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
}

.stats-container {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    text-align: center;
}
.stat-card {
    flex: 1;
    padding: 20px;
    border-radius: 8px;
    background-color: #f1f1f1;
}
.stat-card h3 {
    margin-top: 0;
}
.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}
.stat-card .stat-highlight {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin: 0;
}

/* --- MEDIA QUERIES POUR LE RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
    }
    nav ul {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }
    nav ul li {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    nav ul li a {
        display: block;
        padding: 10px;
        background-color: var(--secondary-color);
        border-radius: 5px;
    }

    .stats-container {
        flex-direction: column;
    }

    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    tr { border: 1px solid #ccc; margin-bottom: 5px; }
    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }
    td:nth-of-type(1):before { content: "Nom"; }
    td:nth-of-type(2):before { content: "Prénom"; }
    td:nth-of-type(3):before { content: "Poste"; }
    td:nth-of-type(4):before { content: "N° Maillot"; }
    td:nth-of-type(5):before { content: "Compte"; }
    td:nth-of-type(6):before { content: "Actions"; }

    td.actions {
        text-align: right;
    }
}

