@import url('/fonts/bebas-neue/latin-400.css');
@import url('/fonts/outfit/latin-400.css');
@import url('/fonts/outfit/latin-600.css');
@import url('/fonts/outfit/latin-800.css');

:root {
  --primary: #0b1026; --accent: #f5c542;
  --ink: #0b1026; --paper: #f4f2ec; --line: rgba(255,255,255,.14);
  --glass: rgba(255,255,255,.06); --glass2: rgba(255,255,255,.1);
  --good: #2fd27a; --bad: #ff4d5e;
  --display: 'Bebas Neue', 'Impact', sans-serif;
  --body: 'Outfit', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; font-family: var(--body); }
button { font: inherit; cursor: pointer; border: 0; color: inherit; background: none; }
input, select, textarea { font: inherit; padding: 12px 14px; border-radius: 10px; width: 100%; }
.hidden { display: none !important; }
.muted { opacity: .65; }
.center { text-align: center; }
.logo { max-height: 64px; max-width: 220px; object-fit: contain; }

/* ======= Fond « plateau » commun écran + téléphone ======= */
.stage { color: #fff; background: var(--primary); position: relative; overflow-x: hidden; }
.stage::before { /* projecteurs */
  content: ''; position: fixed; inset: -20%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(40% 55% at 18% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(40% 55% at 82% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(60% 40% at 50% 110%, rgba(120,140,255,.18), transparent 70%);
  animation: sweep 9s ease-in-out infinite alternate;
}
.stage::after { /* sol quadrillé */
  content: ''; position: fixed; left: -50%; right: -50%; bottom: -10%; height: 45%; pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 60px 60px; transform: perspective(500px) rotateX(62deg); transform-origin: bottom;
  mask-image: linear-gradient(to top, rgba(0,0,0,.55), transparent 85%); -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.55), transparent 85%);
}
@keyframes sweep { from { transform: translateX(-3%) rotate(-2deg); } to { transform: translateX(3%) rotate(2deg); } }
.stage > * { position: relative; z-index: 1; }
.kicker { font-family: var(--display); letter-spacing: .12em; color: var(--accent); }
.gold { color: var(--accent); }

/* capsule (réponse, ligne de classement) */
.cap { --cut: 22px; clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04)); position: relative; }
.cap::before { content: ''; position: absolute; inset: 0; clip-path: inherit; padding: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, transparent), rgba(255,255,255,.25), color-mix(in srgb, var(--accent) 70%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.letter { font-family: var(--display); color: var(--ink); background: var(--accent); display: inline-flex; align-items: center; justify-content: center; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); flex-shrink: 0; }

/* ======= Téléphone ======= */
body.play { min-height: 100dvh; display: flex; flex-direction: column; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
.play header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.play header .who { font-weight: 600; font-size: .95rem; }
.play header .score { font-family: var(--display); font-size: 1.5rem; letter-spacing: .04em; color: var(--accent); }
.play main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 18px; gap: 16px; }
.panel-g { background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 22px; backdrop-filter: blur(8px); }
.play h1 { font-family: var(--display); font-weight: 400; letter-spacing: .03em; font-size: 2.4rem; margin: 0 0 4px; line-height: 1; }
.play .big { font-family: var(--display); font-size: 3.4rem; text-align: center; margin: 0; line-height: 1; }
.play .msg { text-align: center; font-size: 1.15rem; font-weight: 600; margin: 0; }
.play .qhead { text-align: center; }
.play .qhead .kicker { font-size: 1.1rem; }
.play input { background: rgba(255,255,255,.08); border: 1.5px solid var(--line); color: #fff; font-size: 1.1rem; }
.play input::placeholder { color: rgba(255,255,255,.45); }
.play input:focus { outline: none; border-color: var(--accent); }
.play label.f { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; margin: 14px 0 6px; }
.cta { width: 100%; padding: 16px; font-family: var(--display); font-size: 1.7rem; letter-spacing: .06em; color: var(--ink); background: var(--accent); border-radius: 14px; box-shadow: 0 8px 30px color-mix(in srgb, var(--accent) 40%, transparent); }
.cta:active { transform: translateY(2px); }
.cta:disabled { opacity: .4; }
.teams-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.teams-pick button { padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--glass); font-weight: 600; }
.teams-pick button.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pchoices { display: flex; flex-direction: column; gap: 12px; flex: 1; justify-content: center; }
.pchoice { display: flex; align-items: center; gap: 16px; padding: 0 30px; min-height: 84px; font-size: 1.15rem; font-weight: 600; text-align: left; transition: opacity .2s, transform .08s; }
.pchoice .letter { width: 46px; height: 46px; font-size: 1.7rem; }
.pchoice:active { transform: scale(.98); }
.pchoice.sel { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 45%, transparent), color-mix(in srgb, var(--accent) 15%, transparent)); }
.pchoice.dim { opacity: .25; }
.pchoice.noTxt { justify-content: center; }
.pchoice.noTxt .letter { width: 60px; height: 60px; font-size: 2.3rem; }
.buzzer { width: min(70vw, 320px); aspect-ratio: 1; border-radius: 50%; margin: 0 auto; position: relative; font-family: var(--display); font-size: 3.4rem; letter-spacing: .08em; color: var(--ink);
  background: radial-gradient(circle at 35% 28%, #fff6d5 0%, var(--accent) 38%, color-mix(in srgb, var(--accent) 55%, #000) 100%);
  box-shadow: 0 0 0 10px rgba(255,255,255,.06), 0 0 0 22px color-mix(in srgb, var(--accent) 18%, transparent), 0 14px 0 color-mix(in srgb, var(--accent) 40%, #000), 0 0 80px color-mix(in srgb, var(--accent) 55%, transparent);
  transition: transform .06s, box-shadow .06s; animation: breathe 1.6s ease-in-out infinite; }
.buzzer:active { transform: translateY(10px); animation: none; }
.buzzer:disabled { filter: grayscale(1) brightness(.6); animation: none; }
@keyframes breathe { 50% { box-shadow: 0 0 0 10px rgba(255,255,255,.06), 0 0 0 30px color-mix(in srgb, var(--accent) 10%, transparent), 0 14px 0 color-mix(in srgb, var(--accent) 40%, #000), 0 0 120px color-mix(in srgb, var(--accent) 70%, transparent); } }
.verdict { text-align: center; padding: 28px 12px; border-radius: 20px; border: 1px solid var(--line); }
.verdict.good { background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--good) 45%, transparent), transparent 75%); }
.verdict.bad { background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--bad) 40%, transparent), transparent 75%); }
.verdict .icon { font-size: 3.6rem; line-height: 1; }
.verdict .big { margin-top: 8px; }
.verdict.good .big { color: var(--good); } .verdict.bad .big { color: var(--bad); }
.tbar { height: 6px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; }
.tbar i { display: block; height: 100%; background: var(--accent); width: 100%; transition: width .25s linear; box-shadow: 0 0 12px var(--accent); }
.offline { position: fixed; top: 0; left: 0; right: 0; background: var(--bad); color: #fff; text-align: center; padding: 6px; font-weight: 700; z-index: 20; }
.inputrow { display: flex; gap: 10px; }
.inputrow input { font-size: 1.3rem; text-align: center; }
.unit { align-self: center; font-weight: 700; opacity: .8; }

/* ======= Écran projeté ======= */
body.screen { height: 100vh; overflow: hidden; }
.screen .wrap { height: 100vh; display: flex; flex-direction: column; padding: 3vh 3.5vw 3.5vh; gap: 2.2vh; }
.screen .top { display: flex; justify-content: space-between; align-items: center; font-size: 2vh; }
.screen .top .brand { font-family: var(--display); font-size: 3.4vh; letter-spacing: .06em; }
.screen .chip { border: 1px solid var(--line); background: var(--glass); padding: .7vh 1.4vw; border-radius: 999px; font-weight: 600; }
.screen .chip b { color: var(--accent); }
.lobby { flex: 1; display: grid; grid-template-columns: auto 1fr; gap: 5vw; align-items: center; }
.qrframe { position: relative; padding: 2.4vh; background: #fff; border-radius: 2vh; color: var(--ink); text-align: center; box-shadow: 0 0 0 1vh color-mix(in srgb, var(--accent) 25%, transparent), 0 3vh 8vh rgba(0,0,0,.5); }
.qrframe img { width: 40vh; height: 40vh; display: block; }
.qrframe .code { font-family: var(--display); font-size: 7vh; letter-spacing: .5vh; line-height: 1; margin-top: 1.4vh; }
.qrframe .url { font-size: 1.8vh; opacity: .6; }
.lobby .kicker { font-size: 3.4vh; }
.lobby h1 { font-family: var(--display); font-weight: 400; font-size: 12vh; line-height: .9; margin: .5vh 0 3vh; letter-spacing: .02em; text-shadow: 0 0 6vh color-mix(in srgb, var(--accent) 35%, transparent); }
.lobby .count { font-size: 3vh; font-weight: 600; margin-bottom: 2.4vh; }
.lobby .count b { font-family: var(--display); font-size: 6vh; color: var(--accent); vertical-align: middle; margin-right: .6vw; }
.names { display: flex; flex-wrap: wrap; gap: 1vh; max-height: 40vh; overflow: hidden; }
.names span { border: 1px solid var(--line); background: var(--glass2); padding: .8vh 1.5vw; border-radius: 999px; font-weight: 600; font-size: 2.3vh; animation: pop .4s cubic-bezier(.3,1.6,.6,1); }
@keyframes pop { from { transform: scale(.2); opacity: 0; } }
.qhead { display: flex; align-items: center; justify-content: center; gap: 1.5vw; }
.qhead .kicker { font-size: 3vh; }
.qhead .line { height: 2px; flex: 1; background: linear-gradient(90deg, transparent, var(--accent)); max-width: 20vw; }
.qhead .line.r { background: linear-gradient(-90deg, transparent, var(--accent)); }
.qtext { font-size: 5vh; font-weight: 800; text-align: center; line-height: 1.15; padding: 3vh 5vw; --cut: 4vh; }
.qtext.cap { background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03)); }
.qmid { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4vw; min-height: 0; }
.media { max-height: 100%; max-width: 62vw; border-radius: 1.6vh; box-shadow: 0 3vh 6vh rgba(0,0,0,.5); overflow: hidden; display: flex; }
.media img, .media video { max-height: 44vh; max-width: 62vw; display: block; object-fit: contain; }
.media img.blur { animation: unblur linear forwards; }
.media img.zoom { animation: unzoom linear forwards; transform-origin: 50% 40%; }
@keyframes unblur { from { filter: blur(40px) saturate(.6); } to { filter: blur(0); } }
@keyframes unzoom { from { transform: scale(6); } to { transform: scale(1); } }
.media.paused img { animation-play-state: paused; }
.eq { display: flex; align-items: flex-end; gap: .8vh; height: 22vh; }
.eq i { width: 2.2vh; background: linear-gradient(to top, var(--accent), #fff); border-radius: 1vh; animation: eq 1s ease-in-out infinite; }
.eq.paused i { animation-play-state: paused; opacity: .4; }
@keyframes eq { 0%, 100% { height: 15%; } 50% { height: 100%; } }
.ring { position: relative; width: 18vh; height: 18vh; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; filter: drop-shadow(0 0 1vh color-mix(in srgb, var(--accent) 70%, transparent)); }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: rgba(255,255,255,.12); }
.ring .fg { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.ring .n { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 8vh; }
.ring.hot .fg { stroke: var(--bad); }
.ring.hot .n { color: var(--bad); animation: pulse .5s infinite alternate; }
@keyframes pulse { to { transform: scale(1.1); } }
.stat { text-align: center; }
.stat b { display: block; font-family: var(--display); font-size: 8vh; line-height: 1; color: var(--accent); }
.stat span { font-size: 2.4vh; font-weight: 600; opacity: .85; }
.sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8vh 2vw; }
.schoice { display: flex; align-items: center; gap: 1.6vw; min-height: 10.5vh; padding: 0 3.2vw; --cut: 4vh; font-size: 3.4vh; font-weight: 600; transition: opacity .5s, filter .5s; }
.schoice .letter { width: 6vh; height: 6vh; font-size: 4vh; }
.schoice .n { margin-left: auto; font-family: var(--display); font-size: 5vh; }
.schoice .bar { position: absolute; left: 0; bottom: 0; height: .7vh; background: var(--accent); transition: width 1s; opacity: .8; }
.schoice.win { background: linear-gradient(180deg, color-mix(in srgb, var(--good) 75%, transparent), color-mix(in srgb, var(--good) 35%, transparent)); filter: drop-shadow(0 0 3vh color-mix(in srgb, var(--good) 60%, transparent)); }
.schoice.win .letter { background: #fff; }
.schoice.dim { opacity: .3; }
.bigcenter { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4vh; text-align: center; }
.bigcenter .who { font-family: var(--display); font-size: 16vh; line-height: .9; color: var(--accent); text-shadow: 0 0 8vh color-mix(in srgb, var(--accent) 60%, transparent); animation: pop .4s cubic-bezier(.3,1.6,.6,1); }
.bigcenter .sub { font-size: 3.4vh; font-weight: 600; opacity: .9; }
.answer-plate { --cut: 4vh; padding: 2.4vh 5vw; font-size: 5.4vh; font-weight: 800; background: linear-gradient(180deg, color-mix(in srgb, var(--good) 70%, transparent), color-mix(in srgb, var(--good) 30%, transparent)); animation: pop .5s; }
.reveal-row { display: flex; align-items: center; justify-content: center; gap: 4vw; flex: 1; min-height: 0; }
.reveal-row img.cover { max-height: 46vh; max-width: 34vw; border-radius: 1.6vh; box-shadow: 0 3vh 6vh rgba(0,0,0,.5); animation: pop .6s; }
.minirank { display: flex; flex-direction: column; gap: 1vh; min-width: 30vw; }
.minirank div { display: flex; justify-content: space-between; gap: 2vw; padding: 1vh 2vw; border: 1px solid var(--line); background: var(--glass); border-radius: 1.2vh; font-size: 2.6vh; font-weight: 600; }
.minirank div b { color: var(--accent); }
.round { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.round .kicker { font-size: 5vh; animation: slideIn .7s both; }
.round h1 { font-family: var(--display); font-weight: 400; font-size: 24vh; line-height: .85; margin: 1vh 0; letter-spacing: .02em; animation: zoomIn .8s .15s both cubic-bezier(.2,1.4,.5,1); text-shadow: 0 0 10vh color-mix(in srgb, var(--accent) 60%, transparent); }
.round p { font-size: 3.4vh; font-weight: 600; opacity: .85; animation: slideIn .7s .4s both; max-width: 70vw; }
@keyframes slideIn { from { transform: translateY(4vh); opacity: 0; } }
@keyframes zoomIn { from { transform: scale(2.5); opacity: 0; } }
.board { flex: 1; display: grid; grid-template-columns: 1.8fr 1fr; gap: 4vw; min-height: 0; }
.board.noteams { grid-template-columns: 1fr; max-width: 110vh; margin: 0 auto; width: 100%; }
.board h2 { font-family: var(--display); font-weight: 400; font-size: 5vh; letter-spacing: .05em; margin: 0 0 1.6vh; color: var(--accent); }
.lrow { display: flex; align-items: center; gap: 1.6vw; padding: 1.1vh 3vw; margin-bottom: 1vh; --cut: 2.6vh; font-size: 2.9vh; font-weight: 600; animation: slideIn .5s both; }
.lrow .r { font-family: var(--display); font-size: 4vh; width: 4vh; text-align: center; color: var(--accent); }
.lrow .s { margin-left: auto; font-family: var(--display); font-size: 4vh; letter-spacing: .03em; }
.lrow .mv { font-size: 2vh; width: 4vh; text-align: center; font-weight: 800; }
.lrow .mv.up { color: var(--good); } .lrow .mv.down { color: var(--bad); }
.lrow .tm { font-size: 2vh; opacity: .6; white-space: nowrap; margin-left: .6vw; }
.lrow.p1 { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 45%, transparent), rgba(255,255,255,.05)); }
.lrow.p2 { background: linear-gradient(90deg, rgba(220,225,235,.35), rgba(255,255,255,.05)); }
.lrow.p3 { background: linear-gradient(90deg, rgba(205,127,50,.4), rgba(255,255,255,.05)); }
.podium { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2vw; }
.podium .step { width: 22vw; text-align: center; }
.podium .step .name { font-family: var(--display); font-size: 6vh; line-height: 1; margin-bottom: .6vh; }
.podium .step .pts { font-size: 2.4vh; opacity: .85; margin-bottom: 1.4vh; }
.podium .block { font-family: var(--display); font-size: 12vh; display: flex; justify-content: center; padding-top: 2vh; color: var(--ink); clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%); animation: rise 1s both cubic-bezier(.2,1.2,.4,1); transform-origin: bottom; }
.podium .p1 .block { height: 40vh; background: linear-gradient(180deg, #fff3c4, var(--accent)); box-shadow: 0 0 10vh var(--accent); }
.podium .p2 .block { height: 28vh; background: linear-gradient(180deg, #fff, #b8bfcc); }
.podium .p3 .block { height: 20vh; background: linear-gradient(180deg, #f3c9a0, #b36b2c); }
.podium .p1 { order: 2; } .podium .p2 { order: 1; } .podium .p3 { order: 3; }
.podium .p3 .block { animation-delay: .2s; } .podium .p2 .block { animation-delay: .5s; } .podium .p1 .block { animation-delay: .9s; }
.podium .p1 .name, .podium .p1 .pts { animation: slideIn .6s 1.6s both; } .podium .p2 .name, .podium .p2 .pts { animation: slideIn .6s 1.1s both; } .podium .p3 .name, .podium .p3 .pts { animation: slideIn .6s .7s both; }
@keyframes rise { from { transform: scaleY(0); } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.gate { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh; background: color-mix(in srgb, var(--primary) 85%, transparent); backdrop-filter: blur(8px); }
.gate .cta { width: auto; padding: 2vh 4vw; font-size: 4vh; }

/* ======= Animateur & éditeur (clair, efficace) ======= */
body.host, body.admin { background: #f1f2f6; color: #0b1026; }
.topbar { background: #0b1026; color: #fff; padding: 12px 18px; display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.topbar h1 { font-family: var(--display); font-weight: 400; letter-spacing: .05em; font-size: 1.6rem; margin: 0; }
.topbar h1 span { color: #f5c542; }
.topbar a { color: #fff; }
.container { max-width: 1000px; margin: 0 auto; padding: 16px; }
.panel { background: #fff; border-radius: 16px; padding: 16px; margin-bottom: 14px; box-shadow: 0 2px 10px rgba(11,16,38,.06); }
.panel h2 { margin: 0 0 10px; font-size: 1.05rem; }
.host input, .host select, .host textarea, .admin input, .admin select, .admin textarea { border: 1.5px solid #d9dce6; background: #fff; color: #0b1026; }
.admin input:focus, .admin textarea:focus, .admin select:focus { outline: none; border-color: #0b1026; }
.btn { background: #0b1026; color: #fff; padding: 13px 20px; font-weight: 600; font-size: 1rem; border-radius: 12px; }
.btn.accent { background: #f5c542; color: #0b1026; }
.btn.ghost { background: #fff; color: #0b1026; border: 1.5px solid #0b1026; }
.btn.danger { background: #e2384d; } .btn.ok { background: #1fa95e; }
.btn:disabled { opacity: .45; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }
.controls { display: flex; flex-wrap: wrap; gap: 10px; }
.controls .btn { flex: 1 1 150px; }
.bigbtn { width: 100%; padding: 20px; font-size: 1.3rem; }
.stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stats div { background: #eef0f6; border-radius: 10px; padding: 8px 12px; font-weight: 600; font-size: .95rem; }
.list { max-height: 380px; overflow: auto; }
.list .li { display: flex; align-items: center; gap: 8px; padding: 8px 4px; border-bottom: 1px solid #eef0f6; }
.list .li .grow { flex: 1; min-width: 0; }
.list .li .grow small { display: block; opacity: .6; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #1fa95e; display: inline-block; flex-shrink: 0; }
.dot.off { background: #c7cbd6; }
.mini { padding: 5px 10px; font-size: .85rem; border-radius: 8px; background: #eef0f6; color: #0b1026; }
.qprev { background: #eef0f6; border-radius: 12px; padding: 12px; }
.qprev .ans { margin-top: 8px; font-weight: 700; color: #1fa95e; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: #0b1026; color: #f5c542; padding: 2px 8px; border-radius: 6px; }
.qcard { border: 2px solid #eef0f6; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.qcard.manche { border-color: #f5c542; background: #fffbea; }
.qcard .head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.qcard .head b { background: #0b1026; color: #fff; border-radius: 8px; padding: 2px 10px; }
.choice-edit { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.choice-edit .sw { width: 36px; height: 36px; font-family: var(--display); font-size: 1.4rem; background: #f5c542; color: #0b1026; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.choice-edit label { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: .9rem; }
.choice-edit input[type=radio] { width: auto; }
label.f { display: block; font-size: .8rem; font-weight: 700; color: #4b5266; margin: 10px 0 4px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 700px) { .row3, .row4 { grid-template-columns: 1fr 1fr; } }
.chk { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.chk input { width: auto; }
.thumb { max-height: 90px; max-width: 100%; border-radius: 10px; margin-top: 6px; display: block; }
.mediabox { background: #f6f7fa; border-radius: 12px; padding: 10px; margin: 8px 0; }
.mediabox audio, .mediabox video { width: 100%; max-height: 160px; margin-top: 6px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #0b1026; color: #fff; padding: 12px 20px; border-radius: 12px; z-index: 99; }
.help { font-size: .82rem; color: #6b7185; margin: 4px 0 0; }
/* médiathèque */
.warnbox { background: #fff4e5; border: 1px solid #ffc978; cursor: default; }
.panel.warnbox[onclick] { cursor: pointer; }
.okbox { background: #eafaf0; border: 1px solid #9be0b4; }
a.bad, .bad { color: #d12c40; }
.small { font-size: .8rem; }
.drop { border: 2px dashed #c6cbe0; text-align: center; transition: .15s; }
.drop.over { border-color: #0b1026; background: #f3f5fb; }
.dropin { padding: 18px 8px; line-height: 1.9; }
.bar { height: 10px; background: #eef0f6; border-radius: 6px; overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: #0b1026; transition: width .2s; }
.misslist { display: flex; flex-wrap: wrap; gap: 6px; }
.misslist span { background: #fff; border: 1px solid #ffc978; border-radius: 8px; padding: 3px 8px; font-size: .82rem; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mcard { border: 1px solid #e5e8f2; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mcard.pickable { cursor: pointer; } .mcard.pickable:hover { border-color: #0b1026; }
.mprev { height: 86px; border-radius: 8px; background: #f3f5fb; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 2rem; }
.mprev img { width: 100%; height: 100%; object-fit: cover; }
.mname { font-weight: 600; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal { position: fixed; inset: 0; background: rgba(11,16,38,.55); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modalbox { background: #fff; border-radius: 16px; padding: 16px; width: min(760px, 100%); max-height: 85vh; overflow: auto; }
