/* Public beta (js/gate.js, js/beta.js): « BÊTA » pill + note, first-open gate (18+ / terms), « Signaler un bug »,
   profile « Aide » block, account deletion. Phone rules here; tablet / desktop rules in responsive.css. Classes are
   prefixed (beta- / gt- / bug- / aide- / del-): meta.css has many short generic names. */

/* The stage never scrolls. #coco (mascot layer) is taller than the stage when the nav is hidden (shifted 73 px), so the
   overflow:hidden stage WAS programmatically scrollable: a click / a focused field (gate checkboxes, bug form) could
   scroll the whole game 73 px up for good. clip = not a scroll container (core.js also resets it, older Safari). */
#stage { overflow: clip; }

/* ---------- « BÊTA » pill ---------- */
.beta-pill { display: inline-flex; align-items: center; justify-content: center; flex: none; height: 22px; padding: 1px 9px 0;
  border-radius: 999px; border: 2px solid #fff; background: linear-gradient(180deg, #ff7ac0, #c9267c); color: #fff;
  font: 400 12px/1 var(--pop); letter-spacing: 1.2px; box-shadow: 0 2px 0 var(--ink), 0 0 0 1.5px var(--ink); white-space: nowrap;
  cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.beta-pill:active { translate: 0 1px; box-shadow: 0 1px 0 var(--ink), 0 0 0 1.5px var(--ink); }
span.beta-pill { cursor: default; }
.tb-beta { display: none; }
body.r-accueil:not(.lay-desk) .tb-beta { display: inline-flex; }
.tb-beta.tight { display: none !important; }
.nav-beta { display: none; }
.hm-beta { position: absolute; top: 12px; right: 12px; z-index: 6; }
#boot .bt-beta { justify-self: center; margin-top: -4px; height: 24px; font-size: 13px; }

/* the note (dark modal like the others) */
.mbox.bt-note { top: 250px; padding: 18px 16px 16px; }
.mbox.bt-note h3 { font-size: 26px; color: #fff; }
.mbox.bt-note p { font: 600 20px/1.12 var(--ui); color: #dfe3f7; margin-top: 10px; }
.mbox.bt-note .bt-acts { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.mbox.bt-note .btn { width: 100%; font-size: 19px; }
.mbox.bt-note .btn .bi { width: 22px; height: 22px; }
/* the test tool button of the profile: its 2-line label overflowed the 44 px button */
.prof .ptest .btn { font-size: 16px; line-height: 1.05; padding: 6px 12px 4px; }
.bi { width: 20px; height: 20px; fill: currentColor; flex: none; }

/* ---------- first-open gate ---------- */
#gate { position: absolute; inset: 0; z-index: 89; display: none; overflow-y: auto; overflow-x: hidden;
  background: radial-gradient(120% 70% at 50% 18%, rgba(155,92,255,.32), rgba(155,92,255,0) 60%),
              radial-gradient(90% 50% at 50% 100%, rgba(255,79,163,.18), rgba(255,79,163,0) 70%), linear-gradient(180deg, #14173a, var(--bg2)); }
#gate.on { display: grid; place-items: center; }
body.gating #boot { visibility: hidden; }
#gateLang { position: absolute; top: 12px; right: 12px; z-index: 2; min-width: 1px; min-height: 1px; }
.gt-box { width: min(350px, calc(100% - 40px)); display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 24px 0 28px; text-align: center; }
.gt-logo { position: relative; align-self: center; width: 290px; height: 150px; }
.gt-logo .brand { width: 100%; height: 100%; }
.gt-logo .gt-beta { position: absolute; right: 2px; bottom: 6px; z-index: 3; rotate: -6deg; }   /* above .brand img (z 1) */
.gt-hello { margin: 0 0 6px; font: 600 22px/1.08 var(--ui); color: #dfe3f7; }
.gt-no .gt-hello { font-size: 25px; color: #fff; padding: 18px 8px; }
.gt-ck { position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 9px 12px 7px 12px; border-radius: 16px; text-align: left;
  background: rgba(255,255,255,.07); border: 2.5px solid rgba(255,255,255,.22); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gt-ck input, .bug-ck input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gt-bx { flex: none; position: relative; width: 30px; height: 30px; border-radius: 9px; border: 3px solid #fff; background: rgba(0,0,0,.25); box-shadow: 0 2px 0 rgba(0,0,0,.5); }
.gt-bx::after { content: ""; position: absolute; left: 7px; top: 1px; width: 9px; height: 16px; border: solid var(--ink); border-width: 0 4px 4px 0; rotate: 42deg; opacity: 0; }
input:checked + .gt-bx { background: var(--y); }
input:checked + .gt-bx::after { opacity: 1; }
input:focus-visible + .gt-bx { outline: 3px solid var(--cyan); outline-offset: 2px; }
.gt-ck:has(input:checked) { border-color: var(--y); background: rgba(255,210,26,.1); }
.gt-tx { font: 600 20px/1.1 var(--ui); color: #fff; }
.gt-tx a { color: var(--y); text-decoration: underline; text-underline-offset: 2px; }
.gt-play { width: 100%; min-height: 60px; margin-top: 8px; font-size: 26px; }
.gt-play[disabled] { filter: grayscale(1) brightness(.7); box-shadow: 0 4px 0 #333, 0 8px 14px rgba(0,0,0,.4); }
.gt-err { margin: 0; font: 600 18px/1.1 var(--ui); color: #ff8fa3; }
.gt-minor { align-self: center; margin-top: 2px; padding: 6px 10px; background: none; border: 0; color: #aab1d6; font: 600 18px/1 var(--ui); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- profile: scroll when long; « Aide » block ---------- */
.sbox.prof { max-height: calc(var(--H, 844px) - 20px); overflow-y: auto; overscroll-behavior: contain; }
.aide { margin-top: 12px; padding: 10px 10px 8px; border-radius: 16px; background: #f2f0fb; border: 2px solid rgba(11,13,28,.12); }
.aide-h { display: block; margin-bottom: 8px; font: 400 13px/1 var(--pop); letter-spacing: .8px; color: #5d6386; text-transform: uppercase; }
.aide-g { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.aide-r { display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 4px 9px 2px; border-radius: 12px; border: 2.5px solid var(--ink); background: #fff;
  color: var(--ink); font: 600 18px/1 var(--ui); text-align: left; text-decoration: none; box-shadow: 0 3px 0 rgba(11,13,28,.25); cursor: pointer; }
.aide-r .bi { width: 22px; height: 22px; color: #7b3fe0; }
.aide-r[data-aide=bug] .bi { color: #d61f72; }
.aide-r:active { translate: 0 2px; box-shadow: 0 1px 0 rgba(11,13,28,.25); }
.aide-r[disabled] { opacity: .55; }
.aide-id { display: flex; align-items: center; gap: 8px; margin-top: 9px; font: 600 17px/1 var(--ui); color: #444a70; }
.aide-id code { padding: 4px 8px 3px; border-radius: 8px; background: var(--ink); color: var(--y); font: 700 16px/1 ui-monospace, Menlo, monospace; letter-spacing: 1.5px; user-select: all; -webkit-user-select: all; }
.aide-cp { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px 3px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: 600 16px/1 var(--ui); cursor: pointer; }
.aide-cp .bi { width: 16px; height: 16px; }
.aide-legal { margin-top: 9px; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font: 600 16px/1.2 var(--ui); }
.aide-legal a { color: #3a3f8f; text-decoration: underline; text-underline-offset: 2px; }
.aide-legal i { color: #9aa0c0; font-style: normal; }
.aide-del { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 40px; margin-top: 9px; border-radius: 12px; border: 2px solid #d61f45; background: #fff; color: #d61f45; font: 600 17px/1 var(--ui); cursor: pointer; }
.aide-del .bi { width: 18px; height: 18px; }
.aide-ver { margin-top: 8px; text-align: center; font: 600 14px/1 var(--ui); letter-spacing: .3px; color: #7a80a3; }

/* ---------- « Signaler un bug » (light sheet like the profile) ---------- */
.sbox.bug-sheet { max-height: calc(var(--H, 844px) - 20px); overflow-y: auto; overscroll-behavior: contain; }
.bug-sheet h3 { display: flex; align-items: center; gap: 8px; }
.bug-sheet h3 .bi { width: 24px; height: 24px; color: #d61f72; }
.bug-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bug-cat { min-height: 38px; padding: 3px 4px 1px; border-radius: 12px; border: 2.5px solid var(--ink); background: #fff; color: var(--ink); font: 600 18px/1 var(--ui); cursor: pointer; }
.bug-cat.on { background: linear-gradient(180deg, #ff7ac0, #e6268a); color: #fff; box-shadow: 0 3px 0 #7a0f48; }
.bug-lbl { display: block; margin: 10px 0 4px; font: 400 14px/1 var(--pop); letter-spacing: .6px; color: #5d6386; text-transform: uppercase; }
#bugMsg { display: block; width: 100%; box-sizing: border-box; min-height: 112px; max-height: 220px; resize: vertical; padding: 9px 10px; border-radius: 12px; border: 2.5px solid var(--ink); background: #fff; color: var(--ink);
  font: 400 16px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; user-select: text; -webkit-user-select: text; outline: none; }
#bugMsg:focus { border-color: #7b3fe0; box-shadow: 0 0 0 3px rgba(123,63,224,.2); }
.bug-cnt { display: flex; justify-content: space-between; margin-top: 3px; font: 600 15px/1 var(--ui); color: #7a80a3; }
.bug-cnt b { font-weight: 600; }
.bug-cnt b.ok { color: #19a052; }
.bug-img { margin-top: 8px; min-height: 40px; display: flex; align-items: center; }
.bug-pick { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 3px 12px 1px; border-radius: 12px; border: 2px dashed rgba(11,13,28,.45); background: #faf9ff; color: var(--ink); font: 600 17px/1 var(--ui); cursor: pointer; }
.bug-pick .bi { width: 20px; height: 20px; color: #7b3fe0; }
.bug-thumb { display: inline-flex; align-items: center; gap: 10px; }
.bug-thumb[hidden], .bug-pick[hidden] { display: none; }
.bug-thumb img { height: 56px; max-width: 120px; object-fit: cover; border-radius: 8px; border: 2px solid var(--ink); }
.bug-rm { padding: 4px 10px 2px; border-radius: 10px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: 600 16px/1 var(--ui); cursor: pointer; }
.bug-ck { position: relative; display: flex; align-items: center; gap: 9px; margin-top: 9px; font: 600 18px/1.05 var(--ui); color: var(--ink); cursor: pointer; }
.bug-ck .gt-bx { width: 26px; height: 26px; border-radius: 8px; border-color: var(--ink); background: #fff; box-shadow: none; }
.bug-ck .gt-bx::after { left: 6px; top: 0; width: 8px; height: 14px; }
.bug-see { margin-top: 3px; padding: 3px 0; background: none; border: 0; color: #3a3f8f; font: 600 15px/1 var(--ui); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.bug-pre { max-height: 140px; overflow: auto; margin: 4px 0 0; padding: 7px 8px; border-radius: 10px; background: #0b0d1c; color: #c9f7d4; font: 11px/1.3 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-all; user-select: text; -webkit-user-select: text; }
.bug-err { margin: 8px 0 0; font: 600 17px/1.1 var(--ui); color: #d61f45; }
.bug-sheet .mrow { display: flex; gap: 8px; }
.bug-sheet .mrow .btn { flex: 1; }
.bug-done { padding: 10px 4px 2px; text-align: center; }
.bug-ok { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(180deg, #4ef08a, #19b052); border: 3px solid var(--ink); box-shadow: 0 4px 0 #0b5a2a; }
.bug-ok .bi { width: 40px; height: 40px; color: #fff; }
.bug-done h3 { justify-content: center; margin: 10px 0 4px; }
.bug-done p { margin: 0 0 4px; font: 600 20px/1.12 var(--ui); color: #2b3050; }

/* ---------- account deletion (dark modal) ---------- */
.mbox.del-box { top: 230px; }
.mbox.del-box h3 { color: #fff; }
.mbox.del-box p { margin-top: 10px; font: 600 19px/1.12 var(--ui); color: #dfe3f7; }
.del-in { display: block; width: 100%; box-sizing: border-box; margin-top: 12px; height: 48px; padding: 0 12px; border-radius: 12px; border: 3px solid #fff; background: #0b0d1c; color: #fff;
  font: 700 20px/1 ui-monospace, Menlo, monospace; letter-spacing: 3px; text-align: center; text-transform: uppercase; user-select: text; -webkit-user-select: text; outline: none; }
.del-in:focus { border-color: #ff6a7f; }
.del-err { margin: 8px 0 0; font: 600 17px/1.1 var(--ui); color: #ff8fa3; }
