/* ==========================================================================
   ALERTE 112 (V13) — Styles Alliances, Téléphone Violet, Renforts & Stripe Test
   Inspiré des captures de référence REF_01, REF_02 et REF_03
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Téléphones de missions (REF_03) : Rouge (solo) et Violet (alliance)
   Ancrés au bord droit du panneau Missions #panel-left
   -------------------------------------------------------------------------- */
#panel-left {
  overflow: visible !important;
}

#panel-left.collapsed {
  transform: translateX(-120%) !important;
  pointer-events: none !important;
}

#panel-left .phone-stack,
.phone-stack {
  position: absolute;
  right: -56px;
  top: 10px;
  left: auto;
  bottom: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 5px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  z-index: 85;
  transform: none !important;
  transition: none !important;
}

#panel-left.collapsed .phone-stack {
  display: none !important;
  pointer-events: none !important;
  transform: none !important;
  opacity: 0 !important;
}

.pass-badge-top {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.3);
  pointer-events: none;
  white-space: nowrap;
  z-index: 80;
}

/* V14 : Échelle adaptative des marqueurs selon le zoom & prévention coutures blanches */
#map, .maplibregl-canvas-container, .maplibregl-canvas {
  background-color: #0b1120 !important;
}
.map-zoom-low .marker-mission svg {
  transform: scale(0.60) !important;
}
.map-zoom-low .marker-station svg,
.map-zoom-low .marker-callcenter svg {
  transform: scale(0.72) !important;
}
.map-zoom-mid .marker-mission svg {
  transform: scale(0.75) !important;
}
.map-zoom-mid .marker-station svg,
.map-zoom-mid .marker-callcenter svg {
  transform: scale(0.88) !important;
}
.map-zoom-high .marker-mission svg {
  transform: scale(0.85) !important;
}
.map-zoom-high .marker-station svg,
.map-zoom-high .marker-callcenter svg {
  transform: scale(1.0) !important;
}

.orb-phone {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  user-select: none;
}

.orb-phone:hover {
  transform: scale(1.06);
  filter: brightness(1.1);
}

.orb-phone:active {
  transform: scale(0.95);
}

/* Téléphone ROUGE : Missions normales individuelles */
.orb-phone-red {
  background: radial-gradient(circle at 35% 30%, #f87171 0%, #dc2626 55%, #991b1b 100%);
  border-color: #fca5a5;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.55), inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

/* Téléphone VIOLET : Missions collectives & Renforts */
.orb-phone-violet {
  background: radial-gradient(circle at 35% 30%, #c084fc 0%, #9333ea 55%, #6b21a8 100%);
  border-color: #d8b4fe;
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.55), inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.orb-phone-icon {
  width: 26px;
  height: 26px;
  fill: #ffffff;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

.orb-phone-subbadge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #1e1b4b;
  border: 1.5px solid #a855f7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.orb-phone-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.orb-phone-count:empty {
  display: none;
}

.orb-phone-count.violet-badge {
  background: #a855f7;
  border-color: #ffffff;
}

/* --------------------------------------------------------------------------
   2. Volet Téléphone Violet : Missions d'alliance et Demandes de renfort
   -------------------------------------------------------------------------- */
#panel-violet-phone {
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 65px;
  width: min(530px, 46vw);
  background: #1e1b2e;
  border: 2px solid #581c87;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f1f5f9;
}

#panel-violet-phone.hidden {
  display: none !important;
}

.violet-panel-head {
  background: linear-gradient(135deg, #7e22ce 0%, #581c87 100%);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.violet-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.violet-panel-close {
  background: transparent;
  border: 0;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 4px;
}

.violet-panel-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Onglets Téléphone Violet */
.violet-tabs {
  display: flex;
  background: #141220;
  border-bottom: 2px solid #3b0764;
}

.violet-tab-btn {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: 0;
  color: #a78bfa;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 3px solid transparent;
  transition: all 0.15s ease;
}

.violet-tab-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  color: #e9d5ff;
}

.violet-tab-btn.active {
  color: #ffffff;
  background: #241b38;
  border-bottom-color: #a855f7;
}

.violet-tab-badge {
  background: #7e22ce;
  color: #ffffff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
}

.violet-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #181524;
}

/* Barre de quota quotidien 3 missions */
.violet-quota-bar {
  background: #281d45;
  border: 1px solid #6b21a8;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.violet-quota-info strong {
  display: block;
  font-size: 13px;
  color: #f3e8ff;
}

.violet-quota-info small {
  font-size: 11px;
  color: #c084fc;
}

.violet-quota-pills {
  display: flex;
  gap: 6px;
}

.quota-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #9333ea;
  background: #1e1b2e;
}

.quota-dot.used {
  background: #22c55e;
  border-color: #4ade80;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.quota-dot.exhausted {
  background: #ef4444;
  border-color: #f87171;
}

/* Fiches des missions collectives */
.coop-mission-card {
  background: #241d38;
  border: 1px solid #4c1d95;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  transition: border-color 0.15s ease;
}

.coop-mission-card:hover {
  border-color: #9333ea;
}

.coop-mission-card.active-run {
  border: 2px solid #a855f7;
  background: #2a1e45;
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.25);
}

.coop-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.coop-card-title {
  font-size: 13px;
  font-weight: 750;
  color: #ffffff;
  margin: 0;
}

.coop-badge-vehicles {
  background: #581c87;
  color: #e9d5ff;
  border: 1px solid #7e22ce;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.coop-card-sub {
  font-size: 11px;
  color: #cbd5e1;
  margin: 4px 0 8px;
}

.coop-req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
  margin: 8px 0;
  font-size: 11px;
}

.coop-req-item {
  background: #1b162a;
  border: 1px solid #3b2a59;
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coop-req-item.fulfilled {
  border-color: #10b981;
  background: #0f2e22;
  color: #a7f3d0;
}

.coop-participants-list {
  font-size: 11px;
  color: #d8b4fe;
  background: rgba(0, 0, 0, 0.2);
  padding: 6px 8px;
  border-radius: 4px;
  margin: 8px 0;
}

.coop-rewards-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #fbbf24;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Fiches des demandes de renfort */
.reinforce-card {
  background: #251d38;
  border: 1px solid #7c3aed;
  border-left: 4px solid #a855f7;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
}

.reinforce-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.reinforce-sender {
  font-size: 12px;
  font-weight: 750;
  color: #e9d5ff;
}

.reinforce-timer {
  font-size: 11px;
  color: #fca5a5;
  font-weight: 700;
}

.reinforce-desc {
  font-size: 12px;
  color: #ffffff;
  font-weight: 600;
  margin: 4px 0 8px;
}

.reinforce-split-rule {
  font-size: 11px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 8px;
  border-radius: 4px;
  margin: 6px 0;
}

/* --------------------------------------------------------------------------
   3. Modal Gestion de l'Alliance (REF_01 & REF_02)
   -------------------------------------------------------------------------- */
.alliance-dialog-box {
  max-width: 860px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  background: #2a2a2e !important;
  border: 2px solid #581c87 !important;
  border-radius: 10px;
  overflow: hidden;
}

.alliance-modal-header {
  background: #8b5cf6;
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alliance-modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.alliance-modal-header .modal-close-btn {
  background: transparent;
  border: 0;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 4px;
}

.alliance-modal-header .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.alliance-layout {
  display: flex;
  flex: 1;
  min-height: 480px;
  overflow: hidden;
}

/* Barre d'onglets latéraux gauche (comme REF_01 & REF_02) */
.alliance-side-tabs {
  width: 60px;
  background: #1f1f23;
  border-right: 1px solid #3a3a40;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
}

.alliance-side-tab-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: #3f3f46;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.alliance-side-tab-btn:hover {
  background: #6366f1;
}

.alliance-side-tab-btn.active {
  background: #8b5cf6;
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

.alliance-main-content {
  flex: 1;
  background: #27272a;
  overflow-y: auto;
  padding: 16px 20px;
  color: #f4f4f5;
}

/* En-tête de section alliance */
.alliance-info-header {
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.alliance-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.alliance-level-star {
  width: 46px;
  height: 46px;
  background: radial-gradient(circle, #8b5cf6 0%, #6d28d9 100%);
  border-radius: 50%;
  border: 2px solid #c4b5fd;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
}

.alliance-name-box h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.alliance-name-box p {
  margin: 3px 0 0;
  font-size: 12px;
  color: #a1a1aa;
}

.alliance-top-actions {
  display: flex;
  gap: 10px;
}

.btn-alliance-red {
  background: #ef4444;
  border: 1px solid #f87171;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-alliance-red:hover {
  background: #dc2626;
}

.btn-alliance-blue {
  background: #3b82f6;
  border: 1px solid #60a5fa;
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-alliance-blue:hover {
  background: #2563eb;
}

/* Grille d'informations (REF_02) */
.alliance-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.alliance-info-card {
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  padding: 14px;
}

.alliance-card-head {
  background: #3f3f46;
  color: #f4f4f5;
  font-size: 13px;
  font-weight: 750;
  padding: 6px 12px;
  border-radius: 4px;
  text-align: center;
  margin-bottom: 12px;
}

.alliance-prog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
}

.alliance-prog-label {
  color: #d4d4d8;
  font-weight: 600;
  min-width: 100px;
}

.alliance-prog-track {
  flex: 1;
  height: 20px;
  background: #18181b;
  border: 1px solid #52525b;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  margin-left: 10px;
}

.alliance-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed 0%, #8b5cf6 100%);
  border-radius: 3px;
}

.alliance-prog-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.treasury-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  gap: 10px;
}

.treasury-val {
  font-size: 26px;
  font-weight: 800;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tableau des membres (REF_01) */
.members-control-bar {
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
}

.members-table-wrap {
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 8px;
  overflow: hidden;
}

.members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.members-table th {
  background: #27272a;
  color: #d4d4d8;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  border-bottom: 1px solid #3f3f46;
}

.members-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #27272a;
  vertical-align: middle;
}

.member-role-btn {
  background: #2563eb;
  border: 1px solid #3b82f6;
  color: #ffffff;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 14px;
  border-radius: 4px;
  cursor: pointer;
  min-width: 75px;
  text-align: center;
}

.member-role-btn.chef {
  background: #16a34a;
  border-color: #22c55e;
}

.member-status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
}

.member-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.member-status-dot.offline {
  background: #f97316;
}

.member-kick-btn {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 800;
  margin-left: 8px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
}

.member-kick-btn:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

/* --------------------------------------------------------------------------
   4. Bouton "Demander du renfort" sur les missions normales
   -------------------------------------------------------------------------- */
.btn-request-reinforce {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  border: 1px solid #a855f7;
  color: #ffffff;
  font-weight: 750;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35);
  transition: all 0.15s ease;
}

.btn-request-reinforce:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.55);
}

.btn-request-reinforce:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.6);
}

/* --------------------------------------------------------------------------
   5. Commutateur multi-comptes de test (5 comptes pour validation E2E)
   -------------------------------------------------------------------------- */
.test-accounts-dock {
  background: #18181b;
  border: 1px solid #3f3f46;
  border-radius: 6px;
  padding: 8px 12px;
  margin-top: 14px;
  font-size: 11px;
}

.test-accounts-dock strong {
  display: block;
  color: #a855f7;
  margin-bottom: 6px;
}

.test-accounts-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.test-account-pill {
  background: #27272a;
  border: 1px solid #52525b;
  color: #e4e4e7;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.test-account-pill.current {
  background: #7c3aed;
  border-color: #a855f7;
  color: #ffffff;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   6. Surcouche finale Panneau Droit Construction (Photos 1 & 2) & Pass Badge
   -------------------------------------------------------------------------- */
#panel-right {
  overflow: visible !important;
  display: flex !important;
  flex-direction: column !important;
  background: #1c1c1e !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px 16px 12px 12px !important;
}

#panel-right.collapsed {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

#panel-right .panel-head {
  background: #007aff !important;
  border-top-left-radius: 14px !important;
  border-top-right-radius: 14px !important;
  min-height: 48px !important;
  padding: 10px 16px !important;
}

#panel-right .panel-body {
  background: #1c1c1e !important;
  padding: 0 0 24px 0 !important;
  border-bottom-left-radius: 14px !important;
  border-bottom-right-radius: 14px !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#panel-right .panel-body::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
}

.orb-season {
  overflow: visible !important;
}

@media (max-height: 460px), (max-width: 860px) {
  .panel-right-side-tabs {
    left: -50px !important;
    top: 8px !important;
    padding: 4px !important;
    gap: 6px !important;
  }
  .panel-right-tab {
    width: 38px !important;
    height: 38px !important;
  }
  #panel-left .phone-stack,
  .phone-stack {
    right: -48px !important;
    top: 8px !important;
    padding: 4px !important;
    gap: 6px !important;
    transform: none !important;
    transition: none !important;
  }
  #panel-left.collapsed .phone-stack {
    display: none !important;
    pointer-events: none !important;
    transform: none !important;
    opacity: 0 !important;
  }
  .orb-phone {
    width: 40px !important;
    height: 40px !important;
  }
  .orb-phone-icon {
    width: 21px !important;
    height: 21px !important;
  }
}

/* Écran vidéo d'introduction plein écran (précédence maximale + fondu propre) */
#v8-splash {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  background: #000000 !important;
  display: block !important;
  opacity: 1 !important;
  overflow: hidden !important;
  transition: opacity 1.1s ease-in-out !important;
}
#v8-splash.closing {
  opacity: 0 !important;
  pointer-events: none !important;
}
#v8-intro-video,
.v8-intro-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  pointer-events: none !important;
  background: #000000 !important;
}



/* ==========================================================================
   Surcouche Absolue Pleine Hauteur : Missions, Bâtiments, Appels & Fiche Intervention
   L'utilisateur a exigé que les volets fassent STRICTEMENT TOUTE LA HAUTEUR du site,
   du dessous du HUD jusqu'au bord inférieur extrême (0px de marge en bas).
   ========================================================================== */
html body #panel-left,
html body #v5-calls-panel,
html body #panel-right,
html body #mission-focus,
html body .mission-focus {
  position: fixed !important;
  top: calc(var(--sat) + 52px) !important;
  bottom: 0px !important;
  height: calc(100vh - var(--sat) - 52px) !important;
  height: calc(100dvh - var(--sat) - 52px) !important;
  max-height: none !important;
  min-height: 0 !important;
  border-bottom-left-radius: 0px !important;
  border-bottom-right-radius: 0px !important;
  display: flex !important;
  flex-direction: column !important;
  z-index: 125 !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85) !important;
}

html body #mission-focus,
html body .mission-focus {
  z-index: 160 !important;
}

html body #panel-left.collapsed,
html body #panel-right.collapsed {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

html body #v5-calls-panel.hidden,
html body #mission-focus.hidden,
html body .mission-focus.hidden {
  display: none !important;
}

/* Les corps de volet défilent sur toute la hauteur restante jusqu'au bas de l'écran */
html body #panel-left .panel-body,
html body #panel-left #missions-body,
html body #v5-calls-panel #v5-calls-body,
html body #panel-right .panel-body,
html body #panel-right #stations-body,
html body #mission-focus #mission-focus-body,
html body .mission-focus .mission-focus-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px)) !important;
}

/* Sur très petits écrans en hauteur (paysage mobile) */
@media (max-height: 520px) {
  html body #panel-left,
  html body #v5-calls-panel,
  html body #panel-right,
  html body #mission-focus,
  html body .mission-focus {
    top: calc(var(--sat) + 44px) !important;
    bottom: 0px !important;
    height: calc(100vh - var(--sat) - 44px) !important;
    height: calc(100dvh - var(--sat) - 44px) !important;
    max-height: none !important;
  }
}

/* En-tête fiche d'intervention : la croix X et le minuteur doivent rester collés tout à droite */
#mission-focus .mission-focus-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
#mission-focus .mission-focus-header > .v16-focus-title-wrap {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
#mission-focus .mission-focus-header > .v16-focus-header-right {
  flex: 0 0 auto !important;
  margin-left: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

/* Ancrage géographique strict des marqueurs MapLibre (empêche tout glissement au zoom/dézoom) */
#map .maplibregl-marker,
#map .marker-station,
#map .marker-mission,
#map .marker-callcenter,
#map .marker-vehicle,
#map .vehicle-map-v2 {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  margin: 0 !important;
  transition: none !important;
}
#map .maplibregl-marker svg,
#map .vehicle-map-v2 .vehicle-map-body {
  transform-origin: 50% 50% !important;
}
/* Logo Direction / État-Major sur la carte */
.marker-station.v16-direction-pin svg {
  width: 30px !important;
  height: 30px !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.55));
}
