/* Tuto animé « Démarrer ma popotte » (views/tutos/demarrer.php) — complète site-v3.css (tokens .sv3).
 * Classes td-*. Thème clair (comme /tutos). Animations en transform/opacity uniquement,
 * coupées par prefers-reduced-motion (les états finaux restent visibles sans animation). */

.td-main { max-width: 1180px; margin: 0 auto; padding: 8px var(--gutter) 56px; }
.sv3 .td b { font-weight: 800; }

/* ---------- Hero ---------- */
.td-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 28px; align-items: center; padding: 14px 0 28px; }
.td-kicker { color: var(--pop-red); }
.sv3 .td-h1 { margin: 10px 0 12px; font: 800 clamp(30px, 5.2vw, 54px)/1.03 var(--display); letter-spacing: -.05em; }
.td-h1 em { font-style: normal; color: var(--pop-red); }
.sv3 .td-lead { max-width: 60ch; color: var(--muted); font-size: 17px; line-height: 1.6; font-weight: 500; }
.td-hero__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.td-progress { margin-top: 20px; max-width: 460px; }
.td-progress__bar { height: 8px; border-radius: 999px; background: var(--surface3); overflow: hidden; }
.td-progress__bar span { display: block; height: 100%; background: var(--gradient-pop); transform-origin: left; transform: scaleX(0); transition: transform .6s var(--ease); }
.sv3 .td-progress__txt { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.td-linkbtn { border: 0; background: none; padding: 0; color: var(--pop-red); font: 700 13.5px var(--body); text-decoration: underline; }

.td-hero__art { position: relative; min-height: 300px; display: flex; align-items: flex-end; justify-content: center; }
.td-hero__card { position: absolute; top: 8px; right: 8%; width: 168px; padding: 14px 14px 10px; border-radius: 24px; background: var(--surface); border: 1px solid var(--pop-bd); box-shadow: 0 30px 50px -30px rgba(215, 25, 18, .45); text-align: center; transform: rotate(5deg); animation: tdFloat 6s var(--ease) infinite; }
.td-hero__qr { width: 100%; height: auto; display: block; }
.td-hero__cap { display: block; margin-top: 6px; font: 800 11px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--pop-red); }
.td-hero__lapin { position: relative; z-index: 1; width: 120px; height: auto; margin-right: 34%; transform-origin: 50% 100%; animation: tdBob 3.6s ease-in-out infinite; }
.td-hero__bubble { position: absolute; z-index: 2; left: 6%; top: 44%; padding: 8px 14px; border-radius: 16px 16px 16px 4px; background: var(--pop-dk); color: #fff; font: 800 13px var(--body); animation: tdPop .6s var(--spring) .5s both; }

/* ---------- Sommaire ---------- */
.td-toc { margin-bottom: 26px; }
.td-toc ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.sv3 .td-toc a { display: flex; align-items: center; gap: 10px; height: 100%; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border2); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 700; line-height: 1.25; transition: border-color .2s, transform .2s var(--ease); }
.sv3 .td-toc a:hover { border-color: var(--pop-red); transform: translateY(-2px); }
.td-toc__n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface3); font: 800 12px var(--display); }
.td-toc a.is-done .td-toc__n { background: var(--pos); color: #fff; font-size: 0; }
.td-toc a.is-done .td-toc__n::before { content: '✓'; font-size: 13px; }

/* ---------- Étapes ---------- */
.td-steps { display: flex; flex-direction: column; gap: 18px; }
.td-step { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border2); border-radius: 28px; overflow: hidden; scroll-margin-top: 16px; transition: border-color .3s; }
.td-step:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); }
.td-step:nth-child(even) .td-step__art { order: 2; border-right: 0; border-left: 1px solid var(--border2); }
.td-step.is-done { border-color: rgba(22, 163, 74, .35); }
.td-step__art { background: var(--surface2); border-right: 1px solid var(--border2); padding: 22px; display: flex; align-items: center; justify-content: center; min-height: 260px; }
.td-step__body { padding: 26px 30px 24px; }
.sv3 .td-step__n { font: 800 11.5px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--pop-red); }
.sv3 .td-step__title { margin: 8px 0 8px; font: 800 clamp(20px, 2.4vw, 26px)/1.12 var(--display); letter-spacing: -.04em; }
.sv3 .td-step__lead { font-size: 16px; line-height: 1.6; font-weight: 500; }
.td-step__pts { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.td-step__pts li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15px; line-height: 1.55; font-weight: 500; }
.td-step__pts li b { color: var(--text); }
.td-step__pts li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--pop-red); opacity: .8; }
.sv3 .td-tip { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; font-weight: 600; }
.td-step__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.sv3 .td-btn-sm { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
.td-check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: 800 13.5px var(--body); }
.td-check__box { width: 20px; height: 20px; border-radius: 7px; border: 2px solid var(--faint); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.td-check[aria-pressed="true"] { border-color: var(--pos); color: var(--pos-deep); }
.td-check[aria-pressed="true"] .td-check__box { background: var(--pos); border-color: var(--pos); }
.td-check[aria-pressed="true"] .td-check__box::before { content: '✓'; color: #fff; font-size: 12px; font-weight: 900; animation: tdPop .35s var(--spring); }

/* ---------- Illustrations ---------- */
.td-ill { position: relative; width: 100%; max-width: 340px; height: 216px; }
.td-qr { display: block; width: 100%; height: auto; }
.td-ill__lapin { position: absolute; height: auto; pointer-events: none; }
.td-ill__lapin--peek { width: 96px; right: -4px; bottom: -6px; }
.td-ill__lapin--hop { width: 52px; left: 98px; bottom: 2px; }

/* 1 · imprimante */
.td-printer { position: absolute; left: 50%; top: 18px; width: 200px; height: 74px; margin-left: -100px; border-radius: 18px; background: var(--pop-dk); z-index: 2; }
.td-printer__top { position: absolute; left: 24px; right: 24px; bottom: 14px; height: 8px; border-radius: 4px; background: #000; }
.td-printer__led { position: absolute; right: 18px; top: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--pos); }
.td-sheet { position: absolute; left: 50%; top: 74px; width: 128px; margin-left: -64px; padding: 12px 12px 14px; background: #fff; border: 1px solid var(--border); border-radius: 0 0 10px 10px; box-shadow: 0 16px 30px -18px rgba(27, 16, 19, .35); z-index: 1; }
.td-sheet__l { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--pop-red); width: 70%; }
.td-sheet__l--s { width: 44%; background: var(--faint); opacity: .6; margin-top: 5px; }
.is-in .td-sheet { animation: tdPrint 3.4s var(--ease) infinite; }
.is-in .td-printer__led { animation: tdBlink 1.1s steps(2) infinite; }

/* 2 · PIN */
.td-ill--pin { display: flex; align-items: center; justify-content: center; gap: 18px; }
.td-ph { position: relative; width: 132px; height: 206px; border-radius: 26px; background: var(--pop-dk); padding: 22px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; flex: none; }
.td-ph__notch { position: absolute; top: 8px; left: 50%; width: 38px; height: 6px; margin-left: -19px; border-radius: 3px; background: #000; }
.td-lock { width: 30px; height: 33px; color: var(--pop-red2); }
.is-in .td-lock__arc { animation: tdUnlock 4s var(--ease) infinite; }
.td-dots { display: flex; gap: 8px; }
.td-dots i { width: 11px; height: 11px; border-radius: 50%; background: #fff; }
.is-in .td-dots i { animation: tdDot 4s var(--ease) infinite; }
.is-in .td-dots i:nth-child(2) { animation-delay: .25s; }
.is-in .td-dots i:nth-child(3) { animation-delay: .5s; }
.is-in .td-dots i:nth-child(4) { animation-delay: .75s; }
.td-keys { display: grid; grid-template-columns: repeat(3, 26px); gap: 6px; }
.td-keys span { height: 20px; border-radius: 7px; background: rgba(255, 255, 255, .14); }
.td-ill__tags { display: flex; flex-direction: column; gap: 8px; max-width: 150px; }
.td-tag { padding: 8px 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; font-weight: 700; line-height: 1.3; color: var(--muted); }
.td-tag--on { background: var(--pop-tint); border-color: var(--pop-bd); color: var(--pop-red-deep); }

/* 3 · mur de la salle café */
.td-wall { position: absolute; inset: 0 0 10px; border-radius: 22px; background: linear-gradient(180deg, #fff6f2, #ffe9e1); border: 1px solid var(--pop-bd); overflow: hidden; }
.td-wall__shelf { position: absolute; left: 0; right: 0; bottom: 46px; height: 10px; background: #c9a48a; }
.td-machine { position: absolute; left: 26px; bottom: 56px; width: 64px; height: 84px; border-radius: 12px 12px 6px 6px; background: var(--pop-dk); }
.td-machine::after { content: ''; position: absolute; left: 12px; right: 12px; top: 12px; height: 14px; border-radius: 4px; background: #3a2a2e; }
.td-machine__cup { position: absolute; left: 22px; bottom: 6px; width: 20px; height: 18px; border-radius: 0 0 8px 8px; background: #fff; }
.td-machine__steam { position: absolute; left: 28px; bottom: 26px; width: 6px; height: 16px; border-radius: 3px; background: rgba(255, 255, 255, .7); }
.td-machine__steam--2 { left: 36px; }
.is-in .td-machine__steam, .td-room__machine .td-machine__steam { animation: tdSteam 2.4s ease-out infinite; }
.is-in .td-machine__steam--2 { animation-delay: 1.1s; }
.td-poster { position: absolute; left: 50%; top: 16px; width: 104px; margin-left: -46px; padding: 9px 9px 7px; border-radius: 10px; background: #fff; border: 1px solid var(--pop-bd); box-shadow: 0 16px 26px -16px rgba(215, 25, 18, .5); text-align: center; transform: rotate(-3deg); }
.td-poster span { display: block; margin-top: 4px; font: 800 9.5px var(--display); color: var(--pop-red); letter-spacing: .04em; text-transform: uppercase; }
.td-poster::before { content: ''; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--pop-red); }
.is-in .td-poster { animation: tdPin .7s var(--spring) .2s both; }
.td-basket { position: absolute; right: 16px; bottom: 54px; font-size: 26px; letter-spacing: -4px; }
.is-in .td-ill__lapin--hop { animation: tdHop 1.8s ease-in-out infinite; }

/* 4 · QR dynamique */
.td-ill--flow, .td-ill--renew { display: flex; align-items: center; justify-content: center; gap: 12px; }
.td-ill--flow .td-poster, .td-ill--renew .td-poster { position: relative; left: auto; top: auto; margin: 0; flex: none; }
.td-poster--sm { width: 96px; }
.td-flow__arrow { display: flex; gap: 5px; flex: none; }
.td-flow__arrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--pop-red); opacity: .25; }
.is-in .td-flow__arrow i { animation: tdFlow 1.2s ease-in-out infinite; }
.is-in .td-flow__arrow i:nth-child(2) { animation-delay: .2s; }
.is-in .td-flow__arrow i:nth-child(3) { animation-delay: .4s; }
.td-ph--shop { padding-top: 24px; }
.td-tiles { display: grid; grid-template-columns: repeat(2, 48px); gap: 7px; }
.td-tiles span { height: 52px; border-radius: 12px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; font-size: 22px; }
.is-in .td-tiles span { animation: tdTile 5s var(--ease) infinite both; }
.is-in .td-tiles span:nth-child(2) { animation-delay: .5s; }
.is-in .td-tiles span:nth-child(3) { animation-delay: 1s; }
.is-in .td-tiles span:nth-child(4) { animation-delay: 1.5s; }
.td-ph__bar { margin-top: auto; padding: 5px 10px; border-radius: 999px; background: var(--pos); color: #fff; font: 800 10px var(--body); }

/* 5 · renouvellement */
.td-poster--old { width: 112px; }
.td-poster--new { width: 112px; transform: rotate(3deg); }
.td-x { position: absolute; inset: 18% 14%; }
.td-x::before, .td-x::after { content: ''; position: absolute; left: 50%; top: 50%; width: 110%; height: 9px; margin: -4.5px 0 0 -55%; border-radius: 5px; background: var(--pop-red); transform: rotate(45deg); }
.td-x::after { transform: rotate(-45deg); }
.td-poster--old .td-qr { opacity: .45; }
.is-in .td-x { animation: tdPop .5s var(--spring) .5s both; }
.is-in .td-poster--new { animation: tdSlide .7s var(--ease) 1s both; }

/* ---------- Bac à sable ---------- */
.td-lab { margin-top: 30px; padding: 26px; border-radius: 30px; background: var(--surface); border: 1px solid var(--border2); scroll-margin-top: 8px; }
.td-lab__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.sv3 .td-lab__title { margin: 6px 0 6px; font: 800 clamp(24px, 3vw, 32px)/1.05 var(--display); letter-spacing: -.05em; }
.sv3 .td-lab__lead { max-width: 64ch; color: var(--muted); font-weight: 500; line-height: 1.55; }
.td-lab__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.td-missions { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.td-missions li { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px 0 6px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--muted); transition: background .25s, color .25s, border-color .25s; }
.td-missions li.is-opt { border-style: dashed; }
.td-missions__b { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #fff; }
.td-missions li.is-ok { background: rgba(22, 163, 74, .1); border-color: rgba(22, 163, 74, .35); color: var(--pos-deep); }
.td-missions li.is-ok .td-missions__b { background: var(--pos); border-color: var(--pos); animation: tdPop .4s var(--spring); }

.td-autobar { position: sticky; top: 8px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; padding: 12px 14px; border-radius: 20px; background: var(--pop-dk); color: #fff; overflow: hidden; box-shadow: 0 24px 40px -26px rgba(27, 16, 19, .8); }
.td-autobar__lapin { flex: none; width: 40px; height: auto; animation: tdBob 2.4s ease-in-out infinite; }
.td-autobar__say { flex: 1 1 240px; min-width: 0; }
.td-autobar__step { font: 800 10.5px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--pop-red2); }
.sv3 .td-autobar__say p { margin-top: 2px; font-weight: 700; font-size: 15px; line-height: 1.35; min-height: 1.35em; }
.td-autobar__ctl { display: flex; flex-wrap: wrap; gap: 6px; }
.td-autobar__prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .12); }
.td-autobar__prog span { display: block; height: 100%; background: var(--pop-red2); transform-origin: left; transition: transform .5s var(--ease); }

.td-sim { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; margin-top: 16px; }
.td-sim.is-auto .td-dash, .td-sim.is-auto .td-room { cursor: default; }

/* Faux tableau de bord */
.td-dash { position: relative; display: flex; flex-direction: column; border-radius: 22px; border: 1px solid var(--border); background: var(--bg); overflow: hidden; min-height: 430px; }
.td-dash__top { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border2); }
.td-dash__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pop-red); box-shadow: 18px 0 0 var(--warn), 36px 0 0 var(--pos); margin-right: 40px; }
.td-dash__name { flex: 1; min-width: 0; font: 800 14px var(--display); letter-spacing: -.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-badge { padding: 3px 9px; border-radius: 999px; background: var(--surface3); color: var(--primary); font-size: 11.5px; font-weight: 800; }
.td-tabs { display: flex; gap: 4px; padding: 8px 10px 0; background: var(--surface); border-bottom: 1px solid var(--border2); overflow-x: auto; scrollbar-width: none; }
.td-tab { flex: none; min-height: 42px; padding: 0 14px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font: 800 13.5px var(--body); }
.td-tab[aria-selected="true"] { color: var(--pop-red); border-bottom-color: var(--pop-red); }
.td-panel { flex: 1; padding: 16px; outline: none; }
.td-panel:focus-visible { box-shadow: inset 0 0 0 3px var(--primary); }
.td-pane { animation: tdIn .35s var(--ease); }
.sv3 .td-pane__h { font: 800 17px/1.2 var(--display); letter-spacing: -.03em; margin-bottom: 10px; }
.td-form { display: flex; flex-direction: column; gap: 12px; }
.td-form--row { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.td-field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.td-grow { flex: 1 1 auto; min-width: 0; }
.td-form--row .td-grow { flex-basis: 150px; }
.td-price { width: 92px; }
.td-input { height: 44px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 700 15px var(--body); width: 100%; }
.td-input:focus { outline: none; border-color: var(--pop-red); box-shadow: var(--ring); }
.td-input--mono { font-family: var(--mono); letter-spacing: .08em; }
.td-switch { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.td-switch input { width: 20px; height: 20px; accent-color: var(--pop-red); }
.td-switch small { color: var(--muted); font-weight: 600; }
.td-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 800 14px var(--body); transition: transform .15s var(--ease), background .2s; }
.td-btn:active { transform: scale(.96); }
.td-btn:disabled { opacity: .55; cursor: progress; }
.td-btn--red { background: var(--pop-red); border-color: var(--pop-red); color: #fff; }
.td-btn--red:hover { background: var(--pop-red-deep); }
.td-btn--ghost { background: transparent; color: inherit; border-color: rgba(255, 255, 255, .25); }
.td-btn--block { width: 100%; }
.td-form .td-btn { align-self: flex-start; }
.sv3 .td-err { color: var(--pop-red-deep); font-size: 13px; font-weight: 700; margin-top: 6px; }
.sv3 .td-empty { color: var(--muted); font-size: 14px; font-weight: 600; padding: 14px 4px; }
.sv3 .td-small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.td-eyebrow { font: 800 10.5px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.td-done { text-align: center; padding: 18px 8px; }
.td-done__ok { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--gradient-credit); color: #fff; font-size: 30px; font-weight: 900; animation: tdPop .5s var(--spring); }
.sv3 .td-done p { color: var(--muted); font-weight: 600; margin-bottom: 14px; }

.td-qrpane { display: flex; flex-direction: column; gap: 14px; }
.td-qrcard { display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border2); }
.td-qrcard__img { position: relative; flex: none; width: 112px; border-radius: 12px; overflow: hidden; }
.td-qrcard__img.is-printing::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(215, 25, 18, .35)); animation: tdScanline 1.1s linear; }
.td-qrcard__meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.td-qrcard__meta strong { font: 800 20px var(--display); letter-spacing: -.04em; }
.td-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.td-pinbox { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border2); }
.td-pinbox__row { display: flex; align-items: center; gap: 12px; }
.td-pinbox__row > span { flex: 1; display: flex; flex-direction: column; font-size: 14px; }
.td-pinbox__row small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.td-pill { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface3); color: var(--muted); font: 800 13px var(--body); transition: background .2s, color .2s; }
.td-pill.is-on { background: var(--pop-red); border-color: var(--pop-red); color: #fff; }

.td-emojis { display: flex; gap: 4px; flex-wrap: wrap; flex-basis: 100%; }
.td-emoji { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); font-size: 20px; line-height: 1; transition: transform .2s var(--spring); }
.td-emoji[aria-checked="true"] { border-color: var(--pop-red); box-shadow: var(--ring); transform: scale(1.06); }
.td-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.td-list__it { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border2); font-weight: 700; font-size: 14px; }
.td-list__em { font-size: 20px; }
.td-ava { width: 32px; height: 32px; border-radius: 50%; background: var(--pop-tint); }
.td-x-btn { width: 32px; height: 32px; border-radius: 10px; border: 0; background: var(--surface3); color: var(--muted); font-size: 18px; font-weight: 700; }
.td-x-btn:hover { color: var(--pop-red); }
.td-pop { animation: tdPop .4s var(--spring); }
.td-scr__ok:not(.is-on) { display: none; }
.td-toast:not(.is-on) { opacity: 0; pointer-events: none; animation: none; }
.td-toast { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; padding: 11px 14px; border-radius: 14px; background: #fff; color: var(--text); border: 1px solid var(--border); box-shadow: 0 16px 34px -20px rgba(27, 16, 19, .55); font-size: 13.5px; font-weight: 700; animation: tdIn .3s var(--ease); }

/* Salle café */
.td-room { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px; border-radius: 22px; background: linear-gradient(180deg, #fff6f2, #ffeee8); border: 1px solid var(--pop-bd); }
.sv3 .td-room__label { align-self: flex-start; font: 800 10.5px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--pop-red); }
.td-room__wall { position: relative; width: 100%; height: 170px; display: flex; align-items: flex-start; justify-content: center; }
.td-room__wall::after { content: ''; position: absolute; left: -14px; right: -14px; bottom: 18px; height: 8px; background: #c9a48a; }
.td-room__machine { position: absolute; left: 4px; bottom: 26px; width: 54px; height: 72px; border-radius: 10px 10px 5px 5px; background: var(--pop-dk); }
.td-room__machine .td-machine__cup { left: 17px; width: 18px; height: 15px; }
.td-room__machine .td-machine__steam { left: 23px; bottom: 22px; }
.td-room__snacks { position: absolute; right: 2px; bottom: 26px; font-size: 22px; letter-spacing: -3px; }
.td-room__slot { position: relative; width: 112px; min-height: 140px; border-radius: 12px; border: 2px dashed rgba(215, 25, 18, .28); display: grid; place-items: center; }
.td-room__slot.has-poster { border-color: transparent; }
.td-room__hint { padding: 8px; font-size: 11.5px; font-weight: 700; color: var(--pop-mut); text-align: center; }
.td-room__poster { position: relative; width: 112px; padding: 8px 8px 6px; border-radius: 10px; background: #fff; border: 1px solid var(--pop-bd); text-align: center; box-shadow: 0 16px 26px -16px rgba(215, 25, 18, .5); transform: rotate(-2deg); animation: tdPin .6s var(--spring); }
.td-room__poster::before { content: ''; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--pop-red); }
.td-room__ptitle { display: block; font: 800 9px var(--display); color: var(--pop-red); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-room__pcap { display: block; margin-top: 3px; font-size: 10px; font-weight: 800; color: var(--muted); }
.td-room__stamp { position: absolute; left: 50%; top: 46%; padding: 4px 8px; border: 2px solid var(--pop-red); border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--pop-red); font: 800 11px var(--display); text-transform: uppercase; white-space: nowrap; transform: translate(-50%, -50%) rotate(-14deg); animation: tdStamp .45s var(--spring); }
.td-room__slot.is-dead .td-qr { opacity: .4; }
.td-hand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 16px; background: #fff; border: 1px solid var(--pop-bd); animation: tdIn .4s var(--ease); }
.td-hand__sheet { width: 44px; flex: none; transform: rotate(-4deg); }
.td-hand span { display: flex; flex-direction: column; font-size: 13.5px; }
.td-hand small { color: var(--muted); font-weight: 600; }
.td-hand .td-btn { flex: 1 1 100%; }

/* Téléphone simulé */
.td-phone { position: relative; width: 236px; max-width: 100%; padding: 26px 10px 12px; border-radius: 36px; background: var(--pop-dk); box-shadow: 0 30px 50px -30px rgba(27, 16, 19, .75); transition: transform .45s var(--ease); }
.td-phone__notch { position: absolute; top: 10px; left: 50%; width: 60px; height: 8px; margin-left: -30px; border-radius: 4px; background: #000; }
.td-phone.is-scanning { transform: translateY(-16px) rotate(-5deg) scale(1.02); }
.td-phone.is-scanning .td-phone__screen::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 26%; background: linear-gradient(180deg, transparent, rgba(255, 90, 60, .55)); animation: tdScanline .9s linear infinite; }
.td-phone.is-shake { animation: tdShake .45s ease; }
.td-phone__screen { position: relative; min-height: 330px; border-radius: 26px; background: var(--bg); overflow: hidden; display: flex; }
.td-scr { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 16px 12px; animation: tdIn .35s var(--ease); }
.td-scr--idle, .td-scr--bad { align-items: center; justify-content: center; text-align: center; }
.sv3 .td-scr__h { font: 800 16px/1.2 var(--display); letter-spacing: -.03em; }
.sv3 .td-scr__p { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.4; }
.td-scr__cam { width: 86px; height: 86px; border-radius: 22px; border: 3px solid var(--pop-red); position: relative; }
.td-scr__cam::before { content: ''; position: absolute; inset: 16px; border-radius: 10px; background: var(--surface3); }
.td-scr__ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--pop-red); color: #fff; font-size: 32px; font-weight: 900; animation: tdPop .45s var(--spring); }
.td-scr--pin { align-items: center; text-align: center; }
.td-pindots { display: flex; gap: 10px; margin: 4px 0; }
.td-pindots i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--pop-red); transition: background .15s; }
.td-pindots i.is-on { background: var(--pop-red); animation: tdPop .25s var(--spring); }
.td-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.td-pad__k { min-height: 42px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 800 17px var(--display); transition: transform .1s, background .1s; }
.td-pad__k:active { transform: scale(.92); background: var(--pop-red); color: #fff; }
.td-who { display: flex; flex-direction: column; gap: 6px; }
.td-who__b { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 800 14px var(--body); text-align: left; }
.td-who__b img { width: 36px; height: 36px; border-radius: 50%; background: var(--pop-tint); }
.td-shop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.td-shop__t { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 78px; padding: 8px 10px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 800 12.5px var(--body); text-align: left; }
.td-shop__t b { color: var(--pop-red); font-family: var(--display); font-size: 12px; }
.td-shop__em { font-size: 22px; }
.sv3 .td-scr__ok { padding: 8px 10px; border-radius: 12px; background: rgba(22, 163, 74, .12); color: var(--pos-deep); font-size: 12px; font-weight: 800; animation: tdIn .3s var(--ease); }
.td-scr .td-btn--ghost { color: var(--text); border-color: var(--border); margin-top: auto; }

/* Modale + curseur */
.td-modal { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px; border-radius: 22px; background: rgba(18, 8, 10, .45); }
.td-modal__card { width: min(380px, 100%); padding: 20px; border-radius: 22px; background: #fff; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6); animation: tdIn .3s var(--ease); }
.sv3 .td-modal__card p { color: var(--muted); font-weight: 600; margin-bottom: 14px; line-height: 1.5; }
.td-cursor { position: absolute; left: 0; top: 0; z-index: 9; width: 28px; height: 28px; margin: -4px 0 0 -4px; pointer-events: none; transition: transform .72s var(--ease); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.td-cursor svg { position: relative; z-index: 1; display: block; }
.td-cursor__ring { position: absolute; left: -10px; top: -10px; width: 28px; height: 28px; border-radius: 50%; background: rgba(215, 25, 18, .35); opacity: 0; transform: scale(.3); }
.td-cursor.is-click .td-cursor__ring { animation: tdRing .45s var(--ease); }

.td-lab__end { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 18px; border-radius: 20px; background: rgba(22, 163, 74, .1); border: 1px solid rgba(22, 163, 74, .3); animation: tdIn .4s var(--ease); }
.td-lab__end img { width: 80px; height: auto; flex: none; }
.sv3 .td-lab__end p { color: var(--muted); font-weight: 600; }

/* CTA */
.td-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-top: 30px; padding: 28px; border-radius: 26px; background: var(--pop-dk); color: var(--pop-cream); }
.td-cta > div:first-child { flex: 1 1 320px; }
.sv3 .td-cta h2 { font: 800 24px var(--display); letter-spacing: -.04em; margin-bottom: 6px; }
.sv3 .td-cta p { color: var(--pop-mut); }
.td-cta__btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Keyframes (transform / opacity) ---------- */
@keyframes tdIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes tdPop { 0% { opacity: 0; transform: scale(.5); } 70% { opacity: 1; transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes tdFloat { 0%, 100% { transform: rotate(5deg) translateY(0); } 50% { transform: rotate(3deg) translateY(-10px); } }
@keyframes tdBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes tdHop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-16px); } }
@keyframes tdPrint { 0% { opacity: 0; transform: translateY(-70px); } 15% { opacity: 1; } 55%, 85% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(8px); } }
@keyframes tdBlink { 0% { opacity: 1; } 100% { opacity: .2; } }
@keyframes tdDot { 0%, 8% { transform: scale(.4); opacity: .3; } 18%, 80% { transform: scale(1); opacity: 1; } 100% { transform: scale(.4); opacity: .3; } }
@keyframes tdUnlock { 0%, 30% { transform: translateY(0); } 45%, 85% { transform: translateY(-5px); } 100% { transform: translateY(0); } }
@keyframes tdSteam { 0% { opacity: 0; transform: translateY(0) scaleY(.6); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-22px) scaleY(1.2); } }
@keyframes tdPin { 0% { opacity: 0; transform: translateY(-24px) rotate(-14deg) scale(.8); } 100% { opacity: 1; transform: rotate(-3deg); } }
@keyframes tdFlow { 0%, 100% { opacity: .2; transform: translateX(0); } 50% { opacity: 1; transform: translateX(3px); } }
@keyframes tdTile { 0% { opacity: 0; transform: scale(.6); } 10%, 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.9); } }
@keyframes tdSlide { from { opacity: 0; transform: translateX(30px) rotate(10deg); } to { opacity: 1; transform: rotate(3deg); } }
@keyframes tdStamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(-14deg) scale(2); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); } }
@keyframes tdScanline { from { transform: translateY(-100%); } to { transform: translateY(400%); } }
@keyframes tdShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes tdRing { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.6); } }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .td-toc ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .td-sim { grid-template-columns: minmax(0, 1fr); }
  .td-room { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .td-room__label, .td-room__wall, .td-hand { grid-column: 1; }
  .td-phone { grid-column: 2; grid-row: 1 / span 3; }
}
@media (max-width: 820px) {
  .td-hero { grid-template-columns: minmax(0, 1fr); }
  .td-hero__art { min-height: 230px; }
  .td-step, .td-step:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .td-step:nth-child(even) .td-step__art { order: 0; border-left: 0; }
  .td-step__art { border-right: 0; border-bottom: 1px solid var(--border2); min-height: 0; }
  .td-step:nth-child(even) .td-step__art { border-bottom: 1px solid var(--border2); }
}
@media (max-width: 640px) {
  .td-toc ol { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .td-lab { padding: 18px 14px; border-radius: 24px; }
  .td-step__body { padding: 20px 18px; }
  .td-room { display: flex; }
  .td-phone { width: 100%; max-width: 280px; }
  .td-hero__card { width: 140px; right: 4%; }
  .td-hero__lapin { width: 100px; }
  .td-autobar { top: 4px; }
  .td-autobar__ctl { width: 100%; }
  .td-autobar__ctl .sv3-btn { flex: 1; justify-content: center; padding: 0 8px; }
  .td-ill { height: 200px; }
  .td-ill__tags { max-width: 128px; }
  .td-qrcard__img { width: 92px; }
  .td-tab { padding: 0 9px; font-size: 13px; }
  .td-missions { flex-wrap: nowrap; overflow-x: auto; margin-left: -14px; margin-right: -14px; padding: 0 14px 4px; scrollbar-width: none; }
  .td-missions li { flex: none; }
  .td-step__actions .sv3-btn { flex: 1 1 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .td *, .td *::before, .td *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
