/* Chasse au trésor : style « pièces de jeu de société » — contours épais, ombres franches, couleurs d'univers. */

@font-face { font-family: Fredoka; font-weight: 500; font-display: swap; src: url(../vendor/fonts/fredoka-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Fredoka; font-weight: 600; font-display: swap; src: url(../vendor/fonts/fredoka-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Fredoka; font-weight: 700; font-display: swap; src: url(../vendor/fonts/fredoka-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 400; font-display: swap; src: url(../vendor/fonts/nunito-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 600; font-display: swap; src: url(../vendor/fonts/nunito-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(../vendor/fonts/nunito-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(../vendor/fonts/nunito-latin-800-normal.woff2) format('woff2'); }

:root {
  --bg: #9fe0f2; --bg2: #6cc8e6; --accent: #ffc43d; --accent2: #ff6f59; --ink: #1d2b53; --card: #ffffff; --on-accent: #1d2b53;
  --line: var(--ink); --shadow: var(--ink);
  --field: color-mix(in srgb, var(--card) 88%, #fff);
  --b: 3px; --r-lg: 28px; --r: 20px; --r-sm: 14px;
  --display: Fredoka, 'Trebuchet MS', system-ui, sans-serif;
  --body: Nunito, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --good: #3dbe7a; --bad: #ff5d5d;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
[data-theme="espions"] { color-scheme: dark; --field: #464a6e; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  font-family: var(--body); font-size: 17px; line-height: 1.5; color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg2) 2.6px, transparent 3px), radial-gradient(var(--bg2) 2.6px, transparent 3px);
  background-size: 34px 34px; background-position: 0 0, 17px 17px;
  transition: background-color .4s;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0 0 .4em; letter-spacing: .005em; }
p { margin: 0 0 .7em; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

#app { min-height: 100dvh; }
#app.enter > * { animation: enter .28s ease-out both; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

.page { max-width: 580px; margin: 0 auto; padding: 12px 16px calc(40px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.center { justify-content: center; }
.row.spread { justify-content: space-between; }
.row.three > * { flex: 1; }
.center { text-align: center; }
.muted { opacity: .75; }
.small { font-size: .9rem; }
.section-title { font-size: 1.3rem; margin: 10px 0 -4px; }
.hint-text { text-align: center; font-size: .92rem; margin: -4px 0; opacity: .85; }
.help { font-size: .9rem; opacity: .8; margin: 6px 0 0; }
.warn { color: #c2410c; font-weight: 700; }
[data-theme="espions"] .warn { color: #ffb36b; }
.ok { color: #15803d; font-weight: 700; }

/* ---------- Barre du haut ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 10px max(12px, calc((100vw - 580px) / 2)); padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.topbar-title { flex: 1; text-align: center; font-size: 1.25rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none;
  background: var(--card); border: var(--b) solid var(--line); border-radius: 50%;
  box-shadow: 0 3px 0 var(--shadow); font-size: 1.25rem; cursor: pointer; text-decoration: none; padding: 0;
  transition: transform .08s, box-shadow .08s;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--shadow); }
.icon-spacer { width: 46px; flex: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 10px 20px;
  font-family: var(--display); font-weight: 600; font-size: 1.1rem; line-height: 1.15; text-align: center; text-decoration: none;
  background: var(--card); color: var(--ink);
  border: var(--b) solid var(--line); border-radius: var(--r);
  box-shadow: 0 5px 0 var(--shadow);
  cursor: pointer; user-select: none; -webkit-user-select: none; position: relative;
  transition: transform .08s, box-shadow .08s, background .2s;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--shadow); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.small { min-height: 42px; padding: 6px 14px; font-size: .98rem; border-radius: var(--r-sm); box-shadow: 0 4px 0 var(--shadow); }
.btn.big { min-height: 76px; padding: 12px 18px; justify-content: flex-start; text-align: left; font-size: 1.3rem; border-radius: 24px; box-shadow: 0 6px 0 var(--shadow); }
.btn.big:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 1px 0 var(--shadow); }
.btn-emoji { font-size: 2rem; line-height: 1; flex: none; width: 46px; text-align: center; }
.btn-text { display: flex; flex-direction: column; }
.btn-text small { font-family: var(--body); font-weight: 600; font-size: .86rem; opacity: .78; margin-top: 2px; }
.btn.ghost.light { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; box-shadow: none; }
.btn.test { background: repeating-linear-gradient(45deg, #fff6c9 0 12px, #ffe68a 12px 24px); color: #1d2b53; }
.link { background: none; border: 0; padding: 6px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mini-btn { width: 34px; height: 30px; border: 2px solid var(--line); background: var(--card); border-radius: 9px; cursor: pointer; font-size: .8rem; padding: 0; }
.mini-btn:disabled { opacity: .3; }

/* Bouton à maintenir */
.hold { overflow: hidden; touch-action: none; }
.hold-fill { position: absolute; inset: 0; background: var(--good); transform: scaleX(0); transform-origin: left; transition: transform .05s linear; }
.hold-label { position: relative; }

/* ---------- Cartes ---------- */
.card { background: var(--card); border: var(--b) solid var(--line); border-radius: var(--r-lg); box-shadow: 0 6px 0 var(--shadow); padding: 18px; position: relative; }
.card-title { font-size: 1.25rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-head .card-title { margin: 0; }
.badge { background: var(--accent); color: var(--on-accent); border: 2px solid var(--line); border-radius: 999px; padding: 0 10px; font-family: var(--display); font-weight: 700; }
.note { background: #fff6c9; color: #1d2b53; border: var(--b) dashed #1d2b53; border-radius: var(--r); padding: 12px 14px; font-weight: 600; }
.note.bad { background: #ffe1dc; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 800; font-size: .95rem; }
.field:last-child { margin-bottom: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea {
  width: 100%; min-height: 50px; padding: 11px 14px; font-size: 1.05rem;
  background: var(--field); border: var(--b) solid var(--line); border-radius: var(--r-sm);
  outline: none; transition: box-shadow .15s;
}
input:focus, textarea:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 55%, transparent); }
textarea { resize: vertical; line-height: 1.45; }
.field.big input { font-family: var(--display); font-weight: 600; font-size: 1.35rem; }
.input-row { display: flex; gap: 8px; align-items: center; }
.code-input { font-family: var(--display); font-weight: 700; font-size: 1.5rem !important; letter-spacing: .25em; text-transform: uppercase; text-align: center; }
.mono-code { font-family: var(--display); letter-spacing: .18em; background: var(--accent); color: var(--on-accent); padding: 1px 8px; border-radius: 6px; }
input[type=range] { width: 100%; accent-color: var(--accent2); height: 32px; }
.mini { display: flex; flex-direction: column; gap: 2px; }
.mini small { font-weight: 700; opacity: .75; }
.mini input { text-align: center; }

/* Puces */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 44px;
  background: var(--field); border: var(--b) solid var(--line); border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: 1rem; cursor: pointer;
  box-shadow: 0 3px 0 var(--shadow); transition: transform .08s, box-shadow .08s, background .15s;
}
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shadow); }
.chip.on { background: var(--accent); color: var(--on-accent); }
.chip-emoji { font-size: 1.2rem; }
.chips.small .chip { min-height: 38px; padding: 5px 12px; font-size: .93rem; }

/* Interrupteur */
.toggle { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; margin: 6px 0 12px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { flex: none; width: 54px; height: 32px; border: var(--b) solid var(--line); border-radius: 999px; background: var(--field); position: relative; transition: background .2s; margin-top: 2px; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--line); transition: transform .2s; }
.toggle input:checked + .toggle-track { background: var(--good); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(22px); background: #fff; }
.toggle input:focus-visible + .toggle-track { outline: 3px solid var(--accent2); outline-offset: 2px; }
.toggle-text { display: flex; flex-direction: column; }
.toggle-text small { opacity: .78; font-size: .88rem; }

.empty { text-align: center; padding: 30px 10px; }
.empty-emoji { font-size: 4rem; line-height: 1; margin-bottom: 8px; }

/* ---------- Accueil ---------- */
.home { padding-top: max(16px, env(safe-area-inset-top)); }
.home-tools { display: flex; justify-content: flex-end; }
.hero { text-align: center; margin-top: -24px; }
.chest { width: min(230px, 62vw); margin: 0 auto; overflow: visible; }
.chest-lid { transform-origin: 30px 84px; animation: lid 1.6s .3s cubic-bezier(.3,1.6,.5,1) both; }
.chest-glow, .chest-coins { animation: glow 1.6s .3s ease-out both; transform-origin: 110px 84px; }
.sparkles path { animation: twinkle 2.4s 1.4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.sparkles path:nth-child(2) { animation-delay: 1.9s; } .sparkles path:nth-child(3) { animation-delay: 2.3s; }
@keyframes lid { 0% { transform: rotate(0); } 35% { transform: rotate(-24deg); } 100% { transform: rotate(-14deg); } }
@keyframes glow { 0%, 20% { opacity: 0; transform: translateY(20px) scale(.6); } 100% { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.4); opacity: .3; } }
.logo {
  font-size: clamp(3rem, 15vw, 4.6rem); line-height: .9; margin: 6px 0 12px;
  color: var(--accent); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink); letter-spacing: .01em;
}
.tagline { font-size: 1.1rem; font-weight: 700; max-width: 26ch; margin: 0 auto; }
.home-actions { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.btn.resume { background: var(--accent2); color: #fff; animation: nudge 2.6s 1s ease-in-out infinite; }
@keyframes nudge { 0%, 90%, 100% { transform: none; } 94% { transform: rotate(-1.5deg); } 97% { transform: rotate(1.5deg); } }
.home-foot { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.ios-tip { text-align: center; font-size: .9rem; opacity: .85; }

/* ---------- Listes de chasses ---------- */
.hunt-list { display: flex; flex-direction: column; gap: 12px; }
.hunt-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; text-decoration: none;
  background: var(--card); border: var(--b) solid var(--line); border-radius: var(--r); box-shadow: 0 5px 0 var(--shadow);
}
.hunt-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; text-decoration: none; }
.hunt-emoji { flex: none; width: 56px; height: 56px; display: grid; place-items: center; font-size: 2rem; background: var(--tc); border: var(--b) solid var(--line); border-radius: 16px; }
.hunt-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hunt-info b { font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.2; }
.hunt-info small { font-size: .88rem; }
.hunt-go { font-size: 1.4rem; padding: 0 6px; }

.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.template-card {
  text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 16px; cursor: pointer;
  background: var(--card); border: var(--b) solid var(--line); border-radius: var(--r); box-shadow: 0 5px 0 var(--shadow);
  background-image: linear-gradient(var(--tc), var(--tc)); background-size: 100% 64px; background-repeat: no-repeat;
  transition: transform .08s, box-shadow .08s;
}
.template-card:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--shadow); }
.tpl-emoji { font-size: 2.4rem; line-height: 1; width: 64px; height: 64px; display: grid; place-items: center; background: var(--card); border: var(--b) solid var(--line); border-radius: 50%; margin-bottom: 2px; }
.template-card b { font-family: var(--display); font-size: 1.2rem; font-weight: 700; }
.tpl-blurb { font-size: .92rem; }
.tpl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.tpl-tags span { font-size: .8rem; font-weight: 700; padding: 1px 8px; border: 2px solid var(--line); border-radius: 999px; background: var(--field); }

/* ---------- Départ ---------- */
.start-hero { text-align: center; }
.start-emoji { font-size: 5rem; line-height: 1; width: 128px; height: 128px; margin: 0 auto 6px; display: grid; place-items: center; background: var(--card); border: 4px solid var(--line); border-radius: 50%; box-shadow: 0 6px 0 var(--shadow); animation: bob 3s ease-in-out infinite; }
.start-hero.compact .start-emoji { width: 88px; height: 88px; font-size: 3.2rem; animation: none; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-3deg); } }
.start-hero h1 { font-size: 2rem; margin-top: 10px; }
.meta-line { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; font-weight: 700; }
.meta-line span { background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: .92rem; }
.story { font-size: 1.12rem; font-weight: 600; }
.story p:last-child { margin: 0; }
.team-pick { display: flex; gap: 10px; margin-bottom: 16px; }
.team-btn { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 10px 4px; background: var(--field); border: var(--b) solid var(--line); border-radius: var(--r); cursor: pointer; box-shadow: 0 4px 0 var(--shadow); font-family: var(--display); }
.team-btn span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--team); color: #fff; font-size: 1.4rem; font-weight: 700; border: var(--b) solid var(--line); }
.team-btn small { font-weight: 600; margin-top: 4px; }
.team-btn.on { background: var(--accent); color: var(--on-accent); transform: translateY(2px); box-shadow: 0 2px 0 var(--shadow); }
.perm p { margin-bottom: 8px; }
.perm-status { font-weight: 700; font-size: .92rem; margin: 8px 0 0; }
.go-btn { justify-content: center; font-size: 1.45rem; }

/* ---------- Partie ---------- */
.game { max-width: 580px; margin: 0 auto; padding-bottom: calc(30px + var(--safe-b)); }
.game-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px 4px; padding-top: max(10px, env(safe-area-inset-top)); }
.team-badge { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-family: var(--display); font-weight: 700; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--team, var(--accent)); border: var(--b) solid var(--line); flex: none; }
.timer { font-family: var(--display); font-weight: 600; background: var(--card); border: var(--b) solid var(--line); border-radius: 999px; padding: 4px 12px; box-shadow: 0 3px 0 var(--shadow); font-variant-numeric: tabular-nums; white-space: nowrap; }
.trail { display: flex; align-items: center; padding: 10px 14px 6px; overflow-x: auto; scrollbar-width: none; }
.trail::-webkit-scrollbar { display: none; }
.trail-dot { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: .9rem; background: var(--card); border: var(--b) solid var(--line); opacity: .7; }
.trail-dot.done { background: var(--good); color: #fff; opacity: 1; }
.trail-dot.cur { width: 44px; height: 44px; font-size: 1.4rem; background: var(--accent); opacity: 1; box-shadow: 0 4px 0 var(--shadow); animation: bob 2s ease-in-out infinite; }
.trail-dot.chest { font-size: 1.1rem; }
.trail-line { flex: 1 0 12px; min-width: 12px; height: 0; border-top: 4px dashed var(--line); opacity: .45; }
.stage { padding: 6px 16px 0; display: flex; flex-direction: column; gap: 16px; }
.stage.pop > * { animation: pop .35s cubic-bezier(.3,1.4,.6,1) both; }
.stage.pop > *:nth-child(2) { animation-delay: .06s; } .stage.pop > *:nth-child(3) { animation-delay: .12s; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.test-ribbon { position: fixed; bottom: calc(10px + var(--safe-b)); left: 10px; z-index: 30; background: #ffe68a; color: #1d2b53; border: 2px solid #1d2b53; border-radius: 999px; padding: 2px 10px; font-weight: 800; font-size: .8rem; }

.countdown { min-height: 60vh; display: grid; place-content: center; text-align: center; }
.count-num { font-family: var(--display); font-weight: 700; font-size: 9rem; line-height: 1; color: var(--accent); -webkit-text-stroke: 4px var(--ink); paint-order: stroke fill; text-shadow: 0 8px 0 var(--ink); }
.count-num.bump { animation: bump .6s cubic-bezier(.3,1.8,.5,1); }
.countdown p { font-family: var(--display); font-size: 1.5rem; font-weight: 600; }
@keyframes bump { from { transform: scale(2.2); opacity: 0; } }

.step-label { font-family: var(--display); font-weight: 600; font-size: .95rem; display: inline-block; background: var(--accent); color: var(--on-accent); border: 2px solid var(--line); border-radius: 999px; padding: 1px 12px; margin-bottom: 10px; }
.step-title { font-size: 1.5rem; }
.clue { display: flex; gap: 12px; align-items: flex-start; }
.clue > p { flex: 1; }
.clue-text, .challenge-q { font-family: var(--display); font-weight: 600; font-size: 1.45rem; line-height: 1.3; margin: 0; }
.speak { flex: none; }
.story .speak { float: right; margin: 0 0 6px 10px; }
.clue-photo { margin-top: 14px; border-radius: var(--r); border: var(--b) solid var(--line); width: 100%; max-height: 60vh; object-fit: contain; background: #000; }
.clue-photo.small { max-height: 220px; width: auto; }
.loc-hint { margin-top: 14px; }
.hint-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border: var(--b) dashed var(--line); border-radius: var(--r); background: transparent; font-family: var(--display); font-weight: 600; font-size: 1.05rem; cursor: pointer; margin-bottom: 10px; }
.hint-btn small { font-family: var(--body); font-weight: 700; opacity: .8; }
.hint-btn.locked { opacity: .65; cursor: default; }
.hint-btn.ready { background: var(--accent); color: var(--on-accent); border-style: solid; box-shadow: 0 4px 0 var(--shadow); animation: wiggle 1.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-2deg); } 92% { transform: rotate(2deg); } }
.hint-shown { background: color-mix(in srgb, var(--accent) 30%, var(--card)); border: var(--b) solid var(--line); border-radius: var(--r); padding: 12px 14px; font-weight: 700; margin: 0 0 10px; }
.hint-shown b { display: block; font-family: var(--display); font-size: .85rem; opacity: .75; }
.hints-wrap h3 { font-size: 1.05rem; margin-bottom: 8px; }
.actions { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.actions .btn.big { justify-content: center; font-size: 1.45rem; }
.actions .btn.test { align-self: center; }

/* Radar */
.radar-card { padding: 20px 16px; text-align: center; overflow: hidden; }
.radar { --lv: #5aa9ff; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.radar-dial { position: relative; width: min(250px, 70vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--lv) 40%, #fff) 0 30%, color-mix(in srgb, var(--lv) 22%, #fff) 30% 60%, color-mix(in srgb, var(--lv) 10%, #fff) 60%); border: 4px solid var(--line); box-shadow: 0 6px 0 var(--shadow); transition: background .6s; overflow: hidden; }
.radar-rings i { position: absolute; inset: 0; border-radius: 50%; border: 4px solid var(--lv); opacity: 0; animation: ring 2.4s ease-out infinite; }
.radar-rings i:nth-child(2) { animation-delay: .8s; } .radar-rings i:nth-child(3) { animation-delay: 1.6s; }
.lv-3 .radar-rings i, .lv-4 .radar-rings i { animation-duration: 1.1s; }
@keyframes ring { from { transform: scale(.25); opacity: .9; } to { transform: scale(1); opacity: 0; } }
.radar-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 300deg, color-mix(in srgb, var(--lv) 70%, transparent) 360deg); animation: sweep 2.2s linear infinite; }
.lv-5 .radar-sweep { display: none; }
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-core { position: absolute; inset: 32%; display: grid; place-items: center; background: var(--card); border: 4px solid var(--line); border-radius: 50%; z-index: 2; }
.radar-emoji { font-size: 3rem; line-height: 1; }
.lv-4 .radar-core, .lv-5 .radar-core { animation: throb .5s ease-in-out infinite alternate; }
@keyframes throb { to { transform: scale(1.08); } }
.radar-arrow { position: absolute; inset: 4%; z-index: 1; transition: transform .3s ease-out; }
.radar-arrow svg { width: 100%; height: 100%; }
.radar-word { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1.1; color: var(--ink); margin-top: 6px; }
.radar-trend { font-weight: 800; font-size: 1.1rem; min-height: 1.5em; }
.radar-trend.hot { color: #e8590c; } .radar-trend.cold { color: #1971c2; }
[data-theme="espions"] .radar-trend.hot { color: #ffa94d; } [data-theme="espions"] .radar-trend.cold { color: #74c0fc; }
.radar-dist { font-family: var(--display); font-weight: 700; font-size: 1.6rem; background: var(--field); border: var(--b) solid var(--line); border-radius: 999px; padding: 0 16px; }
.radar-acc { font-size: .82rem; opacity: .75; font-weight: 700; }
.radar-map { width: 100%; height: 260px; border-radius: var(--r); border: var(--b) solid var(--line); margin-top: 8px; z-index: 0; }

.found-burst { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(3px); animation: fadein .2s; }
.found-burst div { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--card); border: 4px solid var(--line); border-radius: 32px; box-shadow: 0 8px 0 var(--shadow); padding: 26px 30px; animation: bump .5s cubic-bezier(.3,1.8,.5,1); text-align: center; max-width: 86vw; }
.found-burst span { font-size: 4.5rem; line-height: 1; }
.found-burst b { font-family: var(--display); font-size: 1.9rem; }
.found-burst.out { opacity: 0; transition: opacity .25s; }
@keyframes fadein { from { opacity: 0; } }

/* Défi */
.challenge-emoji { font-size: 4rem; line-height: 1; text-align: center; margin: 4px 0 10px; }
.answer-area { margin-top: 16px; }
.answer-form { display: flex; gap: 10px; }
.answer-form input { font-family: var(--display); font-weight: 600; font-size: 1.3rem !important; min-height: 58px; }
.answer-form .btn { flex: none; }
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; min-height: 60px; background: var(--field); border: var(--b) solid var(--line); border-radius: var(--r); box-shadow: 0 4px 0 var(--shadow); font-family: var(--display); font-weight: 600; font-size: 1.2rem; cursor: pointer; transition: transform .08s, box-shadow .08s, background .2s; }
.choice:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
.choice-letter { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); border: 2px solid var(--line); }
.choice.good { background: var(--good); color: #fff; }
.choice.bad { background: var(--bad); color: #fff; opacity: .7; }
.hold { width: 100%; justify-content: center !important; text-align: center !important; font-size: 1.15rem !important; }
.feedback { font-weight: 800; font-size: 1.1rem; color: var(--accent2); min-height: 1.4em; margin: 12px 0 0; text-align: center; }
.shake { animation: shake .45s; }
@keyframes shake { 20% { transform: translateX(-10px) rotate(-1deg); } 40% { transform: translateX(9px) rotate(1deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.challenge-card.win { animation: winflash .5s; }
@keyframes winflash { 50% { background: color-mix(in srgb, var(--good) 35%, var(--card)); transform: scale(1.02); } }
.photo-proof { border-radius: var(--r); border: var(--b) solid var(--line); transform: rotate(-2deg); }

/* Récompense */
.reward { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 10px; }
.reward-title { font-size: 2.4rem; margin: 0; }
.medal { width: 200px; height: 200px; perspective: 600px; }
.medal-inner { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff3b0, #ffc43d 55%, #e0a500); border: 6px solid var(--line); box-shadow: 0 8px 0 var(--shadow), inset 0 0 0 10px rgba(255,255,255,.35); animation: flip 1s cubic-bezier(.3,1.3,.5,1) both; }
.medal-inner span { font-family: var(--display); font-weight: 700; font-size: 5.5rem; color: #1d2b53; line-height: 1; }
@keyframes flip { from { transform: rotateY(540deg) scale(.4); } }
.reward-label { font-family: var(--display); font-weight: 600; font-size: 1.35rem; margin: 0; }
.code-slots { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.slot { width: 48px; height: 60px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 2rem; background: var(--field); border: var(--b) dashed var(--line); border-radius: 12px; opacity: .7; padding: 0; }
.slot.got { background: var(--card); border-style: solid; opacity: 1; box-shadow: 0 4px 0 var(--shadow); }
.reward .btn.big { justify-content: center; align-self: stretch; }

/* Trésor */
.final { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.final h2 { font-size: 2rem; margin: 0; }
.final .btn.big { justify-content: center; align-self: stretch; }
.final .card { align-self: stretch; text-align: left; }
.padlock { position: relative; padding-top: 70px; margin: 8px 0; }
.shackle { position: absolute; top: 0; left: 50%; width: 130px; height: 120px; margin-left: -65px; border: 18px solid #9aa6b8; border-bottom: 0; border-radius: 70px 70px 0 0; box-shadow: 0 0 0 4px var(--line); transition: transform .6s cubic-bezier(.3,1.6,.5,1); transform-origin: 85% 100%; }
.padlock.open .shackle { transform: translateY(-34px) rotate(-18deg); }
.lock-body { position: relative; background: linear-gradient(#ffd65a, #f2b51c); border: 5px solid var(--line); border-radius: 26px; padding: 20px 18px; box-shadow: 0 8px 0 var(--shadow); min-width: 220px; }
.padlock.static .lock-body { font-size: 3rem; padding: 10px; }
.wheels { display: flex; gap: 8px; justify-content: center; }
.wheel { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wheel-btn { width: 54px; height: 40px; border: var(--b) solid var(--line); border-radius: 12px; background: #fff; font-size: 1rem; cursor: pointer; color: #1d2b53; box-shadow: 0 3px 0 var(--line); }
.wheel-btn:active { transform: translateY(2px); box-shadow: none; }
.wheel-num { width: 54px; height: 74px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 2.8rem; background: #1d2b53; color: #fff; border-radius: 12px; box-shadow: inset 0 8px 10px rgba(0,0,0,.5), inset 0 -8px 10px rgba(0,0,0,.5); touch-action: none; user-select: none; cursor: ns-resize; }
.wheel-num.roll { animation: roll .18s ease-out; }
@keyframes roll { from { transform: translateY(-12px); opacity: .3; } }
.code-ticket { display: flex; gap: 10px; background: var(--card); border: 4px solid var(--line); border-radius: 18px; padding: 12px 16px; box-shadow: 0 6px 0 var(--shadow); }
.code-ticket span { font-family: var(--display); font-weight: 700; font-size: 3rem; width: 50px; text-align: center; border-bottom: 4px solid var(--accent2); line-height: 1.1; }
.word-slots, .word-tiles { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.slot.big { width: 54px; height: 66px; cursor: pointer; }
.word-slots.win .slot { background: var(--good); color: #fff; }
.tile { width: 58px; height: 66px; font-family: var(--display); font-weight: 700; font-size: 2.2rem; background: var(--accent); color: var(--on-accent); border: var(--b) solid var(--line); border-radius: 14px; box-shadow: 0 5px 0 var(--shadow); cursor: pointer; }
.tile:disabled { opacity: .2; box-shadow: none; transform: translateY(4px); }

/* Victoire */
.victory { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.trophy { font-size: 6rem; line-height: 1; animation: bump .8s cubic-bezier(.3,1.8,.5,1), bob 3s 1s ease-in-out infinite; }
.victory h2 { font-size: 2rem; margin: 0; }
.team-name { font-family: var(--display); font-weight: 600; font-size: 1.4rem; margin: 0; }
.stars { font-size: 3.4rem; line-height: 1; letter-spacing: 6px; }
.stars span { color: rgba(0,0,0,.15); }
.stars span.on { color: #ffc43d; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.stats { display: flex; gap: 10px; width: 100%; }
.stats div { flex: 1; background: var(--card); border: var(--b) solid var(--line); border-radius: var(--r); box-shadow: 0 4px 0 var(--shadow); padding: 10px 4px; display: flex; flex-direction: column; }
.stats b { font-family: var(--display); font-size: 1.25rem; }
.stats small { font-weight: 700; opacity: .75; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 100%; }
.photo-grid img { aspect-ratio: 1; object-fit: cover; border: var(--b) solid var(--line); border-radius: 12px; }
.photo-grid img:nth-child(odd) { transform: rotate(-2deg); } .photo-grid img:nth-child(even) { transform: rotate(2deg); }
.victory .stack { width: 100%; margin-top: 8px; }
.victory .stack .btn.big { justify-content: center; }
.victory .row .btn { flex: 1; }

/* ---------- Dialogues ---------- */
.dialog-wrap, .sheet-wrap, .diploma-view { position: fixed; inset: 0; z-index: 100; background: rgba(15, 20, 40, .55); display: grid; place-items: center; padding: 16px; animation: fadein .15s; }
.dialog-wrap.out, .sheet-wrap.out { opacity: 0; transition: opacity .18s; }
.dialog { width: min(440px, 100%); max-height: 88dvh; overflow: auto; background: var(--card); border: 4px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 8px 0 var(--shadow); padding: 20px; animation: bump .3s cubic-bezier(.3,1.5,.5,1); }
.dialog h2 { font-size: 1.4rem; }
.dialog-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.dialog-actions:has(> :nth-child(2):last-child) { flex-direction: row-reverse; }
.dialog-actions:has(> :nth-child(2):last-child) .btn { flex: 1; }
.big-answer { font-family: var(--display); font-weight: 700; font-size: 2rem; text-align: center; margin: 10px 0; }
.plain { padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.menu-list { display: flex; flex-direction: column; gap: 10px; }
.menu-item { display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; min-height: 52px; padding: 10px 16px; background: var(--field); border: var(--b) solid var(--line); border-radius: var(--r); font-family: var(--display); font-weight: 600; font-size: 1.05rem; cursor: pointer; touch-action: none; }

.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); z-index: 200; transform: translate(-50%, 140%); max-width: calc(100vw - 32px); background: #1d2b53; color: #fff; border-radius: 16px; padding: 12px 18px; font-weight: 700; box-shadow: 0 6px 0 rgba(0,0,0,.25); transition: transform .3s cubic-bezier(.3,1.4,.5,1); text-align: center; }
.toast.show { transform: translate(-50%, 0); }
.toast.bad { background: #c92a2a; }

/* ---------- Lecteur de QR ---------- */
.scanner { position: fixed; inset: 0; z-index: 150; background: #000; animation: fadein .2s; }
.scanner.out { opacity: 0; transition: opacity .2s; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-ui { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: max(16px, env(safe-area-inset-top)) 16px calc(28px + var(--safe-b)); color: #fff; background: radial-gradient(circle at 50% 46%, transparent 0 34vmin, rgba(0,0,0,.55) 35vmin); }
.scan-top { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; }
.scan-top h2 { flex: 1; text-align: center; margin: 0; font-size: 1.2rem; text-shadow: 0 2px 6px #000; }
.scan-top .icon-btn { --line: #fff; --shadow: transparent; background: rgba(0,0,0,.45); color: #fff; }
.scan-frame { position: relative; width: 66vmin; max-width: 340px; aspect-ratio: 1; }
.scan-frame i { position: absolute; width: 44px; height: 44px; border: 7px solid var(--accent); border-radius: 6px; }
.scan-frame i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 22px; }
.scan-frame i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 22px; }
.scan-frame i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 22px; }
.scan-frame i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 22px; }
.scan-laser { position: absolute; left: 8%; right: 8%; height: 4px; background: var(--accent2); box-shadow: 0 0 14px var(--accent2); border-radius: 4px; animation: laser 2s ease-in-out infinite alternate; }
@keyframes laser { from { top: 10%; } to { top: 88%; } }
.scanner.hit .scan-frame i { border-color: var(--good); transform: scale(1.06); transition: .2s; }
.scanner.hit .scan-laser, .scanner.nocam .scan-laser { display: none; }
.scan-msg { font-weight: 800; font-size: 1.1rem; text-align: center; background: rgba(0,0,0,.55); padding: 8px 16px; border-radius: 14px; margin: 0; max-width: 520px; }
.scan-msg.bad { background: #c92a2a; animation: shake .45s; }
.scanner.torch-on [data-a=torch] { background: var(--accent); }

/* ---------- Feuille du bas (bibliothèque) ---------- */
.sheet-wrap { align-items: end; padding: 0; }
.sheet { width: min(640px, 100%); max-height: 88dvh; display: flex; flex-direction: column; gap: 10px; background: var(--card); border: 4px solid var(--line); border-bottom: 0; border-radius: 30px 30px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); animation: slideup .3s cubic-bezier(.3,1.2,.5,1); }
@keyframes slideup { from { transform: translateY(60%); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-size: 1.35rem; }
.riddle-list { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 6px; }
.riddle { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px; background: var(--field); border: var(--b) solid var(--line); border-radius: var(--r); cursor: pointer; }
.riddle:active { background: var(--accent); }
.riddle-emoji { font-size: 1.8rem; line-height: 1; flex: none; }
.riddle-body { display: flex; flex-direction: column; gap: 2px; font-weight: 700; }
.riddle-body small { font-weight: 600; opacity: .7; }

/* ---------- Éditeur ---------- */
.editor { padding-bottom: calc(110px + var(--safe-b)); }
.step-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.step-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; background: var(--field); border: var(--b) solid var(--line); border-radius: var(--r); }
.step-num { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); border: var(--b) solid var(--line); font-family: var(--display); font-weight: 700; }
.step-main { flex: 1; min-width: 0; display: flex; flex-direction: column; text-decoration: none; }
.step-main b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-main small { font-size: .9rem; }
.step-move { display: flex; flex-direction: column; gap: 4px; }
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; gap: 10px; justify-content: center; padding: 12px 16px calc(12px + var(--safe-b)); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(6px); border-top: var(--b) solid var(--line); }
.bottom-bar .btn { flex: 1; max-width: 190px; padding: 8px 10px; }
.issues ul { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.issues.ok { background: color-mix(in srgb, var(--good) 22%, var(--card)); }
.issues.bad { background: color-mix(in srgb, var(--bad) 14%, var(--card)); }
.issues.warn { background: color-mix(in srgb, var(--accent) 22%, var(--card)); }
.issues p:last-child { margin: 0; }
.choice-edit { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.choice-edit input[type=radio] { width: 26px; height: 26px; accent-color: var(--good); flex: none; }
.emoji-row { align-items: flex-start; }
.emoji-field { width: 84px; flex: none; }
.emoji-field input { text-align: center; font-size: 1.6rem !important; padding: 6px !important; }
.grow { flex: 1; }
.hint-in { margin-bottom: 8px; }
.mini-map { height: 280px; border: var(--b) solid var(--line); border-radius: var(--r); margin: 12px 0 4px; z-index: 0; }
.reward-info p { margin: 0; }

.map-screen { position: fixed; inset: 0; top: 0; display: flex; flex-direction: column; z-index: 5; }
.map-screen { top: calc(70px + env(safe-area-inset-top)); }
.big-map { flex: 1; border-top: var(--b) solid var(--line); z-index: 0; }
.map-locate { position: absolute; right: 14px; top: 14px; z-index: 500; }
.map-panel { background: var(--card); border-top: 4px solid var(--line); padding: 14px 16px calc(14px + var(--safe-b)); max-height: 46dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.map-panel .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
.map-panel .chip { flex: none; }
.map-step-clue { margin: 0; }
.map-pin { --pin: var(--accent); width: 40px; height: 48px; position: relative; filter: drop-shadow(0 3px 0 #1d2b53); }
.map-pin::before { content: ''; position: absolute; left: 2px; top: 0; width: 36px; height: 36px; background: var(--pin); border: 3px solid #1d2b53; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-sizing: border-box; }
.map-pin span { position: absolute; left: 0; right: 0; top: 6px; text-align: center; font-family: var(--display); font-weight: 700; color: #1d2b53; font-size: 15px; }
.map-pin.active { --pin: #ff6f59; } .map-pin.active span { color: #fff; }
.map-me { width: 22px; height: 22px; border-radius: 50%; background: #4d8dff; border: 4px solid #fff; box-shadow: 0 0 0 3px #1d2b53, 0 0 0 10px rgba(77,141,255,.25); }
.leaflet-container { font-family: var(--body); }

/* ---------- Partage ---------- */
.share-qr { display: grid; place-items: center; margin: 10px auto; width: min(320px, 100%); }
.share-qr svg { width: 100%; height: auto; border: 4px solid var(--line); border-radius: 18px; background: #fff; }
.qr-too-big { font-size: 4rem; }

/* ---------- Impression ---------- */
.print-area { max-width: 900px; margin: 0 auto 60px; padding: 0 16px; }
.print-sheet { background: #fff; color: #1d2b53; border: 2px solid #1d2b53; border-radius: 16px; padding: 20px; margin-bottom: 20px; }
.print-sheet table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: 10px 0; table-layout: fixed; }
.print-sheet th:nth-child(1), .print-sheet th:nth-child(3) { width: 9%; }
.print-sheet th:nth-child(5) { width: 13%; } .print-sheet th:nth-child(6) { width: 14%; }
.print-sheet td { overflow-wrap: anywhere; }
.print-sheet th, .print-sheet td { border: 1px solid #1d2b53; padding: 6px 8px; text-align: left; vertical-align: top; }
.print-sheet th { background: #eef; }
.print-sheet .mono { font-family: var(--display); letter-spacing: .12em; font-weight: 700; }
.sheet-sub { opacity: .7; }
.sheet-code { font-size: 1.2rem; }
.qr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.qr-card { background: #fff; color: #1d2b53; border: 3px dashed #1d2b53; border-radius: 18px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; break-inside: avoid; page-break-inside: avoid; }
.qr-card-head { display: flex; align-items: center; gap: 8px; width: 100%; background: var(--tc); border: 2px solid #1d2b53; border-radius: 12px; padding: 4px 10px; font-family: var(--display); }
.qr-card-head b { flex: 1; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qr-n { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 2px solid #1d2b53; font-weight: 700; font-size: .85rem; }
.qr-card .qr { width: 78%; height: auto; }
.qr-code-txt { font-size: .95rem; }
.qr-code-txt b { font-family: var(--display); letter-spacing: .2em; font-size: 1.3rem; }
.qr-card-foot { font-size: .8rem; opacity: .75; }
.qr-hide { font-size: .8rem; border-top: 2px dashed #1d2b53; width: 100%; text-align: center; padding-top: 6px; }
.print-only { display: none; }

@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff !important; }
  .no-print, .topbar, .toast, .dialog-wrap, .bottom-bar { display: none !important; }
  .print-area { padding: 0; max-width: none; margin: 0; }
  .print-sheet { border: 0; padding: 0; page-break-after: always; }
  .qr-grid { gap: 8mm; }
  .qr-card { height: 85mm; justify-content: space-between; }
  .qr-card .qr { width: auto; height: 52mm; }
  .qr-grid.big .qr-card { height: 128mm; }
  .qr-grid.big .qr-card .qr { height: 92mm; }
  .qr-grid.big .qr-code-txt b { font-size: 1.6rem; }
  body.printing-diploma > *:not(.diploma-print) { display: none !important; }
  body.printing-diploma .diploma-print { display: block !important; }
  .diploma-print img { width: 100%; }
  @page :first { margin: 10mm; }
}

/* ---------- Diplôme ---------- */
.diploma-view { z-index: 120; overflow-y: auto; background: rgba(15, 20, 40, .88); }
.diploma-inner { width: min(900px, 100%); display: flex; flex-direction: column; gap: 14px; }
.diploma-img { width: 100%; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: bump .5s cubic-bezier(.3,1.5,.5,1); }
.diploma-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.loading { color: #fff; font-family: var(--display); font-size: 1.4rem; text-align: center; }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 95; }

/* ---------- Aide ---------- */
.steps-howto { margin: 0; padding-left: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps-howto li { counter-increment: s; position: relative; padding-left: 50px; min-height: 38px; }
.steps-howto li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); border: var(--b) solid var(--line); font-family: var(--display); font-weight: 700; }

@media (min-width: 700px) {
  .page, .game { padding-top: 20px; }
  .clue-text, .challenge-q { font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.card .row.wrap { margin: 4px 0 14px; }
.card .row.wrap:last-child { margin-bottom: 0; }
