.rb-drive-resume #public-view,
.rb-drive-resume #login-view,
.rb-drive-resume #site-loader{display:none!important}
.rb-drive-resume body{background:#061b38!important}

/* Avance / retard : les couleurs restent lisibles dans chaque carte et chaque HUD. */
.delay-ok{color:#069b68!important}
.delay-warn{color:#d97706!important}
.delay-danger{color:#dc3545!important}
.status-pill.delay-ok{background:#e5f8f0!important;color:#07835c!important}
.status-pill.delay-warn{background:#fff3dc!important;color:#b96700!important}
.status-pill.delay-danger{background:#fff0f2!important;color:#c92e43!important}
#map-delay.delay-ok{color:#079b67!important}
#map-delay.delay-warn{color:#d97706!important}
#map-delay.delay-danger{color:#e03649!important}

.mobile-voice-next{display:none}

@media(max-width:760px){
  /* La consigne garde sa zone : aucun contrôle ne peut plus recouvrir son texte. */
  body.rb-driving-mobile-fullscreen .mobile-guidance{
    z-index:80!important;
    top:max(10px,env(safe-area-inset-top))!important;
    left:max(10px,env(safe-area-inset-left))!important;
    right:max(70px,calc(env(safe-area-inset-right) + 60px))!important;
    min-height:88px!important;
    grid-template-columns:48px minmax(0,1fr)!important;
    gap:10px!important;
    padding:12px!important;
    border-radius:22px!important;
    overflow:hidden!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-guidance .guidance-sign{
    width:48px!important;
    height:48px!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-guidance .guidance-sign svg{
    width:39px!important;
    height:39px!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-guidance strong{
    display:-webkit-box!important;
    margin-top:0!important;
    overflow:hidden!important;
    font-size:clamp(16px,4.6vw,22px)!important;
    line-height:1.08!important;
    overflow-wrap:anywhere!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-guidance span{
    display:-webkit-box!important;
    margin-top:5px!important;
    overflow:hidden!important;
    color:#d7e9fc!important;
    font-size:clamp(9px,2.7vw,12px)!important;
    line-height:1.25!important;
    overflow-wrap:anywhere!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
  }

  /* Suivi orienté : bouton-logo rond, état actif visible et libellé conservé pour l'accessibilité. */
  body.rb-driving-mobile-fullscreen .mobile-driver-map .driver-map-actions{
    position:absolute!important;
    z-index:86!important;
    top:max(18px,calc(env(safe-area-inset-top) + 8px))!important;
    right:max(12px,env(safe-area-inset-right))!important;
    display:block!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-driver-map .mobile-follow{
    position:relative!important;
    inset:auto!important;
    display:grid!important;
    place-items:center!important;
    width:48px!important;
    min-width:48px!important;
    height:48px!important;
    min-height:48px!important;
    padding:0!important;
    overflow:hidden!important;
    border:1px solid rgba(255,255,255,.82)!important;
    border-radius:50%!important;
    background:rgba(255,255,255,.78)!important;
    color:#536c87!important;
    box-shadow:0 12px 28px rgba(4,30,65,.22)!important;
    backdrop-filter:blur(22px) saturate(160%)!important;
    -webkit-backdrop-filter:blur(22px) saturate(160%)!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-driver-map .mobile-follow.is-following{
    background:linear-gradient(145deg,rgba(16,190,150,.92),rgba(5,151,119,.88))!important;
    color:#fff!important;
    box-shadow:0 12px 30px rgba(5,151,119,.32)!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-follow>.rb-icon{
    width:24px!important;
    height:24px!important;
    stroke-width:2.2!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-follow>.js-follow-status{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    margin:-1px!important;
    padding:0!important;
    overflow:hidden!important;
    clip:rect(0 0 0 0)!important;
    clip-path:inset(50%)!important;
    border:0!important;
    white-space:nowrap!important;
  }

  /* La bande vocale n'apparaît que lorsque la pile d'alertes est vide. */
  .mobile-voice-next{
    position:absolute;
    z-index:75;
    top:calc(max(10px,env(safe-area-inset-top)) + 96px);
    left:max(10px,env(safe-area-inset-left));
    right:max(10px,env(safe-area-inset-right));
    display:grid;
    grid-template-columns:1fr auto;
    grid-template-rows:auto auto;
    align-items:center;
    min-height:50px;
    padding:8px 14px;
    border:1px solid rgba(255,255,255,.78);
    border-radius:16px;
    background:rgba(255,255,255,.72);
    box-shadow:0 10px 28px rgba(4,30,65,.14);
    backdrop-filter:blur(24px) saturate(150%);
    -webkit-backdrop-filter:blur(24px) saturate(150%);
    color:#15395f;
  }
  .mobile-voice-next span{font-size:8px;color:#66809a}
  .mobile-voice-next b{font-size:11px}
  .mobile-voice-next .rb-icon{grid-column:2;grid-row:1/3;width:20px;height:20px;color:#075ff7}
  .mobile-driver-map.has-mobile-alerts .mobile-voice-next{display:none!important}

  /* Une seule pile réservée aux alertes, à côté du compteur : plus aucune superposition. */
  body.rb-driving-mobile-fullscreen .mobile-driver-map .mobile-alerts{
    position:absolute!important;
    z-index:82!important;
    top:calc(max(10px,env(safe-area-inset-top)) + 96px)!important;
    left:max(10px,env(safe-area-inset-left))!important;
    right:max(104px,calc(env(safe-area-inset-right) + 94px))!important;
    display:grid!important;
    gap:7px!important;
    max-height:146px!important;
    margin:0!important;
    padding:0 2px 2px 0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    pointer-events:auto!important;
    scrollbar-width:none!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-driver-map .mobile-alerts::-webkit-scrollbar{display:none!important}
  body.rb-driving-mobile-fullscreen .mobile-driver-map .mobile-alerts:empty{display:none!important}
  body.rb-driving-mobile-fullscreen .mobile-driver-map .mobile-alerts .driver-alert{
    position:relative!important;
    inset:auto!important;
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:start!important;
    gap:4px 8px!important;
    width:100%!important;
    min-height:52px!important;
    margin:0!important;
    padding:10px 11px!important;
    overflow:hidden!important;
    border-radius:16px!important;
    background:rgba(255,245,246,.88)!important;
    box-shadow:0 10px 24px rgba(66,24,31,.14)!important;
    backdrop-filter:blur(18px) saturate(145%)!important;
    -webkit-backdrop-filter:blur(18px) saturate(145%)!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-alerts .driver-alert b{
    margin:0!important;
    white-space:normal!important;
    font-size:clamp(11px,3.1vw,14px)!important;
    line-height:1.25!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-alerts .driver-alert span{
    display:-webkit-box!important;
    min-width:0!important;
    overflow:hidden!important;
    font-size:clamp(10px,2.8vw,13px)!important;
    line-height:1.3!important;
    overflow-wrap:anywhere!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
  }

  /* Le compteur utilise la colonne de droite du HUD. */
  body.rb-driving-mobile-fullscreen .interactive-speedometer.mobile-speedometer.speed-card-v3{
    top:calc(max(10px,env(safe-area-inset-top)) + 154px)!important;
    right:max(10px,env(safe-area-inset-right))!important;
    left:auto!important;
    width:84px!important;
    min-width:84px!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-driver-map.has-mobile-alerts .interactive-speedometer.mobile-speedometer.speed-card-v3{
    top:calc(max(10px,env(safe-area-inset-top)) + 96px)!important;
  }
  body.rb-driving-mobile-fullscreen .speed-limit-sign{
    top:calc(max(10px,env(safe-area-inset-top)) + 238px)!important;
    right:max(14px,calc(env(safe-area-inset-right) + 4px))!important;
  }
  body.rb-driving-mobile-fullscreen .mobile-driver-map.has-mobile-alerts .speed-limit-sign{
    top:calc(max(10px,env(safe-area-inset-top)) + 180px)!important;
  }

  body.rb-driving-mobile-fullscreen #map-delay{
    font-weight:950!important;
  }
}

@media(orientation:landscape) and (max-height:600px) and (max-width:1000px){
  body.rb-driving-mobile-fullscreen .mobile-guidance{right:64px!important;max-width:56vw!important}
  body.rb-driving-mobile-fullscreen .mobile-driver-map .mobile-alerts{right:auto!important;width:min(52vw,430px)!important;max-height:105px!important}
}
