/* Reset et layout plein écran */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
body { display: flex; flex-direction: column; }

/* Header */
#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    background: #1a1a2e;
    color: #eee;
    height: 36px;
    z-index: 1000;
}
#header h1 { font-size: 16px; font-weight: 600; }
#run-select {
    background: #16213e;
    color: #eee;
    border: 1px solid #555;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 3px;
}

/* Carte */
#map {
    flex: 1;
    z-index: 1;
    cursor: crosshair;
}
#map.loading,
#map.loading .leaflet-container,
#map.loading .leaflet-interactive,
#map.loading .leaflet-grab {
    cursor: wait !important;
}

/* Labels isobares */
.isobar-label {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 10px;
    font-weight: 600;
    color: #333;
    text-shadow: 1px 1px 2px white, -1px -1px 2px white;
}

/* Spinner de chargement */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Contrôles bas */
#controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    background: #1a1a2e;
    color: #eee;
    height: 40px;
    z-index: 1000;
}

#slider-container {
    display: flex;
    align-items: center;
    gap: 6px;
}
#slider-container button {
    background: #16213e;
    color: #eee;
    border: 1px solid #555;
    padding: 2px 8px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
}
#hour-slider { width: 500px; cursor: pointer; }
#hour-label { font-size: 13px; font-weight: 600; min-width: 220px; }

#param-selector {
    display: flex;
    gap: 4px;
}
.param-btn {
    background: #16213e;
    color: #aaa;
    border: 1px solid #555;
    padding: 4px 12px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}
.param-btn.active {
    background: #0f3460;
    color: #fff;
    border-color: #4da6ff;
}

/* Panneau émagramme */
#sounding-panel {
    position: absolute;
    top: 40px;
    right: 10px;
    width: 480px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    z-index: 2000;
    padding: 8px;
}
#sounding-panel.hidden { display: none; }
#sounding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
#sounding-title { font-size: 13px; font-weight: 600; }
#sounding-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}
#sounding-info {
    font-size: 11px;
    color: #555;
    margin-bottom: 4px;
}
#skewt { width: 100%; height: 400px; }
