/*! Barakiland — identité « survêt & frietkot » : bleu électrique, jaune, ketchup, encre */
:root {
  --blue: #2342f4; --blue-deep: #1830c4; --yellow: #ffd426; --red: #ff4a3d;
  --ink: #0d1030; --paper: #ffffff; --tint: #eef1ff; --green: #1fbf74;
  --display: "Bungee", "Impact", "Arial Black", sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --line: 3px solid var(--ink);
  --hard: 0 5px 0 var(--ink);
  color-scheme: light;
  font-size: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--body); color: #fff; font-size: 16px; line-height: 1.45;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden;
  background-color: var(--blue);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 14px, transparent 14px 28px);
}
body.no-scroll { overflow: hidden; }
a { color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: .01em; line-height: 1.15; text-wrap: balance; }

/* En-tête */
.header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .7rem 1rem; background: var(--ink); border-bottom: 5px solid var(--yellow); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; min-width: 0; }
.brand img { width: 44px; height: 44px; flex: none; }
.brand__name { font-family: var(--display); font-size: 1.35rem; color: var(--yellow); display: block; line-height: 1; }
.brand__tagline { display: block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .8; margin-top: .2rem; white-space: nowrap; }
.nav { display: flex; gap: .3rem; flex-wrap: wrap; }
.nav a { text-decoration: none; font-weight: 700; font-size: .85rem; padding: .45rem .75rem; border-radius: 999px; border: 2px solid transparent; }
.nav a:hover, .nav a:focus-visible { border-color: var(--yellow); color: var(--yellow); outline: none; }

main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 1.4rem 1rem 2rem; }
.footer { text-align: center; padding: 1rem 1rem calc(1.4rem + env(safe-area-inset-bottom, 0px)); font-size: .78rem; font-weight: 600;
  background: var(--ink); color: rgba(255,255,255,.7); }

/* Boutons */
.btn { font: inherit; font-weight: 800; border: var(--line); border-radius: 12px; padding: .7rem 1.2rem; min-height: 46px; cursor: pointer;
  box-shadow: var(--hard); transition: transform .08s ease, box-shadow .08s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: translateY(3px); }
.btn--primary { background: var(--yellow); color: var(--ink); }
.btn--secondary { background: #fff; color: var(--ink); }
.btn--ghost { background: transparent; color: #fff; border-color: #fff; box-shadow: none; }
.btn--ghost:hover:not(:disabled) { box-shadow: none; background: rgba(255,255,255,.12); }
.linkbtn { background: none; border: 0; color: #fff; opacity: .8; text-decoration: underline; cursor: pointer; font: inherit; font-size: .82rem; }

/* Menu */
.menu { text-align: center; }
.menu h1 { font-size: clamp(1.7rem, 6vw, 2.6rem); color: var(--yellow); margin: .4rem 0; text-shadow: 3px 3px 0 var(--ink); }
.menu__lead { max-width: 540px; margin: .4rem auto 1.3rem; font-size: 1.02rem; }
.menu__name { display: inline-flex; flex-direction: column; gap: .3rem; text-align: left; margin-bottom: 1rem; }
.menu__name label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.menu__name input { padding: .6rem .8rem; border-radius: 12px; border: var(--line); background: #fff; color: var(--ink);
  font: inherit; font-weight: 800; min-height: 46px; width: 230px; box-shadow: var(--hard); }
.menu__name input:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.menu__title { font-size: 1.1rem; margin: 1.1rem 0 .8rem; }
.city-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.city { background: #fff; color: var(--ink); border: var(--line); border-radius: 16px; padding: 1rem .6rem; font: inherit; cursor: pointer; text-align: center;
  box-shadow: var(--hard); transition: transform .08s ease; }
.city__emoji { font-size: 2rem; display: block; }
.city__name { font-family: var(--display); display: block; margin-top: .3rem; font-size: 1.05rem; }
.city__sub { font-size: .75rem; font-weight: 600; opacity: .7; display: block; }
.city__tag { display: inline-block; margin-top: .5rem; font-size: .72rem; font-weight: 800; padding: .2rem .7rem; border-radius: 999px;
  background: var(--yellow); border: 2px solid var(--ink); }
.city--ready:hover { transform: translateY(-3px); }
.city--ready:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.city--locked { background: var(--tint); opacity: .75; cursor: not-allowed; box-shadow: 0 3px 0 var(--ink); }
.city--locked .city__tag { background: #fff; }
.noscript { color: var(--yellow); font-weight: 700; }

/* HUD */
.hud { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: space-between;
  background: #fff; color: var(--ink); border: var(--line); border-radius: 14px; padding: .55rem .9rem; margin-bottom: 1rem; box-shadow: var(--hard); }
.hud__who { min-width: 120px; flex: 1; }
.hud__name { font-family: var(--display); font-size: 1rem; margin-right: .4rem; }
.hud__lvl { font-size: .8rem; font-weight: 700; }
.hud__stat { display: flex; align-items: center; gap: .3rem; font-weight: 800; }
.hud__stat--en { min-width: 96px; }
.bar { height: 10px; background: var(--tint); border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; flex: 1; }
.bar i { display: block; height: 100%; width: 0; transition: width .3s ease; }
.bar--xp { margin-top: .3rem; } .bar--xp i { background: var(--blue); }
.bar--en i { background: var(--green); }

/* Carte */
.rpg-map { background: #7da95a; border: 4px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 8px 8px 0 var(--ink); max-width: 520px; margin: 0 auto; }
#mapCanvas { display: block; width: 100%; height: auto; aspect-ratio: 720 / 1040; touch-action: manipulation; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.goto { display: flex; gap: .45rem; justify-content: center; flex-wrap: wrap; max-width: 520px; margin: 1rem auto 0; }
.chip { font: 800 .78rem var(--body); color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 999px; padding: .4rem .75rem; cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.chip:hover, .chip:focus-visible { background: var(--yellow); outline: none; }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

/* Accueil */
.home { text-align: center; max-width: 760px; margin: 0 auto; }
.home__logo { width: 132px; height: 132px; filter: drop-shadow(5px 5px 0 var(--ink)); animation: floaty 3s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
.home h1 { font-size: clamp(1.9rem, 7vw, 3rem); color: var(--yellow); margin: .5rem 0 .3rem; text-shadow: 4px 4px 0 var(--ink); line-height: 1.1; }
.home__lead { max-width: 520px; margin: .5rem auto 1.4rem; font-size: 1.08rem; }
.btn--big { font-size: 1.25rem; padding: .9rem 2.2rem; }
.home__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 2.2rem 0 .5rem; text-align: left; }
.hcard { background: #fff; color: var(--ink); border: 4px solid var(--ink); border-radius: 16px; padding: .9rem 1rem; box-shadow: 5px 5px 0 var(--ink); }
.hcard b { display: block; font-family: var(--display); font-size: 1rem; margin-bottom: .25rem; }
.hcard span { font-size: .9rem; }
.home__mystery { margin-top: 1.5rem; font-weight: 700; opacity: .95; }
.back { margin-bottom: .6rem; text-align: left; }

/* Pages légales */
.legal { max-width: 760px; margin: 0 auto; padding: 1.5rem 1rem 2rem; }
.legal h1 { color: var(--yellow); text-shadow: 3px 3px 0 var(--ink); font-size: clamp(1.6rem, 6vw, 2.3rem); }
.legal h2 { font-size: 1.1rem; margin-top: 1.6rem; color: var(--yellow); text-shadow: 2px 2px 0 var(--ink); }
.legal p, .legal li { max-width: 68ch; }
.legal a { color: var(--yellow); }
.footer a { color: inherit; font-weight: 800; }
.map-actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.2rem; flex-wrap: wrap; }
.map-hint { text-align: center; font-size: .82rem; font-weight: 600; opacity: .9; margin: .8rem 0 0; }

/* Feuille de dialogue / mini-jeux (papier blanc, texte encre) */
.rsheet { position: fixed; inset: 0; z-index: 40; background: rgba(13,16,48,.7); display: flex; align-items: flex-end; justify-content: center; }
.rsheet__box { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; padding: 1.2rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom, 0px));
  background: #fff; color: var(--ink); border: 4px solid var(--ink); border-bottom: 0; border-radius: 22px 22px 0 0; animation: sheetUp .2s ease; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 720px) { .rsheet { align-items: center; } .rsheet__box { border-bottom: 4px solid var(--ink); border-radius: 22px; box-shadow: 8px 8px 0 var(--ink); } }
.rsheet .btn--ghost { color: var(--ink); border-color: var(--ink); }
.rsheet .btn--ghost:hover:not(:disabled) { background: var(--tint); }
.rs-head { display: flex; align-items: center; gap: .8rem; margin-bottom: .7rem; }
.rs-avatar { width: 58px; height: 58px; border-radius: 50%; background: var(--yellow); border: var(--line); display: grid; place-items: center; font-size: 1.9rem; flex: none; }
.rs-name { font-family: var(--display); font-size: 1.05rem; }
.rs-place { font-size: .75rem; font-weight: 700; color: var(--blue); }
.rs-text { margin: .5rem 0; }
.rs-actions { display: grid; gap: .7rem; margin-top: 1rem; }
.rs-actions .btn { width: 100%; text-align: left; }
.rs-title { margin: 0 0 .3rem; font-size: 1.2rem; color: var(--blue); }
.rs-hint { margin: 0 0 .5rem; font-size: .88rem; font-weight: 600; }
.rs-status { font-family: var(--display); text-align: center; margin-bottom: .6rem; min-height: 1.4em; }
.rs-stage { position: relative; }
.rs-quit { margin-top: .9rem; width: 100%; }
.rs-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 4rem; color: var(--yellow); z-index: 5;
  background: rgba(13,16,48,.6); border-radius: 14px; text-shadow: 3px 3px 0 var(--ink); }
.rs-stars { text-align: center; font-size: 2.4rem; color: var(--yellow); -webkit-text-stroke: 2px var(--ink); letter-spacing: .12em; margin: .3rem 0; }
.rs-big { text-align: center; font-family: var(--display); font-size: 1.2rem; margin: .3rem 0; }
.rs-gain { text-align: center; color: #0e8a52; font-weight: 800; }

/* Mini-jeu : frites */
.fries-tray { position: relative; height: 270px; border-radius: 16px; border: 5px solid var(--ink); outline: 5px solid var(--red); outline-offset: -10px;
  background: repeating-linear-gradient(45deg, #fff 0 14px, #ffe3df 14px 28px); overflow: hidden; touch-action: manipulation; }
.fries-mayo { position: absolute; right: 12px; bottom: 12px; width: 54px; height: 30px; border-radius: 50%; background: #fff3b0; border: 3px solid var(--ink); }
.fry { position: absolute; font-size: 2.1rem; line-height: 1; padding: 6px; background: none; border: 0; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.fry:active { transform: scale(.8) !important; }

/* Mini-jeu : cloche */
.bell-bar { position: relative; height: 48px; border-radius: 24px; background: var(--ink); border: var(--line); margin: 1.2rem 0; overflow: hidden; }
.bell-zone { position: absolute; top: 0; bottom: 0; background: var(--yellow); }
.bell-marker { position: absolute; top: 5px; bottom: 5px; width: 8px; margin-left: -4px; border-radius: 4px; background: #fff; box-shadow: 0 0 0 2px var(--red); }
.bell-pips { display: flex; gap: .5rem; justify-content: center; margin-bottom: .8rem; }
.bell-pips span { width: 28px; height: 28px; border-radius: 50%; background: var(--tint); border: 2px solid var(--ink); display: grid; place-items: center; font-size: .9rem; font-weight: 800; }
.bell-pips .ok { background: var(--green); color: #fff; } .bell-pips .ko { background: var(--red); color: #fff; }
.bell-btn { width: 100%; font-size: 1.2rem; padding: 1rem; text-align: center !important; }

/* Mini-jeu : canards */
.holes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.hole { aspect-ratio: 1; max-width: 100%; border-radius: 50%; border: var(--line); background: radial-gradient(circle at 50% 60%, var(--ink) 0 52%, #5fd08a 53%); position: relative; cursor: pointer; overflow: hidden; touch-action: manipulation; }
.critter { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; transform: translateY(110%); transition: transform .12s ease; }
.hole--up .critter { transform: translateY(0); }
.hole--hit { animation: shake .25s; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* Mini-jeu : danse */
.dance { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
.dpad { height: 84px; border-radius: 18px; border: var(--line); font-size: 2.2rem; cursor: pointer; opacity: .55; touch-action: manipulation; box-shadow: var(--hard); }
.dpad span { color: #fff; -webkit-text-stroke: 1px var(--ink); }
.dpad--lit { opacity: 1; transform: scale(1.05); box-shadow: 0 0 0 4px var(--yellow), var(--hard); }

/* Quiz / missions */
.q-text { font-family: var(--display); font-size: 1.05rem; margin: .4rem 0 .9rem; }
.q-opt { display: block; width: 100%; text-align: left; margin-bottom: .7rem; }
.q-opt--ok { background: var(--green) !important; color: #fff !important; }
.q-opt--ko { background: var(--red) !important; color: #fff !important; }
.quest { display: flex; gap: .7rem; align-items: center; padding: .7rem .1rem; border-bottom: 2px dashed #c9ccdc; }
.quest__ico { font-size: 1.4rem; width: 2rem; text-align: center; flex: none; }
.quest__body { flex: 1; min-width: 0; font-size: .88rem; }
.quest__body b { display: block; font-family: var(--display); font-weight: 400; color: var(--blue); }
.quest .btn { padding: .4rem .8rem; min-height: 38px; font-size: .8rem; box-shadow: 0 3px 0 var(--ink); }

.toast { position: fixed; left: 50%; bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60;
  background: var(--yellow); color: var(--ink); border: var(--line); border-radius: 999px; padding: .55rem 1.1rem; font-weight: 800; box-shadow: var(--hard);
  max-width: 92vw; text-align: center; font-size: .9rem; }

/* Contenu éditorial */
.about { max-width: 760px; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; border-top: 4px solid var(--ink); }
.about h2 { color: var(--yellow); font-size: 1.3rem; text-shadow: 2px 2px 0 var(--ink); }
.about h3 { font-size: 1.05rem; margin-top: 1.4rem; }
.about p, .about li { font-size: .98rem; max-width: 65ch; }
.about details { background: #fff; color: var(--ink); border: var(--line); border-radius: 12px; padding: .65rem .95rem; margin-bottom: .7rem; box-shadow: 0 3px 0 var(--ink); }
.about summary { cursor: pointer; font-weight: 800; }

@media (max-width: 560px) {
  .brand__tagline { display: none; }
  .fries-tray { height: 250px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Mode plein écran : le jeu occupe tout l'écran */
body.playing .header, body.playing .about, body.playing .footer { display: none; }
body.playing main { padding: .5rem .6rem calc(.5rem + env(safe-area-inset-bottom, 0px)); max-width: none; }
body.playing .hud { margin-bottom: .5rem; padding: .35rem .7rem; }
body.playing .rpg-map { max-width: min(520px, calc((100dvh - 190px) * 720 / 1040)); box-shadow: 5px 5px 0 var(--ink); }
body.playing .goto { margin-top: .6rem; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; }
body.playing .chip { flex: none; }
body.playing .map-actions { margin-top: .6rem; }
body.playing .map-hint { display: none; }

/* Mini-jeux : plein écran */
.rsheet--full { background: var(--blue) repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 14px, transparent 14px 28px); align-items: stretch; }
.rsheet--full .rsheet__box { background: transparent; color: #fff; max-width: none; width: 100%; height: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; animation: none;
  display: flex; flex-direction: column; justify-content: center; padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.2rem calc(1.2rem + env(safe-area-inset-bottom, 0px)); }
.rsheet--full #sheetBody { width: 100%; max-width: 560px; margin: 0 auto; }

/* Menu hamburger */
.header { position: relative; flex-wrap: nowrap; }
.burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 46px; height: 46px; padding: 0 11px; background: transparent; border: 2px solid var(--yellow); border-radius: 12px; cursor: pointer; }
.burger span { display: block; height: 3px; background: var(--yellow); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav[hidden] { display: none; }
.nav { position: absolute; right: .8rem; top: calc(100% + 6px); z-index: 30; flex-direction: column; gap: .2rem; min-width: 220px; padding: .5rem; background: var(--ink); border: 3px solid var(--yellow); border-radius: 14px; box-shadow: 5px 5px 0 rgba(0,0,0,.35); }
.nav a { font-size: .95rem; padding: .7rem .9rem; border-radius: 10px; }

/* Mitraillette */
.mitra__ticket, .mitra__build { display: flex; justify-content: center; gap: .5rem; margin: .5rem 0; }
.mitra__ticket { background: #fffbe0; border: 3px dashed var(--ink); border-radius: 12px; padding: .6rem; }
.mitra__t, .mitra__b { font-size: 2rem; width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 10px; }
.mitra__t.is-done { opacity: .25; } .mitra__t.is-now { background: var(--yellow); outline: 3px solid var(--ink); }
.mitra__b { background: var(--tint); border: 2px solid var(--ink); }
.mitra__pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .8rem; }
.mitra__ing { font-size: 2.2rem; padding: .8rem 0; background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); cursor: pointer; touch-action: manipulation; }
.mitra__ing:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.shake { animation: shk .3s; } @keyframes shk { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
/* Mémoire */
.memo { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin: .8rem 0; }
.memo__card { position: relative; aspect-ratio: 3 / 4; border: 3px solid var(--ink); border-radius: 12px; background: var(--blue); color: #fff; font-size: 1.8rem; cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform .25s, opacity .4s; padding: 0; }
.memo__card span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); }
.memo__card .memo__face { display: none; font-size: 2.4rem; background: #fff; border-radius: 9px; }
.memo__card.is-up { background: #fff; }
.memo__card.is-up .memo__back { display: none; } .memo__card.is-up .memo__face { display: grid; }
.memo__card.is-gone { opacity: 0; transform: scale(.4); pointer-events: none; }

/* Mitraillette ultime */
.grasse__tray { display: flex; flex-wrap: wrap; gap: .25rem; justify-content: center; align-items: center; min-height: 3.6rem; background: #fffbe0; border: 3px dashed var(--ink); border-radius: 12px; padding: .5rem; }
.grasse__bun, .grasse__ing { font-size: 1.7rem; }
.grasse__score { white-space: pre-line; text-align: center; font-weight: 800; margin: .6rem 0; font-size: .92rem; }
.grasse__pad { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; }
.grasse__btn { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .5rem; align-items: center; text-align: left; background: #fff; border: 3px solid var(--ink); border-radius: 12px; padding: .35rem .5rem; cursor: pointer; font: inherit; color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.grasse__btn:disabled { opacity: .35; cursor: not-allowed; box-shadow: none; }
.grasse__btn.is-used { background: var(--yellow); opacity: .7; }
.grasse__e { grid-row: span 2; font-size: 1.6rem; }
.grasse__n { font-weight: 800; font-size: .78rem; line-height: 1.1; }
.grasse__c { font-size: .7rem; opacity: .8; }

body.low-energy .bar--en i { background: var(--red); }
body.low-energy .hud__stat--en { animation: lowpulse 1s ease-in-out infinite; }
@keyframes lowpulse { 50% { opacity: .55; } }

.rsheet--full .rs-title { text-align: center; color: var(--yellow); font-size: clamp(1.5rem, 6vw, 2rem); text-shadow: 3px 3px 0 var(--ink); margin-bottom: .6rem; }
.rsheet--full .rs-hint, .rsheet--full .rs-text, .rsheet--full .rs-status, .rsheet--full .grasse__score { text-align: center; color: #fff; }
.rsheet--full .rs-big { color: #fff; font-size: 1.5rem; }
.rsheet--full .rs-gain { color: var(--yellow); font-size: 1.15rem; }
.rsheet--full .q-text { text-align: center; color: #fff; font-size: 1.2rem; }
.rsheet--full .rs-actions .btn { text-align: center; }
.rsheet--full .btn--ghost { background: #fff; }
.rsheet--full .q-opt { text-align: center; }

.memo__face svg { width: 82%; height: 82%; }
.memo__card .memo__face { padding: 4px; }

/* Cartes de collection */
.cards-grid { display: flex; gap: .9rem; flex-wrap: wrap; justify-content: center; margin: .8rem 0; }
.cards-grid--one { margin: .4rem 0 1rem; }
.tcard { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.tcard__svg { width: 150px; height: auto; filter: drop-shadow(4px 5px 0 rgba(13,16,48,.45)); animation: cardIn .7s cubic-bezier(.2,1.3,.4,1); }
.cards-grid--one .tcard__svg { width: 190px; }
@keyframes cardIn { from { transform: rotateY(90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.tcard__cap { font-weight: 800; font-size: .8rem; }
.tcard--locked .tcard__q { width: 150px; aspect-ratio: 200 / 280; display: grid; place-items: center; font: 3rem var(--display); color: rgba(13,16,48,.35); background: var(--tint); border: 3px dashed var(--ink); border-radius: 14px; }
.rsheet--full .tcard__cap { color: #fff; }

/* Accueil plein écran, pied de page en bas */
.wrap { flex: 1; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
main { display: flex; flex-direction: column; }
#homeScreen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding-bottom: 2rem; }
#homeScreen[hidden] { display: none; }
.footer a { display: block; margin-top: .35rem; }
.footer { margin-top: auto; }

/* Tour de frites */
.tour { position: relative; height: 360px; overflow: hidden; border: 4px solid var(--ink); border-radius: 16px; background: linear-gradient(#cfe3ff, #eef5ff); touch-action: manipulation; cursor: pointer; }
.tour::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: var(--ink); }
.tour__view { position: absolute; inset: 0; transition: transform .35s ease; }
.tour__blk { position: absolute; height: 30px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; overflow: hidden; color: #0d1030;
  background: repeating-linear-gradient(90deg, #ffd426 0 10px, #f2b90f 10px 13px); border: 3px solid var(--ink); border-radius: 7px; margin-bottom: 14px; }
.tour__base { background: repeating-linear-gradient(90deg, #ff4a3d 0 10px, #fff 10px 20px); }
.tour__fall { transition: transform .8s ease-in, opacity .8s; }
.tour__cur { box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
/* Cartes à jouer */
.ptable { display: flex; gap: 1.2rem; justify-content: center; margin: 1.2rem 0; padding: 1rem; border-radius: 16px; transition: background .2s; }
.ptable--ok { background: rgba(31,191,116,.35); } .ptable--ko { background: rgba(255,74,61,.35); }
.pcard { width: 100px; aspect-ratio: 3 / 4; background: #fff; border: 4px solid var(--ink); border-radius: 12px; box-shadow: 4px 5px 0 rgba(13,16,48,.45); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; animation: cardIn .45s cubic-bezier(.2,1.3,.4,1); }
.pcard__v { font: 2.6rem var(--display); line-height: 1; } .pcard__s { font-size: 2rem; line-height: 1.1; }
.pcard--back { background: var(--red) repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 8px, transparent 8px 16px); color: #fff; }

/* ===== Jeu de la cloche ===== */
.bellgame { position: relative; width: 100%; max-width: 420px; height: 110px; margin: 1rem auto; background: rgba(0,0,0,.28);
  border: 4px solid var(--ink); border-radius: 60px; overflow: hidden; touch-action: manipulation; }
.bellgame__zone { position: absolute; top: 0; bottom: 0; left: 37%; width: 26%; background: rgba(255,212,38,.35);
  border-left: 3px dashed var(--yellow); border-right: 3px dashed var(--yellow); display: flex; align-items: flex-end; justify-content: center;
  color: var(--yellow); font-family: var(--display); font-size: .8rem; padding-bottom: .3rem; transition: background .2s; }
.bellgame__zone--ok { background: rgba(80,220,110,.55); }
.bellgame__bell { position: absolute; top: 50%; left: 50%; font-size: 3rem; transform: translate(-50%,-50%); line-height: 1; will-change: left; }
.bellgame__bell--ok { animation: bellok .5s; }
.bellgame__bell--ko { animation: bellko .5s; filter: grayscale(1); }
@keyframes bellok { 30% { transform: translate(-50%,-50%) rotate(25deg) scale(1.3); } 60% { transform: translate(-50%,-50%) rotate(-20deg) scale(1.3); } }
@keyframes bellko { 30% { transform: translate(-50%,-50%) translateX(-6px); } 60% { transform: translate(-50%,-50%) translateX(6px); } }
.bell-pips { display: flex; gap: .5rem; justify-content: center; font-size: 1.4rem; color: #fff; margin-top: .4rem; }
.bell-pips .ok { color: #7dff9a; } .bell-pips .ko { color: var(--red); }
.bell-btn { display: block; margin: .5rem auto; font-size: 1.3rem; padding: 1rem 2rem; }

/* ===== Pub récompensée ===== */
.adbox { background: var(--ink); border: 4px solid var(--yellow); border-radius: 14px; padding: 1rem; text-align: center; color: #fff; margin: .6rem 0; }
.adbox__count { font-family: var(--display); font-size: 3.5rem; color: var(--yellow); }
.adbox__bar { height: 10px; background: rgba(255,255,255,.2); border-radius: 6px; overflow: hidden; margin-top: .6rem; }
.adbox__bar i { display: block; height: 100%; width: 0; background: var(--yellow); }

/* ===== Rythme de la cloche ===== */
.rhythm { position: relative; width: 100%; max-width: 420px; height: 96px; margin: 1rem auto; background: rgba(0,0,0,.3); border: 4px solid var(--ink); border-radius: 14px; overflow: hidden; touch-action: manipulation; }
.rhythm--on { background: rgba(255,212,38,.18); }
.rhythm__note { position: absolute; top: 18px; bottom: 18px; background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); border-radius: 12px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; overflow: hidden; white-space: nowrap; }
.rhythm__note--long { background: #ff9a3d; }
.rhythm__note--lit { background: #fff; transform: scale(1.06); box-shadow: 0 0 0 4px var(--yellow); }
.rhythm__note--ok { background: #7dff9a; } .rhythm__note--ko { background: var(--red); }
.rhythm__head { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 8px #fff; }
.bell-btn--on { transform: scale(.95); background: #fff; }
.bell-btn:disabled { opacity: .5; }
.tour__axis { position: absolute; left: 50%; top: 0; bottom: 14px; border-left: 2px dashed rgba(13,16,48,.25); }
.tour__target { position: absolute; top: 0; bottom: 14px; background: rgba(255,212,38,.25); pointer-events: none; display: none; }
.tour__blk { transition: background .2s; }
.tour__ok { background: #7dff9a !important; } .tour__ko { background: #ff8a80 !important; }

/* ===== Illustrations (remplacent les émojis) ===== */
.ico-w { display: inline-block; line-height: 1; }
.ico { width: 1.25em; height: 1.25em; vertical-align: -.28em; overflow: visible; stroke: #0d1030; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
