/* ═══════════════════════════════════════════════════════════════════════════════════════════════
   TÉLÉPHONE (09/11/2026, demande d'Alexis : « la version PC est excellente, rends-la parfaite sur téléphone,
   aucun bug »). Chargée EN DERNIER : même design, mêmes textes, mais chaque bloc recomposé pour un écran
   de 320 à 430 px, comme Apple qui refait ses pages pour le téléphone au lieu de les tasser.
   Règles : jamais de défilement horizontal ; titres et boutons sur une ligne quand c'est possible ;
   rien de collé aux bords (gouttière 20 px) ; zones tactiles ≥ 44 px ; pas de défilement « volé » au doigt.
   ═══════════════════════════════════════════════════════════════════════════════════════════════ */

/* 1. Jamais de page plus large que l'écran (la cause du « tremblement » à gauche-droite sur iPhone).
      clip, et non hidden : ne casse pas les éléments collants (position: sticky). */
html,body{overflow-x:clip}
.pq9-carte-mere{overflow:hidden}

/* le logo du pied de page restait écrit en noir sur le fond noir (règle de la charte trop large) */
.pied2 .logo b{color:#fff!important}
.pied2 .logo b span{color:#8D78ED!important}

@media (max-width:760px){
  /* gouttière commune et respiration des sections */
  .enveloppe{padding-left:max(20px,env(safe-area-inset-left,0px));padding-right:max(20px,env(safe-area-inset-right,0px))}

  /* aucune grille ne doit être plus large que l'écran : ses colonnes rétrécissent avec lui */
  .h9-int,.g9,.fin2,.essai,.faq2{grid-template-columns:minmax(0,1fr)!important}
  .h9-int>*,.g9>*,.fin2>*,.essai>*,.chiffres>*{min-width:0}
  /* Tarifs : les trois offres tiennent dans l'écran, bouton sur deux lignes si besoin plutôt que coupé */
  .offre-c{padding:30px 22px}
  .offre-c .btn{white-space:normal;text-align:center;line-height:1.25;padding-left:16px;padding-right:16px}
  /* Accueil, cartes de prix : « 1,90 € » et « HT la lettre » ne se cassent jamais en deux ; le curseur tient dans sa carte */
  .t3{padding-left:22px;padding-right:22px}
  .t3 .prix{flex-wrap:wrap;row-gap:2px}
  .t3 .prix b,.t3 .prix span{white-space:nowrap}
  .lp{padding:16px 14px 12px}
  .lp-haut{gap:8px;flex-wrap:wrap}
  .lp-n,.lp-prix{white-space:nowrap}
  .chiffres{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .chiffres b{font-size:clamp(34px,10vw,44px)}

  /* ── Barre du haut : plus fine, ne mange pas l'écran ── */
  .barre{padding-top:max(8px,env(safe-area-inset-top,0px))}
  .barre .barre-int{min-height:56px}
  .burger{width:44px;height:44px}

  /* ── Héros ── */
  .h9 .h9-titre,.h9 h1{text-wrap:balance}
  .h9 form input,.h9 #commune{font-size:16px;min-width:0}          /* 16 px : iOS ne zoome plus au toucher du champ */
  .h9-atouts{gap:14px}
  .h9-atouts li{min-width:0}
  .h9-compteur{flex-wrap:wrap;row-gap:2px}
  /* la carte « Vos maisons en avant-première » : lignes nettes, sans retour à la ligne bancal */
  .h9-lignes li{gap:10px;padding:10px}
  .h9-adr b{white-space:nowrap;font-size:14px}
  .h9-niv{padding:6px 9px;font-size:12px}   /* 13/11/2026 : 11,5 → 12 px */
  .h9-rang{display:none}            /* le numéro est déjà dans « Maison n° 1 » : la place va au texte */
  .h9c2-chiffres li p{font-size:12px}
  .h9c2-chiffres li b{font-size:19px}
  .h9-carte-btn,.h9-carte-btn2{white-space:nowrap;font-size:16px}

  /* ── Section IA : les étiquettes flottantes restent DANS l'image ── */
  .ia9-int{grid-template-columns:minmax(0,1fr)}
  .ia9-texte,.ia9-scene{min-width:0}
  .ia9-atouts small{white-space:normal}
  .ia9-carte{padding:9px 12px 9px 9px;gap:9px;border-radius:14px;max-width:calc(50% - 14px)}
  .ia9-carte p{min-width:0}
  .ia9-carte b{font-size:13px}
  .ia9-carte p,.ia9-carte small,.ia9-carte span:not(.ia9-ic){font-size:12px;white-space:normal;line-height:1.25}   /* 13/11/2026 : 11,5 → 12 px (lisibilité) */
  .ia9-carte .ia9-ic{width:28px;height:28px;flex:none}
  /* 13/11/2026 (audit d'affichage) : préfixées par .ia9-scene.photo, sinon ia9.css (left:0 / right:0, plus précis) gagnait et les
     cartes « Modèle prédictif », « Probabilité de vente », « 8 sources » touchaient le bord de l'écran */
  .ia9-scene.photo .ia9-carte.k1,.ia9-carte.k1{left:10px;top:5%}.ia9-scene.photo .ia9-carte.k2,.ia9-carte.k2{right:10px;left:auto;top:13%}
  .ia9-scene.photo .ia9-carte.k3,.ia9-carte.k3{left:10px;top:44%}.ia9-scene.photo .ia9-carte.k4,.ia9-carte.k4{right:10px;left:auto;top:54%}
  /* l'image déborde de l'écran des deux côtés (pleine largeur) : la marge se compte depuis le bord de l'écran, pas de l'image */
  .ia9-scene.photo .ia9-carte.k1,.ia9-scene.photo .ia9-carte.k3{left:calc(12px + max(0px, (100% - 100vw) / 2))}
  .ia9-scene.photo .ia9-carte.k2,.ia9-scene.photo .ia9-carte.k4{right:calc(12px + max(0px, (100% - 100vw) / 2))}
  .ia9-atouts li{align-items:flex-start}
  .ia9-atouts li>p,.ia9-atouts li>span:last-child{display:flex;flex-direction:column}
  .ia9-cta{width:100%;justify-content:center;white-space:nowrap;font-size:16.5px;padding-left:18px;padding-right:18px}
  /* 13/11/2026 : la flèche était écrasée à 0 px entre 361 et 390 px (texte sans retour, flèche compressible) ; le texte suit la largeur */
  .ia9-cta{font-size:clamp(14px,3.9vw,16.5px);padding-left:14px;padding-right:14px}
  .ia9-cta svg{flex:none}
  .ia9-checks{display:flex;flex-wrap:wrap;gap:8px 18px}

  /* ── « Testez sur votre commune » ── */
  #demoGo,.demo-ecran .btn-plein{white-space:normal;line-height:1.25;min-height:56px;height:auto;padding:12px 18px;font-size:16px;text-align:center}
  .demo-choix{gap:8px}
  .demo-choix button{min-height:44px}
  .demo-lignes{gap:8px}
  .demo-lignes div{padding:12px 10px;min-width:0}
  .demo-lignes b{font-size:17px}
  .essai-champ input{font-size:16px}

  /* ── Les lettres : titre d'abord, onglets qui glissent au doigt, lettre en grand, loupe sur le point choisi ── */
  .lx .enveloppe{display:flex;flex-direction:column}
  .lx .lx-vitrine,.lx .lx-gauche{display:contents}
  .lx .lx9-tete{order:1;margin-bottom:18px}
  .lx .lx-onglets{order:2}
  .lx .lx-droite{order:3;margin-top:16px}
  .lx .lx-detail{order:4;margin-top:22px}
  .lx .lx-action{order:5}
  .lx .lx-onglets{display:flex;width:auto;max-width:none;margin:0 calc(-1 * max(20px,env(safe-area-inset-left,0px)));padding:6px max(20px,env(safe-area-inset-left,0px));
    border:0;border-radius:0;background:transparent;box-shadow:none;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding:0 20px;
    -webkit-mask:linear-gradient(90deg,transparent 0,#000 16px,#000 calc(100% - 28px),transparent);mask:linear-gradient(90deg,transparent 0,#000 16px,#000 calc(100% - 28px),transparent)}
  .lx .lx-onglet{flex:none;scroll-snap-align:start;min-height:44px;white-space:nowrap;background:#fff;box-shadow:inset 0 0 0 1px #E2E8F0}
  .lx .lx-onglet[aria-selected="true"]{background:#6547E8;color:#fff;box-shadow:0 8px 18px -10px rgba(101,71,232,.75)}
  .lx .lx-scene{border-radius:20px}
  .lx .lx-pin{width:32px;height:32px;font-size:14px}
  .lx .lx9-pager button{width:44px;height:44px}
  .lx-loupe{display:block;margin:12px 0 0;border-radius:18px;overflow:hidden;background:#fff;box-shadow:0 0 0 1px #E2E8F0,0 18px 40px -26px rgba(17,19,27,.35);
    transition:opacity .35s,transform .35s cubic-bezier(.2,.8,.2,1)}
  .lx-loupe[hidden]{display:none}
  .lx-loupe-img{position:relative;width:100%;background-repeat:no-repeat;background-color:#fff;outline:2px solid #6547E8;outline-offset:-2px;border-radius:18px 18px 0 0}
  .lx-loupe p{margin:0;display:flex;align-items:center;gap:10px;padding:12px 14px;font-size:15px;font-weight:700;color:#11131B}
  .lx-loupe p i{display:grid;place-items:center;width:26px;height:26px;flex:none;border-radius:50%;background:#6547E8;color:#fff;font-style:normal;font-size:13px}
  .lx-action .btn{white-space:nowrap}

  /* ── L'application : on montre la partie utile de l'écran, en grand ── */
  .navigateur{border-radius:18px}
  .navigateur .nav-haut{height:34px}
  .navigateur .nav-ecran img{width:100%;height:auto;aspect-ratio:1.15;object-fit:cover;object-position:0 0;transform:none}
  .sc-action .btn-grand,.btn-grand{white-space:nowrap;max-width:100%}

  /* ── Combien ça rapporte ── */
  .g9-cta{white-space:nowrap}

  /* ── Pourquoi maintenant / comparatif ── */
  .pq9-titre{text-wrap:balance}
  .pq9-cta,.cmp9-cta{white-space:nowrap}
  .cmp9{grid-template-columns:minmax(0,1fr)}
  .cmp9 li p,.cmp9-tete>div{min-width:0}
  .cmp9 li b{overflow-wrap:break-word}
  .cmp9-fleche{margin:-6px auto}

  /* ── Tarifs : le curseur se prend au pouce ── */
  input[type=range]{touch-action:pan-y}

  /* ── FAQ : questions à taille de lecture, zone de toucher entière ── */
  .faq2 summary{font-size:18px;line-height:1.35;padding-top:18px;padding-bottom:18px}
  .faq2 details{border-radius:18px}
  .faq2-titre .sc-titre{font-size:34px}

  /* ── Pied de page : liens faciles à toucher, deux colonnes ── */
  .pied2{padding-top:56px}
  .pied2 .pied-int{display:grid;grid-template-columns:1fr 1fr;gap:28px 20px}
  .pied2 .pied-int>div:first-child{grid-column:1 / -1}
  .pied2 ul{gap:0}
  .pied2 ul a:not(.btn){display:inline-flex;align-items:center;min-height:44px;min-width:44px}   /* 13/11/2026 : 44 px de toucher (« CGV » faisait 30 px de large) */
  .pied .pied-bas a{display:inline-flex;align-items:center;min-height:44px;padding:0 6px}   /* tarifs : liens du pied au doigt */
  .pied .pied-bas a:first-child{padding-left:0}
  .pied2 .pied-bas{flex-direction:column;align-items:flex-start;gap:6px;padding-bottom:max(18px,env(safe-area-inset-bottom,0px))}

  /* ── Studio (analyse, sélection, courrier, paiement) ── */
  .tg .t-analyse,.t-analyse.a9{padding-left:20px;padding-right:20px}
  .a9 h2{font-size:clamp(30px,8.6vw,38px)}
  .ab-pied,#tarif .ab-pied,#ecranLettre .ab-pied{padding-bottom:max(12px,env(safe-area-inset-bottom,0px))}
  .t-zone-chip .t-chip{max-width:100%}
  .tg .t-carto-g{grid-template-columns:minmax(0,1fr)!important}
  #ecranResultat .t-entonnoir{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px}
  #ecranResultat .t-entonnoir li{min-width:0}
  .h9c2-tete>div{min-width:0}
  #zoneResume{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

/* très petits écrans (iPhone SE 1re génération, 320 px) */
@media (max-width:360px){
  .tg .t-pas li:not(:last-child)::after{width:14px;margin:0 6px}
  .tg .t-pas li{gap:6px}
  .tg .t-pas p{display:none}
  #ecranResultat .t-entonnoir li{padding-left:8px!important;padding-right:8px!important}
  #versLettre{font-size:15px;padding-left:12px;padding-right:12px}
  .chiffres{column-gap:14px}
  #ecranResultat .s9-compte,#carteCompte{max-width:calc(100% - 76px)}
  .chiffres>div{padding-left:0!important;padding-right:0!important}
  #ecranResultat .t-entonnoir b{font-size:22px}
  #ecranResultat .t-entonnoir span{font-size:12px}
  .chiffres b{font-size:30px}
  .btn-grand,.sc-action .btn-grand,.lx-action .btn,.g9-cta,.ia9-cta,.pq9-cta,.cmp9-cta{font-size:15px;padding-left:14px;padding-right:14px}
  .h9-niv svg{display:none}
  /* carte « Vos maisons en avant-première » à 320 : « Maison n° 1 » tient entier à côté de « Très forte chance » */
  .h9c2 .h9-lignes li{gap:8px;padding-right:8px}
  .h9-vue{width:44px;height:40px;--vw:44px;--vh:40px}
  .h9c2 .h9-niv{padding:6px 8px;font-size:12px}
  .h9-adr b{font-size:13.5px;overflow:hidden;text-overflow:ellipsis}
  /* « Découvrir le potentiel de ma commune » ne tient pas sur une ligne à 320 : deux lignes plutôt que des lettres coupées */
  .ia9-cta{white-space:normal;text-align:center;line-height:1.25;gap:8px;padding-top:12px;padding-bottom:12px}
  .ia9-cta svg{flex:none}
  .pied2 .pied-geant{font-size:15.5vw}   /* « Mandat Direct » entier, avec son « t » final, sur 320 px */
  .h9c2-chiffres li b{font-size:17px}
  .lx .lx-onglet{font-size:14px;padding-left:12px;padding-right:12px}
}

/* Téléphone et tablette : aucun effet réservé à la souris ne doit rester « collé » après un toucher */
@media (hover:none){
  .btn:hover,.g9-cta:hover,.ia9-cta:hover,.pq9-cta:hover,.cmp9-cta:hover{transform:none}
}

/* ═══ LA BARRE DU HAUT, modèle Remakeit (mesures relevées sur remakeit.io au téléphone) ═══
   barre fixe, 16 px du haut, 12 px des côtés ; boîte de verre 56 px, rayon 20 ; logo 24 px + nom 16 px ; burger nu.
   Le menu se déplie DANS la boîte : liens centrés 18 px, puis deux pilules côte à côte. Couleurs : notre verre clair. */
.menu-mobile.mm{display:none}
@media (max-width:1160px){
  .barre,.barre.defile{padding:max(16px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 0 max(12px,env(safe-area-inset-left,0px))!important}
  .barre .barre-int,.barre.defile .barre-int{flex-wrap:wrap;align-items:center;gap:0!important;max-width:none!important;min-height:56px!important;
    padding:8px 12px!important;border-radius:20px!important;overflow:hidden;
    background:rgba(255,255,255,.72)!important;-webkit-backdrop-filter:blur(20px) saturate(140%)!important;backdrop-filter:blur(20px) saturate(140%)!important;
    box-shadow:8px 8px 30px rgba(0,0,0,.08),0 1px 1px rgba(0,0,0,.05),1px 0 1px rgba(0,0,0,.05)!important;
    transition:background-color .4s cubic-bezier(.4,0,.2,1),box-shadow .4s}
  .barre .logo{padding-left:8px!important;gap:8px;height:40px}
  .barre .logo img,.barre.defile .logo img{height:24px!important;width:auto!important}
  .barre .logo b{font-size:16px!important;line-height:24px}
  .barre .barre-actions{margin-left:auto;gap:0}
  .barre .barre-actions .btn-connexion,.barre .barre-actions .cta-barre{display:none!important}
  .barre .burger{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:44px;height:40px;margin-right:-4px;padding:0;border:0!important;border-radius:12px;background:transparent!important}
  .barre .burger span{display:block;width:18px;height:2px;margin:0;border-radius:2px;background:#11131B!important;transition:transform .35s cubic-bezier(.4,0,.2,1),opacity .2s}
  .barre.mm-ouvert .burger span:nth-child(1){transform:translateY(6px) rotate(45deg)}
  .barre.mm-ouvert .burger span:nth-child(2){opacity:0}
  .barre.mm-ouvert .burger span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
  .barre.mm-ouvert .barre-int{background:rgba(255,255,255,.9)!important;box-shadow:8px 8px 40px rgba(17,19,27,.16),0 0 0 1px rgba(226,232,240,.9)!important}

  /* le menu, déplié dans la boîte */
  .menu-mobile.mm{position:static!important;inset:auto;z-index:auto;flex:1 0 100%;display:grid;grid-template-rows:0fr;padding:0!important;margin:0;
    background:transparent!important;border:0;opacity:0;transition:grid-template-rows .45s cubic-bezier(.4,0,.2,1),opacity .3s}
  .menu-mobile.mm>*{min-height:0}
  .barre.mm-ouvert .menu-mobile.mm{grid-template-rows:1fr;opacity:1}
  .menu-mobile.mm .mm-corps{overflow:hidden}
  .menu-mobile.mm a:not(.mm-connexion):not(.mm-cta){display:block;margin:0;padding:13px 0;border:0!important;text-align:center;font-size:18px;font-weight:500;line-height:1.45;letter-spacing:0;color:#11131B!important}
  .menu-mobile.mm a:not(.mm-connexion):not(.mm-cta):first-child{margin-top:14px}
  .mm-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:10px;margin:20px 0 6px}
  .mm-actions a{display:flex;align-items:center;justify-content:center;min-height:52px;border-radius:999px;font-size:16px;font-weight:600;text-decoration:none;white-space:nowrap}
  .mm-connexion{background:#fff;color:#6547E8!important;box-shadow:inset 0 0 0 1px #E2E8F0}
  .mm-cta{background:#6547E8;color:#fff!important;box-shadow:0 10px 24px -12px rgba(101,71,232,.7)}
}
@media (max-width:360px){.mm-actions a{font-size:15px}}
@media (prefers-reduced-motion:reduce){.menu-mobile.mm,.barre .burger span{transition:none}}

/* ═══ LE PAIEMENT au téléphone : le prix se voit DÈS L'ARRIVÉE, sans faire défiler ═══
   Ordre : la commune → « 10 maisons vous attendent » → les maisons en bande qu'on fait glisser → LE PRIX → ce qu'on débloque
   → la lettre prête → les garanties ; le bouton reste collé en bas. Le titre « Débloquez… » du grand écran fait doublon ici. */
@media (max-width:900px){
  #tarif .pw-mur{display:contents}
  #tarif .pw-mur-sur{order:1;margin:0 0 10px}
  #tarif .pw-mur-titre{order:2;margin:0;font-size:clamp(28px,8vw,34px);line-height:1.08}
  #tarif .ab-nuit-sur,#tarif h2#tfTitre,#tarif .ab-b-sous{display:none}
  #tarif .pw-maisons{order:3;display:flex;gap:10px;margin:16px -16px 0;padding:0 16px 4px;overflow-x:auto;overscroll-behavior-x:contain;
    scroll-snap-type:x mandatory;scroll-padding:0 16px;scrollbar-width:none}
  #tarif .pw-maisons::-webkit-scrollbar{display:none}
  #tarif .pw-m{flex:0 0 40%;scroll-snap-align:start;min-width:0}
  #tarif .pw-m-vue{height:78px}
  #tarif .pw-m-vue i{top:39px}
  #tarif .pw-m-txt{padding:9px 11px 2px}
  #tarif .pw-m-txt b{font-size:14px}
  #tarif .pw-m-niv{margin:5px 11px 11px;font-size:12px}
  #tarif .pw-m-plus{min-height:0;flex:0 0 30%}
  #tarif .ab-prix{order:4;margin:16px 0 0}
  #tarif .pw-debloque{order:5;margin:16px 0 0}
  #tarif .ab-assur{order:6}
  #tarif .pw-pli{order:7;margin-top:18px}
  #tarif .ab-b-liens{order:8}
  #tarif .ab-camp{order:9}
  #tarif .t-faible{order:10}
  #tarif .ab-cond{order:11}
  #tarif .ab-action{order:12}
  #tarif #tfAlerte{order:13}
}

/* 13/11/2026 (audit d'affichage, téléphone) : textes à 12 px au moins, zones de toucher de 44 px sans changer le dessin */
@media (max-width:760px){
  .pq9-ligne p.pq9-tag,.pq9-tag{font-size:12px!important}
  .pq9-tag i{font-size:12px}
  .ia9-note sup{font-size:12px;line-height:0}
  .pied2 .pied-int .logo{position:relative}
  .pied2 .pied-int .logo::after{content:"";position:absolute;inset:-10px 0}
  /* le curseur « lettres en plus » : 44 px de haut pour le doigt, la piste reste au même endroit */
  .lp-piste{display:flow-root}
  .lp-piste .lp-curseur{height:44px!important;margin:-8px 0!important}
}

/* 13/11/2026 (audit d'affichage) : à l'activation, « Très forte chance » passait sur deux lignes dans sa pastille (cartes de 40 %) */
@media (max-width:760px){
  #tarif .pw-m{flex-basis:46%}
  #tarif .pw-m-niv{white-space:nowrap;margin:5px 9px 11px;padding:5px 9px}
}
