:root {
    --primary-color: #465B76;
    --danger-color: #d32f2f;
    --success-color: #2e7d32;
    --text-color: #333;
    --background-color: #f5f5f5;
    --card-background: #fff;
    --border-radius: 8px;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.5;
}

.header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 1rem;
}

.header-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 1rem;
    min-height: 44px; /* Touch target minimum */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    font-size: 1rem;
    min-height: 44px; /* Touch target minimum */
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(70, 91, 118, 0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
    padding: 0.75rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
    font-size: 0.9rem;
}

th {
    background: #f8f9fa;
    font-weight: 500;
}

tr:hover td {
    background: #f8f9fa;
}

td .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

td .btn + .btn {
    margin-left: 0.5rem;
}

.menu-item {
    display: block;
    padding: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
}

.menu-item:hover {
    background: rgba(70, 91, 118, 0.1);
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    width: 95%;
    max-width: 500px;
    position: relative;
    animation: modalSlide 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Button group styles */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Section title improvements */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title h2 {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
}

/* Form improvements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

/* Icon styles */
.icon {
    display: inline-block;
    margin-right: 0.5rem;
}

/* Message styles */
.message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.message-success {
    background: var(--success-color);
    color: white;
}

.message-error {
    background: var(--danger-color);
    color: white;
}

/* Responsive Design */
/* Tablette et petits écrans */
@media (max-width: 1024px) {
    .container {
        padding: 1.5rem;
    }
    
    .header {
        padding: 0.75rem 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        max-width: 100%;
    }
    
    .header {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
    
    .header-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        margin-bottom: 0.5rem;
    }
    
    /* Tables responsives */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    .modal-content {
        width: 98%;
        margin: 2% auto;
        padding: 1rem;
        max-height: 95vh;
    }
    
    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .header {
        padding: 0.75rem;
    }
    
    .card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-height: 48px; /* Plus grand pour le touch */
    }
    
    input, select, textarea {
        padding: 0.6rem;
        font-size: 1rem; /* Éviter le zoom sur iOS */
        min-height: 48px;
    }
    
    table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.4rem 0.2rem;
        font-size: 0.75rem;
    }
    
    .modal-content {
        width: 99%;
        margin: 1% auto;
        padding: 0.75rem;
        border-radius: 4px;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
}
