/* ============================================================
   MAISON P — V216 — DERNIERE COUCHE MOBILE
   Objectif: lecture premium, zéro débordement, gestes confortables,
   fiches et galeries cohérentes de 320 à 860 px.
   ============================================================ */

@media (max-width:860px){
  html,body{width:100%;max-width:100%;overflow-x:clip!important;}
  body{min-width:0!important;}
  main,section,article,header,footer,nav,div,figure{min-width:0;}
  img,video,svg,canvas{max-width:100%;}

  /* Header mobile: une seule ligne stable, même sur petits iPhone */
  .header,
  body:not([data-page="home"]) .header,
  body[data-page="home"] .header{
    height:72px!important;
    min-height:72px!important;
    padding-left:18px!important;
    padding-right:18px!important;
  }
  .header.solid,.header.light{height:72px!important;min-height:72px!important;}
  .logo{font-size:22px!important;line-height:1!important;white-space:nowrap!important;}
  .mp-header-tools{right:112px!important;gap:8px!important;}
  .mp-head-tool{width:28px!important;height:36px!important;min-width:28px!important;min-height:36px!important;}
  .mp-head-tool svg{width:19px!important;height:19px!important;}
  .header .nav-toggle{
    width:82px!important;min-width:82px!important;height:44px!important;
    padding:10px 0 10px 46px!important;
  }
  .header .nav-toggle::before{font-size:10px!important;letter-spacing:.13em!important;}
  .header .nav-toggle>span{width:25px!important;height:2px!important;}

  /* Menu plein écran: contenu lisible sans chevauchement */
  .nav-panel{padding:86px 20px calc(30px + env(safe-area-inset-bottom))!important;}
  .nav-panel .nav>li>a{min-height:44px!important;display:flex!important;align-items:center!important;}
  .nav-shop-menu a{min-height:38px!important;display:flex!important;align-items:center!important;}

  /* Titres / pages listes */
  .page-hd{padding:108px 20px 38px!important;}
  .ph-crumb{margin-bottom:18px!important;font-size:10px!important;}
  .ph-t{font-size:clamp(42px,13vw,64px)!important;line-height:.96!important;overflow-wrap:anywhere;}
  .ph-d{font-size:16px!important;line-height:1.65!important;max-width:34rem!important;}
  .pgrid{grid-template-columns:1fr!important;padding:34px 16px 72px!important;gap:40px!important;}
  .pgrid .mp-card-wrap,.pgrid .pcard{width:100%!important;min-width:0!important;}
  .pcard .pci,.mp-card-wrap .pci{aspect-ratio:4/5!important;}
  .pcard-m,.pgrid .mp-card-wrap>.pcard .pcard-m{
    display:flex!important;flex-direction:column!important;align-items:flex-start!important;
    min-height:0!important;padding:14px 2px 8px!important;gap:4px!important;
  }
  .pcard-n{font-size:20px!important;line-height:1.18!important;overflow-wrap:anywhere!important;}
  .pcard-p{max-width:100%!important;padding-left:0!important;text-align:left!important;font-size:13px!important;}
  .mp-card-buy{width:100%!important;min-height:48px!important;margin-top:8px!important;display:flex!important;align-items:center!important;justify-content:center!important;}

  /* Fiches produit: galerie d'abord, information ensuite, sans sticky gênant */
  body[data-page^="produit-"]{padding-bottom:calc(82px + env(safe-area-inset-bottom))!important;}
  body[data-page^="produit-"] .fiche{padding-top:72px!important;}
  body[data-page^="produit-"] .fiche-wrap{display:block!important;min-height:0!important;}
  body[data-page^="produit-"] .fiche-gallery{position:static!important;min-height:0!important;width:100%!important;}
  body[data-page^="produit-"] .mp-swipe-gallery{width:100%!important;overflow:hidden!important;}
  body[data-page^="produit-"] .mp-swipe-track{width:100%!important;}
  body[data-page^="produit-"] .mp-swipe-slide{flex:0 0 100%!important;width:100%!important;aspect-ratio:4/5!important;}
  body[data-page^="produit-"] .mp-swipe-slide img{width:100%!important;height:100%!important;object-fit:cover!important;}
  body[data-page^="produit-"] .mp-swipe-count{top:12px!important;right:12px!important;min-width:46px!important;height:34px!important;}
  body[data-page^="produit-"] .mp-swipe-nav{margin:8px 0 6px!important;padding:0 16px!important;min-height:48px!important;}
  body[data-page^="produit-"] .mp-swipe-arrow{display:flex!important;width:44px!important;height:44px!important;min-width:44px!important;align-items:center!important;justify-content:center!important;}
  body[data-page^="produit-"] .mp-swipe-dot{width:8px!important;height:8px!important;}

  body[data-page^="produit-"] .fiche-info,
  body[data-page^="produit-"] .fi-info{padding:34px 20px 64px!important;max-width:none!important;width:100%!important;}
  body[data-page^="produit-"] .fi-crumb{margin-bottom:18px!important;}
  body[data-page^="produit-"] .fi-name{font-size:clamp(38px,11vw,54px)!important;line-height:.96!important;max-width:14ch!important;overflow-wrap:anywhere!important;margin-bottom:18px!important;}
  body[data-page^="produit-"] .fi-price{font-size:28px!important;margin-top:0!important;}
  body[data-page^="produit-"] .fi-note,
  body[data-page^="produit-"] .mp-lead{font-size:17px!important;line-height:1.62!important;max-width:none!important;}
  body[data-page^="produit-"] .fi-btn,
  body[data-page^="produit-"] .fi-buy{min-height:48px!important;}
  body[data-page^="produit-"] .mp-mobile-quickbuy{padding-left:20px!important;padding-right:20px!important;}
  body[data-page^="produit-"] .mp-mobile-quickbuy .fi-buy{width:100%!important;margin-top:14px!important;}
  body[data-page^="produit-"] .mp-question{min-height:44px!important;display:inline-flex!important;align-items:center!important;margin-top:8px!important;}
  body[data-page^="produit-"] .related{padding:64px 20px 86px!important;}
  body[data-page^="produit-"] .rel-grid{grid-template-columns:1fr!important;gap:34px!important;}
  body[data-page^="produit-"] .rel-m{gap:12px!important;align-items:flex-start!important;}

  /* Barre d'achat fixe: safe-area + vraie cible tactile */
  body[data-page^="produit-"] .mp-mobile-purchasebar{
    left:0!important;right:0!important;bottom:0!important;width:100%!important;
    padding:10px 14px calc(10px + env(safe-area-inset-bottom))!important;
    min-height:68px!important;box-shadow:0 -10px 30px rgba(31,24,19,.10)!important;
  }
  body[data-page^="produit-"] .mp-mobile-purchasebar-buy{min-height:46px!important;min-width:122px!important;padding:0 15px!important;}

  /* Contenus éditoriaux et formulaires */
  .mp-longread,.mp-contact,.mp-house-page,.why-article{max-width:100%!important;}
  input,select,textarea,button{max-width:100%;}
  input,select,textarea{font-size:16px!important;}
  .footer{overflow:hidden!important;}
  .mp-footer-utility{row-gap:14px!important;}
}

@media (max-width:430px){
  .header,
  body:not([data-page="home"]) .header,
  body[data-page="home"] .header{padding-left:14px!important;padding-right:14px!important;}
  .logo{font-size:20px!important;letter-spacing:.01em!important;}
  .mp-header-tools{right:92px!important;gap:5px!important;}
  .mp-head-tool{width:24px!important;min-width:24px!important;}
  .mp-head-tool svg{width:18px!important;height:18px!important;}
  .header .nav-toggle{width:70px!important;min-width:70px!important;padding-left:40px!important;}
  .header .nav-toggle::before{font-size:9px!important;letter-spacing:.10em!important;}
  .header .nav-toggle>span{width:22px!important;}
  .page-hd{padding-left:18px!important;padding-right:18px!important;}
  .pgrid{padding-left:14px!important;padding-right:14px!important;}
  body[data-page^="produit-"] .fiche-info,
  body[data-page^="produit-"] .fi-info,
  body[data-page^="produit-"] .mp-mobile-quickbuy{padding-left:18px!important;padding-right:18px!important;}
  body[data-page^="produit-"] .mp-mobile-purchasebar-name{max-width:40vw!important;}
}

@media (max-width:360px){
  .logo{font-size:18px!important;}
  .mp-header-tools{right:84px!important;gap:3px!important;}
  .mp-head-tool{width:22px!important;min-width:22px!important;}
  .mp-head-tool svg{width:17px!important;height:17px!important;}
  .header .nav-toggle{width:64px!important;min-width:64px!important;padding-left:36px!important;}
  .header .nav-toggle::before{font-size:8.5px!important;}
  .ph-t{font-size:40px!important;}
  body[data-page^="produit-"] .fi-name{font-size:36px!important;}
  body[data-page^="produit-"] .mp-mobile-purchasebar{padding-left:10px!important;padding-right:10px!important;gap:8px!important;}
  body[data-page^="produit-"] .mp-mobile-purchasebar-buy{min-width:108px!important;padding:0 10px!important;font-size:10px!important;}
}
