/* --- THEME GLOBAL 3DVARMAN --- */
:root {
    --varman-bg: rgba(15, 12, 10, 0.95);
    --varman-gold: #C5A059;
    --varman-font: 'Courier New', Courier, monospace;
    
    /* Couleurs Plan SVG */
    --col-g1: #5A6B64; --col-g2: #D95338; --col-g3: #39B54A;
    --col-g4: #C6923F; --col-g5: #A3C1AD; --col-g6: #D1D6A5;
    --col-g7: #F7D399; --col-g8: #A18262; --col-g9: #00A651;
}

body, html { margin: 0; padding: 0; overflow: hidden; background: #000; }

/* --- HEADER CENTRAL 2 LIGNES DYNAMIQUE --- */
#menu-bar {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    background: var(--varman-bg); border: 2px solid var(--varman-gold); border-top: none;
    border-radius: 0 0 10px 10px; padding: 10px 20px; display: flex; flex-direction: column;
    align-items: center; z-index: 1000; font-family: var(--varman-font);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); min-width: 320px;
}

.menu-top-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.menu-title { color: var(--varman-gold); font-weight: bold; font-size: 16px; white-space: nowrap; margin-right: 20px; }

#toggleMenuBtn {
    background: transparent; border: none; color: var(--varman-gold); cursor: pointer; 
    padding: 0; display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease;
}
#toggleMenuBtn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#toggleMenuBtn.flipped { transform: rotate(180deg); }

.menu-bottom-row { 
    display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 15px; 
}
.menu-bottom-row.hidden { display: none; }

.varman-icon-btn {
    background: rgba(197, 160, 89, 0.1); border: 1px solid var(--varman-gold); color: var(--varman-gold);
    width: 38px; height: 38px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.2s; font-family: sans-serif; font-weight: bold; font-size: 18px;
}
.varman-icon-btn:hover, .varman-icon-btn.active { background: var(--varman-gold); color: black; }
.varman-icon-btn svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; }
.varman-icon-btn.settings-btn svg { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- BARRE DE QUALITÉ DROPDOWN --- */
#quality-dropdown {
    position: absolute; top: 110%; right: 0; background: var(--varman-bg); border: 2px solid var(--varman-gold);
    border-radius: 8px; padding: 10px; display: flex; gap: 8px; align-items: center; font-family: var(--varman-font);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); opacity: 1; transform: translateY(0); transition: all 0.2s ease;
    transform-origin: top right; z-index: 999;
}
#quality-dropdown.hidden { opacity: 0; transform: translateY(-15px); pointer-events: none; }
.q-btn { background: transparent; border: 1px solid #555; color: #aaa; padding: 6px 12px; border-radius: 12px; cursor: pointer; font-family: inherit; transition: 0.2s; font-size: 13px; font-weight: bold; }
.q-btn.active, .q-btn:hover { background: var(--varman-gold); color: black; border-color: var(--varman-gold); }

/* --- FENÊTRE DE ROTATION RÉTRACTABLE --- */
#rotation-wrapper { position: absolute; bottom: 20px; left: 0px; z-index: 100; display: flex; transition: left 0.3s ease; }
#rotation-window { background: var(--varman-bg); border: 2px solid var(--varman-gold); border-left: none; border-radius: 0 8px 8px 0; padding: 10px; display: flex; gap: 10px; }
.round-button { background: rgba(255,255,255,0.1); border: 1px solid var(--varman-gold); border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; color: var(--varman-gold); }
.round-button:hover { background: var(--varman-gold); color: black; }
.round-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#toggleRotationBtn { background: var(--varman-bg); border: 2px solid var(--varman-gold); border-left: none; color: var(--varman-gold); padding: 0 5px; border-radius: 0 8px 8px 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#toggleRotationBtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; transition: 0.3s; }
#openRotationBtn { position: fixed; bottom: 20px; left: 0; background: var(--varman-bg); border: 2px solid var(--varman-gold); border-left: none; color: var(--varman-gold); padding: 10px; border-radius: 0 8px 8px 0; cursor: pointer; z-index: 101; display: none; }
#openRotationBtn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }

/* --- MENU LATÉRAL --- */
#sidebar { position: absolute; top: 50%; left: 0px; transform: translateY(-50%); background: var(--varman-bg); padding: 20px; color: white; z-index: 10; min-width: 260px; font-family: var(--varman-font); transition: left 0.3s ease; border-right: 2px solid var(--varman-gold); border-top: 2px solid var(--varman-gold); border-bottom: 2px solid var(--varman-gold); border-radius: 0 8px 8px 0; box-shadow: 2px 0 15px rgba(0,0,0,0.5); }
#toggleSidebar { background: none; border: none; color: var(--varman-gold); cursor: pointer; padding: 0; margin-bottom: 15px; display: flex; align-items: center; }
#toggleSidebar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
#playAllButton { background: rgba(197, 160, 89, 0.1); border: 1px solid var(--varman-gold); color: var(--varman-gold); padding: 8px; border-radius: 6px; cursor: pointer; width: 100%; margin-bottom: 20px; font-family: inherit; font-weight: bold; transition: 0.2s; display: none; font-size: 13px;}
#playAllButton:hover { background: var(--varman-gold); color: black; }
#sidebar-poi-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
#sidebar-poi-list li { cursor: pointer; font-size: 13px; font-weight: bold; transition: color 0.2s; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
#sidebar-poi-list li:last-child { border-bottom: none; }
#sidebar-poi-list li:hover, #sidebar-poi-list li.active-tour { color: var(--varman-gold); }
#openSidebarButton { position: fixed; left: 0px; top: 50%; transform: translateY(-50%); background: var(--varman-bg); border: 2px solid var(--varman-gold); border-left: none; color: var(--varman-gold); padding: 12px; border-radius: 0 8px 8px 0; cursor: pointer; z-index: 10; display: none; }
#openSidebarButton svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }

/* --- FENÊTRES MODALES COMPLÈTES --- */
.varman-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; z-index: 3000; opacity: 1; transition: opacity 0.3s ease; }
.varman-modal-overlay.hidden { opacity: 0; pointer-events: none; }
.varman-modal-content { background: var(--varman-bg); border: 2px solid var(--varman-gold); border-radius: 12px; display: flex; flex-direction: column; align-items: center; width: 90vw; max-width: 1000px; max-height: 90vh; font-family: var(--varman-font); color: white; box-shadow: 0 10px 40px rgba(0,0,0,0.8); overflow: hidden; position: relative; }
.varman-modal-content.photo-modal { padding: 30px; }
.modal-close-btn { position: absolute; top: 15px; right: 15px; background: transparent; border: none; color: var(--varman-gold); font-size: 28px; cursor: pointer; transition: 0.2s; z-index: 10; }
.modal-close-btn:hover { color: white; transform: scale(1.1); }

.photo-img { width: 100%; height: auto; max-height: 65vh; object-fit: contain; background: #050505; border-bottom: 1px solid rgba(197, 160, 89, 0.3); }
.photo-text { padding: 20px; text-align: center; width: 100%; }
.photo-text h2 { color: var(--varman-gold); margin: 0 0 10px 0; font-size: 22px; }
.photo-text p { margin: 0; font-size: 14px; color: #ddd; }

/* --- AIDE VISUELLE --- */
.help-grid { display: flex; justify-content: center; align-items: flex-end; gap: 50px; padding: 60px 40px; flex-wrap: wrap; background: #050505; width: 100%; }
.help-item { display: flex; flex-direction: column; align-items: center; gap: 20px; color: white; font-family: sans-serif; }
.kbd-group { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.kbd-row { display: flex; gap: 6px; }
.kbd-key { border: 2px solid white; border-radius: 6px; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 18px; }
.help-label { font-size: 16px; color: var(--varman-gold); text-align: center; line-height: 1.4; }

.help-mouse { width: 40px; height: 60px; border: 2px solid white; border-radius: 20px; position: relative; background: transparent; }
.help-mouse-line { position: absolute; top: 25px; left: 0; width: 100%; height: 2px; background: white; }
.help-mouse-split { position: absolute; top: 0; left: 19px; width: 2px; height: 25px; background: white; }
.wheel-gold::after { content: ''; position: absolute; top: 10px; left: 16px; width: 6px; height: 14px; background: var(--varman-gold); border-radius: 3px; border: 1px solid #000; z-index: 2; }
.mouse-l-click { position: absolute; top: 0; left: 0; width: 19px; height: 25px; background: var(--varman-gold); border-top-left-radius: 20px; z-index: 1; }
.mouse-r-click { position: absolute; top: 0; right: 0; width: 19px; height: 25px; background: var(--varman-gold); border-top-right-radius: 20px; z-index: 1; }
.help-arrows { position: absolute; width: 80px; height: 100px; top: -20px; left: -20px; pointer-events: none; }

.help-feature-list { display: flex; flex-direction: column; gap: 15px; padding: 20px 40px; width: 100%; background: #0a0a0a; border-top: 1px solid var(--varman-gold); }
.help-feature-item { display: flex; align-items: center; gap: 15px; color: #ddd; font-family: var(--varman-font); font-size: 14px; }
.help-feature-icon { width: 30px; height: 30px; fill: var(--varman-gold); flex-shrink: 0; }

/* --- MINI-MAP MODAL --- */
.minimap-wrapper { position: relative; width: 100%; max-width: 1000px; margin: 0 auto; background: var(--varman-cream); }
.minimap-img { display: block; width: 100%; height: auto; border-radius: 0 0 12px 12px; }
.minimap-svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.map-region { fill: rgba(255,255,255,0.0); stroke: transparent; stroke-width: 10; cursor: pointer; pointer-events: all; transition: 0.2s; }
.map-region[data-id="1"]:hover { fill: rgba(90, 107, 100, 0.5); stroke: var(--col-g1); }
.map-region[data-id="2"]:hover { fill: rgba(219, 83, 56, 0.5); stroke: var(--col-g2); }
.map-region[data-id="3"]:hover { fill: rgba(57, 181, 74, 0.5); stroke: var(--col-g3); }
.map-region[data-id="4"]:hover { fill: rgba(198, 146, 63, 0.5); stroke: var(--col-g4); }
.map-region[data-id="5"]:hover { fill: rgba(163, 193, 173, 0.5); stroke: var(--col-g5); }
.map-region[data-id="6"]:hover { fill: rgba(209, 214, 165, 0.5); stroke: var(--col-g6); }
.map-region[data-id="7"]:hover { fill: rgba(247, 211, 153, 0.5); stroke: var(--col-g7); }
.map-region[data-id="8"]:hover { fill: rgba(161, 130, 98, 0.5); stroke: var(--col-g8); }
.map-region[data-id="9"]:hover { fill: rgba(0, 166, 81, 0.3); stroke: var(--col-g9); }
.map-region.current-location { fill: rgba(197, 160, 89, 0.4) !important; stroke: var(--varman-gold) !important; stroke-width: 8; animation: pulseMap 2s infinite; }
@keyframes pulseMap { 0% { stroke-opacity: 1; } 50% { stroke-opacity: 0.3; } 100% { stroke-opacity: 1; } }

#MyLoader { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: var(--varman-bg); border: 1px solid var(--varman-gold); color: var(--varman-gold); padding: 8px 15px; border-radius: 8px; z-index: 4000; display: flex; align-items: center; gap: 12px; font-family: var(--varman-font); font-size: 13px; font-weight: bold; box-shadow: 0 4px 15px rgba(0,0,0,0.5); }
.loader-spinner { width: 16px; height: 16px; border: 2px solid var(--varman-gold); border-top: 2px solid transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }