/* Orange Ibiza Spirit — styles communs (joueur, président, écran, régie) */
:root {
  --orange: #ff7900; --orange-dark: #c65300; --sun: #ffb400; --gold: #f3b61f;
  --ink: #141210; --ink2: #221d18; --ink3: #2f2822; --paper: #f4f1eb; --white: #fff;
  --muted: #8f877d; --line: #3a322b; --green: #2fa36b; --red: #d64545; --blue: #3b7be0;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button[disabled] { cursor: not-allowed; opacity: .45; }
input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sq { display: inline-block; width: 18px; height: 18px; background: var(--orange); vertical-align: -2px; margin-right: 6px; }

/* ================= Joueur (mobile, sombre) ================= */
body.player {
  background: radial-gradient(circle at 80% -10%, rgba(255,121,0,.35), transparent 45%),
              radial-gradient(circle at -10% 110%, rgba(255,180,0,.18), transparent 40%), var(--ink);
  color: #fff; min-height: 100vh; min-height: 100dvh;
}
.app { max-width: 520px; margin: 0 auto; padding: 14px 16px 120px; }
.appbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.brand { font-weight: 900; letter-spacing: .06em; font-size: 13px; text-transform: uppercase; display: flex; align-items: center; }
.phase-pill { font-size: 11px; font-weight: 800; padding: 5px 10px; border-radius: 99px; background: rgba(255,121,0,.18); color: #ffb37a; text-transform: uppercase; letter-spacing: .06em; }
.lives { display: flex; align-items: center; gap: 6px; background: var(--ink2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 12px; }
.lives .lbl { font-size: 12px; color: var(--muted); margin-right: auto; }
.sun { font-size: 24px; filter: drop-shadow(0 0 6px rgba(255,180,0,.6)); transition: transform .3s, opacity .3s, filter .3s; }
.sun.off { opacity: .2; filter: grayscale(1); transform: scale(.85); }
.sun.bonus { position: relative; }
.bonus-tag { font-size: 10px; font-weight: 800; color: var(--ink); background: var(--sun); border-radius: 6px; padding: 2px 6px; margin-left: 4px; }
.card { background: var(--ink2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; }
.card.hot { background: linear-gradient(135deg, var(--orange), #ff9a3d); color: #111; border: 0; }
.card.win { background: linear-gradient(135deg, #f3b61f, #ffde7a); color: #111; border: 0; }
.card.bad { border-color: rgba(214,69,69,.6); background: rgba(214,69,69,.12); }
.card.good { border-color: rgba(47,163,107,.6); background: rgba(47,163,107,.13); }
.kicker { font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; color: #ffb37a; margin-bottom: 6px; }
.card.hot .kicker, .card.win .kicker { color: rgba(0,0,0,.6); }
.title { font-size: 22px; font-weight: 850; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 8px; }
.text { font-size: 15px; line-height: 1.45; color: #d9d2c8; margin: 0; }
.card.hot .text, .card.win .text { color: #2b2018; }
.choices { display: grid; gap: 10px; margin-top: 14px; }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 15px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--ink3); color: #fff; font-weight: 700; font-size: 16px; min-height: 58px; transition: transform .1s, border-color .2s, background .2s; }
.choice:active:not([disabled]) { transform: scale(.98); }
.choice .l { flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--orange); color: #111; font-weight: 900; }
.choice.sel { border-color: var(--orange); background: rgba(255,121,0,.18); }
.choice.ok { border-color: var(--green); background: rgba(47,163,107,.25); }
.choice.ko { border-color: var(--red); background: rgba(214,69,69,.2); }
.choice[disabled] { opacity: .65; cursor: default; }
.timer { height: 8px; border-radius: 99px; background: var(--ink3); overflow: hidden; margin-top: 12px; }
.timer > i { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--orange)); width: 100%; transition: width .2s linear; }
.count { font-variant-numeric: tabular-nums; font-weight: 900; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 850; min-height: 50px; background: var(--ink3); color: #fff; }
.btn.block { width: 100%; }
.btn.orange { background: var(--orange); color: #111; }
.btn.red { background: var(--red); color: #fff; }
.btn.green { background: var(--green); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: inherit; }
.btn.gold { background: linear-gradient(135deg, #f3b61f, #ffd86b); color: #111; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.field input, .field textarea { width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink3); color: #fff; font-size: 17px; }
.field input:focus { outline: 2px solid var(--orange); }
.err { color: #ff8b8b; font-size: 14px; min-height: 18px; margin: 6px 0; }
.hero-login { text-align: center; padding: 34px 0 18px; }
.hero-login h1 { font-size: 34px; line-height: 1; margin: 12px 0 6px; letter-spacing: -.04em; }
.hero-login .sunbig { font-size: 64px; filter: drop-shadow(0 0 20px rgba(255,160,0,.7)); }

/* Grille des 6 chiffres */
.nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.num { aspect-ratio: 1; border-radius: 18px; border: 2px solid var(--line); background: var(--ink3); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; }
.num b { font-size: 42px; line-height: 1; font-weight: 900; }
.num small { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.15; }
.num.free { border-color: var(--orange); box-shadow: 0 0 0 0 rgba(255,121,0,.6); animation: pulse 1.6s infinite; }
.num.taken { opacity: .5; }
.num.mine { background: var(--orange); color: #111; border-color: var(--orange); opacity: 1; }
.num.mine small { color: #2b2018; }
.num.winner { background: var(--gold); color: #111; border-color: #fff; opacity: 1; transform: scale(1.04); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,121,0,.5); } 70% { box-shadow: 0 0 0 10px rgba(255,121,0,0); } 100% { box-shadow: 0 0 0 0 rgba(255,121,0,0); } }

/* Roue (canvas) */
.wheel-box { position: relative; width: min(84vw, 340px); aspect-ratio: 1; margin: 14px auto 6px; }
.wheel-box canvas { width: 100%; height: 100%; display: block; }
.wheel-box .pointer { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 30px solid #fff; filter: drop-shadow(0 3px 4px rgba(0,0,0,.5)); z-index: 2; }

/* Parole */
.speech { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(20,18,16,.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); z-index: 20; }
.speech-in { max-width: 520px; margin: 0 auto; }
.speech-row { display: flex; align-items: center; gap: 10px; }
.speech-row .st { flex: 1; font-size: 13px; color: #d9d2c8; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); display: inline-block; margin-right: 6px; }
.dot.pending { background: var(--sun); } .dot.ok { background: var(--green); } .dot.live { background: var(--red); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.hold { width: 100%; min-height: 64px; border-radius: 16px; border: 0; font-weight: 900; font-size: 17px; background: var(--green); color: #fff; user-select: none; -webkit-user-select: none; touch-action: none; margin-top: 8px; }
.hold.on { background: var(--red); box-shadow: 0 0 0 6px rgba(214,69,69,.3); }

.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(0,0,0,.82); padding: 24px; text-align: center; }
.golden-burst { font-size: 34px; font-weight: 900; color: var(--gold); text-shadow: 0 0 30px rgba(243,182,31,.8); animation: pop .6s ease-out; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.toast { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); background: #fff; color: #111; padding: 10px 16px; border-radius: 12px; font-weight: 700; z-index: 99; box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: 92vw; }
.list6 { display: grid; gap: 6px; margin-top: 10px; }
.list6 div { background: var(--ink3); padding: 10px 12px; border-radius: 10px; font-weight: 700; }
.net { position: fixed; top: 0; left: 0; right: 0; background: var(--red); color: #fff; text-align: center; font-size: 12px; padding: 4px; z-index: 98; }

/* ================= Écran général 16:9 ================= */
body.screen { background: #0d0b09; color: #fff; overflow: hidden; height: 100vh; }
.stage { position: absolute; inset: 0; display: flex; flex-direction: column;
  background: radial-gradient(circle at 85% 0%, rgba(255,121,0,.35), transparent 45%), radial-gradient(circle at 0% 100%, rgba(255,180,0,.2), transparent 40%), #0d0b09; }
.stage-top { display: flex; justify-content: space-between; align-items: center; padding: 2.2vh 3vw; font-weight: 900; letter-spacing: .14em; font-size: 1.5vh; text-transform: uppercase; color: #ffb37a; }
.stage-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 6vw 4vh; min-height: 0; }
.s-kicker { font-size: 2.2vh; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); margin-bottom: 2vh; }
.s-title { font-size: 6vh; font-weight: 900; line-height: 1.05; letter-spacing: -.03em; max-width: 85vw; }
.s-sub { font-size: 2.8vh; color: #cfc7bc; margin-top: 2vh; }
.s-big { font-size: 18vh; font-weight: 900; line-height: .9; color: var(--orange); font-variant-numeric: tabular-nums; }
.s-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(22vw, 1fr)); gap: 2vh 2vw; margin-top: 4vh; }
.s-opt { background: rgba(255,255,255,.06); border: .3vh solid rgba(255,255,255,.12); border-radius: 2vh; padding: 2.6vh 2vw; font-size: 3.4vh; font-weight: 800; display: flex; align-items: center; gap: 1.4vw; position: relative; overflow: hidden; }
.s-opt b { flex: 0 0 auto; width: 6vh; height: 6vh; border-radius: 1.4vh; background: var(--orange); color: #111; display: grid; place-items: center; }
.s-opt.ok { border-color: var(--green); background: rgba(47,163,107,.3); }
.s-opt.dim { opacity: .35; }
.s-opt .bar { position: absolute; left: 0; bottom: 0; height: .8vh; background: var(--sun); }
.s-opt .pct { margin-left: auto; font-size: 2.6vh; color: #ffd28c; }
.s-timer { position: absolute; right: 4vw; top: 9vh; width: 14vh; height: 14vh; border-radius: 50%; display: grid; place-items: center; font-size: 6vh; font-weight: 900; background: conic-gradient(var(--orange) var(--p, 100%), rgba(255,255,255,.08) 0); }
.s-timer::before { content: ""; position: absolute; inset: 1.2vh; border-radius: 50%; background: #0d0b09; }
.s-timer span { position: relative; }
.s-stats { display: flex; gap: 3vw; margin-top: 3vh; font-size: 2.4vh; color: #cfc7bc; }
.s-stats b { color: #fff; font-size: 3.4vh; display: block; }
.s-names { display: grid; grid-template-columns: repeat(auto-fill, minmax(22vw, 1fr)); gap: 1.2vh 1.4vw; margin-top: 3vh; }
.s-names div { background: rgba(255,255,255,.07); border-left: .6vh solid var(--orange); padding: 1.4vh 1.4vw; font-size: 2.6vh; font-weight: 800; border-radius: .8vh; }
.s-names.big div { font-size: 4vh; padding: 2.4vh 2vw; }
.s-nums { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2vw; margin-top: 4vh; }
.s-num { border-radius: 3vh; border: .4vh solid rgba(255,255,255,.15); background: rgba(255,255,255,.05); aspect-ratio: .8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; transition: all .4s; }
.s-num b { font-size: 14vh; line-height: 1; }
.s-num span { font-size: 2.6vh; font-weight: 800; text-align: center; padding: 0 .6vw; min-height: 3vh; }
.s-num.taken { background: var(--orange); color: #111; border-color: var(--orange); animation: pop .5s; }
.s-num.win { background: var(--gold); color: #111; border-color: #fff; transform: scale(1.08); }
.s-wheel-wrap { display: flex; align-items: center; justify-content: center; gap: 5vw; flex: 1; min-height: 0; }
.s-wheel { position: relative; height: 70vh; aspect-ratio: 1; }
.s-wheel canvas { width: 100%; height: 100%; }
.s-wheel .pointer { position: absolute; left: 50%; top: -1.5vh; transform: translateX(-50%); border-left: 3vh solid transparent; border-right: 3vh solid transparent; border-top: 6vh solid #fff; filter: drop-shadow(0 .6vh .8vh rgba(0,0,0,.6)); z-index: 2; }
.s-speaker { position: absolute; left: 3vw; right: 3vw; bottom: 3vh; background: var(--red); border-radius: 2vh; padding: 2vh 2vw; font-size: 3.2vh; font-weight: 900; display: flex; justify-content: space-between; align-items: center; z-index: 10; }
.s-overlay { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #0d0b09; padding: 6vw; }
.s-golden { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(243,182,31,.5), rgba(0,0,0,.92) 60%); }
.s-golden .t { font-size: 10vh; font-weight: 900; color: var(--gold); text-shadow: 0 0 6vh rgba(243,182,31,.9); animation: pop .8s ease-out; }
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 15; }

/* ================= Staff (régie / président) clair ================= */
body.staff { background: var(--paper); color: var(--ink); min-height: 100vh; }
body.staff .card { background: #fff; border: 1px solid #e3ddd3; color: var(--ink); }
body.staff .text { color: #4d473f; }
body.staff .kicker { color: var(--orange-dark); }
body.staff .btn { background: #ece7df; color: var(--ink); min-height: 42px; padding: 10px 14px; border-radius: 11px; }
body.staff .btn.orange { background: var(--orange); color: #111; }
body.staff .btn.red { background: var(--red); color: #fff; }
body.staff .btn.green { background: var(--green); color: #fff; }
body.staff .btn.dark { background: var(--ink); color: #fff; }
body.staff .btn.gold { background: linear-gradient(135deg, #f3b61f, #ffd86b); }
body.staff .btn.sm { min-height: 32px; padding: 6px 10px; font-size: 13px; border-radius: 9px; }
body.staff .field input, body.staff .field textarea, body.staff .field select, body.staff input, body.staff select, body.staff textarea { background: #fff; color: var(--ink); border: 1px solid #d9d3ca; border-radius: 10px; padding: 9px 10px; font-size: 14px; }
body.staff .muted { color: #77736d; }
.install { max-width: 520px; margin: 40px auto; padding: 0 16px; }
.install .form label { display: block; margin-bottom: 10px; font-weight: 700; font-size: 14px; }
.install .form input { display: block; width: 100%; margin-top: 4px; }
.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 10px; font-weight: 600; }
.alert.err { background: #fde3e3; color: #8a1f1f; } .alert.ok { background: #dcf3e6; color: #135a36; } .alert.warn { background: #fff1d6; color: #7a4d00; }

.rg-top { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 14px; padding: 10px 18px; flex-wrap: wrap; }
.rg-top .brand { color: #fff; }
.rg-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #cfc7bc; margin-left: auto; }
.rg-stats b { color: #fff; font-size: 16px; margin-right: 3px; }
.tabs { display: flex; gap: 4px; padding: 10px 18px 0; flex-wrap: wrap; border-bottom: 1px solid #e3ddd3; background: #fff; position: sticky; top: 48px; z-index: 29; }
.tab { border: 0; background: transparent; padding: 10px 14px; font-weight: 800; color: #77736d; border-bottom: 3px solid transparent; }
.tab.on { color: var(--ink); border-bottom-color: var(--orange); }
.rg-wrap { padding: 16px 18px 60px; max-width: 1500px; margin: 0 auto; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.phases { display: flex; gap: 6px; flex-wrap: wrap; }
.phase-btn { border: 1px solid #d9d3ca; background: #fff; border-radius: 10px; padding: 8px 10px; font-weight: 800; font-size: 13px; text-align: left; }
.phase-btn small { display: block; font-size: 10px; color: var(--orange-dark); letter-spacing: .06em; }
.phase-btn.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.phase-btn.on small { color: #ffc58f; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row + .row { margin-top: 8px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th, table.t td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #eee7dd; vertical-align: top; }
table.t th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #77736d; position: sticky; top: 0; background: #fff; }
table.t tr.cut td { border-bottom: 3px solid var(--orange); }
.scroll { max-height: 460px; overflow: auto; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; background: #ece7df; }
.badge.o { background: #ffe1c7; color: #8a3b00; } .badge.g { background: #d6f0e1; color: #135a36; } .badge.r { background: #fbdada; color: #8a1f1f; } .badge.k { background: var(--ink); color: #fff; }
.qbox { border: 2px solid var(--orange); border-radius: 14px; padding: 14px; background: #fffaf4; }
.qbox .qt { font-size: 18px; font-weight: 800; margin: 4px 0 10px; }
.dist { display: grid; gap: 6px; margin: 10px 0; }
.dist div { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dist i { display: block; height: 10px; background: var(--orange); border-radius: 5px; min-width: 2px; }
.dist .ok i { background: var(--green); }
.log { font-size: 12px; max-height: 260px; overflow: auto; }
.log div { padding: 4px 0; border-bottom: 1px dashed #e7e0d5; }
.log time { color: var(--orange-dark); font-weight: 800; margin-right: 6px; }
.sp-item { border: 1px solid #e3ddd3; border-radius: 12px; padding: 10px; margin-bottom: 8px; background: #fff; }
.sp-item.LIVE { border: 2px solid var(--red); background: #fff2f2; }
.sp-item.PRELISTEN { border: 2px solid var(--green); }
.sp-item.REQUESTED { border-left: 5px solid var(--sun); animation: flash 1.2s infinite; }
@keyframes flash { 50% { background: #fff6dd; } }
.vu { height: 10px; background: #ece7df; border-radius: 5px; overflow: hidden; margin: 6px 0; }
.vu i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--sun), var(--red)); transition: width .08s; }
.qform { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qform .full { grid-column: 1 / -1; }
.qform label { font-size: 12px; font-weight: 700; color: #77736d; display: flex; flex-direction: column; gap: 3px; }
.mini-nums { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 10px 0; }
.mini-nums div { border: 2px solid #e3ddd3; border-radius: 10px; padding: 8px 4px; text-align: center; font-size: 12px; min-height: 64px; }
.mini-nums b { display: block; font-size: 24px; }
.mini-nums .t { border-color: var(--orange); background: #fff3e6; }
.mini-nums .w { border-color: var(--gold); background: #fff4cc; }

/* Président (mobile clair, gros boutons) */
.pres { max-width: 560px; margin: 0 auto; padding: 14px 16px 40px; }
.pres .btn { min-height: 54px; font-size: 16px; }
.pres-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.pres-stats div { background: #fff; border: 1px solid #e3ddd3; border-radius: 12px; padding: 10px; text-align: center; }
.pres-stats b { display: block; font-size: 24px; }
.pres-stats span { font-size: 11px; color: #77736d; }
.golden-big { width: 100%; min-height: 90px !important; font-size: 22px !important; border-radius: 20px !important; }
