/* FlyCase Live — Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ── Cesium Container ── */

#cesiumContainer {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Masquer les contrôles Cesium par défaut */
.cesium-viewer-toolbar,
.cesium-viewer-animationContainer,
.cesium-viewer-timelineContainer,
.cesium-viewer-fullscreenContainer,
.cesium-viewer-infoBoxContainer,
.cesium-viewer-selectionIndicatorContainer,
.cesium-viewer-geocoderContainer,
.cesium-viewer-bottom,
.cesium-credit-logoContainer,
.cesium-credit-textContainer {
    display: none !important;
}

/* ── Glass Panel (glassmorphism) ── */

.glass-panel {
    position: fixed;
    background: rgba(10, 10, 20, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(100, 200, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* ── Flight Info Panel (haut gauche) ── */

#flightInfoPanel {
    top: 20px;
    left: 20px;
    min-width: 240px;
    max-width: 280px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(100, 200, 255, 0.1);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00e676;
    box-shadow: 0 0 8px #00e676;
    animation: pulse-glow 2s infinite;
}

.status-dot.ground {
    background: #ff9800;
    box-shadow: 0 0 8px #ff9800;
}

.status-dot.ended {
    background: #9e9e9e;
    box-shadow: none;
    animation: none;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#flightStatus {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00e676;
}

#flightStatus.ground { color: #ff9800; }
#flightStatus.ended { color: #9e9e9e; }

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    font-weight: 600;
    color: #00e0ff;
    font-variant-numeric: tabular-nums;
}

.info-separator {
    height: 1px;
    background: rgba(100, 200, 255, 0.1);
    margin: 4px 0;
}

/* ── GPX Button ── */

.gpx-button {
    display: block;
    margin-top: 16px;
    padding: 10px;
    text-align: center;
    background: rgba(0, 224, 255, 0.15);
    border: 1px solid rgba(0, 224, 255, 0.3);
    border-radius: 10px;
    color: #00e0ff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.gpx-button:hover {
    background: rgba(0, 224, 255, 0.25);
    transform: translateY(-1px);
}

/* ── Instruments Panel (bas droite) ── */

#instrumentsPanel {
    bottom: 20px;
    right: 20px;
    padding: 12px;
}

.instruments-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.instrument {
    width: 120px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.instrument svg {
    width: 120px;
    height: 120px;
}

.instrument-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* ── Camera Controls (bas gauche) ── */

.camera-controls {
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 6px;
    padding: 8px;
}

.cam-btn {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(100, 200, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cam-btn:hover {
    background: rgba(0, 224, 255, 0.15);
    border-color: rgba(0, 224, 255, 0.4);
}

.cam-btn.active {
    background: rgba(0, 224, 255, 0.2);
    border-color: rgba(0, 224, 255, 0.6);
    box-shadow: 0 0 10px rgba(0, 224, 255, 0.2);
}

/* ── Loading Screen ── */

#loadingScreen, #notFoundScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0f;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.loading-content h1 {
    font-size: 28px;
    font-weight: 700;
    color: #00e0ff;
    margin-bottom: 12px;
}

.loading-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 24px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 224, 255, 0.1);
    border-top-color: #00e0ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* ── Responsive ── */

@media (max-width: 768px) {
    #flightInfoPanel {
        top: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        min-width: 0;
        padding: 14px;
    }

    #instrumentsPanel {
        bottom: 10px;
        right: 10px;
        padding: 8px;
    }

    .instrument {
        width: 80px;
        height: 100px;
    }

    .instrument svg {
        width: 80px;
        height: 80px;
    }

    .camera-controls {
        bottom: 10px;
        left: 10px;
    }

    .cam-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .instruments-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4px;
    }

    .instrument {
        width: 65px;
        height: 85px;
    }

    .instrument svg {
        width: 65px;
        height: 65px;
    }
}
