/* conversion-2026-11-28 (Gate C2). Chargée APRÈS site.css sur /matiere/, /boutique et /bloc1/ … /bloc11/.
   A1 : sur téléphone, le titre, le prix, le prix barré, la date de fin et « Ajouter au panier » tiennent dans le premier écran (360 × 640, bandeau de consentement compris).
        Aucun texte ni prix modifié : seul l'ORDRE d'affichage change (propriété order), plus des marges et des tailles de titre resserrées.
   A2 : bande « pages de fiches » (.cv-fiches) et fenêtre d'agrandissement (.cv-zoom, js/conversion.js).
   A3 : « ce que tu reçois » (.cv-recu). */


/* ---------- A2 : pages de fiches ---------- */
.cv-fiches{padding:26px 0 8px;min-width:0;max-width:100%}
.matiere-grille > div{min-width:0}   /* la bande défilante ne doit jamais élargir la colonne (ni la page) */
.cv-fiches.cv-fiches-col{padding:14px 0 6px}
.cv-fiches.cv-fiches-col .cv-fiches-liste li{width:min(30vw,132px)}
@media (min-width:900px){.cv-fiches.cv-fiches-col .cv-fiches-liste{gap:10px}.cv-fiches.cv-fiches-col .cv-fiches-liste li{width:calc((100% - 40px)/5)}}
.cv-fiches h2{margin:0 0 4px;font-size:clamp(1.35rem,2.4vw,1.9rem);line-height:1.15}
/* textes courts : le plus grand élément du premier écran doit rester le titre (H1), comme en prod (mesure LCP) */
.cv-fiches .cv-fiches-sous{margin:0 0 10px;color:var(--texte-doux);font-size:.92rem;line-height:1.4}
.cv-fiches .cv-fiches-note{margin:-4px 0 10px;color:var(--texte-doux);font-size:.8rem;line-height:1.35}
.cv-fiches-liste{list-style:none;margin:0;padding:4px 2px 12px;display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
.cv-fiches-liste li{flex:0 0 auto;width:min(30vw,132px);scroll-snap-align:start}   /* petites vignettes : 3 pages visibles d'un coup, et le plus grand élément du premier écran reste le titre (LCP) */
.cv-fiches-liste a{display:block;position:relative;border-radius:10px;overflow:hidden;background:#fff;border:1px solid var(--bord,#D9E2EC);box-shadow:0 6px 18px -10px rgba(12,29,48,.45);color:inherit;text-decoration:none}
.cv-fiches-liste a:focus-visible{outline:3px solid var(--teal-fonce,#0B7F79);outline-offset:3px}
.cv-fiches-liste img{display:block;width:100%;height:auto}
.cv-fiches-liste span{display:block;padding:5px 6px 6px;font-size:.74rem;font-weight:700;line-height:1.25;color:var(--texte,#0C1D30);border-top:1px solid var(--bord,#D9E2EC)}
.cv-fiches-liste a::after{content:"＋";position:absolute;top:6px;right:6px;width:28px;height:28px;border-radius:50%;background:rgba(12,29,48,.78);color:#fff;font-size:1rem;line-height:28px;text-align:center}
@media (min-width:900px){.cv-fiches-liste{overflow:visible;flex-wrap:wrap}.cv-fiches-liste li{width:calc((100% - 48px)/5)}}

/* ---------- A3 : ce que tu reçois ---------- */
.cv-recu{list-style:none;margin:6px 0 4px;padding:12px 14px;border-radius:12px;background:var(--pastel-teal,#E7F5F5);color:var(--texte,#0C1D30);font-size:.95rem;line-height:1.45;max-width:72ch}
.cv-recu li{margin:0}
.cv-recu li + li{margin-top:4px}

/* ---------- fenêtre d'agrandissement ---------- */
dialog.cv-zoom{border:0;padding:0;margin:0;width:100vw;max-width:100vw;height:100vh;height:100dvh;max-height:none;background:#0C1D30;color:#fff}
dialog.cv-zoom::backdrop{background:#0C1D30}
.cv-zoom-tete{display:flex;align-items:center;gap:8px;padding:8px 10px;font-size:.9rem}
.cv-zoom-titre{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cv-zoom button{min-width:44px;min-height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.14);color:#fff;font-size:1.25rem;font-weight:700;cursor:pointer}
.cv-zoom button:disabled{opacity:.35}
.cv-zoom button:focus-visible{outline:3px solid #7DD3FC;outline-offset:2px}
.cv-zoom-scene{height:calc(100% - 120px);overflow:auto;-webkit-overflow-scrolling:touch;text-align:center;touch-action:pan-x pan-y pinch-zoom}
.cv-zoom-scene img{display:block;margin:0 auto;width:auto;max-width:100%;height:auto;max-height:100%;background:#fff;border-radius:6px}
.cv-zoom.grand .cv-zoom-scene img{max-width:none;max-height:none;width:min(200%,1000px)}
.cv-zoom-pied{display:flex;align-items:center;justify-content:center;gap:18px;padding:8px 10px}

/* ---------- A1, toutes largeurs, /matiere/ : dans le bloc d'achat, le bouton passe AVANT l'encadré des cadeaux (sur ordinateur aussi il était sous l'écran) ---------- */
.matiere-page .achat > *{order:10}
.matiere-page .achat > .prix{order:1}
.matiere-page .achat > .lanc{order:3}
.matiere-page .achat > a.btn,.matiere-page .achat > .lxc-acheter,.matiere-page .achat > .btn-acheter,.matiere-page .achat > .lx-ajouter-zone,.matiere-page .achat > .lx-ajouter{order:4}
.matiere-page .achat > .lxc-confiance{order:5}
.matiere-page .achat > .cadeau-inclus{order:6}

/* ---------- A1, toutes largeurs, /bloc1/ … /bloc11/ : titre → prix et date de fin → bouton → texte (sur ordinateur aussi le bouton était sous l'écran) ---------- */
.lance .lance-grille > div:first-child{display:flex;flex-direction:column;align-items:flex-start}
.lance .lance-grille > div:first-child > *{order:10}
.lance .lance-grille > div:first-child > h1{order:1}
.lance .lance-grille > div:first-child > .lancement{order:2;align-self:stretch}
.lance .lance-grille > div:first-child > .promo-actions{order:3;align-self:stretch}
.lance .lance-grille > div:first-child > .chapeau{order:4}
/* C3, ordinateur : haut de page des blocs resserré pour que le bouton reste dans un écran de 768 px de haut, même avec un titre sur 3 lignes (Blocs 3 et 4) */
@media (min-width:901px){
  main > .lance{padding-top:28px}
  .lance .lance-grille > div:first-child > .lancement{margin:14px 0;padding:14px 22px}
  .lance .lance-grille > div:first-child > .promo-actions{margin:14px 0}
}

/* ---------- A1 : premier écran sur téléphone ---------- */
@media (max-width:760px){
  /* /matiere/ : titre → prix, date de fin, bouton → texte → valeur séparée → cadeaux */
  .matiere-page{padding-top:8px}
  .matiere-page .matiere-grille > div:first-child{display:flex;flex-direction:column}
  .matiere-page .matiere-grille > div:first-child > *{order:10}
  .matiere-page .matiere-grille > div:first-child > .niveau{order:1;font-size:.95rem;line-height:1.2}
  /* le titre garde sa taille d'origine : il doit rester le plus grand élément du premier écran (élément LCP, comme en prod) */
  .matiere-page .matiere-grille > div:first-child > h1{order:2;margin:0 0 2px}
  .matiere-page .matiere-grille > div:first-child > .achat{order:3;margin:2px 0 10px;gap:6px 10px}
  .matiere-page .matiere-grille > div:first-child > .cv-fiches{order:4;padding:4px 0 8px}
  .matiere-page .matiere-grille > div:first-child > .chapeau{order:5;margin:2px 0 0}
  .matiere-page .matiere-grille > div:first-child > .ancrage{order:6}
  .matiere-page .achat > *{order:10}
  .matiere-page .achat > .prix{order:1;font-size:1.85rem;line-height:1.15}
  .matiere-page .achat > .lanc{order:3}
  .matiere-page .achat > a.btn,.matiere-page .achat > .lxc-acheter,.matiere-page .achat > .btn-acheter,.matiere-page .achat > .lx-ajouter-zone,.matiere-page .achat > .lx-ajouter{order:4;flex:1 1 100%;justify-content:center;margin:0}
  .matiere-page .achat > .lxc-confiance{order:5}
  .matiere-page .achat > .cadeau-inclus{order:6}

  /* /bloc1/ … /bloc11/ : titre → prix et date de fin → bouton → texte */
  main > .lance{padding-top:10px}
  .lance .lance-grille > div:first-child{display:flex;flex-direction:column}
  .lance .lance-grille > div:first-child > *{order:10}
  .lance .lance-grille > div:first-child > h1{order:1;font-size:1.9rem;line-height:1.08;margin:0}
  .lance .lance-grille > div:first-child > .lancement{order:2;margin:8px 0;padding:8px 12px;font-size:.92rem;line-height:1.35}
  .lance .lance-grille > div:first-child > .lancement strong{margin-bottom:2px}
  .lance .lance-grille > div:first-child > .lancement .prix-lance{font-size:1.8rem}
  .lance .lance-grille > div:first-child > .promo-actions{order:3;margin:0 0 14px;gap:8px}
  .lance .lance-grille > div:first-child > .chapeau{order:4;margin-top:0}
  .lance h1 .cv-h1-sur{margin-bottom:4px;font-size:1.05rem}

  /* /boutique : titre → date de fin → prix, bouton → le reste */
  .page-boutique .phare .phare-carte > .phare-corps > *{order:10}
  .page-boutique .phare .phare-carte > .phare-corps > .phare-etiquette{order:1}
  .page-boutique .phare .phare-carte > .phare-corps > h2{order:2}
  .page-boutique .phare .phare-carte > .phare-corps > .vedette-chiffres{order:3;font-size:.95rem}
  .page-boutique .phare .phare-carte > .phare-corps > .achat{order:5;gap:6px 10px}
  .page-boutique .phare .phare-carte > .phare-corps > .lanc-ligne{order:4}
  .page-boutique .phare .phare-carte .achat > *{order:10}
  .page-boutique .phare .phare-carte .achat > .prix{order:1}
  .page-boutique .phare .phare-carte .achat > .btn-acheter,.page-boutique .phare .phare-carte .achat > .lx-ajouter-zone,.page-boutique .phare .phare-carte .achat > .lx-ajouter{order:3;flex:1 1 100%;justify-content:center}
  .page-boutique .phare .phare-carte .achat > .cadeau-inclus{order:4}
}
/* très petits écrans (320 px) : couverture et titre de la carte de /boutique plus petits, pour garder le bouton dans le premier écran */
@media (max-width:340px){
  .page-boutique .phare .phare-carte{grid-template-columns:78px minmax(0,1fr);gap:6px 12px;padding:12px}
  .page-boutique .phare .phare-carte h2{font-size:1.25rem}
  .page-boutique .phare .phare-carte > .phare-corps > .vedette-chiffres{font-size:.85rem;line-height:1.3}
  .page-boutique .phare .phare-carte > .phare-corps > .lanc-ligne{font-size:.8rem;line-height:1.3}
  .page-boutique .phare .phare-carte .achat .prix{font-size:1.6rem}
}
/* le « sur-titre » du H1 des blocs garde l'aspect de l'ancienne légende (D2 : le H1 contient « Fiches de pharmacologie ») */
h1 .cv-h1-sur{display:flex;align-items:center;gap:9px;margin-bottom:14px;font-family:var(--manuscrit);font-size:1.3rem;font-weight:400;line-height:1.3;letter-spacing:0;color:var(--teal-texte)}
h1 .cv-h1-sur::before{content:"";flex:none;width:9px;height:9px;border-radius:50%;background:var(--emeraude);box-shadow:0 0 0 4px color-mix(in srgb,var(--emeraude) 18%,transparent)}
