/* Sam Wind 13.5.1 — Meilleur spot du jour avec repli sûr et mobile compact. */

.sam-wind-clear.sam-daily-spot{
  border-color:rgba(116,228,241,.46)!important;
}
.sam-wind-clear.sam-daily-spot::before{
  background:linear-gradient(180deg,#19d9f1 0%,#70e78b 100%)!important;
}
.sam-daily-spot .sam-clear-spot span{
  display:flex;
  align-items:center;
  gap:6px;
  color:#86edf6!important;
}
.sam-daily-spot .sam-clear-spot span::before{
  content:"★";
  color:#ffd45b;
  font-size:9px;
}
.sam-daily-spot .sam-clear-favorite{display:none!important}
.sam-daily-spot .sam-clear-actions{grid-template-columns:1.28fr 1fr!important}
.sam-daily-spot .sam-clear-actions [data-clear-forecast]{
  border-color:rgba(25,217,241,.62)!important;
  background:#0b5668!important;
}
.sam-daily-spot .sam-clear-actions [data-clear-details][hidden]{display:none!important}
.sam-daily-spot.sam-daily-empty .sam-clear-speed,
.sam-daily-spot.sam-daily-empty .sam-clear-reading{opacity:.72}
.sam-daily-spot.sam-daily-empty .sam-clear-actions{grid-template-columns:1fr!important}
.sam-daily-spot.sam-daily-empty .sam-clear-actions [data-clear-forecast]{max-width:240px}

/* Une seule surface développée à la fois. */
body.spot-detail-open .sam-daily-spot,
body.spot-list-open .sam-daily-spot,
body.sheet-open .sam-daily-spot,
body.modal-open .sam-daily-spot,
body.map-controls-expanded .sam-daily-spot,
html.sw-feedback-open .sam-daily-spot,
body.sw-feedback-open .sam-daily-spot{
  opacity:0!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

@media(max-width:700px){
  :root{
    --sw-mobile-nav:64px;
    --sw-mobile-nav-h:64px;
    --sw-timeline:92px;
    --sw-timeline-h:92px;
  }

  /* La zone utile occupe exactement l'espace entre l'en-tête et la navigation.
     Les anciennes feuilles fixaient parfois une hauteur et un inset en même temps,
     ce qui créait une bande noire sous la chronologie. */
  .map-first-main{
    inset:var(--sw-header,64px) 0 calc(var(--sw-mobile-nav) + env(safe-area-inset-bottom,0px)) 0!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
  }
  .map-experience,
  .map-shell,
  .map-canvas-wrap{
    min-height:0!important;
  }
  .map-shell{
    height:100%!important;
    grid-template-rows:minmax(0,1fr) var(--sw-timeline)!important;
  }

  /* Carte Spot du jour : deux lignes lisibles, sans mini-texte illisible. */
  .sam-wind-clear.sam-daily-spot{
    left:7px!important;
    right:7px!important;
    bottom:7px!important;
    width:auto!important;
    min-height:74px!important;
    max-height:78px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 66px!important;
    grid-template-areas:"head action" "main action"!important;
    gap:4px 7px!important;
    padding:7px 8px!important;
    border-radius:14px!important;
    overflow:hidden!important;
  }
  .sam-daily-spot .sam-clear-head{
    grid-area:head!important;
    min-width:0!important;
    min-height:26px!important;
    height:26px!important;
    margin:0!important;
    align-items:center!important;
  }
  .sam-daily-spot .sam-clear-spot span{
    display:flex!important;
    margin:0 0 2px!important;
    gap:4px!important;
    font-size:7px!important;
    line-height:1!important;
    letter-spacing:.09em!important;
  }
  .sam-daily-spot .sam-clear-spot span::before{font-size:7px!important}
  .sam-daily-spot .sam-clear-spot strong{
    display:block!important;
    margin:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    font-size:16px!important;
    line-height:1.05!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  .sam-daily-spot .sam-clear-spot small{display:none!important}

  .sam-daily-spot .sam-clear-main{
    grid-area:main!important;
    display:grid!important;
    grid-template-columns:62px 92px minmax(0,1fr)!important;
    grid-template-areas:"speed reading status"!important;
    gap:5px!important;
    min-width:0!important;
    min-height:34px!important;
    height:34px!important;
  }
  .sam-daily-spot .sam-clear-speed,
  .sam-daily-spot .sam-clear-reading,
  .sam-daily-spot .sam-clear-status{
    min-width:0!important;
    min-height:34px!important;
    height:34px!important;
    box-sizing:border-box!important;
    border-radius:9px!important;
  }
  .sam-daily-spot .sam-clear-speed{
    justify-content:center!important;
    padding:3px 4px!important;
  }
  .sam-daily-spot .sam-clear-speed>strong{
    font-size:24px!important;
    line-height:.9!important;
  }
  .sam-daily-spot .sam-clear-speed>div{margin-left:4px!important}
  .sam-daily-spot .sam-clear-speed b{font-size:8px!important}
  .sam-daily-spot .sam-clear-speed small{display:none!important}
  .sam-daily-spot .sam-clear-arrow{display:none!important}

  .sam-daily-spot .sam-clear-reading{
    justify-content:center!important;
    padding:4px 6px!important;
  }
  .sam-daily-spot .sam-clear-reading span{display:none!important}
  .sam-daily-spot .sam-clear-reading strong{
    margin:0 0 3px!important;
    overflow:hidden!important;
    font-size:10.5px!important;
    line-height:1!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  .sam-daily-spot .sam-clear-reading small{
    overflow:hidden!important;
    font-size:8px!important;
    line-height:1!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }

  .sam-daily-spot .sam-clear-status{
    grid-template-columns:8px minmax(0,1fr)!important;
    gap:5px!important;
    padding:4px 6px!important;
  }
  .sam-daily-spot .sam-clear-status i{width:8px!important;height:8px!important}
  .sam-daily-spot .sam-clear-status span,
  .sam-daily-spot .sam-clear-status small,
  .sam-daily-spot .sam-clear-status em{display:none!important}
  .sam-daily-spot .sam-clear-status strong{
    display:block!important;
    margin:0!important;
    overflow:hidden!important;
    font-size:9.5px!important;
    line-height:1.12!important;
    text-overflow:ellipsis!important;
    white-space:normal!important;
  }

  .sam-daily-spot .sam-clear-trend,
  .sam-daily-spot .sam-clear-help{display:none!important}
  .sam-daily-spot .sam-clear-actions{
    grid-area:action!important;
    display:flex!important;
    align-items:stretch!important;
    margin:0!important;
  }
  .sam-daily-spot .sam-clear-actions button{display:none!important}
  .sam-daily-spot .sam-clear-actions [data-clear-forecast]{
    display:block!important;
    width:66px!important;
    min-width:66px!important;
    height:62px!important;
    min-height:62px!important;
    padding:5px!important;
    border-radius:10px!important;
    font-size:9.5px!important;
    line-height:1.1!important;
    white-space:normal!important;
  }

  /* Zoom en haut à droite : il ne recouvre plus le bandeau ni la chronologie. */
  #spot-map .leaflet-top.leaflet-left{
    top:48px!important;
    right:7px!important;
    bottom:auto!important;
    left:auto!important;
  }
  #spot-map .leaflet-control-zoom a{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;
    font-size:19px!important;
  }

  /* Chronologie courte. Le curseur et ses libellés historiques sont masqués :
     ils créaient une rangée implicite vide et le large bandeau noir visible sur
     certains Samsung/Chrome. Les heures tactiles restent le contrôle principal. */
  .map-timeline-primary{
    height:var(--sw-timeline)!important;
    min-height:var(--sw-timeline)!important;
    max-height:var(--sw-timeline)!important;
    display:grid!important;
    grid-template-rows:34px 58px!important;
    overflow:hidden!important;
  }
  .map-timeline-primary .map-timeline-head{
    height:34px!important;
    min-height:34px!important;
    padding:3px 7px!important;
  }
  .map-time-play{
    width:36px!important;
    height:28px!important;
    min-width:36px!important;
    min-height:28px!important;
  }
  .map-time-copy strong{font-size:10px!important}
  .map-time-copy small{font-size:6.5px!important}
  .map-time-updated{display:none!important}
  .map-time-count{font-size:8px!important}
  .map-time-slots-shell{
    height:58px!important;
    min-height:58px!important;
    overflow:hidden!important;
  }
  .map-time-slots{
    height:58px!important;
    grid-template-columns:repeat(11,60px)!important;
    padding:4px 0 4px 5px!important;
  }
  .map-time-slots button{
    height:50px!important;
    min-height:50px!important;
    padding:4px!important;
  }
  .map-time-slots button small{font-size:8px!important}
  .map-time-slots button span{font-size:6.5px!important}
  .map-time-scroll{width:34px!important;height:48px!important}
  .map-time-range,
  .map-time-ends,
  .map-safety-strip,
  .map-quick-actions{display:none!important}

  .map-mobile-nav{
    height:var(--sw-mobile-nav)!important;
    min-height:var(--sw-mobile-nav)!important;
    max-height:var(--sw-mobile-nav)!important;
  }
}

@media(max-width:370px){
  .sam-wind-clear.sam-daily-spot{
    grid-template-columns:minmax(0,1fr) 60px!important;
    gap-column:5px!important;
  }
  .sam-daily-spot .sam-clear-main{
    grid-template-columns:56px 82px minmax(0,1fr)!important;
  }
  .sam-daily-spot .sam-clear-actions [data-clear-forecast]{
    width:60px!important;
    min-width:60px!important;
    font-size:9px!important;
  }
  .sam-daily-spot .sam-clear-reading small{font-size:7.5px!important}
}

@media(max-width:700px) and (orientation:landscape) and (max-height:520px){
  .sam-wind-clear.sam-daily-spot{max-width:410px!important}
}

@media(prefers-reduced-motion:reduce){
  .sam-wind-clear.sam-daily-spot{transition:none!important}
}
