:root {
    --accent: #f77f00;
    --accent-dark: #d66b00;
    --bg: #fafafa;
    --fg: #222;
    --muted: #666;
    --panel-bg: rgba(255, 255, 255, 0.96);
    --panel-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    --header-h: 56px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--fg);
    background: var(--bg);
    overflow: hidden;
}

/* Header */
header {
    height: var(--header-h);
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    z-index: 10;
    position: relative;
}
header h1 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--accent);
    font-weight: 600;
}

.controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}
.controls label { color: var(--muted); }
.controls select {
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    color: var(--fg);
    cursor: pointer;
    max-width: 320px;
}
.controls select:hover { border-color: var(--accent); }
.controls select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(247, 127, 0, 0.15);
}

/* Main area */
main {
    position: relative;
    height: calc(100vh - var(--header-h));
    width: 100vw;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Info panel */
#info-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 320px;
    max-height: calc(100% - 2rem);
    padding: 1.25rem 1.5rem;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: var(--panel-shadow);
    overflow-y: auto;
    z-index: 5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#info-panel.hidden {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}

#info-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: var(--muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}
#info-close:hover { color: var(--fg); }

#info-name {
    margin: 0 2rem 0.25rem 0;
    font-size: 1.1rem;
    color: var(--accent);
}

.meta {
    margin: 0 0 1rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}
.metric {
    display: flex;
    flex-direction: column;
}
.metric .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    margin-bottom: 0.15rem;
}
.metric .value {
    font-size: 1rem;
    font-weight: 600;
}

/* Responsive: tablette & mobile */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 0.6rem 1rem;
        gap: 0.4rem;
    }
    :root { --header-h: 96px; }
    .controls select { max-width: 100%; }

    #info-panel {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 40vh;
        border-radius: 12px 12px 0 0;
    }
    .metrics {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
