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

/* Navigation */
header nav ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
    display: flex;
    background: #34495e;
    border-radius: 5px;
    overflow: hidden;
    flex-wrap: wrap;
}

header nav ul li {
    flex: 1;
    min-width: 120px;
}

header nav ul li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 8px;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 0.9em;
}

header nav ul li a:hover {
    background: #2c3e50;
}

header nav ul li a.active {
    background: #3498db;
}

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

.stat-card {
    background: white;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    margin: 10px 0 0 0;
}

/* Formulaire admin */
.admin-form {
    background: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.admin-form h3 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.form-row label {
    width: 200px;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-row input, 
.form-row select, 
.form-row textarea {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

.form-row textarea {
    min-height: 100px;
}

/* Boutons actions */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Tableau admin */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

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

.table-responsive th, 
.table-responsive td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.table-responsive th {
    background-color: #2c3e50;
    color: white;
}

.table-responsive tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a {
    color: #3498db;
    padding: 8px 12px;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 2px;
}

.pagination a.active {
    background-color: #3498db;
    color: white;
    border: 1px solid #3498db;
}

.pagination a:hover:not(.active) {
    background-color: #ddd;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}
        
.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    border-radius: 5px;
    max-height: 80vh;
    overflow-y: auto;
}
        
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
        
.close:hover {
    color: black;
}

/* Images dans les formulaires */
.form-row img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    margin-top: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    header nav ul li {
        flex: 1 0 50%;
    }
    
    .form-row label {
        width: 100%;
    }
    
    .form-row input,
    .form-row select,
    .form-row textarea {
        width: 100%;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}