/*
 * Affichage smartphone uniquement.
 * Cible les téléphones via device-width <= 600px afin de ne pas modifier
 * l'affichage PC/Mac ni iPad.
 */
@media screen and (max-device-width:600px){
  html{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
    -webkit-text-size-adjust:100%;
    text-size-adjust:100%;
  }

  body{
    width:100%;
    max-width:100%;
    min-width:0 !important;
    margin:0;
    overflow-x:hidden !important;
  }

  *,*::before,*::after{
    box-sizing:border-box;
    min-width:0;
  }

  main,section,article,aside,header,footer,nav,
  div,form,fieldset,figure,ul,ol,li{
    max-width:100%;
  }

  img,svg,video,canvas,picture{
    max-width:100%;
  }

  iframe{
    max-width:100% !important;
  }

  h1,h2,h3,h4,h5,h6,p,li,label,legend,
  a,button,span,strong,small,em,time{
    overflow-wrap:break-word;
    word-wrap:break-word;
  }

  /* Les textes doivent pouvoir revenir à la ligne au lieu d'être coupés. */
  .button,.home-ui-btn,.header-cta,.home-card-link,
  .home-news-alert a,.push-subscribe-btn,
  .dordogne-live-badge,.orientation,.status-pill{
    white-space:normal !important;
  }

  input,select,textarea,button{
    max-width:100%;
  }

  input,select,textarea{
    width:100%;
  }

  table{
    display:block;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  pre,code{
    max-width:100%;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
  }

  /* ===== Bandeau smartphone ===== */
  .site-header{
    width:100% !important;
    max-width:100% !important;
    min-height:124px !important;
    height:124px !important;
    padding:8px 58px 38px 10px !important;
    overflow:visible !important;
  }

  .site-header .brand-banner{
    width:calc(100% - 4px) !important;
    max-width:100% !important;
    grid-template-columns:68px minmax(0,1fr) !important;
    column-gap:9px !important;
  }

  .site-header .brand-logo-round{
    width:64px !important;
    height:64px !important;
    max-width:64px !important;
    max-height:64px !important;
  }

  .site-header .brand-banner-copy{
    width:100%;
    max-width:100%;
    overflow:visible !important;
  }

  .site-header .brand-banner-copy strong,
  .site-header .brand-banner-copy strong span,
  .site-header .brand-banner-copy strong b,
  .site-header .brand-banner-copy small,
  .site-header .brand-banner-copy em{
    width:100%;
    max-width:100%;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  .site-header .brand-banner-copy strong span{
    font-size:9.5px !important;
    line-height:1.05 !important;
    letter-spacing:.07em !important;
  }

  .site-header .brand-banner-copy strong b{
    font-size:16px !important;
    line-height:1.04 !important;
    letter-spacing:.035em !important;
  }

  .site-header .brand-banner-copy small{
    font-size:6.6px !important;
    line-height:1.15 !important;
    letter-spacing:.09em !important;
    margin-top:3px !important;
  }

  .site-header .brand-banner-copy em{
    font-size:6.4px !important;
    line-height:1.15 !important;
    letter-spacing:.06em !important;
    margin-top:3px !important;
  }

  .site-header .header-brand-join-link{
    display:inline-flex !important;
    left:50% !important;
    bottom:7px !important;
    transform:translateX(-50%) !important;
    width:auto !important;
    min-width:104px !important;
    max-width:calc(100% - 100px) !important;
    height:27px !important;
    padding:0 12px !important;
    font-size:9.5px !important;
    white-space:nowrap !important;
  }

  .site-header .menu-toggle{
    right:11px !important;
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    min-height:38px !important;
  }

  /* Menu smartphone : aucune coupure et toujours au-dessus du contenu. */
  .site-header .main-nav{
    top:124px !important;
    bottom:0 !important;
    width:100% !important;
    max-width:100% !important;
    max-height:calc(100dvh - 124px) !important;
    padding:14px 14px 24px !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
  }

  .site-header .main-nav .nav-join-link{
    display:none !important;
  }

  .site-header .main-nav > a,
  .site-header .main-nav .nav-dropdown,
  .site-header .main-nav .nav-dropdown > summary{
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    min-height:42px !important;
    white-space:normal !important;
  }

  .site-header .main-nav .nav-visible-label{
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
    line-height:1.2 !important;
  }

  .site-header .main-nav .nav-dropdown-menu{
    width:100% !important;
    max-width:100% !important;
  }

  .site-header .main-nav .nav-dropdown-menu a{
    white-space:normal !important;
    overflow-wrap:anywhere;
  }

  /* ===== Contenu général ===== */
  .section,.section-tight,.page-shell,.page-content,
  .home-redesign,.home-dashboard-shell,.dordogne-live-wrap,
  .foreign-country,.foreign-hero-content{
    width:100% !important;
    max-width:100% !important;
  }

  .section,.section-tight,.page-shell,.page-content{
    padding-left:14px !important;
    padding-right:14px !important;
  }

  .home-redesign{
    padding-left:7px !important;
    padding-right:7px !important;
  }

  .quick-features,.split,.two-columns,.weather-page-grid,
  .news-grid,.membership-layout,.contact-layout,.site-grid,
  .card-grid.four,.card-grid.three,.timeline,.link-grid,
  .foreign-grid,.foreign-resource-grid,.home-dashboard-top,
  .home-dashboard-bottom,.dordogne-live-grid,.dordogne-side{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .safety-banner div,.newsletter,.widget-head,.external-head,
  .home-card-title-row,.home-weather-footer,.foreign-country-head{
    flex-wrap:wrap !important;
  }

  /* Cartes et blocs : jamais plus larges que l'écran. */
  .weather-widget,.external-weather,.checklist-card,.price-card,
  .netlify-form,.site-card,.news-feature,.info-card,
  .home-hero-card,.home-weather-card,.home-beacons-card,
  .home-forum-card,.home-news-section,.dordogne-live-panel,
  .dordogne-map-card,.dordogne-side-card{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  .site-card{
    grid-template-columns:1fr !important;
  }

  .site-card img{
    height:auto !important;
    max-height:280px;
  }

  /* ===== Accueil ===== */
  body.home-dashboard-page .home-news-alert{
    width:100% !important;
    max-width:100% !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:8px !important;
  }

  body.home-dashboard-page .home-news-alert > div,
  body.home-dashboard-page .home-news-alert-actions{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  body.home-dashboard-page .home-news-alert strong,
  body.home-dashboard-page .home-news-alert small,
  #homeLatestNewsTeaser{
    max-width:100% !important;
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  body.home-dashboard-page .home-news-alert-date{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
  }

  .home-hero-card{
    min-height:390px !important;
  }

  .home-hero-overlay{
    left:18px !important;
    right:18px !important;
    bottom:42px !important;
    width:auto !important;
    max-width:none !important;
  }

  .home-hero-overlay h1,
  .home-hero-overlay p{
    width:100%;
    max-width:100%;
    white-space:normal !important;
  }

  .home-hero-overlay h1{
    font-size:1.48rem !important;
    line-height:1.08 !important;
  }

  .home-hero-overlay p{
    font-size:.84rem !important;
    line-height:1.4 !important;
  }

  .home-hero-actions{
    width:100%;
    max-width:100%;
  }

  .home-ui-btn{
    flex:1 1 135px;
    min-width:0 !important;
  }

  .home-card-title-row{
    align-items:flex-start !important;
  }

  .home-card-title-row h2,
  .home-card-link{
    max-width:100%;
    white-space:normal !important;
  }

  .home-weather-card .dordogne-map-toolbar{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:6px !important;
  }

  .home-weather-card .dordogne-map-toolbar button{
    width:100% !important;
    min-width:0 !important;
    white-space:normal !important;
    font-size:.72rem !important;
  }

  .home-weather-card .dordogne-forecast-controls{
    overflow:visible !important;
  }

  .home-weather-card .dordogne-day-tabs,
  .home-weather-card .dordogne-period-tabs{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    overflow:visible !important;
    width:100% !important;
  }

  .home-weather-card .dordogne-day-tabs button,
  .home-weather-card .dordogne-period-tabs button{
    min-width:0 !important;
    width:100% !important;
    white-space:normal !important;
  }

  .home-weather-map-wrap{
    width:auto !important;
    max-width:100% !important;
    margin-left:8px !important;
    margin-right:8px !important;
  }

  .home-weather-card .dordogne-map,
  .dordogne-map,.leaflet-container{
    width:100% !important;
    max-width:100% !important;
  }

  .home-weather-card .dordogne-map{
    height:390px !important;
  }

  .home-current-weather{
    width:100% !important;
    max-width:100% !important;
    position:relative !important;
    top:auto !important;
    right:auto !important;
    margin:8px 0 0 !important;
  }

  .home-current-grid{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .home-current-grid span{
    white-space:normal !important;
  }

  .home-beacons-card .home-dordogne-weather-grid{
    grid-template-columns:minmax(0,1fr) !important;
    gap:9px !important;
    padding:0 8px !important;
  }

  .home-beacons-card .home-dordogne-weather-card{
    height:auto !important;
    min-height:0 !important;
    grid-template-rows:auto auto auto auto !important;
    overflow:visible !important;
  }

  .home-beacons-card .home-dordogne-weather-head,
  .home-beacons-card .home-dordogne-beacon-label,
  .home-beacons-card .home-dordogne-direction{
    height:auto !important;
    min-height:0 !important;
    overflow:visible !important;
    white-space:normal !important;
  }

  .home-beacons-card .home-dordogne-beacon-label{
    padding:5px 4px !important;
  }

  .home-beacons-card .home-dordogne-beacon-label strong,
  .home-beacons-card .home-dordogne-weather-head strong,
  .home-beacons-card .home-dordogne-direction strong,
  .home-beacons-card .home-dordogne-direction span{
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  .home-beacons-card .home-dordogne-widget-shell{
    width:100% !important;
    height:104px !important;
    min-height:104px !important;
  }

  .home-beacons-card .home-dordogne-widget-shell iframe{
    width:128% !important;
    max-width:none !important;
  }

  .home-compact-forum-form .forum-fields{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .home-news-section .home-latest-news,
  .home-quick-actions{
    grid-template-columns:minmax(0,1fr) !important;
  }

  /* ===== Météo Dordogne ===== */
  .dordogne-live-wrap{
    padding-left:8px !important;
    padding-right:8px !important;
  }

  .dordogne-live-panel{
    padding:12px !important;
    border-radius:16px !important;
  }

  .dordogne-live-head{
    align-items:flex-start !important;
    flex-direction:column !important;
  }

  .dordogne-live-badge{
    max-width:100%;
  }

  .dordogne-map-toolbar{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    width:100%;
  }

  .dordogne-map-toolbar button{
    min-width:0 !important;
    width:100%;
    white-space:normal !important;
  }

  .dordogne-toolbar-spacer{
    display:none !important;
  }

  .dordogne-map{
    height:400px !important;
  }

  .dordogne-current-main{
    flex-wrap:wrap;
  }

  .dordogne-current-row{
    flex-wrap:wrap;
  }

  .dordogne-day-tabs,
  .dordogne-period-tabs{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    overflow:visible !important;
  }

  .dordogne-day-tabs button,
  .dordogne-period-tabs button{
    width:100% !important;
    min-width:0 !important;
    white-space:normal !important;
  }

  .dordogne-daily-grid{
    grid-template-columns:minmax(0,1fr) !important;
    overflow:visible !important;
  }

  .dordogne-day{
    border-right:0 !important;
    border-bottom:1px solid rgba(255,255,255,.12);
  }

  /* Les heures restent défilables dans LEUR bloc sans agrandir la page. */
  .dordogne-hourly{
    max-width:100%;
    overflow:hidden;
  }

  .dordogne-hourly-scroll{
    max-width:100%;
    overflow-x:auto !important;
    overscroll-behavior-inline:contain;
  }

  /* ===== Pages diverses ===== */
  .foreign-hero-content,
  .foreign-country{
    width:calc(100% - 20px) !important;
  }

  .foreign-country-head{
    padding:20px !important;
  }

  .country-quicklinks{
    width:100%;
    justify-content:flex-start !important;
  }

  .country-quicklinks a,
  .foreign-actions a{
    white-space:normal !important;
  }

  .neighbor-clubs-grid,
  .club-files-grid{
    grid-template-columns:minmax(0,1fr) !important;
  }

  .club-file-card{
    flex-direction:column;
  }

  /* Floating controls must remain inside the visible phone width. */
  .floating-whatsapp,.whatsapp-float,[class*="floating"]{
    max-width:calc(100vw - 24px) !important;
  }
}


/* ==========================================================
   CORRECTION 2026-09-09 — CARTE VENT SUR SMARTPHONE
   Ne s'applique qu'aux téléphones (<= 600 px).
   Les marqueurs sont autonomes, fixes et non déformables.
   ========================================================== */
@media (max-width:600px){
  .home-weather-card #dordogneMap .wind-marker-wrap.mobile-wind-wrap,
  #dordogneMap .wind-marker-wrap.mobile-wind-wrap{
    width:50px !important;
    height:50px !important;
    min-width:50px !important;
    min-height:50px !important;
    margin:0 !important;
    padding:0 !important;
    background:transparent !important;
    border:0 !important;
    overflow:visible !important;
    box-sizing:border-box !important;
  }

  .home-weather-card #dordogneMap .wind-map-marker.current.mobile-wind,
  #dordogneMap .wind-map-marker.current.mobile-wind{
    position:absolute !important;
    inset:0 !important;
    width:50px !important;
    height:50px !important;
    min-width:50px !important;
    min-height:50px !important;
    max-width:50px !important;
    max-height:50px !important;
    margin:0 !important;
    padding:4px 3px 3px !important;
    border-radius:50% !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:2px !important;
    overflow:visible !important;
    box-sizing:border-box !important;
    transform:none !important;
    background:#fff !important;
    border:2px solid #b9d6e5 !important;
    box-shadow:0 2px 7px rgba(0,45,70,.28) !important;
    color:#123e58 !important;
  }

  #dordogneMap .wind-map-marker.current.mobile-wind.medium{
    background:#fff9df !important;
    border-color:#e3c557 !important;
  }
  #dordogneMap .wind-map-marker.current.mobile-wind.strong{
    background:#fff0ec !important;
    border-color:#dc7863 !important;
  }

  /* Flèche dessinée en CSS : pas de glyphe/emoji déformé par Safari. */
  #dordogneMap .wind-map-marker.current.mobile-wind .wind-vector{
    position:relative !important;
    display:block !important;
    width:18px !important;
    height:18px !important;
    min-width:18px !important;
    min-height:18px !important;
    margin:0 !important;
    padding:0 !important;
    transform-origin:50% 50% !important;
  }
  #dordogneMap .wind-map-marker.current.mobile-wind .wind-vector::before{
    content:"" !important;
    position:absolute !important;
    left:8px !important;
    top:4px !important;
    width:3px !important;
    height:12px !important;
    border-radius:2px !important;
    background:#1976a8 !important;
  }
  #dordogneMap .wind-map-marker.current.mobile-wind .wind-vector::after{
    content:"" !important;
    position:absolute !important;
    left:4px !important;
    top:1px !important;
    width:0 !important;
    height:0 !important;
    border-left:5px solid transparent !important;
    border-right:5px solid transparent !important;
    border-bottom:7px solid #1976a8 !important;
  }

  #dordogneMap .wind-map-marker.current.mobile-wind b{
    display:block !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    text-align:center !important;
    white-space:nowrap !important;
    font-size:14px !important;
    line-height:14px !important;
    font-weight:900 !important;
    color:#123e58 !important;
    letter-spacing:0 !important;
  }
  #dordogneMap .wind-map-marker.current.mobile-wind b::after{
    content:" km/h" !important;
    display:inline !important;
    margin:0 !important;
    font-size:6px !important;
    line-height:1 !important;
    font-weight:800 !important;
    color:#547180 !important;
  }
  #dordogneMap .wind-map-marker.current.mobile-wind .wind-arrow,
  #dordogneMap .wind-map-marker.current.mobile-wind small,
  #dordogneMap .wind-map-marker.current.mobile-wind em{
    display:none !important;
  }
}


/* Surcharge finale smartphone : garde les marqueurs ronds complets sur la carte Dordogne */
@media (max-width:640px){
  #dordogneMap .wind-map-marker.current.mobile-wind{
    width:68px !important;
    height:68px !important;
    min-width:68px !important;
    min-height:68px !important;
    max-width:68px !important;
    max-height:68px !important;
    border-radius:50% !important;
  }
  #dordogneMap .wind-map-marker.current.mobile-wind .wind-arrow{
    display:block !important;
  }
  #dordogneMap .wind-map-marker.current.mobile-wind .wind-vector{
    display:none !important;
  }
  #dordogneMap .wind-map-marker.current:not(.mobile-wind){
    width:68px !important;
    height:68px !important;
    min-width:68px !important;
    min-height:68px !important;
    max-width:68px !important;
    max-height:68px !important;
    border-radius:50% !important;
  }
}

/* === Smartphone : bouton Publier du forum compact ===
 * Evite que flex:1 1 135px transforme le bouton en grand bandeau vertical.
 */
@media screen and (max-device-width:600px){
  .home-compact-forum-form .forum-form-bottom .home-ui-btn[type="submit"]{
    flex:0 0 auto !important;
    width:auto !important;
    min-width:82px !important;
    max-width:110px !important;
    height:32px !important;
    min-height:32px !important;
    padding:0 14px !important;
    margin:2px 0 0 auto !important;
    align-self:flex-end !important;
    border-radius:8px !important;
    font-size:.70rem !important;
    line-height:32px !important;
    white-space:nowrap !important;
  }
}
