/* Improviser · LAB ---------------------------------------------------------
   Le module garde l'interface en retrait : palette, défi, temps, puis écoute.
   La question-réponse reste volontairement sans partition pour privilégier l'oreille. */
.lab-mode-grid-three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.lab-impro-main-fields { align-items:end; }
.lab-impro-secondary-fields { align-items:end; }
.lab-impro-ear-note { min-height:70px; padding:10px 12px; border:1px solid var(--nl-line); border-radius:var(--nl-radius-card); background:var(--nl-surface-soft); }
.lab-impro-ear-note strong,.lab-impro-ear-note small { display:block; }
.lab-impro-ear-note strong { color:var(--nl-primary); }
.lab-impro-ear-note small { margin-top:4px; color:var(--nl-text-muted); line-height:1.35; }
.lab-fields label.is-disabled { opacity:.58; }
.lab-impro-palette { display:flex; flex-wrap:wrap; gap:8px; padding:12px; border:1px solid var(--nl-line); border-radius:var(--nl-radius-card); background:var(--nl-surface-soft); }
.lab-impro-note { display:grid; place-items:center; min-width:72px; min-height:64px; padding:8px 10px; border:1px solid var(--nl-line); border-radius:13px; background:#fff; text-align:center; }
.lab-impro-note b { color:var(--nl-primary); font-size:1.1rem; }
.lab-impro-note small { margin-top:2px; color:var(--nl-text-muted); font-size:.66rem; font-weight:800; }
.lab-impro-note.is-tonic { border-color:color-mix(in srgb,var(--lab-accent) 55%,var(--nl-line)); background:var(--lab-soft); }
.lab-impro-note.is-tonic b,.lab-impro-note.is-tonic small { color:var(--lab-accent); }
.lab-impro-stage { border-top:4px solid var(--lab-accent); }
.lab-impro-challenge-head { display:flex; align-items:end; justify-content:space-between; gap:12px; }
.lab-impro-challenge-head h2 { margin-top:2px; }
.lab-impro-challenge-head button { min-height:42px; padding:0 11px; border:1px solid var(--nl-line); border-radius:var(--nl-radius-control); background:#fff; font-weight:850; }
.lab-impro-challenge { margin:12px 0 0; padding:15px 16px; border-left:4px solid var(--lab-warm); border-radius:0 var(--nl-radius-card) var(--nl-radius-card) 0; background:#fff8e8; color:#5f4a1f; font-size:clamp(1rem,2.6vw,1.17rem); font-weight:800; line-height:1.45; }
.lab-impro-now { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:14px; margin-top:12px; padding:14px 16px; border-radius:var(--nl-radius-card); background:var(--nl-surface-soft); }
.lab-impro-now strong,.lab-impro-now span { display:block; }
.lab-impro-now strong { color:var(--nl-primary); font-size:clamp(1.15rem,3vw,1.45rem); }
.lab-impro-now span { margin-top:4px; color:var(--nl-text-muted); line-height:1.35; }
.lab-impro-now time { min-width:88px; color:var(--lab-accent); font-variant-numeric:tabular-nums; font-size:clamp(1.8rem,6vw,3rem); font-weight:950; text-align:right; }
.lab-impro-dialogue-timeline { display:flex; gap:6px; margin-top:10px; overflow:auto; padding-bottom:2px; }
.lab-impro-phase { flex:1 0 74px; min-height:48px; padding:6px 8px; border:1px solid var(--nl-line); border-radius:10px; background:#fff; text-align:center; }
.lab-impro-phase b,.lab-impro-phase small { display:block; }
.lab-impro-phase small { color:var(--nl-text-muted); font-size:.66rem; }
.lab-impro-phase.is-done { background:var(--lab-soft); color:var(--lab-accent); }
.lab-impro-phase.is-current { border-color:#c69a39; background:#fae7b8; color:#5d4518; transform:translateY(-1px); }
.lab-impro-actions .is-running { border-color:var(--nl-color-danger)!important; background:var(--nl-color-danger)!important; color:#fff!important; }
.lab-impro-utility-actions button.is-active { border-color:var(--lab-accent); background:var(--lab-soft); color:var(--lab-accent); }
.lab-impro-analysis-note { min-height:18px; margin:7px 0 0; color:var(--nl-text-muted); font-size:.72rem; line-height:1.35; text-align:center; }
.lab-impro-reflection { margin-top:10px; padding:12px 13px; border:1px solid var(--nl-line); border-radius:var(--nl-radius-card); background:var(--lab-soft); }
.lab-impro-reflection h3 { margin:0; color:var(--lab-accent); }
.lab-impro-reflection p { margin:5px 0 0; line-height:1.4; }
.lab-impro-source-note code { font-size:.76rem; }

/* Le mode discret ne prétend pas « éteindre » l'écran : il retire seulement
   les réglages et repères qui ne servent plus pendant le jeu. */
body.lab-impro-focus .lab-activity-head,
body.lab-impro-focus .lab-setup-card,
body.lab-impro-focus .lab-impro-reference,
body.lab-impro-focus .lab-impro-source-note { display:none; }
body.lab-impro-focus .lab-shell-wide { width:min(820px,calc(100vw - 28px)); padding-top:16px; }
body.lab-impro-focus .lab-impro-stage { margin-top:4vh; }
body.lab-impro-focus .lab-impro-challenge { font-size:clamp(1.05rem,3vw,1.3rem); }
body.lab-impro-focus.lab-impro-running .lab-impro-stage { min-height:min(560px,78vh); display:flex; flex-direction:column; justify-content:center; }
body.lab-impro-focus.lab-impro-running .lab-impro-challenge-head { justify-content:center; text-align:center; }
body.lab-impro-focus.lab-impro-running .lab-impro-challenge-head button { display:none; }
body.lab-impro-focus.lab-impro-running .lab-impro-challenge { text-align:center; }
body.lab-impro-focus.lab-impro-running .lab-impro-now { margin-top:18px; }

@media (max-width:800px) {
  .lab-mode-grid-three { grid-template-columns:1fr; }
  .lab-impro-main-fields { grid-template-columns:1fr 1fr; }
}
@media (max-width:520px) {
  .lab-impro-main-fields { grid-template-columns:1fr; }
  .lab-impro-challenge-head { align-items:stretch; flex-direction:column; }
  .lab-impro-challenge-head button { width:100%; }
  .lab-impro-now { grid-template-columns:1fr auto; padding:11px 12px; }
  .lab-impro-now span { font-size:.78rem; }
  .lab-impro-note { flex:1 1 64px; min-width:58px; }
}
@media (orientation:landscape) and (max-height:620px) and (min-width:681px) {
  .lab-impro-page .lab-setup-card { display:block; }
  .lab-impro-page .lab-mode-grid-three { grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:8px; }
  .lab-impro-page .lab-mode { min-height:54px; }
  .lab-impro-page .lab-mode small { display:none; }
  .lab-impro-page .lab-impro-main-fields { grid-template-columns:1.25fr repeat(3,minmax(110px,.75fr)); margin-top:8px; }
  .lab-impro-page .lab-impro-secondary-fields { display:none; }
  .lab-impro-reference { display:grid; grid-template-columns:minmax(0,1fr) minmax(330px,.7fr); gap:8px 12px; align-items:center; }
  .lab-impro-reference .lab-score-head { grid-column:1/-1; }
  .lab-impro-reference .lab-listen-row { margin-top:0; }
  .lab-impro-stage { padding:10px; }
  .lab-impro-challenge { margin-top:7px; padding:9px 11px; }
  .lab-impro-now { min-height:62px; margin-top:7px; padding:8px 11px; }
  .lab-impro-now time { font-size:1.9rem; }
  .lab-impro-actions,.lab-impro-utility-actions { margin-top:6px; }
}

/* Improviser · LAB v2 ------------------------------------------------------
   Refonte visuelle : moins de texte, moins de boutons dominants,
   cadre lisible d'un coup d'œil et retour direct dans un grand rectangle. */
.lab-impro-setup { display:grid; gap:12px; }
.lab-impro-top { display:grid; gap:10px; }
.lab-impro-top .lab-kicker { display:block; margin-bottom:2px; }
.lab-impro-top h2 { margin:0; }
.lab-impro-setup .lab-mode-grid-three { margin-top:2px; }
.lab-impro-setup .lab-mode { min-height:56px; }
.lab-impro-setup .lab-mode small { display:none; }
.lab-impro-secondary-fields { align-items:end; }
.lab-impro-mini-actions { display:flex; flex-wrap:wrap; gap:8px; }
.lab-impro-mini-actions button { flex:1 1 96px; min-height:44px; padding:0 10px; border:1px solid var(--nl-line); border-radius:var(--nl-radius-control); background:#fff; font-weight:850; }
.lab-impro-stage { border-top:4px solid var(--lab-accent); }
.lab-impro-stage-head { display:grid; gap:10px; align-items:start; }
.lab-impro-stage-head h2 { margin:2px 0 0; }
.lab-impro-summary { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border:1px solid var(--nl-line); border-radius:var(--nl-radius-card); background:var(--nl-surface-soft); }
.lab-impro-summary-main { display:grid; gap:2px; }
.lab-impro-summary-main strong { color:var(--nl-primary); font-size:1.08rem; }
.lab-impro-summary-main small { color:var(--nl-text-muted); }
.lab-impro-summary button { min-height:42px; padding:0 12px; border:1px solid var(--nl-line); border-radius:var(--nl-radius-control); background:#fff; font-weight:850; }
.lab-impro-challenge { margin:10px 0 0; padding:12px 14px; border-radius:var(--nl-radius-card); background:#fff8e8; border-left:4px solid var(--lab-warm); color:#5f4a1f; font-size:1rem; font-weight:850; line-height:1.4; }
.lab-impro-progress { position:relative; overflow:hidden; margin-top:12px; height:10px; border-radius:999px; background:var(--nl-surface-soft); }
.lab-impro-progress-fill { position:absolute; inset:0 auto 0 0; width:0%; border-radius:inherit; background:linear-gradient(90deg,var(--lab-accent),#efcb75); transition:width .16s linear; }
.lab-impro-live-panel { margin-top:12px; display:grid; gap:12px; }
.lab-impro-feedback { position:relative; overflow:hidden; min-height:270px; border-radius:22px; border:1px solid color-mix(in srgb,var(--lab-accent) 28%, var(--nl-line)); background:linear-gradient(180deg,#fff, #fcf8ef 100%); }
.lab-impro-feedback-fill { position:absolute; left:0; right:0; bottom:0; height:50%; background:linear-gradient(180deg,rgba(230,188,80,.18),rgba(214,154,33,.75)); transition:height .1s linear; }
.lab-impro-feedback-overlay { position:relative; z-index:1; min-height:270px; padding:18px; display:flex; flex-direction:column; justify-content:space-between; gap:12px; }
.lab-impro-feedback-state { display:inline-flex; width:max-content; max-width:100%; align-items:center; min-height:34px; padding:0 12px; border-radius:999px; background:#fff; border:1px solid var(--nl-line); color:var(--lab-accent); font-size:.8rem; font-weight:900; text-transform:uppercase; letter-spacing:.04em; }
.lab-impro-feedback-overlay strong { display:block; font-size:clamp(1.45rem,4vw,2rem); line-height:1.1; color:var(--nl-primary); }
.lab-impro-feedback-overlay > span:not(.lab-impro-feedback-state) { color:var(--nl-text-muted); line-height:1.35; }
.lab-impro-feedback-foot { display:flex; align-items:end; justify-content:space-between; gap:12px; }
.lab-impro-feedback-foot span { max-width:420px; color:var(--nl-text-muted); font-size:.85rem; line-height:1.35; }
.lab-impro-feedback-foot time { min-width:90px; text-align:right; color:var(--lab-accent); font-variant-numeric:tabular-nums; font-size:clamp(1.8rem,6vw,3rem); font-weight:950; }
.lab-impro-reference-strip { display:grid; gap:10px; }
.lab-impro-palette { display:flex; flex-wrap:wrap; gap:8px; padding:0; border:none; background:none; }
.lab-impro-note { display:grid; place-items:center; min-width:72px; min-height:66px; padding:8px 10px; border:1px solid var(--nl-line); border-radius:14px; background:#fff; text-align:center; transition:transform .12s ease,border-color .12s ease,background .12s ease,box-shadow .12s ease; }
.lab-impro-note b { color:var(--nl-primary); font-size:1.08rem; }
.lab-impro-note small { margin-top:2px; color:var(--nl-text-muted); font-size:.66rem; font-weight:850; }
.lab-impro-note.is-tonic { border-color:color-mix(in srgb,var(--lab-accent) 55%,var(--nl-line)); background:var(--lab-soft); }
.lab-impro-note.is-tonic b,.lab-impro-note.is-tonic small { color:var(--lab-accent); }
.lab-impro-note.is-hit { border-color:var(--lab-accent); background:#faecd0; box-shadow:0 0 0 2px rgba(214,154,33,.16); transform:translateY(-1px); }
.lab-impro-note.lab-impro-note-outside { opacity:.78; }
.lab-impro-note.lab-impro-note-outside.is-hit { border-color:#cf5f53; background:#fde6e2; color:#842a21; }
.lab-impro-note.lab-impro-note-outside.is-hit b,.lab-impro-note.lab-impro-note-outside.is-hit small { color:#842a21; }
.lab-impro-last-note { color:var(--nl-text-muted); font-size:.9rem; }
.lab-impro-last-note strong { color:var(--nl-primary); }
.lab-impro-dialogue-timeline { display:flex; gap:6px; overflow:auto; padding-bottom:2px; }
.lab-impro-phase { flex:1 0 72px; min-height:48px; padding:6px 8px; border:1px solid var(--nl-line); border-radius:11px; background:#fff; text-align:center; }
.lab-impro-phase b,.lab-impro-phase small { display:block; }
.lab-impro-phase small { color:var(--nl-text-muted); font-size:.66rem; }
.lab-impro-phase.is-done { background:var(--lab-soft); color:var(--lab-accent); }
.lab-impro-phase.is-current { border-color:#c69a39; background:#fae7b8; color:#5d4518; transform:translateY(-1px); }
.lab-impro-actions { margin-top:10px; }
.lab-impro-actions .is-running { border-color:var(--nl-color-danger)!important; background:var(--nl-color-danger)!important; color:#fff!important; }
.lab-impro-utility-actions { margin-top:8px; }
.lab-impro-utility-actions button.is-active { border-color:var(--lab-accent); background:var(--lab-soft); color:var(--lab-accent); }
.lab-impro-analysis-note { min-height:18px; margin:8px 0 0; color:var(--nl-text-muted); font-size:.76rem; line-height:1.35; text-align:center; }
.lab-impro-report-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:8px; }
.lab-impro-report-card { padding:14px; border:1px solid var(--nl-line); border-radius:var(--nl-radius-card); background:#fff; }
.lab-impro-report-card h3 { margin:0 0 6px; color:var(--lab-accent); font-size:1rem; }
.lab-impro-report-card p { margin:0; line-height:1.45; }
.lab-impro-tech { margin-top:10px; }
.lab-impro-sources summary { cursor:pointer; font-weight:900; color:var(--nl-primary); }
.lab-impro-sources p { margin:10px 0 0; }

body.lab-impro-focus .lab-activity-head,
body.lab-impro-focus .lab-impro-setup,
body.lab-impro-focus .lab-impro-sources,
body.lab-impro-focus #report { display:none; }
body.lab-impro-focus .lab-shell-wide { width:min(840px,calc(100vw - 26px)); padding-top:16px; }
body.lab-impro-focus.lab-impro-running .lab-impro-stage { margin-top:6vh; }
body.lab-impro-focus.lab-impro-running .lab-impro-summary,
body.lab-impro-focus.lab-impro-running .lab-impro-challenge,
body.lab-impro-focus.lab-impro-running .lab-impro-reference-strip,
body.lab-impro-focus.lab-impro-running .lab-impro-dialogue-timeline,
body.lab-impro-focus.lab-impro-running .lab-impro-analysis-note,
body.lab-impro-focus.lab-impro-running .lab-mic-status { display:none; }
body.lab-impro-focus.lab-impro-running .lab-impro-feedback { min-height:min(560px,78vh); }
body.lab-impro-focus.lab-impro-running .lab-impro-feedback-overlay { min-height:min(560px,78vh); }

@media (min-width:860px) {
  .lab-impro-setup { grid-template-columns:minmax(0,1fr); }
  .lab-impro-top { grid-template-columns:minmax(180px,.44fr) minmax(0,.56fr); align-items:end; }
  .lab-impro-stage-head { grid-template-columns:minmax(170px,.42fr) minmax(0,.58fr); }
}
@media (max-width:800px) {
  .lab-impro-main-fields { grid-template-columns:1fr 1fr; }
  .lab-impro-report-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:520px) {
  .lab-impro-main-fields,.lab-impro-secondary-fields { grid-template-columns:1fr; }
  .lab-impro-summary { align-items:stretch; }
  .lab-impro-summary button { width:100%; }
  .lab-impro-feedback { min-height:238px; }
  .lab-impro-feedback-overlay { min-height:238px; padding:14px; }
  .lab-impro-feedback-foot { align-items:flex-start; flex-direction:column; }
  .lab-impro-feedback-foot time { text-align:left; }
  .lab-impro-note { flex:1 1 62px; min-width:60px; }
  .lab-impro-report-grid { grid-template-columns:1fr; }
}
@media (orientation:landscape) and (max-height:620px) and (min-width:681px) {
  .lab-impro-page .lab-activity-head { margin-bottom:8px; }
  .lab-impro-page .lab-activity-head h1 { font-size:1.4rem; }
  .lab-impro-page .lab-activity-head p { font-size:.75rem; }
  .lab-impro-page .lab-card { padding:10px; }
  .lab-impro-page .lab-impro-feedback,
  .lab-impro-page .lab-impro-feedback-overlay { min-height:220px; }
  .lab-impro-page .lab-impro-feedback-foot time { font-size:2rem; }
  .lab-impro-page .lab-impro-report-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}

/* Improviser · LAB v3 ------------------------------------------------------
   Parcours en trois états : préparer -> jouer -> rejouer.
   Pendant le jeu, l'interface se réduit au cadre, au temps et au retour direct. */
.lab-impro-page .sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.lab-impro-intro p { margin-bottom:0; }
.lab-impro-page .lab-impro-setup { display:grid; gap:14px; }
.lab-impro-page .lab-mode-grid-three { grid-template-columns:repeat(3,minmax(0,1fr)); margin:0; }
.lab-impro-page .lab-mode { min-height:58px; padding:10px 12px; }
.lab-impro-page .lab-mode strong { font-size:1rem; }
.lab-impro-frame-row { display:grid; grid-template-columns:1.25fr .8fr 1fr; gap:10px; }
.lab-impro-frame-row label,.lab-impro-more-grid label { display:grid; gap:5px; color:var(--nl-text-muted); font-size:.78rem; font-weight:850; }
.lab-impro-frame-row select,.lab-impro-more-grid select { width:100%; min-height:44px; }
.lab-impro-frame-visual { display:grid; gap:10px; padding:12px; border:1px solid var(--nl-line); border-radius:16px; background:var(--nl-surface-soft); }
.lab-impro-frame-title { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px; }
.lab-impro-frame-title strong { color:var(--nl-primary); font-size:1.18rem; }
.lab-impro-frame-title small { color:var(--nl-text-muted); }
.lab-impro-page .lab-impro-palette { display:flex; flex-wrap:wrap; gap:8px; padding:0; border:0; background:transparent; }
.lab-impro-page .lab-impro-note { min-width:58px; min-height:50px; padding:6px 10px; border-radius:13px; }
.lab-impro-page .lab-impro-note b { font-size:1rem; }
.lab-impro-page .lab-impro-note small { display:none; }
.lab-impro-challenge-line { display:grid; grid-template-columns:minmax(0,1fr) 44px; align-items:center; gap:8px; min-height:50px; padding:9px 10px 9px 14px; border-left:4px solid var(--lab-warm); border-radius:0 14px 14px 0; background:#fff8e8; color:#5f4a1f; font-weight:850; line-height:1.35; }
.lab-impro-challenge-line button { width:44px; height:44px; border:1px solid #ead6a5; border-radius:12px; background:#fff; font-size:1.2rem; font-weight:900; }
.lab-impro-start-row { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:10px; }
.lab-impro-start-row button { min-height:52px; font-size:1rem; font-weight:900; }
.lab-impro-more { border-top:1px solid var(--nl-line); padding-top:9px; }
.lab-impro-more summary { cursor:pointer; color:var(--nl-text-muted); font-size:.82rem; font-weight:900; }
.lab-impro-more-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:10px; }
.lab-impro-secondary-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.lab-impro-secondary-actions button { min-height:42px; padding:0 11px; border:1px solid var(--nl-line); border-radius:var(--nl-radius-control); background:#fff; font-weight:800; }

/* Avant de jouer, le grand panneau d'écoute reste hors champ : un seul écran de décision. */
.lab-impro-page .lab-impro-stage { display:none; }
.lab-impro-page .lab-impro-sources { margin:10px 0 24px; color:var(--nl-text-muted); font-size:.76rem; }
.lab-impro-page .lab-impro-sources summary { cursor:pointer; font-weight:850; }
.lab-impro-page .lab-impro-sources p { margin:8px 0 0; }

/* Pendant le jeu, tout le reste disparaît automatiquement. */
body.lab-impro-running .lab-impro-intro,
body.lab-impro-running .lab-impro-setup,
body.lab-impro-running .lab-impro-sources,
body.lab-impro-running #report { display:none!important; }
body.lab-impro-running .lab-shell-wide { width:min(860px,calc(100vw - 24px)); padding-top:12px; }
body.lab-impro-running .lab-impro-stage { display:block; margin:0; padding:12px; }
body.lab-impro-running .lab-impro-stage .lab-mic-status,
body.lab-impro-running .lab-impro-stage .lab-impro-analysis-note { margin:6px 0 0; font-size:.7rem; }
.lab-impro-page .lab-impro-progress { height:12px; margin:0 0 10px; }
.lab-impro-page .lab-impro-feedback { min-height:380px; border-radius:22px; }
.lab-impro-page .lab-impro-feedback-overlay { min-height:380px; padding:18px; }
.lab-impro-feedback-center { display:grid; gap:6px; text-align:center; }
.lab-impro-feedback-center strong { font-size:clamp(2rem,7vw,3.4rem); }
.lab-impro-feedback-center span { color:var(--nl-text-muted); font-size:1rem; }
.lab-impro-page .lab-impro-feedback-foot { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:end; gap:14px; }
.lab-impro-page .lab-impro-feedback-foot > span:first-child { min-width:120px; color:var(--nl-text-muted); }
.lab-impro-page .lab-impro-feedback-foot > span:first-child strong { color:var(--nl-primary); font-size:1.1rem; }
.lab-impro-page .lab-impro-feedback-foot > span:nth-child(2) { text-align:center; }
.lab-impro-running-palette { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:10px; }
.lab-impro-running-palette .lab-impro-note { min-width:64px; min-height:48px; }
.lab-impro-running-actions { display:flex; justify-content:center; margin-top:10px; }
.lab-impro-running-actions button { min-width:min(280px,100%); min-height:50px; border:1px solid var(--nl-color-danger); border-radius:var(--nl-radius-control); background:#fff; color:var(--nl-color-danger); font-weight:900; }
.lab-impro-running-actions button:not(:disabled) { background:var(--nl-color-danger); color:#fff; }

/* Après l'essai, on ne revient pas aux réglages : d'abord écouter et rejouer. */
body.lab-impro-complete .lab-impro-intro,
body.lab-impro-complete .lab-impro-setup,
body.lab-impro-complete .lab-impro-stage,
body.lab-impro-complete .lab-impro-sources { display:none!important; }
body.lab-impro-complete #report { display:block; width:min(760px,100%); margin:18px auto; }
.lab-impro-page .lab-impro-report-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.lab-impro-report-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }
.lab-impro-report-actions button { min-height:50px; font-weight:900; }

/* Le bouton manuel subsiste dans Réglages, mais le mode jeu est déjà automatiquement épuré. */
body.lab-impro-focus:not(.lab-impro-running):not(.lab-impro-complete) .lab-impro-intro,
body.lab-impro-focus:not(.lab-impro-running):not(.lab-impro-complete) .lab-impro-sources { display:none; }

@media (max-width:680px) {
  .lab-impro-page .lab-mode-grid-three { grid-template-columns:1fr; }
  .lab-impro-page .lab-mode { min-height:48px; }
  .lab-impro-frame-row { grid-template-columns:1fr 1fr; }
  .lab-impro-frame-row label:first-child { grid-column:1/-1; }
  .lab-impro-start-row { grid-template-columns:1fr; }
  .lab-impro-more-grid { grid-template-columns:1fr 1fr; }
  .lab-impro-page .lab-impro-feedback { min-height:310px; }
  .lab-impro-page .lab-impro-feedback-overlay { min-height:310px; padding:14px; }
  .lab-impro-page .lab-impro-feedback-foot { grid-template-columns:1fr auto; }
  .lab-impro-page .lab-impro-feedback-foot > span:nth-child(2) { grid-column:1/-1; grid-row:1; text-align:left; }
  .lab-impro-page .lab-impro-report-grid { grid-template-columns:1fr; }
}
@media (max-width:420px) {
  .lab-impro-frame-row,.lab-impro-more-grid { grid-template-columns:1fr; }
  .lab-impro-frame-row label:first-child { grid-column:auto; }
  .lab-impro-frame-title { display:grid; }
  .lab-impro-page .lab-impro-note { flex:1 1 54px; min-width:52px; }
  .lab-impro-page .lab-impro-feedback-foot { grid-template-columns:1fr; }
  .lab-impro-page .lab-impro-feedback-foot time { text-align:left; }
  .lab-impro-report-actions { grid-template-columns:1fr; }
}
@media (orientation:landscape) and (max-height:620px) and (min-width:681px) {
  body.lab-impro-running .lab-shell-wide { padding-top:6px; }
  body.lab-impro-running .lab-impro-stage { padding:8px; }
  .lab-impro-page .lab-impro-feedback,
  .lab-impro-page .lab-impro-feedback-overlay { min-height:250px; }
  .lab-impro-running-palette { margin-top:6px; }
  .lab-impro-running-actions { margin-top:6px; }
}



/* Ajustements locaux de la version visible du parcours. */
/* Impro v4 : styles strictement locaux à cette page. */
.lab-impro-dialogue-rule{display:grid;gap:10px;padding:12px;border:1px solid var(--nl-line);border-radius:16px;background:#f8fbfd;}
.lab-impro-dialogue-rule[hidden]{display:none}
.lab-impro-dialogue-flow{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;}
.lab-impro-dialogue-step{display:grid;place-items:center;min-height:58px;padding:8px;border-radius:13px;border:1px solid var(--nl-line);background:#fff;text-align:center;}
.lab-impro-dialogue-step b{color:var(--nl-primary);font-size:1rem}.lab-impro-dialogue-step small{color:var(--nl-text-muted);font-weight:800}
.lab-impro-dialogue-arrow{color:var(--lab-accent);font-size:1.35rem;font-weight:950}
.lab-impro-dialogue-goals{display:flex;flex-wrap:wrap;gap:8px;color:var(--nl-text-muted);font-size:.82rem;font-weight:800;}
.lab-impro-dialogue-goals span{padding:6px 9px;border-radius:999px;background:#fff;border:1px solid var(--nl-line);}
.lab-impro-dialogue-guide{display:grid;gap:8px;margin-bottom:10px;padding:10px;border:1px solid var(--nl-line);border-radius:16px;background:var(--nl-surface-soft);}
.lab-impro-dialogue-guide[hidden]{display:none}
.lab-impro-phase-rail{display:grid;grid-template-columns:1fr 1fr;gap:8px}.lab-impro-phase-side{display:grid;place-items:center;min-height:52px;border:1px solid var(--nl-line);border-radius:12px;background:#fff;color:var(--nl-text-muted);font-weight:900;text-align:center;}
.lab-impro-phase-side.is-active{border-color:color-mix(in srgb,var(--lab-accent) 58%,var(--nl-line));background:var(--lab-soft);color:var(--lab-accent);}
.lab-impro-phase-side b{font-size:1rem}.lab-impro-phase-side small{display:block;font-size:.7rem;margin-top:2px}.lab-impro-phase-clock{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px}
.lab-impro-phase-bar{height:12px;overflow:hidden;border-radius:999px;background:#fff;border:1px solid var(--nl-line)}.lab-impro-phase-fill{height:100%;width:0;background:linear-gradient(90deg,var(--lab-accent),#efcb75);transition:width .08s linear}
.lab-impro-phase-time{min-width:64px;text-align:right;color:var(--nl-primary);font-size:1.15rem;font-weight:950;font-variant-numeric:tabular-nums}.lab-impro-dialogue-cue{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;text-align:center;color:var(--nl-text-muted);font-size:.85rem;font-weight:850}.lab-impro-dialogue-cue strong{color:var(--nl-primary)}
.lab-impro-ambiguous .lab-impro-feedback-state{color:#775a13;border-color:#d8bd71;background:#fff8df;}
.lab-impro-guidance{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:14px;padding:16px 18px;border:2px solid color-mix(in srgb,var(--lab-accent) 58%,var(--nl-line));border-left:7px solid var(--lab-accent);border-radius:18px;background:linear-gradient(135deg,var(--lab-soft),#fff 72%);box-shadow:0 5px 18px rgba(21,58,91,.08);}
.lab-impro-guidance-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:15px;background:#fff;border:1px solid color-mix(in srgb,var(--lab-accent) 45%,var(--nl-line));font-size:1.55rem;}
.lab-impro-guidance strong,.lab-impro-guidance span{display:block}.lab-impro-guidance-kicker{margin:0 0 4px!important;color:var(--lab-accent)!important;font-size:.72rem!important;font-weight:950;letter-spacing:.08em;text-transform:uppercase}.lab-impro-guidance strong{color:var(--nl-primary);font-size:1.08rem;line-height:1.25}.lab-impro-guidance div>span:last-child{margin-top:5px;color:var(--nl-text-muted);font-size:.9rem;line-height:1.45}

/* Impro v6 : parcours visible et accompagnement au premier plan. */
.lab-impro-steps{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 auto 12px;max-width:720px;}
.lab-impro-step{display:flex;align-items:center;gap:7px;min-height:40px;padding:6px 11px;border:1px solid var(--nl-line);border-radius:999px;background:#fff;color:var(--nl-text-muted);font-size:.82rem;font-weight:900;}
.lab-impro-step b{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--nl-surface-soft);color:var(--nl-text-muted);}
.lab-impro-step.is-active{border-color:color-mix(in srgb,var(--lab-accent) 58%,var(--nl-line));background:var(--lab-soft);color:var(--nl-primary);}
.lab-impro-step.is-active b{background:var(--lab-accent);color:#fff;}
.lab-impro-step.is-done{color:var(--lab-accent);}.lab-impro-step.is-done b{background:var(--lab-soft);color:var(--lab-accent);}
.lab-impro-step-arrow{color:var(--nl-text-muted);font-weight:950;}
.lab-impro-support{display:grid;gap:8px;margin:0;padding:11px 12px;border:1px solid var(--nl-line);border-radius:16px;background:#fff;}
.lab-impro-support legend{padding:0 5px;color:var(--nl-primary);font-size:.86rem;font-weight:950;}
.lab-impro-support-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.lab-impro-support-grid button{display:flex;align-items:center;justify-content:center;gap:7px;min-height:48px;padding:7px 9px;border:1px solid var(--nl-line);border-radius:12px;background:#fff;color:var(--nl-primary);font-weight:900;}
.lab-impro-support-grid button b{font-size:1.1rem}.lab-impro-support-grid button.is-active{border-color:var(--lab-accent);background:var(--lab-soft);color:var(--lab-accent);}
.lab-impro-support-hint{margin:0;color:var(--nl-text-muted);font-size:.78rem;line-height:1.35;}
.lab-impro-support-fallback{display:none!important;}
.lab-impro-report-head{text-align:center;margin-bottom:12px}.lab-impro-report-head h2{margin:3px 0 5px}.lab-impro-report-head p{max-width:620px;margin:0 auto;color:var(--nl-text-muted);line-height:1.4;}
.lab-impro-report-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
body.lab-impro-running .lab-impro-steps,body.lab-impro-complete .lab-impro-steps{display:flex!important;margin-top:4px;}
body.lab-impro-running .lab-impro-step[data-impro-step="setup"],body.lab-impro-complete .lab-impro-step[data-impro-step="setup"],body.lab-impro-complete .lab-impro-step[data-impro-step="play"]{color:var(--lab-accent);}
@media(max-width:620px){.lab-impro-step span{display:none}.lab-impro-step{padding:6px 8px}.lab-impro-support-grid{grid-template-columns:1fr 1fr}.lab-impro-report-actions{grid-template-columns:1fr!important;}}
@media(max-width:520px){.lab-impro-dialogue-flow{grid-template-columns:1fr}.lab-impro-dialogue-arrow{transform:rotate(90deg);justify-self:center}.lab-impro-dialogue-goals{display:grid}.lab-impro-guidance{grid-template-columns:1fr;gap:7px}.lab-impro-guidance-icon{width:38px;height:38px}}

