Mike0021's picture
Initial live 3D wildfire map: FIRMS proxy + MapLibre 3D frontend
f62edf8 verified
Raw
History Blame Contribute Delete
15.9 kB
/* ============================================================
Feux de forêt en France — carte 3D en direct
Design : minimaliste sombre, généreux en espace négatif
============================================================ */
:root {
--bg: #0b0e13;
--panel: rgba(15, 19, 27, 0.78);
--panel-border: rgba(255, 255, 255, 0.08);
--panel-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
--text: #e9edf4;
--text-dim: #97a1b1;
--text-faint: #6b7484;
--accent: #f97316;
--c-high: #ef4444;
--c-nominal: #f97316;
--c-low: #f5b942;
--focus: #7dd3fc;
--radius: 14px;
--font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
margin: 0;
padding: 0;
height: 100%;
background: var(--bg);
color: var(--text);
font-family: var(--font);
font-variant-numeric: tabular-nums;
-webkit-font-smoothing: antialiased;
overflow: hidden;
}
#map {
position: fixed;
inset: 0;
background: var(--bg);
}
/* ---------- HUD générique ---------- */
.hud { position: absolute; z-index: 10; }
.panel {
background: var(--panel);
border: 1px solid var(--panel-border);
border-radius: var(--radius);
box-shadow: var(--panel-shadow);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
}
/* ---------- Titre ---------- */
.hud-title {
top: 22px;
left: 24px;
pointer-events: none;
max-width: 60vw;
}
.hud-title h1 {
margin: 0;
font-size: 19px;
font-weight: 600;
letter-spacing: -0.01em;
line-height: 1.25;
text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
}
.hud-title .subtitle {
margin: 3px 0 0;
font-size: 12.5px;
color: var(--text-dim);
letter-spacing: 0.01em;
text-shadow: 0 1px 8px rgba(0, 0, 0, 0.65);
}
/* ---------- Sources (haut droite) ---------- */
.hud-sources {
top: 26px;
right: 24px;
display: flex;
align-items: baseline;
gap: 12px;
font-size: 11px;
color: var(--text-faint);
text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}
.sources-line-short { display: none; }
.link-btn {
background: none;
border: none;
padding: 2px 0;
font: inherit;
color: var(--text-dim);
cursor: pointer;
text-decoration: underline;
text-underline-offset: 3px;
text-decoration-color: rgba(255, 255, 255, 0.25);
}
.link-btn:hover { color: var(--text); text-decoration-color: currentColor; }
/* ---------- Légende ---------- */
.legend {
left: 24px;
bottom: 24px;
padding: 0;
max-width: 300px;
font-size: 12px;
}
.legend-toggle {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
padding: 10px 14px;
background: none;
border: none;
color: var(--text);
font: inherit;
font-weight: 600;
font-size: 12px;
letter-spacing: 0.02em;
cursor: pointer;
}
.legend-chip-dot {
width: 8px; height: 8px;
border-radius: 50%;
background: radial-gradient(circle at 40% 40%, #ffb37a, var(--accent));
box-shadow: 0 0 8px rgba(249, 115, 22, 0.8);
}
.legend-toggle .chevron { margin-left: auto; transition: transform 0.2s ease; color: var(--text-dim); }
.legend-toggle[aria-expanded="false"] .chevron { transform: rotate(-90deg); }
.legend-body {
padding: 2px 14px 12px;
border-top: 1px solid var(--panel-border);
}
.legend-group {
margin: 10px 0 6px;
font-size: 10.5px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-faint);
}
.legend-swatches {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 6px;
color: var(--text-dim);
}
.legend-swatches li { display: flex; align-items: center; gap: 9px; }
.swatch {
width: 10px; height: 10px;
border-radius: 50%;
flex: none;
}
.swatch-high { background: var(--c-high); box-shadow: 0 0 7px rgba(239, 68, 68, 0.75); }
.swatch-nominal { background: var(--c-nominal); box-shadow: 0 0 7px rgba(249, 115, 22, 0.75); }
.swatch-low { background: var(--c-low); box-shadow: 0 0 7px rgba(245, 185, 66, 0.75); }
.legend-note {
margin: 12px 0 0;
color: var(--text-dim);
font-size: 11.5px;
}
.legend-disclaimer {
margin: 8px 0 2px;
color: var(--text-faint);
font-size: 10.5px;
line-height: 1.5;
}
/* ---------- Barre d'état ---------- */
.statusbar {
right: 24px;
bottom: 30px;
display: flex;
align-items: center;
gap: 14px;
padding: 9px 10px 9px 16px;
font-size: 12.5px;
white-space: nowrap;
}
.status-main {
display: flex;
align-items: baseline;
gap: 12px;
min-width: 0;
}
.status-count { font-size: 13.5px; font-weight: 650; }
.status-dim { color: var(--text-dim); font-size: 11.5px; }
.badge-stale {
padding: 2px 8px;
border-radius: 999px;
background: rgba(245, 185, 66, 0.14);
border: 1px solid rgba(245, 185, 66, 0.4);
color: var(--c-low);
font-size: 10.5px;
font-weight: 600;
letter-spacing: 0.02em;
}
.btn-refresh {
display: inline-flex;
align-items: center;
gap: 7px;
padding: 7px 13px;
border: 1px solid rgba(249, 115, 22, 0.45);
border-radius: 10px;
background: rgba(249, 115, 22, 0.12);
color: #ffb37a;
font: inherit;
font-size: 12px;
font-weight: 600;
cursor: pointer;
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-refresh:hover:not(:disabled) { background: rgba(249, 115, 22, 0.22); color: #ffd0a8; }
.btn-refresh:disabled { opacity: 0.45; cursor: default; }
.btn-refresh.pending .icon-refresh { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* ---------- Bouton liste ---------- */
.btn-list {
right: 24px;
bottom: 92px;
display: flex;
align-items: center;
gap: 8px;
padding: 8px 14px;
color: var(--text);
font: inherit;
font-size: 12px;
font-weight: 600;
cursor: pointer;
transition: border-color 0.15s ease;
}
.btn-list:hover { border-color: rgba(255, 255, 255, 0.22); }
.btn-list-count {
min-width: 20px;
padding: 1px 6px;
border-radius: 999px;
background: rgba(249, 115, 22, 0.2);
color: #ffb37a;
font-size: 11px;
text-align: center;
}
/* ---------- Panneau liste ---------- */
.panel-list {
position: absolute;
z-index: 20;
top: 78px;
right: 24px;
bottom: 96px;
width: min(340px, calc(100vw - 48px));
display: flex;
flex-direction: column;
background: var(--panel);
border: 1px solid var(--panel-border);
border-radius: var(--radius);
box-shadow: var(--panel-shadow);
backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px);
overflow: hidden;
}
.panel-list-head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 16px 12px;
border-bottom: 1px solid var(--panel-border);
flex: none;
}
.panel-list-head h2 {
margin: 0;
font-size: 13.5px;
font-weight: 650;
letter-spacing: 0.01em;
}
.icon-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px; height: 28px;
border: none;
border-radius: 8px;
background: transparent;
color: var(--text-dim);
cursor: pointer;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.panel-list-empty {
margin: 0;
padding: 22px 16px;
color: var(--text-dim);
font-size: 12.5px;
}
.fires-ul {
list-style: none;
margin: 0;
padding: 6px;
overflow-y: auto;
flex: 1;
scrollbar-width: thin;
scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}
.fire-row {
display: flex;
align-items: center;
gap: 11px;
width: 100%;
padding: 9px 10px;
border: none;
border-radius: 10px;
background: transparent;
color: var(--text);
font: inherit;
font-size: 12.5px;
text-align: left;
cursor: pointer;
}
.fire-row:hover, .fire-row:focus-visible { background: rgba(255, 255, 255, 0.06); }
.fire-dot {
width: 9px; height: 9px;
border-radius: 50%;
flex: none;
}
.fire-frp { font-weight: 650; min-width: 64px; }
.fire-meta {
margin-left: auto;
color: var(--text-dim);
font-size: 11px;
text-align: right;
line-height: 1.45;
white-space: nowrap;
}
/* ---------- États centrés ---------- */
.state-overlay {
position: absolute;
inset: 0;
z-index: 30;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
background: rgba(5, 8, 12, 0.42);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
}
.state-overlay.quiet {
background: transparent;
backdrop-filter: none;
-webkit-backdrop-filter: none;
pointer-events: none;
}
.state-overlay.quiet .state-card { pointer-events: auto; }
.state-card {
max-width: 380px;
width: 100%;
padding: 26px 28px;
text-align: center;
}
.state-title {
margin: 0 0 8px;
font-size: 15px;
font-weight: 650;
letter-spacing: -0.005em;
}
.state-msg {
margin: 0 0 16px;
font-size: 12.5px;
line-height: 1.6;
color: var(--text-dim);
}
.state-card .state-msg:last-child { margin-bottom: 0; }
.btn-primary {
padding: 9px 20px;
border: none;
border-radius: 10px;
background: var(--accent);
color: #161006;
font: inherit;
font-size: 12.5px;
font-weight: 700;
cursor: pointer;
}
.btn-primary:hover { background: #fb8a3c; }
/* Skeleton de chargement */
.skeleton { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.skeleton-line {
height: 11px;
border-radius: 6px;
background: linear-gradient(90deg,
rgba(255,255,255,0.06) 25%,
rgba(255,255,255,0.16) 50%,
rgba(255,255,255,0.06) 75%);
background-size: 220% 100%;
animation: shimmer 1.5s ease infinite;
}
.skeleton-line.w40 { width: 40%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }
@keyframes shimmer {
0% { background-position: 130% 0; }
100% { background-position: -90% 0; }
}
/* ---------- Modale ---------- */
.modal-backdrop {
position: absolute;
inset: 0;
z-index: 40;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
background: rgba(5, 8, 12, 0.55);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
}
.modal {
width: min(520px, 100%);
max-height: min(640px, calc(100vh - 48px));
display: flex;
flex-direction: column;
overflow: hidden;
}
.modal-head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid var(--panel-border);
flex: none;
}
.modal-head h2 { margin: 0; font-size: 14.5px; font-weight: 650; }
.modal-body {
padding: 16px 20px 20px;
overflow-y: auto;
font-size: 12.5px;
line-height: 1.65;
color: var(--text-dim);
scrollbar-width: thin;
}
.modal-body p { margin: 0 0 10px; }
.modal-body strong { color: var(--text); font-weight: 600; }
.modal-body h3 {
margin: 16px 0 6px;
font-size: 10.5px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-faint);
}
.modal-body ul { margin: 0; padding-left: 18px; }
.modal-body li { margin-bottom: 4px; }
.modal-disclaimer { color: var(--c-low); }
/* ---------- Popup MapLibre ---------- */
.maplibregl-popup.fire-popup { z-index: 15; }
.fire-popup .maplibregl-popup-content {
background: rgba(15, 19, 27, 0.92);
border: 1px solid var(--panel-border);
border-radius: 12px;
box-shadow: var(--panel-shadow);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
color: var(--text);
padding: 14px 16px;
font-family: var(--font);
min-width: 210px;
}
.fire-popup .maplibregl-popup-tip { border-top-color: rgba(15, 19, 27, 0.92); }
.fire-popup .maplibregl-popup-close-button {
color: var(--text-dim);
font-size: 15px;
padding: 4px 8px;
right: 2px;
top: 2px;
}
.fire-popup .maplibregl-popup-close-button:hover { color: var(--text); background: none; }
.popup-title {
margin: 0 18px 10px 0;
font-size: 12px;
font-weight: 650;
letter-spacing: 0.02em;
}
.popup-grid {
display: grid;
grid-template-columns: auto 1fr;
gap: 5px 14px;
margin: 0;
font-size: 11.5px;
}
.popup-grid dt { color: var(--text-faint); margin: 0; }
.popup-grid dd { margin: 0; color: var(--text); font-weight: 550; }
.popup-conf { display: inline-flex; align-items: center; gap: 6px; }
.popup-conf .fire-dot { width: 8px; height: 8px; }
/* ---------- Contrôles MapLibre repositionnés ---------- */
.maplibregl-ctrl-top-right { top: 58px; right: 14px; }
.maplibregl-ctrl-bottom-right { right: 20px; bottom: 4px; }
.maplibregl-ctrl-attrib {
background: rgba(11, 14, 19, 0.55) !important;
font-size: 10px !important;
color: var(--text-faint);
backdrop-filter: blur(6px);
}
.maplibregl-ctrl-attrib a { color: var(--text-dim) !important; }
.maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-button { filter: invert(0.75); }
.maplibregl-ctrl-group {
background: var(--panel) !important;
border: 1px solid var(--panel-border);
box-shadow: var(--panel-shadow) !important;
backdrop-filter: blur(14px);
border-radius: 10px !important;
overflow: hidden;
}
.maplibregl-ctrl-group button { background: transparent !important; width: 34px !important; height: 34px !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--panel-border) !important; }
.maplibregl-ctrl-group button span { filter: invert(0.85); }
/* ---------- Accessibilité ---------- */
.visually-hidden {
position: absolute !important;
width: 1px; height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
}
:focus-visible {
outline: 2px solid var(--focus);
outline-offset: 2px;
border-radius: 6px;
}
/* ---------- Mobile (<640px) ---------- */
@media (max-width: 639px) {
.hud-title { top: 14px; left: 14px; max-width: 62vw; }
.hud-title h1 { font-size: 16px; }
.hud-title .subtitle { font-size: 11px; }
.hud-sources {
top: 15px;
right: 14px;
flex-direction: column;
align-items: flex-end;
gap: 2px;
font-size: 10px;
max-width: 34vw;
text-align: right;
white-space: nowrap;
}
.sources-line { display: none; }
.sources-line-short { display: inline; }
/* Légende repliée en pastille */
.legend { left: 12px; bottom: 128px; max-width: min(300px, calc(100vw - 24px)); }
.legend-toggle { padding: 8px 12px; }
/* Barre d'état condensée sur une ligne */
.statusbar {
left: 12px;
right: 12px;
bottom: 26px;
padding: 7px 8px 7px 13px;
gap: 8px;
font-size: 11.5px;
overflow: hidden;
}
.status-main { gap: 8px; overflow: hidden; min-width: 0; flex: 1; }
.status-count { font-size: 12px; flex: none; }
.status-dim {
font-size: 10.5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
}
.badge-stale { flex: none; }
#status-observed { display: none; } /* ligne condensée : on garde le compte + actualisation */
.btn-refresh { padding: 6px 10px; font-size: 11px; margin-left: auto; flex: none; }
.btn-list { right: 12px; bottom: 128px; padding: 8px 12px; }
/* Panneau liste en bottom sheet */
.panel-list {
top: auto;
left: 0;
right: 0;
bottom: 0;
width: 100%;
max-height: 52vh;
border-radius: 16px 16px 0 0;
border-bottom: none;
padding-bottom: env(safe-area-inset-bottom, 0);
animation: sheet-up 0.24s ease;
}
@keyframes sheet-up {
from { transform: translateY(24px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}
.maplibregl-ctrl-top-right { top: 66px; right: 10px; }
.maplibregl-ctrl-bottom-right { right: 10px; bottom: 2px; }
.state-card { padding: 22px 20px; }
}
/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
.skeleton-line { animation: none; }
.panel-list { animation: none; }
}