/* ============================================================================
   scenes.css – « Mes applications » en scènes qui se déroulent au défilement (MMBT, 2026)
   ----------------------------------------------------------------------------
   Principe (comme les pages produit d'Apple) : l'écran reste en place et, à mesure que l'on
   descend, l'application change : image, titre, texte, boutons. Une barre de points montre
   où l'on en est. Couleurs = variables du site, donc valable avec les trois palettes.
   Construit par scenes.js à partir des cartes déjà présentes dans la page (un seul contenu).
   ============================================================================ */
.scenes { width: 100%; max-width: 1120px; margin: 10px auto 30px; --nav-h: 64px; }
.scenes__piste { position: relative; height: calc(var(--n) * 78vh + 100svh); }
.scenes__scene { position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); display: grid; grid-template-columns: 1.12fr 1fr; gap: clamp(20px, 4vw, 56px);
  align-items: center; padding: 0 clamp(14px, 3vw, 28px); isolation: isolate; }
/* Lueur derrière l'image : suit la palette */
.scenes__scene::before { content: ""; position: absolute; z-index: -1; inset: 8% auto 8% 0; width: 60%; border-radius: 50%; filter: blur(80px); opacity: .7;
  background: radial-gradient(circle, var(--glow1, rgba(194,173,74,.35)), transparent 70%); transition: transform .8s cubic-bezier(.2,.8,.2,1); transform: translateY(calc((var(--sp, .5) - .5) * 60px)); }
[dir="rtl"] .scenes__scene::before, html[dir="rtl"] .scenes__scene::before { inset: 8% 0 8% auto; }

/* ---- L'image : un cadre qui se penche très légèrement selon l'avancement ---- */
.scenes__cadre { position: relative; perspective: 1200px; }
.scenes__ecran { position: relative; aspect-ratio: 4 / 3; max-height: calc(100svh - var(--nav-h) - 90px); width: 100%; margin: 0 auto; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--border); background: var(--card-bg, #121210); box-shadow: 0 40px 80px -34px rgba(0,0,0,.65), 0 0 0 6px color-mix(in srgb, var(--or) 7%, transparent);
  transform: rotateY(calc((var(--sp, .5) - .5) * -7deg)) rotateX(calc((var(--sp, .5) - .5) * 3deg)); transition: transform .25s ease-out; }
.scenes__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.08) translateY(14px);
  transition: opacity .7s ease, transform 1.1s cubic-bezier(.2,.8,.2,1); }
.scenes__img.is-actif { opacity: 1; transform: scale(1) translateY(0); }
.scenes__icone { position: absolute; z-index: 2; top: -22px; inset-inline-start: -14px; width: 76px; height: 76px; border-radius: 20px; overflow: hidden; background: #000;
  border: 1px solid var(--border); box-shadow: 0 18px 36px -12px rgba(0,0,0,.7); display: grid; place-items: center; animation: scene-flotte 6s ease-in-out infinite; }
.scenes__icone > * { width: 100%; height: 100%; }
.scenes__icone img, .scenes__icone svg { width: 100%; height: 100%; object-fit: cover; }
.scenes__icone > span { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(.7) rotate(-8deg); transition: opacity .5s, transform .6s cubic-bezier(.2,.8,.2,1); }
.scenes__icone > span.is-actif { opacity: 1; transform: none; }
@keyframes scene-flotte { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

/* ---- Le texte : une scène à la fois, les autres attendent juste dessous ---- */
.scenes__textes { position: relative; display: grid; align-items: center; }
.scenes__texte { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; opacity: 0; transform: translate3d(0, 38px, 0); filter: blur(6px); pointer-events: none;
  transition: opacity .6s ease, transform .8s cubic-bezier(.2,.8,.2,1), filter .6s; }
.scenes__texte.is-actif { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.scenes__texte.est-passe { transform: translate3d(0, -38px, 0); }
.scenes__num { font-family: "Fraunces", Georgia, serif; font-style: italic; font-size: clamp(3.4rem, 9vw, 6.4rem); line-height: .9; letter-spacing: -.04em; color: transparent;
  -webkit-text-stroke: 1.5px color-mix(in srgb, var(--or) 55%, transparent); margin: 0 0 2px; }
.scenes__texte .badge { align-self: flex-start; }
.scenes__texte h3 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 600; color: var(--text); }
.scenes__texte p { margin: 0; color: var(--muted); font-size: clamp(1rem, 1.7vw, 1.2rem); line-height: 1.55; max-width: 34ch; }
.scenes__texte .acces { color: var(--or); font-weight: 600; font-size: .9rem; }
.scenes__techno { font: 500 .75rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; color: var(--muted); opacity: .85; }
.scenes__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.scenes__ouvrir, .scenes__guide { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; font-size: .98rem; transition: transform .2s, box-shadow .2s, background .2s; }
.scenes__ouvrir { background: var(--or); color: var(--bg); box-shadow: 0 14px 30px -14px var(--or); }
.scenes__guide { border: 1px solid var(--border); color: var(--text); }
.scenes__ouvrir:hover, .scenes__guide:hover { transform: translateY(-2px); }
.scenes__guide:hover { border-color: var(--or); color: var(--or); }

/* ---- Points de repère + compteur ---- */
.scenes__nav { position: absolute; z-index: 3; inset-inline-end: clamp(8px, 1.4vw, 18px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scenes__point { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--or) 70%, transparent); background: transparent; cursor: pointer; transition: transform .3s, background .3s; }
.scenes__point.is-actif { background: var(--or); transform: scale(1.5); }
.scenes__point:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }
.scenes__compteur { direction: ltr; unicode-bidi: isolate; position: absolute; z-index: 3; inset-inline-start: clamp(14px, 3vw, 28px); bottom: 10px; font: 500 .74rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .24em; color: var(--muted); }
.scenes__lien-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Les cartes d'applications d'origine restent dans la page (pour les moteurs de recherche et sans JavaScript) mais on ne les montre pas deux fois. */
.cine-masque { display: none !important; }

/* ---- Mots qui défilent dans l'écran d'ouverture + deux boutons ---- */
.cine-pour { margin: -6px 0 22px; font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--muted); }
.cine-pour b { display: inline-block; color: var(--or); font-weight: 600; min-width: 4ch; transition: opacity .35s ease, transform .35s ease; }
.cine-pour b.sort { opacity: 0; transform: translateY(-10px); }
.cine-pour b.entre { opacity: 0; transform: translateY(10px); }
.cine-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 0 0 8px; }
.cine-cta a { padding: 13px 26px; border-radius: 999px; font-weight: 700; text-decoration: none; font-size: .98rem; }
.cine-cta a:first-child { background: var(--or); color: var(--bg); box-shadow: 0 14px 30px -14px var(--or); }
.cine-cta a + a { border: 1px solid var(--border); color: var(--text); }

/* ---- Téléphone : l'image au-dessus, le texte dessous ---- */
@media (max-width: 760px) {
  .scenes { --nav-h: 98px; }
  .scenes__piste { height: calc(var(--n) * 48vh + 100svh); }
  /* Trois rangées : l'image prend la place qui reste, puis le texte (sa hauteur réelle), puis les points. Si le texte grandit
     (police agrandie sur le téléphone), c'est l'image qui rétrécit : plus aucun chevauchement possible. */
  .scenes__scene { grid-template-columns: 1fr; grid-template-rows: minmax(0, max-content) auto auto; gap: 12px; align-content: center; padding-top: 14px; padding-bottom: 6px; }
  /* L'image remplit la rangée qui reste (elle rétrécit si le texte grandit) ; l'excédent est simplement rogné (object-fit: cover). */
  /* L'image prend sa hauteur naturelle (4/3) et le texte suit juste dessous ; le tout est centré dans l'écran. */
  .scenes__cadre { min-height: 0; align-self: stretch; container-type: size; aspect-ratio: 4 / 3; margin-top: 22px; }   /* place pour l'icône de l'appli, qui dépasse en haut à gauche : jamais sous les filtres */
  /* La capture garde ses proportions (4/3) et tient entière dans la place qui reste : plus rien n'est rogné sur les côtés.
     --l = sa largeur : toute la largeur, ou moins si la hauteur manque. L'icône suit son coin haut. */
  .scenes__ecran { --l: min(100cqw, 133.33cqh); position: absolute; inset: auto 0 0 0; margin: 0 auto; width: var(--l); height: calc(var(--l) * .75); max-width: none; max-height: none; aspect-ratio: auto; }
  .scenes__icone { --l: min(100cqw, 133.33cqh); width: 58px; height: 58px; border-radius: 16px;
    top: calc(100cqh - var(--l) * .75 - 14px); inset-inline-start: calc((100cqw - var(--l)) / 2 - 10px); }
  .scenes__textes { align-items: start; }   /* le texte colle à l'image : l'espace libre (textes plus courts) passe sous les boutons */
  .scenes__texte { gap: 7px; position: relative; }
  /* Le grand numéro passe en haut à droite, sur la ligne de l'étiquette : il reste visible sans prendre de place */
  .scenes__num { position: absolute; top: -8px; inset-inline-end: 0; margin: 0; font-size: 2.6rem; } .scenes__texte h3 { font-size: clamp(1.7rem, 8vw, 2.3rem); }
  .scenes__texte p { font-size: .98rem; max-width: none; line-height: 1.45; }
  .scenes__actions { gap: 8px; margin-top: 4px; } .scenes__ouvrir, .scenes__guide { padding: 11px 18px; font-size: .92rem; }
  /* Points : 3e rangée de la mise en page, centrés sous le texte */
  .scenes__nav { position: static; transform: none; flex-direction: row; justify-self: center; gap: 10px; padding: 4px 0 2px; } .scenes__compteur { display: none; }
  .scenes__techno { display: none; }   /* la liste des technologies n'est pas indispensable sur téléphone : on gagne deux lignes */
  .scenes__texte p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; }   /* garde-fou : un texte démesuré ne pousse plus les boutons hors de l'écran */
  .cine-pour { margin-top: 4px; }
}
/* Petits écrans (ou grosse police) : on garde l'essentiel (titre, texte, boutons) et on retire le décor */
@media (max-width: 760px) and (max-height: 760px) { .scenes__techno { display: none; } .scenes__texte { gap: 7px; } }
/* ---- « Moins d'animations » : pas de scènes, la liste d'origine reste affichée (voir scenes.js) ---- */
@media (prefers-reduced-motion: reduce) { .scenes__icone { animation: none; } .scenes__img, .scenes__texte, .scenes__ecran { transition: none; } .cine-pour b { transition: none; } }

/* Le bouton « remonter » s'efface pendant les scènes (voir scenes.js) */
html.dans-scenes .remonter { opacity: 0 !important; pointer-events: none !important; }

/* Boutons « Toutes / Mer et sécurité / Familles… » au-dessus des applis */
.scenes__filtres { position: absolute; top: 14px; left: 0; right: 0; z-index: 4; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 auto; padding: 0 16px; max-width: 1000px; }
.scenes__filtres button { font: inherit; backdrop-filter: blur(6px); background: color-mix(in srgb, var(--bg) 70%, transparent); font-size: .88rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); color: var(--text, inherit); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.scenes__filtres button:hover { border-color: var(--or); }
.scenes__filtres button.is-actif { background: var(--or); border-color: var(--or); color: var(--bg); }
@media (max-width: 760px) {
  .scenes__filtres { top: 8px; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .scenes__filtres::-webkit-scrollbar { display: none; }
  .scenes__filtres button { flex: 0 0 auto; }
  .scenes__scene:has(> .scenes__filtres) { padding-top: 56px; }
}

/* Liste « Toutes » : les applis d'un coup d'œil, on touche pour y aller */
.scenes__filtres button.is-ouvert { border-color: var(--or); }
.scenes__toutes { position: absolute; top: 62px; left: 50%; transform: translateX(-50%); z-index: 5; width: min(560px, calc(100% - 32px)); display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px;
  padding: 12px; border-radius: 20px; border: 1px solid var(--border); background: var(--card-bg); box-shadow: 0 24px 60px -18px rgba(0,0,0,.7); }
.scenes__toutes[hidden] { display: none; }
.scenes__toutes button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 14px; background: transparent; color: var(--text); font: 600 .9rem Inter, system-ui, sans-serif; text-align: start; cursor: pointer; }
.scenes__toutes button:hover, .scenes__toutes button:focus-visible { background: color-mix(in srgb, var(--or) 14%, transparent); }
.scenes__toutes-ic { width: 34px; height: 34px; flex: none; border-radius: 9px; overflow: hidden; display: grid; place-items: center; }
.scenes__toutes-ic img, .scenes__toutes-ic svg { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .scenes__toutes { top: 54px; grid-template-columns: 1fr 1fr; } }
.scenes__nouv::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 7px; border-radius: 50%; background: #e2b93b; vertical-align: middle; } /* « Nouveautés » : petit point doré */

/* MMBT École : « Présentation et tarifs » en grand bouton, sur sa propre ligne */
.scenes__tarifs { flex-basis: 100%; justify-content: center; }
@media (max-width: 700px) { .scenes__tarifs { margin-right: 52px; } } /* laisse la place au bouton du thème, en bas à droite */

/* L'image de l'appli se touche pour ouvrir l'appli (en plus du bouton) */
.scenes__cadre { cursor: pointer; }
@media (hover: hover) { .scenes__cadre:hover .scenes__ecran { box-shadow: 0 40px 80px -34px rgba(0,0,0,.65), 0 0 0 6px color-mix(in srgb, var(--or) 30%, transparent); } }
