/* WMST Shop : correctifs téléphone/iPhone communs. À mettre en DERNIER dans le <head> de CHAQUE page :
   <link rel="stylesheet" href="mobile_fix.css">  */

/* iPhone zoome tout seul sur un champ de moins de 16 px : on force 16 px */
@media(max-width:899px){input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,.field{font-size:16px!important}}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
a,button,[role=button],label,select,summary{touch-action:manipulation}

/* « vh » inclut la barre d'adresse de Safari : on passe à « dvh » */
.sheet{max-height:92vh!important;max-height:92dvh!important}
#lb img{max-height:92vh!important;max-height:92dvh!important}
.msgs{max-height:55vh!important;max-height:55dvh!important}
.pic{width:min(100%,62vh)!important;width:min(100%,62dvh)!important}
.sheet,.cml,.sbd,.shm,.sx{overscroll-behavior:contain}

/* Performance : on coupe les animations lourdes sur téléphone */
@media(max-width:899px){
 body::before{animation:none!important;will-change:auto!important;transform:none!important}
 html body .h3p,html body .h3c{animation:none!important}
 html body .h3p{transform:rotateY(-18deg) rotateX(4deg)!important}
 html body .h3r{transform:none!important;transition:none!important}
 html body .h3o{display:none!important}
 .wpp{bottom:calc(14px + env(safe-area-inset-bottom,0px))!important}
}
/* Les cartes hors écran ne sont pas calculées : défilement bien plus fluide */
.card,.pc{content-visibility:auto;contain-intrinsic-block-size:auto 300px}

/* Favoris = marque-page bleu ; cœur = J'aime uniquement */
html body .hd [aria-label="Mes favoris"],html body .hd [aria-label="Mes favoris"] .i,html body #bh,html body #bh .i{color:#3558E6!important}
html body .hd [aria-label="Mes favoris"] .i,html body #bh .i{fill:none!important;stroke:currentColor!important}
.fv.fb.on{color:#3558E6}.fv.fb.on .i{fill:#3558E6;stroke:#3558E6}
.pc .fv.fh{right:8px}.pc .fv.fb{right:50px}.pc .fv.fs{right:92px}.pc .fv.fc{right:134px}
@media(max-width:640px){.pc .fv.fs,.pc .fv.fc{display:none}}

/* Même en-tête sur tous les téléphones, y compris iPhone en paysage et iPad (641 à 899 px) */
@media(min-width:641px) and (max-width:899px){
 .top{display:grid;grid-template-columns:34px 44px minmax(0,1fr) 34px 34px 34px;grid-template-rows:40px 42px;gap:6px;padding:6px 10px 8px;align-items:center}
 .top>.mnb{grid-column:1;grid-row:1;width:34px;height:34px}
 .top>.brand{grid-column:2;grid-row:1;padding:0;justify-self:center}.top>.brand img{width:38px;height:38px;border-radius:11px}
 .top>.locb{position:absolute;right:8px;top:54px;z-index:3;display:grid;place-items:center;max-width:none!important;width:20px;height:17px;padding:0!important;gap:0;border:1px solid #fff;border-radius:6px;background:#fff;box-shadow:0 1px 4px rgba(11,37,64,.2)}
 .locb small,.locb b,.locb span{display:none!important}.locb>svg{display:none}.locb .flg{width:14px;height:10px;border-radius:2px}
 .top>.sb{grid-column:1/-1;grid-row:2;width:100%;max-width:none;min-width:0}
 .top>#bh{grid-column:4;grid-row:1}.top>#bc{grid-column:5;grid-row:1}
 .top>.acct{grid-column:6;grid-row:1;display:grid;place-items:center;width:34px;height:34px;color:#2348AA}.top>.acct .acct-label{display:none}
 .top>#bf{display:none!important}
}

/* En-tête WMST commun : accueil, catalogue, panier, compte et pages d'information. */
header.hd,header.bar,body#shop-home>header.top{position:sticky!important;top:0!important;z-index:40!important;min-height:60px;background:rgba(255,255,255,.97)!important;border:0!important;border-bottom:1px solid #E5EAF2!important;border-radius:0!important;box-shadow:0 2px 12px rgba(16,24,40,.055)!important;backdrop-filter:blur(12px)}
header.hd .hh,header.bar{min-height:60px!important}
header.hd .logo img,header.bar .legal-brand img,body#shop-home>header.top>.brand img{width:40px!important;height:40px!important;object-fit:cover;border-radius:11px!important}
header.hd,header.bar,body#shop-home>header.top{padding-top:env(safe-area-inset-top,0)!important}
html[data-theme="dark"] header.hd,html[data-theme="dark"] header.bar,html[data-theme="dark"] body#shop-home>header.top{background:rgba(15,25,45,.97)!important;border-color:#273956!important;color:#EEF2FF}
@media(prefers-reduced-motion:reduce){header.hd,header.bar,body#shop-home>header.top{backdrop-filter:none}}
