/* ===================================================================
// ==    FEUILLE DE STYLE : style.css                             ==
// ===================================================================
// "Beautiful is better than ugly." */

/* --- Variables et Style Global --- */
:root {
    --primary-color: #007bff;
    --background-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --container-bg: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Conteneurs principaux --- */
header, main, footer {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    height: 50px;
}

h1, h2 {
    color: var(--text-color);
}

main > div {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 1rem;
}

footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9em;
    color: #6c757d;
}

/* --- Éléments de formulaire et boutons --- */
input[type="email"], input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

#logout-button {
    background-color: #dc3545;
}

#download-zip-button {
    background-color: #28a745;
}

/* --- Notifications et utilitaires --- */
.hidden {
    display: none !important;
}

#error-notification, #xml-error-notification {
    color: #dc3545;
    margin-top: 1rem;
}

/* --- Style de la table des résultats --- */
#results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

#results-table th, #results-table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

#results-table th {
    background-color: #f2f2f2;
    position: relative;
}

/* NOUVEAU : Styles pour le tri */
#results-table th[data-column] {
    cursor: pointer;
    user-select: none;
}

#results-table th[data-column]::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    margin-left: 10px;
    opacity: 0.3;
}

#results-table th.sort-asc::after {
    border-bottom: 5px solid var(--text-color);
    opacity: 1;
}

#results-table th.sort-desc::after {
    border-top: 5px solid var(--text-color);
    opacity: 1;
}

#total-sum {
    font-size: 1.1em;
    font-weight: bold;
    text-align: right;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}