/* Le problème : texte révélé mot à mot (JS) + animation « éparpillé puis rassemblé » pilotée par --progression (0 à 1, posée par JS).
 * Sans JS ou en mouvement réduit : texte lisible d'emblée et état rassemblé fixe. */
.probleme { padding-block: 72px; border-block: 1px solid var(--trait); background: var(--surface); }
.probleme-grille { display: grid; gap: 48px; align-items: center; }
.probleme-texte { max-width: 34ch; font-size: clamp(1.25rem, 1.6vw + 0.6rem, 1.75rem); font-weight: 500; line-height: 1.45; letter-spacing: -0.01em; text-wrap: pretty; }
.mots-marque { color: var(--marque-texte); }
.js .mot { color: var(--texte-pale); transition: color 280ms ease-out; }
.js .mot.est-lu { color: var(--texte); }
.js .mots-marque .mot.est-lu { color: var(--marque-texte); }
@media (min-width: 1024px) { .probleme { padding-block: 112px; } .probleme-grille { grid-template-columns: 5fr 7fr; gap: 64px; } }

/* Scène en unités em (60 x 40) : tout se met à l'échelle avec la largeur de la colonne. */
.pb-visuel { --progression: 1; --e: clamp(0, calc((var(--progression) - 0.15) / 0.6), 1); --f: clamp(0, calc((var(--progression) - 0.65) / 0.2), 1); --w: clamp(0, calc((var(--progression) - 0.3) / 0.35), 1); container-type: inline-size; overflow: clip; }
.pb-scene { position: relative; width: 60em; height: 40em; margin-inline: auto; font-size: min(calc(100cqw / 60), 12px); line-height: 1.3; color: var(--texte); }
.pb-fils { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--texte-attenue); stroke-width: 0.18; stroke-dasharray: 0.5 0.7; stroke-linecap: round; opacity: calc(1 - var(--e) * 2); }
.pb-fils .pb-croix { stroke: var(--danger-point); stroke-dasharray: none; stroke-width: 0.25; }
.pb-etiquettes { position: absolute; left: 50%; top: 1.2em; translate: -50% 0; display: grid; z-index: 3; }
.pb-etiquette { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 0.6em; padding: 0.5em 1.1em; border-radius: 99px; font-size: 1.15em; font-weight: 600; white-space: nowrap; }
.pb-etiquette svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pb-e1 { background: var(--warn-fond); color: var(--warn-texte); opacity: calc(1 - var(--f)); }
.pb-e2 { background: var(--ok-fond); color: var(--ok-texte); opacity: var(--f); }
.pb-fenetre { position: absolute; left: 3.5em; top: 7em; width: 53em; height: 25.5em; border: 1px solid var(--trait); border-radius: 1.2em; background: var(--surface); box-shadow: var(--ombre); overflow: hidden; opacity: var(--w); scale: calc(0.94 + 0.06 * var(--w)); z-index: 1; }
.pb-barre { display: flex; align-items: center; gap: 0.6em; height: 3em; padding-inline: 1.4em; border-bottom: 1px solid var(--trait); background: var(--surface-2); }
.pb-barre i { width: 0.9em; height: 0.9em; border-radius: 50%; background: var(--neutre-point); }
.pb-projet { display: flex; align-items: center; gap: 0.8em; margin: 2em 0 0 2.5em; font-size: 1.25em; font-weight: 700; }
.pb-projet svg { width: 1.6em; height: 1.6em; }
.pb-tuiles { position: absolute; left: 6em; top: 15.5em; display: grid; grid-template-columns: repeat(3, 15em); gap: 1.5em; z-index: 2; }
.pb-frag { position: relative; width: 15em; height: 14em; border: 1px solid var(--trait); border-radius: 1em; background: var(--surface); box-shadow: var(--ombre-douce); translate: calc((1 - var(--e)) * var(--dx)) calc((1 - var(--e)) * var(--dy)); rotate: calc((1 - var(--e)) * var(--rot)); scale: calc(1 + (1 - var(--e)) * var(--gr)); }
.pb-f1 { --dx: -2.5em; --dy: -11.5em; --rot: -7deg; --gr: 0.05; }
.pb-f2 { --dx: -2em; --dy: 6.5em; --rot: 3deg; --gr: 0.3; }
.pb-f3 { --dx: 3.5em; --dy: -10.5em; --rot: 5deg; --gr: 0.05; }
.pb-fa, .pb-fb { position: absolute; inset: 0; padding: 1.4em; border-radius: inherit; }
.pb-fa { opacity: calc(1 - var(--f)); }
.pb-fb { opacity: var(--f); display: flex; flex-direction: column; align-items: flex-start; gap: 0.5em; }
.pb-fa .pastille, .pb-fb .pastille { font-size: 1em; }
.pb-lib { opacity: calc(1 - var(--e) * 1.6); position: absolute; left: 0.2em; top: -2.2em; font-size: 0.95em; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-attenue); white-space: nowrap; }
.pb-ref { font-size: 0.95em; font-weight: 600; color: var(--texte-attenue); }
.pb-titre { margin: 0.4em 0 0.9em; font-size: 1.25em; font-weight: 700; line-height: 1.25; }
.pb-barres { display: grid; gap: 0.5em; margin-top: 1.4em; }
.pb-barres i, .pb-lignes i { display: block; height: 0.6em; border-radius: 99px; background: var(--surface-2); }
.pb-barres i:last-child { width: 60%; }
.pb-oeil { font-size: 0.95em; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texte-attenue); }
.pb-valeur { margin-top: 0.4em; font-size: 2em; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.pb-legende { font-size: 1.05em; color: var(--texte-attenue); }
.pb-jauge { display: block; width: 100%; height: 0.9em; margin-top: 0.8em; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pb-jauge span { display: block; width: 72%; height: 100%; border-radius: inherit; background: var(--marque); }
.pb-tableur { padding: 0.6em; font-size: 0.64em; letter-spacing: -0.02em; }
.pb-formule { display: flex; gap: 0.8em; margin-bottom: 0.5em; padding: 0.4em 0.7em; border: 1px solid var(--trait); border-radius: 0.5em; font-size: 1em; color: var(--texte-attenue); }
.pb-formule b { color: var(--texte); font-weight: 700; }
.pb-grille { display: grid; grid-template-columns: 1.4em 1fr 1.2fr 1.2fr 1.25fr; border-top: 1px solid var(--trait); border-left: 1px solid var(--trait); }
.pb-grille span { display: flex; align-items: center; min-height: 3.2em; padding-inline: 0.35em; border-right: 1px solid var(--trait); border-bottom: 1px solid var(--trait); white-space: nowrap; overflow: hidden; }
.pb-grille .pb-t { justify-content: center; padding: 0; background: var(--surface-2); color: var(--texte-attenue); font-weight: 600; }
.pb-grille .pb-err { gap: 0.3em; padding-inline: 0.3em; background: var(--danger-fond); color: var(--danger-texte); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--danger-point); }
.pb-err svg { flex: none; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pb-doc .pb-titre { margin-bottom: 1em; }
.pb-lignes { display: grid; gap: 0.7em; margin-bottom: 1.2em; }
.pb-lignes i:nth-child(2n) { width: 85%; } .pb-lignes i:last-child { width: 45%; }
.pb-vieux { position: absolute; left: 1.4em; right: 1.4em; bottom: 1.2em; white-space: normal; font-size: 0.95em; line-height: 1.3; }
html:not(.js) :is(.pb-fa, .pb-lib, .pb-e1, .pb-fils) { display: none; }
@media (prefers-reduced-motion: reduce) { .pb-visuel { --progression: 1 !important; } :is(.pb-fa, .pb-lib, .pb-e1, .pb-fils) { display: none; } .js .mot { transition: none; } }
