From b975ed272a99331ee093c0a1342abfe71d8eb54d Mon Sep 17 00:00:00 2001 From: Antoine Jacquin Date: Sun, 27 Sep 2026 17:39:04 +0200 Subject: [PATCH] =?UTF-8?q?Harmoniser=20les=20styles=20de=20la=20carte=20:?= =?UTF-8?q?=20r=C3=A9glages=20communs,=20th=C3=A8mes=20clair=20et=20sombre?= =?UTF-8?q?,=20composants=20uniques?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- lidar_pipeline/tests/test_mapserve.py | 32 +++- lidar_pipeline/web/map.css | 255 +++++++++++++++----------- lidar_pipeline/web/map.html | 49 +++-- lidar_pipeline/web/map.js | 111 ++++++++--- 4 files changed, 279 insertions(+), 168 deletions(-) diff --git a/lidar_pipeline/tests/test_mapserve.py b/lidar_pipeline/tests/test_mapserve.py index 78db31c..d62a459 100644 --- a/lidar_pipeline/tests/test_mapserve.py +++ b/lidar_pipeline/tests/test_mapserve.py @@ -381,7 +381,7 @@ def test_ui_applies_server_defaults(): assert "meta.default_base" in _MAP_JS assert "meta.default_precision_opacity" in _MAP_JS # Réinitialiser oublie l'état local avant de reprendre celui du serveur - assert "localStorage.removeItem(LS_KEY)" in _MAP_JS + assert "lsDel(LS_KEY)" in _MAP_JS def test_ui_uses_standard_tilelayer(): @@ -1341,3 +1341,33 @@ def test_map_ui_has_pdf_export(): assert "#printcard" in _MAP_CSS # bouton toujours visible : indépendant de /api/status.available assert 'id="btnPrint"' in _MAP_HTML and 'id="btnPrint" hidden' not in _MAP_HTML + + +def test_ui_tokens_themes_and_components(): + from lidar_pipeline.mapui import _MAP_CSS, _MAP_HTML, _MAP_JS + for var in ("--surface", "--on-accent", "--print", "--fs-sm", "--r-md", "--sp-2", + "--shadow-lg", "--z-panel", "--z-toast"): + assert var + ":" in _MAP_CSS, var + # Palette sombre : système sombre (sauf clair forcé) ou sombre forcé + assert '@media (prefers-color-scheme: dark)' in _MAP_CSS + assert ':root:not([data-theme="light"])' in _MAP_CSS + assert ':root[data-theme="dark"]' in _MAP_CSS + for cls in (".btn-primary", ".btn-ghost", ".btn-icon", ".field", ".seg", ".hint"): + assert cls in _MAP_CSS, cls + assert 'id="btnTheme"' in _MAP_HTML + assert "const THEME_LS = 'lidar-theme'" in _MAP_JS and "function applyTheme(" in _MAP_JS + # Stockage local toujours protégé (navigation privée) : aucun accès + # direct à localStorage hors du bloc lsGet/lsSet/lsDel. + import re + start = _MAP_JS.index("function lsGet(") + end = _MAP_JS.index("// --- fin stockage") + outside = _MAP_JS[:start] + _MAP_JS[end:] + assert not re.search(r"localStorage\.(getItem|setItem|removeItem)\(", outside) + # Code mort retiré + for gone in ("genClass", "gen-input", "genClassInfo", ".grip", "layer-row", "#gps.busy"): + assert gone not in _MAP_CSS + _MAP_HTML, gone + # Plus de couleurs d'interface écrites en dur hors des palettes + rules = _MAP_CSS[_MAP_CSS.rindex(":root[data-theme=\"dark\"]"):] + rules = rules[rules.index("}") + 1:] + for hard in ("#0b0e13", "#10141b", "#f4a261", "#4cc9f0", "#e76f51", "rgba(90, 160, 255"): + assert hard not in rules, hard diff --git a/lidar_pipeline/web/map.css b/lidar_pipeline/web/map.css index 18fdbb7..1becb97 100644 --- a/lidar_pipeline/web/map.css +++ b/lidar_pipeline/web/map.css @@ -1,18 +1,55 @@ /* Carte LiDAR — tuiles XYZ, habillage minimal type carte grand public. */ + +/* Réglages communs : toute règle y puise (couleurs, texte, arrondis, + espacements, ombres, superpositions). Deux palettes : claire par défaut, + sombre si le système le demande (sauf clair forcé) ou si elle est forcée. */ :root { - color-scheme: dark; - --bg: #0b0e13; - --card: rgba(16, 20, 27, 0.94); - --border: rgba(255, 255, 255, 0.10); - --text: #d9dee6; - --muted: #8b94a3; - --accent: #5aa9e6; - --radius: 12px; + color-scheme: light; + --bg: #eef0f3; + --surface: rgba(251, 251, 250, 0.96); + --surface-2: #eef0f3; /* champs, segments, boutons neutres */ + --border: #d6d9de; + --text: #1d232b; + --muted: #5b6573; + --accent: #1f6fb2; + --on-accent: #ffffff; + --track: #cfd4da; + --print: #d99a00; + --gen-running: #d9730d; + --gen-pending: #0b8fc0; + --gen-failed: #c8452c; + --gen-sel: var(--accent); + --fs-xs: 11px; --fs-sm: 12px; --fs-md: 13px; --fs-lg: 16px; + --r-sm: 6px; --r-md: 10px; --r-full: 999px; + --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; + --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.18); + --shadow-lg: 0 6px 24px rgba(0, 0, 0, 0.28); + --z-map-ui: 800; --z-panel: 900; --z-popup: 950; + --z-loading: 960; --z-toast: 1000; --z-modal: 1100; } +@media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) { + color-scheme: dark; + --bg: #0b0e13; --surface: rgba(16, 20, 27, 0.95); --surface-2: rgba(255, 255, 255, 0.06); + --border: rgba(255, 255, 255, 0.12); --text: #d9dee6; --muted: #8b94a3; + --accent: #5aa9e6; --on-accent: #0b0e13; --track: rgba(255, 255, 255, 0.18); + --print: #ffd166; --gen-running: #f4a261; --gen-pending: #4cc9f0; --gen-failed: #e76f51; + --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4); --shadow-lg: 0 6px 24px rgba(0, 0, 0, 0.45); + } +} +:root[data-theme="dark"] { + color-scheme: dark; + --bg: #0b0e13; --surface: rgba(16, 20, 27, 0.95); --surface-2: rgba(255, 255, 255, 0.06); + --border: rgba(255, 255, 255, 0.12); --text: #d9dee6; --muted: #8b94a3; + --accent: #5aa9e6; --on-accent: #0b0e13; --track: rgba(255, 255, 255, 0.18); + --print: #ffd166; --gen-running: #f4a261; --gen-pending: #4cc9f0; --gen-failed: #e76f51; + --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.4); --shadow-lg: 0 6px 24px rgba(0, 0, 0, 0.45); +} + * { box-sizing: border-box; margin: 0; padding: 0; } [hidden] { display: none !important; } html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); - font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } + font: var(--fs-md)/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; } #map { position: absolute; inset: 0; background: var(--bg); } .leaflet-container { background: var(--bg); font: inherit; } /* Fond OSM assombri pour laisser ressortir les rendus LiDAR. Filtre posé sur @@ -21,164 +58,158 @@ html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(- −30 % de CPU (moteur de rendu + GPU) en déplacement, mesuré sous Chrome. */ .leaflet-tile-pane .leaflet-layer.base-dark { filter: brightness(0.38) contrast(1.1) saturate(0.7); } -.card { position: fixed; z-index: 900; background: var(--card); color: var(--text); - border: 1px solid var(--border); border-radius: var(--radius); - box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); +.card { position: fixed; z-index: var(--z-panel); background: var(--surface); color: var(--text); + border: 1px solid var(--border); border-radius: var(--r-md); + box-shadow: var(--shadow-lg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); } #layercard { left: 12px; bottom: 12px; width: 320px; max-width: calc(100vw - 24px); } #tilecard { left: 12px; top: 12px; width: 340px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow-y: auto; } .info-sec { margin-top: 10px; } -.info-sec h4 { margin: 0 0 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; +.info-sec h4 { margin: 0 0 4px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); } -.info-kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; font-size: 12.5px; } +.info-kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; font-size: var(--fs-sm); } .info-kv dt { color: var(--muted); } .info-kv dd { margin: 0; overflow-wrap: anywhere; } -.info-dl { display: inline-block; margin-top: 6px; padding: 6px 10px; border-radius: 6px; - background: rgba(90, 160, 255, 0.18); color: var(--text); text-decoration: none; font-weight: 600; } -.info-dl:hover { background: rgba(90, 160, 255, 0.3); } +.info-dl { display: inline-block; margin-top: 6px; padding: 6px 10px; border-radius: var(--r-sm); + background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); text-decoration: none; font-weight: 600; } +.info-dl:hover { background: color-mix(in srgb, var(--accent) 30%, transparent); } #rose { right: 12px; bottom: 190px; padding: 8px 8px 6px; display: flex; flex-direction: column; - align-items: center; gap: 2px; z-index: 800; } + align-items: center; gap: 2px; z-index: var(--z-map-ui); } #rose canvas { width: 132px; height: 132px; } -.rose-cap { font-size: 11px; text-align: center; color: var(--text); line-height: 1.3; } -.rose-cap span { color: var(--muted); font-size: 10.5px; } -#usecard { left: 50%; top: 12px; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); z-index: 910; } +.rose-cap { font-size: var(--fs-xs); text-align: center; color: var(--text); line-height: 1.3; } +.rose-cap span { color: var(--muted); font-size: var(--fs-xs); } +#usecard { left: 50%; top: 12px; transform: translateX(-50%); width: min(560px, calc(100vw - 24px)); z-index: var(--z-popup); } .card-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); } -.card-title { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); } -.card-stat { margin-left: auto; font-size: 11px; color: var(--muted); } +.card-title { font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); } +.card-stat { margin-left: auto; font-size: var(--fs-xs); color: var(--muted); } .card-body { padding: 6px 8px 8px; max-height: min(60vh, 520px); overflow-y: auto; } #layercard.collapsed .card-body { display: none; } #layercard.collapsed #cardToggle { transform: rotate(-90deg); } .card-foot { display: flex; gap: 8px; padding: 8px 4px 2px; margin-top: 6px; border-top: 1px solid var(--border); } -button { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--border); - border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; } -button:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--accent); } -.icon-btn { border: none; background: none; color: var(--muted); padding: 2px 6px; font-size: 14px; } -.icon-btn:hover { color: var(--text); background: none; } -.link-btn { flex: 1; font-size: 11.5px; } +/* --- composants communs --------------------------------------------------- */ +.btn, button { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1); + min-height: 32px; padding: 0 var(--sp-3); border-radius: var(--r-sm); border: 1px solid var(--border); + background: var(--surface-2); color: var(--text); font: inherit; font-size: var(--fs-sm); cursor: pointer; } +.btn:hover, button:hover { border-color: var(--accent); } +.btn:disabled, button:disabled { opacity: 0.5; cursor: default; } +.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; } +.btn-primary:hover { filter: brightness(1.08); } +.btn-ghost { background: transparent; } +.btn-icon { min-height: 0; padding: var(--sp-1) var(--sp-2); border: none; background: none; + color: var(--muted); font-size: var(--fs-lg); } +.btn-icon:hover { color: var(--text); } +.row { display: flex; gap: var(--sp-2); align-items: center; } +.row > .btn, .row > .field { flex: 1; min-width: 0; } +.field { height: 32px; min-width: 0; width: 100%; padding: 0 var(--sp-2); border-radius: var(--r-sm); + border: 1px solid var(--border); background: var(--surface-2); color: var(--text); + font: inherit; font-size: var(--fs-sm); } +select.field[multiple] { height: auto; padding: var(--sp-1); } +.field option { background-color: var(--surface); color: var(--text); } +.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--border); + border-radius: var(--r-sm); overflow: hidden; } +.seg button { min-height: 32px; border: none; border-radius: 0; background: var(--surface-2); color: var(--muted); } +.seg button + button { border-left: 1px solid var(--border); } +.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; } +.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; } +.hint { font-size: var(--fs-sm); color: var(--muted); margin: var(--sp-1) 0; } +input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; + background: transparent; cursor: pointer; } +input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--track); } +input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; + margin-top: -5px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); } +input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--track); } +input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; + background: var(--accent); border: 2px solid var(--surface); } +@media (max-width: 720px) { + .btn, button, .field, .seg button { min-height: 40px; } + .field { height: 40px; } +} /* Ligne du fond de carte : œil, nom, opacité. */ -.layer-row { display: grid; grid-template-columns: 14px 24px minmax(0, 1fr) auto 34px; - align-items: center; gap: 6px; padding: 5px 4px; border-radius: 8px; user-select: none; } -.layer-ctl { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 84px; - gap: 6px; align-items: center; padding: 2px 0 2px 38px; } -.layer-row:hover { background: rgba(255, 255, 255, 0.05); } +.base-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; + gap: var(--sp-2); padding: var(--sp-1) 0; } +.base-row .base-ctl { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 40px; + gap: var(--sp-2); align-items: center; } /* Affichage : une couche principale, la précision seule ou superposée. */ .view-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 8px 4px 4px; border-top: 1px solid var(--border); margin-top: 4px; } -.view-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); } +.view-label { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); } .view-row .layer-name { color: var(--text); } -.view-sel { background: rgba(255, 255, 255, 0.06); color: var(--text); border: 1px solid var(--border); - border-radius: 6px; padding: 2px 4px; font: inherit; font-size: 12px; min-width: 0; width: 100%; height: 24px; } -.view-sel option { background-color: #10141b; color: var(--text); } -.mode-seg { display: grid; grid-template-columns: repeat(3, 1fr); margin: 6px 4px 2px; - border: 1px solid var(--border); border-radius: 8px; overflow: hidden; } -.mode-seg button { border: none; border-radius: 0; background: rgba(255, 255, 255, 0.04); - color: var(--muted); padding: 6px 4px; font-size: 12px; } -.mode-seg button + button { border-left: 1px solid var(--border); } -.mode-seg button:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); } -.mode-seg button[aria-pressed="true"] { background: var(--accent); color: #0b0e13; font-weight: 600; } -.mode-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; } .prec-ctl { display: grid; grid-template-columns: auto minmax(0, 1fr) 34px; gap: 8px; - align-items: center; padding: 6px 4px 0; font-size: 11.5px; color: var(--muted); } + align-items: center; padding: 6px 4px 0; font-size: var(--fs-xs); color: var(--muted); } .prec-legend { padding: 8px 4px 2px; } .prec-bar { display: grid; grid-template-columns: repeat(16, 1fr); height: 10px; border: 1px solid var(--border); border-radius: 3px; overflow: hidden; } -.prec-ticks { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); +.prec-ticks { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; } -.prec-cap { font-size: 10.5px; color: var(--muted); margin-top: 2px; } -.grip { color: var(--muted); cursor: grab; text-align: center; font-size: 12px; } -.grip::before { content: '⠿'; } -#baseRow .grip::before { content: ''; } +.prec-cap { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; } .eye { width: 24px; height: 24px; padding: 0; border: none; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; } .eye.on { color: var(--accent); } .eye svg { width: 16px; height: 16px; } -.layer-name { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.layer-row.on .layer-name { color: var(--text); } -.pct { font-size: 10.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; } -input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; - background: transparent; cursor: pointer; } -input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.18); } -input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; - background: var(--accent); margin-top: -4.5px; border: 2px solid #0b0e13; } -input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,0.18); } -input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid #0b0e13; } +.layer-name { font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.pct { font-size: var(--fs-xs); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; } -#tools { position: fixed; right: 12px; bottom: 12px; z-index: 900; display: flex; flex-direction: column; gap: 6px; } -#tools button { width: 38px; height: 38px; padding: 0; font-size: 17px; background: var(--card); - border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,0.4); } -#gps.busy { color: var(--accent); border-color: var(--accent); } +#tools { position: fixed; right: 12px; bottom: 12px; z-index: var(--z-panel); display: flex; flex-direction: column; gap: 6px; } +#tools button { width: 38px; height: 38px; padding: 0; font-size: var(--fs-lg); background: var(--surface); + border: 1px solid var(--border); box-shadow: var(--shadow-sm); } /* Indicateur de chargement : tuiles restantes pour finir la vue courante (fond + LiDAR), barre de progression du lot en cours. */ -.tileload { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 905; - display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; - background: var(--card); border: 1px solid var(--border); font-size: 12px; - box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); pointer-events: none; +.tileload { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: var(--z-loading); + display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: var(--r-full); + background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); + box-shadow: var(--shadow-sm); pointer-events: none; transition: opacity 0.3s ease; white-space: nowrap; } .tileload.done { opacity: 0; } -.tl-spin { width: 12px; height: 12px; border-radius: 50%; flex: none; - border: 2px solid rgba(90, 169, 230, 0.25); border-top-color: var(--accent); +.tl-spin { width: 12px; height: 12px; border-radius: var(--r-full); flex: none; + border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: tlspin 0.8s linear infinite; } .tileload.done .tl-spin { animation: none; border-color: var(--accent); } @keyframes tlspin { to { transform: rotate(360deg); } } -.tl-bar { width: 60px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); +.tl-bar { width: 60px; height: 4px; border-radius: var(--r-sm); background: var(--track); overflow: hidden; flex: none; } .tl-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s ease; } -.toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 1000; - background: var(--card); border: 1px solid var(--border); border-radius: 8px; - padding: 7px 12px; font-size: 12px; color: var(--text); max-width: 80vw; text-align: center; } +.toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: var(--z-toast); + background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); + padding: 7px 12px; font-size: var(--fs-sm); color: var(--text); max-width: 80vw; text-align: center; } -.meta { font-size: 11.5px; color: var(--muted); margin: 2px 0; } +.meta { font-size: var(--fs-xs); color: var(--muted); margin: 2px 0; } .meta b { color: var(--text); font-weight: 600; } -.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11px; - background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 6px; +.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--fs-xs); + background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 8px; word-break: break-all; margin: 4px 0 8px; } -.use-row { display: flex; gap: 6px; align-items: center; margin-bottom: 2px; } -.use-row select { flex: 1; min-width: 0; background: rgba(255,255,255,0.06); color: var(--text); - border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; font: inherit; font-size: 12px; } -.use-note { font-size: 11px; color: var(--muted); line-height: 1.5; } -.leaflet-control-attribution { background: rgba(11,14,19,0.8) !important; color: var(--muted) !important; } +.use-note { font-size: var(--fs-xs); color: var(--muted); line-height: 1.5; } +.leaflet-control-attribution { background: var(--surface) !important; color: var(--muted) !important; } .leaflet-control-attribution a { color: var(--accent) !important; } /* --- génération de tuiles ------------------------------------------------ */ #gencard { right: 12px; top: 56px; width: 340px; max-width: calc(100vw - 24px); } #printcard { right: 60px; bottom: 12px; width: 340px; max-width: calc(100vw - 84px); } -#printTitle { flex: 1; min-width: 0; background: rgba(255,255,255,0.06); color: var(--text); - border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 4px 6px; } -.print-hint { margin: 4px 0; font-size: 12px; opacity: 0.75; } -.print-msg { font-size: 12px; margin-left: 8px; } +.print-msg { font-size: var(--fs-sm); margin-left: 8px; } .print-handle { display: flex; align-items: center; justify-content: center; cursor: move; - font-size: 20px; color: #1b1b1b; background: #ffd166; border: 2px solid #1b1b1b; - border-radius: 50%; box-shadow: 0 1px 6px rgba(0,0,0,0.5); } + font-size: var(--fs-lg); color: #1b1b1b; background: var(--print); border: 2px solid #1b1b1b; + border-radius: var(--r-full); box-shadow: 0 1px 6px rgba(0,0,0,0.5); } body.drawing { cursor: crosshair !important; } body.drawing .leaflet-container { cursor: crosshair !important; } /* Barre de génération : en HAUT à droite de l'écran, boutons accentués — c'est l'entrée principale du traitement, elle ne se confond pas avec les icônes de navigation (zoom/GPS) du coin bas droit. */ -#gentools { position: fixed; top: 12px; right: 12px; z-index: 900; display: flex; gap: 8px; } -#gentools button { background: var(--card); color: var(--accent); border: 1px solid var(--accent); - border-radius: 10px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600; - box-shadow: 0 4px 16px rgba(0,0,0,0.4); } -#gentools button:hover { background: var(--accent); color: #0b0e13; } -#gentools button.accent { background: var(--accent); color: #0b0e13; } +#gentools { position: fixed; top: 12px; right: 12px; z-index: var(--z-panel); display: flex; gap: 8px; } +#gentools button { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); + border-radius: var(--r-md); padding: 8px 14px; font: inherit; font-size: var(--fs-md); font-weight: 600; + box-shadow: var(--shadow-sm); } +#gentools button:hover { background: var(--accent); color: var(--on-accent); } +#gentools button.accent { background: var(--accent); color: var(--on-accent); } .gen-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px; - align-items: center; margin: 4px 0; font-size: 11.5px; color: var(--muted); } -#genViz { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border); - border-radius: 6px; padding: 3px 4px; font: inherit; font-size: 11.5px; } -#genViz option { background-color: #10141b; } -#genClass, .gen-input { background: rgba(255,255,255,0.06); color: var(--text); - border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; - font: inherit; font-size: 11.5px; width: 100%; height: 24px; } -.chk { display: flex; gap: 7px; align-items: center; font-size: 11.5px; + align-items: center; margin: 4px 0; font-size: var(--fs-xs); color: var(--muted); } +.chk { display: flex; gap: 7px; align-items: center; font-size: var(--fs-xs); color: var(--muted); margin: 4px 0; cursor: pointer; } .chk input { accent-color: var(--accent); } -button.primary { background: var(--accent); border-color: var(--accent); color: #0b0e13; font-weight: 600; } -button.primary:hover { filter: brightness(1.12); } -.gen-log { font: 10.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); - background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-radius: 6px; +.gen-log { font: var(--fs-xs)/1.5 ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); + background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 8px; max-height: 130px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; margin: 6px 0; } #tools button.accent { color: var(--accent); border-color: var(--accent); } @@ -186,10 +217,10 @@ button.primary:hover { filter: brightness(1.12); } /* Cadres des dalles du run : orange pulsant = rendu en cours, bleu = en attente, rouge = échec. Les dalles faites n'ont pas de cadre. */ @keyframes genpulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } } -.gen-frame-running { stroke: #f4a261; fill: #f4a26122; animation: genpulse 1.4s ease-in-out infinite; } -.gen-frame-pending { stroke: #4cc9f0; fill: #4cc9f014; stroke-dasharray: 6 4; } -.gen-frame-failed { stroke: #e76f51; fill: #e76f5133; } -.gen-sel { stroke: var(--accent); fill: #5aa9e61f; cursor: pointer; } +.gen-frame-running { stroke: var(--gen-running); fill: color-mix(in srgb, var(--gen-running) 13%, transparent); animation: genpulse 1.4s ease-in-out infinite; } +.gen-frame-pending { stroke: var(--gen-pending); fill: color-mix(in srgb, var(--gen-pending) 8%, transparent); stroke-dasharray: 6 4; } +.gen-frame-failed { stroke: var(--gen-failed); fill: color-mix(in srgb, var(--gen-failed) 20%, transparent); } +.gen-sel { stroke: var(--accent); fill: color-mix(in srgb, var(--accent) 12%, transparent); cursor: pointer; } @media (max-width: 720px) { #layercard { width: calc(100vw - 24px); } #tilecard { width: calc(100vw - 24px); } diff --git a/lidar_pipeline/web/map.html b/lidar_pipeline/web/map.html index c7b99bc..c366fc8 100644 --- a/lidar_pipeline/web/map.html +++ b/lidar_pipeline/web/map.html @@ -13,27 +13,26 @@
- + Couches
-
- +
Fond OpenStreetMap -
+
Affichage - +
@@ -63,7 +62,7 @@ @@ -76,7 +75,7 @@ @@ -85,23 +84,23 @@
Export PDF - +
-
- -
-
- -
-
-
+
+
@@ -110,19 +109,18 @@
Génération - +
Dessinez une zone (+) ou complétez les dalles existantes (⤒).
Couches -
+
Sol : classification IGN · bords raccordés aux dalles voisines (bande 100 m)
-
- +