/* Globe 3D War-Land : feuille de style partagee par ChangerDeMonde.php et CarteMonde.php */
.wl-earth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.92fr);
    gap: 14px;
    align-items: stretch;
}
.wl-earth-stage {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    height: 430px;
    background:
        radial-gradient(circle at 22% 18%, rgba(56, 189, 248, 0.14) 0%, transparent 42%),
        radial-gradient(circle at 78% 82%, rgba(99, 102, 241, 0.14) 0%, transparent 45%),
        radial-gradient(1.5px 1.5px at 14% 24%, rgba(255,255,255,0.75) 50%, transparent 100%),
        radial-gradient(1px 1px at 31% 12%, rgba(255,255,255,0.6) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 56% 19%, rgba(186,230,253,0.85) 50%, transparent 100%),
        radial-gradient(1px 1px at 73% 14%, rgba(255,255,255,0.65) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 87% 32%, rgba(255,255,255,0.8) 50%, transparent 100%),
        radial-gradient(1px 1px at 19% 68%, rgba(255,255,255,0.55) 50%, transparent 100%),
        radial-gradient(1.5px 1.5px at 84% 72%, rgba(186,230,253,0.7) 50%, transparent 100%),
        radial-gradient(1px 1px at 42% 86%, rgba(255,255,255,0.6) 50%, transparent 100%),
        linear-gradient(160deg, #020617 0%, #07132c 55%, #0f172a 100%);
    border: 2px solid #1e293b;
    box-shadow: inset 0 0 42px rgba(14, 165, 233, 0.16), 0 12px 28px rgba(15, 23, 42, 0.28);
    user-select: none;
    touch-action: none;
}
.wl-earth-viewport { position: absolute; inset: 0; width: 100%; height: 100%; }
.wl-earth-canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.wl-earth-pins { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wl-earth-weather-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 8; }
.wl-earth-wx-node {
    position: absolute; top: 0; left: 0;
    width: 94px; height: 76px;
    pointer-events: none;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.22s ease, filter 0.22s ease;
    will-change: transform, opacity;
}
.wl-earth-wx-node.is-dimmed { opacity: 0.16 !important; filter: grayscale(0.75); }
.wl-earth-wx-node svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 3px 8px rgba(2, 6, 23, 0.72)); }
@keyframes wlWxDrift {
    0%, 100% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
}
@keyframes wlWxRainFall {
    0% { transform: translateY(-4px); opacity: 0.9; }
    100% { transform: translateY(10px); opacity: 0.15; }
}
@keyframes wlWxBoltFlash {
    0%, 72%, 80%, 100% { opacity: 0.15; }
    74%, 84% { opacity: 1; filter: drop-shadow(0 0 6px #fde047); }
}
@keyframes wlWxSunSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.wl-wx-clouds { animation: wlWxDrift 5.2s ease-in-out infinite; }
.wl-wx-clouds-slow { animation: wlWxDrift 7.5s ease-in-out infinite reverse; }
.wl-wx-rain { animation: wlWxRainFall 0.85s linear infinite; }
.wl-wx-bolt { animation: wlWxBoltFlash 2.6s ease-in-out infinite; }
.wl-wx-rays { transform-box: fill-box; transform-origin: center; animation: wlWxSunSpin 16s linear infinite; }
button.wl-earth-pin.is-dimmed { opacity: 0.28 !important; }
button.wl-earth-pin.is-wx-sun { border-color: #4ade80; }
button.wl-earth-pin.is-wx-cloud { border-color: #fbbf24; }
button.wl-earth-pin.is-wx-storm { border-color: #f87171; background: rgba(69, 10, 10, 0.88); }
.wl-pin-wx {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 0 5px; border-radius: 999px; font-size: 0.64rem; font-weight: 900;
}
.wl-pin-wx.is-sun { background: rgba(34, 197, 94, 0.25); color: #bbf7d0; }
.wl-pin-wx.is-cloud { background: rgba(245, 158, 11, 0.28); color: #fde68a; }
.wl-pin-wx.is-storm { background: rgba(239, 68, 68, 0.34); color: #fecaca; }
button.wl-earth-pin {
    position: absolute; top: 0; left: 0;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px 3px 4px; border-radius: 999px;
    background: rgba(15, 23, 42, 0.84);
    border: 1.5px solid rgba(148, 163, 184, 0.65);
    color: #f8fafc; font-family: inherit; font-size: 0.7rem; font-weight: 800;
    cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px); white-space: nowrap;
    user-select: none; -webkit-user-select: none; touch-action: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
button.wl-earth-pin:hover { border-color: #ffffff; background: rgba(2, 132, 199, 0.92); }
button.wl-earth-pin > * { pointer-events: none; }
button.wl-earth-pin.is-kind-mutania { border-color: #84cc16; background: rgba(34, 48, 16, 0.88); }
button.wl-earth-pin.is-kind-elite { border-color: #a855f7; background: rgba(46, 16, 101, 0.86); }
button.wl-earth-pin.is-kind-donjon { border-color: #f43f5e; background: rgba(76, 5, 25, 0.88); }
button.wl-earth-pin.is-current { border-color: #fbbf24; background: rgba(180, 83, 9, 0.9); }
button.wl-earth-pin.is-selected { border-color: #ffffff; background: rgba(14, 165, 233, 0.95); box-shadow: 0 0 0 2px #38bdf8, 0 4px 14px rgba(14, 165, 233, 0.7); }
.wl-pin-num { display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.16); padding: 1px 5px; border-radius: 999px; font-size: 0.68rem; }
.wl-pin-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
.wl-pin-fam { font-size: 0.72rem; }
.wl-pin-worms {
    display: inline-flex; align-items: center; gap: 2px;
    background: rgba(16, 185, 129, 0.28); border: 1px solid rgba(52, 211, 153, 0.65);
    color: #bbf7d0; border-radius: 999px; padding: 0 5px; font-size: 0.64rem; font-weight: 900;
}
.wl-earth-worms-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
button.wl-earth-worm-pin {
    position: absolute; top: 0; left: 0;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px; border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid #22c55e;
    color: #ffffff; font-family: inherit; font-size: 0.66rem; font-weight: 800;
    cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
    white-space: nowrap;
    user-select: none; -webkit-user-select: none; touch-action: none;
    transition: border-color 0.15s ease, filter 0.15s ease;
}
button.wl-earth-worm-pin > * { pointer-events: none; }
button.wl-earth-worm-pin:hover { filter: brightness(1.12); border-color: #ffffff; z-index: 80 !important; }
button.wl-earth-worm-pin.is-busy { border-color: #f59e0b; }
button.wl-earth-worm-pin.is-dead { border-color: #ef4444; }
button.wl-earth-worm-pin.is-active-worm {
    border-color: #fde047;
    background: rgba(180, 83, 9, 0.95);
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.65), 0 4px 14px rgba(245, 158, 11, 0.75);
}
.wl-earth-worm-pin img {
    width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: block; flex-shrink: 0;
}
.wl-earth-worm-pin.is-active-worm img { width: 26px; height: 26px; }
button.wl-earth-worm-pin.is-king-pin {
    border-color: #f59e0b;
    background: rgba(120, 53, 15, 0.92);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.55), 0 3px 10px rgba(0, 0, 0, 0.65);
}
button.wl-earth-worm-pin.is-enemy-pin {
    border-color: #ef4444;
    background: rgba(69, 10, 10, 0.88);
}
button.wl-earth-worm-pin.is-castle-pin {
    border-color: #38bdf8;
    background: rgba(12, 74, 110, 0.92);
    border-radius: 7px;
    padding: 2px;
}
button.wl-earth-worm-pin.is-castle-pin.is-mine-pin {
    border-color: #fde047;
    background: rgba(146, 64, 14, 0.92);
}
button.wl-earth-worm-pin.is-castle-pin img {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
}
button.wl-earth-worm-pin.is-terrain-pin {
    border-color: #fb923c;
    background: rgba(234, 88, 12, 0.92);
    width: 14px;
    height: 14px;
    padding: 0;
    border-radius: 4px;
    justify-content: center;
}
button.wl-earth-worm-pin.is-tfree-pin {
    border-color: #4ade80;
    background: rgba(22, 163, 74, 0.88);
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 3px;
}
.wl-earth-pin-crown {
    position: absolute;
    top: -6px;
    right: -4px;
    font-size: 0.72rem;
    line-height: 1;
    filter: drop-shadow(0 1px 1px #000);
    pointer-events: none;
}
.wl-earth-worm-lbl {
    padding: 0 6px 0 2px; max-width: 86px; overflow: hidden; text-overflow: ellipsis;
}
.wl-earth-worm-cnt {
    position: absolute; top: -5px; right: -5px;
    background: #0284c7; color: #fff; border: 1.5px solid #fff;
    border-radius: 999px; font-size: 0.58rem; font-weight: 900; padding: 0 4px; line-height: 1.3;
}
.wl-earth-tooltip {
    position: absolute; pointer-events: none; z-index: 40;
    background: rgba(15, 23, 42, 0.92); border: 1px solid #38bdf8;
    border-radius: 9px; padding: 6px 10px; color: #f8fafc; font-size: 0.74rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    display: flex; flex-direction: column; gap: 2px; white-space: nowrap;
}
.wl-earth-tooltip b { color: #38bdf8; font-size: 0.78rem; }
.wl-earth-hud-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; z-index: 35; }
.wl-earth-badge-pill { pointer-events: none; display: inline-flex; align-items: center; gap: 6px; background: rgba(15, 23, 42, 0.76); border: 1px solid rgba(125, 211, 252, 0.35); color: #e0f2fe; border-radius: 999px; padding: 4px 10px; font-size: 0.72rem; font-weight: 700; backdrop-filter: blur(4px); }
.wl-earth-controls { pointer-events: auto; display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.wl-earth-ctrl-btn { border: 1px solid rgba(148, 163, 184, 0.45); background: rgba(15, 23, 42, 0.8); color: #f8fafc; border-radius: 8px; padding: 4px 9px; font-size: 0.76rem; font-weight: 800; cursor: pointer; backdrop-filter: blur(4px); transition: all 0.14s ease; }
.wl-earth-ctrl-btn:hover, .wl-earth-ctrl-btn.is-active { background: #0284c7; border-color: #38bdf8; color: #ffffff; }
.wl-earth-hud-bottom { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; pointer-events: none; z-index: 35; }
.wl-worlds-list { display: grid; grid-template-columns: 1fr; gap: 6px; }
.wl-world-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 11px; border-radius: 10px; border: 1.5px solid #e2e8f0; background: #f8fafc;
    color: #0f172a; text-decoration: none; font-size: 0.83rem;
    transition: all 0.15s ease; cursor: pointer;
}
.wl-world-row:hover { border-color: #38bdf8; background: #f0f9ff; transform: translateX(2px); }
.wl-world-row.is-selected { border-color: #0284c7; background: linear-gradient(90deg, #e0f2fe 0%, #f0f9ff 100%); box-shadow: 0 2px 8px rgba(2, 132, 199, 0.16); }
.wl-world-row.is-current { border-color: #f59e0b; background: #fffbeb; }
.wl-world-row-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wl-world-row-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; background: #0f172a; color: #ffffff; font-size: 0.76rem; font-weight: 800; flex-shrink: 0; }
.wl-world-row.is-selected .wl-world-row-num { background: #0284c7; }
.wl-world-row.is-current .wl-world-row-num { background: #d97706; }
.wl-world-row-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-world-row-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; font-weight: 800; font-size: 0.78rem; }
@media (max-width: 980px) {
    .wl-earth-layout { grid-template-columns: 1fr; }
    .wl-earth-stage { height: 340px; }
}
@media (max-width: 640px) {
    .wl-earth-hud-top { justify-content: flex-end; }
    .wl-earth-hud-top .wl-earth-badge-pill { display: none; }
}
@media (max-width: 520px) {
    .wl-earth-stage { height: 300px; }
    .wl-earth-hud-bottom { display: none; }
}
