body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #eef2f7; /* Light blue-gray background */
    margin: 0;
    padding: 20px;
    line-height: 1.6;
    color: #333;
}

.form-container {
    background: #ffffff;
    padding: 30px;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* Softer, more pronounced shadow */
    max-width: 1000px; /* Increased max-width for side-by-side layout */
    box-sizing: border-box;
}

h1 {
    text-align: center;
    color: #2c3e50; /* Darker, more professional heading color */
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 600;
}

.sections-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px; /* Increased space between sections */
    margin-bottom: 20px;
}

.form-section {
    flex: 1;
    min-width: 320px; /* Adjusted min-width for better responsiveness */
    padding: 25px;
    border: 1px solid #e0e6ed; /* Lighter border */
    border-radius: 8px;
    background: #fdfdfd;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Subtle shadow for sections */
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .sections-container {
        flex-direction: column; /* Stack sections on smaller screens */
    }
    .form-section {
        min-width: unset; /* Remove min-width constraint */
        width: 100%; /* Take full width */
    }
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 1.05em;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #cdd4da; /* Lighter border */
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="number"]:focus,
input[type="text"]:focus,
select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
}

input[type="submit"] {
    background-color: #28a745; /* Green submit button */
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    width: auto;
    margin-right: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

input[type="submit"]:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.reset-btn {
    background-color: #dc3545; /* Red reset button */
    color: white;
    padding: 14px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    width: auto;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.reset-btn:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.note-info {
    font-size: 0.85em;
    color: #6a7f8e; /* Softer grey for info text */
    margin-top: 5px;
    padding-left: 5px;
}

.section-title {
    border-bottom: 2px solid #007bff; /* Blue underline for titles */
    padding-bottom: 10px;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 1.6em;
    font-weight: 600;
}

.formule-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9f7fe; /* Light blue background for formula info */
    border-left: 5px solid #007bff; /* Blue left border */
    border-radius: 6px;
    font-size: 0.95em;
    color: #333;
}

.formule-info p {
    margin: 0;
}

#formule_calcul {
    font-family: 'Courier New', Courier, monospace;
    color: #0056b3; /* Darker blue for formula text */
    font-weight: bold;
}

#filiere_error {
    color: #dc3545; /* Red for error messages */
    background-color: #f8d7da; /* Light red background */
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
    font-weight: 500;
}

/* General link styling (if any) */
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}
