/* DOUBLE-V URGENCES V2 — carte plein écran / commandes flottantes.
   Interface originale, inspirée de l'ergonomie de jeux de dispatch. */
:root {
  --bg-panel: rgba(48, 51, 59, .96);
  --bg-card: rgba(58, 62, 70, .95);
  --text-main: #f6f7fb;
  --text-muted: #d5d9e1;
  --accent-cyan: #0b7bf4;
  --accent-violet: #8567cf;
  --border-subtle: rgba(255,255,255,.18);
  --top-h: 0px;
  --panel-w: min(46vw, 610px);
}
body { background: #d4dce7; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
.app-main { position: absolute; inset: 0; min-height: 100dvh; }
#map-wrap { position: absolute; inset: 0; width: 100%; height: 100%; }
#map { width: 100%; height: 100%; }
.hud-top {
  position: fixed !important;
  inset: max(8px, var(--sat)) max(14px, var(--sar)) auto max(12px, var(--sal));
  width: auto; height: 48px; min-height: 0; padding: 0;
  background: none; border: 0; box-shadow: none; backdrop-filter: none;
  justify-content: space-between; align-items: flex-start;
  z-index: 36; pointer-events: none;
}
.player-corner,.currency-corner { display: flex; align-items: flex-start; gap: 9px; pointer-events: auto; }
.player-corner { flex-direction: column; gap: 3px; }
.brand-inline { font-size: 10px; font-weight: 900; color: #354562; background: rgba(255,255,255,.86); padding: 2px 7px; border-radius: 5px; margin-left: 54px; letter-spacing: .35px; }
.brand-inline span { color: #075fc9; }
.brand-inline small { color: #526278; font-size: 9px; }
.currency-corner { padding-top: 3px; }
.currency-corner .stat-pill {
  font-size: clamp(11px, 1.35vw, 16px); border: 0; padding: 7px 14px;
  color: white !important; background: rgba(42, 50, 63, .65); border-radius: 30px;
  backdrop-filter: blur(6px); font-variant-numeric: tabular-nums;
}
.currency-corner .stat-credits { color:#ffef97 !important; }
.currency-corner .stat-billets { color:#ddffe5 !important; }
.stat-level { background: transparent; border: 0; padding: 0; gap: 0; }
.level-badge { min-width: 54px; min-height: 54px; display:grid;place-items:center;
  border-radius: 50%; font-size: 23px; color: white;
  border: 3px solid #b6d7fc; background: linear-gradient(155deg,#0c8cf6,#0057c4); box-shadow: 0 3px 10px #1e376788; }
.level-stack { margin-left: -4px; min-width: 175px; }
.level-stack strong { color: #fff; text-shadow: 0 1px 4px #1f2937; font-size: 15px; padding-left: 12px; white-space: nowrap; }
.xp-bar-container { width: 190px; height: 21px; margin-top: 2px;
  background: #626d7da8; border-radius: 0 20px 20px 0; border: 0; }
.xp-bar-fill { background: #128bff; border-radius: 0 20px 20px 0; }
.xp-text { font-size: 11px; text-shadow: 0 1px 3px #26384a; }
.quick-left, .quick-bottom-left, .quick-bottom-right { position: fixed; display:flex; gap: 10px; z-index: 35; }
.quick-left { left:max(12px,var(--sal)); top: 98px; flex-direction: column; }
.quick-bottom-left { left:max(12px,var(--sal)); bottom:max(14px,var(--sab)); }
.quick-bottom-right { right:max(12px,var(--sar)); bottom:max(14px,var(--sab)); gap: 12px; }
.orb { cursor:pointer; position:relative; width: 51px; height: 51px; padding: 0; display:grid; place-items:center;
  border: 3px solid #d5e9ff; border-radius: 50%; background: #067af4; color:#fff; font-size: 25px; font-weight:800;
  box-shadow: 0 2px 8px #14243c66; text-shadow:0 1px 3px #1b386b; }
.orb:hover,.orb:focus-visible { filter:brightness(1.13); outline:2px solid white; outline-offset:2px; }
.orb-alert { background:#ec2526; width: 68px; height: 68px; font-size: 38px; border-color: #f8cbc8; }
.orb-count { position:absolute; top:-5px;right:-4px;display:none;min-width:21px;padding:2px 4px;border-radius:12px;background:#d51d29;color:#fff;font-size:11px;border:2px solid white; }
.orb-count.has-alerts { display:block; }
.orb-season { background:#65b94a; }
.orb-shop { background:#ffb63e; }
.orb-clan { background:#8269c9; }
.orb-stations { background:#0879e6; }
.floating-pause { position:fixed; left:max(84px, calc(var(--sal) + 82px)); bottom:max(18px,var(--sab));z-index:35;
  border: 1px solid #ddd; background:rgba(41,47,58,.68);color:#fff;border-radius:22px; font-size:12px;
  padding:8px 12px;cursor:pointer;backdrop-filter:blur(8px); }
.floating-pause.paused { background:#aa4d25; }
.side-panel { position: fixed; top: 10px; bottom: 0px; width: var(--panel-w); flex:none;
  background:#35383f; border:4px solid #252b37; border-radius: 14px;
  box-shadow:0 8px 30px #18203355; padding:0!important; z-index:45; }
#panel-left { left: max(82px,calc(var(--sal) + 82px)); }
#panel-right { right:max(18px,var(--sar)); }
.side-panel.collapsed { transform: none!important; opacity:0; pointer-events:none; width:var(--panel-w); }
.panel-head { background:#087df2; border-bottom:4px solid #045dc7; color:white; padding:9px 12px; min-height:48px; }
.panel-head h2 { font-size: 17px; font-weight: 800; letter-spacing:.1px; }
.panel-head .icon-btn { border:0;background:#0467cf;font-size:19px; }
.panel-body { gap:7px; padding:8px; }
.counts { padding:8px 10px 3px; }
.count-chip { background:#434957; }
#tab-left,#tab-right { display:none!important; }
#map-menu { position:fixed; top:104px; left:76px;right:auto;z-index:70; background:#35383f;border:3px solid #137bef; border-radius:14px; width:340px;max-height:calc(100dvh - 155px); }
.maplibregl-ctrl-top-right { margin-top: 80px!important; }
.maplibregl-ctrl-bottom-right { margin-bottom:88px!important; }
#map-degraded { top:77px; }
.radio-banner { top:64px; width:min(520px,calc(100vw - 140px)); background:rgba(49,54,65,.96); border:2px solid #087df2; }
.overlay-bottom { bottom:max(90px,calc(var(--sab) + 80px)); left:50%;right:auto; transform:translateX(-50%); width:min(650px,calc(100vw - 80px)); }
.placement-bar,.tuto-bar,.call-popup { background:#383e4a;border:2px solid #147df2;box-shadow:0 10px 30px #172d5066;border-radius:12px;padding:12px 14px; }
.tuto-bar { display:none!important; }
.call-popup { width:min(520px,100%); }
.card { background:#42454d;border:1px solid #5a606e;border-radius:8px;padding:10px; }
.card-alert { border-left:4px solid #ff7d32; }
.card h3 { font-size:14px; }
.btn { background:#077df5;border:1px solid #0058d1;color:#fff;border-radius:8px;min-height:35px;font-size:13px; }
.btn-cyan { background:#087bf0;color:#fff; }
.btn-outline { background:#3a404e;border:1px solid #75869d;color:#fff; }
.btn:disabled {opacity:.46;}
.modal-backdrop { background:rgba(28,33,43,.48);backdrop-filter: none; }
.modal-box {background:#41444b;border:1px solid #303640;border-radius:13px;box-shadow:0 13px 45px #17233355;color:#fff; }
.modal-box h2 {font-size:20px; }
.intro-box {max-width:720px;padding:28px 26px;background:#414141; }
.intro-box h2 {font-size:20px; }
.intro-copy {font-size:18px; }
.onboarding-v2 {width:min(680px,calc(100vw - 38px));padding:0 20px 20px;max-height:calc(100dvh - 30px); }
.stage-tag {margin:0 -20px 15px;padding:10px 18px;background:#087cf5; color:#fff;font-weight:850; display:flex;justify-content:space-between;gap:15px; }
.stage-tag span {font-size:11px;opacity:.9;align-self:center;}
.onboarding-sub {font-size:14px;line-height:1.45; color:#f3f4f6; }
.onboarding-v2 input {background:#fff;color:#16212c; }
.onboarding-v2 .search-item {background:#f2f5fc;color:#222;border:1px solid #cfd4e0; }
.onboarding-v2 .search-item span { color: #282d3a!important; }
.onboarding-actions {display:flex;justify-content:flex-end;gap:10px;margin-top:14px; }
.onboarding-actions #btn-start-game {min-width:190px; }
.onboarding-v2 .selected-box {background: #144e69;color:#fff;border-color:#2488d0; }
.onboarding-v2 .branch-card {background:#50545d;border:1px solid #798497;font-size:13px;}
.onboarding-v2 .branch-card.selected {background:#114f96;border:2px solid #64bcff;}
.onboarding-v2 .branch-card.locked {opacity:.52;}
.guide-backdrop { position:fixed; inset:0;display:flex;align-items:center;justify-content:center;background:rgba(22,27,36,.54);z-index:104;padding:20px; }
.guide-dialog { max-width:670px;width:min(670px,calc(100vw - 60px)); background:#3b3b3d; color:#fff;
  text-align:center; border-radius:11px;padding:20px 28px 18px; box-shadow:0 12px 34px #0007; }
.guide-dialog p {font-size:clamp(14px,1.7vw,19px);line-height:1.55;margin:8px 0 20px; }
.guide-index {font-size:10px;font-weight:900;color:#a5c7ff;letter-spacing:2px;}
.guide-dialog .btn {min-width:160px;}
.mission-focus { position:fixed;z-index:60;top:10px;left:50%;transform:translateX(-50%);width:min(930px,calc(100vw - 92px)); max-height:calc(100dvh - 20px);display:flex;flex-direction:column;background:#35373e;border:4px solid #222a35;border-radius:12px;box-shadow:0 16px 40px #15203299;color:#fff; }
.mission-focus-header {height:52px;min-height:52px;background:#087bf3;padding:8px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:3px solid #0060ce; }
.mission-focus-header h2 {font-size:18px;margin:0;color:#fff;}
.focus-close {color:#fff;cursor:pointer;background:rgba(0,0,0,.14);border:0;border-radius:7px;font-size:22px;width:36px;height:36px;}
.mission-focus-body {overflow-y:auto;padding:15px 15px 18px; }
.mission-summary {display:grid;grid-template-columns:1fr auto;gap:12px;margin-bottom:12px;border-bottom:1px solid #666;padding-bottom:10px;}
.mission-subtitle {font-size:13px; color:#dedfe6; margin:6px 0;}
.mission-tag {display:inline-block;background:#1d75e4;border-radius:7px;padding:6px 10px;font-weight:800;}
.service-filters {display:flex;gap:8px;margin:8px 0 10px;flex-wrap:wrap;}
.service-filters button {background:#4c5361;color:#fff;border:1px solid #728097;border-radius:8px;padding:6px 12px;cursor:pointer;}
.service-filters button.active {background:#076bea;border-color:#80bcff;}
.service-filters button:disabled {opacity:.4;cursor:default;}
.dispatch-table {width:100%;border-collapse:collapse;font-size:13px;}
.dispatch-table th {background:#252a34;color:#c9d9f3;text-align:left;padding:9px 7px;font-size:12px;}
.dispatch-table td {border-bottom:1px solid #626875;padding:8px 7px;vertical-align:middle;}
.dispatch-table tr.selected {background:#10569a;}
.dispatch-table tr.unavailable {opacity:.55;}
.dispatch-table .dispatch-pick {background:#0879ec;color:#fff;border:0;padding:6px 11px;border-radius:7px;cursor:pointer;font-weight:800;}
.dispatch-table tr.selected .dispatch-pick {background:#148c3c;}
.dispatch-table .dispatch-pick:disabled {cursor:default;background:#596677;}
.dispatch-footer {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:14px;}
.dispatch-engage {background:#35a343;color:#fff;min-width:170px;border:0;font-weight:900;padding:10px 18px;border-radius:7px;cursor:pointer;}
.dispatch-engage:disabled {background:#5d7160;opacity:.5;cursor:not-allowed;}
.radio-requirements {background:#262e38;border-left:4px solid #ffba4c;padding:11px 14px;margin:12px 0;border-radius:6px;}
.station-side-layout {gap:9px;}
.station-vertical-tabs {width:100px;}
.v-tab-btn {padding:10px 8px;background:#485061;color:#fff;border:1px solid #657188;}
.v-tab-btn.active {background:#077ae9;border-color:#87baff;}
.gamorsec-table {font-size:12px;}
.gamorsec-table th {color:#dceaff;}
.shop-screen {position:fixed;inset:7% auto auto 50%;transform:translateX(-50%);max-height:86dvh;
  width:min(880px,calc(100vw - 32px));border:4px solid #26313e;border-radius:12px;box-shadow:0 16px 40px #14213299;
  background:#383b44;padding:0;z-index:70;}
.shop-head {background:#087cf5;border-bottom:3px solid #005acc;color:#fff;}
.shop-body {padding:14px;}
.shop-grid {grid-template-columns:repeat(auto-fill,minmax(175px,1fr));}
.product {background:#484e5b;border:1px solid #687487;}
.product svg {max-height:130px;}
.modal-box input[type="text"], .modal-box select {background:#f7f8fb;color:#232b39;}
@media (max-width:980px) { .brand-inline {display:none;} .level-stack strong{font-size:12px;} .xp-bar-container {width:145px;} .currency-corner .stat-pill{font-size:11px;padding:6px 9px;} }
@media (max-height:520px) {
  .quick-left {top:80px;gap:5px;}
  .orb {height:38px;width:38px;border-width:2px;font-size:20px;}
  .orb-alert {height:54px;width:54px;font-size:30px;}
  .quick-bottom-right {gap:8px;}
  .level-badge {min-height:43px;min-width:43px;font-size:18px;}
  .xp-bar-container {height:15px;}
  .xp-text{font-size:9px;}
  .floating-pause {bottom:max(10px,var(--sab));font-size:10px;}
  .side-panel {top:4px;bottom: 0px;width:min(60vw,570px);}
  .mission-focus {top:3px;max-height:calc(100dvh - 6px);}
  .mission-focus-header {height:40px;min-height:40px;}
  .mission-focus-body{padding:9px;}
  .dispatch-table td,.dispatch-table th{padding:5px 7px;font-size:11px;}
  .guide-dialog {padding:12px 16px;}
  .guide-dialog p {font-size:14px;margin:7px 0 11px;}
  .onboarding-v2 {max-height:calc(100dvh - 12px);overflow-y:auto;}
}
@media (max-width:650px) and (orientation:landscape) {
  .level-stack{display:none;}
  .currency-corner .stat-pill{font-size:10px;padding:5px;}
  .quick-left{left:6px;}
  .quick-bottom-right{right:6px;}
  .mission-focus{width:calc(100vw - 12px);}
  .side-panel{width:calc(100vw - 72px)!important;}
}

/* Véhicules dessinés sur la carte : engins vus du dessus (SVG originaux). */
.marker-vehicle.vehicle-map-v2 { background:transparent!important;border:0!important;box-shadow:none!important;
  padding:0!important;border-radius:0!important;display:flex;flex-direction:column;align-items:center;
  justify-content:center;min-width:76px;min-height:52px;filter:drop-shadow(0 3px 3px #0006); }
.vehicle-map-v2 svg {height:38px;width:72px;}
.vehicle-marker-name {background:rgba(2,41,91,.9);color:#fff;font-size:10px;font-weight:850;padding:2px 7px;
  border:1px solid #cce4ff;border-radius:999px;margin-top:-2px;white-space:nowrap;}
