/* PartyQuiz — ambiance soirée de bar : ardoise sombre, ambre chaud, néons discrets */
:root {
  --bg: #12151c;
  --bg2: #1a1f2b;
  --card: #212837;
  --card2: #2a3246;
  --line: #333c52;
  --text: #f6f0e4;
  --muted: #9aa3b8;
  --gold: #f5b83d;
  --gold-dark: #c98f14;
  --red: #e5484d;
  --blue: #3b9eff;
  --green: #3ecf8e;
  --pink: #ff5fa2;
  --radius: 18px;
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  --display: "Avenir Next Condensed", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --read: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: calc(16px * var(--zoom, 1)); }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font); color: var(--text); background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 15% -10%, rgba(245, 184, 61, .13), transparent 60%),
    radial-gradient(800px 500px at 100% 10%, rgba(255, 95, 162, .09), transparent 60%),
    radial-gradient(700px 600px at 50% 120%, rgba(59, 158, 255, .08), transparent 60%);
  background-attachment: fixed;
  line-height: 1.45; font-size: 1.0625rem; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); letter-spacing: .03em; margin: 0 0 .4em; line-height: 1.1; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); }
h2 { font-size: 1.6rem; } h3 { font-size: 1.2rem; }
a { color: var(--gold); }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none !important; }
.wrap { width: min(1100px, 100% - 32px); margin: 0 auto; padding: 24px 0 60px; }
.narrow { width: min(560px, 100% - 28px); margin: 0 auto; padding: 22px 0 60px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }

/* Logo */
.logo { font-family: var(--display); font-weight: 800; font-size: 1.5rem; display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo i { font-style: normal; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--gold), #ff8a3d); box-shadow: 0 4px 0 var(--gold-dark); font-size: 22px; }
.logo b { color: var(--gold); }

/* Cartes & formulaires */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.card.flat { box-shadow: none; background: var(--bg2); }
label { display: block; font-weight: 700; margin: 0 0 6px; font-size: .92rem; color: #d9d2c2; }
.field { margin-bottom: 14px; }
input:not([type=checkbox]), select {
  width: 100%; padding: 14px 16px; font: inherit; color: var(--text); background: var(--bg); border: 2px solid var(--line); border-radius: 14px; outline: none; transition: border-color .15s;
}
input:focus, select:focus { border-color: var(--gold); }
input::placeholder { color: #667089; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 5px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.switch:last-child { border-bottom: 0; }
.switch small { display: block; color: var(--muted); font-weight: 400; }
.switch input { appearance: none; flex: none; width: 52px; height: 30px; border-radius: 30px; background: var(--line); position: relative; cursor: pointer; transition: .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { left: 25px; }

/* Boutons */
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 800; letter-spacing: .01em;
  padding: 14px 22px; border-radius: 14px; color: #1b1405; background: linear-gradient(180deg, #ffd25e, var(--gold));
  box-shadow: 0 4px 0 var(--gold-dark); transition: transform .08s, box-shadow .08s, filter .15s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-dark); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn.big { padding: 18px 28px; font-size: 1.15rem; border-radius: 16px; }
.btn.block { display: flex; width: 100%; }
.btn.ghost { background: var(--card2); color: var(--text); box-shadow: 0 4px 0 #181d29; }
.btn.red { background: linear-gradient(180deg, #ff6b70, var(--red)); color: #fff; box-shadow: 0 4px 0 #a02a2e; }
.btn.green { background: linear-gradient(180deg, #5fe0a8, var(--green)); color: #06281a; box-shadow: 0 4px 0 #228a5d; }
.btn.small { padding: 8px 14px; font-size: .9rem; border-radius: 10px; box-shadow: 0 3px 0 var(--gold-dark); }
.btn.small.ghost { box-shadow: 0 3px 0 #181d29; }
.btn.tiny { padding: 4px 9px; font-size: .8rem; border-radius: 8px; box-shadow: none; }
.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; text-decoration: underline; padding: 6px; }

/* Accueil */
.hero { text-align: center; padding: 40px 0 10px; }
.hero h1 span { color: var(--gold); text-shadow: 0 0 30px rgba(245, 184, 61, .35); }
.hero p { text-wrap: balance; color: var(--muted); font-size: 1.15rem; max-width: 560px; margin: 0 auto 28px; }
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 26px 0; }
.tile { display: block; text-decoration: none; color: var(--text); background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 26px 22px; transition: transform .15s, border-color .15s, box-shadow .15s; position: relative; overflow: hidden; }
.tile:hover { transform: translateY(-4px) rotate(-.4deg); border-color: var(--gold); box-shadow: 0 14px 30px rgba(0, 0, 0, .35); }
.tile .ico { font-size: 2.6rem; display: block; margin-bottom: 8px; }
.tile h3 { font-size: 1.5rem; }
.tile p { color: var(--muted); margin: 0; font-size: .95rem; }
.joinbox { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.joinbox input { text-transform: uppercase; text-align: center; font-family: var(--display); font-size: 1.6rem; letter-spacing: .3em; font-weight: 800; }

/* Choix de thèmes */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.theme-chip { cursor: pointer; user-select: none; padding: 12px 10px; border-radius: 14px; background: var(--bg); border: 2px solid var(--line); text-align: center; font-weight: 700; font-size: .92rem; transition: .15s; position: relative; }
.theme-chip .e { font-size: 1.7rem; display: block; }
.theme-chip.on { border-color: var(--c, var(--gold)); background: color-mix(in srgb, var(--c, var(--gold)) 16%, var(--bg)); }
.theme-chip.on::after { content: "✓"; position: absolute; top: 5px; right: 9px; color: var(--c, var(--gold)); font-weight: 900; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); background: var(--bg); border-radius: 14px; padding: 4px; border: 2px solid var(--line); gap: 4px; }
.seg button { min-width: 0; line-height: 1.2; border: 0; font: inherit; font-weight: 700; color: var(--muted); background: transparent; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.seg button.on { background: var(--gold); color: #1b1405; }
.stepper { display: flex; align-items: center; gap: 0; }
.stepper button { width: 46px; height: 48px; border: 2px solid var(--line); background: var(--card2); color: var(--text); font-size: 1.4rem; font-weight: 800; cursor: pointer; }
.stepper button:nth-of-type(1) { border-radius: 14px 0 0 14px; } .stepper button:nth-of-type(2) { border-radius: 0 14px 14px 0; }
.stepper button { height: 52px; flex: none; }
.stepper input { height: 52px; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .unit { margin-left: 10px; color: var(--muted); font-weight: 700; }
.stepper input { border-radius: 0; text-align: center; font-weight: 800; border-left: 0; border-right: 0; width: 80px; min-width: 0; flex: 1 1 70px; max-width: 110px; }

/* Pastilles, badges */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: .82rem; font-weight: 800; background: var(--card2); color: var(--text); }
.pill.gold { background: var(--gold); color: #1b1405; }
.pill.green { background: rgba(62, 207, 142, .18); color: var(--green); }
.pill.red { background: rgba(229, 72, 77, .18); color: #ff8e92; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #555d73; }
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.teamdot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: none; }

/* Jeu — éléments communs */
.qcard { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 22px; }
.qmeta { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.qtheme { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; padding: 6px 14px; border-radius: 99px; background: color-mix(in srgb, var(--c) 22%, var(--bg)); color: var(--c); border: 2px solid var(--c); }
.qtext { font-family: var(--read); font-weight: 800; font-size: clamp(1.4rem, 4.4vw, 2.1rem); line-height: 1.3; letter-spacing: .005em; margin: 6px 0 18px; }
.diff { letter-spacing: 2px; color: var(--gold); font-size: .95rem; }
.timerbar { height: 12px; background: var(--bg); border-radius: 12px; overflow: hidden; margin-bottom: 20px; border: 1px solid var(--line); }
.timerbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--green), var(--gold) 60%, var(--red)); background-size: 100vw 100%; transform-origin: left; }
.choices { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.choice {
  --c: var(--blue); position: relative; appearance: none; border: 0; font: inherit; color: #fff; text-align: left; cursor: pointer;
  background: var(--c); border-radius: 16px; padding: 16px 16px 16px 62px; min-height: 76px; font-weight: 700; font-size: 1.08rem; line-height: 1.25;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 55%, #000); display: flex; align-items: center; transition: transform .08s, box-shadow .08s, opacity .25s, filter .25s;
}
.choice:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 55%, #000); }
.choice::before { content: attr(data-l); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(0, 0, 0, .25); font-family: var(--display); font-weight: 900; font-size: 1.3rem; }
.choice:nth-child(1) { --c: #e5484d; } .choice:nth-child(2) { --c: #3b82f6; } .choice:nth-child(3) { --c: #d99a12; } .choice:nth-child(4) { --c: #2fb67c; }
.choices.vf .choice { justify-content: center; padding-left: 16px; font-size: 1.5rem; min-height: 96px; }
.choices.vf .choice::before { display: none; }
.choices.vf .choice:nth-child(1) { --c: #2fb67c; } .choices.vf .choice:nth-child(2) { --c: #e5484d; }
.choice:disabled { cursor: default; }
.choice.picked { outline: 4px solid #fff; outline-offset: 2px; }
.choice.dim { opacity: .3; filter: grayscale(.7); }
.choice.right { outline: 4px solid #fff; animation: pop .5s; }
.choice.right::after { content: "✓"; position: absolute; right: 14px; font-size: 1.7rem; font-weight: 900; }
.choice .cnt { margin-left: auto; padding-left: 10px; font-family: var(--display); font-size: 1.5rem; opacity: .95; }
.choice.right .cnt { margin-right: 36px; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.numinput { display: flex; gap: 10px; }
.numinput input { font-size: 1.6rem; font-weight: 800; text-align: center; }
.waiting { text-align: center; padding: 28px 10px; }
.waiting .big { font-size: 3rem; display: block; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.banner { padding: 14px 18px; border-radius: 14px; font-weight: 800; text-align: center; font-size: 1.15rem; }
.banner.good { background: rgba(62, 207, 142, .16); color: var(--green); border: 2px solid var(--green); }
.banner.bad { background: rgba(229, 72, 77, .14); color: #ff8e92; border: 2px solid var(--red); }
.banner.neutral { background: var(--card2); border: 2px solid var(--line); }
.paused { position: fixed; inset: 0; z-index: 50; background: rgba(10, 12, 18, .82); backdrop-filter: blur(6px); display: grid; place-items: center; text-align: center; }
.paused h1 { font-size: clamp(3rem, 10vw, 6rem); }

/* Classements */
.rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rank li { display: flex; align-items: center; gap: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.rank li.me { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--bg2)); }
.rank .pos { font-family: var(--display); font-weight: 900; font-size: 1.4rem; width: 38px; text-align: center; color: var(--muted); }
.rank li:nth-child(1) .pos { color: var(--gold); } .rank li:nth-child(2) .pos { color: #cfd5e3; } .rank li:nth-child(3) .pos { color: #cd8a52; }
.rank .nm { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .nm small { display: block; font-weight: 500; color: var(--muted); }
.rank .pts { font-family: var(--display); font-weight: 900; font-size: 1.4rem; }
.rank .gain { font-size: .85rem; color: var(--green); font-weight: 800; margin-left: 6px; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 20px 0; min-height: 260px; }
.podium .step { width: min(190px, 30%); text-align: center; }
.podium .who { font-weight: 900; font-size: 1.2rem; margin-bottom: 6px; word-break: break-word; }
.podium .bar { border-radius: 16px 16px 0 0; display: flex; flex-direction: column; align-items: center; padding-top: 10px; font-family: var(--display); font-weight: 900; animation: rise 1s cubic-bezier(.2, .9, .3, 1.2) both; }
.podium .bar b { font-size: 2.4rem; } .podium .bar span { font-size: 1.2rem; opacity: .85; }
.podium .s1 .bar { height: 190px; background: linear-gradient(180deg, #ffd25e, var(--gold-dark)); color: #3b2a00; animation-delay: .6s; }
.podium .s2 .bar { height: 140px; background: linear-gradient(180deg, #dfe4ef, #8e98b0); color: #20263a; animation-delay: .3s; }
.podium .s3 .bar { height: 105px; background: linear-gradient(180deg, #e0a06a, #8d5a2d); color: #2d1a08; }
@keyframes rise { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }
.podium .bar { transform-origin: bottom; }

/* Joueur (mobile) */
.phone { width: min(520px, 100%); margin: 0 auto; padding: 14px 14px calc(110px + env(safe-area-inset-bottom)); min-height: 100vh; min-height: 100dvh; }
.stickynext { margin-top: 14px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 2px 14px; }
.me-chip { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.score-chip { font-family: var(--display); font-weight: 900; font-size: 1.3rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; color: var(--gold); }
.teamlist { display: grid; gap: 8px; }
.teamopt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 2px solid var(--line); cursor: pointer; font-weight: 700; }
.teamopt.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--bg)); }
.teamopt small { margin-left: auto; color: var(--muted); font-weight: 500; }
.teamopt.full { opacity: .45; pointer-events: none; }

/* Admin */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0; }
.tabs button { border: 0; font: inherit; font-weight: 800; padding: 10px 16px; border-radius: 12px; background: var(--card); color: var(--muted); cursor: pointer; border: 1px solid var(--line); }
.tabs button.on { background: var(--gold); color: #1b1405; border-color: var(--gold); }
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; align-items: start; }
.grid2.form { align-items: start; }
.grid2 > .field label { min-height: 2.6em; display: flex; align-items: flex-end; }
.grid2.top { align-items: start; }
.grid3 { display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; }
table.list td { padding: 8px; border-top: 1px solid var(--line); vertical-align: middle; }
table.list .num { text-align: right; font-family: var(--display); font-weight: 900; font-size: 1.15rem; }
table.list th.num { font-family: var(--font); font-weight: 700; font-size: .8rem; }
.adj { display: inline-flex; gap: 4px; }
.qrbox { background: #fff; border-radius: 16px; padding: 10px; width: 100%; max-width: 280px; margin: 0 auto; }
.qrbox img { width: 100%; display: block; }
.big-code { font-family: var(--display); font-weight: 900; font-size: 3.2rem; letter-spacing: .25em; color: var(--gold); }
.log { max-height: 260px; overflow: auto; font-size: .88rem; color: var(--muted); }
.log div { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.modal { position: fixed; inset: 0; background: rgba(8, 10, 15, .78); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal .card { max-width: 380px; width: 100%; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--line); padding: 12px 20px; border-radius: 14px; font-weight: 700; z-index: 90; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: up .25s; }
.toast.err { border-color: var(--red); color: #ff9da0; }
@keyframes up { from { transform: translate(-50%, 20px); opacity: 0; } }
.conn { position: fixed; top: 0; left: 0; right: 0; background: var(--red); color: #fff; text-align: center; font-weight: 800; padding: 6px; z-index: 100; font-size: .9rem; }
.ctrlbar { position: sticky; bottom: 0; z-index: 20; background: linear-gradient(180deg, transparent, var(--bg) 30%); padding: 18px 0 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.ctrlbar .btn { flex: 1; min-width: 130px; }

/* Écran TV */
body.tv { font-size: clamp(18px, 1.6vw, 30px); overflow: hidden; height: 100vh; }
.tvwrap { height: 100vh; display: flex; flex-direction: column; padding: 2.2vh 3vw; gap: 2vh; }
.tvhead { display: flex; justify-content: space-between; align-items: center; gap: 2vw; }
.tvhead .logo { font-size: 1.6em; }
.tvmain { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 2.4vh; }
.tvq { font-family: var(--read); font-weight: 800; font-size: clamp(1.9rem, 3.7vw, 4.1rem); line-height: 1.25; letter-spacing: .005em; text-align: center; text-wrap: balance; }
.tv .choices { gap: 1.6vh 1.6vw; }
.tv .choice { font-size: clamp(1.2rem, 2.2vw, 2.4rem); min-height: 11vh; padding-left: 5.2vw; border-radius: 22px; cursor: default; }
.tv .choice::before { width: 3.4vw; height: 3.4vw; min-width: 38px; min-height: 38px; font-size: 1.8vw; left: 1vw; }
.tv .choices.vf .choice { font-size: 3vw; min-height: 15vh; }
.tv .timerbar { height: 2vh; border-radius: 2vh; }
.timer-num { font-family: var(--display); font-weight: 900; font-size: 3.2em; line-height: 1; min-width: 2.2ch; text-align: center; }
.timer-num.low { color: var(--red); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }
.tv .rank li { padding: 1.2vh 1.6vw; border-radius: 18px; }
.tv .rank .pos, .tv .rank .pts { font-size: 1.5em; }
.tvcols { display: grid; grid-template-columns: 1fr 1fr; gap: 3vw; align-items: start; }
.tvlobby { display: grid; grid-template-columns: minmax(260px, 30vw) 1fr; gap: 3vw; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 1vh 1vw; align-content: flex-start; }
.chip { background: var(--card); border: 2px solid var(--line); border-radius: 99px; padding: .3em .9em; font-weight: 800; display: inline-flex; align-items: center; gap: .5em; animation: pop .5s; }
.intro { text-align: center; }
.intro .big { font-size: 8vw; display: block; }
.intro h1 { font-size: 6vw; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; }

@media (max-width: 760px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .choices { grid-template-columns: 1fr; }
  .choices.vf { grid-template-columns: 1fr 1fr; }
  .tvlobby { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Pied de page */
.foot { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.foot b { color: var(--text); }

/* Compte à rebours avant la suite */
.nextin { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-top: 14px; font-weight: 700; color: var(--muted); }
.nextin .bar { flex: 1; height: 10px; border-radius: 10px; background: var(--bg); overflow: hidden; }
.nextin .bar i { display: block; height: 100%; width: 100%; background: var(--gold); transform-origin: left; }
.nextin .n { font-family: var(--display); font-weight: 900; font-size: 1.6rem; color: var(--gold); min-width: 1.6ch; text-align: center; }
.tv .nextin { font-size: 1.1em; border-radius: 2vh; padding: 1.2vh 1.6vw; }

/* Score + rapidité (phase résultat) */
.scorecard { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 14px; }
.scorecard > div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 6px; text-align: center; }
.scorecard small { display: block; color: var(--muted); font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.scorecard b { display: block; font-family: var(--display); font-weight: 900; font-size: 1.9rem; line-height: 1.15; }
.scorecard .gain b { color: var(--green); } .scorecard .gain.zero b { color: var(--muted); } .scorecard .tot b { color: var(--gold); }
.panelh { font-family: var(--display); font-weight: 800; letter-spacing: .04em; font-size: 1.05rem; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.speed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.speed li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 18%, var(--card)), var(--card)); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); }
.speed li:nth-child(2) { background: linear-gradient(90deg, color-mix(in srgb, #cfd5e3 14%, var(--card)), var(--card)); border-color: var(--line); }
.speed li:nth-child(3) { background: linear-gradient(90deg, color-mix(in srgb, #cd8a52 14%, var(--card)), var(--card)); border-color: var(--line); }
.speed .m { font-size: 1.5rem; } .speed .nm { flex: 1; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.speed .t { font-family: var(--display); font-weight: 900; font-size: 1.2rem; color: var(--gold); } .speed .g { color: var(--green); font-weight: 800; }
.rank.big li { padding: 12px 14px; } .rank .gain { background: rgba(62, 207, 142, .16); border-radius: 99px; padding: 2px 9px; }
.tv .speed li { padding: 1.1vh 1.4vw; border-radius: 2vh; } .tv .speed .m { font-size: 1.6em; }
.tvreveal { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2.4vw; align-items: start; }
.tvreveal .panelh { margin-top: 0; font-size: 1.2em; }
.tv .rank.compact { gap: .7vh; } .tv .rank.compact li { padding: .8vh 1.2vw; }

/* Popup de résultat qui « éclate » */
.boom { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none; animation: boomfade 2.6s ease forwards; background: radial-gradient(circle at center, rgba(8, 10, 15, .72), rgba(8, 10, 15, .45)); }
.boom .pop { text-align: center; padding: 26px 34px; border-radius: 30px; max-width: min(440px, 90vw); animation: boompop .55s cubic-bezier(.2, 1.6, .4, 1) both; border: 4px solid #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.boom.good .pop { background: linear-gradient(160deg, #46dc9a, #1f9d68); color: #04251a; }
.boom.bad .pop { background: linear-gradient(160deg, #ff6b70, #c0282d); color: #fff; animation: boompop .55s cubic-bezier(.2, 1.6, .4, 1) both, shake .5s .5s; }
.boom.none .pop { background: linear-gradient(160deg, #4a5572, #2a3246); color: #fff; }
.boom .ico { font-size: 4.4rem; line-height: 1; display: block; }
.boom h2 { font-size: 2.2rem; margin: 6px 0 2px; }
.boom .pts { font-family: var(--display); font-weight: 900; font-size: 2.6rem; }
.boom p { margin: 6px 0 0; font-weight: 700; }
.boom canvas { position: fixed; inset: 0; }
@keyframes boompop { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes boomfade { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-12px); } 40% { transform: translateX(10px); } 60% { transform: translateX(-8px); } 80% { transform: translateX(6px); } }

/* Réglage des proportions de difficulté */
.mixrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mixrow .field { margin: 0; }
.mixrow .stepper input { width: 60px; flex-basis: 50px; }
.mixrow .stepper button { width: 38px; }
@media (max-width: 760px) { .grid2 > .field label { min-height: 0; } .mixrow { grid-template-columns: 1fr; } }

.tight .choice { min-height: 8.5vh !important; }
.tv .tvmain { gap: 1.4vh; }
.tv .tvreveal { font-size: .82em; gap: 2vw; }
.tv .tvreveal .rank li, .tv .tvreveal .speed li { padding: .6vh 1vw; }
.tv .tight .choice { min-height: 7vh !important; font-size: clamp(1.1rem, 1.9vw, 2.1rem); }
.tv .tvq + .tight, .tv .qmeta { margin: 0; }
.tv .nextin { padding: .8vh 1.4vw; margin-top: 0; }

/* Mobile : le compte à rebours reste collé en haut, jamais sous la barre du navigateur */
.phone .nextin { margin: 0 0 14px; }
/* Téléphone : même gabarit que la barre du temps de réponse (même place, même hauteur) */
.phone .nextin { background: none; border: 0; box-shadow: none; padding: 0; gap: 10px; margin: 0 0 20px; min-height: 12px; }
.phone .nextin > span:first-child { display: none; }
.phone .nextin .bar { height: 12px; border-radius: 12px; border: 1px solid var(--line); }
.phone .nextin .n { font-size: 1.15rem; line-height: 1; }
.phone .nextin:not(:has(.bar)) { font-size: .85rem; justify-content: center; }
.phone .nextin:not(:has(.bar)) > span:first-child { display: inline; }

.rank li { text-align: left; }
.tv .podium { min-height: 31vh; margin: 1vh 0; }
.tv .podium .s1 .bar { height: 22vh; } .tv .podium .s2 .bar { height: 16vh; } .tv .podium .s3 .bar { height: 12vh; }
.tv .podium .who { font-size: 1.05em; }
.tv .podium .bar b { font-size: 1.6em; }
@media (max-width: 760px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 2px 16px 8px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; white-space: nowrap; padding: 9px 13px; font-size: .95rem; }
  .ctrlbar { gap: 8px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .ctrlbar .btn { min-width: 0; padding: 12px 10px; font-size: .95rem; }
  .ctrlbar .btn.big { flex-basis: 100%; }
  table.list { font-size: .92rem; }
  .big-code { font-size: 2.4rem; }
}

/* Liste joueurs / équipes (admin) : une carte par ligne, lisible sur mobile */
.plist { display: grid; gap: 10px; }
.prow { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.pmain { display: flex; align-items: center; gap: 10px; }
.pname { flex: 1; min-width: 0; line-height: 1.25; }
.pname b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pname small { color: var(--muted); font-weight: 600; font-size: .82rem; }
.pscore { font-family: var(--display); font-weight: 900; font-size: 1.5rem; color: var(--gold); text-align: right; }
.pscore small { font-family: var(--font); font-size: .7rem; color: var(--muted); margin-left: 3px; }
.pact { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pact .btn.tiny { padding: 6px 11px; font-size: .85rem; border-radius: 10px; }
@media (min-width: 900px) { .plist { grid-template-columns: 1fr 1fr; } }

/* Curseur de niveau moyen */
.levelbox { background: var(--bg); border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px 16px; }
.levelhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.levelhead #levelName { font-family: var(--display); font-weight: 900; font-size: 1.35rem; color: var(--gold); letter-spacing: .03em; }
.levelhead .muted { font-size: .85rem; }
input[type=range].level { -webkit-appearance: none; appearance: none; width: 100%; height: 16px; padding: 0; border: 0; border-radius: 16px; background: linear-gradient(90deg, #2fb67c, #f5b83d 50%, #e5484d); cursor: pointer; outline: none; }
input[type=range].level:focus { border: 0; box-shadow: 0 0 0 3px rgba(245, 184, 61, .35); }
input[type=range].level::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 5px solid var(--gold); box-shadow: 0 3px 10px rgba(0, 0, 0, .5); cursor: grab; }
input[type=range].level::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 5px solid var(--gold); box-shadow: 0 3px 10px rgba(0, 0, 0, .5); cursor: grab; }
.levelends { display: flex; justify-content: space-between; margin-top: 8px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.mixbar { display: flex; height: 26px; border-radius: 10px; overflow: hidden; margin-top: 12px; gap: 2px; }
.mixbar i { flex: 1 1 0; display: grid; place-items: center; font-style: normal; font-weight: 900; font-size: .8rem; color: rgba(0, 0, 0, .75); transition: flex-grow .15s; min-width: 0; }
.mixbar .e { background: #2fb67c; } .mixbar .m { background: #f5b83d; } .mixbar .h { background: #e5484d; color: #fff; }

/* Préparation de la soirée (admin) */
.prep .step { display: flex; gap: 14px; align-items: flex-start; }
.prep .step > .stack { flex: 1; min-width: 0; }
.sn { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 1.3rem; background: var(--gold); color: #1b1405; box-shadow: 0 3px 0 var(--gold-dark); }
.prep .qrbox { max-width: 210px; margin: 0; }
.prep .center .qrbox { margin: 0 auto; }

/* Grand écran : partie en attente (spinner seul, sans bloc) */
.waitspin { display: flex; align-items: center; justify-content: center; gap: 1.2vw; color: var(--muted); font-weight: 700; font-size: 1.15em; margin-top: 1vh; }
.spinner { width: 1.7em; height: 1.7em; border-radius: 50%; border: .22em solid color-mix(in srgb, var(--gold) 22%, transparent); border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: spin 2.4s linear infinite !important; } }

/* Téléphone : même emplacement que la barre de temps, sans bloc */
.phone .waitspin { gap: 10px; font-size: .95rem; margin: 0 0 20px; min-height: 12px; }
.phone .waitspin .spinner { width: 1.5em; height: 1.5em; }

/* Écran TV : fondu progressif entre les pages */
.tvmain { transition: opacity .38s ease, transform .38s ease; }
.tvmain.out { opacity: 0; transform: translateY(-10px) scale(.992); }
.tvmain.in > * { animation: tvin .75s cubic-bezier(.2, .7, .2, 1) both; }
.tvmain.in > *:nth-child(2) { animation-delay: .12s; } .tvmain.in > *:nth-child(3) { animation-delay: .24s; }
.tvmain.in > *:nth-child(4) { animation-delay: .36s; } .tvmain.in > *:nth-child(5) { animation-delay: .48s; }
.tvmain.in > *:nth-child(6) { animation-delay: .6s; }
@keyframes tvin { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Compte à rebours avant la question */
.cdlabel { font-family: var(--display); font-weight: 800; letter-spacing: .06em; color: var(--muted); font-size: 1.3rem; text-transform: uppercase; }
.cdnum { font-family: var(--display); font-weight: 900; font-size: 9rem; line-height: 1; color: var(--gold); text-shadow: 0 0 40px rgba(245, 184, 61, .45); animation: cdpop 1s ease-out both; }
.tv .cdlabel { font-size: 2.2vw; } .tv .cdnum { font-size: 22vw; }
@keyframes cdpop { 0% { transform: scale(1.7); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 85% { transform: scale(.94); opacity: 1; } 100% { transform: scale(.9); opacity: .55; } }
.tv .cdnum { font-size: 17vw; line-height: 1.2; margin: 2vh 0; }

/* Console animateur : points en un clic */
.qbtns { display: flex; gap: 8px; width: 100%; }
.qb { flex: 1; padding: 11px 0; font-size: 1.05rem; font-weight: 900; border-radius: 12px; box-shadow: 0 3px 0 #181d29; min-width: 0; }
.qb.pos { color: var(--green); } .qb.neg { color: #ff8e92; }
.qb:active { transform: translateY(2px); box-shadow: 0 1px 0 #181d29; }
.plist.mc .pact { margin-top: 8px; }
@media (min-width: 900px) { .plist.mc { grid-template-columns: 1fr 1fr; } }

/* Console animateur : propositions bien lisibles pour les énoncer à voix haute */
.readable .choices { gap: 12px; grid-template-columns: 1fr; }
.readable .choice { font-size: 1.35rem; line-height: 1.3; min-height: 86px; padding: 18px 18px 18px 78px; font-weight: 800; }
.readable .choice::before { width: 48px; height: 48px; left: 14px; font-size: 1.7rem; border-radius: 14px; }
.readable .choice.right { outline: 5px solid #fff; outline-offset: 3px; }
.readable .choice.right::after { content: "✓"; position: absolute; right: 16px; font-size: 2.2rem; font-weight: 900; }
.readable .choice .cnt { font-size: 1.7rem; margin-right: 40px; }
.readable .choices.vf { grid-template-columns: 1fr 1fr; }
.readable .choices.vf .choice { font-size: 1.8rem; padding: 18px; justify-content: center; }

#panel > .card:first-child { scroll-margin-top: 10px; }
.readable .choices.vf .choice.right::after { top: 8px; right: 14px; font-size: 1.7rem; }
.readable .choices.vf .choice .cnt { position: absolute; left: 16px; bottom: 6px; margin: 0; font-size: 1.3rem; }

/* Sections repliables des paramètres */
.fold { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fold > summary { cursor: pointer; padding: 14px 18px; font-weight: 800; list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "▾"; margin-left: auto; color: var(--muted); transition: transform .2s; }
.fold[open] > summary::after { transform: rotate(180deg); }
.fold > summary small { font-weight: 500; }
.foldbody { padding: 4px 16px 16px; }

/* Types de questions spéciales */
.kindrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.choice.gone { opacity: .14; text-decoration: line-through; filter: grayscale(1); }
.choice.own { opacity: .5; }
.choice .ordn { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); min-width: 42px; height: 42px; padding: 0 8px; border-radius: 50%; display: none; place-items: center; background: #fff; color: #1b1405; font-family: var(--display); font-weight: 900; font-size: 1.5rem; }
.choice.sel .ordn { display: grid; }
.choice.sel { outline: 4px solid #fff; outline-offset: 2px; }
.jokers { display: flex; gap: 10px; margin-bottom: 14px; }
.jokers .btn { flex: 1; padding: 10px 8px; font-size: .95rem; }
.jokers .on { background: linear-gradient(180deg, #5fe0a8, var(--green)); color: #06281a; box-shadow: 0 4px 0 #228a5d; }
.stakes { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.stakes button { flex: 1; min-width: 70px; padding: 12px 6px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font-family: var(--display); font-weight: 900; font-size: 1.15rem; cursor: pointer; }
.stakes button.on { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 20%, var(--bg)); color: var(--gold); }
.buzzbtn { width: 100%; aspect-ratio: 1; max-height: 52vh; border: 0; border-radius: 50%; font-family: var(--display); font-weight: 900; font-size: 3.2rem; color: #fff; cursor: pointer; background: radial-gradient(circle at 35% 30%, #ff7b80, #e5484d 55%, #a02a2e); box-shadow: 0 10px 0 #7a1d20, 0 20px 40px rgba(0, 0, 0, .5); transition: transform .06s, box-shadow .06s; }
.buzzbtn:active:not(:disabled) { transform: translateY(8px); box-shadow: 0 2px 0 #7a1d20; }
.buzzbtn:disabled { filter: grayscale(.8) brightness(.6); cursor: default; }
.bluffbox { display: grid; gap: 12px; }
.bluffbox input { font-size: 1.2rem; text-align: center; }
.optlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.optlist li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 2px solid var(--line); }
.optlist li.truth { border-color: var(--green); background: rgba(62, 207, 142, .14); }
.optlist .t { flex: 1; font-weight: 800; } .optlist small { display: block; color: var(--muted); font-weight: 600; }
.optlist .v { font-family: var(--display); font-weight: 900; font-size: 1.3rem; }
.orderres { list-style: none; counter-reset: o; margin: 0; padding: 0; display: grid; gap: 8px; }
.orderres li { counter-increment: o; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 2px solid var(--line); font-weight: 800; }
.orderres li::before { content: counter(o); font-family: var(--display); font-weight: 900; font-size: 1.3rem; color: var(--gold); width: 1.4em; text-align: center; }
.orderres li.good { border-color: var(--green); } .orderres li.bad { border-color: var(--red); }
.extras { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Statistiques */
.stats { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; text-align: left; }
.stats.compact { grid-template-columns: 1fr; }
.stat { display: flex; gap: 12px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat .si { font-size: 1.8rem; }
.stat small { display: block; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }
.stat b { display: block; font-family: var(--display); font-size: 1.35rem; }
.stat span { display: block; color: var(--muted); font-size: .85rem; line-height: 1.25; }
.tv .stats { gap: 1.6vh 1.6vw; } .tv .stat { padding: 1.6vh 1.4vw; border-radius: 2vh; } .tv .stat b { font-size: 1.5em; } .tv .stat .si { font-size: 2.2em; }
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }

/* Écran TV : logo du comité, bandeau de sponsors, états du buzzer */
.tvlogo { height: 5.5vh; max-width: 18vw; object-fit: contain; display: block; border-radius: 1vh; }
.sponsors { overflow: hidden; border-top: 1px solid var(--line); padding: 1vh 0; margin: 0 -3vw -2.2vh; background: rgba(0, 0, 0, .25); }
.sponsors .track { display: inline-flex; gap: 4vw; white-space: nowrap; animation: marquee 28s linear infinite; padding-left: 4vw; font-weight: 800; color: var(--muted); font-size: 1.1em; }
.sponsors .track span::before { content: "★ "; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }
.tvbuzz { text-align: center; font-family: var(--display); font-weight: 900; font-size: 4vw; padding: 5vh 2vw; border-radius: 3vh; background: var(--card); border: .4vh solid var(--line); }
.tvbuzz small { display: block; font-family: var(--font); font-weight: 600; font-size: .4em; color: var(--muted); margin-top: 1vh; }
.tvbuzz.on { background: linear-gradient(160deg, #ff6b70, #c0282d); border-color: #fff; color: #fff; animation: pop .5s; }
.tvbuzz.on small { color: #ffe0e1; }
.tvorder { gap: 1.2vh; } .tvorder li { padding: 1.6vh 1.6vw; font-size: 2.2vw; border-radius: 2vh; }
.tvopts li { padding: 1.4vh 1.6vw; border-radius: 2vh; } .tvopts .t { font-size: 1.9vw; } .tvopts small { font-size: .55em; } .tvopts .v { font-size: 2.4vw; }

.zoombtn { font-family: var(--display); font-weight: 900; letter-spacing: 0; min-width: 44px; }

.tvqr { max-width: min(26vw, 38vh); }
.tvlobby .stack { gap: 1.2vh; }

/* Écran TV : jamais de débordement (le contenu se centre s'il y a de la place, sinon il commence en haut) */
.tv .tvmain { justify-content: flex-start; min-height: 0; overflow: hidden; }
.tv .tvmain > :first-child { margin-top: auto; } .tv .tvmain > :last-child { margin-bottom: auto; }
.tvorder { display: grid !important; grid-template-columns: 1fr 1fr; gap: 1.2vh 1.2vw !important; }
.tvorder li { padding: 1.3vh 1.4vw !important; font-size: 2vw !important; }
.tvwrap.sp .tvmain { gap: 1vh; }
.tvwrap.sp .tvq { font-size: clamp(1.4rem, 2.6vw, 3rem); }
.tvwrap.sp .tight .choice { min-height: 6vh !important; }
.tvwrap.sp .timerbar { height: 1.4vh; }
.tvwrap.sp .cdnum { font-size: 15vw; }

/* Formulaire de paramètres : une colonne sur téléphone, deux colonnes sur ordinateur */
.sf-cols { display: grid; gap: 0 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) {
  .sf-cols { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
  .sf-col + .sf-col { border-left: 1px solid var(--line); padding-left: 28px; }
  .themes { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
}
@media (min-width: 1000px) { #title { font-size: 2.6rem !important; } }

.tv .welcome { margin: 0 0 .25em; line-height: 1.12; text-wrap: balance; }
.tv .playercount { margin-bottom: 2vh; } .tv .playercount .pill { font-size: 1.15em; padding: .35em 1em; }

/* Écran TV : l'animation de bonus / pénalité est plus grande */
.tv .boom .pop { padding: 5vh 5vw; max-width: 64vw; border-width: .6vh; border-radius: 4vh; }
.tv .boom .ico { font-size: 12vh; } .tv .boom h2 { font-size: 7vh; margin: 1vh 0; } .tv .boom .pts { font-size: 13vh; } .tv .boom p { font-size: 4vh; margin-top: 1.5vh; }

/* Logo PartyQuiz (image) */
.logo img { height: 58px; width: auto; display: block; filter: drop-shadow(0 3px 8px rgba(0,0,0,.45)); }
.tv .logo img { height: 8.5vh; }
.tvlogo { height: 8.5vh; }
.hero .biglogo { width: min(420px, 78vw); height: auto; margin: 0 auto 6px; display: block; filter: drop-shadow(0 8px 24px rgba(120, 40, 200, .45)); }
.cardlogo { height: 16mm; display: block; margin: 0 0 2mm; }

/* Illustrations des modes (images à fond transparent) */
.tile .modeimg { width: auto; height: 190px; max-width: 100%; object-fit: contain; display: block; margin: 0 auto 10px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .45)); transition: transform .2s; }
.tile:hover .modeimg { transform: scale(1.05) rotate(-1.5deg); }
.titleimg { height: 84px; width: auto; flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); }
#title { display: flex; align-items: center; gap: 14px; }
@media (min-width: 1000px) { .titleimg { height: 104px; } }

.tiles { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: 820px; margin-left: auto; margin-right: auto; }

/* Accueil : titres des cartes centrés, bouton « Rejoindre une partie » en image */
.tile h3, .tile p { text-align: center; }
.joinbtn { display: inline-block; margin: 4px 0 8px; transition: transform .15s, filter .15s; -webkit-tap-highlight-color: transparent; }
.joinbtn img { display: block; width: min(440px, 88vw); height: auto; filter: drop-shadow(0 8px 20px rgba(120, 40, 200, .45)); }
.joinbtn:hover { transform: translateY(-3px) scale(1.02); }
.joinbtn:active { transform: translateY(1px) scale(.99); }

/* 3e carte (rejoindre) : même style que les deux autres, centrée sous elles */
.tile-join { grid-column: 1 / -1; justify-self: center; width: calc(50% - 8px); }
@media (max-width: 640px) { .tile-join { width: 100%; } }
.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
@media (max-width: 640px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* « Rejoindre une partie » : carte pleine largeur sous les deux autres, avec le bouton image */
.tile-join { grid-column: 1 / -1; width: auto; justify-self: stretch; padding: 14px 22px 16px; }
.tile-join .joinimg { display: block; width: min(100%, 560px); height: auto; margin: 0 auto 6px; filter: drop-shadow(0 6px 16px rgba(120, 40, 200, .4)); transition: transform .2s; }
.tile-join:hover .joinimg { transform: scale(1.025); }
.tile-join p { margin-top: 2px; }
/* Icône vidéoprojecteur (écran de la salle) */
.pj { height: 1.15em; width: auto; vertical-align: -.22em; margin-right: .25em; display: inline-block; }
h1 .pj, h2 .pj { height: 1.05em; }

/* Carte « Paramètres » : bien visible, en bandeau horizontal pleine largeur */
.tile-settings { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; text-align: left; padding: 18px 22px; border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 12%, var(--card)), var(--card)); }
.tile-settings .gear { flex: none; width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center; font-size: 2.2rem; background: linear-gradient(135deg, var(--gold), #ff8a3d); box-shadow: 0 4px 0 var(--gold-dark); transition: transform .3s; }
.tile-settings:hover .gear { transform: rotate(60deg); }
.tile-settings .txt { flex: 1; min-width: 0; }
.tile-settings h3 { text-align: left; margin: 0 0 2px; font-size: 1.4rem; }
.tile-settings p { text-align: left; }
.tile-settings .go { font-family: var(--display); font-size: 2.6rem; color: var(--gold); line-height: 1; }
@media (max-width: 640px) { .tile-settings { padding: 14px; gap: 12px; } .tile-settings .gear { width: 54px; height: 54px; font-size: 1.8rem; } }
