/* pl-studio.css — storyboard ProLearn en lecture (animation).
   Source unique partagée : section #studio (page produit) + écran desktop du showcase.
   Fichier custom MDJLABS (hors ZIP design : ne pas écraser lors d'une màj v4). */

/* =========================================================
   PL.2 — LE STUDIO : storyboard en lecture
   ========================================================= */
.sb-frame { margin: 0; }
.sb-wrap {
  position: relative;
  container-type: inline-size;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #1E1F1F;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
.sb-wrap > img { width: 100%; display: block; }

/* La scène animée, posée sur le canvas vide de la capture */
.sb-canvas {
  position: absolute;
  left: 22.05%; top: 21.15%; width: 46.0%; height: 51.4%;
  background:
    radial-gradient(60% 80% at 50% 100%, rgba(46, 230, 200, 0.05), transparent 70%),
    #101615;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.sbc-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1cqw 1.3cqw 0;
}
.sbc-tag {
  font-family: var(--ff-mono); font-size: 0.62cqw; letter-spacing: 0.16em;
  color: rgba(46, 230, 200, 0.75);
}
.sbc-live {
  font-family: var(--ff-mono); font-size: 0.62cqw; letter-spacing: 0.1em;
  color: var(--fg-2);
  display: inline-flex; align-items: center; gap: 0.5cqw;
}
.sbc-live i {
  width: 0.4cqw; height: 0.4cqw; border-radius: 999px;
  background: var(--pl); box-shadow: 0 0 8px var(--pl);
  animation: mpulse 1.4s var(--ease) infinite;
}
.sbc-live b { color: var(--pl); font-weight: 500; }
.sb-canvas svg { flex: 1; width: 100%; min-height: 0; }

/* Groupes de la scène : fondu par phase */
.sb-canvas .ph { transition: opacity 0.7s var(--ease); }
.sb-canvas[data-phase="1"] .ph2, .sb-canvas[data-phase="1"] .ph3 { opacity: 0.10; }
.sb-canvas[data-phase="2"] .ph3 { opacity: 0.10; }
.sb-canvas[data-phase="2"] .ph1-only { opacity: 0.25; }
.sb-canvas[data-phase="3"] .ph1-only, .sb-canvas[data-phase="3"] .ph2-only { opacity: 0.18; }

/* Peau tendue : lueur en phase 2 */
.sb-canvas .skin { transition: filter 0.7s var(--ease), stroke 0.7s var(--ease); }
.sb-canvas[data-phase="2"] .skin { stroke: #2EE6C8; filter: drop-shadow(0 0 6px rgba(46, 230, 200, 0.7)); }

/* Remplissage de la fissure en phase 3 */
.sb-canvas .fissure-fill { transform: scaleY(0); transform-origin: top; transform-box: fill-box; transition: transform 2.2s var(--ease); }
.sb-canvas[data-phase="3"] .fissure-fill { transform: scaleY(1); }

/* Légendes synchronisées */
.sbc-cap { position: relative; height: 3.4cqw; margin: 0 1.3cqw 0.9cqw; }
.sbc-cap p {
  position: absolute; inset: 0; margin: 0;
  font-size: 0.86cqw; line-height: 1.45; color: var(--fg-1);
  opacity: 0; transform: translateY(0.4cqw);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  text-wrap: pretty;
}
.sbc-cap p b { color: #2EE6C8; font-weight: 500; }
.sb-canvas[data-phase="1"] .sbc-cap p[data-cap="1"],
.sb-canvas[data-phase="2"] .sbc-cap p[data-cap="2"],
.sb-canvas[data-phase="3"] .sbc-cap p[data-cap="3"] { opacity: 1; transform: none; }

/* Tête de lecture sur la timeline de la capture */
.sb-playhead {
  position: absolute;
  left: 49.8%; top: 81.2%; bottom: 0.4%;
  width: 1px;
  background: var(--pl);
  box-shadow: 0 0 6px rgba(46, 230, 200, 0.8);
  pointer-events: none;
}
.sb-playhead::before {
  content: "";
  position: absolute; top: -0.1cqw; left: -0.27cqw;
  border-left: 0.3cqw solid transparent;
  border-right: 0.3cqw solid transparent;
  border-top: 0.42cqw solid var(--pl);
}

/* Pulsation du bouton lecture de la capture */
.sb-playring {
  position: absolute; left: 50.16%; top: 78.0%;
  width: 2.4cqw; height: 2.4cqw;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 1px solid rgba(46, 230, 200, 0.8);
  pointer-events: none;
  animation: sbPing 2.4s var(--ease) infinite;
}
@keyframes sbPing {
  0%   { transform: translate(-50%, -50%) scale(0.55); opacity: 0.8; }
  70%  { transform: translate(-50%, -50%) scale(1.25); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sb-playring { animation: none; opacity: 0; }
  .sbc-cap p[data-cap="3"] { opacity: 1 !important; }
}

/* =========================================================
   SHOWCASE — storyboard animé dans l'écran desktop ([data-sb])
   (réutilise les styles ci-dessus ; remplit la frame au ratio capture)
   ========================================================= */
.dev .sb-wrap { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; background: #1E1F1F; }
.dev .sb-wrap > img { width: 100%; height: 100%; object-fit: fill; }
.dev-desktop:has(.sb-wrap) { aspect-ratio: auto; }
.dev-desktop .scr[data-sb] { aspect-ratio: 2552 / 1278; height: auto; }
