body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f5f5f5;
}

h1 {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    color: #555;
    margin-bottom: 20px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}


/* Layout principal - FORCER le flex en ligne */

.main-container {
    display: flex !important;
    flex-direction: row !important;
    gap: 30px;
    align-items: flex-start;
    max-width: 1600px;
    margin: 0 auto;
}

.charts-section {
    flex: 1 1 0%;
    min-width: 0;
}

.form-section {
    flex: 0 0 350px !important;
    width: 350px !important;
    min-width: 350px;
    max-width: 350px;
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}


/* En mode portrait, le formulaire passe en dessous */

@media (orientation: portrait) {
    .main-container {
        flex-direction: column !important;
    }

    .charts-section {
        max-width: 100%;
    }

    .form-section {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: auto;
        max-width: 100% !important;
        position: static;
    }
}


/* Sur très petits écrans, toujours en colonne */

@media (max-width: 768px) {
    .main-container {
        flex-direction: column !important;
    }

    .charts-section {
        max-width: 100%;
    }

    .form-section {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: auto;
        max-width: 100% !important;
        position: static;
    }
}


/* Styles pour les graphiques */

.chart-wrapper {
    width: 100%;
    margin: 20px 0;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 450px;
}

.chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
}

form {
    width: 100%;
}

label {
    display: block;
    margin-top: 15px;
    color: #333;
    font-weight: 500;
}

input[type="number"],
input[type="date"],
input[type="submit"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

input[type="number"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-weight: bold;
    margin-top: 25px;
    border: none;
    transition: background-color 0.3s;
}

input[type="submit"]:hover {
    background-color: #45a049;
}

input[type="submit"]:active {
    background-color: #3d8b40;
}


/* Notification Toast */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: #4CAF50;
    color: white;
}

.notification.error {
    background-color: #f44336;
    color: white;
}