/* Boostr v2 — Portfolio « Nos films » (cadre + défilement vertical).
   Bloc autonome : <section class="pf-root" data-films>…</section>, monté par /v2/films.js (BoostrFilms.mount).
   Dépend des tokens / classes de /v2/boostr-v2.css (.mono .display .accent .seg .btn .btn-dark .rx .rx-fill .rv .sheen .sweep).
   --pf-bg : couleur du fond derrière le bloc (voile des cartes hors cadre). Mettre var(--white) sur fond blanc. */

.pf-root { --pf-bg: var(--ground); position: relative; }
.pf-root .pf-m { display: none; }

/* ---------- Desktop / tablette ---------- */
.pf { position: relative; max-width: 780px; margin: 0 auto; padding: 56px 0 60px; overflow: hidden; }
.pf-head { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 4px 6px 0 0; }
.pf-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-title .display { margin: 0; font-size: 40px; letter-spacing: -.03em; line-height: 1; }
.pf-seg { gap: 6px; }
.pf-seg button { height: 36px; border-radius: 18px; }
.pf-seg button:focus-visible, .pf-arrows button:focus-visible, .pf-play:focus-visible, .pf-book:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.pf-stage { position: relative; height: 440px; margin-top: 14px; outline: none; touch-action: pan-x pan-y; }
.pf-root.pf-capture .pf-stage { touch-action: pan-x; }
.pf-stage:focus-visible .pf-frame { outline: 2px solid var(--blue); outline-offset: 4px; }

.pf-cards { position: absolute; left: 0; right: 0; top: -150px; bottom: -150px; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%); }
.pf-card { position: absolute; left: 64.75%; top: 50%; width: 190px; height: 338px; margin-top: -169px; border-radius: 16px; overflow: hidden; background: var(--tone-2); pointer-events: auto; cursor: pointer; will-change: transform, opacity; opacity: 0; }
.pf-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-card .sheen, .pf-card .sweep { z-index: 1; }
.pf-card .sweep { display: none; }
.pf-card .fmt { position: absolute; left: 10px; bottom: 8px; z-index: 2; font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; color: var(--white); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.pf-card .fade { position: absolute; inset: 0; z-index: 3; background: var(--pf-bg); opacity: .62; pointer-events: none; }
.pf-card iframe { position: absolute; inset: 0; z-index: 4; width: 100%; height: 100%; border: 0; background: #000; }
.pf-card.is-playing .sheen, .pf-card.is-playing .sweep, .pf-card.is-playing .fmt { display: none; }

.pf-frame { position: absolute; inset: 0; z-index: 1; border-radius: 30px; border: 2.5px solid var(--ink); overflow: hidden; pointer-events: none; transform-origin: 50% 50%; }
.pf-vlabel { position: absolute; left: 14px; top: 50%; transform: translate(-50%, -50%) rotate(-90deg) translateY(12px); font-family: var(--font-mono); font-size: 9px; letter-spacing: .16em; color: var(--muted); white-space: nowrap; }
/* Fondu des titres vers les bords par masque (et non par opacité) : les titres lisibles gardent un contraste ≥ 4,5:1 */
.pf-names { position: absolute; left: 64px; top: 0; bottom: 0; width: calc(64.75% - 110px); pointer-events: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent 2%, #000 34%, #000 66%, transparent 92%);
          mask-image: linear-gradient(to bottom, transparent 2%, #000 34%, #000 66%, transparent 92%); }
.pf-names button { position: absolute; left: 0; top: 50%; max-width: 100%; height: 30px; margin-top: -15px; padding: 0; border: 0; background: transparent; font-family: var(--font-body); font-size: 19px; text-align: left; cursor: pointer; white-space: nowrap; display: flex; align-items: center; gap: 10px; color: #5B6B82; will-change: transform, opacity; -webkit-tap-highlight-color: transparent; transition: color .2s; }
.pf-names button .lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pf-names .dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 4px; background: var(--blue); opacity: 0; transition: opacity .3s; }
.pf-names button.act { color: var(--ink); font-weight: 600; }
.pf-names button.act .dot { opacity: 1; }
.pf-names button:hover { color: var(--ink); }
.pf-names button:active { color: var(--ink); }
.pf-names button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 15px; }
.pf-meta { position: absolute; left: 64px; right: 40%; bottom: 22px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pf-play { position: absolute; left: calc(64.75% + 95px - 28px); top: 50%; width: 56px; height: 56px; margin-top: -28px; z-index: 2; border-radius: 28px; border: 1px solid rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .18); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pf-play svg { width: 18px; height: 18px; }
.pf-root.is-playing .pf-play:not(:hover):not(:focus-visible) { opacity: .6 !important; }

.pf-foot { position: relative; z-index: 2; margin-top: 30px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pf-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pf-info .mono { letter-spacing: .1em; }
.pf-book { height: 44px; padding: 0 20px; border-radius: 22px; font-size: 13px; font-weight: 500; }

/* Flèches (uniquement quand la molette / le glisser sont désactivés : opts.wheel === false) */
.pf-arrows { display: none; gap: 6px; }
.pf-root.pf-nowheel .pf-arrows { display: inline-flex; }
.pf-root.pf-nowheel [data-pf-hint] { display: none !important; }
.pf-meta, .pf-info .mono { font-variant-numeric: tabular-nums; }
.pf-arrows button { width: 44px; height: 44px; padding: 0; border-radius: 22px; border: 1px solid var(--line); background: var(--white); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ---------- Téléphone ---------- */
@media (max-width: 860px) {
  .pf-root .pf-d { display: none !important; }
  .pf-root .pf-m { display: inline; }
  .pf { max-width: 560px; padding: 0; overflow: visible; }
  .pf-head { height: 84px; box-sizing: border-box; align-items: flex-start; gap: 10px; padding: 12px 0 0 8px; }
  .pf-title .mono { font-size: 10px; }
  .pf-title .display { font-size: 32px; }
  .pf-seg { margin-top: 14px; gap: 2px; padding: 3px; border-radius: 20px; flex-shrink: 0; }
  .pf-seg button { height: 36px; padding: 0 12px; border-radius: 18px; font-size: 12px; }
  .pf-seg button::before { content: ""; position: absolute; inset: -4px 0; }
  .pf-seg button { position: relative; }

  .pf-stage { margin-top: 2px; height: 520px; height: clamp(400px, calc(100svh - 322px), 520px); }
  .pf-root.pf-capture .pf-stage { touch-action: none; }
  .pf-cards { top: 0; bottom: 0; overflow: hidden; border-radius: 28px; -webkit-mask-image: none; mask-image: none; }
  .pf-card { left: auto; right: 24px; width: 160px; height: 284px; margin-top: -142px; border-radius: 14px; }
  .pf-card .sweep { display: block; }
  .pf-card .fmt { left: 8px; font-size: 8px; text-shadow: none; }
  .pf-frame { border-radius: 28px; }
  .pf-names { left: 18px; width: calc(100% - 198px);
    -webkit-mask-image: linear-gradient(to bottom, transparent 4%, #000 32%, #000 68%, transparent 96%);
            mask-image: linear-gradient(to bottom, transparent 4%, #000 32%, #000 68%, transparent 96%); }
  .pf-names button { height: 32px; margin-top: -16px; padding: 0 6px; border-radius: 15px; font-size: 14px; gap: 6px; max-width: 100%; overflow: hidden; }
  .pf-names .dot { width: 6px; height: 6px; border-radius: 3px; }
  .pf-names button:hover { color: inherit; }
  .pf-names button.act:hover { color: var(--ink); }
  .pf-play { left: auto; right: 80px; width: 48px; height: 48px; margin-top: -24px; border-radius: 24px; }
  .pf-play svg { width: 16px; height: 16px; }

  .pf-foot { margin-top: 0; padding: 14px 0 24px; flex-direction: column; align-items: stretch; gap: 0; }
  .pf-info { justify-content: space-between; padding: 0 8px; min-height: 14px; }
  .pf-info .mono { font-size: 10px; letter-spacing: .08em; }
  .pf-root .pf-meta-m { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pf-book { margin-top: 66px; margin-top: clamp(20px, calc(100svh - 778px), 66px); width: 100%; height: 54px; border-radius: 27px; font-size: 15px; font-weight: 600; }
}
@media (max-width: 340px) {
  .pf-head { height: auto; flex-direction: column; padding-bottom: 10px; }
  .pf-seg { margin-top: 0; }
}

/* ---------- Lecteur plein écran (vidéos 16:9) ---------- */
.pf-lb { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10, 10, 10, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .3s; }
.pf-lb[hidden] { display: none; }
.pf-lb.open { opacity: 1; }
.pf-lb-box { position: relative; display: flex; flex-direction: column; gap: 12px; width: var(--w, 360px); max-width: 100%; }
.pf-lb-media { position: relative; width: 100%; aspect-ratio: var(--ar, 16 / 9); border-radius: 20px; overflow: hidden; background: var(--tone-1); }
.pf-lb-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pf-lb-t { color: var(--white); font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.pf-lb-close { position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--white); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
