.button-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    color: #fff;
    gap: 10px;
    margin-bottom: 15px;
}

.action-button {
    display: flex;
    background-color: #0e5ce2;
    border: 1px solid #99b9f9;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    text-align: center;
    min-width: 160px;
    /* Responsiveness */
    flex-grow: 1;
    justify-content: center;
    max-width: 200px;
}

@media (max-width: 768px) {
    .action-button {
        min-width: 120px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .action-button {
        min-width: 100%;
        max-width: none;
    }
}

.action-button:hover {
    background-color: #86b1fc;
}

.file-list {
    border: 1px solid #ccc;
    min-height: 400px;
    width: 100%;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .file-list {
        min-height: 300px;
    }
}

.file-item {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    color: red;
}

.file-item.highlighted {
    background-color: #0078d7;
    color: white;
}

.file-item-selected {
    background-color: #0078d7;
    color: white;
}

.hidden {
    display: none;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.main-button {
    background-color: #27AE60;
    color: white;
    border: none;
    padding: 10px;
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    width: 150px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .main-button {
        width: 100%;
    }
}

.main-button:hover {
    background-color: #2ECC71;
}

.dropdown-container {
    position: relative;
    display: inline-block;
}

@media (max-width: 480px) {
    .dropdown-container {
        width: 100%;
    }
}

.aut-button {
    background-color: #99c2ff;
    color: black;
    border: none;
    padding: 10px;
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    width: 185px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .aut-button {
        width: 100%;
    }
}

.aut-button:hover {
    background-color: #4d94ff;
}

.dropdown-button {
    background-color: #99c2ff;
    color: black;
    border: none;
    padding: 10px;
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    width: 170px;
    height: 40px;
    cursor: pointer;
}

@media (max-width: 480px) {
    .dropdown-button {
        width: 100%;
    }
}

.dropdown-button:hover {
    background-color: #4d94ff;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #cce0ff;
    min-width: 140px;
    border: 1px solid #0000FF;
    border-radius: 5px;
    z-index: 1;
    padding: 5px;
}

@media (max-width: 480px) {
    .dropdown-content {
        width: 100%;
        position: relative;
        box-sizing: border-box;
    }
}

.dropdown-container:hover .dropdown-content {
    display: block;
}

.sub-button {
    background-color: #99c2ff;
    color: white;
    border: none;
    padding: 8px;
    margin: 2px 0px;
    border-radius: 3px;
    text-align: left;
    width: 100%;
    cursor: pointer;
}

.sub-button:hover {
    background-color: #2980B9;
}

.database-label {
    display: flex;
    align-items: center;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .database-label {
        margin-left: 5px;
        font-size: 0.9rem;
    }
}

.data-table {
    width: 100%;
    background-color: white;
    border: 1px solid #BDC3C7;
    border-radius: 5px;
    height: 600px !important;
    margin-top: 10px;
    overflow: auto;
}

@media (max-width: 768px) {
    .data-table {
        height: 400px !important;
    }
}

.data-table th {
    background-color: #2C3E50;
    color: white;
    padding: 5px;
    border: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 300px;
    border-radius: 5px;
}

@media (max-width: 480px) {
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}

.modal-buttons {
    margin-top: 15px;
    text-align: right;
}

/* Style pour le modal de sélection de colonnes */
#column-selection-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

#column-selection-modal .modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 400px;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    #column-selection-modal .modal-content {
        width: 80%;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    #column-selection-modal .modal-content {
        width: 90%;
        margin: 5% auto;
        padding: 15px;
    }
}

#column-selection-modal .close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#column-selection-modal .close-modal:hover,
#column-selection-modal .close-modal:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#column-selection-modal h2 {
    color: #2C3E50;
    margin-bottom: 15px;
    text-align: center;
}

#column-selection-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

@media (max-width: 480px) {
    #column-selection-list {
        grid-template-columns: 1fr;
    }
}

#column-selection-list div {
    display: flex;
    align-items: center;
    background-color: #f1f1f1;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

#column-selection-list div:hover {
    background-color: #e0e0e0;
}

#column-selection-list input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

#column-selection-list label {
    flex-grow: 1;
    cursor: pointer;
    color: #333;
}

#confirm-column-selection {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #27AE60;
    color: white;
    border: none;
    border-radius: 5px;
    margin-top: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#confirm-column-selection:hover {
    background-color: #2ECC71;
}

/* Style pour le modal des résultats */
#results-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

#results-modal .modal-content {
    background-color: #f8f9fa;
    margin: 5% auto;
    padding: 25px;
    border: none;
    border-radius: 10px;
    width: 70%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: modalopen 0.3s;
}

@media (max-width: 768px) {
    #results-modal .modal-content {
        width: 85%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    #results-modal .modal-content {
        width: 95%;
        padding: 15px;
        margin: 10% auto;
    }
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-50px)}
    to {opacity: 1; transform: translateY(0)}
}

#results-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

#results-modal .modal-title {
    color: #2C3E50;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

@media (max-width: 480px) {
    #results-modal .modal-title {
        font-size: 1.2rem;
    }
}

#results-modal .close-results {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

#results-modal .close-results:hover {
    color: #333;
}

#results-modal .modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

@media (max-width: 768px) {
    #results-modal .modal-body {
        max-height: 50vh;
    }
}

/* Amélioration du style de sélection des colonnes */
#column-selection-modal .modal-content {
    width: 50%;
    max-width: 600px;
}

@media (max-width: 768px) {
    #column-selection-modal .modal-content {
        width: 80%;
    }
}

#column-selection-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.column-selector-group {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

@media (max-width: 480px) {
    .column-selector-group {
        padding: 10px;
    }
}

.column-selector-group h4 {
    margin-top: 0;
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e9ecef;
}

@media (max-width: 480px) {
    .column-selector-group h4 {
        font-size: 1rem;
    }
}

.column-selector-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: white;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.column-selector-group select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Style des résultats */
.test-result {
    background-color: white;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

@media (max-width: 480px) {
    .test-result {
        padding: 10px;
    }
}

.test-result table {
    width: 100%;
    border-collapse: collapse;
}

.test-result th {
    background-color: #2C3E50;
    color: white;
    padding: 10px;
    text-align: left;
}

.test-result td {
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
}

@media (max-width: 480px) {
    .test-result th,
    .test-result td {
        padding: 8px 5px;
        font-size: 0.9rem;
    }
}

.test-result tr:last-child td {
    border-bottom: none;
}

/* Boutons */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

.btn {
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Styles pour les modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .modal-content {
        width: 90%;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.modal-body {
    padding: 15px 0;
}

.modal-footer {
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: right;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

#loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 2000;
}

@media (max-width: 480px) {
    #loading-indicator {
        padding: 20px;
        width: 80%;
    }
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .form-control {
        font-size: 16px; /* Better for mobile input */
    }
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    overflow-x: auto;
    display: block;
}

@media (min-width: 769px) {
    .result-table {
        display: table;
    }
}

.result-table th, .result-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

@media (max-width: 480px) {
    .result-table th, .result-table td {
        padding: 6px;
        font-size: 0.9rem;
    }
}

.result-table th {
    background-color: #f5f5f5;
}

.result-item {
    padding: 10px;
    margin: 5px 0;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.result-item strong {
    margin-right: 10px;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

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

.description {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

/* Base CSS Responsiveness */
html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}


/* Container for app layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
}

/* Typography responsiveness */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
}

@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
}

/* Viewport meta tag */
/* Add this in your HTML head:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
*/

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .modal-buttons {
        flex-direction: column;
    }
}

.close-btn {
    cursor: pointer;
    font-size: 24px;
    float: right;
}

.close-btn:hover {
    color: #666;
}