/* ——— le plan bleu ——— */
.scenario { position: relative; background: var(--plan-2); color: var(--trait); }
.scenario .colle { position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: grid; grid-template-columns: minmax(250px, 340px) 1fr; gap: 3.5vw; align-items: center; padding: 76px 4vw 3vh;
  background-color: var(--plan);
  background-image:
    radial-gradient(ellipse at 62% 45%, rgba(110,170,235,.20), transparent 65%),
    linear-gradient(rgba(255,255,255,.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.075) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: auto, 100px 100px, 100px 100px, 20px 20px, 20px 20px; }
.scenario .colle::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E"); }
.plan-txt { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; text-transform: uppercase; letter-spacing: .12em; }
.scenario .sur { font-size: 15px; font-weight: 600; color: var(--holo); margin: 0 0 10px; }
.scenario .gauche h2 { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(34px, 3.7vw, 58px); line-height: .98; letter-spacing: .02em; margin: 0 0 4vh; }
/* le rail entoure la liste : trait gris, puis fil lumineux, puis les étapes par-dessus */
.rail-etapes { position: relative; }
.rail-etapes::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: rgba(238,246,255,.25); }
.etapes { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; }
.rail-etapes .fil { position: absolute; left: 5.5px; top: 8px; width: 2px; background: var(--trait); height: 0; box-shadow: 0 0 10px var(--holo); }
.etapes li { position: relative; padding: 8px 0; color: #9fb7d3; transition: color .35s; }
.etapes li::before { content: ""; position: absolute; left: -25px; top: 14px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--plan); border: 1.5px solid rgba(238,246,255,.45); transition: background .35s, border-color .35s, box-shadow .35s; }
.etapes li.fait::before { background: var(--trait); border-color: var(--trait); }
.etapes li.actif { color: var(--trait); }
.etapes li.actif::before { background: var(--trait); border-color: var(--trait); box-shadow: 0 0 0 5px rgba(143,220,255,.2), 0 0 14px var(--holo); }
.etapes li b { display: block; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: 20px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.etapes li span { display: block; font-size: 14px; line-height: 1.35; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .45s, opacity .45s, margin .45s; }
.etapes li.actif span { max-height: 80px; opacity: 1; margin-top: 3px; color: #c4d6ea; }

.ecran { position: relative; width: min(100%, calc((100vh - 120px) * 1.333)); aspect-ratio: 4 / 3; justify-self: center;
  border: 1px solid rgba(238,246,255,.55); outline: 1px solid rgba(238,246,255,.25); outline-offset: 6px; }
.ecran svg, .ecran canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ecran svg text { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; }
.t { fill: none; stroke: var(--trait); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.t2 { fill: none; stroke: var(--trait-2); stroke-width: 1; }
.prog { fill: none; stroke: var(--holo); stroke-width: 1.3; stroke-dasharray: 7 6; }
.neuf { fill: none; stroke: #d8f4ff; stroke-width: 2.2; filter: url(#lueur); }
.led { fill: none; stroke: var(--chaud); stroke-width: 3.2; stroke-linecap: round; filter: url(#lueurChaude); }
.note text { fill: var(--trait); font-size: 15px; font-weight: 600; letter-spacing: .11em; }
.note path { fill: none; stroke: var(--trait); stroke-width: 1; }

/* messages */
.calque { position: absolute; inset: 0; opacity: 0; }
.chat { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 7% 10%; }
.chat .entete { display: flex; align-items: center; gap: 10px; color: #c4d6ea; font-size: 15px; margin-bottom: 6px; }
.chat .entete i { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--trait); display: grid; place-items: center; font-style: normal; color: var(--trait); font-weight: 700; }
.bulle { max-width: 78%; padding: 12px 16px; border-radius: 18px; font-size: clamp(14px, 1.35vw, 18px); line-height: 1.35;
  opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .4s, transform .4s; }
.bulle.on { opacity: 1; transform: none; }
.bulle.client { align-self: flex-start; background: rgba(238,246,255,.1); border: 1px solid rgba(238,246,255,.35); color: var(--trait); border-bottom-left-radius: 4px; }
.bulle.moi { align-self: flex-end; background: var(--trait); color: var(--plan-2); border-bottom-right-radius: 4px; font-weight: 500; }
.bulle.pj { display: flex; align-items: center; gap: 10px; }
.bulle.pj em { width: 44px; height: 34px; border-radius: 4px; background: #f2ecdf; display: block; }
.validation { position: absolute; right: 5%; bottom: 6%; width: min(60%, 360px); display: flex; flex-direction: column; gap: 10px; }
.tampon { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%) rotate(-8deg) scale(1.6); opacity: 0;
  border: 4px solid #6ff0b0; color: #6ff0b0; font-family: "Barlow Condensed", sans-serif; font-weight: 700; letter-spacing: .14em; font-size: clamp(30px, 4.4vw, 60px);
  padding: 2px 24px; transition: opacity .35s, transform .35s cubic-bezier(.2,1.6,.4,1); background: rgba(6,30,40,.5); }
.tampon.on { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); }

@media (max-width: 900px) {
  .scenario .colle { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 2vh; padding: 70px 16px 3vh; }
  .scenario .gauche h2 { display: none; }
  .etapes li:not(.actif) { display: none; }
  .ecran { width: 100%; }
}

/* petit écran : annotations plus grandes, une seule à la fois (voir plan-escalier.js) */
@media (max-width: 600px) {
  .note text { font-size: 30px; letter-spacing: .06em; }
  .note path { stroke-width: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .bulle { transform: none; transition: opacity .4s; }
  .tampon { transform: translate(-50%, -50%) rotate(-8deg); transition: opacity .35s; }
}
