/* HotelDelta V1.14 — fiche destination/itinéraire portrait compacte
   La Maison dispose d'une colonne dédiée à gauche : aucun chevauchement. */

@media (orientation:portrait){
  #info-panel{
    position:fixed!important;
    left:calc(86px + env(safe-area-inset-left,0px))!important;
    right:calc(12px + env(safe-area-inset-right,0px))!important;
    bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
    width:auto!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    max-height:min(38dvh,390px)!important;
    padding:6px 11px 10px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    border-radius:20px!important;
    box-sizing:border-box!important;
  }

  /* État compact affiché par défaut : priorité aux informations utiles. */
  #info-panel.hd-sheet-collapsed{
    max-height:min(29dvh,300px)!important;
    padding-top:5px!important;
    padding-bottom:8px!important;
  }

  #info-panel .hd-sheet-handle{
    margin-top:0!important;
    margin-bottom:3px!important;
  }

  #info-panel .hd-sheet-headrow{
    min-height:38px!important;
    padding-right:82px!important;
    margin:0!important;
    gap:5px!important;
  }

  #info-panel #info-commune{
    font-size:15px!important;
    line-height:1.1!important;
  }

  #info-panel #info-code{
    font-size:12px!important;
    margin-top:1px!important;
  }

  #info-panel #info-coords{
    font-size:10px!important;
    line-height:1.15!important;
    margin-top:2px!important;
  }

  #info-panel #info-formats{
    margin-top:4px!important;
    font-size:10px!important;
    line-height:1.25!important;
  }

  #info-panel #info-pistes{
    margin-top:5px!important;
  }

  #info-panel #info-route{
    margin-top:5px!important;
    padding-top:0!important;
  }

  #info-panel #route-vol{
    margin:0 0 5px!important;
    font-size:11px!important;
    line-height:1.2!important;
  }

  #info-panel #route-terre{
    margin:0!important;
    font-size:11px!important;
    line-height:1.3!important;
  }

  #info-panel .hd-route-mode{
    margin-bottom:3px!important;
    padding:3px 6px!important;
    font-size:9px!important;
  }

  #info-panel .route-actions{
    margin-top:5px!important;
    gap:7px!important;
  }

  #info-panel .info-actions{
    margin-top:7px!important;
    gap:7px!important;
  }

  /* Les deux commandes en haut restent compactes. */
  #info-panel #hd-sheet-toggle{
    top:7px!important;
    right:46px!important;
    width:36px!important;
    height:36px!important;
  }

  #info-panel #btn-close-info{
    top:7px!important;
    right:6px!important;
    width:36px!important;
    height:36px!important;
  }

  /* Maison : colonne séparée, parfaitement libre du panneau. */
  body.hd-map-focus:not(.hd-drive-mode) #hd-map-home,
  body.hd-surface-focus:not(.hd-drive-mode) #hd-map-home{
    left:calc(14px + env(safe-area-inset-left,0px))!important;
    right:auto!important;
    bottom:calc(14px + env(safe-area-inset-bottom,0px))!important;
    z-index:9950!important;
  }
}

/* Écrans très étroits : garder une colonne Maison de 72 px, sans écraser le texte. */
@media (orientation:portrait) and (max-width:390px){
  #info-panel{
    left:calc(78px + env(safe-area-inset-left,0px))!important;
    right:calc(8px + env(safe-area-inset-right,0px))!important;
  }
  #info-panel.hd-sheet-collapsed{
    max-height:min(27dvh,270px)!important;
  }
}
