
/* Base styles and layout */
body {
    font-family: 'Roboto', Arial, sans-serif;
    text-align: center;
    margin: 0 20px;
    padding-top: 80px; /* Add padding for fixed header */
    background-color: #f4f6f8;
}

/* Header and layout containers */
.header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.header-container h1 {
    margin: 0;
    text-align: center;
}

.second-line-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    min-height: 40px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

.navigation {
    margin: 15px auto;
    max-width: 800px;
    text-align: left;
}

.nav-link {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 15px;
}

.nav-link:hover {
    text-decoration: underline;
}

/* Layout containers */
.layout-container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 20px auto;
    gap: 20px;
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    gap: 15px;
}

.selections-wrapper {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
}

#selections-wrapper {
    width: 100%;
    max-width: 400px;
}

/* Form elements */
label {
    font-size: 14px;
    margin-right: 10px;
    color: #343a40;
}

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

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

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: 0;
}

.form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

#scopeSelect, #departementSelect, #metricSelect {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin: 8px 0;
    background-color: #fff;
    box-sizing: border-box;
}

#communeInput {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin: 8px 0;
    background-color: #fff;
    box-sizing: border-box;
}

#lieuxSelect {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin: 8px 0;
    background-color: #fff;
    box-sizing: border-box;
}

#mapMetricSelect {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    margin-bottom: 10px;
}



.error-container {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.error-message h3 {
    color: #721c24;
    margin: 0 0 10px 0;
}

.error-message p {
    color: #721c24;
    margin: 0 0 15px 0;
}

.retry-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.retry-btn:hover {
    background-color: #c82333;
}

/* Responsive breakpoints */
@media (min-width: 768px) {
    .layout-container {
        flex-direction: row;
        justify-content: space-between;
    }

    #selections-wrapper {
        width: 30%;
    }

    #mapContainer {
        width: 65%;
    }
}

@media (max-width: 768px) {
    .second-line-container {
        flex-direction: column;
        gap: 10px;
    }

    .filter-container {
        flex-direction: column;
        align-items: center;
    }

    .selections-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .container {
        padding: 10px;
    }

    #scopeSelect, #departementSelect, #metricSelect, #communeInput, #lieuxSelect {
        width: 100%;
        max-width: 100%;
        font-size: 13px;
        padding: 6px;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .score-table {
        min-width: 0;
        width: 100%;
    }

    .chart-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
