:root {
    --accent: #00a8ff;
    --bg-black: #0a0a0a;
    --sidebar-bg: #1a1a1a;
    --border-color: #333;
}

/* 1. STRUCTURE FIXE (Zéro mouvement de page) */
html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Bloque le scroll de la fenêtre entière */
    background-color: var(--bg-black);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.container-fluid {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 2. SIDEBAR INDÉPENDANTE */
#sidebarMenu {
    height: 100%;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    overflow-y: auto; /* La sidebar scrolle toute seule */
    overflow-x: hidden;
}

/* 3. ZONE CANVAS (L'ancre du projet) */
main {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Empêche le contenu de pousser les bords */
}

.canvas-wrapper {
    flex: 1; /* Prend tout l'espace restant */
    background: radial-gradient(#222, #000);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden; /* Garde le canvas bien au centre sans barres de scroll */
}

canvas {
    max-width: 100%;
    box-shadow: 0 0 50px rgba(0,0,0,0.9);
    border-radius: 4px;
    /* background-color: white; Fond du tapis de gym */
}

/* 4. ACCORDÉON & GALERIE */
.accordion-item {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.accordion-button {
    /* background-color: transparent !important; */
    color: #ccc !important;
    font-size: 0.9rem;
    padding: 1rem 0.75rem;
}

.accordion-button:not(.collapsed) {
    color: var(--accent) !important;
    background-color: #252525 !important;
    box-shadow: none;
}

.accordion-button::after {
    filter: invert(1); /* Flèche blanche */
    background-size: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 10px;
}

.fig-thumb {
    width: 100%;
    background: #2d2d2d;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.fig-thumb:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    background: #383838;
}
#secPlateaux .btn {
    font-size: 11px;
    border-color: #444;
    background: #222;
}

#secPlateaux .btn:hover {
    background: var(--accent);
    color: white;
}
/* 5. TIMELINE (En bas) */
.timeline-container {
    height: 110px;
    background: #141414;
    padding: 10px;
    border-top: 2px solid var(--border-color);
    overflow-x: auto; /* Scroll horizontal uniquement */
    overflow-y: hidden;
}

.timeline-vignettes {
    display: flex;
    gap: 12px;
}

.vignette {
    height: 75px;
    width: auto;
    border-radius: 4px;
    border: 2px solid #333;
    background: white;
    transition: border-color 0.3s;
}

.vignette:hover {
    border-color: var(--accent);
}

/* 6. LOGO & UTILS */
.logo { font-weight: 900; color: white; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

.badge { font-size: 0.8rem; }

/* --- AJUSTEMENTS SPÉCIFIQUES MOBILE --- */
@media (max-width: 768px) {
    /* 1. Force le bouton chevron en petite pastille ronde */
    #btnLibToggle {
        width: 35px !important;
        height: 45px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        left: 0;
        top: 20px;
        z-index: 2000;
        border-radius: 0 25px 25px 0 !important;
        transition: all 0.3s ease-in-out;
    }

    /* 2. La bibliothèque glisse PAR-DESSUS sans rien pousser */
    #sidebarMenu {
        position: absolute !important;
        left: 0;
        top: 0;
        bottom: 0;
        width: 260px !important; /* Largeur fixe pour mobile */
        z-index: 1060;
        background-color: #1a1a1a !important;
        box-shadow: 5px 0 15px rgba(0,0,0,0.8);
        transform: translateX(-100%); /* Caché par défaut */
        display: none; 
    }

    /* Quand Bootstrap ajoute la classe .show, on l'affiche */
    #sidebarMenu.show {
        display: flex !important;
        transform: translateX(0);
    }

    /* 3. Le bouton suit le menu quand il s'ouvre */
    #sidebarMenu.show ~ #btnLibToggle {
        left: 260px !important;
    }

    /* 4. Le canvas prend tout l'écran en fond */
    main {
        width: 100vw !important;
        height: 100%;
    }

    /* 5. On cache la barre d'outils par défaut pour libérer de la place */
    #actionToolbar {
        background: rgba(0,0,0,0.9) !important;
        position: absolute;
        width: 100%;
        top: 0;
        z-index: 1050;
    }
    /* Cache le bouton bleu quand la bibliothèque est déjà ouverte */
    #sidebarMenu.show ~ #btnLibToggle {
        display: none !important;
    }
    
    /* On remonte un peu le bouton chevron pour ne pas qu'il soit sur le canvas au repos */
    #btnLibToggle {
        top: 80px !important;
        opacity: 0.8;
    }
}