/* ==========================================================================
   FICHIER : style_global.css (Version Finale 2026 - Station Chrislac)
   ========================================================================== */

/* --- CONFIGURATION & VARIABLES --- */
:root {
    --dash-gap: 12px;
    --card-bg: #ffffff;
    --text-main: #333;
    --accent-blue: #2c6faa;
    --accent-dark: #1e3c72;
    --bleu-octon: #2a5298;
    --bg-body: #eef2f5;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-soft: 0 4px 12px rgba(30, 60, 114, 0.15);
}

/* --- RESET & BASE --- */
html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    padding: 0;
    background: var(--bg-body);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.9rem;
    color: #000;
    line-height: 1.5;
    overflow-x: hidden;
}

/* --- BARRES DE DÉFILEMENT --- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-blue) #ffffff;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 10px; }

/* --- NAVIGATION (Sticky & Centrée) --- */
.nav-menu {
    display: flex;
    justify-content: center; /* Centre les liens horizontalement */
    align-items: center; 
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Le conteneur de liens reste compact autour de son contenu */
.nav-links-container {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap; /* Empêche le menu de passer sur deux lignes */
}

/* On supprime les anciennes références à meteo-live et aux équilibreurs */
.nav-menu::before, 
.meteo-live {
    display: none !important;
}

/* --- STYLE DES LIENS (Inchangé) --- */
.nav-menu a {
    background: #f8fafd;
    color: var(--accent-blue);
    padding: 8px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    border: 1.5px solid #e0e6ed;
    white-space: nowrap; /* Évite que le texte du bouton ne coupe */
}

/* On donne une largeur égale aux deux côtés pour que le centre soit... au centre ! */
.nav-side-empty, 
.meteo-top-right {
    flex: 1; /* Prend 1 part d'espace */
    display: flex;
    align-items: center;
}

.meteo-top-right {
    justify-content: flex-end; /* Pousse le contenu météo tout à droite */
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

/* Le bloc du milieu ne s'étire pas, il reste compact */
.nav-links-container {
    flex: 0 0 auto; 
    display: flex;
    gap: 6px;
}

.pression-nav {
    border-left: 1px solid #ccc;
    padding-left: 10px;
    margin-left: 5px;
    color: #555;
}

/* Adaptation Mobile */
@media (max-width: 1024px) {
    .nav-side-empty, .meteo-top-right { display: none; }
    .nav-menu { justify-content: center; }
}

/* --- TITRES & BANDEAUX --- */
.bandeau { 
    max-width: 600px; 
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--bleu-octon) 100%);
    color: #ffffff; 
    padding: 15px;
    border-radius: var(--radius-lg); 
    text-align: center; 
    font-size: 1.2rem;
    font-weight: bold;
    margin: 20px auto; 
    box-shadow: var(--shadow-soft);
}

h1, .titre_template { 
    color: #A82511; 
    text-align: center; 
    margin: 20px 0; 
    font-size: 1.8rem; 
    font-weight: bold; 
}

/* --- DASHBOARD MOBILE & CONTENEURS --- */
.container-graph {
    width: 95%;
    max-width: 1000px;
    margin: 20px auto;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* FOOTER  */

.footer {
    background: rgba(255, 255, 255, 0.98);
    text-align: center; /* Aligne tout le texte et les éléments inline */
    padding: 30px 10px;
    color: #333;
    border-top: 1px solid #ccc;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre les blocs (images, div) horizontalement */
    gap: 10px; /* Ajoute un espace régulier entre chaque ligne */
}

.footer p {
    margin: 5px 0; /* Réduit les marges par défaut des paragraphes */
}


.only-mobile { display: none !important; }

@media (max-width: 767px) {
    h1, .titre_template { font-size: 1.4rem; }
    .nav-menu { justify-content: flex-start; } /* Aligne à gauche pour le scroll */
    
    .only-mobile { display: grid !important; }

    .mobile-dashboard {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--dash-gap);
        padding: 12px;
        background: linear-gradient(135deg, var(--accent-blue), #4da3ff);
        margin: 10px;
        border-radius: var(--radius-md);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .mobile-dashboard > div {
        background: var(--card-bg);
        padding: 12px;
        border-radius: 12px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .stat-label { 
        font-size: 0.6rem; 
        text-transform: uppercase; 
        color: #666 !important;
        font-weight: bold; 
    }
    
    .stat-value { font-size: 1rem; font-weight: 800; color: var(--text-main); }
}

/* --- FORMULAIRES & BOUTONS ---