/* Variables */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #f5f6fa;
    --text-color: #2c3e50;
    --border-color: #dcdde1;
    --error-color: #e74c3c;
    --success-color: #2ecc71;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Page de connexion */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--primary-color);
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.login-form button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-form button:hover {
    background-color: #2980b9;
}

.error-message {
    color: var(--error-color);
    margin-top: 1rem;
    text-align: center;
}

/* Navigation principale */
.main-nav {
    background: #fff;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
    border-bottom: 2px solid #3d6894;
    padding: 0;
}

.nav-header {
    display: flex;
    align-items: center;
    padding: 0.3rem 2.5rem 0.3rem 1.5rem;
    background: #fff url('../../assets/img/fond_entete.png') left center/cover no-repeat;
    min-height: 80px;
    border-bottom: 1px solid #e0e4ea;
    position: relative;
    z-index: 2;
}

.logo-container {
    margin-right: 1.2rem;
    display: flex;
    align-items: center;
}

.logo {
    height: 48px;
    width: auto;
    display: block;
}

.header-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nav-header h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.slogan {
    font-size: 0.95rem;
    color: #3498db;
    font-weight: 400;
    margin-top: 2px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-left: auto;
}

.user-info span {
    font-size: 1rem;
    color: #2c3e50;
    background: #f2f6fa;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-weight: 500;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9eef3;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    padding: 0;
    margin-left: 0.2rem;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(44,62,80,0.06);
    cursor: pointer;
    color: #2c3e50;
    outline: none;
    text-decoration: none;
}

.logout-btn svg {
    width: 20px;
    height: 20px;
    stroke: #2c3e50;
    display: block;
}

.logout-btn:hover, .logout-btn:focus {
    background: #e74c3c22;
    color: #e74c3c;
    box-shadow: 0 2px 8px rgba(231,76,60,0.08);
}

.logout-btn:hover svg, .logout-btn:focus svg {
    stroke: #e74c3c;
}

/* Barre de menu modules */
.nav-modules {
    display: flex;
    gap: 2rem;
    background: #4a75a0;
    padding: 0.3rem 2.5rem 0.3rem 1.5rem;
    min-height: 38px;
    position: relative;
    z-index: 3;
    
}

.module-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0rem 2rem;
    border-radius: 4px;
    transition: background 0.5s;
    line-height: 1.2;
    gap: 2rem;
}

.module-link:hover {
    background: #3498db;
    color: #fff;
}

/* Contenu principal */
.main-content {
    padding: 1rem;
    margin: 0 auto;
}

.welcome-message {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tableaux de données */
.data-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

.data-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Contrôles de recherche et tri */

/* Menu modules : aucun module disponible (blanc sur fond bleu foncé) */
.no-modules {
    color: #fff;
    text-align: center;
    font-weight: bold;
    padding: 1rem 0;
}

/* Sous-menu Gestion */
.gestion-dropdown {
    position: relative;
}
.gestion-link {
    cursor: pointer;
    font-weight: bold;
    color: #fff;
    padding: 0.7em 1.5em;
    border-radius: 4px 4px 0 0;
    background: #283593;
    transition: background 0.2s;
}
.gestion-link:hover {
    background: #3949ab;
}
.gestion-submenu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #1a237e;
    z-index: 1000;
    min-width: 220px;
    box-shadow: 0 2px 8px #0002;
    border-radius: 0 0 6px 6px;
    /*padding: 0.5em 0;*/
}
.gestion-dropdown:hover .gestion-submenu,
.gestion-link.active + .gestion-submenu {
    display: block;
}
.gestion-submenu a {
    display: block;
    color: #fff;
    padding: 0.7em 1.5em;
    text-decoration: none;
    transition: background 0.2s;
}
.gestion-submenu a:hover {
    background: #3949ab;
    color: #fff;
}
.table-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.sort-btn {
    padding: 0.75rem 1rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.sort-btn:hover {
    background-color: #2980b9;
}

/* Messages d'erreur */
.error {
    color: var(--error-color);
    padding: 1rem;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .table-controls {
        flex-direction: column;
    }

    .data-table {
        overflow-x: auto;
    }
}

/* --- Paramètres administrateur --- */
.settings-container {
    display: flex;
    min-height: 420px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.07);
    overflow: hidden;
    margin-top: 2rem;
}

.settings-sidebar {
    width: 240px;
    background: #f5f6fa;
    border-right: 1px solid #e0e4ea;
    padding: 2rem 0 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.settings-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.settings-sidebar li {
    padding: 1rem 2rem;
    cursor: pointer;
    color: #2c3e50;
    font-size: 1.08rem;
    border-left: 4px solid transparent;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.settings-sidebar li.active, .settings-sidebar li:hover {
    background: #e9eef3;
    border-left: 4px solid #3498db;
    color: #3498db;
    font-weight: 600;
}

.settings-content {
    flex: 1;
    padding: 2.5rem 2.5rem 2.5rem 2rem;
    background: #fff;
    min-width: 0;
}

.settings-content h2 {
    color: #2c3e50;
    font-size: 1.35rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.settings-content p {
    color: #444;
    font-size: 1.05rem;
}

@media (max-width: 900px) {
    .settings-container {
        flex-direction: column;
    }
    .settings-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e4ea;
        flex-direction: row;
        padding: 0;
    }
    .settings-sidebar li {
        padding: 1rem 1rem;
        border-left: none;
        border-bottom: 4px solid transparent;
    }
    .settings-sidebar li.active, .settings-sidebar li:hover {
        border-left: none;
        border-bottom: 4px solid #3498db;
    }
    .settings-content {
        padding: 1.5rem 1rem;
    }
}

/* ============================================================================
   STYLES GLOBAUX POUR TABULATOR - EN-TÊTES DE COLONNES
   ============================================================================ */

/* Réduction de la taille du texte des en-têtes de colonnes pour tous les tableaux Tabulator */
.tabulator-header .tabulator-col .tabulator-col-content {
    font-size: 11px;
    font-weight: bold;
} 