/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 0;
    margin: 0;
}

/* En-tête et menu */
header {
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.menu {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.menu li {
    margin: 0.5rem;
}

.menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#titre-principal {
    text-align: center;
    margin: 1rem 0;
    font-size: 2.2rem;
}

/* Sections principales */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.section {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.section h2 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Boutons */
.btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.2s;
    margin: 0.5rem;
}

.btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Conteneurs flexibles */
.flex-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

.card {
    flex: 1;
    min-width: 300px;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    border-left: 4px solid #3498db;
}

/* Formulaire */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-group input {
    margin-right: 0.5rem;
}

/* Zones de résultat */
.resultat {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    min-height: 60px;
    max-height: 300px;
    overflow-y: auto;
}

/* Graphique */
.graphique-container {
    margin: 1.5rem 0;
    position: relative;
    height: 400px;
    width: 100%;
}

.controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Messages */
.message {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    text-align: center;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Pied de page */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #2c3e50;
    color: white;
    margin-top: 2rem;
}

#date-actuelle {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* Responsive */
@media (max-width: 768px) {
    .menu {
        flex-direction: column;
        align-items: center;
    }
    
    .flex-container {
        flex-direction: column;
    }
    
    .graphique-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 1rem;
    }
    
    .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .controls {
        flex-direction: column;
    }
}