/* Caféino — démo côte à côte : scène sombre, appareils réalistes, barre de pilotage en verre et mode guidé.
   Design system v2 « Torréfaction » (jetons dans base.css, thème sombre via .theme-dark sur <body>). */
html, body { height: 100%; }
body.demo {
  margin: 0; overflow: hidden; color: var(--ink); display: grid; grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(1100px 600px at 50% 118%, rgba(200, 129, 74, .20), transparent 62%),
    radial-gradient(900px 520px at 0% -10%, rgba(233, 201, 163, .07), transparent 60%),
    radial-gradient(800px 500px at 100% -10%, rgba(200, 129, 74, .07), transparent 60%),
    var(--espresso);
}
/* Grain très léger, pour une scène moins plate */
body.demo::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background: radial-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 22px 22px;
}

/* ---------- Barre de pilotage (verre flottant) ---------- */
.bar {
  position: relative; z-index: 30; display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap;
  margin: 12px 14px 0; padding: 8px 10px 8px 18px; border-radius: 24px;
  background: rgba(28, 25, 23, .62); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.home { display: inline-flex; color: var(--milk); text-decoration: none; border-radius: 8px; }
.home .logo { font-size: 16px; }
.bar h1 { font-size: 14px; font-weight: 600; letter-spacing: -.01em; font-family: var(--font); color: var(--muted); padding-left: 14px; box-shadow: inset 1px 0 0 rgba(255, 255, 255, .1); white-space: nowrap; }
.grow { flex: 1; }
.ctl { display: inline-flex; align-items: center; gap: 9px; height: 36px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; cursor: pointer; border-radius: var(--radius-pill); }
.ctl select {
  height: 34px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .07); color: var(--ink); border: 0; padding: 0 30px 0 14px; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); font-weight: 650; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23D4CAC0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.ctl select option { background: var(--moka); color: var(--ink); }
.ctl select:hover { background-color: rgba(255, 255, 255, .1); }
.ctl select:focus-visible { outline: none; box-shadow: var(--focus); }
.ctl .switch { width: 40px; height: 24px; }
.ctl .switch span { background: rgba(255, 255, 255, .14); }
.ctl .switch span::after { width: 20px; height: 20px; }
.ctl .switch input:checked + span { background: var(--copper); }
.ctl .switch input:checked + span::after { transform: translateX(16px); }
.sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .1); }
.bar .btn-sm { min-height: 36px; white-space: nowrap; }
.bar .btn-ghost { background: rgba(255, 255, 255, .07); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.bar .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.bar .btn-danger-ghost { background: rgba(239, 115, 91, .12); }
.bar .btn .short { display: none; }
.bar a.btn { text-decoration: none; }

/* ---------- Scène ---------- */
.stage { position: relative; min-height: 0; overflow: hidden; }
.pane { position: absolute; left: 0; top: 0; display: grid; grid-template-rows: 30px auto; transition: left .45s var(--ease-out), top .45s var(--ease-out), opacity .3s ease; }
.pane[hidden] { display: none; }
.pane.entering { opacity: 0; }
.pane-label { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; padding-bottom: 4px; font-size: 11px; font-weight: 650; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.pane-label b { color: var(--crema); font-weight: 650; }
.pane-label .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pane.compact .pane-label .d { display: none; }
.pane.tiny .pane-label .n, .pane.tiny .pane-label a { display: none; }
.pane-label .n { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--ink-2); font-size: 10.5px; letter-spacing: 0; font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.pane-label a { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--muted); transition: background-color var(--dur-fast), color var(--dur-fast); }
.pane-label a:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.pane-box { position: relative; transition: filter .35s ease; }
.device { position: absolute; left: 0; top: 0; transform-origin: 0 0; transition: transform .45s var(--ease-out); }

/* Reflet de vitre commun aux écrans (ne capte pas les clics) */
.device .screen { position: relative; }
.device .screen::after {
  content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none; border-radius: inherit;
  background: linear-gradient(118deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .02) 28%, rgba(255, 255, 255, 0) 42%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5);
}

/* Cadre métal (titane chaud) partagé par le téléphone et la tablette */
.phone, .tablet {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .08)),
    linear-gradient(145deg, #4A4440 0%, #1C1917 30%, #2A2522 62%, #121010 100%);
}

/* Téléphone : 390 × 844 (barre d'état 40 + page 804) dans une coque de 12 px */
.phone {
  width: 414px; height: 868px; padding: 12px; border-radius: 64px;
  box-shadow:
    0 50px 100px rgba(0, 0, 0, .6), 0 18px 36px rgba(0, 0, 0, .35),
    inset 0 0 0 1.5px rgba(255, 255, 255, .16), inset 0 0 0 4px #0A0908, inset 0 0 0 5px rgba(255, 255, 255, .05);
}
/* Boutons latéraux : volume à gauche, verrouillage à droite */
.phone::before, .phone::after { content: ''; position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #2A2522, #4A4440); }
.phone::before { left: -3px; top: 170px; height: 34px; box-shadow: 0 58px 0 #3A3430, 0 58px 0 0 #3A3430, 0 120px 0 #3A3430; }
.phone::after { right: -3px; top: 240px; height: 96px; background: linear-gradient(270deg, #2A2522, #4A4440); }
.phone .screen { width: 390px; height: 844px; border-radius: 52px; overflow: hidden; background: #F6F1EA; display: grid; grid-template-rows: 40px 1fr; }
.statusbar { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 6px 32px 0 36px; background: #0E0C0B; color: #fff; font: 650 14px/1 var(--font); letter-spacing: -.01em; }
.statusbar::after { content: ''; position: absolute; left: 50%; top: 9px; width: 108px; height: 28px; margin-left: -54px; border-radius: 16px; background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); }
.statusbar .sig { display: inline-flex; gap: 6px; align-items: center; }
.phone iframe { width: 390px; height: 804px; }

/* Tablette caisse : 1180 × 780 dans une coque de 14 px */
.tablet {
  width: 1208px; height: 808px; padding: 14px; border-radius: 34px;
  box-shadow:
    0 50px 100px rgba(0, 0, 0, .55), 0 18px 36px rgba(0, 0, 0, .3),
    inset 0 0 0 1.5px rgba(255, 255, 255, .14), inset 0 0 0 4px #0A0908, inset 0 0 0 5px rgba(255, 255, 255, .04);
}
.tablet::before { content: ''; position: absolute; z-index: 1; top: 4px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #3B4250, #0A0B0D 70%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
.tablet::after { content: ''; position: absolute; top: -3px; right: 120px; width: 60px; height: 4px; border-radius: 2px; background: linear-gradient(0deg, #2A2522, #4A4440); }
.tablet .screen { width: 1180px; height: 780px; border-radius: 20px; overflow: hidden; background: #0E0C0B; }
.tablet iframe { width: 1180px; height: 780px; }

/* TV : 1280 × 720 dans un cadre fin */
.tv {
  width: 1300px; height: 740px; padding: 10px; border-radius: 16px;
  background: linear-gradient(180deg, #1C1917, #0A0908 60%, #151210);
  box-shadow: 0 50px 100px rgba(0, 0, 0, .6), 0 18px 36px rgba(0, 0, 0, .3), inset 0 0 0 1.5px rgba(255, 255, 255, .1), inset 0 -2px 0 rgba(255, 255, 255, .06);
}
.tv .screen { width: 1280px; height: 720px; border-radius: 6px; overflow: hidden; background: #0A0908; }
.tv iframe { width: 1280px; height: 720px; }

iframe { display: block; border: 0; background: transparent; }
.placeholder { height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 40px; text-align: center; background: var(--moka); color: var(--ink-2); font-size: 22px; }
.placeholder .ico { color: var(--crema); }
.placeholder strong { font-family: var(--font-display); font-size: 28px; letter-spacing: -.03em; color: var(--ink); }
.placeholder small { font-size: 18px; color: var(--muted); }

.hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); font-size: 12.5px; color: var(--muted); white-space: nowrap; pointer-events: none;
  padding: 6px 14px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.stage.touring .hint { display: none; }

.layer-panel .layer-body p { color: var(--ink-2); }
.layer-panel .layer-body p + p { margin-top: 10px; }
.layer-panel .layer-body .tour-kbd { font-size: 13.5px; color: var(--muted); }
.confirm-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 4px 24px 24px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px; background: var(--surface-3); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .06); font: 600 12px/1 var(--font); color: var(--ink); }

/* =========================================================
   Mode guidé
   ========================================================= */

/* ---- Appareil ciblé : halo lumineux + étiquette fléchée ---- */
.pane[data-k="menu"], .pane[data-k="owner"] { --dr: 64px; }
.pane[data-k="pos"] { --dr: 34px; }
.pane[data-k="tv"] { --dr: 16px; }
.pane-box::after {
  content: ''; position: absolute; z-index: 2; inset: -6px; pointer-events: none; opacity: 0;
  border-radius: calc(var(--dr, 20px) * var(--s, 1) + 6px);
  transition: opacity .3s ease, box-shadow .3s ease;
}
.pane.tour-act .pane-box::after { opacity: 1; box-shadow: 0 0 0 2px var(--crema), 0 0 30px 6px rgba(200, 129, 74, .45); animation: tour-glow 1.8s ease-in-out infinite; }
.pane.tour-watch .pane-box::after { opacity: 1; box-shadow: 0 0 0 1.5px rgba(246, 241, 234, .34), 0 0 18px 2px rgba(246, 241, 234, .08); }
.pane.tour-win .pane-box::after { opacity: 1; animation: none; box-shadow: 0 0 0 3px var(--ok), 0 0 44px 10px rgba(95, 189, 136, .42); }
@keyframes tour-glow {
  0%, 100% { box-shadow: 0 0 0 2px var(--crema), 0 0 24px 2px rgba(200, 129, 74, .34); }
  50% { box-shadow: 0 0 0 2.5px #F2D7B6, 0 0 40px 10px rgba(200, 129, 74, .55); }
}
.stage.tour-dim .pane:not(.tour-act):not(.tour-watch):not(.tour-win) .pane-box { filter: brightness(.5) saturate(.6); }
.stage.tour-dim .pane:not(.tour-act):not(.tour-watch):not(.tour-win) .pane-box:hover { filter: none; }

.tour-tag { display: none; align-items: center; gap: 4px; flex: none; height: 21px; padding: 0 9px 0 7px; border-radius: 999px; font-size: 10.5px; letter-spacing: .06em; }
.tour-tag svg { flex: none; }
.pane.tour-act .tour-tag { display: inline-flex; background: var(--accent-grad); color: #1A0F07; box-shadow: 0 6px 16px rgba(200, 129, 74, .45), inset 0 1px 0 rgba(255, 255, 255, .25); animation: tour-bob 1.1s ease-in-out infinite; }
.pane.tour-watch .tour-tag { display: inline-flex; background: rgba(255, 255, 255, .08); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.pane.tour-win .tour-tag { display: inline-flex; background: var(--ok); color: #06180D; animation: none; }
.pane.tour-act .pane-label, .pane.tour-win .pane-label { color: var(--ink-2); }
@keyframes tour-bob { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
.ctl.tour-glow { box-shadow: 0 0 0 2px var(--crema), 0 0 22px 2px rgba(200, 129, 74, .45); padding: 0 12px; margin: 0 -4px; animation: tour-glow 1.8s ease-in-out infinite; }

/* ---- Bouton de la barre ---- */
#tour-start .ico { color: inherit; }
#tour-start.on { background: rgba(255, 255, 255, .08); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); filter: none; }

/* ---- Panneau (verre épais, posé au-dessus de la scène) ---- */
.tour {
  position: absolute; z-index: 20; left: 50%; bottom: 14px; width: min(1060px, calc(100% - 28px));
  transform: translateX(-50%);
  font-family: var(--font); color: var(--ink);
}
.tour[hidden] { display: none; }
.tour:not([hidden]) { animation: tour-in .42s var(--ease-out); }
@keyframes tour-in { from { opacity: 0; transform: translate(-50%, 18px) scale(.985); } }
.tour-card {
  position: relative; display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; align-items: stretch; gap: 0 18px;
  height: 124px; padding: 12px 14px 12px 12px; border-radius: 28px; overflow: hidden;
  background: linear-gradient(180deg, rgba(44, 39, 36, .78), rgba(24, 21, 19, .84));
  -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .12);
}
/* Halo cuivre discret en haut à gauche */
.tour-card::before { content: ''; position: absolute; left: -80px; top: -120px; width: 320px; height: 240px; pointer-events: none; background: radial-gradient(closest-side, rgba(200, 129, 74, .22), transparent); }

.tour-side { position: relative; display: grid; align-content: center; justify-items: center; gap: 9px; padding-right: 12px; box-shadow: inset -1px 0 0 rgba(255, 255, 255, .07); }
.tour-num { display: flex; align-items: baseline; gap: 2px; font-family: var(--font-display); font-weight: 780; line-height: 1; font-variant-numeric: tabular-nums; }
.tour-num b { font-size: 40px; letter-spacing: -.05em; background: linear-gradient(180deg, #F2D7B6, #C8814A); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.tour-num span { font-size: 15px; font-weight: 650; color: var(--muted); }
.tour-num .ico { color: var(--ok); }
.tour-dots { display: grid; grid-template-columns: repeat(4, 13px); gap: 3px 2px; }
.tour-dots button { width: 13px; height: 13px; display: grid; place-items: center; border-radius: 50%; }
.tour-dots button::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .14); transition: background-color var(--dur), transform var(--dur) var(--ease-spring); }
.tour-dots button.done::before { background: var(--copper-deep); }
.tour-dots button.cur::before { background: var(--crema); transform: scale(1.35); box-shadow: 0 0 10px rgba(233, 201, 163, .6); }
.tour-dots button:hover::before { background: var(--ink-2); }

.tour-main { position: relative; min-width: 0; display: grid; grid-template-rows: auto auto auto; align-content: center; gap: 5px; }
.tour-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tour-head h2 { font: 700 17px/1.2 var(--font-display); letter-spacing: -.025em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tour-dev { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(200, 129, 74, .18); color: var(--crema); font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; box-shadow: inset 0 0 0 1px rgba(200, 129, 74, .25); }
.tour-dev:empty { display: none; }
.tour-status { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-left: auto; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: rgba(255, 255, 255, .07); color: var(--ink-2); }
.tour-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); animation: tour-blink 1.4s ease-in-out infinite; }
.tour-status.ok { background: var(--ok-soft); color: #8FDCB0; }
.tour-status.ok i { background: var(--ok); animation: none; }
.tour-status.warn { background: var(--danger-soft); color: #F49A87; }
.tour-status.warn i { background: var(--danger); }
.tour-status:empty { display: none; }
@keyframes tour-blink { 50% { opacity: .35; } }
.tour-do, .tour-say { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 13.5px; line-height: 18px; }
.tour-do { color: var(--ink-2); }
.tour-do b { color: #fff; font-weight: 650; }
.tour-do .kp { display: inline-block; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 700; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.tour-say { color: var(--crema); font-style: italic; }
.tour-say::before { content: 'À dire'; display: inline-block; margin-right: 8px; padding: 0 7px; border-radius: 999px; background: rgba(200, 129, 74, .2); color: var(--crema); font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; vertical-align: 1px; line-height: 17px; }
.tour-do.fin { display: grid; gap: 4px; }
.tour-chips { display: flex; align-items: center; gap: 5px; height: 18px; overflow: hidden; white-space: nowrap; }
.tour-chips em { flex: none; width: 88px; font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tour-chips span { display: inline-flex; align-items: center; flex: none; height: 18px; padding: 0 8px; border-radius: 999px; background: rgba(200, 129, 74, .14); color: var(--crema); font-size: 11px; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(200, 129, 74, .3); }
.tour-chips span.ok { background: rgba(95, 189, 136, .12); color: #9FDCBB; box-shadow: inset 0 0 0 1px rgba(95, 189, 136, .32); }
.tour-inline { display: inline-flex; align-items: center; gap: 4px; height: 22px; margin-left: 4px; padding: 0 10px; border-radius: 999px; background: var(--accent-grad); color: #1A0F07; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.tour-inline:hover { filter: brightness(1.08); }

.tour-ctrl { position: relative; display: grid; align-content: space-between; justify-items: end; gap: 8px; }
.tour-tools { display: flex; align-items: center; gap: 2px; }
.tour-time { margin-right: 6px; padding: 0 8px; height: 24px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .05); }
.tour-time:empty { display: none; }
.tour-time.over { color: var(--warn); background: var(--warn-soft); }
.tour-tool { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px; border-radius: 999px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; transition: background-color var(--dur-fast), color var(--dur-fast); }
.tour-tool:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.tour-tool.icon { width: 30px; padding: 0; justify-content: center; }
.tour-nav { display: flex; gap: 8px; }
.tour-nav .btn { min-height: 42px; padding: 0 18px; font-size: 14px; white-space: nowrap; }
.tour-nav .btn-ghost { background: rgba(255, 255, 255, .07); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); }
.tour-nav .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.tour-nav .btn:disabled { opacity: .3; }
.tour-nav .btn.ready { animation: tour-nudge 1.6s ease-in-out infinite; }
@keyframes tour-nudge {
  0%, 100% { box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 0 0 0 rgba(200, 129, 74, .6); }
  50% { box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 0 0 7px rgba(200, 129, 74, 0); }
}

/* ---- « Étape réussie » ---- */
.tour-win {
  position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(600px 200px at 30% 0%, rgba(95, 189, 136, .35), transparent 70%), linear-gradient(180deg, rgba(22, 58, 38, .97), rgba(13, 36, 24, .97)); color: #fff;
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.tour.winning .tour-win { opacity: 1; pointer-events: auto; }
.tour-win .burst { position: relative; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--ok); color: #06180D; box-shadow: 0 0 0 9px rgba(95, 189, 136, .18), 0 0 40px rgba(95, 189, 136, .5); }
.tour.winning .tour-win .burst { animation: tour-pop .6s var(--ease-spring) both; }
.tour-win .burst svg path { stroke-dasharray: 30; }
.tour.winning .tour-win .burst svg path { animation: tour-draw .4s .18s ease-out both; }
.tour-win .eyebrow { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8FDCB0; }
.tour-win strong { display: block; font: 750 23px/1.15 var(--font-display); letter-spacing: -.03em; }
.tour-win small { display: block; margin-top: 3px; font-size: 14px; color: #BFE6CF; }
.tour-win .next { display: block; margin-top: 4px; font-size: 12px; color: #8FC7A6; }
@keyframes tour-pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tour-draw { from { stroke-dashoffset: 30; } to { stroke-dashoffset: 0; } }

/* ---- Pastille repliée (façon Dynamic Island) ---- */
.tour-pill {
  position: absolute; z-index: 20; left: 50%; bottom: 12px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 9px; height: 38px; max-width: calc(100% - 24px); padding: 0 14px 0 12px; border-radius: 999px;
  background: rgba(20, 17, 15, .86); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap;
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .1);
  transition: transform var(--dur) var(--ease-out), background-color var(--dur);
}
.tour-pill[hidden] { display: none; }
.tour-pill:hover { background: rgba(36, 31, 28, .92); transform: translateX(-50%) translateY(-1px); }
.tour-pill b { color: var(--crema); }
.tour-pill .pt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tour-pill .dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--warn); animation: tour-blink 1.4s ease-in-out infinite; }
.tour-pill.ok .dot { background: var(--ok); animation: none; }

@media (max-width: 1500px) {
  .bar h1 { display: none; }
}
@media (max-width: 1400px) {
  .bar .btn .long { display: none; }
  .bar .btn .short { display: inline; }
  .bar { gap: 10px 10px; }
}
@media (max-width: 860px) {
  .bar { margin: 8px 8px 0; border-radius: 20px; }
  .bar h1, .sep, .hint { display: none; }
  .tour-card { grid-template-columns: minmax(0, 1fr) auto; height: auto; }
  .tour-side { display: none; }
}
.settling .pane, .settling .device { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  .pane, .device { transition: none; }
  .pane.tour-act .pane-box::after, .pane.tour-act .tour-tag, .ctl.tour-glow, .tour-nav .btn.ready, .tour-status i, .tour-pill .dot { animation: none; }
  .tour.winning .tour-win .burst, .tour.winning .tour-win .burst svg path { animation: none; stroke-dashoffset: 0; }
}
