/* ============================================================
   MDJLABS — ATELIER · « Développement de compétences & spécialisation
   métiers » (PL8). Une SEULE scène (#pl-metiers), épinglée, scrubée,
   réversible. L'ENTITÉ CONTINUE = la COURBE de la compétence DANS LE
   TEMPS : elle se trace et monte pendant la formation (état 1), puis
   se dédouble au pic — déclin gris « sans entretien » vs maintien
   phosphore « avec ProLearn », relancé par rappels espacés + jalon de
   recertification (état 2), et enfin, depuis le socle consolidé, elle
   essaime en branches de spécialité + montée en expertise (état 3).
   Jamais des visuels qui se remplacent : la même courbe traverse tout.
   Réutilise la coquille .plx-* (prolearn-scroll) + le chrome d'atelier
   (.atx-* de atelier-atome.css). CE fichier = viz métiers + overlays.
   ============================================================ */

:root { --pm-grey: color-mix(in oklab, var(--fg-3) 88%, transparent); }

/* rail : marqueur réel « Métiers » ------------------------------------ */
.plx-rail button.is-here .d { background: var(--acc); border-color: var(--acc); box-shadow: 0 0 12px var(--acc-glow); }
.plx-rail button.is-here { color: var(--acc); }
.plx-rail button.is-here .t { opacity: 1; transform: none; }

/* intro : l'accent EM prend la teal produit ---------------------------- */
.atx-intro h1 em { font-style: normal; color: var(--pl); text-shadow: 0 0 48px var(--pl-glow); }

/* ============================================================
   VIZ — conteneur iso 3D, entité continue (courbe dans le temps)
   ============================================================ */
.pm-viz { position: relative; aspect-ratio: 900 / 560; max-height: 66vh; width: 100%; margin: 0 auto; perspective: 1500px; }
.pm-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  transform: rotateX(8deg) rotateZ(0deg); transform-origin: 50% 48%; will-change: transform; }
.pm-svg.alive { animation: pmdrift 15s var(--ease) infinite alternate; }
@keyframes pmdrift { from { transform: rotateX(10deg) rotateZ(-1.1deg); } to { transform: rotateX(6deg) rotateZ(1.1deg); } }

/* -- repère : axes, grille, phase de formation -- */
.pm-grid { stroke: var(--line-weak); stroke-width: 1; }
.pm-axis { stroke: var(--line-strong); stroke-width: 1.4; }
.pm-axislabel { font-family: var(--ff-mono); fill: var(--fg-3); letter-spacing: 0.14em; text-transform: uppercase; }
.pm-tick { font-family: var(--ff-mono); fill: var(--fg-3); letter-spacing: 0.04em; }
.pm-phase { stroke: var(--line-strong); stroke-width: 1.2; stroke-dasharray: 3 5; }
.pm-phaselabel { font-family: var(--ff-mono); fill: var(--fg-3); text-anchor: middle; letter-spacing: 0.12em; text-transform: uppercase; }
.pm-formzone { fill: var(--pl-soft); opacity: .5; }

/* -- courbe de développement (formation, phosphore) -- */
.pm-rise { fill: none; stroke: var(--pl); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 7px var(--pl-glow)); }
.pm-palier { fill: var(--bg-1); stroke: var(--line-strong); stroke-width: 1.6; transition: none; }
.pm-palier.on { fill: var(--pl-soft); stroke: var(--pl); filter: drop-shadow(0 0 8px var(--pl-glow)); }
.pm-lvl { font-family: var(--ff-mono); text-anchor: middle; letter-spacing: 0.08em; text-transform: uppercase; }
.pm-lvl.beg { fill: var(--fg-2); }
.pm-lvl.qual { fill: var(--pl); }
.pm-lvldot { fill: var(--pl); filter: drop-shadow(0 0 7px var(--pl-glow)); }

/* -- divergence : déclin gris vs maintien phosphore -- */
.pm-decline { fill: none; stroke: var(--pm-grey); stroke-width: 2.4; stroke-dasharray: 5 5; stroke-linecap: round; }
.pm-maintain { fill: none; stroke: var(--pl); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 7px var(--pl-glow)); }
.pm-gap { fill: var(--pl-soft); }
.pm-declabel { font-family: var(--ff-mono); fill: var(--fg-3); letter-spacing: 0.04em; }
.pm-mainlabel { font-family: var(--ff-mono); fill: var(--pl); letter-spacing: 0.04em; }

/* -- rappels espacés (pincements vers le haut) -- */
.pm-rem-pin { stroke: var(--acc); stroke-width: 1.8; stroke-linecap: round; }
.pm-rem-dot { fill: var(--acc); filter: drop-shadow(0 0 7px var(--acc-glow)); }
.pm-rem-arrow { fill: none; stroke: var(--acc); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pm-rem-t { font-family: var(--ff-mono); fill: var(--acc); text-anchor: middle; letter-spacing: 0.06em; font-feature-settings: "tnum"; }

/* -- jalon de recertification (rebond) -- */
.pm-recert { fill: var(--acc-soft); stroke: var(--acc); stroke-width: 2; filter: drop-shadow(0 0 12px var(--acc-glow)); }
.pm-recert-glyph { font-family: var(--ff-mono); fill: var(--acc); text-anchor: middle; font-weight: 600; }
.pm-recert-t { font-family: var(--ff-mono); fill: var(--acc); text-anchor: middle; letter-spacing: 0.1em; text-transform: uppercase; }
.pm-recert-pulse { transform-box: fill-box; transform-origin: center; animation: pmpulse 2.4s var(--ease) infinite; }
@keyframes pmpulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.09); } }

/* -- socle consolidé (base des spécialités) -- */
.pm-socle { fill: var(--pl-soft); stroke: var(--pl); stroke-width: 2; filter: drop-shadow(0 0 12px var(--pl-glow)); }
.pm-socle-glyph { font-family: var(--ff-mono); fill: var(--pl); text-anchor: middle; font-weight: 600; }
.pm-socle-t { font-family: var(--ff-mono); fill: var(--pl); text-anchor: middle; letter-spacing: 0.1em; text-transform: uppercase; }

/* -- branches de spécialité (éventail iso) -- */
.pm-branch { fill: none; stroke: var(--pl); stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--pl-glow)); }
.pm-spec { fill: var(--bg-1); stroke: var(--pl-line); stroke-width: 1.6; }
.pm-spec.hot { stroke: var(--pl); filter: drop-shadow(0 0 9px var(--pl-glow)); }
.pm-spec-t { font-family: var(--ff-sans); fill: var(--fg-0); font-weight: 600; letter-spacing: -0.01em; }
.pm-spec-d { font-family: var(--ff-mono); fill: var(--pl); letter-spacing: 0.1em; text-transform: uppercase; }

/* -- montée en expertise N1→N3 -- */
.pm-lad-rung { fill: var(--bg-2); stroke: var(--line-strong); stroke-width: 1.4; transition: none; }
.pm-lad-rung.on { fill: var(--pl-soft); stroke: var(--pl); filter: drop-shadow(0 0 8px var(--pl-glow)); }
.pm-lad-t { font-family: var(--ff-mono); fill: var(--fg-3); text-anchor: middle; font-weight: 600; letter-spacing: 0.04em; }
.pm-lad-t.on { fill: var(--pl); }
.pm-lad-cap { font-family: var(--ff-mono); fill: var(--fg-3); text-anchor: middle; letter-spacing: 0.1em; text-transform: uppercase; }

/* ============================================================
   OVERLAY HTML — bandeau généraliste (rotation multi-domaines)
   ============================================================ */
.pm-ex { position: absolute; left: 2%; top: 3%; z-index: 3; display: flex; align-items: center; gap: 12px; pointer-events: none; width: max-content; max-width: 92%;
  border: 1px solid var(--pl-line); border-radius: var(--r-sm); background: color-mix(in oklab, var(--bg-1) 74%, transparent); backdrop-filter: blur(6px); padding: 7px 13px; }
.pm-ex .k { font-family: var(--ff-mono); font-size: clamp(8px, .82vw, 10px); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-3); white-space: nowrap; }
.pm-ex .roll { position: relative; height: 1.4em; min-width: clamp(170px, 20vw, 240px); }
.pm-ex .roll span { position: absolute; left: 0; right: 0; top: 0; font-family: var(--ff-mono); font-size: clamp(11px, 1.15vw, 14px); font-weight: 600; letter-spacing: 0.01em; color: var(--pl); opacity: 0; transform: translateY(7px); transition: opacity .45s var(--ease), transform .45s var(--ease); white-space: nowrap; }
.pm-ex .roll span.on { opacity: 1; transform: none; }

/* ---- outro (repris de l'atelier atome, teal EM) ---- */
.atx-outro-links a.pri { color: var(--pl); border-color: var(--pl-line); background: var(--pl-soft); }
.atx-outro-links a.pri:hover { color: var(--pl); border-color: var(--pl); }

/* focus visibles */
.plx-step:focus-visible, .plx-rail button:focus-visible, .plx-link:focus-visible { outline: none; box-shadow: var(--glow-focus); border-radius: var(--r-sm); }

/* ============================================================
   RESPONSIVE — mobile : écran au-dessus, texte dessous, anim conservée
   ============================================================ */
@media (max-width: 960px) {
  .pm-viz { max-height: 42vh; }
  .plx-pin { padding: 64px 0 58px; }
  .plx-stage { gap: 16px; }
  .plx-side .plx-txts { min-height: clamp(120px, 22vh, 180px); }
  .plx-txt { font-size: clamp(17px, 4.6vw, 26px); }
  .plx-txt small { font-size: clamp(12px, 3.4vw, 14.5px); margin-top: 10px; }
  .plx-cap { display: none; }
  .pm-ex .k { display: none; }
}
@media (max-width: 960px) and (max-height: 720px) {
  .pm-viz { max-height: 36vh; }
  .plx-txt small { display: none; }
}

/* ============================================================
   REPLI — html.plx-flat / reduced-motion : courbe figée lisible,
   3 temps empilés (développer + maintenir + spécialiser tous visibles).
   ============================================================ */
html.plx-flat .pm-svg { animation: none !important; transform: none !important; position: static; width: 100%; height: clamp(320px, 78vw, 470px); }
html.plx-flat .pm-recert-pulse { animation: none !important; }
html.plx-flat .pm-viz { aspect-ratio: auto; max-height: none; height: auto; margin-bottom: 22px; display: flex; flex-direction: column; }
html.plx-flat .pm-ex { position: static; width: 100%; box-sizing: border-box; margin-top: 10px; justify-content: center; }
html.plx-flat .plx-txt small { color: var(--fg-1); }
html.plx-flat .atx-intro { min-height: auto; }

@media (prefers-reduced-motion: reduce) {
  .pm-svg, .pm-recert-pulse, .atx-tag i, .atx-cue .dsc svg { animation: none !important; }
}
