/*
 * virtual-tour-viewer.css
 * CSS externalisé depuis page-virtual-tour-viewer.php pour performance
 * Chargé via wp_enqueue_style dans functions.php
 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            overflow: hidden;
            background: #000;
        }

        #tour-viewer {
            width: 100vw;
            height: 100vh;
            position: relative;
        }

        #tour-viewer canvas {
            display: block;
            cursor: grab;
        }

        #tour-viewer canvas:active {
            cursor: grabbing;
        }

        /* Overlay de transition */
        #fade-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,1);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: 9998; /* En dessous du loading */
            pointer-events: none;
        }

        /* Loading */
        .loading {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.9);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 9999; /* Au-dessus du fade-overlay */
            color: #fff;
        }

        .loading > div {
            white-space: nowrap;
        }

        /* Header */
        .tour-header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            padding: 20px 30px;
            background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, transparent 100%);
            z-index: 100;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .tour-info {
            color: #fff;
        }

        .tour-info h1 {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 5px;
        }

        .tour-info p {
            font-size: 0.9rem;
            opacity: 0.8;
        }

        .tour-branding {
            display: flex;
            align-items: center;
            gap: 5px;
            color: #fff;
            font-size: 0.9rem;
            opacity: 0.7;
        }

        .tour-branding a {
            transition: all 0.3s ease;
            display: inline-block;
        }

        .tour-branding a:hover {
            transform: scale(1.05);
            opacity: 1;
            text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
        }

        .tour-branding img {
            height: 30px;
        }

        /* Scene title */
        #scene-title {
            position: fixed;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0,0,0,0.8);
            color: #fff;
            padding: 12px 24px;
            border-radius: 30px;
            font-size: 1.1rem;
            font-weight: 600;
            z-index: 100;
            backdrop-filter: blur(10px);
        }

        /* Minimap */
        .minimap {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: rgba(0,0,0,0.8);
            border-radius: 12px;
            padding: 15px;
            z-index: 100;
            backdrop-filter: blur(10px);
            max-width: 250px;
            transition: all 0.3s ease;
        }

        .minimap.collapsed {
            transform: translateX(calc(100% + 30px));
        }

        .minimap-toggle {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: rgba(0,0,0,0.8);
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            color: #fff;
            font-size: 1.5rem;
            cursor: pointer;
            z-index: 101;
            backdrop-filter: blur(10px);
            transition: all 0.3s ease;
            display: none;
        }

        .minimap-toggle:hover {
            background: rgba(0,0,0,0.95);
            transform: scale(1.1);
        }

        .minimap.collapsed + .minimap-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .minimap-title {
            color: #fff;
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            opacity: 0.7;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .minimap-close {
            background: none;
            border: none;
            color: #fff;
            cursor: pointer;
            font-size: 1.2rem;
            padding: 0;
            opacity: 0.7;
            transition: opacity 0.2s ease;
            line-height: 1;
        }

        .minimap-close:hover {
            opacity: 1;
        }

        .minimap-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .minimap-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 12px;
            background: rgba(255,255,255,0.1);
            border-radius: 8px;
            color: #fff;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 2px solid transparent;
        }

        .minimap-item span {
            word-break: break-word; /* Retour à la ligne pour les longs titres */
            line-height: 1.3;
        }

        .minimap-item:hover {
            background: rgba(255,255,255,0.2);
        }

        .minimap-item.active {
            background: rgba(255,255,255,0.3);
            border-color: #fff;
        }

        .minimap-item-icon {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #fff;
            flex-shrink: 0; /* Empêcher l'étirement du rond */
            min-width: 8px; /* Garantir la taille minimale */
            min-height: 8px;
        }

        .minimap-item.active .minimap-item-icon {
            background: #4CAF50;
            box-shadow: 0 0 10px #4CAF50;
        }

        /* Controls hint */
        .controls-hint {
            position: fixed;
            bottom: 30px;
            left: 30px;
            background: rgba(0,0,0,0.8);
            color: #fff;
            padding: 15px 20px;
            border-radius: 12px;
            font-size: 0.85rem;
            z-index: 100;
            backdrop-filter: blur(10px);
            opacity: 0.7;
        }

        .controls-hint div {
            margin-bottom: 5px;
        }

        .controls-hint div:last-child {
            margin-bottom: 0;
        }

        /* Loading */
        .loading {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #fff;
            font-size: 1.2rem;
            z-index: 200;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 4px solid rgba(255,255,255,0.3);
            border-top-color: #fff;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 15px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        @media (max-width: 768px) {
            .tour-header {
                padding: 15px 20px;
            }

            .tour-info h1 {
                font-size: 1.2rem;
            }

            .tour-branding {
                flex-direction: column;
                align-items: flex-end;
                gap: 0;
                line-height: 1.1;
                font-size: 0.75rem;
                opacity: 0.6;
            }

            .tour-branding span,
            .tour-branding a {
                display: block;
            }

            .minimap {
                bottom: 20px;
                right: 15px;
                max-width: 180px;
                padding: 10px;
                max-height: 60vh;
                overflow-y: auto;
            }

            .minimap-toggle {
                bottom: 20px;
                right: 15px;
                width: 45px;
                height: 45px;
                font-size: 1.2rem;
            }

            .minimap-title {
                font-size: 0.75rem;
            }

            .controls-hint {
                display: none;
            }

            #scene-title {
                bottom: 20px;
                left: 15px;
                transform: none;
                font-size: 0.9rem;
                padding: 8px 15px;
                max-width: calc(100% - 210px);
            }
        }
