:root{--bg:#071523;--panel:#0d2033;--text:#f4f7fa;--muted:#9eacb9;--green:#63d33d;--orange:#ffad3d;--red:#ff5b57}
    *{box-sizing:border-box} html,body{margin:0;height:100%;overflow:hidden;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
    #map{position:absolute;inset:0}
    .topbar{position:absolute;z-index:1000;top:48px;left:16px;right:16px;display:flex;gap:12px;align-items:center}
    .search{height:52px;flex:1;max-width:760px;margin:auto;background:rgba(7,21,35,.92);border:1px solid rgba(255,255,255,.08);border-radius:15px;color:var(--text);padding:0 18px;font-size:17px;outline:none;box-shadow:0 8px 24px rgba(0,0,0,.2)}
    .btn{height:52px;width:52px;border:0;border-radius:15px;background:rgba(7,21,35,.92);color:white;font-size:24px;box-shadow:0 8px 24px rgba(0,0,0,.2)}
    .controls{position:absolute;z-index:1000;left:16px;top:122px;display:flex;flex-direction:column;gap:8px}
    .controls .btn{width:48px;height:48px}
    .panel{position:absolute;z-index:1000;left:10px;right:10px;bottom:10px;background:rgba(7,21,35,.96);border:1px solid rgba(255,255,255,.08);border-radius:18px;padding:12px;box-shadow:0 -10px 35px rgba(0,0,0,.25)}
    .cards{display:grid;grid-template-columns:1.25fr repeat(5,1fr);gap:10px}
    .card{background:rgba(18,40,61,.92);border-radius:12px;padding:12px;min-height:100px}
    .label{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
    .value{font-size:25px;font-weight:700;margin-top:6px}
    .sub{font-size:12px;color:var(--muted);margin-top:5px}
    .status{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:800}
    .dot{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:var(--green);color:#06200b}
    .footer{display:flex;align-items:center;justify-content:space-between;padding:10px 4px 2px;color:var(--muted);font-size:12px}
    .profile select{background:transparent;color:white;border:0;font-size:14px;font-weight:700}
    .range{width:150px;vertical-align:middle}
    .drawer{position:absolute;z-index:1200;left:0;top:0;bottom:0;width:min(360px,88vw);background:rgba(7,21,35,.98);box-shadow:14px 0 35px rgba(0,0,0,.35);transform:translateX(-105%);transition:transform .22s ease;padding:18px;overflow:auto}
    .drawer.open{transform:translateX(0)}
    .drawer h2{margin:8px 0 20px;font-size:22px}
    .drawer-section{padding:14px 0;border-top:1px solid rgba(255,255,255,.1)}
    .drawer label{display:block;color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px}
    .drawer button{width:100%;height:44px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:#12283d;color:#fff;padding:0 12px;font-size:15px;margin-bottom:8px}
    .drawer input[type=range]{width:100%}
    .choice{display:flex!important;align-items:center;gap:10px;text-transform:none!important;color:#fff!important;font-size:15px!important;margin:10px 0!important}
    .choice input{width:18px;height:18px}
    .close-drawer{position:absolute;right:14px;top:12px;width:40px!important;height:40px!important;font-size:22px!important}
    .loading{position:absolute;z-index:1100;left:50%;top:80px;transform:translateX(-50%);background:rgba(7,21,35,.94);padding:8px 12px;border-radius:12px;font-size:13px;display:none}
    .lz-label{background:#071523;color:#fff;padding:4px 7px;border-radius:6px;font-weight:700;border:1px solid rgba(255,255,255,.2)}
    @media(max-width:900px){.cards{grid-template-columns:1.2fr repeat(2,1fr)}.card:nth-child(n+4){display:none}.value{font-size:21px}}
  
    .topbar .btn, .controls .btn{
      display:flex;align-items:center;justify-content:center;
      line-height:1;padding:0;
    }
    .icon-menu{display:block;transform:translateY(-1px);font-size:24px;line-height:1}
    .icon-target{display:block;font-size:25px;line-height:1}
    .edit-btn{
      position:absolute;z-index:1000;right:16px;top:122px;
      height:48px;padding:0 14px;border:0;border-radius:14px;
      background:rgba(7,21,35,.94);color:white;font-weight:800;
      box-shadow:0 8px 24px rgba(0,0,0,.2)
    }
    .edit-btn.active{outline:2px solid #63d33d}
    .validate-btn{
      position:absolute;z-index:1001;left:50%;transform:translateX(-50%);
      bottom:150px;display:none;height:44px;padding:0 18px;border:0;
      border-radius:12px;background:rgba(7,21,35,.96);color:white;
      font-weight:800;box-shadow:0 8px 24px rgba(0,0,0,.25)
    }
    .rotate-handle{
      width:42px;height:42px;border-radius:50%;
      background:#071523;border:2px solid white;color:white;
      display:flex;align-items:center;justify-content:center;
      font-size:23px;box-shadow:0 3px 10px rgba(0,0,0,.45)
    }
    .sizeInputs{display:inline-flex;align-items:center;gap:5px}
    .sizeInputs input{
      width:58px;background:#12283d;border:1px solid rgba(255,255,255,.18);
      border-radius:7px;color:#fff;padding:5px 6px;font-size:13px;text-align:center
    }
    .drawer{
      display:none;position:absolute;z-index:1200;top:108px;left:16px;width:290px;
      background:rgba(7,21,35,.98);border:1px solid rgba(255,255,255,.12);
      border-radius:16px;padding:14px;box-shadow:0 12px 30px rgba(0,0,0,.35)
    }
    .drawer h3{margin:0 0 12px;font-size:18px}
    .drawer label{display:block;font-size:12px;color:#9eacb9;margin:10px 0 6px}
    .drawer select,.drawer button{
      width:100%;padding:10px;border-radius:9px;border:1px solid rgba(255,255,255,.15)
    }
    .drawer select{background:#12283d;color:white}
    .drawer button{margin-top:8px;background:white;color:#071523;font-weight:800}


.drawer-good{
  display:none;position:absolute;z-index:1300;top:108px;left:16px;width:300px;
  background:rgba(7,21,35,.98);border:1px solid rgba(255,255,255,.14);
  border-radius:16px;padding:14px;box-shadow:0 12px 30px rgba(0,0,0,.4)
}
.drawer-good.open{display:block}
.drawer-good label{display:block;color:#9eacb9;font-size:12px;margin:10px 0 6px}
.drawer-good select,.drawer-good button{
  width:100%;padding:10px;border-radius:9px;border:1px solid rgba(255,255,255,.15)
}
.drawer-good select{background:#12283d;color:white}
.drawer-good button{margin-top:8px;background:white;color:#071523;font-weight:800}
.drawer-title{display:flex;align-items:center;justify-content:space-between;font-size:18px;font-weight:800}
.drawer-title #closeDrawer{width:38px;margin:0;padding:5px;font-size:22px}
.edit-tools{
  display:none;position:absolute;z-index:1250;left:50%;transform:translateX(-50%);
  bottom:154px;align-items:center;gap:8px;background:rgba(7,21,35,.97);
  padding:8px 10px;border-radius:12px;border:1px solid rgba(255,255,255,.12)
}
.edit-tools button{height:38px;min-width:52px;border:0;border-radius:9px;font-weight:800}
.edit-tools input[type=range]{width:210px}
.edit-tools input[type=number]{
  width:58px;height:38px;background:#12283d;color:#fff;border:1px solid rgba(255,255,255,.18);
  border-radius:8px;text-align:center;font-weight:700
}


.axis-arrow{width:54px;height:72px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:44px;font-weight:900;color:white;line-height:.85;text-shadow:-2px -2px 3px #000,2px -2px 3px #000,-2px 2px 3px #000,2px 2px 3px #000,0 3px 5px #000;transform-origin:50% 50%;pointer-events:none}.axis-arrow .av{font-size:12px;letter-spacing:.05em;margin-top:-2px;background:rgba(0,0,0,.55);padding:2px 4px;border-radius:4px}
.profile-box{position:absolute;z-index:999;left:10px;right:10px;bottom:148px;height:132px;background:rgba(7,21,35,.97);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:8px 12px;box-shadow:0 -8px 25px rgba(0,0,0,.2)}
.profile-head{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:2px}.profile-head b{font-size:13px}.profile-meta{color:#9eacb9;font-size:10px}
#profileCanvas{display:block;width:100%;height:98px}
.validate-btn{bottom:350px!important}.edit-tools{bottom:288px!important}

.aircraft-symbol{position:relative;pointer-events:none;transform-origin:50% 50%}
.aircraft-symbol img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 1px 2px rgba(0,0,0,.9))}
.coord-box{position:absolute;z-index:1000;right:16px;top:180px;background:rgba(7,21,35,.94);color:#fff;border:1px solid rgba(255,255,255,.12);border-radius:10px;padding:7px 10px;font-size:12px;font-weight:700;box-shadow:0 6px 18px rgba(0,0,0,.25);line-height:1.35}.coord-box .coord-label{font-size:10px;color:#9eacb9;font-weight:600;text-transform:uppercase}
/* ===== V0.3 : analyse LZ + panneaux repliables ===== */
.panel{transition:all .2s ease}
.panel-togglebar{
  display:flex;align-items:center;justify-content:space-between;
  min-height:32px;margin:-2px 0 7px;padding:0 3px;cursor:pointer;
}
.panel-togglebar .left{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:800}
.panel-togglebar .mini-state{font-size:11px;color:#9eacb9;font-weight:700}
.chev{font-size:18px;color:#fff;transition:transform .18s ease}
.panel.collapsed{padding:8px 12px}
.panel.collapsed .cards,.panel.collapsed .footer{display:none}
.panel.collapsed .panel-togglebar{margin:0;min-height:28px}

.analysis-box{
  position:absolute;z-index:1000;right:16px;top:236px;width:min(360px,calc(100vw - 32px));
  background:rgba(7,21,35,.96);border:1px solid rgba(255,255,255,.12);
  border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.28);overflow:hidden;
}
.analysis-head{
  display:flex;align-items:center;gap:9px;padding:10px 12px;cursor:pointer;
  font-size:13px;font-weight:850;
}
.analysis-light{width:13px;height:13px;border-radius:50%;background:#9eacb9;flex:0 0 auto}
.analysis-head .title{flex:1}
.analysis-head .summary{font-size:11px;color:#c7d1da;font-weight:700;text-align:right}
.analysis-body{padding:0 12px 11px;font-size:12px;line-height:1.45}
.analysis-box.collapsed .analysis-body{display:none}
.analysis-reason{
  padding:6px 8px;margin-top:6px;border-radius:8px;background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.07)
}
.analysis-note{margin-top:7px;color:#9eacb9;font-size:10px}
.analysis-badge{font-weight:850}
.analysis-box.green .analysis-light{background:#63d33d}
.analysis-box.orange .analysis-light{background:#ffad3d}
.analysis-box.red .analysis-light{background:#ff5b57}

body.panel-collapsed .profile-box{bottom:62px}
body.panel-collapsed .validate-btn{bottom:264px!important}body.panel-collapsed .edit-tools{bottom:202px!important}

@media(max-width:900px){
  .analysis-box{right:10px;top:236px;width:min(330px,calc(100vw - 20px))}
}

/* V0.3.1 UI */
.edit-btn{top:360px!important;left:75px!important;right:auto!important;width:58px!important;height:58px!important;padding:0!important;border-radius:14px!important;display:flex!important;align-items:center!important;justify-content:center!important;font-size:0!important}
.edit-btn::after{content:"DZ";font-size:16px;font-weight:900}
.coord-box{top:94px!important;right:18px!important;left:auto!important;margin-top:8px!important}
.analysis-box{top:160px!important;right:18px!important;left:auto!important;width:min(360px,calc(100vw - 36px))!important}
.profile-title-toggle{display:flex;align-items:center;justify-content:space-between;cursor:pointer}
.profile-box.collapsed-profile{height:auto!important;padding-bottom:9px!important}
.profile-box.collapsed-profile canvas,.profile-box.collapsed-profile .profile-meta,.profile-box.collapsed-profile .profile-label,.profile-box.collapsed-profile .profile-side{display:none!important}

/* ===== V0.3.2 corrections UI iPad ===== */
/* DZ appartient réellement à la colonne + / - / N : même boîte et même espacement */
.controls .edit-btn{
  position:static!important;top:auto!important;left:auto!important;right:auto!important;
  width:48px!important;height:48px!important;min-width:48px!important;
  padding:0!important;margin:0!important;border-radius:14px!important;
  font-size:15px!important;line-height:48px!important;
  display:block!important;background:rgba(7,21,35,.94)!important;color:#fff!important;
  box-shadow:0 8px 24px rgba(0,0,0,.2)!important;
}
.controls .edit-btn::after{content:none!important}
.controls{gap:10px!important}

/* Coordonnées immédiatement sous le bandeau de recherche, avec espace */
.coord-box{
  top:86px!important;right:18px!important;left:auto!important;
  margin:0!important;max-width:300px!important;
}

/* Analyse sous les coordonnées, sans superposition */
.analysis-box{
  top:148px!important;right:18px!important;left:auto!important;
  width:min(360px,calc(100vw - 36px))!important;
}

/* Profil longitudinal réellement rétractable */
.profile-head{cursor:pointer!important;gap:10px!important}
.profile-head #profileMeta{margin-left:auto!important}
.profile-box.collapsed-profile{
  height:34px!important;min-height:34px!important;padding:8px 12px!important;
}
.profile-box.collapsed-profile #profileCanvas{display:none!important}
.profile-box.collapsed-profile #profileMeta{display:none!important}


/* ===== V0.3.4 — réparation UI sans restructurer le DOM ===== */

/* Colonne gauche : + / - / N / DZ, tous identiques */
.controls{
  gap:10px!important;
}
.controls .btn,
.controls .edit-btn{
  position:static!important;
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  padding:0!important;
  margin:0!important;
  border-radius:14px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:15px!important;
  line-height:1!important;
}
.controls .edit-btn::after{content:none!important}

/* Coordonnées : sous le bandeau de recherche */
.coord-box{
  top:88px!important;
  right:18px!important;
  left:auto!important;
  margin:0!important;
  max-width:330px!important;
}

/* Analyse : franchement sous les coordonnées */
.analysis-box{
  top:158px!important;
  right:18px!important;
  left:auto!important;
  width:min(360px,calc(100vw - 36px))!important;
}

/* Pente en bas ; le profil est positionné dynamiquement au-dessus en JS */
.panel{
  bottom:10px!important;
}
.profile-box{
  bottom:180px!important; /* valeur de secours avant le calcul JS */
}

/* neutraliser les anciens déplacements liés au panneau replié */
body.panel-collapsed .profile-box{bottom:180px!important}


/* ===== V0.3.5 — mise en page stabilisée ===== */

/* Coordonnées entièrement sous la barre de recherche */
.coord-box{
  top:112px!important;
  right:18px!important;
  left:auto!important;
  margin:0!important;
  max-width:330px!important;
}

/* Analyse sous les coordonnées avec marge nette */
.analysis-box{
  top:178px!important;
  right:18px!important;
  left:auto!important;
  width:min(360px,calc(100vw - 36px))!important;
}

/* Les deux panneaux bas restent accolés une fois repliés */
.panel.collapsed{
  height:42px!important;
  min-height:42px!important;
  padding:6px 12px!important;
}
.panel.collapsed .panel-togglebar{
  min-height:28px!important;
}
.profile-box.collapsed-profile{
  height:42px!important;
  min-height:42px!important;
  padding:6px 12px!important;
}
.profile-box.collapsed-profile .profile-head{
  min-height:28px!important;
  margin:0!important;
}


/* ===== V0.3.6 — corrections robustes de layout ===== */

/* Les positions verticales coordonnées/analyse sont désormais calculées en JS */
.coord-box{
  right:18px!important;
  left:auto!important;
  margin:0!important;
  max-width:330px!important;
}
.analysis-box{
  right:18px!important;
  left:auto!important;
  width:min(360px,calc(100vw - 36px))!important;
}

/* Panneaux bas : JS écrit bottom avec priorité !important */
.panel.collapsed{
  height:42px!important;
  min-height:42px!important;
  padding:6px 12px!important;
}
.profile-box.collapsed-profile{
  height:42px!important;
  min-height:42px!important;
  padding:6px 12px!important;
}
.profile-box.collapsed-profile .profile-head{
  min-height:28px!important;
  margin:0!important;
}


/* ===== V0.3.8 ===== */
.drawer-good #basemapSelect,
.drawer-good #drawerEdit,
.drawer-good #drawerNorth{
  box-sizing:border-box!important;
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  padding:0 12px!important;
  border-radius:9px!important;
  font-size:14px!important;
}
.drawer-good #basemapSelect{margin:0!important;}
.coord-box{cursor:pointer!important;user-select:none}


/* ===== V0.3.47 ===== */
.startup-warning{
  position:fixed;inset:0;z-index:5000;
  display:flex;align-items:center;justify-content:center;
  padding:24px;background:rgba(0,0,0,.56);
  backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
}
.startup-warning.hidden{display:none!important}
.startup-warning-card{
  width:min(430px,calc(100vw - 40px));
  background:rgba(7,21,35,.98);color:#fff;
  border:1px solid rgba(255,255,255,.15);
  border-radius:18px;padding:22px 22px 18px;text-align:center;
  box-shadow:0 18px 60px rgba(0,0,0,.5);
}
.startup-warning-icon{
  width:42px;height:42px;margin:0 auto 10px;
  display:flex;align-items:center;justify-content:center;
  border-radius:50%;background:#ffad3d;color:#071523;
  font-size:27px;font-weight:950;
}
.startup-warning-title{font-size:19px;font-weight:900;margin-bottom:12px}
.startup-warning-text{font-size:16px;line-height:1.45;font-weight:700;margin:0 auto 18px;max-width:360px}
.startup-warning button{
  width:100%;height:46px;border:0;border-radius:11px;
  background:#fff;color:#071523;font-size:15px;font-weight:900;
}


.analysis-box.pending .analysis-light{background:#9eacb9}
.analysis-box.pending .summary{color:#c7d1da}

/* ===== V0.3.47 — interface web/PWA ===== */
.topbar{
  top:max(8px, env(safe-area-inset-top))!important;
  left:10px!important;
  right:10px!important;
}
.controls{
  top:calc(max(8px, env(safe-area-inset-top)) + 64px)!important;
  left:10px!important;
}
.drawer-good{
  top:calc(max(8px, env(safe-area-inset-top)) + 60px)!important;
  left:10px!important;
}
.drawer-version{
  margin-top:12px;
  padding-top:11px;
  border-top:1px solid rgba(255,255,255,.10);
  color:#9eacb9;
  font-size:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.drawer-version strong{color:#fff;font-size:13px}
#drawerUpdate{
  background:#12283d!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.14)!important;
}
#updateStatus{
  display:block;
  min-height:16px;
  margin-top:4px;
  color:#9eacb9;
  font-size:11px;
  text-align:center;
}


/* ===== V0.3.47 — mise en forme haute ===== */
.topbar{
  top:0!important;
  left:8px!important;
  right:8px!important;
}
.controls{
  top:58px!important;
  left:8px!important;
}
.drawer-good{
  top:56px!important;
  left:8px!important;
}

/* Menu homogène */
.drawer-good select,
.drawer-good button{
  background:#12283d!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.14)!important;
  text-align:center!important;
  font-weight:700!important;
}
.drawer-good select{
  text-align-last:center!important;
}
.drawer-good button{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.drawer-version{
  justify-content:center!important;
  flex-direction:column!important;
  text-align:center!important;
  gap:2px!important;
}
#updateStatus{text-align:center!important;}

/* Symbole Nord */
#north{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
}
#north .north-symbol{
  width:34px;
  height:40px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1;
}
#north .north-symbol .n{
  font-size:13px;
  font-weight:900;
  margin-bottom:-3px;
}
#north .north-symbol .arrow{
  font-size:27px;
  font-weight:900;
}

/* Punaise DZ : blanc / orange / vert */
#editBtn{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
  transition:color .15s ease, box-shadow .15s ease!important;
}
#editBtn .dz-pin{
  position:relative;
  width:28px;
  height:34px;
  display:block;
}
#editBtn .dz-pin::before{
  content:"";
  position:absolute;
  left:5px;
  top:2px;
  width:18px;
  height:18px;
  border-radius:50% 50% 50% 0;
  transform:rotate(-45deg);
  background:currentColor;
}
#editBtn .dz-pin::after{
  content:"";
  position:absolute;
  left:11px;
  top:8px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:#0d2234;
}
#editBtn.dz-none{color:#fff!important;}
#editBtn.dz-edit{color:#ff9f1a!important;}
#editBtn.dz-valid{color:#41d363!important;}


/* ===== V0.3.47 — pictogrammes affinés ===== */

/* Bouton Nord : symbole plus profilé */
#north .north-symbol{
  width:36px;
  height:42px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1;
}
#north .north-symbol .n{
  font-size:13px;
  font-weight:900;
  margin-bottom:1px;
}
#north .north-symbol .nav-arrow{
  width:24px;
  height:30px;
  display:block;
}
#north .north-symbol .nav-arrow svg{
  width:100%;
  height:100%;
  display:block;
}

/* Bouton LZ : punaise avec cercle de base */
#editBtn .dz-pin{
  width:34px;
  height:36px;
  display:block;
}
#editBtn .dz-pin svg{
  width:100%;
  height:100%;
  display:block;
}


/* ===== V0.3.47 — finitions interface ===== */

/* Menu et localisation : même gabarit que les commandes carte */
.topbar .btn{
  width:48px!important;
  height:48px!important;
  flex:0 0 48px!important;
}
.topbar .search{
  height:48px!important;
}

/* La punaise LZ est maintenant entièrement dessinée en SVG.
   On neutralise les anciens pseudo-éléments CSS qui masquaient son cercle intérieur. */
#editBtn .dz-pin::before,
#editBtn .dz-pin::after{
  content:none!important;
  display:none!important;
}
#editBtn .dz-pin{
  width:34px!important;
  height:38px!important;
}
#editBtn .dz-pin svg{
  overflow:visible;
}
#editBtn .dz-pin .pin-hole{
  fill:#0d2234;
  stroke:currentColor;
  stroke-width:1.2;
}

/* Analyse réduite : uniquement l'état couleur + le titre */
.analysis-box.collapsed .analysis-head .summary,
.analysis-box.collapsed .analysis-head .chev{
  display:none!important;
}
.analysis-box.collapsed .analysis-head{
  padding-right:14px;
}
.analysis-box.collapsed .analysis-head .title{
  flex:0 1 auto;
}


/* ===== V0.3.47 — corrections largeur mobile ===== */

/* Les 2 boutons de la barre haute restent toujours visibles.
   Suppression du max-width/margin auto historique qui pouvait pousser
   le bouton de localisation hors écran sur smartphone. */
.topbar{
  display:grid!important;
  grid-template-columns:48px minmax(0,1fr) 48px!important;
  gap:8px!important;
  align-items:center!important;
}
.topbar .btn{
  width:48px!important;
  min-width:48px!important;
  height:48px!important;
  margin:0!important;
}
.topbar .search{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  box-sizing:border-box!important;
}

/* Analyse repliée : format compact */
.analysis-box.collapsed{
  width:auto!important;
  min-width:132px!important;
  max-width:170px!important;
  right:auto!important;
  left:18px!important;
}
.analysis-box.collapsed .analysis-head{
  min-height:48px!important;
  padding:8px 12px!important;
  gap:9px!important;
}
.analysis-box.collapsed .analysis-head .title{
  flex:0 0 auto!important;
}


/* ===== V0.3.47 — Analyse compacte par défaut ===== */
/* En mode réduit, petit onglet à droite quel que soit le statut. */
.analysis-box.collapsed{
  left:auto!important;
  right:14px!important;
  width:150px!important;
  min-width:150px!important;
  max-width:150px!important;
  height:auto!important;
}
.analysis-box.collapsed .analysis-head{
  min-height:48px!important;
  padding:8px 12px!important;
  gap:9px!important;
  justify-content:flex-start!important;
}
.analysis-box.collapsed .analysis-head .summary,
.analysis-box.collapsed .analysis-head .chev{
  display:none!important;
}
.analysis-box.collapsed .analysis-body{
  display:none!important;
}

/* Développé : retour à la grande fenêtre habituelle */
.analysis-box:not(.collapsed){
  left:auto!important;
  right:14px!important;
}


/* ===== V0.3.47 ===== */
.startup-update-notice{
  margin:16px 0 4px;padding:12px;border-radius:12px;
  background:rgba(255,159,26,.12);border:1px solid rgba(255,159,26,.45);
  display:flex;flex-direction:column;gap:7px;align-items:center;
}
.startup-update-notice span{font-size:12px;color:#c9d3dc}
.startup-update-notice button{
  width:100%;height:40px;border:0;border-radius:9px;
  background:#ff9f1a;color:#071523;font-weight:800;
}
#mapBaseBtn img{width:34px;height:28px;object-fit:contain;display:block}
.basemap-quick{
  position:fixed;z-index:1800;left:66px;top:162px;
  display:none;flex-direction:column;gap:6px;
  background:rgba(7,21,35,.96);padding:8px;border-radius:12px;
  border:1px solid rgba(255,255,255,.14);box-shadow:0 8px 24px rgba(0,0,0,.35)
}
.basemap-quick.open{display:flex}
.basemap-quick button{
  min-width:170px;height:42px;border-radius:8px;border:1px solid rgba(255,255,255,.12);
  background:#12283d;color:#fff;font-weight:700;text-align:center
}


/* ===== V0.3.47 ===== */
.startup-current-version{
  margin-top:10px;
  font-size:13px;
  font-weight:800;
  letter-spacing:.3px;
  color:#c9d3dc;
  text-align:center;
}


/* ===== V0.3.47 — bouton Taille & profil LZ ===== */
#lzConfigBtn{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0!important;
}
#lzConfigBtn img{
  width:42px;
  height:42px;
  object-fit:contain;
  display:block;
}
.lz-config-modal{
  position:fixed;
  inset:0;
  z-index:2400;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(0,0,0,.48);
  backdrop-filter:blur(2px);
}
.lz-config-modal.open{display:flex}
.lz-config-card{
  width:min(360px,92vw);
  border-radius:18px;
  padding:18px;
  background:rgba(7,21,35,.98);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:0 18px 50px rgba(0,0,0,.45);
  color:#fff;
}
.lz-config-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
  font-size:18px;
}
.lz-config-head button{
  width:38px;height:38px;border:0;border-radius:10px;
  background:#12283d;color:#fff;font-size:26px;line-height:1
}
.lz-config-card label{
  display:block;
  margin:12px 0 7px;
  color:#c9d3dc;
  font-size:13px;
  font-weight:700;
}
.lz-config-card select{
  width:100%;
  height:46px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.15);
  background:#12283d;
  color:#fff;
  padding:0 12px;
  font-size:16px;
}
.lz-size-row{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:10px;
  align-items:end;
}
.lz-size-row>div{
  display:grid;
  grid-template-columns:1fr auto;
  gap:6px;
  align-items:center;
}
.lz-size-row>div>span{
  grid-column:1 / -1;
  font-size:12px;
  color:#9eacb9;
}
.lz-size-row input{
  width:100%;
  height:46px;
  box-sizing:border-box;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.15);
  background:#12283d;
  color:#fff;
  padding:0 10px;
  font-size:18px;
  text-align:center;
}
.lz-size-row small{color:#c9d3dc;font-size:14px}
.lz-size-row .times{
  align-self:center;
  margin-top:22px;
  font-size:20px;
  color:#c9d3dc;
}
#lzConfigDone{
  width:100%;
  height:46px;
  margin-top:18px;
  border:0;
  border-radius:10px;
  background:#1e9f50;
  color:#fff;
  font-weight:800;
  font-size:16px;
}


/* ===== V0.3.47 — alignement bord droit ===== */
#coordBox{
  right:12px!important;
}
#analysisBox,
.analysis-box{
  right:12px!important;
}
.analysis-box.collapsed,
.analysis-box:not(.collapsed){
  right:12px!important;
}


/* ===== V0.3.47 — centrage Cougar + panneau Pente ===== */
.aircraft-symbol{position:relative!important}
.aircraft-symbol img{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:50% 50%!important;
}

@media(max-width:900px){
  #slopePanel .cards{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
  }
  #slopePanel .card{
    min-height:72px!important;
    padding:10px 7px!important;
    text-align:center!important;
  }
  #slopePanel .card:first-child{
    grid-column:1 / -1!important;
    min-height:48px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  #slopePanel .card:nth-child(2),
  #slopePanel .card:nth-child(3),
  #slopePanel .card:nth-child(4){
    display:block!important;
  }
  #slopePanel .card:nth-child(n+5){display:none!important}
  #slopePanel .status{
    justify-content:center!important;
    font-size:18px!important;
  }
  #slopePanel .label{
    font-size:10px!important;
    letter-spacing:.02em!important;
    white-space:nowrap!important;
  }
  #slopePanel .value{
    font-size:23px!important;
    margin-top:5px!important;
  }
  #slopePanel .sub{
    font-size:10px!important;
    margin-top:2px!important;
  }
}


/* ===== V0.3.47 — Pente : grille 1 / 3 / 2 ===== */
@media(max-width:900px){
  #slopePanel .cards{
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:8px!important;
  }
  #slopePanel .card{
    display:block!important;
    min-width:0!important;
    padding:9px 6px!important;
    text-align:center!important;
  }
  #slopePanel .slope-status-card{
    grid-column:1 / -1!important;
    min-height:48px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  #slopePanel .slope-main-card{
    grid-column:span 2!important;
    min-height:72px!important;
  }
  #slopePanel .slope-secondary-card{
    grid-column:span 3!important;
    min-height:72px!important;
  }
  #slopePanel .status{justify-content:center!important}
  #slopePanel .label{
    font-size:10px!important;
    line-height:1.15!important;
    white-space:normal!important;
  }
  #slopePanel .value{
    font-size:23px!important;
    margin-top:5px!important;
  }
  #slopePanel .sub{
    font-size:10px!important;
    margin-top:2px!important;
  }
}


/* ===== V0.3.47 — repli Pente/Profil ===== */
#slopePanel.collapsed{
  height:52px!important;
  min-height:52px!important;
  max-height:52px!important;
  padding:8px 12px!important;
  overflow:hidden!important;
}
#slopePanel.collapsed .cards,
#slopePanel.collapsed .footer{
  display:none!important;
}
#slopePanel.collapsed .panel-togglebar{
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
  padding:0 3px!important;
}

.profile-box.collapsed{
  height:52px!important;
  min-height:52px!important;
  max-height:52px!important;
  padding:8px 12px!important;
  overflow:hidden!important;
}
.profile-box.collapsed #profileCanvas,
.profile-box.collapsed .profile-meta{
  display:none!important;
}
.profile-box.collapsed .profile-head{
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
}

/* Les deux barres repliées restent empilées proprement en bas. */
body.panel-collapsed .profile-box.collapsed{
  bottom:72px!important;
}


/* ===== V0.3.47 — recherche DDM / MGRS ===== */
.search-hint{
  position:absolute;
  z-index:1001;
  top:108px;
  left:80px;
  right:80px;
  max-width:760px;
  margin:auto;
  background:rgba(7,21,35,.97);
  border:1px solid rgba(255,255,255,.12);
  border-radius:11px;
  padding:8px 12px;
  color:#dce5ed;
  font-size:11px;
  line-height:1.5;
  box-shadow:0 8px 22px rgba(0,0,0,.25);
  display:none;
  pointer-events:none;
}
.search-hint.show{display:block}
.search-hint b{color:#fff}
@media(max-width:700px){
  .search-hint{
    left:114px;
    right:68px;
    top:106px;
    font-size:10px;
  }
}


/* ===== V0.3.47 — correctif Profil DZ rétractable ===== */
.profile-box.collapsed-profile{
  height:52px!important;
  min-height:52px!important;
  max-height:52px!important;
  padding:8px 12px!important;
  overflow:hidden!important;
}
.profile-box.collapsed-profile #profileCanvas,
.profile-box.collapsed-profile .profile-meta{
  display:none!important;
}
.profile-box.collapsed-profile .profile-head{
  height:34px!important;
  min-height:34px!important;
  margin:0!important;
}


/* ===== V0.3.47 — visuel TIGRE ===== */
.aircraft-symbol img{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  transform-origin:50% 50%!important;
}

/* ===== V0.3.59 — pastille de mise à jour dans le menu ===== */
.update-badge{
  display:inline-block;margin-left:8px;padding:2px 8px;
  border-radius:999px;background:#ffad3d;color:#071523;
  font-size:12px;font-weight:800;vertical-align:middle;
}
