/* Gold Stars — feuille de style */
:root {
  --bg: #0b0a08; --surface: #17150f; --text: #f3eee3; --muted: #9a9286;
  --accent: #c9a55c; --ok: #62c08c; --danger: #e2604f;
  --fd: 'Bodoni Moda', 'Didot', 'Times New Roman', serif;
  --fb: 'Jost', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --ft: 'Jost', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --line: rgba(201,165,92,.24);
  --line-soft: rgba(243,238,227,.08);
  --overlay: .5;
  --r: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --line: color-mix(in srgb, var(--accent) 26%, transparent);
    --line-soft: color-mix(in srgb, var(--text) 9%, transparent);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-family: var(--fb); font-weight: 400; font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
#nosleep { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: -10px; top: -10px; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "lnum" 1; }

/* ---------- Démarrage ---------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; }
.boot-star { width: 42px; height: 42px; background: var(--accent); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.82); opacity: .55; } }

/* ---------- Typo ---------- */
.kicker { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.display { font-family: var(--fd); font-weight: 400; letter-spacing: .005em; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.ok { color: var(--ok); }
.center { text-align: center; }

/* ---------- Fond (téléphones) ---------- */
.phone-bg { position: fixed; inset: 0; z-index: -1; background: var(--bg) center/cover no-repeat; }
.phone-bg::after { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: var(--overlay); }

/* ---------- Mise en page téléphone ---------- */
.phone { min-height: 100dvh; max-width: 540px; margin: 0 auto; padding: calc(18px + var(--safe-t)) 20px calc(26px + var(--safe-b)); display: flex; flex-direction: column; gap: 18px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { height: 26px; width: auto; }
.brand .display { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.net { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.net i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(98,192,140,.16); }
.net.off i { background: var(--danger); box-shadow: 0 0 0 3px rgba(226,96,79,.18); animation: blink 1s steps(2) infinite; }
.net.wait i { background: #d9a441; }
@keyframes blink { 50% { opacity: .2; } }
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }

.title-xl { font-family: var(--fd); font-size: clamp(30px, 9vw, 44px); line-height: 1.04; margin: 0; font-weight: 400; }
.lead { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- Cartes ---------- */
.card { background: rgba(23,21,15,.72); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
@supports (background: color-mix(in srgb, red 50%, blue)) { .card { background: color-mix(in srgb, var(--surface) 82%, transparent); } }
.card.tight { padding: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

/* ---------- Boutons ---------- */
.btn { appearance: none; border: 1px solid var(--line); background: transparent; color: var(--text); min-height: 50px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 500; letter-spacing: .02em; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .12s ease, background .2s, border-color .2s, opacity .2s; user-select: none; -webkit-user-select: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .38; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #14110a; }
.btn.ghost { border-color: var(--line-soft); }
.btn.danger { border-color: rgba(226,96,79,.5); color: var(--danger); }
.btn.danger.fill { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #08140e; }
.btn.block { width: 100%; }
.btn.lg { min-height: 60px; font-size: 17px; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.btn.xs { min-height: 30px; padding: 0 11px; font-size: 12px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.linkbtn { background: none; border: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 6px; font-size: 14px; }

/* ---------- Champs ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; min-height: 50px; border-radius: 12px; border: 1px solid var(--line-soft); background: rgba(0,0,0,.28); padding: 0 14px; font-size: 16px; outline: none; transition: border-color .2s; }
textarea.input { padding: 12px 14px; min-height: 80px; resize: vertical; }
.input:focus { border-color: var(--accent); }
.input.code { text-align: center; font-size: 28px; letter-spacing: .4em; font-variant-numeric: tabular-nums; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 15px) 22px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
select.input option { background: #1a1813; color: #f3eee3; }
.err { color: var(--danger); font-size: 14px; min-height: 18px; }

/* ---------- Pastilles d'équipe ---------- */
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line-soft); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: rgba(98,192,140,.4); background: rgba(98,192,140,.08); }
.pill.warn { color: #e0b04f; border-color: rgba(224,176,79,.4); }
.pill.bad { color: var(--danger); border-color: rgba(226,96,79,.4); }

.avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none; display: grid; place-items: center; background: rgba(0,0,0,.35); border: 2px solid var(--tc, var(--accent)); font-size: 28px; line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 96px; height: 96px; font-size: 50px; }
.avatar.xl { width: 132px; height: 132px; font-size: 70px; border-width: 3px; }
.avatar .ph { font-family: var(--fd); font-size: .62em; color: var(--tc, var(--accent)); }

.team-tile { position: relative; text-align: left; border: 1px solid var(--line-soft); border-radius: var(--r); padding: 16px; background: rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 12px; min-height: 140px; overflow: hidden; transition: transform .12s, border-color .2s; }
.team-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tc); }
.team-tile:active { transform: scale(.98); }
.team-tile .gname { font-family: var(--fd); font-size: 24px; line-height: 1.05; }
.team-tile .sub { font-size: 13px; color: var(--muted); }
.team-tile[disabled] { opacity: .45; }
.team-tile.is-current { border-color: var(--tc); box-shadow: 0 0 0 1px var(--tc) inset; }
.team-tile.is-done { opacity: .62; }

/* ---------- Pavé numérique ---------- */
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.key { min-height: 54px; border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(0,0,0,.25); font-size: 24px; font-variant-numeric: tabular-nums; font-weight: 400; transition: transform .1s, background .15s; }
.key:active { transform: scale(.95); background: rgba(255,255,255,.06); }
.key.fn { font-size: 15px; color: var(--muted); }

/* ---------- Grand solde ---------- */
.wallet { display: flex; align-items: center; justify-content: center; gap: 14px; }
.wallet img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(201,165,92,.35)); }
.wallet .amount { font-family: var(--ft); font-weight: 300; font-size: clamp(64px, 22vw, 108px); line-height: .9; letter-spacing: -.02em; }
.wallet-label { text-align: center; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }

.timer-xl { font-family: var(--ft); font-weight: 200; font-size: clamp(84px, 30vw, 160px); line-height: .9; letter-spacing: -.03em; text-align: center; }
.timer-xl.alert { color: var(--danger); animation: pulse 1s ease-in-out infinite; }
.timer-xl.paused { opacity: .5; }
@keyframes pulse { 50% { opacity: .55; } }
.progress { height: 2px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s linear; }

.banner-pause { text-align: center; padding: 10px; border-radius: 12px; border: 1px solid rgba(224,176,79,.4); color: #e0b04f; letter-spacing: .2em; text-transform: uppercase; font-size: 13px; }

/* ---------- Avatars à choisir ---------- */
.emoji-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.emoji-grid button { aspect-ratio: 1; border-radius: 12px; border: 1px solid var(--line-soft); background: rgba(0,0,0,.25); font-size: 26px; line-height: 1; display: grid; place-items: center; padding: 0; }
.emoji-grid button.sel { border-color: var(--accent); background: rgba(201,165,92,.14); }

/* ---------- Toasts & modales ---------- */
#toasts { position: fixed; left: 50%; top: calc(14px + var(--safe-t)); transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { background: #1d1a13; border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; font-size: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.5); animation: toastIn .25s ease; }
.toast.bad { border-color: rgba(226,96,79,.6); }
.toast.good { border-color: rgba(98,192,140,.6); }
@keyframes toastIn { from { transform: translateY(-10px); opacity: 0; } }
.modal-wrap { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.72); display: flex; align-items: flex-end; justify-content: center; padding: 16px; padding-bottom: calc(16px + var(--safe-b)); animation: fade .18s ease; }
@media (min-width: 700px) { .modal-wrap { align-items: center; } }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(100%, 460px); background: #15130e; border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: flex; flex-direction: column; gap: 14px; animation: rise .22s ease; max-height: 88dvh; overflow: auto; }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.modal h3 { margin: 0; font-family: var(--fd); font-weight: 400; font-size: 26px; line-height: 1.1; }
.modal p { margin: 0; color: var(--muted); }
.modal .actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 4px; }

/* ---------- Effets (pluie d'étoiles, +N) ---------- */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.fx-star { position: absolute; width: 40px; height: 40px; object-fit: contain; will-change: transform, opacity; filter: drop-shadow(0 6px 16px rgba(201,165,92,.45)); }
.fx-plus { position: absolute; font-family: var(--ft); font-weight: 500; color: var(--accent); text-shadow: 0 6px 30px rgba(201,165,92,.5); white-space: nowrap; will-change: transform, opacity; }
.gift-overlay { position: fixed; inset: 0; z-index: 75; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: radial-gradient(ellipse at center, rgba(70,55,25,.97), rgba(6,5,4,.98) 70%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: fade .25s ease; text-align: center; padding: 24px; pointer-events: none; }
.gift-overlay .big { font-family: var(--ft); font-weight: 300; font-size: clamp(80px, 30vw, 150px); line-height: .9; color: var(--accent); }
.gift-overlay .from { font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.gift-overlay img { width: 96px; height: 96px; object-fit: contain; animation: spinIn .9s cubic-bezier(.2,1.4,.4,1); }
@keyframes spinIn { from { transform: scale(0) rotate(-200deg); } }

/* =====================================================================
   ÉCRAN GÉANT
   ===================================================================== */
.stage { position: fixed; inset: 0; overflow: hidden; background: var(--bg); cursor: default; }
.stage.idle-cursor { cursor: none; }
.stage .bg { position: absolute; inset: 0; background: var(--bg) center/cover no-repeat; transition: opacity .8s; }
.stage .veil { position: absolute; inset: 0; background: var(--bg); opacity: var(--overlay); }
.stage .vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.55) 100%); pointer-events: none; }
.st-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52vw; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2.2vh; }
.st-kicker { font-size: 1.5vh; letter-spacing: .4em; text-transform: uppercase; color: var(--accent); font-weight: 500; padding-left: .4em; }
.st-title { font-family: var(--fd); font-weight: 400; font-size: 9vh; line-height: 1; margin: 0; }
.st-sub { font-size: 2.4vh; color: var(--muted); margin: 0; font-weight: 300; letter-spacing: .02em; }
.st-logo { max-height: 14vh; max-width: 36vw; object-fit: contain; }
.st-timer { font-family: var(--ft); font-weight: 200; font-size: min(30vh, 19vw); line-height: .86; letter-spacing: -.035em; }
.st-timer.alert { color: var(--danger); animation: pulse 1s ease-in-out infinite; }
.st-timer.paused { opacity: .42; }
.st-progress { width: 34vw; height: 2px; background: var(--line-soft); }
.st-progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s linear; }
.st-phase { font-size: 2.6vh; color: var(--text); font-weight: 300; letter-spacing: .04em; min-height: 3.4vh; }
.st-pause { font-size: 2vh; letter-spacing: .5em; text-transform: uppercase; color: #e0b04f; padding-left: .5em; animation: pulse 1.6s ease-in-out infinite; }

.qr-card { background: #f6f2ea; padding: 2.2vh; border-radius: 2.2vh; box-shadow: 0 3vh 8vh rgba(0,0,0,.45); }
.qr-card svg { display: block; width: 100%; height: 100%; }
.qr-lobby { width: 34vh; height: 34vh; }
.st-mini-qr { position: absolute; left: 50%; bottom: 3.2vh; transform: translateX(-50%); display: flex; align-items: center; gap: 1.4vh; padding: 1vh 1.6vh 1vh 1vh; border-radius: 1.6vh; background: rgba(0,0,0,.4); border: 1px solid var(--line-soft); }
.st-mini-qr .qr-card { width: 11vh; height: 11vh; padding: .9vh; border-radius: 1vh; box-shadow: none; }
.st-mini-qr span { font-size: 1.35vh; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); max-width: 24vh; line-height: 1.6; text-align: left; }

.corner { position: absolute; width: 23vw; display: flex; gap: 1.8vw; align-items: center; transition: opacity .6s, transform .6s; }
.corner.c0 { left: 3.2vw; top: 4.5vh; }
.corner.c1 { right: 3.2vw; top: 4.5vh; flex-direction: row-reverse; text-align: right; }
.corner.c2 { left: 3.2vw; bottom: 4.5vh; }
.corner.c3 { right: 3.2vw; bottom: 4.5vh; flex-direction: row-reverse; text-align: right; }
.corner .cv { width: 13vh; height: 13vh; border-radius: 50%; overflow: hidden; flex: none; border: .45vh solid var(--tc); display: grid; place-items: center; background: rgba(0,0,0,.45); font-size: 7vh; line-height: 1; position: relative; transition: box-shadow .4s; }
.corner .cv img { width: 100%; height: 100%; object-fit: cover; }
.corner .cv .ph { font-family: var(--fd); font-size: 5vh; color: var(--tc); }
.corner .cv.waiting { border-style: dashed; opacity: .6; }
.corner .ct { min-width: 0; display: flex; flex-direction: column; gap: .5vh; }
.corner .cg { font-size: 1.3vh; letter-spacing: .3em; text-transform: uppercase; color: var(--tc); font-weight: 500; }
.corner .cn { font-family: var(--fd); font-size: 3.4vh; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.corner .cs { display: flex; align-items: center; gap: .8vh; }
.corner.c1 .cs, .corner.c3 .cs { justify-content: flex-end; }
.corner .cs img { width: 4.4vh; height: 4.4vh; object-fit: contain; }
.corner .cs b { font-family: var(--ft); font-weight: 300; font-size: 6.4vh; line-height: 1; letter-spacing: -.02em; transition: color .2s; }
.corner .ca { font-size: 1.5vh; color: var(--muted); letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.corner .cstat { margin-top: .4vh; }
.corner .cstat .pill { font-size: 1.25vh; padding: .5vh 1.2vh; }
.corner.flash .cv { box-shadow: 0 0 0 1vh rgba(201,165,92,.25), 0 0 8vh rgba(201,165,92,.6); }
.corner.leader .cv::after { content: ""; position: absolute; inset: -1vh; border-radius: 50%; border: 1px solid var(--accent); opacity: .7; }
.scr-up { color: var(--ok) !important; }
.scr-down { color: var(--danger) !important; }
.scr-chip { position: absolute; font-family: var(--ft); font-size: 3vh; font-weight: 500; pointer-events: none; animation: chip .7s ease-out forwards; }
@keyframes chip { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-5vh); } }

/* Barre de commande de l'écran (apparaît au mouvement de la souris) */
.dock { position: absolute; left: 50%; bottom: 2vh; transform: translate(-50%, 140%); display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 999px; background: rgba(12,11,8,.92); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0,0,0,.6); transition: transform .3s ease; z-index: 50; flex-wrap: nowrap; white-space: nowrap; }
.dock.show { transform: translate(-50%, 0); }
.dock .sep { width: 1px; height: 26px; background: var(--line-soft); margin: 0 4px; }
.dock .btn { min-height: 42px; font-size: 14px; padding: 0 16px; }
.dock .tm { font-family: var(--ft); font-size: 15px; color: var(--muted); padding: 0 10px; font-variant-numeric: tabular-nums; }
.audio-hint { position: absolute; top: 2vh; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: rgba(0,0,0,.5); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-soft); z-index: 40; }
.st-offline { position: absolute; top: 2vh; right: 2vw; z-index: 45; }

/* =====================================================================
   PANNEAU HÔTE
   ===================================================================== */
.host { max-width: 1180px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 18px calc(110px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; border: 1px solid var(--line-soft); background: rgba(0,0,0,.25); position: sticky; top: calc(8px + var(--safe-t)); z-index: 20; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.tabs button { flex: 1; min-height: 40px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-size: 14px; letter-spacing: .04em; }
.tabs button.on { background: var(--accent); color: #14110a; font-weight: 500; }
.host-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 960px) { .host-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; } }
.sec-title { font-family: var(--fd); font-size: 22px; margin: 0; font-weight: 400; }
.live-timer { font-family: var(--ft); font-weight: 200; font-size: clamp(60px, 16vw, 96px); line-height: .9; text-align: center; letter-spacing: -.03em; }
.live-timer.alert { color: var(--danger); }
.ctrl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ctrl-grid .wide { grid-column: 1 / -1; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.steps button { min-height: 54px; border-radius: 12px; border: 1px solid var(--line-soft); background: rgba(0,0,0,.25); font-size: 12px; letter-spacing: .06em; color: var(--muted); padding: 4px; line-height: 1.2; }
.steps button.on { border-color: var(--accent); color: var(--text); background: rgba(201,165,92,.14); }
.trow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.trow:first-child { border-top: 0; }
.trow .tot { font-family: var(--ft); font-size: 30px; font-weight: 300; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 6px; }
.trow .tot img { width: 20px; height: 20px; object-fit: contain; }
.matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.matrix th, .matrix td { padding: 8px 4px; text-align: center; border-bottom: 1px solid var(--line-soft); }
.matrix th { font-weight: 400; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix td button { min-width: 48px; min-height: 36px; border-radius: 10px; border: 1px solid var(--line-soft); background: rgba(0,0,0,.25); font-variant-numeric: tabular-nums; }
.matrix td button.has { border-color: var(--line); color: var(--accent); }
.matrix tfoot td { font-family: var(--ft); font-size: 18px; border-bottom: 0; }
.save-bar { position: fixed; left: 50%; bottom: calc(16px + var(--safe-b)); transform: translateX(-50%); z-index: 30; display: flex; gap: 10px; align-items: center; padding: 8px 8px 8px 18px; border-radius: 999px; background: #1b1812; border: 1px solid var(--accent); box-shadow: 0 16px 50px rgba(0,0,0,.6); }
.save-bar span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 900px) { .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.color-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.color-in { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line-soft); background: rgba(0,0,0,.25); }
.color-in input[type=color] { width: 34px; height: 34px; border: 0; padding: 0; background: none; border-radius: 8px; overflow: hidden; }
.color-in input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.color-in input[type=color]::-webkit-color-swatch { border: 1px solid rgba(255,255,255,.2); border-radius: 8px; }
.color-in span { font-size: 13px; color: var(--muted); }
.upl { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; border: 1px dashed var(--line); }
.upl .thumb { width: 64px; height: 44px; border-radius: 8px; background: rgba(0,0,0,.35) center/cover no-repeat; flex: none; display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.upl .thumb.contain { background-size: contain; }
.upl .grow b { display: block; font-weight: 500; font-size: 14px; }
.upl .grow small { color: var(--muted); font-size: 12px; }
.rot { width: 100%; border-collapse: separate; border-spacing: 6px; }
.rot th { font-size: 11px; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: left; }
.rot select.input { min-height: 42px; font-size: 14px; padding: 0 30px 0 10px; background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px; }
select.input.bad { border-color: var(--danger); }
.dur { display: flex; align-items: center; gap: 6px; }
.dur input { width: 64px; text-align: center; min-height: 42px; padding: 0 6px; }
.access-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.access-card { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.access-card .qr-card { width: 180px; height: 180px; padding: 12px; border-radius: 14px; box-shadow: none; }
.access-card .code { font-family: var(--ft); font-size: 28px; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.access-card input.input { text-align: center; letter-spacing: .2em; }
.url { font-size: 12px; color: var(--muted); word-break: break-all; }
.dev-list { display: flex; flex-wrap: wrap; gap: 8px; }
.home-list { display: flex; flex-direction: column; gap: 10px; }
.home-list a { display: flex; justify-content: space-between; align-items: center; text-decoration: none; color: inherit; padding: 18px; border-radius: var(--r); border: 1px solid var(--line-soft); background: rgba(0,0,0,.25); }
.home-list a b { font-family: var(--fd); font-weight: 400; font-size: 22px; display: block; }
.home-list a small { color: var(--muted); }
.slider { width: 100%; accent-color: var(--accent); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.toggle:first-of-type { border-top: 0; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.14); transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }

@media print {
  body { background: #fff; color: #000; }
  .tabs, .save-bar, .noprint { display: none !important; }
  .card { border: 1px solid #ccc; background: #fff; backdrop-filter: none; break-inside: avoid; }
  .access-card .code { color: #000; }
}

/* Écran de don : tout doit tenir sans défilement sur un petit téléphone */
.give-head { flex-direction: row !important; text-align: left !important; align-items: center !important; }
.give-head .avatar { width: 64px; height: 64px; font-size: 34px; }
.give-wallet .amount { font-size: clamp(56px, 18vw, 92px); }
@media (max-height: 740px) { .key { min-height: 48px; } .give-wallet .amount { font-size: 54px; } }
