/*
Theme Name: Gabon Report
Description: Dashboard Intelligence - Version Finale Stable & Responsive
Version: 5.1
Author: Custom Dashboard Team
*/

/* --- VARIABLES --- */
:root {
    --bg-dark: #0b0f19;
    --card-bg: #161b28;
    --border: #242b3d;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --header-h: 70px;
    --sidebar-w: 360px; /* Largeur de la barre Eco Gabon */
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    padding-top: var(--header-h); /* Empêche le contenu de passer sous le header */
    overflow-x: hidden;
}

/* --- HEADER FIXE --- */
.site-header {
    height: var(--header-h);
    background: rgba(11, 15, 25, 0.98);
    border-bottom: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
}

.header-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.logo a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
}

/* NAVIGATION DESKTOP */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav ul a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    transition: 0.3s;
}

.main-nav ul a:hover {
    color: var(--accent-blue);
}

/* HAMBURGER (Caché sur Desktop) */
.menu-toggle {
    display: none; /* IMPORTANT : On ne l'affiche pas sur ordinateur */
    cursor: pointer;
    color: #fff;
}

.menu-toggle span {
    font-size: 32px;
}

/* --- LAYOUT DU DASHBOARD --- */
.main-wrapper {
    display: flex;
    width: 100%;
}

/* Contenu Central */
.dashboard-content {
    flex: 1;
    padding: 40px;
    margin-right: var(--sidebar-w); /* Laisse la place pour la sidebar fixe à droite */
}

/* Sidebar Droite (Fixe sur Desktop) */
.sidebar-right {
    width: var(--sidebar-w);
    position: fixed;
    right: 0;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    background: rgba(11, 15, 25, 0.5);
    border-left: 1px solid var(--border);
    padding: 30px;
    overflow-y: auto;
    z-index: 100;
}

/* --- COMPOSANTS --- */
.ticker-bar {
    background: #111827;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px 25px;
    margin-bottom: 30px;
    display: flex;
    gap: 40px;
    font-size: 14px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    height: 100%;
}

.card-wide { grid-column: span 2; }

.badge {
    background: var(--accent-green);
    color: #000;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
}

.law-title { font-size: 26px; margin: 15px 0; color: #fff; line-height: 1.3; }
.law-desc { color: var(--text-dim); line-height: 1.7; margin-bottom: 20px; }

/* Bouton Lire Plus */
.card-action { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 10px; }
.read-more-link {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Progress Bar */
.progress-container { background: #2d3748; height: 10px; border-radius: 10px; margin: 15px 0; }
.progress-fill { background: var(--accent-blue); height: 100%; border-radius: 10px; }

/* Bannière Eco Gabon */
.widget-card img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* ============================================================
   RESPONSIVE - TABLETTES ET PETITS ÉCRANS (< 1100px)
   ============================================================ */

@media (max-width: 1100px) {
    /* On désactive le positionnement fixe de la sidebar pour qu'elle passe dessous */
    .dashboard-content {
        margin-right: 0 !important; /* Le contenu prend toute la largeur */
        padding: 30px 20px;
    }

    .sidebar-right {
        position: static; /* Elle redevient un bloc normal qui suit le contenu */
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid var(--border);
        background: var(--bg-dark);
    }

    .main-wrapper {
        flex-direction: column;
    }

    .dashboard-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur tablette/mobile */
    }

    .card-wide { grid-column: span 1; }
}

/* ============================================================
   RESPONSIVE - MOBILES (< 768px)
   ============================================================ */

@media (max-width: 768px) {
    /* On affiche l'icône Hamburger seulement ici */
    .menu-toggle {
        display: block;
    }

    /* Le menu devient une liste verticale cachée */
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-h);
        left: 0;
        width: 100%;
        background: #0b0f19;
        border-bottom: 1px solid var(--border);
        padding: 20px;
    }

    /* Classe ajoutée par le JavaScript pour ouvrir le menu */
    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .ticker-bar {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .law-title { font-size: 20px; }
}