/* Shared deck layout, marks and finite keyframes: held slides show the final frame. The site supplies the palette,
   type tokens and data-tone map; its own UI figures keep their styles alongside their renderers. */
.learning-workbench.deck{container-type:size;display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);padding:clamp(10px,2.6vh,28px) clamp(16px,4vw,48px);background:var(--dk-panel);color:var(--dk-ink);user-select:none;overflow:hidden;--lines:9;--title-lines:2;--leading:1.55}
/* Stacked: the figure above, the text under it. Columns that content can never widen (minmax(0,…)): a long Suivant
   label on a narrow phone wraps inside its button instead of shifting the text and footer by a pixel between slides. */
.deck-sheet{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto auto;grid-template-areas:"figure" "text" "foot";gap:clamp(8px,1.4vh,14px);min-width:0;min-height:0}
.deck-figure{grid-area:figure;position:relative;width:100%;max-width:1100px;min-height:0;align-self:stretch;justify-self:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(10px,2.4vh,24px)}
.deck-figure>.dk{display:block;width:100%;height:100%;min-height:0;overflow:visible}
/* Every box in the text column keeps the room of its longest content (two title lines, the 450-character paragraph):
   the next slide never moves what is around it. The course text is selectable. */
.deck-text{grid-area:text;display:grid;row-gap:10px;width:min(640px,100%);min-width:0;justify-self:center;align-content:center;user-select:text}
.deck-eyebrow{height:17px;margin:0;color:var(--dk-accent);font:700 12px/1.4 var(--dk-mono);letter-spacing:.06em;text-transform:uppercase}
/* 1.22, not tighter: Manrope's content area overflows a 1.15 line box by 4 px at 32 px. */
.deck .deck-title{height:calc(var(--title-lines) * 1.22em);margin:0;overflow:hidden;color:var(--dk-ink);font:760 clamp(22px,2.2cqw,32px)/1.22 var(--dk-font),sans-serif;letter-spacing:-.03em;text-wrap:balance}
.deck-copy{height:calc(var(--lines) * var(--leading) * 1em);max-width:60ch;margin:0;overflow:hidden;color:var(--dk-ink);font:500 clamp(17px,1.5cqw,20px)/var(--leading) var(--dk-font),sans-serif;text-wrap:pretty;hyphens:auto;hyphenate-limit-chars:8 4 4}
.deck-copy:focus-visible{outline:2px solid var(--dk-accent);outline-offset:4px;border-radius:2px}
.deck-foot{grid-area:foot;width:min(960px,100%);justify-self:center;margin:0}
/* Display type inside the figure: the cover's course name, a chapter card's name. */
.deck .deck-display{margin:0;color:var(--dk-ink);font:760 clamp(30px,4cqw,52px)/1.15 var(--dk-font),sans-serif;letter-spacing:-.045em;text-align:center;text-wrap:balance}
.deck-display em{font:italic 1.04em var(--dk-serif);letter-spacing:-.04em;color:var(--dk-emphasis)}
.deck-display-n{display:block;margin-bottom:.35em;color:var(--dk-accent);font:700 .36em/1 var(--dk-mono);letter-spacing:.12em}
.deck-cover{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(14px,3vh,32px);width:100%;height:100%;min-height:0}
.deck-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(14px,3vh,28px);width:100%;height:100%;min-height:0}
.deck-card .dk-card-lane{width:min(480px,70%);height:auto}
.deck-missing{margin:auto;color:var(--dk-dim);font:500 13px var(--dk-mono)}
/* The paper insert: the shared scene in a framed 16:9 panel that fills the figure's box. */
/* A scene stands on the deck's own material, like every other figure: no frame. */
.deck-insert{position:absolute;inset:0;margin:auto;aspect-ratio:16/9;max-width:100%;max-height:100%;overflow:hidden}
.deck-insert .story-scene{position:absolute;inset:0}
/* Footer: a fixed box, so the arrows never move between slides. Two square arrows, named by aria-label; never
   disabled by time, only Précédent on a chapter's first slide. */
.deck-foot{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;height:44px;min-width:0;max-width:100%}
/* .deck prefixed: the workbench's generic button rules (workbench.css, identity.css) would win on specificity. */
.deck .deck-foot button{display:inline-flex;align-items:center;justify-content:center;width:56px;min-height:40px;padding:0;border:1px solid var(--dk-rule);border-radius:7px;background:var(--dk-clear);color:var(--dk-ink);box-shadow:none;cursor:pointer;transition:background-color .18s var(--dk-ease),color .18s var(--dk-ease),border-color .18s var(--dk-ease)}
.deck .deck-foot button svg{display:block}
.deck .deck-foot button:hover:not(.deck-next){background:var(--dk-wash)}
.deck .deck-foot button:disabled{color:var(--dk-dim);cursor:default;opacity:.55}
.deck .deck-foot button:focus-visible{outline:2px solid var(--dk-accent);outline-offset:2px}
.deck .deck-foot .deck-next{background:var(--dk-accent);border-color:var(--dk-clear);color:var(--dk-button-ink);transition:filter .18s var(--dk-ease)}
.deck .deck-foot .deck-next:hover{background:var(--dk-accent);filter:brightness(1.06)}
.deck-count{text-align:center;white-space:nowrap;color:var(--dk-dim);font:500 12px/1 var(--dk-mono);font-variant-numeric:tabular-nums}
/* ---- Figure tones and marks ---- */
.dk{--dk-tone:var(--dk-primary);font-family:var(--dk-font),sans-serif}

.dk-stroke{fill:none;stroke:var(--dk-tone);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.dk-commit{fill:var(--dk-panel);stroke:var(--dk-tone);stroke-width:1.5;transform-box:fill-box;transform-origin:center}
.dk-dot{fill:var(--dk-tone);stroke:none;transform-box:fill-box;transform-origin:center}
.dk-mono{font:700 12px var(--dk-mono);fill:var(--dk-tone,var(--dk-dim))}.dk [data-tone] .dk-mono,.dk-mono[data-tone]{fill:var(--dk-tone)}
.dk-text{font:600 14px var(--dk-font),sans-serif;fill:var(--dk-ink)}.dk-text[data-tone]{fill:var(--dk-tone)}
/* ---- Motion: the keyframes run only while the slide plays, on the slide's clock (--deck-rate); paused keeps them. ---- */
.deck:is([data-deck-state=playing],[data-deck-state=paused]) .dk-stroke{opacity:0;stroke-dasharray:1 2;stroke-dashoffset:1;animation:deck-draw calc(var(--d,.6s) / var(--deck-rate,1)) cubic-bezier(.55,0,.3,1) calc(var(--t,0s) / var(--deck-rate,1)) forwards}
.deck:is([data-deck-state=playing],[data-deck-state=paused]) :is(.dk-commit,.dk-dot){transform:scale(0);animation:deck-pop calc(.3s / var(--deck-rate,1)) cubic-bezier(.3,1.7,.5,1) calc(var(--t,0s) / var(--deck-rate,1)) forwards}
.deck:is([data-deck-state=playing],[data-deck-state=paused]) .dk-fade{opacity:0;animation:deck-fade calc(var(--d,.4s) / var(--deck-rate,1)) ease-out calc(var(--t,0s) / var(--deck-rate,1)) forwards}
.deck:is([data-deck-state=playing],[data-deck-state=paused]) .dk-type{clip-path:inset(0 100% 0 0);animation:deck-type calc(var(--d,1s) / var(--deck-rate,1)) steps(var(--n,20)) calc(var(--t,0s) / var(--deck-rate,1)) forwards}
.deck:is([data-deck-state=playing],[data-deck-state=paused]) .dk-stroke.dk-end{animation-timing-function:cubic-bezier(.2,.65,.3,1)}
.deck:is([data-deck-state=playing],[data-deck-state=paused]) :is(.dk-commit,.dk-dot).dk-end{animation-timing-function:cubic-bezier(.3,1.25,.5,1)}
.deck[data-deck-state=paused] *{animation-play-state:paused!important}
@keyframes deck-draw{from{opacity:1;stroke-dashoffset:1}to{opacity:1;stroke-dashoffset:0}}
@keyframes deck-pop{to{transform:scale(1)}}
@keyframes deck-fade{from{opacity:0;translate:0 6px}to{opacity:1;translate:0 0}}
@keyframes deck-type{to{clip-path:inset(0 0 0 0)}}
/* Wide stages: the figure on the left, the text beside it, centred on the figure's height; the narrower the text
   column, the more lines its paragraph box reserves. */
@container (min-width:900px){
 .deck-sheet{--lines:12;grid-template-columns:minmax(0,11fr) minmax(0,9fr);grid-template-rows:minmax(0,1fr) auto;grid-template-areas:"figure text" "foot foot";column-gap:clamp(24px,3cqw,48px)}
 .deck-text{width:100%;justify-self:start;align-self:center}
}
@container (min-width:1080px){.deck-sheet{--lines:10}}
@container (min-width:1240px){.deck-sheet{--lines:9}}
/* Phones: twelve lines of 17 px. */
@container (max-width:600px){.deck-sheet{--lines:12}.deck-copy{font-size:17px}.deck .deck-display{font-size:26px}.deck-eyebrow{font-size:11px}}
/* The narrowest phones (320 px, a 288 px box; a 390 px phone's box is 358): the figure keeps 120 px and the paragraph
   scrolls inside seven lines; the eyebrow gives way. The scroller is native and focusable, never inside an
   aria-hidden ancestor. */
@container (max-width:330px){
 .deck-sheet{--lines:7;--leading:1.5}
 .deck-copy{font-size:16px;overflow:auto;scrollbar-width:thin}
 .deck-eyebrow{display:none}
 .deck .deck-title{font-size:19px}
 .deck .deck-display{font-size:22px}
 .deck-cover{gap:10px}
 .deck-figure{min-height:120px}
}
/* Little room (a landscape phone, a 250 % zoom): the figure gives way first and the paragraph scrolls, then the
   eyebrow; the title, the paragraph and the footer stay. */
@container (max-height:360px){
 .deck-sheet{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;grid-template-areas:"text" "foot";gap:6px}
 .deck-figure{display:none}
 .deck-text{display:flex;flex-direction:column;gap:10px;width:min(760px,100%);justify-self:center;align-self:stretch;min-height:0}
 .deck-copy{flex:1 1 0;height:auto;min-height:0;overflow:auto;scrollbar-width:thin}
 /* The buttons keep their 40 px touch height; the footer only loses its 4 px of air. */
 .deck-foot{height:40px}
}
@container (max-height:210px){.deck-eyebrow{display:none}.deck .deck-title{--title-lines:1;font-size:19px;white-space:nowrap;text-overflow:ellipsis}.deck-copy{font-size:16px}}
/* ---- recap (deck-figures.js): « À retenir », its items on a lane, a commit popping beside each ---- */
.deck-recap-box{display:grid;gap:16px;width:min(560px,100%);margin:auto}
.deck-recap-head{margin:0;color:var(--dk-accent);font:700 13px/1.4 var(--dk-mono);letter-spacing:.08em;text-transform:uppercase}
.deck-recap{position:relative;display:grid;gap:18px;margin:0;padding:0 0 0 30px;list-style:none;color:var(--dk-ink);font:600 clamp(17px,1.3cqw,21px)/1.4 var(--dk-font),sans-serif}
.deck-recap::before{content:"";position:absolute;left:calc(5.5px - 1.3px);top:.7em;bottom:.7em;width:2.6px;border-radius:2px;background:var(--dk-primary)}
.deck-recap li{position:relative}
.deck-recap li::before{content:"";position:absolute;left:-30px;top:.7em;width:11px;height:11px;margin-top:-5.5px;box-sizing:border-box;border:1.5px solid var(--dk-primary);border-radius:50%;background:var(--dk-panel)}
/* The lane draws down the items as they arrive, like every other lane of the deck. */
.deck:is([data-deck-state=playing],[data-deck-state=paused]) .deck-recap::before{transform:scale(1,0);transform-origin:top left;animation:deck-grow calc(1.4s / var(--deck-rate,1)) cubic-bezier(.55,0,.3,1) calc(.2s / var(--deck-rate,1)) forwards}
@keyframes deck-grow{to{transform:none}}
.deck:is([data-deck-state=playing],[data-deck-state=paused]) .deck-recap li::before{transform:scale(0);animation:deck-pop calc(.3s / var(--deck-rate,1)) cubic-bezier(.3,1.7,.5,1) calc(var(--t,0s) / var(--deck-rate,1)) forwards}
/* The same list in the text column, hidden while the figure holds it. */
.deck-copy-lead{margin:0}
.deck-copy-items{display:none;position:relative;gap:.45em;margin:0;padding:0 0 0 24px;list-style:none}
.deck-copy-items::before{content:"";position:absolute;left:4px;top:.78em;bottom:.78em;width:2px;border-radius:2px;background:var(--dk-primary)}
.deck-copy-items li{position:relative}
.deck-copy-items li::before{content:"";position:absolute;left:-24px;top:.78em;width:10px;height:10px;margin-top:-5px;box-sizing:border-box;border:1.5px solid var(--dk-primary);border-radius:50%;background:var(--dk-panel)}
/* Phones and short stages: no room for the list in the figure. The items take the paragraph's place in the text
   column, and the figure keeps « À retenir » over a row of commits, one per item. */
@container (max-width:600px){
 .deck-recap-box{justify-items:center;gap:22px;width:auto}
 .deck-recap{display:flex;gap:44px;width:max-content;padding:0;font-size:0}
 .deck-recap::before{left:6px;right:6px;top:50%;bottom:auto;width:auto;height:2.6px;margin-top:-1.3px}
 .deck:is([data-deck-state=playing],[data-deck-state=paused]) .deck-recap::before{transform:scale(0,1)}
 .deck-recap li::before{position:static;display:block;width:14px;height:14px;margin:0;border-width:2px}
 .deck-recap-head{font-size:14px}
}
@container (max-width:600px) or (max-height:360px){
 .deck-copy:has(.deck-copy-items) .deck-copy-lead{display:none}
 .deck-copy-items{display:grid}
}
/* ---- Story figures: timeline, terminal, people ---- */
.dk-timeline .dk-timeline-glyph{stroke-width:1.5}
/* A short figure keeps the terminal's last lines, as a terminal does: the box is clipped at the figure's height and its
   lines are bottom-anchored, so the earliest ones leave by the top. */
.deck-figure .deck-term{box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-end;flex:none;max-height:100%;min-height:0;overflow:hidden;width:min(680px,100%);margin:0;padding:14px 16px;border:1px solid var(--dk-rule);border-radius:8px;background:color-mix(in srgb,var(--dk-panel) 84%,var(--dk-shadow));color:var(--dk-ink);font:500 14px/1.5 var(--dk-mono);white-space:pre-wrap;overflow-wrap:anywhere}
.deck-term .dk-line{display:block;min-width:0}
.deck-term .dk-cmd>span{display:inline-block;max-width:100%;vertical-align:top}
.deck-term .deck-term-prompt{color:var(--dk-accent);white-space:pre}
.deck-term .dk-out{color:var(--dk-dim)}
.deck-term .dk-line[data-tone]{color:var(--dk-tone)}
@container (max-width:600px){.deck-figure .deck-term{padding:10px 8px;font-size:12px}}
@container (max-width:330px){.deck-figure .deck-term{font-size:11px}}
