/* style.css - Thème Sombre/Jaune OGO Group (Refonte Complète) */

/* =============================================
    1. VARIABLES DE THÈME (NOIR & JAUNE)
    ============================================= */
:root {
    --color-background-dark: #0d1117;    /* Fond de la page (Noir très foncé) */
    --color-background-light: #161b22;   /* Fond des boîtes et de la sidebar (Gris foncé) */
    --color-accent-primary: #FFC300;     /* Jaune OGO (Couleur d'accent) */
    --color-accent-hover: #e0ac00;       /* Jaune plus foncé pour le survol */
    --color-text-light: #ffffff;         /* Texte principal (Blanc) */
    --color-text-muted: #aaa;            /* Texte secondaire (Gris clair) */
    --color-border: #30363d;             /* Bordures sombres */
    --color-danger: #e34c56;             /* Rouge danger */
}

/* =============================================
    2. STYLES GÉNÉRAUX & TYPOGRAPHIE
    ============================================= */
* {
    box-sizing: border-box;
}

body {
    background-color: var(--color-background-dark);
    color: var(--color-text-light); /* Texte clair */
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    color: var(--color-text-light); /* Texte clair */
    font-weight: 600;
}
h1 { font-size: 2em; }
h2 { 
    color: var(--color-accent-primary); 
    font-size: 1.5em; 
    border-bottom: 1px solid var(--color-border); 
    padding-bottom: 5px; 
    margin-bottom: 15px; 
}

a {
    color: var(--color-accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* =============================================
    3. STRUCTURE DU DASHBOARD
    ============================================= */
.dashboard-layout {
    display: flex; /* <-- CLÉ DE LA MISE EN PAGE CÔTE À CÔTE */
    min-height: 100vh;
}

.dashboard-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* =============================================
    4. HEADER PRINCIPAL (CORRIGÉ)
    ============================================= */
.main-header {
    background-color: var(--color-background-light); /* Gris foncé */
    padding: 15px 30px;
    /* Ombre foncée pour thème sombre */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); 
    display: flex;
    /* CORRECTION ESSENTIELLE : Aligne l'heure à gauche et l'utilisateur à droite */
    justify-content: space-between; 
    align-items: center;
    border-bottom: 1px solid var(--color-border);
}

.user-info {
    font-size: 0.9em;
    color: var(--color-text-muted);
}

/* =============================================
    5. CONTENU PRINCIPAL
    ============================================= */
.dashboard-content {
    flex-grow: 1;
    padding: 30px;
}

.dashboard-header {
    margin-bottom: 30px;
    border-left: 5px solid var(--color-accent-primary); 
    padding-left: 15px;
}

.page-title {
    color: var(--color-text-light); /* Texte clair */
    font-size: 2em;
    margin: 0;
}

.content-box {
    background-color: var(--color-background-light); /* Gris foncé (les "fenêtres") */
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Ombre prononcée */
}

.action-link {
    color: var(--color-text-light);
    padding: 8px 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.action-link:hover {
    color: var(--color-accent-primary);
    text-decoration: none;
}
.action-link i {
    margin-right: 10px;
    color: var(--color-accent-primary);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
}

.alert-warning {
    background-color: rgba(255, 195, 0, 0.1);
    color: var(--color-accent-primary);
    border: 1px solid var(--color-accent-primary);
}

.alert-danger {
    background-color: rgba(227, 76, 86, 0.1);
    color: var(--color-danger);
    border: 1px solid var(--color-danger);
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

/* Boutons */
.btn-secondary {
    background-color: #30363d;
    color: var(--color-text-light);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #404851;
}

/* =============================================
    6. FOOTER (CORRIGÉ POUR 2 COLONNES)
    ============================================= */
.main-footer {
    background-color: var(--color-background-light); /* Gris foncé */
    color: var(--color-text-muted);
    padding: 20px 30px; 
    font-size: 0.8em;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
    text-align: center;
}

/* Centre le contenu du footer (le bloc de texte légal) */
.main-footer .container-fluid {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mise en page en grille pour les deux colonnes (Français / Anglais) */
.legal-notice-grid {
    display: flex;
    justify-content: space-around; /* Espacement entre les colonnes */
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    padding-top: 10px; /* Espace au dessus de la grille */
}

.legal-column {
    flex-basis: 48%; /* Chaque colonne prend presque la moitié */
    padding: 0 10px;
    border-right: 1px solid var(--color-border); /* Séparateur vertical discret */
}

/* Suppression du séparateur sur la colonne de droite */
.english-column {
    border-right: none;
}

.legal-title {
    color: var(--color-text-light); /* Titre en blanc pour le faire ressortir */
    font-size: 1em;
    font-weight: bold;
    margin-bottom: 5px !important;
}

.legal-text {
    margin-top: 5px; 
    margin-bottom: 5px; 
}

.legal-text.disclaimer {
    font-size: 0.7em; /* Rendre l'avertissement plus petit */
    line-height: 1.4;
    color: #888;
}

/* Gestion du responsive pour les petits écrans (tablettes et mobiles) */
@media (max-width: 768px) {
    .legal-notice-grid {
        flex-direction: column; /* Les colonnes se superposent */
        max-width: 400px;
    }
    .legal-column {
        flex-basis: 100%;
        border-right: none;
        border-bottom: 1px dashed var(--color-border); /* Ajout d'un séparateur horizontal */
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
    .english-column {
        border-bottom: none;
        margin-bottom: 0;
    }
}

/* =============================================
    7. STYLES DE TABLEAU (CORRECTION CONTRASTE)
    ============================================= */

/* Cible les en-têtes de tous les tableaux standard dans la zone d'administration */
.table th, 
.table thead th {
    /* Fond très sombre pour le contraste */
    background-color: var(--color-background-dark) !important; 
    
    /* Texte Jaune vif (la couleur d'accent) */
    color: var(--color-accent-primary) !important;
    
    font-weight: bold;
    border-color: var(--color-border); 
    border-bottom-width: 2px; /* Rendre la ligne de séparation plus visible */
}

/* Styles pour le corps du tableau pour maintenir le contraste sombre */
.table {
    border: 1px solid var(--color-border);
    background-color: var(--color-background-light); /* Le fond des boîtes de contenu */
    color: var(--color-text-light);
}

.table tbody tr:hover {
    background-color: #212833; /* Un gris très légèrement plus clair au survol */
}

/* S'assurer que les données (<td>) sont bien en blanc */
.table td {
    color: var(--color-text-light);
    border-top: 1px solid var(--color-border);
}