/* ============================================================
   Design v2 : prestation Motion design (pages/motion-design-v2.php).
   Chargé après styles.css, v2-chrome.css et v2.css (variables, boutons, sections, tarifs, étapes,
   FAQ, formulaire, apparitions). Ici : en-tête avec le téléphone et sa frise de montage, plateformes,
   usages, lecteur et chapitres, différences, schéma des formats.
   ============================================================ */

/* ── En-tête ───────────────────────────────────────────────── */
/* Fil d'Ariane comme sur les pages pack et FAQ du site (v2-pack.css) : en haut de l'en-tête, sur toute
   la largeur, page en cours en orange. La grille occupe ensuite la hauteur restante, centrée. */
.mq-hero.mo-hero { align-items: stretch; padding: 28px 0 48px; }
.mo-hero > .mq-wrap { display: flex; flex-direction: column; }
.mo-hero .mq-hero-grid { flex-grow: 1; }
.mo-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 48px; font-size: 13px; color: var(--faint); }
.mo-crumbs a { transition: color .2s; }
.mo-crumbs a:hover { color: var(--txt); }
.mo-crumbs i { font-size: 12px; }
.mo-crumbs [aria-current] { color: var(--o); font-weight: 700; }
.mo-hero h1 { margin-top: 24px; text-wrap: balance; }   /* titre plus long que sur la maquette : lignes équilibrées */

@media (prefers-reduced-motion: no-preference) {
  .mo-stage { animation: mqFromRight .85s cubic-bezier(.2,.7,.2,1) .3s backwards; }
}

/* Le téléphone qui joue la boucle, et la frise de montage posée devant son bas. */
.mo-stage { position: relative; height: 620px; display: flex; justify-content: center; }
.mo-stage::before {
  content: ''; position: absolute; top: 2%; left: 50%; width: 480px; height: 560px; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(247,147,29,.24), transparent 65%); filter: blur(30px); pointer-events: none;
}
.mo-phone {
  position: relative; z-index: 1; width: 290px; overflow: hidden;
  border: 10px solid #1b1b1b; border-radius: 40px; background: #0b0806;
  box-shadow: 0 0 0 1px #262626, 0 40px 80px rgba(0,0,0,.65);
}
/* En-tête : le téléphone reste en haut de la scène (la frise se pose devant son bas). */
.mo-stage > .mo-phone { align-self: flex-start; }
.mo-phone video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: #0b0806; }
.mo-chip { z-index: 3; }
.mo-chip i { color: var(--o); font-size: 16px; }
/* Pastilles de part et d'autre du téléphone (290 px), qui ne mordent que sur son cadre. */
.mo-chip--fps { top: 52px; right: calc(50% + 122px); }
.mo-chip--music { top: 404px; right: 0; }
.mo-chip--sound { top: 318px; right: calc(50% + 122px); cursor: pointer; transition: border-color .2s, color .2s; }
.mo-chip--sound:hover { border-color: var(--o); color: var(--o); }

.mo-timeline {
  position: absolute; z-index: 2; left: 50%; bottom: 0; width: min(500px, 100%); transform: translateX(-50%);
  padding: 12px 14px 14px; border: 1px solid var(--line2); border-radius: 16px;
  background: rgba(14,14,14,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 24px 50px -10px rgba(0,0,0,.8);
}
.mo-tl-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 11px; font-weight: 700; color: var(--mut); }
.mo-tl-top > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.mo-tl-top i { color: var(--o); font-size: 14px; }
.mo-tl-time { padding: 2px 8px; border-radius: 6px; background: #1b1b1b; color: var(--txt); font-variant-numeric: tabular-nums; }
.mo-tl-tracks { position: relative; display: flex; flex-direction: column; gap: 6px; }
.mo-tl-row { display: flex; align-items: center; gap: 8px; }
.mo-tl-label { flex-shrink: 0; width: 22px; display: flex; justify-content: center; color: var(--faint); font-size: 14px; }
.mo-tl-track { position: relative; flex-grow: 1; height: 22px; border-radius: 6px; background: #161616; }
/* Les six extraits de la boucle, à la largeur de leur durée (2,9 s, 3 s, 3 s, 3,6 s, 3 s, 3,6 s :
   'loop' de data/services/motion-design.php). */
.mo-tl-clips { display: flex; gap: 2px; background: none; }
.mo-tl-clips b {
  flex: 29; min-width: 0; display: flex; align-items: center; padding: 0 6px; overflow: hidden;
  border: 1px solid rgba(247,147,29,.3); border-radius: 5px; background: rgba(247,147,29,.14);
  font-size: 10px; font-weight: 700; color: #e9c79a; white-space: nowrap; transition: background .2s, color .2s;
}
.mo-tl-clips b:nth-child(2), .mo-tl-clips b:nth-child(3), .mo-tl-clips b:nth-child(5) { flex: 30; }
.mo-tl-clips b:nth-child(4), .mo-tl-clips b:nth-child(6) { flex: 36; }
.mo-tl-clips b.is-on { border-color: transparent; background: var(--og); color: var(--ink); }
.mo-tl-keys i { position: absolute; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 1px; background: var(--o); transform: rotate(45deg); }
.mo-tl-keys i:nth-child(1) { left: 4%; }
.mo-tl-keys i:nth-child(2) { left: 12%; }
.mo-tl-keys i:nth-child(3) { left: 19%; }
.mo-tl-keys i:nth-child(4) { left: 31%; }
.mo-tl-keys i:nth-child(5) { left: 43%; }
.mo-tl-keys i:nth-child(6) { left: 50%; }
.mo-tl-keys i:nth-child(7) { left: 62%; }
.mo-tl-keys i:nth-child(8) { left: 73%; }
.mo-tl-keys i:nth-child(9) { left: 84%; }
.mo-tl-keys i:nth-child(10) { left: 94%; }
.mo-tl-wave svg { display: block; width: 100%; height: 100%; }
.mo-tl-wave path { stroke: #6f6f6f; stroke-width: 1.2; stroke-linecap: round; }
/* Tête de lecture : position posée par motion.js (--p de 0 à 1), décalée de la colonne des icônes. */
.mo-tl-head {
  position: absolute; top: -4px; bottom: -4px; left: calc(30px + (100% - 30px) * var(--p, 0));
  width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 10px rgba(255,255,255,.6); pointer-events: none;
}
.mo-tl-head::before { content: ''; position: absolute; top: -5px; left: -4px; width: 10px; height: 8px; background: #fff; clip-path: polygon(0 0, 100% 0, 50% 100%); }

/* ── Plateformes ───────────────────────────────────────────── */
.mo-platforms-list { flex-grow: 1; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 26px; font-size: 14px; font-weight: 700; color: #8f8f8f; }
.mo-platforms-list li { display: inline-flex; align-items: center; gap: 8px; }
.mo-platforms-list i { font-size: 22px; color: #707070; }

/* ── Usages ────────────────────────────────────────────────── */
.mo-uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mo-use { padding: 28px; }
.mo-use h3 { margin-top: 18px; font-size: 19px; letter-spacing: -.01em; }
.mo-use p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--mut); }
.mo-use-meta { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--o); }

/* ── Démonstration ─────────────────────────────────────────── */
.mo-demo { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "player head" "player list"; column-gap: 80px; row-gap: 26px; align-items: start; }
.mo-demo-head { grid-area: head; align-self: end; }
.mo-demo-list { grid-area: list; }
.mo-player { grid-area: player; position: relative; align-self: center; margin: 0; display: flex; flex-direction: column; align-items: center; }
.mo-player::before {
  content: ''; position: absolute; top: 6%; left: 50%; width: 460px; height: 560px; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(247,147,29,.2), transparent 65%); filter: blur(30px); pointer-events: none;
}
.mo-phone--lg { width: 340px; }
.mo-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  border: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.45)); cursor: pointer; transition: opacity .3s;
}
.mo-play span {
  width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--og); color: var(--ink); font-size: 34px; -webkit-text-stroke: 1.2px currentColor;
  box-shadow: 0 0 0 10px rgba(247,147,29,.18), 0 20px 40px rgba(0,0,0,.5); transition: transform .25s;
}
.mo-play:hover span { transform: scale(1.06); }
.mo-player.is-playing .mo-play { opacity: 0; pointer-events: none; }
.mo-player.is-playing video { cursor: pointer; }
.mo-controls {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: 340px; margin-top: 18px;
  padding: 8px 14px 8px 8px; border: 1px solid var(--line2); border-radius: 999px; background: rgba(16,16,16,.92);
}
.mo-ctl {
  flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: #1d1d1d; color: var(--txt); font-size: 17px; -webkit-text-stroke: .4px currentColor; cursor: pointer; transition: background .2s, color .2s;
}
.mo-ctl:hover { background: var(--od); color: var(--o); }
.mo-seek { flex-grow: 1; min-width: 0; accent-color: var(--o); cursor: pointer; }
.mo-clock { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--mut); font-variant-numeric: tabular-nums; }

/* Chapitres : deux colonnes lues de haut en bas ; un filet orange avance dans le chapitre en cours. */
.mo-chapters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 6px 12px; }
.mo-chapters button {
  position: relative; width: 100%; display: flex; align-items: center; gap: 14px; padding: 8px 12px 8px 8px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.015); text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.mo-chapters button:hover { border-color: var(--line2); background: rgba(255,255,255,.035); }
.mo-chapters button::after { content: ''; position: absolute; left: 0; bottom: 0; width: calc(var(--p, 0) * 100%); height: 2px; background: var(--og); }
.mo-chapters button.is-on { border-color: var(--ol); background: rgba(247,147,29,.07); }
.mo-chapters img { flex-shrink: 0; width: 36px; height: 64px; border: 1px solid var(--line2); border-radius: 7px; object-fit: cover; }
.mo-chapters span { display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; line-height: 1.45; color: var(--mut); }
.mo-chapters em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--o); font-variant-numeric: tabular-nums; }
.mo-chapters strong { font-size: 15px; color: var(--txt); }
.mo-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.mo-specs div { display: flex; flex-direction: column-reverse; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.mo-specs dt { font-size: 12px; color: var(--mut); }
.mo-specs dd { font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; color: var(--o); }

/* ── Différences ───────────────────────────────────────────── */
.mo-whys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mo-whys li { display: flex; flex-direction: column; gap: 6px; padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--card); transition: border-color .25s, transform .25s; }
.mo-whys li:hover { border-color: var(--ol); transform: translateY(-3px); }
.mo-whys strong { margin-top: 12px; font-size: 18px; }
.mo-whys li > span:last-child { font-size: 14px; line-height: 1.65; color: var(--mut); }

/* ── Formats ───────────────────────────────────────────────── */
/* Schéma : le même logo, le même titre et le même bouton, replacés dans chaque format. Les tailles
   suivent la hauteur du cadre (unités cqh), pour que le schéma reste juste à toutes les tailles. */
.mo-formats { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 28px 36px; }
.mo-format { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.mo-format figcaption { display: flex; flex-direction: column; align-items: center; font-size: 13px; color: var(--mut); text-align: center; }
.mo-format figcaption strong { font-size: 20px; font-weight: 800; color: var(--txt); }
/* Le cadre est le conteneur de référence : ses marges et espacements sont portés par .mo-frame-in,
   sinon ses propres unités cqh se rapporteraient à l'écran et non à lui. */
.mo-frame {
  container-type: size; position: relative; height: 250px; overflow: hidden;
  border: 1px solid var(--line2); border-radius: 14px;
  background: radial-gradient(90% 70% at 50% 30%, rgba(247,147,29,.18), transparent 70%), #0d0d0d;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.9);
}
.mo-frame-in { position: absolute; inset: 0; display: grid; gap: 7cqh; padding: 11cqh 9cqh 13cqh; }
/* Barre de lecture en bas du cadre : elle avance au rythme de l'animation. */
.mo-frame::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4cqh; background: rgba(255,255,255,.06); }
.mo-frame::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 4cqh; background: var(--og); transform-origin: left; animation: moProg 4.8s linear infinite; }
.mo-frame--916 { aspect-ratio: 9 / 16; }
.mo-frame--45 { aspect-ratio: 4 / 5; }
.mo-frame--11 { aspect-ratio: 1 / 1; }
.mo-frame--169 { aspect-ratio: 16 / 9; }
.mo-frame--916 .mo-frame-in { grid-template: "logo" auto "title" 1fr "cta" auto / minmax(0, 1fr); justify-items: center; }
.mo-frame--45 .mo-frame-in { grid-template: "logo" auto "title" 1fr "cta" auto / minmax(0, 1fr); justify-items: start; }
.mo-frame--11 .mo-frame-in { grid-template: "logo ." auto "title title" 1fr ". cta" auto / minmax(0, 1fr) minmax(0, 1fr); }
.mo-frame--11 .mo-f-cta { justify-self: end; }
.mo-frame--169 .mo-frame-in { grid-template: "logo title" 1fr "logo cta" auto / auto minmax(0, 1fr); align-items: center; column-gap: 10cqh; }
.mo-frame--169 .mo-f-logo { width: 42cqh; }
.mo-f-logo { grid-area: logo; width: 24cqh; aspect-ratio: 1; border-radius: 50%; background: var(--og); box-shadow: 0 0 24px rgba(247,147,29,.45); animation: moLogo 4.8s cubic-bezier(.3,1.4,.5,1) infinite; }
.mo-f-title { grid-area: title; align-self: center; width: 100%; display: flex; flex-direction: column; gap: 4.5cqh; }
.mo-f-title i { display: block; height: 7cqh; border-radius: 99px; background: #ececec; transform-origin: left; animation: moType 4.8s cubic-bezier(.2,.7,.2,1) infinite; }
.mo-f-title i:nth-child(1) { width: 96%; }
.mo-f-title i:nth-child(2) { width: 70%; background: var(--og); animation-delay: .15s; }
.mo-f-title i:nth-child(3) { width: 46%; height: 4.5cqh; background: #4a4a4a; animation-delay: .3s; }
.mo-frame--916 .mo-f-title { align-items: center; }
.mo-frame--916 .mo-f-title i { transform-origin: center; }
.mo-f-cta { grid-area: cta; width: 48cqh; max-width: 100%; height: 12cqh; border: 1.5px solid var(--o); border-radius: 99px; background: var(--od); animation: moPop 4.8s cubic-bezier(.2,.7,.2,1) infinite; }
@keyframes moLogo { 0%, 3% { transform: scale(0); } 14%, 90% { transform: scale(1); } 97%, 100% { transform: scale(0); } }
@keyframes moType { 0%, 10% { transform: scaleX(0); } 26%, 90% { transform: scaleX(1); } 97%, 100% { transform: scaleX(0); } }
@keyframes moPop { 0%, 24% { opacity: 0; transform: translateY(40%); } 34%, 90% { opacity: 1; transform: none; } 97%, 100% { opacity: 0; transform: none; } }
@keyframes moProg { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .mo-f-logo, .mo-f-title i, .mo-f-cta, .mo-frame::after { animation: none; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .mo-demo { column-gap: 56px; }
  .mo-chapters span { font-size: 12px; }
}
@media (max-width: 1024px) {
  .mo-stage { width: 100%; max-width: 560px; justify-self: center; }
  .mo-uses, .mo-whys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-demo { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "player" "list"; row-gap: 36px; }
  .mo-demo-head { text-align: center; }
  .mo-demo-head .mq-sub { margin-left: auto; margin-right: auto; }
  .mo-frame { height: 200px; }
}
@media (max-width: 640px) {
  .mq-hero.mo-hero { padding: 18px 0 48px; }
  .mo-crumbs { margin-bottom: 28px; }
  .mo-stage { height: 560px; margin-top: 4px; }
  .mo-phone { width: 250px; border-width: 8px; border-radius: 34px; }
  /* Sur mobile, une seule pastille, centrée au bas de l'écran du téléphone (zone sombre de la vidéo). */
  .mo-chip--fps, .mo-chip--music { display: none; }
  .mo-chip--sound { top: 352px; right: auto; left: 50%; transform: translateX(-50%); font-size: 12px; padding: 7px 14px; }
  .mo-timeline { padding: 10px 10px 12px; }
  .mo-platforms-list { justify-content: center; gap: 12px 20px; font-size: 13px; }
  .mo-uses, .mo-whys { grid-template-columns: minmax(0, 1fr); }
  /* Comme les cartes de l'accueil sur mobile : icône et titre sur une ligne. */
  .mo-use { padding: 20px; }
  .mo-use h3 { flex: 1; margin-top: 0; font-size: 17px; }
  .mo-use p, .mo-use-meta { width: 100%; }
  .mo-use p { margin-top: 10px; }
  .mo-use-meta { padding-top: 12px; }
  .mo-whys li { padding: 22px 20px; }
  .mo-phone--lg { width: 290px; }
  .mo-controls { width: 100%; max-width: 340px; }
  .mo-chapters { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
  .mo-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-formats { gap: 24px 18px; }
  .mo-frame { height: 150px; }
  .mo-format figcaption { max-width: 150px; font-size: 12px; }
  .mo-format figcaption strong { font-size: 17px; }
}
