/* JeuxTel — feuille de style (mobile-first, thème sombre) */
:root {
  --bg: #0b1220;
  --card: #121c2e;
  --card2: #182540;
  --line: rgba(255, 255, 255, .09);
  --txt: #e5ecf5;
  --dim: #8b9bb4;
  --accent: #3b82f6;
  --ok: #22c55e;
  --bad: #ef4444;
  --chrono: #f97316;
  --theme: #10b981;
  --imposteur: #f43f5e;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--txt); line-height: 1.45;
  overscroll-behavior-y: none;
}
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  max-width: 560px; margin: 0 auto; padding: calc(var(--safe-t) + .75rem) 1.1rem calc(var(--safe-b) + 1.25rem); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
p { margin: .4rem 0; }
a { color: var(--accent); }
.dim { color: var(--dim); }
.small { font-size: .85rem; }
.center { text-align: center; }
.grow { flex: 1; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }

/* --- en-tête d'écran --- */
.top { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.top h1 { flex: 1; font-size: 1.3rem; }
.back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--txt);
  text-decoration: none; font-size: 1.4rem; line-height: 1; }
.badge { font-size: .75rem; padding: .2rem .55rem; border-radius: 999px; background: var(--card2); color: var(--dim); }

/* --- cartes --- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1rem 1.1rem; }
.hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 40%; border-radius: 16px; display: block; }
.game-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform .1s; }
.game-card:active { transform: scale(.985); }
.game-card .head { position: relative; }
.game-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 45%; display: block; }
.game-card .head .n { position: absolute; left: .75rem; top: .75rem; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; color: #0b1220; }
.game-card .body { padding: .85rem 1rem 1rem; }
.game-card b { font-size: 1.1rem; display: block; margin-bottom: .15rem; }
.game-card .body span { color: var(--dim); font-size: .9rem; }
.c-chrono .n { background: var(--chrono); }
.c-theme .n { background: var(--theme); }
.c-imposteur .n { background: var(--imposteur); }

/* --- accueil --- */
.brand { display: flex; align-items: center; gap: .9rem; margin: .25rem 0 1.1rem; }
.brand img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.brand h1 { font-size: 1.7rem; }
.brand p { margin: 0; color: var(--dim); font-size: .92rem; }

/* --- boutons --- */
button, .btn { font: inherit; cursor: pointer; border: 0; border-radius: 14px; padding: .8rem 1.1rem; font-weight: 600;
  background: var(--card2); color: var(--txt); touch-action: manipulation; }
button:active { filter: brightness(1.15); }
button:disabled { opacity: .45; cursor: default; }
.primary { background: var(--accent); color: #fff; }
.big { width: 100%; padding: 1.05rem; font-size: 1.1rem; }
.ghost { background: transparent; border: 1px solid var(--line); }
.danger { background: var(--bad); color: #fff; }
.good { background: var(--ok); color: #05250f; }
.g-chrono .primary { background: var(--chrono); color: #1a0d00; }
.g-theme .primary { background: var(--theme); color: #032116; }
.g-imposteur .primary { background: var(--imposteur); color: #fff; }
.btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.btnrow.three { grid-template-columns: 1fr 1fr 1fr; }

/* --- champs --- */
label.f { display: block; }
label.f > span { display: block; font-size: .85rem; color: var(--dim); margin-bottom: .3rem; }
input[type=text] { width: 100%; font: inherit; font-size: 1.05rem; padding: .75rem .9rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card2); color: var(--txt); outline: none; }
input[type=text]:focus { border-color: var(--accent); }
.num { display: flex; align-items: center; gap: .5rem; }
.num button { width: 46px; height: 46px; padding: 0; font-size: 1.4rem; border-radius: 12px; flex: none; }
.num input { flex: 1; min-width: 0; text-align: center; font: inherit; font-size: 1.2rem; font-weight: 700;
  padding: .6rem .3rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); color: var(--txt);
  -moz-appearance: textfield; appearance: textfield; }
.num input::-webkit-outer-spin-button, .num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.num .unit { color: var(--dim); min-width: 1.4rem; }

/* --- joueurs --- */
.players { display: flex; flex-direction: column; gap: .5rem; }
.players .list { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.players .list input { width: 100%; font: inherit; padding: .6rem .7rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card2); color: var(--txt); outline: none; }
.players .list input:focus { border-color: var(--accent); }

/* --- écrans de jeu --- */
.pass { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: .6rem; }
.pass .who { font-size: 2rem; font-weight: 800; }
.pass .emoji { font-size: 3.2rem; line-height: 1; }
.turn { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .8rem; }
.turn .who { font-size: 1.5rem; font-weight: 800; }
.hold { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; width: min(72vw, 300px); height: min(72vw, 300px);
  border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; letter-spacing: .04em;
  background: radial-gradient(circle at 35% 30%, #fff3, transparent 55%), var(--accent);
  color: #fff; box-shadow: 0 10px 40px rgba(59, 130, 246, .35), inset 0 -8px 0 rgba(0, 0, 0, .2);
  transition: transform .08s, box-shadow .08s; margin: 1rem 0; }
.hold.held { transform: scale(.94); box-shadow: 0 2px 10px rgba(0, 0, 0, .4), inset 0 -2px 0 rgba(0, 0, 0, .2); animation: pulse 1.2s ease-in-out infinite; }
.g-chrono .hold { background: radial-gradient(circle at 35% 30%, #fff3, transparent 55%), var(--chrono); box-shadow: 0 10px 40px rgba(249, 115, 22, .35), inset 0 -8px 0 rgba(0, 0, 0, .2); color: #1a0d00; }
.g-imposteur .hold { background: radial-gradient(circle at 35% 30%, #fff3, transparent 55%), var(--imposteur); box-shadow: 0 10px 40px rgba(244, 63, 94, .35), inset 0 -8px 0 rgba(0, 0, 0, .2); }
@keyframes pulse { 50% { filter: brightness(1.12); } }

.clock { font-variant-numeric: tabular-nums; font-size: 4.2rem; font-weight: 800; line-height: 1; margin: .5rem 0; }
.clock.near { color: var(--chrono); }
.clock.warn { color: var(--bad); animation: blink .5s steps(2) infinite; }
.hold.near { box-shadow: 0 0 0 6px var(--chrono), 0 10px 40px rgba(249, 115, 22, .55); }
@keyframes blink { 50% { opacity: .35; } }
.bar { width: 100%; height: 10px; border-radius: 999px; background: var(--card2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.g-theme .bar > i { background: var(--theme); }
.g-imposteur .bar > i { background: var(--imposteur); }
.theme-word { font-size: 1.6rem; font-weight: 800; padding: .8rem 1rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); width: 100%; word-break: break-word; }

/* --- rôles --- */
.role { width: 100%; padding: 1.4rem 1.1rem; border-radius: 18px; text-align: center; }
.role .t { font-size: 1.9rem; font-weight: 900; margin-bottom: .4rem; }
.role .v { font-size: 3rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.role.innocent { background: linear-gradient(160deg, #0f3b2e, #0b1220); border: 1px solid #10b98155; }
.role.imposteur { background: linear-gradient(160deg, #4a0f1f, #0b1220); border: 1px solid #f43f5e66; }

/* --- résultats --- */
.result { flex: 1; display: flex; flex-direction: column; gap: .8rem; }
.result .headline { text-align: center; padding: 1.2rem .8rem; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.result .headline .emoji { font-size: 3rem; line-height: 1; }
.result .headline .who { font-size: 1.5rem; font-weight: 800; margin-top: .3rem; }
.list { display: flex; flex-direction: column; gap: .4rem; }
.item { display: flex; align-items: center; gap: .7rem; padding: .65rem .85rem; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.item .name { flex: 1; font-weight: 600; }
.item .val { font-variant-numeric: tabular-nums; font-weight: 700; }
.item.lose { border-color: var(--bad); background: #2a1317; }
.item.win { border-color: var(--ok); background: #0f2a1a; }
.item.out { opacity: .5; }
.item.out .name { text-decoration: line-through; }
.item.imp { border-color: var(--imposteur); background: #2a1319; }
.item .sub { color: var(--dim); font-size: .8rem; font-weight: 400; display: block; }
.item .mini { height: 6px; border-radius: 999px; background: var(--accent); margin-top: .3rem; }
button.item { width: 100%; text-align: left; font-weight: 600; }

/* --- tuto installation --- */
.tabs { display: flex; gap: .4rem; margin-bottom: .7rem; }
.tabs button { flex: 1; padding: .55rem; font-size: .9rem; }
.tabs button.on { background: var(--accent); color: #fff; }
ol.steps { margin: .3rem 0 0; padding-left: 1.3rem; }
ol.steps li { margin: .35rem 0; }
kbd { font: inherit; font-size: .85em; background: var(--card2); border: 1px solid var(--line); border-radius: 6px; padding: .05rem .4rem; }
.install-ok { color: var(--ok); font-weight: 600; }

footer { text-align: center; color: var(--dim); font-size: .82rem; padding: 1.25rem 0 0; margin-top: 1.5rem; border-top: 1px solid var(--line); }
.rules { color: var(--dim); font-size: .92rem; margin: .5rem 0 .9rem; }
.rules b { color: var(--txt); }

/* --- jeu 4 : imposteur photo --- */
:root { --photo: #8b5cf6; }
.c-photo .n { background: var(--photo); color: #fff; }
.g-photo .primary { background: var(--photo); color: #fff; }
.g-photo .bar > i { background: var(--photo); }
.btn.big { display: block; text-align: center; }
label.btn { user-select: none; }
button.small { padding: .5rem .7rem; font-size: .85rem; }
textarea { width: 100%; font: inherit; font-size: 1rem; padding: .7rem .9rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card2); color: var(--txt); outline: none; resize: vertical; min-height: 4.5rem; }
textarea:focus { border-color: var(--photo); }
.preview { width: 100%; aspect-ratio: 4 / 3; border-radius: 16px; background: var(--card); border: 1px dashed var(--line);
  display: grid; place-items: center; overflow: hidden; }
.preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene { width: 100%; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.scene img { width: 100%; display: block; }
.thumb { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: var(--card2); }
.spin { width: 56px; height: 56px; border-radius: 50%; border: 5px solid var(--card2); border-top-color: var(--photo); animation: spin 1s linear infinite; margin-bottom: .5rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.role .v { word-break: break-word; }
select.sel { width: 100%; font: inherit; font-size: .95rem; padding: .75rem .6rem; border-radius: 14px; border: 1px solid var(--line);
  background: var(--card2); color: var(--txt); outline: none; }

/* --- jeu 5 : imposteur mots --- */
:root { --mots: #f59e0b; }
.c-mots .n { background: var(--mots); color: #1a0d00; }
.g-mots .primary { background: var(--mots); color: #1a0d00; }
.g-mots .tabs button.on { background: var(--mots); color: #1a0d00; }
.g-mots input[type=text]:focus, .g-mots .players .list input:focus { border-color: var(--mots); }
.g-mots .role.innocent { background: linear-gradient(160deg, #3a2a08, #0b1220); border: 1px solid #f59e0b66; }
.g-mots .role .v { font-size: 2.4rem; word-break: break-word; }
.item .n { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: .9rem;
  background: var(--card2); color: var(--dim); flex: none; }
.g-mots .item .n { background: var(--mots); color: #1a0d00; }
.ghost.big { border: 1px solid var(--line); }

/* --- mode en ligne --- */
.tabs.mode { margin: 0 0 .9rem; }
.online-card { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: inherit; padding: .9rem 1rem; border-radius: 18px;
  background: linear-gradient(135deg, #1e3a8a, #0f2a5f); border: 1px solid #3b82f666; }
.online-card .ic { font-size: 1.8rem; }
.online-card > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.online-card b { font-size: 1.1rem; }
.online-card .chev { font-size: 1.6rem; color: var(--dim); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 3rem; font-weight: 900; letter-spacing: .25em; margin: .2rem 0 .3rem; padding-left: .25em; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .1em; }
input.codein { text-transform: uppercase; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.5rem; letter-spacing: .3em; text-align: center; }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.pick button { padding: .7rem .5rem; font-size: .9rem; border: 1px solid var(--line); }
.pick button.on { background: var(--accent); color: #fff; border-color: transparent; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pgrid figure { margin: 0; }
.pgrid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--card2); display: block; }
.pgrid figcaption { font-size: .8rem; color: var(--dim); text-align: center; margin-top: .2rem; }
#toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 1.2rem); transform: translate(-50%, 20px); background: #2a1317; border: 1px solid var(--bad); color: var(--txt);
  padding: .6rem 1rem; border-radius: 12px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: 90vw; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#net { position: fixed; top: calc(var(--safe-t) + .5rem); left: 50%; transform: translateX(-50%); background: #3a2a08; border: 1px solid var(--chrono); color: var(--txt);
  padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; display: none; z-index: 50; }
#net.on { display: block; }
.g-online .item.win { border-color: var(--accent); background: #10203a; }

/* --- vue PC (≥ 900 px) : accueil en grille, formulaires sur 2 colonnes, lobby avec colonne latérale --- */
.pconly { display: none; }
.qr svg { width: 100%; height: auto; display: block; border-radius: 10px; background: #fff; }
html.pc .pconly { display: flex; }
html.pc #install { display: none; }
html.pc #app { max-width: 1140px; padding: 1.5rem 2rem 2rem; }
html.pc .brand { margin-bottom: 1.4rem; }
html.pc .brand h1 { font-size: 2.1rem; }
html.pc .home .stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
html.pc .online-card { padding: 1.1rem 1.4rem; }
html.pc #pcqr { gap: 1.5rem; align-items: center; }
html.pc #pcqr .qr { width: 150px; flex: none; }
html.pc .hero { aspect-ratio: 3 / 1; object-position: center 35%; }
html.pc .rules { font-size: 1rem; }
html.pc .stack:has(> #go) { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.6rem; align-items: start; }
html.pc .stack:has(> #go) > #players, html.pc .stack:has(> #go) > #go, html.pc .stack:has(> #go) > p, html.pc .stack:has(> #go) > .btnrow { grid-column: 1 / -1; }
html.pc .players .list { grid-template-columns: repeat(4, 1fr); }
html.pc .turn, html.pc .pass, html.pc .result, html.pc .primary.big:not(.pcwrap .primary.big), html.pc .btnrow { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }
html.pc .hold { width: min(42vh, 340px); height: min(42vh, 340px); font-size: 1.8rem; }
html.pc .clock { font-size: 5.5rem; }
html.pc .pass .who { font-size: 2.6rem; }
html.pc .role .v { font-size: 3.6rem; }
html.pc .pcwrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.6rem; align-items: start; }
html.pc .side { position: sticky; top: 1rem; }
html.pc .side .code { font-size: 2.2rem; letter-spacing: .2em; margin: 0 0 .5rem; }
html.pc .side .qr { width: 170px; margin: 0 auto; }
html.pc .side .item { padding: .5rem .7rem; }
html.pc .pcmain { min-height: 70vh; display: flex; flex-direction: column; }
html.pc .pcmain .turn, html.pc .pcmain .pass, html.pc .pcmain .result { flex: 1; }
html.pc #menu { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
html.pc #menu > #namef { grid-column: 1 / -1; }
html.pc #menu > .card { margin-top: 0; }
html.pc .pick { grid-template-columns: repeat(5, 1fr); }
html.pc .pgrid { grid-template-columns: repeat(3, 1fr); }
html.pc .pcmain .lobbyhead { display: none; }   /* le code + QR sont déjà dans la colonne latérale */

/* --- accueil : bloc en ligne (créer / rejoindre) --- */
.online-box { display: flex; flex-direction: column; gap: .7rem; padding: .9rem 1rem; border-radius: 18px; background: linear-gradient(135deg, #1e3a8a, #0f2a5f); border: 1px solid #3b82f666; }
.online-box .row b { font-size: 1.1rem; }
.joinrow { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.joinrow form { display: flex; gap: .4rem; }
.joinrow form input { flex: 1; min-width: 0; width: auto; font-size: 1.1rem; letter-spacing: .2em; padding: .6rem .4rem; }
.joinrow form button { flex: none; padding: .8rem .7rem; font-size: .95rem; }
.joinrow > * { min-width: 0; }
@media (max-width: 520px) { .joinrow { grid-template-columns: 1fr; } }
html.pc .online-box { flex-direction: row; align-items: center; gap: 1.2rem; padding: 1rem 1.4rem; }
html.pc .online-box .row { flex-direction: column; align-items: flex-start; gap: 0; flex: none; }
html.pc .joinrow { flex: 1; }
.online-box { overflow: hidden; } .online-box .row { flex-wrap: wrap; }

/* ================= refonte v14 : accueil « le mode d'abord », familles, lobby en trois temps ================= */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.newtag { font-size: .62rem; font-weight: 700; padding: .12rem .45rem; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; vertical-align: middle; letter-spacing: 0; }
.btn.white, button.white { background: #e5ecf5; color: #0b1220; }
.btn.ghostw { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; }
.home .btn.big, .g-online .btn.big { display: block; text-align: center; text-decoration: none; }

/* sélecteur de mode */
.modesw { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); margin-bottom: .85rem; }
.modesw button { text-align: left; background: transparent; border-radius: 13px; padding: .6rem .8rem; display: flex; flex-direction: column; gap: 1px; }
.modesw button b { font-size: 1rem; }
.modesw button small { color: var(--dim); font-size: .78rem; font-weight: 400; }
.modesw button.on { background: #2563eb; color: #fff; box-shadow: 0 4px 16px rgba(37,99,235,.4); }
.modesw button.on small { color: #dbe7ff; }
.modesw button.on.local { background: #e5ecf5; color: #0b1220; box-shadow: none; }
.modesw button.on.local small { color: #3c4a63; }

/* bloc lobby (accueil + menu en ligne) */
.lobbybox { display: flex; flex-direction: column; gap: .6rem; padding: .95rem 1rem 1rem; border-radius: 18px; background: linear-gradient(150deg, #17306f, #0f2250); border: 1px solid #3b82f666; }
.lobbybox.plain { background: var(--card); border-color: var(--line); }
.lobbybox h2 { font-size: 1.05rem; }
.lobbybox .hint { margin: 0; color: #c6d4f2; font-size: .85rem; }
.sep { display: flex; align-items: center; gap: .6rem; color: #c6d4f2; font-size: .82rem; font-weight: 600; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.18); }
.lobbybox .joinrow, .dock .joinrow { display: flex; align-items: center; gap: .5rem; grid-template-columns: none; }
.lobbybox .joinrow .code4 { flex: 1; }
.lobbybox .joinrow button { flex: none; width: auto; padding: .8rem .9rem; font-size: 1rem; }
.joincol { display: flex; flex-direction: column; gap: .6rem; }
.code4 { display: flex; gap: .4rem; }
.code4 input { flex: 1; min-width: 0; width: 100%; height: 3.1rem; text-align: center; font: inherit; font-size: 1.5rem; font-weight: 800; text-transform: uppercase;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.3); background: rgba(11,18,32,.65); color: var(--txt); outline: none; padding: 0; }
.code4 input:focus { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.2); }

/* familles */
.fam { position: relative; display: flex; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.fam > img { width: 88px; flex: none; object-fit: cover; display: block; }
.fam .fb { flex: 1; min-width: 0; padding: .75rem .85rem; display: flex; flex-direction: column; gap: .4rem; }
.fam h2 { font-size: 1.15rem; line-height: 1.1; }
.fam p { margin: 0; color: var(--dim); font-size: .88rem; }
.fam.v { flex-direction: column; }
.fam.v > img { width: 100%; aspect-ratio: 16 / 6; }
.fam .stretch { position: absolute; inset: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { font-size: .82rem; font-weight: 600; padding: .4rem .75rem; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--line); color: var(--txt); text-decoration: none; }
.rows { display: flex; flex-direction: column; gap: .35rem; }
.rowi { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .7rem .8rem; border-radius: 12px; background: rgba(255,255,255,.06);
  color: var(--txt); text-decoration: none; font-size: .95rem; text-align: left; width: 100%; }
.rowi b { font-weight: 700; }
.rowi small { color: var(--dim); font-size: .8rem; font-weight: 400; text-align: right; }
.rowi.off { opacity: .6; }
a.rowi:active, a.chip:active { filter: brightness(1.2); }
.modeline { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 .8rem; padding: .5rem .8rem; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: .85rem; color: var(--dim); }
.modeline a { font-weight: 600; text-decoration: none; }

/* lobby en trois temps */
.steps { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; color: var(--dim); margin-bottom: .9rem; }
.steps span { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.steps i { font-style: normal; width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center; background: var(--card2); font-size: .75rem; }
.steps .now { color: var(--txt); } .steps .now i { background: #2563eb; color: #fff; }
.steps .done i { background: var(--ok); color: #03261a; }
.steps u { flex: 1; height: 2px; background: var(--line); text-decoration: none; min-width: .5rem; }
.invite { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.invite .code { margin: 0; }
.invite .qr { width: 150px; }
.invite .btnrow { width: 100%; }
.av { font-style: normal; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #0b1220; flex: none; }
.avs { display: flex; } .avs .av { margin-left: -.35rem; border: 2px solid var(--bg); }
.item.wait { border-style: dashed; background: transparent; color: var(--dim); }
.bigtitle { font-size: 1.5rem; line-height: 1.15; margin: .2rem 0 .4rem; }
.acc { display: flex; flex-direction: column; gap: .45rem; margin: .8rem 0; }
.accfam { border-radius: 14px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.acchead { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .6rem; background: transparent; border-radius: 0; padding: .8rem .9rem; }
.acchead b { font-size: 1.05rem; } .acchead small { color: var(--dim); font-weight: 400; font-size: .8rem; }
.accbody { display: none; flex-direction: column; gap: .35rem; padding: 0 .6rem .6rem; }
.accfam.open .accbody { display: flex; }
.accfam.open { border-color: rgba(255,255,255,.28); }
.rowi.radio { border: 0; justify-content: flex-start; }
.rowi.radio .grow { display: flex; flex-direction: column; gap: 1px; } .rowi.radio small { text-align: left; }
.dotr { width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--dim); flex: none; }
.rowi.radio.sel { background: rgba(37,99,235,.22); outline: 1.5px solid #3b82f6; }
.rowi.radio.sel .dotr { border-color: #60a5fa; background: radial-gradient(circle, #60a5fa 45%, transparent 50%); }
#toast.ok { background: #0f2a1a; border-color: var(--ok); }

/* accueil PC, façon console */
html.pc .home.pc { max-width: 1240px; }
.console { display: flex; flex-direction: column; gap: 1.1rem; height: calc(100dvh - 3.5rem); min-height: 620px; }
.chead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.chead .brand { margin: 0; } .chead p { margin: 0; font-size: .9rem; }
.hero2 { flex: 1 1 0; min-height: 300px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); border-radius: 28px; overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.hero2 > img { width: 100%; height: 100%; min-height: 0; object-fit: cover; display: block; }
.hero2 .hb { padding: 1.6rem 2.4rem; display: flex; flex-direction: column; justify-content: center; gap: .7rem; min-height: 0; overflow: auto; }
.hero2 h2 { font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -.02em; }
.hero2 .lead { margin: 0; font-size: 1.15rem; line-height: 1.45; }
.hero2 .dim { margin: 0; }
.hero2 .rowi { padding: .8rem 1rem; font-size: 1.02rem; }
.btn.cta { align-self: flex-start; color: #0b1220; font-size: 1.1rem; padding: .85rem 1.5rem; text-decoration: none; border-radius: 14px; }
.thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.thumbs button { background: transparent; padding: 0; display: flex; flex-direction: column; gap: .45rem; color: var(--dim); font-size: .95rem; border-radius: 14px; }
.thumbs img { width: 100%; height: 84px; object-fit: cover; border-radius: 14px; border: 3px solid transparent; opacity: .6; display: block; }
.thumbs button.sel { color: var(--txt); } .thumbs button.sel img { border-color: var(--c); opacity: 1; }
.dock { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: .7rem .9rem; border-radius: 24px; background: #0f1a30; border: 1px solid var(--line); }
.dock .modesw { margin: 0; width: 25rem; flex: none; }
.lobbyline { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; }
.lobbyline .btn { text-decoration: none; padding: .8rem 1.1rem; white-space: nowrap; }
.dock .code4 { width: 12.5rem; } .dock .code4 input { height: 3rem; }
.dock .joinrow button { padding: .8rem 1rem; }
html.pc .invite .qr { width: 190px; }
html.pc .acc { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); align-items: start; }
html.pc #menu > .lobbybox { margin: 0; }
html.pc #menu > #err { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- langues (v18) : sélecteur FR / EN et pastille « FR » des jeux pas encore traduits */
.langsw { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); flex: none; }
.langsw button { width: auto; min-height: 0; padding: .3rem .6rem; border-radius: 999px; background: transparent; color: var(--dim); font-size: .74rem; font-weight: 700; letter-spacing: .04em; box-shadow: none; }
.langsw button.on { background: #e5ecf5; color: #0b1220; }
.brand .langsw { margin-left: auto; align-self: flex-start; }
.cright { display: flex; align-items: center; gap: 1rem; }
.frtag { font-size: .6rem; font-weight: 700; padding: .1rem .38rem; border-radius: 6px; border: 1px solid currentColor; color: var(--dim); vertical-align: middle; letter-spacing: .04em; opacity: .9; }

/* ---------------------------------------------------------------- confidentialité (v19) : petite fenêtre du pied de l'accueil */
dialog.sheet { border: 1px solid var(--line); border-radius: 18px; background: #101a2e; color: var(--txt); padding: 1.2rem; width: min(30rem, calc(100vw - 2rem)); }
dialog.sheet::backdrop { background: rgba(3, 7, 18, .7); }
dialog.sheet h2 { margin: 0 0 .6rem; font-size: 1.1rem; }
dialog.sheet p { margin: 0 0 1rem; color: var(--dim); font-size: .92rem; line-height: 1.5; }
label.check { display: flex; align-items: center; gap: .7rem; padding: .8rem; border-radius: 12px; background: rgba(255,255,255,.06); margin-bottom: 1rem; font-weight: 600; cursor: pointer; }
label.check input { width: 1.25rem; height: 1.25rem; flex: none; accent-color: #3b82f6; }

/* ---------------------------------------------------------------- Burger Dead (v21) : accent orange, question lue en gros, réponse attendue, boutons ✅ / ❌ */
.g-burger .primary { background: #fb923c; color: #1a0d00; }
.g-burger .tabs button.on, #bgForm .tabs button.on { background: #fb923c; color: #1a0d00; }
.g-burger input[type=text]:focus, .g-burger .players .list input:focus { border-color: #fb923c; }
.g-burger .item .n { background: #fb923c; color: #1a0d00; }
.g-burger .bar > i { background: #fb923c; }
.bg-q { width: 100%; padding: 1.5rem 1.1rem; border-radius: 20px; background: linear-gradient(160deg, #3d2208, #121c2e 75%); border: 1px solid #fb923c66;
  min-height: min(36vh, 19rem); display: grid; place-items: center;
  font-size: clamp(1.8rem, 8.4vw, 2.6rem); font-weight: 800; line-height: 1.2; letter-spacing: -.01em; text-align: center; overflow-wrap: anywhere; text-wrap: balance; }
.bg-q.l { font-size: clamp(1.5rem, 6.8vw, 2.1rem); }
.bg-nw { white-space: nowrap; }
.bg-q.s { min-height: 0; display: block; padding: .85rem 1rem; font-size: 1.15rem; font-weight: 600; line-height: 1.3; background: var(--card); border-color: var(--line); }
.g-burger .item.win { border-color: #fb923c; background: #2a1a08; }
.bg-a { width: 100%; padding: .9rem 1rem 1.1rem; border-radius: 20px; background: #fb923c; color: #1a0d00; text-align: center; }
.bg-a small { display: block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .75; }
.bg-a b { display: block; margin-top: .2rem; font-size: clamp(1.9rem, 8.6vw, 2.7rem); font-weight: 900; line-height: 1.1; overflow-wrap: anywhere; text-wrap: balance; }
.bg-judge { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; width: 100%; margin-top: 1rem; }
.bg-judge button { min-height: 6rem; border-radius: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; font-size: 2.5rem; line-height: 1; border: 2px solid transparent; }
.bg-judge button small { font-size: .95rem; font-weight: 700; }
.bg-judge .bg-ok { background: #0f2a1a; border-color: var(--ok); color: #bbf7d0; }
.bg-judge .bg-ko { background: #2a1317; border-color: var(--bad); color: #fecaca; }
.bg-judge.mini { gap: .6rem; margin-top: 0; }
.bg-judge.mini button { min-height: 3.4rem; border-radius: 14px; font-size: 1.3rem; flex-direction: row; }
.bg-marks { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; width: 100%; }
.bg-marks i { width: .8rem; height: .8rem; border-radius: 50%; background: var(--card2); }
.bg-marks i.ok { background: var(--ok); }
.bg-marks i.ko { background: var(--bad); }
.bg-marks i.now { background: transparent; box-shadow: inset 0 0 0 2px #fb923c; }
.bg-d .name { min-width: 0; overflow-wrap: anywhere; }
.bg-host { margin-top: 1rem; padding: .55rem .8rem; border-radius: 12px; border: 1px dashed var(--line); color: var(--dim); font-size: .85rem; }
.bg-host summary { cursor: pointer; }
.bg-host p { margin: .5rem 0 .6rem; }
html.pc .bg-judge, html.pc .bg-host { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; }
