@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --surface: #ffffff;
    --border: #e2e6ee;
    --accent: #e63946;
    --text: #1a1d2e;
    --muted: #8a929f;
    --device: #4285F4;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
    background: #e8edf2;
}

#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Fiche info bas d'écran */
#info-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    padding: 10px 20px 28px;
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

#info-panel.visible {
    transform: translateY(0);
}

.drag-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 14px;
}

#info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#info-header img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

#info-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    flex: 1;
}

#info-name.device {
    color: var(--device);
}

#info-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

#info-details {
    font-size: 0.78rem;
    border-top: 1px solid var(--border);
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: var(--muted);
}

.detail-value {
    color: var(--text);
    font-weight: 700;
}

.detail-value.dist {
    color: var(--accent);
    font-size: 0.9rem;
}

/* Badges */
#badges {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.badge {
    background: var(--surface);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.74rem;
    color: var(--muted);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.badge.active {
    color: #22c55e;
}

.badge.compass.active {
    color: #f59e0b;
}

/* Bouton boussole */
#compass-btn {
    position: absolute;
    top: 96px;
    left: 12px;
    z-index: 20;
    width: 36px;
    height: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background 0.15s;
}

#compass-btn.active {
    background: #fff8e7;
    border-color: #f59e0b;
}

/* Indicateur nord */
#north-indicator {
    position: absolute;
    top: 96px;
    right: 12px;
    z-index: 20;
    width: 52px;
    height: 52px;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

#north-indicator.on {
    display: flex;
}

/* Contrôles OL */
.ol-zoom {
    top: 12px;
    left: 12px;
    right: auto;
}

.ol-zoom button {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.ol-attribution {
    display: none;
}
