/* Maquettes de la page d'accueil — commun aux trois pistes.
   Jetons de CLAUDE.md, cadre d'iPhone, écrans de l'app recréés en HTML. */

@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 600; font-display: swap; src: url('/assets/polices/PlusJakartaSans_600SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 700; font-display: swap; src: url('/assets/polices/PlusJakartaSans_700Bold.ttf') format('truetype'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 800; font-display: swap; src: url('/assets/polices/PlusJakartaSans_800ExtraBold.ttf') format('truetype'); }

:root {
  --texte: #1a140d; --texte-2: #8c857b; --texte-3: #bdb6a9;
  --vert: #15914c; --vert-fonce: #0f7a40; --vert-doux: #e4f4ea;
  --bleu: #1f56e0; --bleu-doux: #e6edfd;
  --pastille: #f1efe9; --poignee: #e7e3da;
  --ombre-carte: 0 14px 30px -18px rgba(140, 70, 0, .5);
  --ombre-vert: 0 12px 26px -10px rgba(15, 122, 64, .7);
  --ombre-tel: 0 40px 80px -30px rgba(110, 50, 0, .65), 0 18px 36px -24px rgba(110, 50, 0, .5);
  --courbe: cubic-bezier(.2, .85, .2, 1);
  --degrade: linear-gradient(168deg, #ffc23d 0%, #ff8f1f 100%);
}
* { box-sizing: border-box; }
/* Le haut de la page (barre d’état de l’iPhone, rebond du défilement) prend la couleur
   du début du dégradé, pas celle de la fin : sinon une bande d’orange plus foncé apparaît. */
html { background: #ffc23d; scroll-behavior: smooth; }
body { background-color: #ffc23d; }
body { margin: 0; color: var(--texte); font-family: 'Plus Jakarta Sans', -apple-system, sans-serif; font-weight: 600; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
.v { color: var(--vert); }

/* En-tête : « Mon Épicerie » prend la place, « Obtenir l'app » reste petit à droite. */
header.haut .marque img { width: 58px; height: 58px; border-radius: 14px; }
header.haut .marque b { font-size: 27px; letter-spacing: -.7px; }
header.haut .obtenir { height: 32px; padding: 0 12px; gap: 6px; font-size: 12.5px; }
header.haut .obtenir svg { width: 14px; height: 14px; }

/* Bouton principal + bouton App Store générique (pas le badge d'Apple). */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 26px; border-radius: 18px; background: var(--vert); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; box-shadow: var(--ombre-vert); transition: transform .25s var(--courbe); }
.bouton:hover { transform: translateY(-2px); }
.bouton-noir { background: var(--texte); box-shadow: 0 12px 26px -12px rgba(26, 20, 13, .7); }
.bouton small { display: block; font-size: 11px; font-weight: 600; opacity: .75; line-height: 1.1; }
.bouton span { text-align: left; line-height: 1.15; }

/* Pastilles de bannière : couleur unie + nom, jamais de logo. */
.ban { display: inline-flex; align-items: center; font-weight: 800; font-size: 12px; letter-spacing: .2px; padding: 5px 11px; border-radius: 999px; color: #fff; white-space: nowrap; }
.ban-iga { background: #ed1c24; }
.ban-maxi { background: #003da5; color: #fff200; }
.ban-metro { background: #fff; color: #d81e05; box-shadow: inset 0 0 0 1.5px #d81e05; }
.ban-provigo { background: #521043; }
.ban-superc { background: #d82318; color: #ffd300; }
.ban-adonis { background: #1f7ca0; color: #cb112c; }
.ban-costco { background: #1a140d; color: #e51937; }
.ban-walmart { background: #0053e2; color: #ffc220; }

/* ---------- Le téléphone ---------- */
.tel { position: relative; width: 300px; height: 630px; border-radius: 50px; background: #1a140d; padding: 11px; box-shadow: var(--ombre-tel); flex: none; }
.tel::before { content: ''; position: absolute; top: 22px; left: 50%; width: 92px; height: 27px; margin-left: -46px; background: #1a140d; border-radius: 999px; z-index: 5; }
.ecrans { position: relative; width: 100%; height: 100%; border-radius: 40px; overflow: hidden; background: var(--degrade); }
.ecran { position: absolute; inset: 0; padding: 62px 14px 16px; opacity: 0; transform: scale(.97); transition: opacity .5s var(--courbe), transform .5s var(--courbe); pointer-events: none; }
.ecran.actif { opacity: 1; transform: none; }
.ecran h4 { margin: 0 4px 12px; font-weight: 800; font-size: 25px; letter-spacing: -.7px; }
.barre-etat { position: absolute; top: 18px; left: 30px; right: 26px; display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; z-index: 4; }

/* Écran : ma liste */
.item { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 17px; padding: 8px 10px 8px 8px; margin-bottom: 8px; box-shadow: 0 10px 22px -16px rgba(140, 70, 0, .55); }
.tuile { width: 38px; height: 38px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex: none; }
.t-prod { background: #e4f4ea; color: #15914c; } .t-lait { background: #e6edfd; color: #1f56e0; } .t-boul { background: #fbeccb; color: #b97608; }
.t-viande { background: #ffe5e1; color: #e23b2e; } .t-garde { background: #efe7fb; color: #7c3aed; } .t-bruv { background: #def4f6; color: #0e8a99; }
.item b { flex: 1; font-size: 14px; font-weight: 700; line-height: 1.2; }
.item b small { display: block; color: var(--texte-2); font-size: 11.5px; font-weight: 600; }
.qte { background: var(--vert-doux); color: var(--vert); font-weight: 800; font-size: 12px; padding: 4px 9px; border-radius: 999px; }
.ecran-liste .bouton { position: absolute; left: 14px; right: 14px; bottom: 18px; min-height: 52px; font-size: 15px; border-radius: 17px; }
.ecran.actif .cascade > * { animation: monter .55s var(--courbe) both; }
.ecran.actif .cascade > *:nth-child(2) { animation-delay: .07s; } .ecran.actif .cascade > *:nth-child(3) { animation-delay: .14s; }
.ecran.actif .cascade > *:nth-child(4) { animation-delay: .21s; } .ecran.actif .cascade > *:nth-child(5) { animation-delay: .28s; }
.ecran.actif .cascade > *:nth-child(6) { animation-delay: .35s; } .ecran.actif .cascade > *:nth-child(7) { animation-delay: .42s; }

/* Écran : calcul */
.ecran-calcul { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.anneau { width: 120px; height: 120px; margin-bottom: 22px; }
.ecran.actif .anneau { animation: tourner 1.1s linear infinite; }
.ecran-calcul b { font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
.ecran-calcul p { margin: 4px 0 16px; color: rgba(26, 20, 13, .6); }
.defile { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; padding: 0 12px; }
.ecran.actif .defile .ban { animation: pop .45s var(--courbe) both; }
.ecran.actif .defile .ban:nth-child(2) { animation-delay: .12s; } .ecran.actif .defile .ban:nth-child(3) { animation-delay: .24s; } .ecran.actif .defile .ban:nth-child(4) { animation-delay: .36s; }
.ecran.actif .defile .ban:nth-child(5) { animation-delay: .48s; } .ecran.actif .defile .ban:nth-child(6) { animation-delay: .6s; } .ecran.actif .defile .ban:nth-child(7) { animation-delay: .72s; } .ecran.actif .defile .ban:nth-child(8) { animation-delay: .84s; }

/* Écran : résultat (feuille blanche qui monte) */
.ecran-resultat { padding: 0; }
.carte-fond { position: absolute; inset: 0; }
.feuille { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 30px 30px 0 0; padding: 12px 16px 18px; box-shadow: 0 -20px 50px -20px rgba(80, 40, 0, .4); transform: translateY(100%); transition: transform .6s var(--courbe) .1s; }
.ecran.actif .feuille { transform: none; }
.poignee { width: 40px; height: 5px; border-radius: 9px; background: var(--poignee); margin: 0 auto 12px; }
.feuille .label { color: var(--texte-2); font-size: 13px; }
.montant { font-weight: 800; font-size: 38px; letter-spacing: -1.2px; color: var(--vert); line-height: 1.05; font-variant-numeric: tabular-nums; }
.exemple { display: inline-block; margin-left: 6px; vertical-align: middle; font-size: 10px; font-weight: 700; color: var(--texte-3); text-transform: uppercase; letter-spacing: .6px; }
.arret { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--pastille); font-size: 13.5px; }
.arret:first-of-type { margin-top: 10px; }
.arret .num { width: 24px; height: 24px; border-radius: 50%; background: var(--texte); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.arret b { flex: 1; font-weight: 700; }
.arret b small { display: block; color: var(--texte-2); font-weight: 600; font-size: 11.5px; }
.arret .prix { font-weight: 800; }
.itin { margin-top: 10px; width: 100%; min-height: 48px; border-radius: 16px; background: var(--bleu-doux); color: var(--bleu); font-weight: 800; font-size: 14.5px; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Fond de carte stylisé (pas de vraie carte) */
.plan { position: absolute; inset: 0; background: #f6efe2; }
.plan svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.epingle { position: absolute; transform: translate(-50%, -100%) scale(0); transform-origin: 50% 100%; transition: transform .45s var(--courbe); z-index: 2; }
.ecran.actif .epingle, .visible .epingle { transform: translate(-50%, -100%) scale(1); }
.epingle .ban { box-shadow: 0 8px 16px -8px rgba(80, 40, 0, .6); }
.epingle::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: inherit; transform: rotate(45deg); }
.maison { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--bleu); border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(31, 86, 224, .18); display: flex; align-items: center; justify-content: center; z-index: 3; }
.ecran.actif .maison, .visible .maison { animation: pulse 2s ease-out infinite; }

/* Écran : point de départ */
.segment { position: absolute; left: 14px; right: 14px; bottom: 18px; background: #fff; border-radius: 22px; padding: 14px; box-shadow: var(--ombre-carte); }
.segment b { display: block; font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.piste { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--pastille); border-radius: 13px; padding: 3px; position: relative; }
.piste span { position: relative; z-index: 1; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--texte-2); padding: 8px 0; }
.piste span.on { color: var(--texte); }
.piste i { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(25% - 1.5px); background: #fff; border-radius: 11px; box-shadow: 0 4px 10px -4px rgba(140, 70, 0, .35); transition: transform .45s var(--courbe); }


/* ---------- La scène : liste partagée, puis récit ----------
   Épinglée sur la hauteur de l'écran. Le téléphone ne bouge jamais : accueil.js
   lit le défilement, fait monter la piste des étapes et change l'écran. */
.histoire { position: relative; width: 100vw; margin: 20px 0 0 calc(50% - 50vw); height: 430vh; height: 430svh; }
/* Pas plus haute que le téléphone : sur un grand écran, la scène suit la bande de près
   et se centre dans l'écran une fois épinglée. */
.cadre { --haut: min(100vh, 800px); position: sticky; top: calc((100vh - var(--haut)) / 2); height: var(--haut); overflow: hidden; }
@supports (height: 100svh) { .cadre { --haut: min(100svh, 800px); top: calc((100svh - var(--haut)) / 2); } }
.pas-tel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
.pas-tel .tel { zoom: var(--z-tel, 1); }
.pas-fenetre { position: absolute; inset: 0; overflow: hidden; }
.pas-piste { height: 100%; will-change: transform; }
.pas { height: 100%; display: grid; grid-template-columns: 1fr 340px 1fr; gap: 30px; align-items: center; max-width: 1160px; margin: 0 auto; padding: 0 22px; }
.pas > .texte { max-width: 400px; }
.pas.gauche > .texte { grid-column: 1; justify-self: start; }
.pas.droite > .texte { grid-column: 3; justify-self: end; text-align: right; }
.pas h2 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -1.4px; line-height: 1.06; margin: 8px 0 12px; }
.pas .phrases { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 6px; }
.pas.droite .phrases { align-items: flex-end; }
.pas .phrase { display: inline-block; background: rgba(255, 255, 255, .88); color: var(--texte); font-weight: 700; font-size: 15px; line-height: 1.4; padding: 10px 16px; border-radius: 999px; box-shadow: var(--ombre-carte); }
.pas .phrase.plein { background: var(--vert); color: #fff; box-shadow: var(--ombre-vert); }
/* Dernière étape : « Avertis-moi à la sortie » tout de suite sous le titre. */
.pas .cta-verre { margin-top: 10px; }
.ancre-fin { position: absolute; left: 0; bottom: min(100vh, 800px); }

/* Première étape : la même liste chez Alex, à droite du téléphone. */
.chez-alex { grid-column: 3; grid-row: 1; justify-self: center; position: relative; }
.chez-alex .tel { zoom: calc(var(--z-tel, 1) * .78); }
.qui-tel { position: absolute; top: 22px; z-index: 12; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #fff; box-shadow: var(--ombre-carte); font-weight: 800; font-size: 13px; transition: opacity .3s; }
.qui-tel span { width: 26px; height: 26px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.qui-tel.coin-g { left: -30px; } .qui-tel.coin-d { right: -30px; }
.p-moi { background: #1f56e0; } .p-a { background: #7c3aed; }
.lien-sync { position: absolute; left: -58px; top: 50%; margin-top: -24px; z-index: 12; width: 48px; height: 48px; border-radius: 50%; background: #fff; color: var(--vert); display: flex; align-items: center; justify-content: center; box-shadow: var(--ombre-carte); }

/* Écran « Ma liste » recréé d'après l'app, avec la ligne « Partagée avec ». */
.ml { position: absolute; inset: 0; padding: 48px 10px 0; background: var(--degrade); text-align: left; }
.ml-haut { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ml-carre { width: 34px; height: 34px; border-radius: 11px; background: #fdfbef; display: flex; align-items: center; justify-content: center; color: var(--texte); box-shadow: 0 6px 14px -8px rgba(140, 70, 0, .5); }
.ml-carre.verre-c { background: rgba(255, 255, 255, .35); border: 1px solid rgba(255, 255, 255, .7); color: #fff; }
.ml-titre { text-align: center; color: #fff; line-height: 1.15; }
.ml-titre b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.6px; }
.ml-titre small { display: flex; justify-content: center; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; }
.ml-ligne { display: flex; align-items: center; gap: 8px; background: #fdfbef; border-radius: 15px; padding: 8px 10px; margin-bottom: 6px; box-shadow: 0 8px 18px -14px rgba(140, 70, 0, .55); }
.ml-ligne i { width: 7px; height: 7px; border-radius: 50%; background: #3a8a44; flex: none; align-self: flex-start; margin-top: 5px; }
.ml-ligne b { flex: 1; font-size: 12.5px; font-weight: 800; line-height: 1.2; }
.ml-ligne b small { display: block; color: var(--texte-2); font-size: 10px; font-weight: 600; }
.ml-ligne .q { background: var(--vert-doux); color: var(--vert); font-weight: 800; font-size: 10.5px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.ml-ligne .q.plein { background: #3a8a44; color: #fff; }
.ml-ajout { margin: 4px 0 0 auto; width: max-content; padding: 7px 12px; border-radius: 13px; border: 1.5px dashed rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .22); color: #fff; font-size: 12px; font-weight: 800; transition: background .25s, color .25s; }
.ml-ajout.tape { background: #fff; color: var(--texte); border-style: solid; border-color: #fff; }
.ml-bouton { position: absolute; left: 10px; right: 10px; bottom: 30px; height: 46px; border-radius: 15px; background: #3a8a44; color: #fff; font-weight: 800; font-size: 13.5px; display: flex; align-items: center; justify-content: center; gap: 6px; box-shadow: var(--ombre-vert); }
.direct { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: battre 1.6s ease-out infinite; }
.nouvelle { overflow: hidden; max-height: 0; opacity: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; transform: translateY(-6px); transition: max-height .5s var(--courbe), opacity .4s var(--courbe), margin .5s var(--courbe), padding .5s var(--courbe), transform .5s var(--courbe), box-shadow .4s; }
.nouvelle.la { max-height: 60px; opacity: 1; margin-bottom: 6px; padding-top: 8px; padding-bottom: 8px; transform: none; }
.nouvelle.la.eclat { box-shadow: 0 0 0 2px var(--vert), 0 8px 18px -14px rgba(140, 70, 0, .55); }
@keyframes battre { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 100% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); } }

@media (max-width: 860px) {
  /* Sur téléphone : l'iPhone en haut, une carte blanche par étape en bas. */
  .pas-tel { top: 14px; transform: translateX(-50%); }
  .pas-fenetre { top: auto; height: 36%; }
  /* Les cartes ne suivent pas le doigt : elles changent d'un coup, en fondu, quand on
     passe à l'étape suivante (accueil.js pose .active). */
  .pas-piste { position: relative; transform: none !important; }
  .pas { position: absolute; inset: 0; display: flex; align-items: flex-start; padding: 0 16px; opacity: 0 !important; transform: translateY(26px); transition: opacity .45s var(--courbe), transform .55s var(--courbe); pointer-events: none; }
  .pas.passee { transform: translateY(-26px); }
  .pas.active { opacity: 1 !important; transform: none; pointer-events: auto; }
  /* En-tête : le logo au centre, « Mon Épicerie » dessous, en grand ; « Obtenir l'app »
     petit, sur la ligne d'en dessous, à droite, bien visible (blanc, sans flou). */
  header.haut { display: grid; grid-template-columns: 1fr; justify-items: center; row-gap: 6px; padding: 18px 0 0; }
  header.haut .marque { grid-column: 1; flex-direction: column; gap: 7px; }
  header.haut .marque img { width: 56px; height: 56px; border-radius: 14px; }
  header.haut .marque b { font-size: 21px; }
  header.haut .droite-haut { display: flex !important; grid-column: 1; justify-self: end; }
  header.haut .obtenir { display: inline-flex !important; height: 30px; padding: 0 11px; gap: 5px; font-size: 11.5px; background: rgba(255, 255, 255, .7); color: var(--texte); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 10px 22px -16px rgba(140, 70, 0, .5); }
  header.haut .obtenir svg { width: 12px; height: 12px; }
  /* En haut : la même mise en page que sur ordinateur. L'iPhone, plus petit, est au
     centre ; les quatre cartes sont en zigzag sur ses bords, dans le même ordre (Patate
     douce à gauche, favorites à droite, Super C → Maxi à gauche, économies à droite).
     Les cartes sont blanches (pas de verre), immobiles. Les positions tiennent compte
     du zoom de .72 des cartes. */
  .scene { margin-top: 30px; }
  .scene .tel { zoom: .76; }
  .scene .flot { zoom: .72; animation: none !important; left: auto !important; right: auto !important; width: max-content !important; max-width: none !important; }
  .scene .flot.verre { background: rgba(255, 255, 255, .96) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .scene .flot.f5 .chiffre { background: var(--vert) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .scene .flot.f7 { left: -14px !important; top: 56px !important; }
  .scene .flot.f2 { right: -14px !important; top: 194px !important; }
  .scene .flot.f6 { display: block !important; left: -14px !important; top: 375px !important; }
  .scene .flot.f5 { right: -14px !important; top: 542px !important; }
  .pas > .texte, .pas.droite > .texte { max-width: none; width: 100%; text-align: left; background: #fff; border-radius: 24px; padding: 16px 18px; box-shadow: var(--ombre-carte); }
  .pas .blanc { color: var(--texte); text-shadow: none; }
  .pas h2 { font-size: 24px; margin: 4px 0 10px; }
  .pas .phrases, .pas.droite .phrases { align-items: flex-start; gap: 8px; }
  .pas .phrase { background: var(--pastille); box-shadow: none; font-size: 14px; padding: 8px 13px; border-radius: 16px; }
  .pas .phrase.plein { background: var(--vert); }
  .pas .cta-verre { margin-top: 6px; height: 48px; font-size: 15px; }
  .chez-alex { display: none; }
  .pas-tel .qui-tel { display: none; }
}
/* Animations réduites : le café est déjà sur les deux listes. */
@media (prefers-reduced-motion: reduce) { .nouvelle { max-height: 60px; opacity: 1; margin-bottom: 6px; padding-top: 8px; padding-bottom: 8px; transform: none; } }

/* Apparition au défilement */
.reveler { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--courbe), transform .8s var(--courbe); }
.reveler.visible { opacity: 1; transform: none; }

@keyframes monter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.4); } 70% { transform: scale(1.08); } 100% { opacity: 1; transform: none; } }
@keyframes tourner { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 86, 224, .35); } 100% { box-shadow: 0 0 0 18px rgba(31, 86, 224, 0); } }
@keyframes flotter { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes defiler { to { transform: translateX(-50%); } }

/* Réglage « réduire les animations » du système : tout s'affiche, rien ne bouge. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveler { opacity: 1; transform: none; }
}

/* iPhone : Safari ne sait pas fixer un dégradé de fond (background-attachment: fixed) ;
   il l'étire sur toute la page, et la bande de l'heure (une couleur unie) jure avec
   l'orange du milieu. On pose le dégradé sur un calque fixe, à la taille de l'écran,
   et deux filets fixes aux bords donnent à Safari la couleur du haut et du bas.
   Le texte garde sa taille : Safari ne le grossit plus dans les petits écrans. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 860px) {
  body { background: transparent !important; }
  body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: linear-gradient(168deg, #ffc23d 0%, #ff8f1f 100%); pointer-events: none; }
  html::before, html::after { content: ''; position: fixed; left: 0; right: 0; height: 1px; z-index: 100; pointer-events: none; }
  html::before { top: 0; background-color: #ffc23d; }
  html::after { bottom: 0; background-color: #ff8f1f; }
}

/* Page anglaise : l'écran « My list » du haut est redessiné (la capture est en français).
   Dessiné pour un téléphone de 300 px ; agrandi au téléphone du haut, plus large. */
.scene .ml-heros { zoom: 1.266; inset: auto; top: 0; left: 0; width: calc(100% / 1.266); height: calc(100% / 1.266); }
@media (max-width: 860px) { .scene .ml-heros { zoom: 1; width: 100%; height: 100%; } }

/* iPhone : les étapes dans le défilement normal (blocs construits par accueil.js). */
.flux { display: none; }
@media (max-width: 860px) {
  .histoire { display: none; }
  /* Carrousel : les étapes côte à côte, on glisse au doigt ; l'étape au centre est pleine,
     les voisines un peu effacées. Pleine largeur d'écran. */
  .flux { display: flex; gap: 14px; width: 100vw; margin: 40px 0 0 calc(50% - 50vw); padding: 6px 0 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .flux::-webkit-scrollbar { display: none; }
  /* Safari ignore la marge de droite d'une zone qui défile de côté : deux cales vides, au
     début et à la fin, permettent de centrer la première et la dernière étape. */
  .flux::before, .flux::after { content: ''; flex: 0 0 calc(10vw - 14px); }
  /* Le pied de page reste au-dessus de la barre flottante de Safari. */
  .pied-site { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)); }
  .bloc-m { flex: 0 0 80vw; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; opacity: .45; transition: opacity .35s ease; }
  .bloc-m.visible { opacity: 1; }
  .bloc-m .tel-img { width: 200px; height: auto; filter: drop-shadow(0 20px 22px rgba(110, 50, 0, .32)); }
  .bloc-m .texte { width: 100%; margin-top: 16px; background: #fff; border-radius: 24px; padding: 16px 18px; box-shadow: var(--ombre-carte); }
  .points { display: flex; justify-content: center; gap: 8px; margin: 16px 0 0; }
  /* Le pied de page suit le carrousel de près. */
  .page { padding-bottom: 24px !important; }
  .pied-site { padding-top: 10px; }
  .points button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .55); transition: width .3s ease, background .3s ease; }
  .points button.actif { width: 22px; background: #fff; }
  .bloc-m .blanc { color: var(--texte); text-shadow: none; }
  .bloc-m h2 { font-size: 24px; letter-spacing: -1px; line-height: 1.08; margin: 2px 0 10px; }
  .bloc-m .phrases { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  .bloc-m .phrase { display: inline-block; background: var(--pastille); color: var(--texte); font-weight: 700; font-size: 14px; line-height: 1.4; padding: 8px 13px; border-radius: 16px; }
  .bloc-m .phrase.plein { background: var(--vert); color: #fff; }
  .bloc-m .cta-verre { margin-top: 4px; height: 48px; font-size: 15px; }
  /* Toutes les cartes du carrousel : titre, bulles et bouton centrés. */
  .bloc-m .texte { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .bloc-m .phrases { align-items: center; }
}
.points { display: none; }
@media (max-width: 860px) { .points { display: flex; } }
