/* =====================================================================
   MAPRIME.CA — ADAPTATION MOBILE COMMUNE (toutes les pages publiques)
   Chargée en dernier : corrige débordements, cibles tactiles et tailles
   de texte sur téléphone (320–600 px). 17 octobre 2026.
   ===================================================================== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
img,video,svg,canvas,iframe{max-width:100%}

@media (max-width:600px){
  html,body{overflow-x:hidden}
  /* Champs : 16 px minimum, sinon iPhone zoome à chaque saisie */
  html body input:not([type=checkbox]):not([type=radio]):not([type=range]),
  html body select,html body textarea{font-size:16px !important}
  html body input[type=checkbox],html body input[type=radio]{min-width:20px;min-height:20px}

  /* Points des carrousels : zone tactile de 44 px sans changer le dessin */
  html body [class*="dots"] button,html body .mh-nav button.d{position:relative}
  html body [class*="dots"] button::after,html body .mh-nav button.d::after{
    content:"";position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%)}

  /* Points sur une seule ligne, même avec 10 diapositives */
  html body .en-dots,html body .av-dots,html body .sw-dots{flex-wrap:nowrap !important;gap:5px !important}
  html body .en-dots button{width:18px !important;flex:0 0 auto}

  /* Pied de page : liens plus faciles à toucher, texte lisible */
  html body .foot-contact a,html body .foot-links a,html body .foot-amf a,
  html body .mp-pied-col a,html body .mp-pied-reg a{display:inline-block;padding:9px 0;min-height:40px;line-height:22px}
  html body .mp-pied-col a{font-size:14px !important}
  html body .mp-pied-titre{font-size:12px !important}
  html body .mp-pied-reg,html body .foot-amf{font-size:12.5px !important;line-height:1.5}

  /* Liens d'en-tête et fil d'Ariane */
  html body a.crumb,html body a.back-link,html body .tete-d a.tel,html body a.sa-tel,
  html body .masthead-right a.mast-link{display:inline-flex;align-items:center;min-height:40px}
  html body a.wordmark,html body a.marque,html body a.brand{display:inline-flex;align-items:center;min-height:40px}

  /* Petits textes de service */
  html body .pr-et{font-size:12px !important}
  html body .sw-note{font-size:13px !important}
  html body .aide-b{min-width:32px;min-height:32px}

  /* Tableaux larges : défilement horizontal au lieu de déborder */
  html body table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
}

/* Barre du haut (MAPRIME.CA · Consultation · Menu · FR/EN) : tout tient en 320–400 px */
@media (max-width:400px){
  html body nav#siteNav .wrap{padding-left:12px !important;padding-right:10px !important;gap:6px !important}
  html body nav#siteNav .brand{font-size:15px !important;letter-spacing:0 !important;white-space:nowrap}
  html body nav#siteNav .nav-right{gap:6px !important}
  html body nav#siteNav .nav-right .btn.solid{padding:9px 9px !important;font-size:10.5px !important;letter-spacing:.02em !important}
  html body nav#siteNav .nav-toggle{width:42px !important;height:42px !important;padding:0 !important}
  html body nav#siteNav .mp-lang a,html body .masthead .mp-lang a,html body .tete-d .lang a{min-width:34px !important;padding:6px 7px !important;display:inline-flex;justify-content:center;align-items:center;min-height:36px}
  html body .tete-d{gap:6px !important;flex-wrap:nowrap}
  html body .tete-d a.tel{font-size:12px !important;white-space:nowrap}
}
@media (max-width:340px){
  html body nav#siteNav .nav-right .btn.solid{display:none !important}
  html body .tete-d a.tel{display:none !important}
}

/* Police unique sur tout le site : Times New Roman (demande de Jean Carrière, 18 octobre 2026) */
html body, html body *:not(code):not(pre):not(kbd):not(samp){font-family:"Times New Roman",Times,Georgia,serif !important}

/* ===== Section « Vous êtes… » — refonte 18 octobre 2026 (couleurs de l'accueil + couleur du jour) ===== */
#mp-vous{background:linear-gradient(180deg,#FFFFFF 0%,#F3F6FA 100%);padding:56px 0 52px;border-bottom:1px solid #E4E9F0}
html.mp-jour-clair #mp-vous{background:linear-gradient(180deg,#FFFFFF 0%,#F7F2E8 100%)}
#mp-vous .vs-wrap{max-width:1180px;margin:0 auto;padding:0 24px;text-align:center}
#mp-vous .vs-kick{display:inline-block;font-size:13px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:#8A6D1C}
#mp-vous .vs-kick::before,#mp-vous .vs-kick::after{content:"";display:inline-block;width:24px;height:2px;background:#C8A951;vertical-align:middle;margin:0 10px}
#mp-vous h2{font-size:clamp(30px,3.4vw,42px);line-height:1.1;color:#003366 !important;margin:8px 0 8px}
#mp-vous .vs-sub{font-size:18px;color:#4B5563 !important;margin:0 0 30px}
#mp-vous .vs-grille{display:grid;grid-template-columns:1.35fr 1fr 1fr;gap:20px;text-align:left;align-items:stretch}
#mp-vous .vs-carte{position:relative;display:flex;flex-direction:column;background:#fff;border:1px solid #E4E9F0;border-radius:18px;padding:26px 24px 22px;box-shadow:0 8px 24px rgba(0,30,62,.06);transition:transform .18s,box-shadow .18s;overflow:hidden}
#mp-vous .vs-carte::before{content:"";position:absolute;left:0;top:0;right:0;height:5px;background:rgb(var(--jour,0,51,102))}
html.mp-jour-clair #mp-vous .vs-carte::before{background:#C8A951}
#mp-vous .vs-carte:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(0,30,62,.14)}
#mp-vous .vs-ico{display:inline-flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:14px;background:#EEF3F9;color:#003366;margin-bottom:12px}
#mp-vous .vs-ico svg{width:28px;height:28px}
#mp-vous h3{font-size:24px;line-height:1.2;color:#003366 !important;margin:0 0 8px}
#mp-vous .vs-carte p{font-size:16.5px;line-height:1.6;color:#374151 !important;margin:0 0 14px}
#mp-vous .vs-liste{list-style:none;margin:0 0 18px;padding:0;display:grid;gap:8px}
#mp-vous .vs-liste a{color:#0B4F8A !important;font-size:16px;font-weight:700;text-decoration:none}
#mp-vous .vs-liste a::after{content:" \2192"}
#mp-vous .vs-liste a:hover{text-decoration:underline}
#mp-vous .vs-cta{margin-top:auto;display:flex;align-items:center;justify-content:center;min-height:50px;text-align:center;background:rgb(var(--jour-fonce,0,51,102)) !important;color:#fff !important;text-decoration:none;font-size:16.5px;font-weight:700;padding:12px 14px;border-radius:12px}
#mp-vous .vs-cta:hover{filter:brightness(1.12)}
/* Carte vedette : le salarié */
#mp-vous .vs-vedette{background:linear-gradient(150deg,rgb(var(--jour-fonce,0,51,102)) 0%,#0B4F8A 100%) !important;border:0;box-shadow:0 22px 50px rgba(0,30,62,.28)}
#mp-vous .vs-vedette::before{background:#C8A951 !important}
#mp-vous .vs-vedette::after{content:"";position:absolute;right:-60px;top:-60px;width:220px;height:220px;border-radius:50%;border:2px solid rgba(200,169,81,.35);pointer-events:none}
#mp-vous .vs-vedette .vs-ico{background:rgba(255,255,255,.12);color:#E4C46B}
#mp-vous .vs-vedette h3{color:#fff !important}
#mp-vous .vs-vedette p{color:#E6EDF5 !important}
#mp-vous .vs-vedette p b{color:#fff !important}
#mp-vous .vs-vedette .vs-acc{font-size:19px;font-weight:700;color:#E4C46B !important;margin-bottom:8px}
#mp-vous .vs-badge{position:absolute;right:18px;top:20px;background:#C8A951;color:#0E2340 !important;font-size:12.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;border-radius:999px;padding:6px 12px}
#mp-vous .vs-plus{list-style:none;margin:0 0 20px;padding:0;display:grid;gap:8px}
#mp-vous .vs-plus li{position:relative;padding-left:30px;font-size:16px;line-height:1.45;color:#fff !important}
#mp-vous .vs-plus li::before{content:"✓";position:absolute;left:0;top:0;width:21px;height:21px;border-radius:50%;background:#C8A951;color:#0E2340;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center}
#mp-vous .vs-cta-or{background:#C8A951 !important;color:#0E2340 !important}
#mp-vous .vs-liens{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:14px}
#mp-vous .vs-liens a{color:#F1E3B5 !important;font-size:15px;text-decoration:underline;text-underline-offset:3px}
@media (max-width:980px){#mp-vous .vs-grille{grid-template-columns:1fr 1fr}#mp-vous .vs-vedette{grid-column:1/-1}}
@media (max-width:640px){#mp-vous{padding:34px 0 30px}#mp-vous .vs-wrap{padding:0 16px}#mp-vous .vs-grille{grid-template-columns:1fr;gap:14px}#mp-vous .vs-sub{font-size:16px;margin-bottom:20px}
 #mp-vous .vs-carte{padding:22px 18px 18px}#mp-vous .vs-badge{position:static;display:inline-block;align-self:flex-start;margin-bottom:12px}#mp-vous h3{font-size:22px}}
/* « Vous êtes… » v2 : les trois cartes en vedette, même gabarit (18 octobre 2026) */
#mp-vous .vs-grille{grid-template-columns:repeat(3,minmax(0,1fr))}
#mp-vous .vs-vedette.vs-v2{background:linear-gradient(150deg,#0B4F8A 0%,rgb(var(--jour-fonce,0,51,102)) 100%) !important}
#mp-vous .vs-vedette.vs-v3{background:linear-gradient(150deg,rgb(var(--jour-fonce,0,51,102)) 0%,#123F6B 55%,#0B4F8A 100%) !important}
#mp-vous .vs-vedette .vs-acc{padding-right:0}
#mp-vous .vs-vedette h3{margin-top:2px}
#mp-vous .vs-vedette .vs-ico{margin-top:22px}
#mp-vous .vs-liens{flex-direction:column;gap:6px}
#mp-vous .vs-liens a::after{content:" \2192"}
@media (max-width:980px){#mp-vous .vs-grille{grid-template-columns:1fr}#mp-vous .vs-vedette{grid-column:auto}}
@media (max-width:640px){#mp-vous .vs-vedette .vs-ico{margin-top:0}}
/* « Vous êtes… » : photo de fond correspondante sous un voile aux couleurs de l'accueil (18 octobre 2026) */
#mp-vous .vs-vedette{background-size:cover !important;background-position:center 30% !important}
#mp-vous .vs-vedette:not(.vs-v2):not(.vs-v3){background-image:linear-gradient(160deg,rgba(var(--jour-fonce,0,51,102),.93) 0%,rgba(var(--jour-fonce,0,51,102),.86) 55%,rgba(11,79,138,.80) 100%),url('/images/ap/salarie-hero.jpg') !important}
#mp-vous .vs-vedette.vs-v2{background-image:linear-gradient(160deg,rgba(11,79,138,.92) 0%,rgba(var(--jour-fonce,0,51,102),.88) 60%,rgba(var(--jour-fonce,0,51,102),.82) 100%),url('/images/ap/universelle-photo2.jpg') !important}
#mp-vous .vs-vedette.vs-v3{background-image:linear-gradient(160deg,rgba(var(--jour-fonce,0,51,102),.93) 0%,rgba(18,63,107,.87) 55%,rgba(11,79,138,.80) 100%),url('/images/ap/invalidite-photo2.jpg') !important}
#mp-vous .vs-vedette p,#mp-vous .vs-vedette li{text-shadow:0 1px 6px rgba(0,0,0,.35)}
/* Bande « Assurance commerciale » : texte toujours lisible sur la photo (18 octobre 2026) */
html body #mp-bande-comm .k{color:#E4C46B !important;opacity:1 !important}
html body #mp-bande-comm h2{color:#fff !important;text-shadow:0 2px 14px rgba(0,0,0,.45)}
html body #mp-bande-comm p{color:#F1F5FA !important;opacity:1 !important;text-shadow:0 1px 8px rgba(0,0,0,.5)}
html body #mp-bande-comm li{color:#fff !important;opacity:1 !important;background:rgba(255,255,255,.16) !important;border-color:rgba(255,255,255,.45) !important}
html body #mp-bande-comm small{color:#DCE4EE !important;opacity:1 !important}
html body #mp-bande-comm a.go{color:#0B1F33 !important}
html body #mp-bande-comm h1{color:#fff !important;text-shadow:0 2px 14px rgba(0,0,0,.45)}
html body #mp-comm .mpc-tete .k{color:#E4C46B !important}
html body #mp-comm .mpc-tete h2{color:#fff !important}
html body #mp-comm .mpc-tete p.lede,html body #mp-comm .mpc-tete p{color:#F1F5FA !important;text-shadow:0 1px 8px rgba(0,0,0,.4)}

/* « Vous êtes… » — version sobre et éditoriale (18 octobre 2026) : photo en tête de carte, fond blanc, typographie nette,
   sans pastilles, sans cercles décoratifs ni dégradés. Remplace les styles précédents de cette section. */
#mp-vous{background:#F7F8FA !important;padding:60px 0 56px !important}
#mp-vous h2{font-weight:400 !important;letter-spacing:-.01em}
#mp-vous .vs-kick::before,#mp-vous .vs-kick::after{width:18px !important;height:1px !important}
#mp-vous .vs-grille{gap:24px !important;align-items:stretch}
#mp-vous .vs-carte,#mp-vous .vs-carte.vs-vedette{background:#fff !important;background-image:none !important;border:1px solid #DDE3EA !important;border-radius:6px !important;
  box-shadow:0 1px 2px rgba(16,24,40,.04) !important;padding:0 0 24px !important;overflow:hidden;transform:none !important}
#mp-vous .vs-carte:hover{box-shadow:0 10px 28px rgba(16,24,40,.10) !important;transform:none !important}
#mp-vous .vs-carte::before{content:"" !important;display:block !important;position:static !important;height:190px !important;margin:0 0 22px !important;background:#E9EDF2 center 30%/cover no-repeat !important;border:0 !important}
#mp-vous .vs-carte::after{content:none !important;display:none !important}
#mp-vous .vs-vedette:not(.vs-v2):not(.vs-v3)::before{background-image:url('/images/ap/salarie-hero.jpg') !important}
#mp-vous .vs-vedette.vs-v2::before{background-image:url('/images/ap/universelle-photo2.jpg') !important}
#mp-vous .vs-vedette.vs-v3::before{background-image:url('/images/ap/invalidite-photo2.jpg') !important}
#mp-vous .vs-carte > *{margin-left:26px !important;margin-right:26px !important}
#mp-vous .vs-ico{display:none !important}
#mp-vous .vs-badge{position:static !important;display:block !important;background:none !important;padding:0 !important;margin-bottom:6px !important;border-radius:0 !important;
  font-size:12px !important;font-weight:700 !important;letter-spacing:.12em !important;text-transform:uppercase !important;color:#8A6D1C !important;box-shadow:none !important}
#mp-vous .vs-carte h3,#mp-vous .vs-vedette h3{font-size:26px !important;font-weight:400 !important;color:#003366 !important;margin-top:0 !important;margin-bottom:10px !important;text-shadow:none !important}
#mp-vous .vs-vedette .vs-acc{font-size:17.5px !important;font-weight:700 !important;color:#1F2A37 !important;margin-bottom:8px !important;text-shadow:none !important}
#mp-vous .vs-carte p,#mp-vous .vs-vedette p{color:#4B5563 !important;font-size:16.5px !important;text-shadow:none !important}
#mp-vous .vs-vedette p b{color:#1F2A37 !important}
#mp-vous .vs-plus{gap:8px !important;margin-bottom:22px !important;padding-top:14px !important;border-top:1px solid #E5E9EF}
#mp-vous .vs-plus li{color:#1F2A37 !important;font-size:15.5px !important;padding-left:22px !important;text-shadow:none !important}
#mp-vous .vs-plus li::before{content:"✓" !important;background:none !important;width:auto !important;height:auto !important;color:#0B4F8A !important;font-size:15px !important;top:0 !important}
#mp-vous .vs-cta,#mp-vous .vs-cta.vs-cta-or{background:#003366 !important;color:#fff !important;border-radius:4px !important;min-height:48px !important;font-size:16px !important;box-shadow:none !important;filter:none !important}
#mp-vous .vs-cta:hover{background:#0B4F8A !important}
#mp-vous .vs-liens{margin-top:16px !important;gap:8px !important}
#mp-vous .vs-liens a{color:#0B4F8A !important;text-decoration:none !important;font-size:15px !important;border-bottom:1px solid transparent}
#mp-vous .vs-liens a:hover{border-bottom-color:#0B4F8A}
@media (max-width:640px){#mp-vous .vs-carte::before{height:160px !important}#mp-vous .vs-carte > *{margin-left:18px !important;margin-right:18px !important}}
#mp-vous .vs-vedette:not(.vs-v2):not(.vs-v3),#mp-vous .vs-vedette.vs-v2:not(.x),#mp-vous .vs-vedette.vs-v3:not(.x){background:#fff !important;background-image:none !important}

/* ===== Images : visages et objets bien visibles (18 octobre 2026) =====
   Ordinateur : le voile foncé reste à gauche sous le texte; la droite de la photo est presque claire.
   Téléphone : le texte garde un fond foncé en haut, et la photo est dégagée en bas de l'en-tête. */
html:has(#mp-fond-visible) body header.hero{background-image:radial-gradient(ellipse 900px 500px at 88% -6%,rgba(200,169,81,.10),transparent 62%),linear-gradient(100deg,rgba(0,26,53,.86) 0%,rgba(0,41,82,.62) 38%,rgba(0,51,102,.16) 66%,rgba(0,51,102,0) 100%),var(--mp-fond-jour, none) !important;background-position:center,center,center 30% !important}
html:has(#mp-fond-visible) body header.page-header,html:has(#mp-fond-visible) body header.pagehead{background-position:center 30% !important}
@media (max-width:760px){
  html:has(#mp-fond-visible) body header.hero{background-image:linear-gradient(180deg,rgba(0,26,53,.92) 0%,rgba(0,41,82,.82) 58%,rgba(0,51,102,.18) 82%,rgba(0,51,102,0) 100%),var(--mp-fond-jour, none) !important;
    background-size:cover,cover !important;background-position:center,center bottom !important;padding-bottom:190px !important}
}
/* Pages Assurance de personnes, salariés, mandat : photo dégagée sous le texte sur téléphone */
@media (max-width:980px){
  html body .ap-hero.ap-bg{background-image:linear-gradient(180deg,rgba(var(--jour-fonce,0,51,102),.93) 0%,rgba(var(--jour-fonce,0,51,102),.84) 55%,rgba(var(--jour-fonce,0,51,102),.15) 80%,rgba(var(--jour-fonce,0,51,102),0) 100%),var(--ap-img) !important;
    background-position:center bottom !important;padding-bottom:230px !important;min-height:0 !important}
  html body .ap-sec.ap-bg.clair{background-image:linear-gradient(180deg,rgba(253,251,246,.97) 0%,rgba(253,251,246,.93) 70%,rgba(253,251,246,0) 100%),var(--ap-img) !important;background-position:center bottom !important;padding-bottom:200px !important}
  html body .ap-cta.ap-bg{background-image:linear-gradient(180deg,rgba(var(--jour-fonce,0,51,102),.94) 0%,rgba(var(--jour-fonce,0,51,102),.86) 62%,rgba(var(--jour-fonce,0,51,102),.2) 100%),var(--ap-img) !important;background-position:center bottom !important}
}
/* Génération sandwich : la photo au-dessus du texte sur téléphone */
@media (max-width:760px){
  html body #mp-sandwich .sw-sl{background-size:cover !important;background-position:center top !important;align-items:flex-end !important;padding-top:210px !important}
  html body #mp-sandwich .sw-sl:before{background:linear-gradient(0deg,rgba(0,22,45,.96) 0%,rgba(0,34,70,.88) 55%,rgba(0,51,102,.10) 82%,rgba(0,51,102,0) 100%) !important}
}
html body #mp-sandwich .sw-sl:before{background:linear-gradient(95deg,rgba(0,22,45,.95) 0%,rgba(0,34,70,.86) 42%,rgba(0,51,102,.18) 70%,rgba(0,51,102,0) 100%) !important}
@media (max-width:760px){html body #mp-sandwich .sw-sl:before{background:linear-gradient(0deg,rgba(0,22,45,.96) 0%,rgba(0,34,70,.88) 55%,rgba(0,51,102,.10) 82%,rgba(0,51,102,0) 100%) !important}}
/* Carte « Obtenez un prix — Soumission d'assurance » : disparaît après 5 secondes sur toutes les pages (18 octobre 2026) */
html body .mp-carte-prix{max-height:700px;overflow:hidden;animation:mpPrixOut .7s ease 5s forwards}
@keyframes mpPrixOut{0%{opacity:1;max-height:700px}60%{opacity:0;max-height:700px}100%{opacity:0;max-height:0;padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-width:0;visibility:hidden}}
@media (prefers-reduced-motion:reduce){html body .mp-carte-prix{animation:none;display:none}}
/* Barre du haut sur téléphone : avec Accueil et Recherche, on retire le bouton Consultation pour que FR/EN restent visibles */
@media (max-width:440px){html body nav#siteNav .nav-right .btn.solid{display:none !important}html body nav#siteNav .wrap{gap:4px !important}.mp-rch{margin:0 2px 0 auto !important;gap:4px !important}.mp-rch-home,.mp-rch-ouvrir{width:38px !important;height:38px !important}}
@media (min-width:981px){html body .ap-hero.ap-bg{background-position:center 55% !important}html body .ap-sec.ap-bg{background-position:center 45% !important}}
/* Ancienne bulle « ? » et son assistant : retirés partout, Zira prend le relais (19 octobre 2026) */
html body #mp-bulle,html body #mp-chat{display:none !important}

/* Photos en tete des cartes (ph-auto) */
*:has(> .ph-auto){overflow:hidden}
.ph-auto{display:block;margin:calc(-1*var(--pt,20px)) calc(-1*var(--px,20px)) 14px;aspect-ratio:16/9;background-size:cover;background-position:center 35%;background-color:#E9EEF4}
