/* 1. VUE SMARTPHONE (Mode portrait, viewport < 724px, tests à 320px) */
body, html { margin: 0; padding: 0; width: 100%; height: 100%; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; overflow-x: hidden; overflow-y: auto; background-color: transparent; }

/* Bandeau identique au simulateur Avancement */
#banner {
    position: absolute; top: 0; left: 0; z-index: 9998;
    width: 100%; background-color: rgba(10, 20, 35, 0.75);
    backdrop-filter: blur(8px); padding: 10px 15px; box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5); text-align: center;
}
#main_title { font-size: 1.5rem; font-weight: 600; color: #FFF; margin: 0; }
#sub_title { font-size: 1rem; margin-top: 5px; color: #FFD700; margin-bottom: 0; }

/* Pied de page identique au simulateur Avancement */
#footer {
    position: absolute; bottom: 0; left: 0; z-index: 9998;
    width: 100%; height: 50px; box-sizing: border-box;
    background-color: rgba(10, 20, 35, 0.85); backdrop-filter: blur(5px);
    color: #AAA; display: flex; justify-content: center; align-items: center;
    font-size: 0.9rem; border-top: 1px solid rgba(255, 215, 0, 0.2);
}

/* Interface Utilisateur */
#ui-container { position: absolute; bottom: 60px; left: 0; width: 100%; padding: 10px; box-sizing: border-box; z-index: 9999; pointer-events: none; }

.panel { background: rgba(255, 255, 255, 0.95); padding: 15px; border-radius: 10px; box-shadow: 0 -4px 15px rgba(0,0,0,0.2); pointer-events: auto; transition: all 0.3s ease;}
.panel h2 { margin: 0 0 10px 0; font-size: 1.15rem; color: #333; text-align: center; }
.message-scan { text-align: center; color: #666; font-size: 0.9rem; margin: 0; }

.info-box { background-color: #f8f9fa; border-left: 4px solid #0078D7; padding: 10px 12px; margin-bottom: 15px; border-radius: 4px; }
.titre-info { margin: 0 0 3px 0; font-size: 0.8rem; color: #666; text-transform: uppercase; }
.valeur-info { margin: 0 0 10px 0; font-size: 1.05rem; font-weight: bold; color: #222; }
.valeur-info:last-of-type { margin-bottom: 5px; }
.type-vsepr { margin: 0; font-size: 0.9rem; color: #e65100; font-weight: bold; }

.controls { display: flex; align-items: center; background: #e9ecef; padding: 8px 10px; border-radius: 6px; }
.checkbox-container { display: flex; align-items: center; font-size: 0.85rem; cursor: pointer; color: #333; width: 100%; }
.checkbox-container input { width: 18px; height: 18px; margin-right: 10px; cursor: pointer; }

/* Bouton Flottant (Auto-rotation) positionné sous le banner */
.btn-floating { position: absolute; top: 90px; left: 15px; z-index: 10000; padding: 8px 12px; background: rgba(255, 255, 255, 0.95); border: 2px solid #0078D7; border-radius: 8px; font-size: 0.9rem; font-weight: bold; color: #0078D7; cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2); pointer-events: auto; display: flex; align-items: center; gap: 8px; transition: all 0.2s; }
.btn-floating:active { background: #0078D7; color: white; }

/* 2. VUE TABLETTE (Mode paysage, viewport entre 725px et 1024px, tests à 725px) */
@media screen and (min-width: 725px) and (max-width: 1024px) {
    body, html { overflow: hidden; }
    #banner { text-align: left; }
    #ui-container { bottom: auto; top: 80px; right: 0; left: auto; width: 280px; height: calc(100vh - 140px); display: flex; flex-direction: column; }
    .panel { max-height: 100%; overflow-y: auto; margin-top: 10px; box-shadow: -4px 4px 15px rgba(0,0,0,0.2); }
}

/* 3. VUE PC (Mode paysage, viewport > 1024px, tests à 1024px) */
@media screen and (min-width: 1025px) {
    body, html { overflow: hidden; }
    #banner { text-align: left; }
    #ui-container { bottom: auto; top: 80px; right: 0; left: auto; width: 320px; height: calc(100vh - 140px); }
    .panel { max-height: 100%; overflow: hidden; margin-top: 15px; box-shadow: -4px 4px 15px rgba(0,0,0,0.2); }
}