/* -------------------- RESET -------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* -------------------- BODY -------------------- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

/* -------------------- CONTAINER -------------------- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* -------------------- TITRE -------------------- */
h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2rem;
    text-align: center;
}

/* -------------------- BOUTONS -------------------- */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background: #667eea;
    color: white;
    margin-bottom: 20px;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-edit {
    background: #f59e0b;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-edit:hover {
    background: #d97706;
}

.btn-delete {
    background: #ef4444;
    color: white;
    padding: 6px 12px;
    font-size: 12px;
}

.btn-delete:hover {
    background: #dc2626;
}

/* -------------------- MODAL -------------------- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
    overflow-y: auto;
    padding: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 30px;
    border-radius: 10px;
    width: 95%;
    max-width: 700px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* -------------------- FERMETURE MODAL -------------------- */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #000;
}

/* -------------------- FORMULAIRE -------------------- */
#modalTitle {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #374151;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
}

/* -------------------- TABLEAU -------------------- */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

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

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

tbody tr {
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #f9fafb;
}

.no-data {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 40px !important;
}

/* -------------------- BADGES -------------------- */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-confirme {
    background: #d1fae5;
    color: #065f46;
}

.badge-attente {
    background: #fef3c7;
    color: #92400e;
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 10px 5px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px;
    }
}
