/* ============================================================================
   File: FPS.css - Styles pour le graphique FPS
   Desc: En français, dans l'architecture, je suis le module de styles FPS
   Version 1.0.1
   Copyright 2025 DNAvatar.org - Arnaud Maignan
   Licensed under Apache License 2.0 with Commons Clause. 
   See LICENSE_HEADER.txt for full terms.
   Date: [January 2025]
   Logs:
     - Initial creation: FPS chart styles
     - v1.0.1: Added width: 30px to collapsed state
   ============================================================================ */

.fps-display {
    /* Position absolue : ancré en bas de l'écran (layout.js) */
    position: fixed;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9); /* Fond noir */
    color: #fff;
    border-radius: 0 5px 5px 0; /* Arrondi à droite */
    width: 100%; /* Largeur fluide */
    max-width: 400px; /* Max width comme avant */
    height: 120px; /* Hauteur agrandie pour meilleure visibilité */
    padding: 5px;
    z-index: 100; /* Au-dessus du reste si besoin, mais pas trop haut */
    pointer-events: auto; /* Permettre les interactions pour le bouton */
    transition: height 0.3s ease;
    display: flex; /* Flexbox pour que le graphique prenne toute la hauteur */
    flex-direction: column;
    box-sizing: border-box; /* Inclure padding dans la hauteur */
    margin: 0; /* Pas de marges */
}

.fps-display.collapsed {
    height: 30px; /* Hauteur fixe pour le bouton uniquement */
    width: 30px;
    overflow: hidden;
}

.fps-toggle {
    position: absolute; /* Position absolue pour être au-dessus du graphique */
    top: 5px;
    left: 5px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Ne pas rétrécir */
}

.fps-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fps-display.collapsed .fps-toggle::before {
    content: '+'; /* Bouton open quand fermé */
}

.fps-display:not(.collapsed) .fps-toggle::before {
    content: '−'; /* Bouton close quand ouvert */
}

.fps-display.collapsed #fps-chart {
    display: none; /* Cacher le graphique quand fermé */
}

.fps-display:not(.collapsed) #fps-chart {
    display: block; /* Afficher le graphique quand ouvert */
    height: 100%; /* Prendre toute la hauteur disponible */
    flex: 1; /* Prendre tout l'espace disponible */
}

#fps-chart {
    width: 100%;
    height: 100%; /* Prendre toute la hauteur disponible */
    display: block; /* Par défaut, afficher le graphique */
    flex: 1; /* Prendre tout l'espace disponible dans le flex container */
}

