/* ==========================================================================
   OMNI-GIS | Ultra-Premium Geospatial & Earth Telemetry HUD Design System
   ========================================================================== */

:root {
    --bg-space: #050814;
    --bg-panel: rgba(10, 16, 32, 0.85);
    --bg-card: rgba(15, 23, 42, 0.75);
    --cyan-hud: #00f3ff;
    --cyan-glow: rgba(0, 243, 255, 0.35);
    --pink-neon: #ff0055;
    --green-neon: #00ff88;
    --amber-neon: #ffb703;
    --purple-neon: #9d4edd;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-subtle: rgba(0, 243, 255, 0.2);
    --border-card: rgba(255, 255, 255, 0.08);
    --radius-lg: 18px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-space);
    overflow: hidden;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   CARTE & VIGNETTE
   ========================================================================== */
#map-container {
    height: calc(100vh - 58px - 38px);
    width: 100%;
    margin-top: 58px;
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
    background: #02040a;
}

#vignette {
    position: absolute;
    top: 58px;
    left: 0;
    width: 100%;
    height: calc(100% - 58px);
    pointer-events: none;
    background: radial-gradient(circle, rgba(5,8,20,0) 50%, rgba(5,8,20,0.6) 100%);
    z-index: 400;
}

/* ==========================================================================
   NAVBAR SUPÉRIEURE
   ========================================================================== */
#top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 58px;
    background: rgba(5, 8, 20, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    z-index: 2000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 0 4px;
}

.nav-center::-webkit-scrollbar {
    display: none;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav-btn {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--border-subtle);
    color: var(--cyan-hud);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    font-size: 1.1em;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: rgba(0, 243, 255, 0.22);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.nav-btn.active {
    background: rgba(255, 0, 85, 0.15);
    color: var(--pink-neon);
    border-color: var(--pink-neon);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

.brand-icon {
    font-size: 1.45em;
    color: var(--cyan-hud);
    filter: drop-shadow(0 0 8px var(--cyan-glow));
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
}

.brand-text h2 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.15;
    white-space: nowrap;
}

.brand-text h2 span {
    color: var(--cyan-hud);
    font-weight: 400;
}

.sub-brand {
    font-size: 0.65em;
    color: var(--text-secondary);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
    display: block;
    margin-top: 2px;
    line-height: 1.1;
}

/* Raccourcis Navbar */
.nav-quick-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    font-size: 0.8em;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-quick-btn i {
    color: var(--cyan-hud);
}

.nav-quick-btn:hover {
    background: rgba(0, 243, 255, 0.12);
    border-color: var(--cyan-hud);
    box-shadow: 0 0 12px var(--cyan-glow);
}

.nav-quick-btn.active {
    background: rgba(0, 243, 255, 0.22);
    border-color: var(--cyan-hud);
    color: var(--cyan-hud);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78em;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--green-neon);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--green-neon);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.crs-badge {
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.25);
    color: var(--cyan-hud);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.72em;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ==========================================================================
   HUD BAR INFÉRIEURE
   ========================================================================== */
#hud-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 38px;
    background: rgba(5, 8, 20, 0.94);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1500;
    font-size: 0.78em;
    color: var(--text-secondary);
}

.hud-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-item i {
    color: var(--cyan-hud);
}

.hud-item span {
    color: var(--text-primary);
    font-weight: 500;
}

.hud-quick-view {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-btn-view {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: inherit;
}

.hud-btn-view:hover {
    color: var(--cyan-hud);
    border-color: var(--cyan-hud);
    background: rgba(0, 243, 255, 0.1);
}

/* ==========================================================================
   PANNEAU LATÉRAL MULTIFONCTION
   ========================================================================== */
#side-panel {
    position: fixed;
    top: 72px;
    bottom: 52px;
    left: 18px;
    width: 440px;
    background: var(--bg-panel);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(0, 243, 255, 0.03);
    z-index: 1200;
    transform: translateX(-520px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

#side-panel.open {
    transform: translateX(0);
    opacity: 1;
}

#panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-card);
    background: linear-gradient(180deg, rgba(0, 243, 255, 0.06) 0%, rgba(10, 16, 32, 0) 100%);
}

.panel-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header-title i {
    color: var(--cyan-hud);
    font-size: 1.2em;
}

.panel-header-title h3 {
    margin: 0;
    font-size: 1.05em;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.icon-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    color: var(--pink-neon);
    border-color: var(--pink-neon);
    background: rgba(255, 0, 85, 0.1);
}

/* Onglets du Panneau */
.panel-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid var(--border-card);
    padding: 6px;
    gap: 6px;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 8px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.78em;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-family: inherit;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: var(--cyan-hud);
    background: rgba(0, 243, 255, 0.12);
    border: 1px solid rgba(0, 243, 255, 0.35);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.18);
}

#panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

#panel-content::-webkit-scrollbar {
    width: 5px;
}
#panel-content::-webkit-scrollbar-thumb {
    background: rgba(0, 243, 255, 0.3);
    border-radius: 4px;
}

/* Visibilité des onglets */
.tab-pane {
    display: none !important;
}
.tab-pane.active {
    display: block !important;
    animation: fadeInTab 0.25s ease-out;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.tool-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-card);
}
.tool-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tool-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.92em;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-primary);
}

.section-desc {
    font-size: 0.8em;
    color: var(--text-secondary);
    margin: 0 0 14px 0;
    line-height: 1.4;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* ==========================================================================
   UPLOAD CARD & DRAG AND DROP
   ========================================================================== */
.upload-drop-card {
    position: relative;
    border: 2px dashed rgba(0, 243, 255, 0.35);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    text-align: center;
    background: rgba(0, 243, 255, 0.03);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-drop-card:hover {
    border-color: var(--cyan-hud);
    background: rgba(0, 243, 255, 0.08);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.15);
}

.upload-card-icon {
    font-size: 2em;
    color: var(--cyan-hud);
}

.upload-main-text {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-sub-text {
    font-size: 0.72em;
    color: var(--text-secondary);
}

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

.demo-btn {
    text-align: left;
    justify-content: flex-start;
    background: rgba(0, 243, 255, 0.07);
    border: 1px solid rgba(0, 243, 255, 0.25);
    color: var(--text-primary);
    padding: 9px 12px;
    font-size: 0.8em;
    border-radius: var(--radius-sm);
    width: 100%;
    cursor: pointer;
}

.demo-btn i {
    color: var(--cyan-hud);
    font-size: 1.1em;
}

.demo-btn:hover {
    background: rgba(0, 243, 255, 0.18);
    border-color: var(--cyan-hud);
    box-shadow: 0 0 12px var(--cyan-glow);
}

#universal-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Drop Zone Plein Écran */
#drop-zone-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 20, 0.88);
    backdrop-filter: blur(15px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#drop-zone-overlay.active {
    display: flex;
    pointer-events: auto;
}

.drop-zone-modal {
    border: 2px dashed var(--cyan-hud);
    background: rgba(10, 16, 32, 0.92);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 50px var(--cyan-glow);
    animation: scaleModal 0.25s ease-out;
}

@keyframes scaleModal {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.drop-icon {
    font-size: 3.5em;
    color: var(--cyan-hud);
    margin-bottom: 16px;
    animation: floatIcon 2s ease-in-out infinite;
}

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

/* ==========================================================================
   FORMULAIRES & BOUTONS HUD
   ========================================================================== */
.hud-input, .hud-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 9px 12px;
    font-size: 0.85em;
    margin-top: 4px;
    margin-bottom: 12px;
    outline: none;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.hud-input:focus, .hud-select:focus {
    border-color: var(--cyan-hud);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.hud-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.hud-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.hud-btn.primary {
    background: rgba(0, 243, 255, 0.15);
    border-color: var(--cyan-hud);
    color: var(--cyan-hud);
}

.hud-btn.primary:hover {
    background: rgba(0, 243, 255, 0.28);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.hud-btn.danger {
    background: rgba(255, 0, 85, 0.15);
    border-color: var(--pink-neon);
    color: var(--pink-neon);
}

.hud-btn.small-btn {
    width: auto;
    padding: 4px 10px;
    font-size: 0.75em;
}

/* ==========================================================================
   GESTIONNAIRE DE COUCHES & OPACITÉ
   ========================================================================== */
.layer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.layer-list-item {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-left: 4px solid var(--cyan-hud);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition-smooth);
}

.layer-list-item:hover {
    background: rgba(20, 30, 55, 0.85);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.layer-item-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.layer-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.layer-name {
    flex: 1;
    font-size: 0.85em;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layer-actions {
    display: flex;
    gap: 5px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.78em;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    color: var(--cyan-hud);
    border-color: var(--cyan-hud);
    background: rgba(0, 243, 255, 0.1);
}

.action-btn.hidden-layer {
    color: var(--pink-neon);
    opacity: 0.6;
}

.action-btn.delete-btn:hover {
    color: var(--pink-neon);
    border-color: var(--pink-neon);
    background: rgba(255, 0, 85, 0.15);
}

.layer-opacity-slider {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.opacity-icon {
    font-size: 0.75em;
    color: var(--text-secondary);
}

.opacity-input {
    flex: 1;
    accent-color: var(--cyan-hud);
    height: 4px;
    cursor: pointer;
}

.opacity-val {
    font-size: 0.7em;
    color: var(--text-secondary);
    min-width: 32px;
    text-align: right;
}

.empty-list-msg {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 0.82em;
    line-height: 1.5;
}

.empty-icon {
    font-size: 2em;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.2);
}

/* Fonds de carte Radio List */
.basemaps-radio-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.basemap-radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    font-size: 0.82em;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.basemap-radio-item:hover {
    border-color: var(--cyan-hud);
    background: rgba(0, 243, 255, 0.08);
}

.basemap-radio-item.active {
    border-color: var(--cyan-hud);
    background: rgba(0, 243, 255, 0.15);
    box-shadow: 0 0 12px rgba(0, 243, 255, 0.25);
    color: var(--text-primary);
}

.basemap-radio-item input {
    accent-color: var(--cyan-hud);
    cursor: pointer;
}

/* ==========================================================================
   CATALOGUE CLIMAT & NETCDF
   ========================================================================== */
.preset-catalog-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.climate-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: var(--transition-smooth);
}

.climate-card:hover {
    border-color: rgba(0, 243, 255, 0.35);
    background: rgba(20, 30, 55, 0.8);
}

.climate-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.climate-card-badge {
    background: rgba(0, 243, 255, 0.12);
    color: var(--cyan-hud);
    font-size: 0.68em;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.climate-card h5 {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-primary);
    line-height: 1.3;
}

.climate-card-attr {
    font-size: 0.72em;
    color: var(--text-secondary);
    margin: 0;
}

.netcdf-helper-box {
    background: rgba(0, 243, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    gap: 10px;
    font-size: 0.78em;
    color: var(--text-secondary);
    line-height: 1.4;
}

.netcdf-helper-box i {
    color: var(--cyan-hud);
    font-size: 1.2em;
    margin-top: 2px;
}

.netcdf-helper-box code {
    color: var(--cyan-hud);
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 4px;
    border-radius: 3px;
}

/* ==========================================================================
   OUTILS SIG & STATS
   ========================================================================== */
.export-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.spatial-stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.82em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 6px;
}
.stat-line:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    color: var(--cyan-hud);
    font-weight: 600;
}

/* ==========================================================================
   TABLE ATTRIBUTAIRE INFÉRIEURE
   ========================================================================== */
#attribute-drawer {
    position: fixed;
    bottom: 38px;
    left: 0;
    width: 100%;
    height: 320px;
    background: rgba(8, 12, 24, 0.96);
    backdrop-filter: blur(25px);
    border-top: 1px solid var(--border-subtle);
    z-index: 1400;
    transform: translateY(340px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

#attribute-drawer.open {
    transform: translateY(0);
}

.drawer-header {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-card);
    background: rgba(0, 0, 0, 0.3);
}

.drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85em;
    color: var(--text-primary);
}

.drawer-title i {
    color: var(--cyan-hud);
}

.drawer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-search {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 4px 10px;
    font-size: 0.78em;
    outline: none;
    font-family: inherit;
    width: 180px;
}

.drawer-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75em;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition-smooth);
}

.drawer-btn:hover {
    color: var(--cyan-hud);
    border-color: var(--cyan-hud);
}

.drawer-body {
    flex: 1;
    overflow: auto;
}

#attribute-table-wrapper {
    width: 100%;
}

#attribute-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78em;
    text-align: left;
}

#attribute-table th {
    background: rgba(15, 23, 42, 0.95);
    color: var(--cyan-hud);
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid var(--border-card);
    white-space: nowrap;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#attribute-table td {
    padding: 7px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    white-space: nowrap;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
}

#attribute-table tr:hover td {
    background: rgba(0, 243, 255, 0.06);
    color: var(--text-primary);
}

.table-zoom-btn {
    background: transparent;
    border: none;
    color: var(--cyan-hud);
    cursor: pointer;
    font-size: 1.1em;
    padding: 2px 6px;
    transition: var(--transition-smooth);
}
.table-zoom-btn:hover {
    transform: scale(1.2);
    color: #fff;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
#toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.hud-toast {
    background: rgba(10, 16, 32, 0.94);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 0.82em;
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 380px;
    transition: all 0.3s ease;
    animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto;
}

@keyframes toastSlide {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.hud-toast.success { border-left: 4px solid var(--green-neon); }
.hud-toast.success i { color: var(--green-neon); }

.hud-toast.error { border-left: 4px solid var(--pink-neon); }
.hud-toast.error i { color: var(--pink-neon); }

.hud-toast.info { border-left: 4px solid var(--cyan-hud); }
.hud-toast.info i { color: var(--cyan-hud); }

/* ==========================================================================
   LEAFLET CUSTOMISATIONS (GEOCODER, GEOMAN, POPUPS)
   ========================================================================== */
.leaflet-popup-content-wrapper {
    background: rgba(10, 16, 32, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8) !important;
    padding: 0 !important;
}

.leaflet-popup-tip {
    background: rgba(10, 16, 32, 0.95) !important;
    border: 1px solid var(--border-subtle);
}

.leaflet-popup-content {
    margin: 12px !important;
    font-family: 'Space Grotesk', sans-serif !important;
    max-height: 250px;
    overflow-y: auto;
}

.custom-popup-header {
    font-weight: 700;
    font-size: 0.95em;
    padding-left: 8px;
    margin-bottom: 8px;
    color: var(--cyan-hud);
}

.custom-popup-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3px 0;
}

.popup-key {
    color: var(--text-secondary);
    font-weight: 500;
}

.popup-val {
    color: var(--text-primary);
    max-width: 160px;
    text-align: right;
    word-break: break-all;
}

/* Geocoder Leaflet (Recherche mondiale) */
.leaflet-control-geocoder {
    background: rgba(10, 16, 32, 0.9) !important;
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}

.leaflet-control-geocoder-icon {
    filter: invert(1);
}

.leaflet-control-geocoder-form input {
    background: transparent !important;
    color: #fff !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 0.85em !important;
    padding: 6px 10px !important;
    border: none !important;
    outline: none !important;
}

.leaflet-control-geocoder-alternatives {
    background: rgba(10, 16, 32, 0.98) !important;
    border-top: 1px solid var(--border-card) !important;
}

.leaflet-control-geocoder-alternatives a {
    color: var(--text-secondary) !important;
    font-size: 0.8em !important;
    padding: 6px 12px !important;
}

.leaflet-control-geocoder-alternatives a:hover {
    background: rgba(0, 243, 255, 0.1) !important;
    color: var(--cyan-hud) !important;
}

/* Geoman Toolbar Dark Styling */
.leaflet-pm-toolbar .leaflet-buttons-control-button {
    background-color: rgba(10, 16, 32, 0.88) !important;
    border-color: var(--border-card) !important;
}
.leaflet-pm-toolbar .leaflet-buttons-control-button:hover {
    background-color: rgba(0, 243, 255, 0.2) !important;
}
.leaflet-pm-toolbar .leaflet-buttons-control-button svg {
    fill: var(--cyan-hud) !important;
}

/* Positionnement MiniMap et Échelle sans chevauchement */
.leaflet-bottom.leaflet-left {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    margin-bottom: 6px;
    margin-left: 14px;
    gap: 8px;
    z-index: 900;
}

.leaflet-control-minimap {
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.7) !important;
    background: rgba(10, 16, 32, 0.95) !important;
    overflow: hidden;
}

.leaflet-control-scale {
    margin: 0 !important;
}

.leaflet-control-scale-line {
    background: rgba(5, 8, 20, 0.88) !important;
    border: 1px solid var(--border-subtle) !important;
    border-top: none !important;
    color: var(--cyan-hud) !important;
    font-family: 'Space Grotesk', sans-serif !important;
    font-size: 0.74em !important;
    padding: 2px 6px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* ==========================================================================
   LECTEUR TEMPOREL 4D (TIME SLIDER)
   ========================================================================== */
#time-slider-container {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    z-index: 1300;
    width: 90%;
    max-width: 650px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

#time-slider-container.open {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.time-slider-card {
    background: rgba(10, 16, 32, 0.94);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 20px var(--cyan-glow);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.time-btn {
    background: rgba(0, 243, 255, 0.15);
    border: 1px solid var(--cyan-hud);
    color: var(--cyan-hud);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.time-btn:hover {
    background: rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 15px var(--cyan-glow);
    transform: scale(1.08);
}

.time-btn.small {
    width: 28px;
    height: 28px;
    font-size: 0.8em;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
}

.time-btn.small:hover {
    color: #fff;
    border-color: var(--cyan-hud);
}

.time-info {
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.time-title {
    font-size: 0.68em;
    font-weight: 700;
    color: var(--cyan-hud);
    letter-spacing: 1px;
}

.time-display {
    font-size: 0.82em;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.time-range {
    flex: 1;
    accent-color: var(--cyan-hud);
    height: 6px;
    cursor: pointer;
}

/* ==========================================================================
   BOÎTE DE LÉGENDE DYNAMIQUE (HUD LEGEND BOX)
   ========================================================================== */
.legend-box {
    position: fixed;
    bottom: 48px;
    right: 55px;
    width: 300px;
    background: rgba(10, 16, 32, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    z-index: 1250;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.legend-box.closed {
    display: none !important;
}

.legend-box.minimized .legend-content {
    display: none;
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-card);
    cursor: pointer;
    user-select: none;
}

.legend-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82em;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.legend-title i {
    color: var(--cyan-hud);
}

.legend-minimize-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85em;
    cursor: pointer;
    transition: transform 0.3s;
}

.legend-box.minimized .legend-minimize-btn {
    transform: rotate(180deg);
}

.legend-content {
    padding: 12px 14px;
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.legend-content::-webkit-scrollbar {
    width: 4px;
}
.legend-content::-webkit-scrollbar-thumb {
    background: rgba(0, 243, 255, 0.3);
    border-radius: 4px;
}

.legend-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
}
.legend-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.legend-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.legend-item-title {
    font-size: 0.78em;
    font-weight: 600;
    color: var(--text-primary);
}

.legend-tag {
    font-size: 0.65em;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0, 243, 255, 0.12);
    color: var(--cyan-hud);
    border: 1px solid rgba(0, 243, 255, 0.25);
    white-space: nowrap;
}

.legend-ramp-bar {
    height: 10px;
    border-radius: 4px;
    width: 100%;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.legend-labels-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.68em;
    color: var(--text-secondary);
}

.legend-categories-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.legend-cat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72em;
    color: var(--text-secondary);
}

.legend-field-tag {
    font-size: 0.85em;
    font-weight: 700;
    color: var(--cyan-hud);
    background: rgba(0, 243, 255, 0.12);
    border: 1px solid rgba(0, 243, 255, 0.3);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.legend-stats-kpi-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 0.68em;
    color: #94a3b8;
    text-align: center;
    margin: 4px 0;
}

.legend-stats-kpi-bar span strong {
    color: #fff;
    font-weight: 600;
}

.legend-cat-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.legend-cat-box {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

.legend-circle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72em;
    color: var(--text-secondary);
}

.legend-circle-symbol {
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.legend-line-symbol {
    display: inline-block;
    width: 20px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-poly-symbol {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-badge-geometry {
    font-size: 0.65em;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.legend-item.highlight-new {
    animation: legendPulse 1.5s ease-out;
}

@keyframes legendPulse {
    0% { background: rgba(0, 243, 255, 0.2); }
    100% { background: transparent; }
}

.legend-empty-msg {
    font-size: 0.75em;
    color: var(--text-secondary);
    text-align: center;
    padding: 10px 0;
    line-height: 1.4;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLETTE)
   ========================================================================== */
@media (max-width: 768px) {
    #side-panel {
        width: calc(100% - 24px);
        left: 12px;
        right: 12px;
        top: 66px;
        bottom: 46px;
    }

    .nav-center {
        display: none;
    }

    .hud-quick-view {
        display: none;
    }

    #attribute-drawer {
        height: 250px;
    }
}

/* ==========================================================================
   ÉCRAN D'ACCUEIL (ONBOARDING HUMAIN & DESIGN ÉPURÉ)
   ========================================================================== */
.splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.92) 0%, rgba(3, 7, 18, 0.98) 100%);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s, transform 0.4s;
}

.splash-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: scale(0.98);
}

.splash-card {
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 243, 255, 0.1);
    width: 100%;
    max-width: 580px;
    padding: 32px 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    animation: splashAppear 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes splashAppear {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.splash-avatar {
    position: relative;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.splash-avatar-glow {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.25) 0%, transparent 70%);
}

.splash-avatar-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.15) 0%, rgba(37, 99, 235, 0.25) 100%);
    border: 1px solid rgba(0, 243, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    color: var(--cyan-hud);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.splash-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.splash-badge {
    font-size: 0.72em;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 3px 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.splash-title {
    font-size: 2.1em;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
}

.splash-title span {
    color: var(--cyan-hud);
    font-weight: 300;
}

.splash-subtitle {
    font-size: 0.88em;
    color: #94a3b8;
    margin: 0;
    line-height: 1.45;
    max-width: 460px;
}

/* Grille des caractéristiques humaines */
.splash-features-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.telemetry-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 10px 14px;
    text-align: left;
    transition: background 0.2s, border-color 0.2s;
}

.telemetry-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(0, 243, 255, 0.2);
}

.telemetry-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(0, 243, 255, 0.1);
    color: var(--cyan-hud);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05em;
    flex-shrink: 0;
}

.telemetry-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.telemetry-content strong {
    font-size: 0.82em;
    color: #f1f5f9;
    font-weight: 600;
}

.telemetry-content span {
    font-size: 0.74em;
    color: #94a3b8;
    line-height: 1.3;
}

.splash-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
}

.splash-btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #ffffff;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95em;
    padding: 12px 32px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 18px rgba(14, 165, 233, 0.35);
    transition: var(--transition-smooth);
}

.splash-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.55);
    background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
}

.splash-quick-modes {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

.splash-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-family: inherit;
    font-size: 0.78em;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 6px;
}

.splash-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
}

.splash-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.72em;
    color: #64748b;
}

.splash-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    color: #94a3b8;
}

.splash-checkbox-label input {
    accent-color: #0ea5e9;
    cursor: pointer;
}

.splash-credits {
    color: #64748b;
    font-size: 0.9em;
}

/* ==========================================================================
   KEPLER.GL FEATURE INSPECTOR & LAYER STYLER (STUDIO GÉOSPATIAL PRO)
   ========================================================================== */

/* 1. Panneau Inspecteur d'Entité Kepler */
.kepler-inspector-panel {
    position: fixed;
    top: 68px;
    right: 20px;
    width: 360px;
    max-height: calc(100vh - 110px);
    z-index: 1500;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s;
    display: flex;
    flex-direction: column;
}

.kepler-inspector-panel.closed {
    transform: translateX(400px);
    opacity: 0;
    pointer-events: none;
}

.kepler-inspector-card {
    background: rgba(10, 16, 32, 0.96);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 243, 255, 0.15);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: inherit;
}

.kepler-inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.kepler-layer-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76em;
    font-weight: 600;
    color: var(--cyan-hud);
    background: rgba(0, 243, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(0, 243, 255, 0.25);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kepler-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan-hud);
    box-shadow: 0 0 8px var(--cyan-hud);
    flex-shrink: 0;
}

.kepler-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kepler-tool-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82em;
    transition: var(--transition-smooth);
}

.kepler-tool-btn:hover {
    color: #fff;
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--cyan-hud);
}

.kepler-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1em;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.kepler-close-btn:hover {
    color: var(--pink-neon);
}

.kepler-feature-title-box {
    padding: 14px 18px 8px;
}

.kepler-feature-title-box h3 {
    margin: 0 0 4px;
    font-size: 1.05em;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.kepler-feature-coords {
    font-size: 0.74em;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kepler-feature-coords i {
    color: var(--cyan-hud);
}

/* KPI Highlights Kepler */
.kepler-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    padding: 6px 16px 12px;
}

.kepler-kpi-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--cyan-hud);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
}

.kepler-kpi-label {
    font-size: 0.65em;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.6px;
}

.kepler-kpi-value {
    font-size: 1.15em;
    font-weight: 700;
    color: #f8fafc;
    margin-top: 2px;
}

/* Section Attributs */
.kepler-attr-section {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    flex: 1;
}

.kepler-attr-search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.kepler-attr-search-bar i {
    position: absolute;
    left: 10px;
    font-size: 0.8em;
    color: #64748b;
}

.kepler-attr-search-bar input {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 7px 10px 7px 30px;
    border-radius: 6px;
    font-size: 0.78em;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.kepler-attr-search-bar input:focus {
    border-color: var(--cyan-hud);
}

.kepler-attr-table-wrapper {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.kepler-attr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76em;
}

.kepler-attr-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.15s;
}

.kepler-attr-table tr:hover {
    background: rgba(0, 243, 255, 0.06);
}

.kepler-attr-table td {
    padding: 7px 10px;
}

.kepler-attr-key {
    color: #94a3b8;
    font-weight: 500;
    width: 40%;
    word-break: break-word;
}

.kepler-attr-val {
    color: #f1f5f9;
    font-weight: 600;
    width: 60%;
    word-break: break-word;
}

/* 2. Modal Éditeur de Style Kepler.gl */
.kepler-styler-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.kepler-styler-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.kepler-styler-card {
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 18px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(0, 243, 255, 0.18);
    width: 100%;
    max-width: 500px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: stylerAppear 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes stylerAppear {
    from { opacity: 0; transform: scale(0.96) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.kepler-styler-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.kepler-styler-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
    font-weight: 700;
    color: #fff;
}

.kepler-styler-title i {
    color: var(--cyan-hud);
}

.kepler-styler-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    max-height: calc(88vh - 60px);
}

.kepler-styler-subtitle {
    margin: 0;
    font-size: 0.82em;
    color: #94a3b8;
}

.kepler-styler-subtitle strong {
    color: var(--cyan-hud);
}

.kepler-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kepler-form-label {
    font-size: 0.74em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #cbd5e1;
}

.kepler-palette-picker {
    display: flex;
    align-items: center;
    gap: 12px;
}

.kepler-color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.kepler-color-swatch:hover {
    transform: scale(1.15);
}

.kepler-color-swatch.active {
    border-color: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 15px currentColor;
}

.kepler-slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kepler-slider-header span {
    font-size: 0.78em;
    font-weight: 700;
    color: var(--cyan-hud);
}

.kepler-range-input {
    width: 100%;
    accent-color: var(--cyan-hud);
    cursor: pointer;
}

.kepler-styler-footer {
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.kepler-btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 20px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.86em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 18px rgba(14, 165, 233, 0.35);
    transition: var(--transition-smooth);
    width: 100%;
}

.kepler-btn-primary:hover {
    background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.55);
    transform: translateY(-1px);
}

/* Bouton Kepler dans le popup Leaflet */
.btn-kepler-inspect {
    margin-top: 10px;
    width: 100%;
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.15) 0%, rgba(37, 99, 235, 0.25) 100%);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: var(--cyan-hud);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.76em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition-smooth);
}

.btn-kepler-inspect:hover {
    background: rgba(0, 243, 255, 0.3);
    color: #fff;
    box-shadow: 0 0 12px var(--cyan-glow);
}

/* Sélecteur de champ & aperçu statistique Kepler */
.kepler-select-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: #f8fafc;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.82em;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.kepler-select-input:focus {
    border-color: var(--cyan-hud);
    box-shadow: 0 0 12px var(--cyan-glow);
}

.kepler-select-input option {
    background: #0b1120;
    color: #fff;
    padding: 6px;
}

.kepler-stats-preview-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeInStats 0.25s ease-out;
}

@keyframes fadeInStats {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.kepler-stats-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72em;
    font-weight: 700;
    color: var(--cyan-hud);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.kepler-stats-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.kepler-mini-kpi {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 4px;
    text-align: center;
}

.kepler-mini-kpi-label {
    font-size: 0.58em;
    color: #94a3b8;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.kepler-mini-kpi-val {
    font-size: 0.85em;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kepler-stats-classes-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 110px;
    overflow-y: auto;
}

.kepler-class-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72em;
    color: #cbd5e1;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.kepler-class-left {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kepler-class-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.kepler-class-count {
    font-weight: 700;
    font-size: 0.9em;
    margin-left: 8px;
}