/*
 * Habillage "dynmap" de RecubeDynmap : reprend l'apparence du Dynmap d'origine (carte plein ecran sur fond
 * noir, barre laterale a droite, horloge en haut au centre, boite de position, bulles blanches). Feuille
 * ecrite pour ce mod, aucune regle ni image n'est reprise de Dynmap.
 *
 * Les modes de la carte (General, Meteo, Ressources) suivent l'interface de carte de NationsGlory : pastilles
 * sombres en haut, panneau sombre a droite.
 */

/* ---------- Page ---------- */
html, body { height: 100%; margin: 0; background: #000; overflow: hidden; }
body.dynmap { font: 11px sans-serif; color: #fff; }
.dynmap .map { position: absolute; inset: 0; background: #000; z-index: 0; }
.dynmap img { image-rendering: pixelated; }
.dynmap [hidden] { display: none !important; }
.dynmap button { font: inherit; }

/* ---------- Leaflet aux couleurs de Dynmap ---------- */
.dynmap .leaflet-container { background: #000; font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; }
.dynmap .leaflet-tile { image-rendering: pixelated; }
.dynmap .leaflet-top.leaflet-left { z-index: 1000; }

.dynmap .leaflet-bar { border: none; border-radius: 4px; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65); }
.dynmap .leaflet-bar a, .dynmap .leaflet-touch .leaflet-bar a {
  width: 22px; height: 22px; line-height: 22px; background-color: #eee; color: #000;
  border-bottom: 1px solid #ccc; font: bold 18px/22px "Lucida Console", Monaco, monospace; text-indent: 0;
}
.dynmap .leaflet-bar a:hover, .dynmap .leaflet-bar a:focus-visible { background-color: #fff; }
.dynmap .leaflet-bar a:last-child { border-bottom: none; }
.dynmap .leaflet-bar a.leaflet-disabled { background-color: #ddd; color: #aaa; }
.dynmap .leaflet-touch .leaflet-control-layers, .dynmap .leaflet-touch .leaflet-bar { border: none; }

.dynmap .leaflet-control-layers {
  background: #bbb; border: none; border-radius: 5px; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); color: #222;
}
.dynmap .leaflet-control-layers-toggle, .dynmap .leaflet-touch .leaflet-control-layers-toggle { width: 36px; height: 36px; }
.dynmap .leaflet-control-layers-expanded { padding: 6px 10px 6px 6px; }
.dynmap .leaflet-control-layers label { font-size: 12px; line-height: 20px; }
.dynmap .leaflet-control-layers-selector { margin-top: 3px; }

.dynmap .leaflet-control-attribution {
  margin-right: 20px !important; padding: 0 5px; background: rgba(255, 255, 255, 0.7); color: #333; font-size: 11px;
}
.dynmap .leaflet-control-attribution a { color: #0078a8; text-decoration: underline; }

/* Bulle d'un pays : la bulle blanche de Leaflet, coins tres ronds, texte noir. */
.dynmap .leaflet-popup { color: #000; }
.dynmap .leaflet-popup-content-wrapper { border-radius: 20px; background: #fff; color: #000; box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4); }
.dynmap .leaflet-popup-content { margin: 14px 20px; line-height: 1.4; font-size: 12px; }
.dynmap .leaflet-popup-tip { background: #fff; box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4); }
.dynmap .leaflet-container a.leaflet-popup-close-button {
  top: 4px; right: 6px; width: 18px; height: 18px; font: bold 16px/16px Tahoma, Verdana, sans-serif; color: #c3c3c3;
}
.dynmap .leaflet-container a.leaflet-popup-close-button:hover { color: #999; }
.infowindow { padding: 1rem; min-width: 190px; max-width: 300px; overflow-wrap: anywhere; }
.infowindow hr { border: 0; border-top: 1px solid #999; margin: 6px 0; }
.infowindow .iw-name { font-size: 140%; font-weight: bold; }
.infowindow .iw-age { font-size: 80%; }
.infowindow .iw-desc { font-style: italic; }
.infowindow .iw-title { font-weight: bold; }
.infowindow .iw-flag { width: 39px; height: auto; margin-right: 6px; vertical-align: -4px; border: 1px solid rgba(0, 0, 0, 0.35); }
.infowindow .iw-head { width: 20px; height: 20px; vertical-align: middle; }
.infowindow .iw-rank { color: #666; font-size: 90%; }
.infowindow .iw-online { display: inline-block; width: 6px; height: 6px; margin-right: 3px; border-radius: 50%; background: #2a9d3a; vertical-align: 1px; }
.infowindow .iw-note { color: #666; font-size: 90%; }
.infowindow .iw-members { display: block; max-height: 150px; overflow-y: auto; }
.infowindow button.iw-retry { margin-top: 4px; padding: 1px 8px; border: 1px solid #999; border-radius: 4px; background: #eee; cursor: pointer; }

/* Etiquette au survol d'un marqueur : texte blanc sur noir a 60 %. */
.dynmap .leaflet-tooltip.dm-tip {
  padding: 2px; border: none; border-radius: 3px; background: rgba(0, 0, 0, 0.6); color: #fff; box-shadow: none;
  font: 11px sans-serif; white-space: nowrap;
}
.dynmap .leaflet-tooltip.dm-tip::before { display: none; }

/* ---------- Boite de position ---------- */
.dynmap .coord-control {
  min-width: 80px; padding: 2px 3px; border: 1px solid rgba(128, 128, 128, 0.6); border-radius: 5px;
  background-color: #bbb; color: #000; font: 11px sans-serif; box-shadow: none;
}
.dynmap .coord-control-value { font-weight: bold; }
/* Mode Meteo avec fuseaux horaires : heure locale du point survole. */
.dynmap .coord-control-local { margin-top: 1px; white-space: nowrap; }

/* ---------- Bouton de lien ---------- */
.dynmap .link-control { display: flex; align-items: center; gap: 4px; }
.dynmap .link-button {
  width: 21px; height: 21px; padding: 0; border: 1px solid rgba(128, 128, 128, 0.6); border-radius: 5px;
  background: #bbb url(img/link.svg) no-repeat center / 14px 14px; cursor: pointer;
}
.dynmap .link-button:hover, .dynmap .link-button:focus-visible { background-color: #ddd; }
.dynmap .link-input {
  width: min(430px, 70vw); padding: 2px 4px; border: 1px solid rgba(128, 128, 128, 0.6); border-radius: 5px;
  background: #eee; color: #000; font: 11px sans-serif;
}

/* ---------- Horloge ---------- */
.largeclock {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1050; width: 150px; height: 60px; margin: auto;
  border: solid rgba(0, 0, 0, 0.5); border-width: 0 1px 1px; border-radius: 0 0 3px 3px;
  background: rgba(0, 0, 0, 0.6); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); pointer-events: none;
}
.largeclock .sky { position: absolute; inset: 0; overflow: hidden; }
.largeclock .timeofday {
  position: absolute; left: 0; top: 0; width: 24px; height: 24px; margin: -12px 0 0 -12px;
  background: no-repeat center / 24px 24px; will-change: transform;
}
.largeclock .timeofday.sun { background-image: url(img/sun.svg); }
.largeclock .timeofday.moon { background-image: url(img/moon.svg); }
.largeclock .digitalclock {
  position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font: bold 20px/24px sans-serif;
  transition: color 8s linear;
}
.largeclock .digitalclock.day { color: #fd3; }
.largeclock .digitalclock.night { color: #dff; }
.largeclock .weather { position: absolute; top: 5px; right: 0; width: 32px; height: 32px; background: no-repeat center / 32px 32px; }
.weather.clear_day { background-image: url(img/weather_clear_day.svg); }
.weather.clear_night { background-image: url(img/weather_clear_night.svg); }
.weather.rain_day { background-image: url(img/weather_rain_day.svg); }
.weather.rain_night { background-image: url(img/weather_rain_night.svg); }
.weather.thunder_day { background-image: url(img/weather_thunder_day.svg); }
.weather.thunder_night { background-image: url(img/weather_thunder_night.svg); }

/* ---------- Rose des vents ---------- */
.compass {
  position: absolute; top: 10px; right: 21px; z-index: 1010; width: 105px; height: 105px;
  background: url(img/compass.svg) no-repeat center / contain; pointer-events: none;
}

/* ---------- Alerte ---------- */
.alertbox {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2000; width: 50%; margin: auto; padding: 8px;
  border: solid #a00; border-width: 0 1px 1px; border-radius: 0 0 3px 3px; background: #c00; color: #fff;
  font: bold 16px sans-serif; text-align: center; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* ---------- Barre laterale ---------- */
.sidebar {
  position: absolute; top: 0; right: 0; z-index: 1200; width: 200px; height: 100%; margin-right: -201px;
  border-left: 1px solid rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.6); color: #fff;
  transition: margin-right 0.6s ease-in-out;
}
.sidebar:hover, .sidebar.pinned { margin-right: 0; }
.sidebar .hitbar {
  position: absolute; top: 0; left: -18px; width: 16px; height: 100%; padding: 0; cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.6) url(img/sidebar_hint.svg) no-repeat center / 6px 10px;
  transition: opacity 0.6s ease-in-out;
}
/* Au survol, la languette reste sous la souris (invisible) : la barre elle-meme est hors de l ecran tant qu elle
   n a pas glisse, et c est la languette qui tient le survol. */
.sidebar:hover .hitbar { opacity: 0; }
.sidebar.pinned .hitbar { opacity: 0; pointer-events: none; }
.sidebar .panel { position: relative; display: flex; flex-direction: column; height: 100%; box-sizing: border-box; padding: 0 0 8px; }
.sidebar .pin {
  position: absolute; top: 7px; right: 8px; z-index: 1; width: 16px; height: 16px; padding: 0; border: 0; cursor: pointer;
  background: url(img/pin_off.svg) no-repeat center / 16px 16px; opacity: 0.8;
}
.sidebar .pin:hover, .sidebar .pin:focus-visible { opacity: 1; }
.sidebar.pinned .pin { background-image: url(img/pin_on.svg); opacity: 1; }
.sidebar fieldset { min-width: 0; margin: 0; padding: 0 9px 6px; border: none; border-top: 1px solid rgba(196, 196, 196, 0.4); }
.sidebar fieldset + fieldset { margin-top: 10px; display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.sidebar legend { padding: 8px 4px; font-weight: bold; color: #fff; }
.sidebar ul, .sidebar li { margin: 0; padding: 0; list-style: none; }
.sidebar .scrollup, .sidebar .scrolldown {
  display: block; width: 100%; height: 18px; padding: 0; cursor: pointer;
  border: 1px solid rgba(64, 64, 64, 0.6); border-radius: 2px; background: rgba(32, 32, 32, 0.6) no-repeat center / 10px 7px;
}
.sidebar .scrollup { margin-bottom: 4px; background-image: url(img/scroll_up.svg); }
.sidebar .scrolldown { margin-top: 4px; background-image: url(img/scroll_down.svg); }
.sidebar .scrollup:hover, .sidebar .scrolldown:hover { border-color: rgba(128, 128, 128, 0.6); background-color: rgba(64, 64, 64, 0.6); }
.sidebar .scrollup:active, .sidebar .scrolldown:active { border-color: rgba(255, 255, 255, 0.5); background-color: rgba(128, 128, 128, 0.5); }
.sidebar .worldlist { max-height: 46vh; overflow: hidden; }
.sidebar .playerlist { overflow: hidden; min-height: 20px; flex: 1 1 auto; }

.sidebar .world { clear: both; padding: 6px 0 2px; border-bottom: 1px solid rgba(128, 128, 128, 0.3); line-height: 18px; font-weight: bold; }
.sidebar .world .world-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .maplist { display: flex; flex-wrap: wrap; }
.sidebar .maplist .maptype {
  width: 18px; height: 18px; margin: 5px 2px; padding: 2px; cursor: pointer;
  border: 1px solid rgba(64, 64, 64, 0.6); border-radius: 3px;
  background: rgba(32, 32, 32, 0.6) url(img/map_flat.svg) no-repeat center / 18px 18px;
}
.sidebar .maplist .maptype:hover, .sidebar .maplist .maptype:focus-visible { border-color: rgba(128, 128, 128, 0.6); background-color: rgba(64, 64, 64, 0.6); }
.sidebar .maplist .maptype.selected { border-color: rgba(255, 255, 255, 0.5); background-color: rgba(128, 128, 128, 0.5); }

.sidebar .player {
  display: flex; align-items: center; width: 100%; box-sizing: border-box; padding: 4px 0; cursor: pointer;
  border: 3px solid transparent; background: none; color: #fff; text-align: left;
}
.sidebar .player:hover, .sidebar .player:focus-visible { background: rgba(64, 64, 64, 0.6); }
.sidebar .player.otherworld { opacity: 0.5; }
.sidebar .player.following { padding: 6px 2px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 3px; background: rgba(128, 128, 128, 0.5); }
.sidebar .player img { width: 16px; height: 16px; margin: 0 4px 0 2px; flex: none; }
.sidebar .player span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .empty { padding: 4px 2px; color: rgba(255, 255, 255, 0.6); }

/* ---------- Joueurs sur la carte ---------- */
.dynmap .playerMarker { transition: transform 0.6s ease-in-out; }
.dynmap .leaflet-zoom-anim .playerMarker, .dynmap .leaflet-dragging .playerMarker { transition: none; }
.dynmap .playerMarker img { width: 32px; height: 32px; display: block; }
.dynmap .playerMarker .playerName {
  position: absolute; top: 7px; left: 36px; padding: 2px; border-radius: 3px; background: rgba(0, 0, 0, 0.6);
  color: #fff; font: 11px sans-serif; white-space: nowrap;
}

/* ---------- Pays ---------- */
.dynmap .home-flag { position: relative; width: 30px; height: 22px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.7)); }
.dynmap .home-flag::before { content: ""; position: absolute; left: 1px; top: 0; width: 2px; height: 22px; background: #3b2a1a; }
.dynmap .home-flag img { position: absolute; left: 3px; top: 1px; width: 26px; height: 13px; outline: 1px solid rgba(0, 0, 0, 0.55); }
.dynmap .home-red { width: 16px; height: 16px; background: url(img/flag_red.svg) no-repeat center / 16px 16px; }
.dynmap .country-flag img { display: block; width: 26px; height: 13px; outline: 1px solid rgba(0, 0, 0, 0.6); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7); }
.dynmap .country-label span {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none;
  font: bold 12px/1 sans-serif; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000, 0 0 1px #000;
}
/* Nom d'un pays de l'atlas : juste sous son point d'ancrage, le drapeau est juste au-dessus. */
.dynmap .territory-label span { transform: translate(-50%, 3px); }

/* ---------- Boutons de mode ---------- */
.modes {
  position: absolute; top: 68px; left: 50%; z-index: 1040; display: flex; gap: 8px; transform: translateX(-50%);
  font: 500 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.modes.noclock { top: 16px; }
.modes button {
  display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 16px; cursor: pointer;
  border: 1px solid #52525c; border-radius: 6px; background: #27272a; color: #e4e4e7; font: inherit; white-space: nowrap;
}
.modes button:hover, .modes button:focus-visible { background: #3f3f46; }
.modes button svg { width: 16px; height: 16px; flex: none; }
.modes button[aria-selected="true"][data-mode="general"] { background: #2b7fff; border-color: #51a2ff; color: #162456; }
.modes button[aria-selected="true"][data-mode="weather"] { background: #00d3f2; border-color: #00b8db; color: #053345; }
.modes button[aria-selected="true"][data-mode="resources"] { background: #00c950; border-color: #05df72; color: #032e15; }

/* ---------- Panneau du mode ---------- */
.modepanel {
  position: absolute; top: 124px; right: 30px; z-index: 1030; width: 300px; max-width: calc(100vw - 60px);
  max-height: calc(100vh - 170px); overflow-y: auto; box-sizing: border-box;
  border: 1px solid #3f3f46; border-radius: 6px; background: #18181b; color: #fafafa;
  font: 13px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: right 0.6s ease-in-out;
}
.dynmap.sidebar-pinned .modepanel { right: 230px; }
.modepanel h2 { margin: 0; padding: 14px 16px; font-size: 15px; font-weight: 600; background: #27272a; border-bottom: 1px solid #3f3f46; }
.modepanel .mp-empty { margin: 0; padding: 14px 16px; color: #9f9fa9; }
.modepanel .mp-note { margin: 0; padding: 8px 16px 12px; color: #9f9fa9; font-size: 12px; }
.modepanel button.mp-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; cursor: pointer; text-align: left;
  border: 0; border-bottom: 1px solid #3f3f46; background: #27272a; color: inherit; font: inherit;
}
.modepanel button.mp-row:last-of-type { border-bottom: 0; }
.modepanel button.mp-row:hover, .modepanel button.mp-row:focus-visible { background: #323238; }
.modepanel .mp-icon {
  display: flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px;
  border: 2px solid var(--c, #9f9fa9); border-radius: 50%; background: #18181b; color: var(--c, #9f9fa9);
}
.modepanel .mp-icon svg { width: 18px; height: 18px; }
.modepanel .mp-text { min-width: 0; }
.modepanel .mp-title { display: block; font-size: 14px; }
.modepanel .mp-sub { display: block; color: #9f9fa9; font-size: 12px; }
.modepanel .mp-time { display: block; color: #71717b; font-size: 11px; }
.modepanel .mp-swatch { flex: none; width: 10px; height: 10px; border-radius: 2px; background: var(--c, #9f9fa9); }
.modepanel .mp-dots { margin-left: auto; display: flex; flex-direction: column; gap: 3px; }

/* Fiche d'une region ou d'un biome. */
.modepanel .card-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; background: #fdc700; color: #18181b; }
.modepanel .card-head h2 { flex: 1; padding: 0; border: 0; background: none; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.modepanel .card-icon { flex: none; width: 30px; height: 30px; border-radius: 4px; image-rendering: auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
.modepanel .card-close {
  flex: none; width: 28px; height: 28px; padding: 0; cursor: pointer; border: 0; border-radius: 4px;
  background: #27272a; color: #fafafa; font: 16px/28px sans-serif;
}
.modepanel .card-close:hover, .modepanel .card-close:focus-visible { background: #3f3f46; }
.modepanel .card-body { padding: 6px 16px 16px; }
.modepanel .card-section { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; color: #9f9fa9; font-size: 12px; text-transform: uppercase; letter-spacing: 0.02em; }
.modepanel .card-section svg { width: 14px; height: 14px; flex: none; }
.modepanel .card-box { border: 1px solid #3f3f46; border-radius: 6px; background: #27272a; }
.modepanel .card-line { display: flex; align-items: center; gap: 8px; padding: 9px 10px; }
.modepanel .card-line + .card-line { border-top: 1px solid #3f3f46; }
.modepanel .card-line svg { width: 15px; height: 15px; flex: none; }
.modepanel .card-line .card-label { flex: 1; }
.modepanel .card-line .card-value { color: #d4d4d8; font-variant-numeric: tabular-nums; }
.modepanel .card-muted { margin: 8px 0 0; color: #9f9fa9; font-size: 12px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.dots.solar i { background: #3f3f47; }
.dots.solar i.on { background: #e5a000; }
.dots.oil i.on { background: #fafafa; }
.dots.gas i.on { background: #ff8904; }

/* Etiquette sombre des marqueurs des modes ("Biome Desert"). */
.dynmap .leaflet-tooltip.ng-tip {
  padding: 8px 14px; border: 1px solid #3f3f46; border-radius: 6px; background: #27272a; color: #fafafa; box-shadow: none;
  font: 500 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; white-space: nowrap;
}
.dynmap .leaflet-tooltip.ng-tip::before { display: none; }

/* Marqueur de biome. */
.dynmap .biome-marker {
  width: 14px; height: 14px; box-sizing: border-box; border: 2px solid #fff; border-radius: 50%;
  background: var(--c, #808080); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.6);
}
.dynmap .biome-marker.selected { box-shadow: 0 0 0 2px #fdc700, 0 1px 3px rgba(0, 0, 0, 0.6); }
/* Le marqueur est centre sur son point, quelle que soit sa taille. */
.dynmap .biome-pin .biome-marker { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); }
/* Avec une icone de biome : l'image seule, sans pastille, dont la taille suit le zoom. */
.dynmap .biome-marker.biome-icon {
  width: var(--biome-size, 24px); height: var(--biome-size, 24px); border: 0; border-radius: 4px; background: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.dynmap .biome-marker.biome-icon img { display: block; width: 100%; height: 100%; border-radius: 4px; image-rendering: auto; }
.dynmap .biome-marker.biome-icon.selected { box-shadow: 0 0 0 2px #fdc700, 0 1px 3px rgba(0, 0, 0, 0.7); }

/* Pastille d'un evenement : coeur, pastille de niveau, halo et deux ondes. */
.dynmap .wx { position: relative; width: 48px; height: 48px; }
.dynmap .wx-core {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--c); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.dynmap .wx-core svg { width: 22px; height: 22px; }
.dynmap .wx-level {
  position: absolute; right: -4px; bottom: -4px; z-index: 3; width: 16px; height: 16px; box-sizing: border-box;
  border: 1px solid #09090b; border-radius: 4px; background: #52525c; color: #fff;
  font: bold 10px/14px system-ui, sans-serif; text-align: center;
}
.dynmap .wx-halo, .dynmap .wx-wave {
  position: absolute; left: 50%; top: 50%; z-index: 1; width: var(--halo, 140px); height: var(--halo, 140px);
  margin: calc(var(--halo, 140px) / -2) 0 0 calc(var(--halo, 140px) / -2); border-radius: 50%; pointer-events: none;
}
.dynmap .wx-halo { background: var(--h); opacity: 0.12; }
.dynmap .wx-wave { background: var(--h); opacity: 0; animation: wx-wave 2.4s ease-out infinite; }
.dynmap .wx-wave + .wx-wave { animation-delay: 1.2s; }
@keyframes wx-wave {
  0% { transform: scale(0.34); opacity: 0.3; }
  100% { transform: scale(1); opacity: 0; }
}
.dynmap .veil-image { image-rendering: auto; }

@media (prefers-reduced-motion: reduce) {
  .dynmap .wx-wave { animation: none; }
  .sidebar, .sidebar .hitbar, .modepanel, .dynmap .playerMarker { transition: none; }
}

/* ---------- Petits ecrans ---------- */
@media (max-width: 700px) {
  .compass { display: none; }
  /* Pas de souris sur un petit ecran : la boite de position laisse la place aux boutons de mode. */
  .dynmap .coord-control { display: none; }
  .modes { gap: 4px; }
  .modes button { padding: 0 9px; gap: 5px; }
  .modepanel { top: auto; bottom: 34px; right: 22px; left: 10px; width: auto; max-width: none; max-height: 42vh; }
  .dynmap.sidebar-pinned .modepanel { right: 22px; }
}
