:root {
  --ink: #0c1222;
  --ink-2: #151d32;
  --ink-3: #202b48;
  --paper: #f4f6fa;
  --white: #fff;
  --text: #f7f9ff;
  --muted: #aab4c9;
  --dark-muted: #69758e;
  --line: rgba(255,255,255,.11);
  --dark-line: #e3e8f1;
  --red: #e51f3d;
  --red-dark: #af1028;
  --green: #12a66f;
  --blue: #2674df;
  --amber: #e99b17;
  --purple: #7c4dff;
  --shadow: 0 24px 70px rgba(2,8,24,.22);
  --soft-shadow: 0 14px 40px rgba(18,28,50,.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--ink); }
body { min-height: 100vh; margin: 0; font-family: Inter, "Segoe UI", Arial, sans-serif; background: var(--ink); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(229,31,61,.35); outline-offset: 3px; }
[disabled] { opacity: .48; cursor: not-allowed !important; }

.brand { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark { display: block; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 15px; background: #fff; object-fit: cover; box-shadow: 0 10px 28px rgba(0,0,0,.2); }
.brand strong { display: block; font-size: 19px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.eyebrow { display: block; color: #ffacbb; font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.boot { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; text-align: center; }
.boot h1 { margin: 0; font-size: clamp(24px, 3vw, 42px); letter-spacing: -.04em; }
.loader { width: 48px; height: 48px; border: 4px solid rgba(255,255,255,.14); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
.connection-banner, .phone-offline { position: fixed; top: 12px; left: 50%; z-index: 100; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: #fff4d8; color: #5a3a00; box-shadow: var(--shadow); font-size: 13px; font-weight: 850; }

/* ÉCRAN PUBLIC — ACCUEIL */
.screen-page { overflow-x: hidden; background: #080d1a; }
.screen-app { min-height: 100vh; }
.lobby-screen { min-height: 100vh; background: radial-gradient(circle at 8% 0%, rgba(229,31,61,.24), transparent 28%), radial-gradient(circle at 92% 18%, rgba(71,95,180,.24), transparent 32%), linear-gradient(145deg,#0b1020,#111a31 58%,#080d19); }
.lobby-shell { width: min(1480px, calc(100% - 42px)); margin: 0 auto; padding: 22px 0 26px; }
.screen-header, .game-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.screen-tools { display: flex; gap: 8px; }
.screen-tools button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.07); color: #e8edf7; font-weight: 800; }
.screen-tools button:hover { background: rgba(255,255,255,.12); }
.lobby-grid { min-height: 55vh; display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,390px); align-items: center; gap: clamp(28px,5vw,80px); padding: 28px 3vw 22px; }
.lobby-copy h1 { margin: 14px 0 18px; max-width: 800px; font-size: clamp(52px,6vw,92px); line-height: .91; letter-spacing: -.065em; }
.lobby-copy h1 em { color: #ff3653; font-style: normal; }
.lobby-copy > p { max-width: 720px; margin: 0; color: var(--muted); font-size: clamp(17px,1.6vw,23px); line-height: 1.45; }
.session-code { width: min(600px,100%); margin-top: 24px; padding: 17px 22px; border: 1px solid rgba(255,255,255,.14); border-radius: 20px; background: rgba(255,255,255,.08); backdrop-filter: blur(14px); }
.session-code span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.session-code strong { display: block; max-width: 100%; margin-top: 6px; font-size: clamp(24px,3vw,52px); line-height: 1.05; letter-spacing: .06em; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.lobby-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; width: min(600px,100%); margin-top: 12px; }
.lobby-stats div { padding: 13px 15px; border-radius: 16px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); }
.lobby-stats b { display: block; font-size: 26px; }
.lobby-stats span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 750; }
.qr-card { width: min(100%, 390px); padding: 18px; border-radius: 28px; background: #fff; color: var(--ink); box-shadow: 0 32px 90px rgba(0,0,0,.35); text-align: center; transform: rotate(1deg); }
.qr-wrap { overflow: hidden; padding: 6px; border: 1px solid #e4e9f1; border-radius: 20px; background: #fff; }
.qr-wrap img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.qr-card > strong { display: block; margin-top: 13px; font-size: 20px; }
.qr-card > small { display: block; width: 100%; margin-top: 5px; color: #7a8497; font-size: 10px; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.lobby-participants { padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,255,255,.055); backdrop-filter: blur(14px); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.section-heading h2 { margin: 4px 0 0; font-size: clamp(22px,2.2vw,32px); letter-spacing: -.035em; }
.count-badge { display: grid; min-width: 44px; height: 44px; place-items: center; padding: 0 12px; border-radius: 14px; background: #fff; color: var(--ink); font-size: 19px; }
.participant-cloud { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 8px; max-height: 132px; overflow: auto; }
.participant-chip { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 10px; min-width: 0; padding: 9px 11px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; background: rgba(255,255,255,.07); animation: rise .35s var(--delay) both; }
.participant-chip > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: rgba(255,255,255,.1); font-size: 23px; }
.participant-chip div { min-width: 0; }
.participant-chip strong, .participant-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.participant-chip strong { font-size: 14px; }
.participant-chip small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.empty-state { padding: 18px; color: var(--muted); text-align: center; }
.empty-state span { display: block; font-size: 30px; }
.empty-state p { margin: 7px 0 0; }

/* QUESTION */
.question-screen, .reveal-screen, .leaderboard-screen { min-height: 100vh; padding: 18px clamp(18px,3vw,48px) 28px; background: radial-gradient(circle at 100% 0%, rgba(66,100,190,.22), transparent 31%), linear-gradient(145deg,#090e1b,#121c33); }
.game-header { min-height: 58px; }
.game-progress { display: flex; align-items: center; justify-content: center; gap: 18px; color: var(--muted); font-size: 15px; font-weight: 800; }
.game-progress b { color: #fff; }
.timer-line { position: relative; height: 8px; overflow: hidden; margin: 12px 0 0; border-radius: 99px; background: rgba(255,255,255,.1); }
.timer-line span, .phone-timer span { display: block; width: 100%; height: 100%; transform: scaleX(1); transform-origin: left; border-radius: inherit; background: linear-gradient(90deg,#24c781,#ffd166,#ff405e); transition: transform .15s linear; }
.timer-line span.danger, .phone-timer span.danger { background: #ff3653; }
.question-content { display: flex; min-height: calc(100vh - 110px); flex-direction: column; justify-content: center; padding: 24px 1vw 0; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.question-meta > span, .question-labels > span { padding: 8px 13px; border: 1px solid rgba(255,172,187,.25); border-radius: 999px; background: rgba(229,31,61,.12); color: #ffb5c2; font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.timer-orb { display: flex; width: 92px; height: 64px; align-items: baseline; justify-content: center; gap: 4px; padding-top: 10px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.08); }
.timer-orb b { font-size: 35px; line-height: 1; }
.timer-orb small { color: var(--muted); }
.question-content > h1 { margin: 0 0 clamp(24px,3.2vh,46px); font-size: clamp(42px,5.1vw,82px); line-height: 1.02; letter-spacing: -.055em; text-wrap: balance; }
.answer-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(10px,1.4vw,20px); }
.answer-card { display: grid; min-height: clamp(100px,14vh,150px); grid-template-columns: 72px 1fr; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 24px; color: #fff; font-size: clamp(22px,2.25vw,36px); font-weight: 900; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 16px 28px rgba(0,0,0,.16); }
.answer-card > b, .phone-answer > b { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 20px; background: rgba(255,255,255,.2); font-size: 27px; }
.answer-0 { background: linear-gradient(145deg,#ee304f,#b71134); }
.answer-1 { background: linear-gradient(145deg,#3085f0,#1b4bab); }
.answer-2 { background: linear-gradient(145deg,#f1aa2e,#c96b0b); }
.answer-3 { background: linear-gradient(145deg,#25b777,#0c7550); }
.answer-grid.count-5 .answer-card:last-child, .answer-grid.count-3 .answer-card:last-child { grid-column: 1 / -1; }

/* RÉPONSE */
.next-pill { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.07); color: var(--muted); font-size: 12px; font-style: normal; font-weight: 800; }
.next-pill b { color: #fff; }
.reveal-layout { display: grid; min-height: calc(100vh - 90px); grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr); align-items: center; gap: clamp(18px,3vw,40px); padding: 24px 1vw; }
.reveal-answer, .distribution-card { position: relative; overflow: hidden; padding: clamp(24px,3vw,44px); border: 1px solid var(--line); border-radius: var(--radius-xl); background: rgba(255,255,255,.065); box-shadow: var(--shadow); }
.reveal-answer { min-height: 470px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(145deg,rgba(14,145,97,.28),rgba(255,255,255,.065)); }
.reveal-answer h1 { position: relative; z-index: 1; margin: 13px 0; font-size: clamp(38px,4vw,68px); line-height: 1.04; letter-spacing: -.055em; }
.reveal-answer p { position: relative; z-index: 1; margin: 0; max-width: 680px; color: #cbd5e5; font-size: clamp(16px,1.4vw,21px); line-height: 1.5; }
.answer-check { position: absolute; right: -18px; bottom: -75px; color: rgba(255,255,255,.08); font-size: 340px; font-weight: 900; line-height: 1; }
.distribution-card h2 { margin: 5px 0 0; font-size: clamp(28px,3vw,44px); letter-spacing: -.04em; }
.distribution-bars { display: grid; gap: 18px; margin-top: 28px; }
.distribution-row { display: grid; grid-template-columns: minmax(180px,1.25fr) minmax(110px,1fr) 90px; align-items: center; gap: 14px; opacity: .7; }
.distribution-row.is-correct { opacity: 1; }
.distribution-row > div:first-child { display: grid; min-width: 0; grid-template-columns: 38px 1fr; align-items: center; gap: 9px; }
.distribution-row > div:first-child b { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: rgba(255,255,255,.1); }
.distribution-row span { overflow: hidden; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 14px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.09); }
.bar-track i { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg,#ff3653,#fb8295); transition: width .5s ease; }
.is-correct .bar-track i { background: linear-gradient(90deg,#1ab579,#6fe3b7); }
.distribution-row > strong { text-align: right; }
.distribution-row > strong small { color: var(--muted); font-size: 11px; }

/* CLASSEMENT */
.leaderboard-screen { background: radial-gradient(circle at 50% -15%, rgba(229,31,61,.28), transparent 38%), linear-gradient(145deg,#090e1b,#121c33); }
.leaderboard-screen.is-final { background: radial-gradient(circle at 50% -15%, rgba(235,163,36,.27), transparent 39%), linear-gradient(145deg,#090e1b,#151b2b); }
.board-layout { width: min(1150px,100%); margin: 0 auto; padding: 22px 0 38px; }
.board-heading { text-align: center; }
.board-heading h1 { margin: 8px 0 0; font-size: clamp(42px,5vw,76px); letter-spacing: -.055em; }
.podium { display: flex; min-height: 330px; align-items: flex-end; justify-content: center; gap: 14px; margin: 20px auto 18px; }
.podium-place { position: relative; width: min(31%,280px); padding: 20px 14px 0; border: 1px solid var(--line); border-radius: 24px 24px 0 0; background: rgba(255,255,255,.07); text-align: center; animation: podiumRise .55s ease both; }
.podium-place.place-1 { min-height: 300px; background: linear-gradient(180deg,rgba(240,176,49,.24),rgba(255,255,255,.07)); }
.podium-place.place-2 { min-height: 250px; }
.podium-place.place-3 { min-height: 215px; }
.podium-medal { position: absolute; top: -22px; left: 50%; font-size: 38px; transform: translateX(-50%); }
.podium-avatar { display: grid; width: 68px; height: 68px; place-items: center; margin: 6px auto 10px; border-radius: 22px; background: rgba(255,255,255,.12); font-size: 36px; }
.podium-place > strong, .podium-place > small, .podium-place > b { display: block; }
.podium-place > strong { overflow: hidden; font-size: clamp(15px,1.7vw,21px); text-overflow: ellipsis; white-space: nowrap; }
.podium-place > small { overflow: hidden; margin-top: 4px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.podium-place > b { margin-top: 13px; color: #ffcf70; font-size: clamp(18px,2vw,26px); }
.podium-step { position: absolute; right: 0; bottom: 0; left: 0; height: 61px; padding-top: 10px; border-top: 1px solid var(--line); color: rgba(255,255,255,.3); font-size: 37px; font-weight: 950; }
.leader-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.leader-list li { display: grid; min-width: 0; grid-template-columns: 42px 44px 1fr auto; align-items: center; gap: 11px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.055); }
.rank-number { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: rgba(255,255,255,.08); font-weight: 900; }
.leader-avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: rgba(255,255,255,.08); font-size: 22px; }
.leader-list li > div { min-width: 0; }
.leader-list strong, .leader-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leader-list small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.leader-list li > b { font-size: 18px; }

/* TÉLÉPHONE — INSCRIPTION */
.phone-page { min-height: 100vh; background: radial-gradient(circle at 0 0,rgba(229,31,61,.26),transparent 33%), linear-gradient(150deg,#0b1020,#111a2e); }
.phone-shell { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.glass-card { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.07); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.join-card { width: min(100%, 570px); padding: clamp(20px,5vw,32px); border-radius: 28px; }
.join-heading { margin-top: 28px; }
.join-heading h1 { margin: 8px 0; font-size: clamp(39px,9vw,54px); line-height: .96; letter-spacing: -.055em; }
.join-heading p { margin: 0; color: var(--muted); line-height: 1.5; }
.join-form, .login-form, .modal form { display: grid; gap: 15px; margin-top: 22px; }
.join-form label, .login-form label, .modal label { display: grid; gap: 7px; color: #c1cadb; font-size: 13px; font-weight: 800; }
.join-form input, .login-form input, .modal input, .modal textarea { width: 100%; min-height: 54px; padding: 0 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.07); color: #fff; outline: none; }
.join-form input:focus, .login-form input:focus { border-color: rgba(255,69,95,.8); box-shadow: 0 0 0 4px rgba(229,31,61,.12); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.join-form fieldset { min-width: 0; margin: 1px 0 0; padding: 0; border: 0; }
.join-form legend { margin-bottom: 9px; color: #c1cadb; font-size: 13px; font-weight: 800; }
.avatar-grid { display: grid; grid-template-columns: repeat(10,1fr); gap: 7px; }
.avatar-choice input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-choice span { display: grid; aspect-ratio: 1; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.06); font-size: 22px; cursor: pointer; }
.avatar-choice input:checked + span { border-color: #fff; background: #fff; color: var(--ink); box-shadow: 0 0 0 3px rgba(229,31,61,.65); transform: translateY(-2px); }
.primary-button { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border: 0; border-radius: 15px; background: linear-gradient(145deg,#f12c49,var(--red-dark)); color: #fff; font-weight: 900; box-shadow: 0 13px 30px rgba(229,31,61,.22); }
.primary-button:hover { filter: brightness(1.08); }
.primary-button b { font-size: 22px; }
.form-alert { margin-top: 15px; padding: 12px 14px; border: 1px solid rgba(255,97,120,.3); border-radius: 13px; background: rgba(229,31,61,.14); color: #ffdbe1; font-size: 13px; font-weight: 750; line-height: 1.4; }

/* TÉLÉPHONE — JEU */
.player-app { min-height: 100vh; }
.phone-state, .phone-ranking { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: max(24px,env(safe-area-inset-top)) 22px max(24px,env(safe-area-inset-bottom)); text-align: center; }
.mini-brand { position: absolute; top: max(20px,env(safe-area-inset-top)); left: 20px; display: flex; align-items: center; gap: 9px; color: #e8edf7; font-weight: 900; }
.mini-brand .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
.big-avatar { display: grid; width: 104px; height: 104px; place-items: center; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 32px; background: rgba(255,255,255,.08); font-size: 57px; animation: float 3s ease-in-out infinite; }
.phone-state h1 { margin: 8px 0 10px; font-size: clamp(39px,10vw,58px); line-height: .98; letter-spacing: -.055em; }
.phone-state > p { max-width: 520px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.waiting-info { display: grid; min-width: 220px; gap: 3px; margin-top: 23px; padding: 13px 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.06); }
.waiting-info span { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.waiting-pulse { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--muted); font-size: 13px; font-weight: 800; }
.waiting-pulse i { width: 9px; height: 9px; border-radius: 50%; background: #24c781; box-shadow: 0 0 0 0 rgba(36,199,129,.5); animation: pulse 1.4s infinite; }
.phone-question { min-height: 100vh; padding: max(14px,env(safe-area-inset-top)) 14px max(14px,env(safe-area-inset-bottom)); }
.phone-question > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; font-weight: 850; }
.phone-question > header div { min-width: 58px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.07); color: #fff; text-align: center; }
.phone-question > header b { font-size: 22px; }
.phone-timer { height: 7px; overflow: hidden; margin: 10px 0 17px; border-radius: 99px; background: rgba(255,255,255,.1); }
.phone-question main { display: flex; min-height: calc(100vh - 90px); flex-direction: column; }
.phone-question h1 { margin: 7px 0 16px; font-size: clamp(26px,7vw,39px); line-height: 1.08; letter-spacing: -.04em; }
.phone-answers { display: grid; flex: 1; grid-template-columns: 1fr; grid-template-rows: repeat(4,minmax(76px,1fr)); gap: 9px; }
.phone-answers.count-2 { grid-template-rows: repeat(2,minmax(120px,1fr)); }
.phone-answers.count-3 { grid-template-rows: repeat(3,minmax(95px,1fr)); }
.phone-answers.count-5, .phone-answers.count-6 { grid-template-rows: repeat(3,minmax(76px,1fr)); grid-template-columns: repeat(2,1fr); }
.phone-answer { display: grid; min-width: 0; grid-template-columns: 54px 1fr; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-radius: 19px; color: #fff; text-align: left; box-shadow: inset 0 1px 0 rgba(255,255,255,.16),0 10px 20px rgba(0,0,0,.12); animation: answerRise .42s ease both; }
.phone-answer:nth-child(2) { animation-delay: 55ms; }
.phone-answer:nth-child(3) { animation-delay: 110ms; }
.phone-answer:nth-child(4) { animation-delay: 165ms; }
.phone-answer:nth-child(5) { animation-delay: 220ms; }
.phone-answer:nth-child(6) { animation-delay: 275ms; }
.phone-answer > b { width: 50px; height: 50px; border-radius: 16px; font-size: 22px; }
.phone-answer > span { font-size: clamp(16px,4.5vw,21px); font-weight: 900; line-height: 1.15; }
.phone-answer.selected { outline: 4px solid #fff; transform: scale(.985); animation: answerSelected .35s ease both; }
.state-symbol { display: grid; width: 104px; height: 104px; place-items: center; margin-bottom: 22px; border-radius: 34px; font-size: 62px; font-weight: 950; animation: resultPop .62s cubic-bezier(.16,1.3,.3,1) both; }
.state-symbol.success { background: rgba(26,181,121,.17); color: #66e3b2; box-shadow: 0 0 0 14px rgba(26,181,121,.05); }
.state-symbol.failure { background: rgba(229,31,61,.16); color: #ff8195; box-shadow: 0 0 0 14px rgba(229,31,61,.05); }
.response-counter { display: grid; gap: 4px; margin-top: 23px; padding: 16px 24px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.06); }
.response-counter b { font-size: 30px; }
.response-counter span { color: var(--muted); font-size: 12px; }
.reveal-state.correct { background: radial-gradient(circle at 50% 24%, rgba(26,181,121,.2), transparent 42%), var(--ink); }
.reveal-state.wrong { background: radial-gradient(circle at 50% 24%, rgba(229,31,61,.16), transparent 42%), var(--ink); }
.correct-answer { display: grid; width: min(100%,520px); grid-template-columns: 48px 1fr; align-items: center; gap: 11px; margin: 16px 0 12px; padding: 13px; border: 1px solid rgba(38,199,130,.32); border-radius: 16px; background: rgba(26,181,121,.13); text-align: left; animation: cardRise .52s .16s ease both; }
.correct-answer b { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: rgba(255,255,255,.11); }
.correct-answer span { font-weight: 900; }
.reveal-state > small { max-width: 500px; color: var(--muted); line-height: 1.45; }
.reveal-state > .next-pill { margin-top: 19px; }
.phone-ranking { justify-content: flex-start; padding-top: 86px; }
.personal-rank { position: relative; display: grid; width: 120px; height: 120px; place-items: center; align-content: center; border: 1px solid var(--line); border-radius: 38px; background: rgba(255,255,255,.07); }
.personal-rank span { color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.personal-rank strong { margin-top: 3px; font-size: 46px; line-height: 1; }
.personal-rank em { position: absolute; top: -7px; right: -9px; padding: 5px 8px; border-radius: 99px; background: #15233a; font-size: 11px; font-style: normal; font-weight: 900; }
.personal-rank em.up { color: #5ce0ac; }
.personal-rank em.down { color: #ff8296; }
.phone-ranking > h1 { margin: 17px 0 0; font-size: clamp(40px,12vw,64px); letter-spacing: -.05em; }
.phone-ranking > h1 small { font-size: .45em; }
.phone-ranking > p { margin: 3px 0 18px; color: var(--muted); }
.phone-board { display: grid; width: min(100%,520px); gap: 7px; margin: 0; padding: 0; list-style: none; }
.phone-board li { display: grid; grid-template-columns: 28px 38px 1fr auto; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.055); text-align: left; animation: cardRise .4s ease both; }
.phone-board li:nth-child(2) { animation-delay: 50ms; }
.phone-board li:nth-child(3) { animation-delay: 100ms; }
.phone-board li:nth-child(4) { animation-delay: 150ms; }
.phone-board li:nth-child(5) { animation-delay: 200ms; }
.phone-board li > b { color: var(--muted); text-align: center; }
.phone-board li > span { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 11px; background: rgba(255,255,255,.08); }
.phone-board li div { min-width: 0; }
.phone-board strong, .phone-board small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-board small { color: var(--muted); font-size: 10px; }
.phone-board em { font-size: 13px; font-style: normal; font-weight: 900; }
.phone-ranking > .next-pill { margin-top: 17px; }
.final-message { margin-top: 18px; padding: 13px 17px; border-radius: 14px; background: rgba(240,176,49,.13); color: #ffd98c; font-weight: 850; }

/* ADMINISTRATION */
.admin-page { color-scheme: light; background: var(--paper); color: var(--ink); }
.admin-topbar { position: sticky; top: 0; z-index: 50; display: grid; min-height: 72px; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; padding: 10px 24px; border-bottom: 1px solid var(--dark-line); background: rgba(255,255,255,.92); backdrop-filter: blur(16px); }
.dark-brand small { color: var(--dark-muted); }
.admin-topbar nav { display: flex; justify-content: center; gap: 4px; }
.admin-topbar nav button, .top-actions button, .top-actions a { min-height: 40px; padding: 0 13px; border: 0; border-radius: 10px; background: transparent; color: #667188; font-size: 13px; font-weight: 850; }
.admin-topbar nav button:hover, .admin-topbar nav button.active { background: #eef1f6; color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.top-actions a { display: grid; place-items: center; }
.admin-app { width: min(1510px,calc(100% - 32px)); min-height: calc(100vh - 72px); margin: 0 auto; padding: 24px 0 42px; }
.admin-boot { min-height: 50vh; color: var(--ink); }
.admin-boot .loader { border-color: #dce2eb; border-top-color: var(--red); }
.admin-view { display: grid; gap: 18px; }
.admin-hero, .admin-panel, .stat-grid article, .danger-zone { border: 1px solid var(--dark-line); border-radius: 20px; background: #fff; box-shadow: var(--soft-shadow); }
.admin-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; }
.admin-hero h1, .page-title h1 { margin: 9px 0 4px; font-size: clamp(34px,3vw,48px); letter-spacing: -.05em; }
.admin-hero p, .page-title p { margin: 0; color: var(--dark-muted); }
.status-dot { display: inline-flex; align-items: center; gap: 7px; color: #5e6b81; font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.status-dot::before { width: 8px; height: 8px; border-radius: 50%; background: #8a95a8; content: ""; }
.status-question::before { background: #1fb77b; box-shadow: 0 0 0 5px rgba(31,183,123,.12); }
.status-reveal::before { background: var(--blue); }
.status-leaderboard::before { background: var(--amber); }
.status-ended::before { background: var(--red); }
.hero-actions, .simulation-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-primary, .admin-secondary, .simulation-actions button, .question-actions button, .danger-zone button, .icon-button { min-height: 42px; padding: 0 15px; border: 0; border-radius: 11px; font-size: 13px; font-weight: 900; cursor: pointer; }
.admin-primary { background: linear-gradient(145deg,#ef2b48,var(--red-dark)); color: #fff; box-shadow: 0 10px 24px rgba(229,31,61,.18); }
.admin-secondary, .simulation-actions button, .question-actions button { border: 1px solid #dce2eb; background: #f7f9fc; color: #344055; }
.admin-secondary.full { width: 100%; }
.link-button { display: inline-grid; place-items: center; }
.stat-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.stat-grid article { padding: 18px 20px; }
.stat-grid span { display: block; color: var(--dark-muted); font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.stat-grid strong { display: block; margin: 7px 0 2px; font-size: 34px; letter-spacing: -.045em; }
.stat-grid small { color: #8a94a7; }
.admin-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.admin-columns.wide-left { grid-template-columns: 1.25fr .75fr; }
.admin-panel { min-width: 0; padding: 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.admin-page .eyebrow { color: var(--red); }
.panel-head h2 { margin: 4px 0 0; font-size: 26px; line-height: 1.16; letter-spacing: -.035em; }
.current-question .panel-head h2 { max-width: 850px; font-size: clamp(25px,2.3vw,36px); }
.time-chip { display: grid; min-width: 58px; height: 42px; place-items: center; border-radius: 12px; background: #eef1f6; color: #49556c; font-weight: 900; }
.choice-preview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.choice-preview p { display: grid; min-height: 65px; grid-template-columns: 38px 1fr; align-items: center; gap: 9px; margin: 0; padding: 10px; border-radius: 14px; color: #fff; font-weight: 850; }
.choice-preview p b { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: rgba(255,255,255,.2); }
.admin-page .leader-list li { border-color: #e6eaf1; background: #f8fafc; }
.admin-page .rank-number, .admin-page .leader-avatar { background: #edf1f6; }
.admin-page .leader-list small { color: var(--dark-muted); }
.admin-empty { padding: 26px; border: 1px dashed #d9dfe9; border-radius: 14px; color: var(--dark-muted); text-align: center; }
.admin-bars { display: grid; gap: 14px; }
.admin-bars > div { display: grid; grid-template-columns: minmax(180px,1.2fr) 1fr 48px; align-items: center; gap: 11px; }
.admin-bars > div > span { display: grid; min-width: 0; grid-template-columns: 32px 1fr; align-items: center; gap: 8px; overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.admin-bars span b { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #eef1f6; }
.admin-bars i { height: 10px; overflow: hidden; border-radius: 99px; background: #edf0f5; }
.admin-bars em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#f03a54,#fd91a2); }
.admin-bars em.good { background: linear-gradient(90deg,#13a970,#64d7ab); }
.admin-bars > div > strong { font-size: 12px; text-align: right; }
.settings-form { display: grid; gap: 13px; }
.settings-form > label:not(.switch-row) { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #536078; font-size: 13px; font-weight: 800; }
.settings-form > label > div { display: flex; align-items: center; gap: 7px; }
.settings-form input[type="number"] { width: 72px; height: 40px; padding: 0 8px; border: 1px solid #dce2eb; border-radius: 10px; background: #f9fafc; color: var(--ink); }
.settings-form small { color: #8a94a7; }
.switch-row { display: flex; position: relative; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid #edf0f4; cursor: pointer; }
.switch-row > span { display: grid; gap: 3px; }
.switch-row > span b { color: #3f4a60; font-size: 13px; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row > i { position: relative; width: 44px; height: 25px; flex: 0 0 auto; border-radius: 99px; background: #cdd4df; transition: .2s; }
.switch-row > i::after { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.16); content: ""; transition: .2s; }
.switch-row input:checked + i { background: var(--red); }
.switch-row input:checked + i::after { transform: translateX(19px); }
.simulation-actions button { min-height: 36px; padding: 0 10px; font-size: 11px; }
.table-wrap { overflow: auto; border: 1px solid #e5e9f0; border-radius: 14px; }
table { width: 100%; min-width: 820px; border-collapse: collapse; }
th, td { padding: 11px 13px; border-bottom: 1px solid #edf0f4; color: #4c5870; text-align: left; }
th { background: #f8fafc; color: #7a8599; font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
td { font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.person-cell { display: grid; min-width: 210px; grid-template-columns: 39px 1fr; align-items: center; gap: 9px; }
.person-cell > span { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 11px; background: #eef1f6; font-size: 20px; }
.person-cell strong { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.person-cell small { padding: 3px 5px; border-radius: 5px; background: #fff0d6; color: #9a6000; font-size: 8px; text-transform: uppercase; }
.icon-button { min-width: 34px; min-height: 34px; padding: 0; background: transparent; font-size: 22px; }
.danger-text { color: #c51b36 !important; }
.danger-zone { display: flex; align-items: center; gap: 9px; padding: 16px 18px; }
.danger-zone > div { flex: 1; }
.danger-zone strong { display: block; }
.danger-zone p { margin: 3px 0 0; color: var(--dark-muted); font-size: 12px; }
.danger-zone button { border: 1px solid #dde2eb; background: #fff; color: #536078; }
.danger-zone button.danger { border-color: #ffd2da; background: #fff3f5; color: #be1832; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 3px; }
.question-admin-list { display: grid; gap: 11px; }
.question-admin-list article { display: grid; grid-template-columns: 60px 1fr auto; align-items: center; gap: 17px; padding: 17px; border: 1px solid var(--dark-line); border-radius: 18px; background: #fff; box-shadow: var(--soft-shadow); }
.question-number { color: #c4cbd6; font-size: 30px; font-weight: 950; letter-spacing: -.04em; text-align: center; }
.question-summary { min-width: 0; }
.question-summary > span { color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.question-summary h2 { margin: 5px 0 8px; font-size: 20px; letter-spacing: -.025em; }
.question-summary p { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.question-summary p b { padding: 5px 8px; border-radius: 7px; background: #f0f3f7; color: #68748a; font-size: 10px; }
.question-summary p b.correct-choice { background: #e5f8f0; color: #08744c; }
.question-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.question-actions button { min-height: 35px; padding: 0 10px; font-size: 11px; }
.lock-notice { padding: 13px 16px; border: 1px solid #f6d497; border-radius: 13px; background: #fff8e9; color: #785113; font-size: 13px; font-weight: 750; }
.result-help { display: flex; flex-direction: column; justify-content: center; background: linear-gradient(145deg,#10192d,#1e2944); color: #fff; }
.result-help > span { display: grid; width: 55px; height: 55px; place-items: center; border-radius: 17px; background: rgba(255,255,255,.09); font-weight: 950; }
.result-help h2 { margin: 18px 0 8px; font-size: 29px; letter-spacing: -.04em; }
.result-help p { margin: 0; color: #b2bed2; line-height: 1.5; }
.result-help a { margin-top: 19px; color: #ff99aa; font-weight: 900; }

/* CONNEXION ADMIN */
.admin-login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 22px; background: radial-gradient(circle at 10% 5%,rgba(229,31,61,.11),transparent 35%),linear-gradient(145deg,#eef1f6,#f9fafc); }
.admin-login-card { width: min(100%,470px); padding: 30px; border: 1px solid var(--dark-line); border-radius: 25px; background: #fff; box-shadow: 0 25px 65px rgba(16,25,45,.12); }
.admin-login-card > .eyebrow { margin-top: 31px; }
.admin-login-card h1 { margin: 8px 0; font-size: 43px; line-height: .98; letter-spacing: -.055em; }
.admin-login-card > p { margin: 0; color: var(--dark-muted); line-height: 1.5; }
.admin-page .login-form label { color: #58647b; }
.admin-page .login-form input { border-color: #dce2eb; background: #f8fafc; color: var(--ink); }
.back-link { display: block; margin-top: 20px; color: #717d91; font-size: 12px; font-weight: 800; text-align: center; }
.admin-page .form-alert { border-color: #f3c4cc; background: #fff1f3; color: #a9162d; }

/* MODALE */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; color-scheme: light; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(6,11,22,.64); backdrop-filter: blur(5px); }
.modal-card { position: relative; z-index: 1; width: min(100%,680px); max-height: calc(100vh - 36px); overflow: auto; padding: 23px; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.32); animation: modalIn .2s ease both; }
.modal-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.modal-card > header h2 { margin: 4px 0 0; font-size: 30px; letter-spacing: -.045em; }
.modal-card > header > button { width: 38px; height: 38px; border: 0; border-radius: 11px; background: #f0f3f7; color: #657087; font-size: 24px; }
.modal label { color: #58647b; }
.modal label > span small { color: #919aad; font-weight: 600; }
.modal input, .modal textarea { border-color: #dce2eb; background: #f8fafc; color: var(--ink); resize: vertical; }
.modal textarea { padding: 12px 14px; line-height: 1.4; }
.input-suffix { display: grid; grid-template-columns: 1fr 48px; align-items: center; gap: 7px; }
.input-suffix small { color: #8892a4; }
.modal footer { display: flex; justify-content: flex-end; gap: 9px; padding-top: 5px; }

/* TOAST, CONFETTIS, ERREURS */
#toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 500; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 390px; padding: 12px 16px; border-radius: 12px; background: #192238; color: #fff; box-shadow: var(--shadow); font-size: 13px; font-weight: 800; opacity: 0; transform: translateY(10px); transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #0d8057; }
.toast-error { background: #a81730; }
.confetti-layer { position: fixed; inset: 0; z-index: 400; overflow: hidden; pointer-events: none; }
.confetti-layer i { position: absolute; top: -25px; left: var(--x); width: 9px; height: 16px; border-radius: 2px; background: var(--color); animation: confettiFall var(--duration) var(--delay) linear forwards; }
.error-page { min-height: 100vh; display: grid; place-items: center; align-content: center; padding: 24px; text-align: center; }
.error-page h1 { margin: 0; font-size: 80px; }
.error-page p { color: var(--muted); }
.error-page a { color: #ff8fa2; font-weight: 900; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes podiumRise { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(36,199,129,0); } 100% { box-shadow: 0 0 0 0 rgba(36,199,129,0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes confettiFall { to { transform: translateY(110vh) rotate(var(--rotate)); } }

@media (max-width: 1150px) {
  .lobby-grid { grid-template-columns: 1fr 320px; gap: 30px; padding-inline: 0; }
  .reveal-layout, .admin-columns, .admin-columns.wide-left { grid-template-columns: 1fr; }
  .reveal-answer { min-height: 300px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .question-admin-list article { grid-template-columns: 50px 1fr; }
  .question-actions { grid-column: 2; justify-content: flex-start; }
}

@media (max-width: 820px) {
  .lobby-grid { grid-template-columns: 1fr; }
  .qr-card { width: min(100%,340px); justify-self: center; }
  .lobby-copy h1 { font-size: 58px; }
  .answer-grid { grid-template-columns: 1fr; }
  .answer-grid.count-5 .answer-card:last-child, .answer-grid.count-3 .answer-card:last-child { grid-column: auto; }
  .answer-card { min-height: 95px; }
  .screen-tools button:first-child { display: none; }
  .game-header { flex-wrap: wrap; }
  .game-progress { order: 3; width: 100%; }
  .question-content { min-height: auto; padding-top: 35px; }
  .reveal-layout { min-height: auto; }
  .distribution-row { grid-template-columns: 1fr 80px; }
  .distribution-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .admin-topbar { grid-template-columns: 1fr auto; gap: 10px; }
  .admin-topbar nav { position: fixed; right: 12px; bottom: 12px; left: 12px; z-index: 100; padding: 7px; border: 1px solid #dfe4ed; border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 12px 35px rgba(10,18,35,.18); }
  .admin-topbar nav button { flex: 1; }
  .top-actions a { display: none; }
  .admin-app { padding-bottom: 90px; }
  .admin-hero, .page-title, .danger-zone { align-items: flex-start; flex-direction: column; }
  .hero-actions { width: 100%; }
  .admin-primary, .admin-secondary { flex: 1; }
  .choice-preview { grid-template-columns: 1fr; }
  .question-admin-list article { grid-template-columns: 1fr; }
  .question-number { text-align: left; }
  .question-actions { grid-column: auto; }
}

@media (max-width: 560px) {
  .lobby-shell { width: min(100% - 24px,1480px); }
  .screen-header { align-items: flex-start; }
  .screen-header .brand small { display: none; }
  .screen-tools button { padding: 0 10px; font-size: 11px; }
  .lobby-grid { padding-top: 22px; }
  .lobby-copy h1 { font-size: 48px; }
  .lobby-stats { grid-template-columns: 1fr; }
  .session-code strong { font-size: clamp(22px,7vw,34px); letter-spacing: .04em; }
  .participant-cloud { grid-template-columns: 1fr; }
  .game-header .brand .brand-mark { width: 38px; height: 38px; }
  .game-header .brand strong { font-size: 14px; }
  .question-screen, .reveal-screen, .leaderboard-screen { padding-inline: 13px; }
  .question-content > h1 { font-size: 35px; }
  .answer-card { grid-template-columns: 54px 1fr; padding: 13px; border-radius: 18px; font-size: 19px; }
  .answer-card > b { width: 50px; height: 50px; border-radius: 16px; }
  .reveal-answer, .distribution-card { padding: 21px; }
  .reveal-answer h1 { font-size: 35px; }
  .podium { gap: 5px; }
  .podium-place { width: 33%; padding-inline: 5px; }
  .podium-avatar { width: 50px; height: 50px; font-size: 27px; }
  .podium-place > small { display: none; }
  .leader-list li { grid-template-columns: 32px 37px 1fr auto; padding: 8px; }
  .leader-list li > b { font-size: 13px; }
  .form-grid { grid-template-columns: 1fr; }
  .avatar-grid { grid-template-columns: repeat(5,1fr); }
  .phone-answers.count-5, .phone-answers.count-6 { grid-template-columns: 1fr; grid-template-rows: none; }
  .phone-answers.count-5 .phone-answer, .phone-answers.count-6 .phone-answer { min-height: 70px; }
  .admin-topbar { padding-inline: 12px; }
  .admin-topbar .brand small { display: none; }
  .top-actions button { padding: 0 7px; font-size: 11px; }
  .admin-app { width: min(100% - 16px,1510px); }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-grid article { padding: 14px; }
  .stat-grid strong { font-size: 27px; }
  .admin-hero, .admin-panel { padding: 16px; }
  .admin-hero h1, .page-title h1 { font-size: 33px; }
  .panel-head { flex-direction: column; }
  .simulation-actions { width: 100%; }
  .admin-bars > div { grid-template-columns: 1fr 42px; }
  .admin-bars i { grid-column: 1 / -1; grid-row: 2; }
  .danger-zone { align-items: stretch; }
  .question-actions button { flex: 1; }
  #toast-root { right: 10px; bottom: 82px; left: 10px; }
  .toast { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* Images de questions */
.screen-question-image { margin: 16px 0 20px; display: flex; justify-content: center; }
.screen-question-image img { width: min(100%,760px); max-height: 34vh; aspect-ratio: 16/9; object-fit: cover; border-radius: 24px; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 16px 40px rgba(0,0,0,.2); }
.phone-question-image { margin: 13px 0 17px; }
.phone-question-image img { display: block; width: 100%; max-height: 240px; aspect-ratio: 16/9; object-fit: cover; border-radius: 20px; border: 1px solid rgba(255,255,255,.09); box-shadow: 0 14px 28px rgba(0,0,0,.18); }
/* Import d’image directement dans « Modifier la question » */
.modal-image-upload { display: grid; gap: 11px; padding: 15px; border: 1px solid #f0c7cf; border-radius: 18px; background: #fff7f8; }
.modal-image-title { display: flex; justify-content: space-between; gap: 14px; color: #59647a; }
.modal-image-title > span { font-size: 14px; font-weight: 900; }
.modal-image-title > span small { color: #919aad; font-weight: 700; }
.modal-image-title > small { color: #7c879b; font-weight: 700; text-align: right; }
.current-question-image { width: 100%; aspect-ratio: 16/9; overflow: hidden; display: grid; place-items: center; border: 1px dashed #ccd5e2; border-radius: 16px; background: #eef2f7; color: #667085; font-size: 13px; font-weight: 800; text-align: center; }
.current-question-image img { width: 100%; height: 100%; object-fit: cover; }
.modal .image-file-picker { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; cursor: pointer; }
.modal .image-file-picker > span { min-height: 46px; display: grid; place-items: center; padding: 0 16px; border-radius: 13px; background: linear-gradient(135deg,var(--red),var(--red-dark)); color: #fff; font-size: 13px; font-weight: 900; white-space: nowrap; box-shadow: 0 8px 18px rgba(214,23,55,.2); }
.modal .image-file-picker input[type=file] { min-height: 46px; padding: 5px 8px; border: 1px solid #d8e0ec; border-radius: 13px; background: #fff; color: #475467; font-size: 12px; font-weight: 700; cursor: pointer; }
.modal .image-file-picker input[type=file]::file-selector-button { display: none; }
.image-upload-help { color: #7c879b; font-size: 12px; font-weight: 700; }
.modal .remove-image-button { min-height: 44px; justify-self: start; padding: 0 15px; border: 1px solid #e7a9b4; border-radius: 13px; background: #fff; color: #a9162d; font-weight: 900; cursor: pointer; }
.modal .remove-image-button:hover { border-color: #d61d3b; background: #fff0f3; }
.modal .remove-image-button.is-armed { border-color: #d61d3b; background: #d61d3b; color: #fff; }

/* Image d’explication et questions hors classement */
.question-labels, .phone-question-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.question-labels .not-scored-badge, .phone-question-labels .not-scored-badge { border-color: rgba(255,209,102,.38); background: rgba(255,209,102,.14); color: #ffe3a0; }
.phone-question-labels .not-scored-badge { padding: 6px 9px; border: 1px solid rgba(255,209,102,.38); border-radius: 999px; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.screen-explanation-image { position: relative; z-index: 1; width: min(100%,440px); max-height: 240px; margin: 18px auto 0; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: rgba(255,255,255,.06); }
.screen-explanation-image img { display: block; width: 100%; max-height: 240px; object-fit: contain; }
.phone-explanation-image { width: min(100%,360px); max-height: 220px; margin: 14px auto 0; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 15px; background: rgba(255,255,255,.06); }
.phone-explanation-image img { display: block; width: 100%; max-height: 220px; object-fit: contain; }
.explanation-image-upload { border-color: #d9c7ee; background: #fbf8ff; }
.non-scored-note { position: relative; z-index: 1; max-width: 540px; margin-top: 16px; padding: 11px 14px; border: 1px solid rgba(255,209,102,.3); border-radius: 13px; background: rgba(255,209,102,.1); color: #ffe3a0; font-size: 13px; font-weight: 850; line-height: 1.4; }
.modal .non-scored-option { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #e1d5a7; border-radius: 16px; background: #fffbeb; cursor: pointer; }
.modal .non-scored-option input { width: 20px; min-height: 20px; height: 20px; margin-top: 2px; accent-color: #d89100; }
.modal .non-scored-option span { display: grid; gap: 3px; }
.modal .non-scored-option b { color: #7a5200; font-size: 14px; }
.modal .non-scored-option small { color: #8b6b25; font-size: 12px; font-weight: 700; line-height: 1.4; }

@media (max-width: 560px) {
  .screen-question-image img { max-height: 28vh; border-radius: 18px; }
  .modal-image-title { display: grid; }
  .modal-image-title > small { text-align: left; }
  .modal .image-file-picker { grid-template-columns: 1fr; }
  .modal .image-file-picker > span { width: 100%; }
  .screen-explanation-image, .screen-explanation-image img { max-height: 190px; }
  .phone-explanation-image, .phone-explanation-image img { max-height: 180px; }
}

/* Animations de réponse */
.fireworks-layer, .wrong-effect-layer, .timeout-effect-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow: hidden;
  pointer-events: none;
}
.firework-burst { position: absolute; width: 8px; height: 8px; }
.firework-burst::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 3px solid #fff;
  border-radius: 50%;
  animation: fireworkFlash .52s ease-out var(--burst-delay) both;
}
.firework-burst i {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 5px;
  height: 12px;
  border-radius: 99px;
  background: var(--spark-color);
  box-shadow: 0 0 10px var(--spark-color);
  animation: fireworkSpark 1.05s cubic-bezier(.12,.62,.22,1) var(--burst-delay) both;
}
.celebration-badge {
  position: absolute;
  left: 50%;
  top: 14%;
  padding: 9px 18px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  background: rgba(8,13,26,.8);
  color: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.28);
  font-size: clamp(15px,4vw,22px);
  letter-spacing: .14em;
  transform: translateX(-50%);
  animation: celebrationBadge 1.15s .14s cubic-bezier(.2,1.3,.3,1) both;
}
.wrong-effect-layer { background: radial-gradient(circle at 50% 45%, rgba(229,31,61,.17), transparent 36%); }
.wrong-effect-layer > i {
  position: absolute;
  left: calc(50% - 5px);
  top: calc(45% - 5px);
  width: 10px;
  height: 15px;
  border-radius: 3px;
  background: var(--shard-color);
  box-shadow: 0 0 11px color-mix(in srgb, var(--shard-color) 70%, transparent);
  animation: wrongShard 1.2s cubic-bezier(.1,.7,.25,1) var(--shard-delay) both;
}
.wrong-ring {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 80px;
  height: 80px;
  border: 4px solid rgba(255,80,106,.72);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  animation: wrongRing .8s ease-out both;
}
.wrong-ring.ring-two { animation-delay: 160ms; }
.player-app.feedback-shake { animation: feedbackShake .5s ease both; }
.timeout-effect-layer { background: linear-gradient(to top, rgba(233,155,23,.08), transparent 45%); }
.timeout-effect-layer span {
  position: absolute;
  left: var(--timeout-x);
  bottom: -45px;
  font-size: var(--timeout-size);
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.24));
  animation: timeoutFloat 1.45s ease-out var(--timeout-delay) both;
}

@keyframes fireworkSpark {
  0% { opacity: 0; transform: translate(0,0) scale(.2); }
  12% { opacity: 1; }
  72% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx),var(--dy)) scale(.65) rotate(100deg); }
}
@keyframes fireworkFlash {
  0% { opacity: 0; transform: scale(.1); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: scale(2.6); }
}
@keyframes celebrationBadge {
  0% { opacity: 0; transform: translate(-50%,-18px) scale(.6) rotate(-3deg); }
  45% { opacity: 1; transform: translate(-50%,0) scale(1.08) rotate(1deg); }
  100% { opacity: 0; transform: translate(-50%,-5px) scale(1); }
}
@keyframes wrongShard {
  0% { opacity: 0; transform: translate(0,0) scale(.3); }
  16% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx),var(--dy)) rotate(var(--shard-rotate)) scale(.7); }
}
@keyframes wrongRing {
  0% { opacity: .9; transform: translate(-50%,-50%) scale(.35); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(3.8); }
}
@keyframes feedbackShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px) rotate(-.35deg); }
  40% { transform: translateX(6px) rotate(.3deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
@keyframes timeoutFloat {
  0% { opacity: 0; transform: translateY(0) rotate(-12deg) scale(.7); }
  22% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-70vh) rotate(16deg) scale(1.15); }
}
@keyframes answerRise {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes answerSelected {
  0% { transform: scale(1); }
  55% { transform: scale(.96); }
  100% { transform: scale(.985); }
}
@keyframes resultPop {
  0% { opacity: 0; transform: scale(.35) rotate(-10deg); }
  70% { opacity: 1; transform: scale(1.08) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes cardRise {
  from { opacity: 0; transform: translateY(13px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Classement animé uniquement sur le téléphone du joueur */
.phone-ranking-intro {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: radial-gradient(circle at center, rgba(39,62,107,.78), rgba(8,13,26,.96) 62%);
  color: #fff;
  pointer-events: none;
  animation: rankingIntro 1.42s ease both;
}
.phone-ranking-intro span { font-size: clamp(58px,18vw,94px); filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.phone-ranking-intro strong { font-size: clamp(20px,6vw,31px); letter-spacing: .17em; }
.phone-ranking-effects {
  position: fixed;
  inset: 0;
  z-index: 345;
  overflow: hidden;
  pointer-events: none;
}
.phone-ranking-effects i {
  position: absolute;
  left: var(--rank-x);
  bottom: -35px;
  color: #79aaff;
  font-size: var(--rank-size);
  font-style: normal;
  text-shadow: 0 0 13px currentColor;
  animation: rankParticle 1.55s ease-out var(--rank-delay) both;
}
.phone-ranking-effects.top-three i { color: #ffd166; }
.phone-ranking-effects.rank-up i { color: #59e6b1; }
.personal-rank { animation: rankCardReveal .72s .88s cubic-bezier(.18,1.35,.3,1) both; }
.personal-rank .rank-halo {
  position: absolute;
  inset: -12px;
  z-index: -1;
  border: 2px solid rgba(87,166,255,.45);
  border-radius: 46px;
  opacity: 0;
  animation: rankHalo 1.25s 1.04s ease-out both;
}
.personal-rank.top-rank {
  border-color: rgba(255,209,102,.58);
  background: linear-gradient(145deg,rgba(255,209,102,.16),rgba(255,255,255,.07));
  box-shadow: 0 18px 55px rgba(233,155,23,.17);
}
.personal-rank.top-rank .rank-halo { border-color: rgba(255,209,102,.65); }
.phone-ranking.rank-improved .personal-rank em.up { animation: rankMovementPop .7s 1.28s cubic-bezier(.2,1.4,.3,1) both; }
.phone-ranking > h1 { animation: scoreReveal .58s 1.02s ease both; }
.phone-ranking > p { animation: cardRise .48s 1.12s ease both; }
.phone-ranking .phone-board { animation: boardReveal .5s 1.14s ease both; }
.phone-ranking .phone-board li { animation-delay: 1.18s; }
.phone-ranking .phone-board li:nth-child(2) { animation-delay: 1.25s; }
.phone-ranking .phone-board li:nth-child(3) { animation-delay: 1.32s; }
.phone-ranking .phone-board li:nth-child(4) { animation-delay: 1.39s; }
.phone-ranking .phone-board li:nth-child(5) { animation-delay: 1.46s; }
.phone-ranking .final-message, .phone-ranking > .next-pill { animation: cardRise .48s 1.5s ease both; }

@keyframes rankingIntro {
  0% { opacity: 0; transform: scale(1.06); }
  15%, 64% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.96); visibility: hidden; }
}
@keyframes rankParticle {
  0% { opacity: 0; transform: translate(0,0) rotate(-12deg) scale(.65); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--rank-drift),-78vh) rotate(20deg) scale(1.2); }
}
@keyframes rankCardReveal {
  0% { opacity: 0; transform: translateY(28px) scale(.55) rotate(-7deg); }
  70% { opacity: 1; transform: translateY(0) scale(1.09) rotate(1deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}
@keyframes rankHalo {
  0% { opacity: .9; transform: scale(.72); }
  100% { opacity: 0; transform: scale(1.45); }
}
@keyframes rankMovementPop {
  0% { opacity: 0; transform: translateY(12px) scale(.45); }
  70% { opacity: 1; transform: translateY(-3px) scale(1.18); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes scoreReveal {
  from { opacity: 0; transform: translateY(14px) scale(.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes boardReveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* V17 — sécurité des accès, liste blanche, OTP et réglages MySQL */
.join-security-note {
  margin: 14px 0 18px;
  padding: 13px 15px;
  border: 1px solid rgba(87,166,255,.28);
  border-radius: 15px;
  background: rgba(87,166,255,.09);
  color: inherit;
  font-size: 14px;
  line-height: 1.45;
}
.verify-card { max-width: 560px; }
.otp-form input[name="otp_code"] {
  text-align: center;
  font-size: clamp(28px,8vw,42px);
  letter-spacing: .3em;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.access-config-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.access-config-grid article { display: grid; gap: 9px; align-content: start; }
.access-config-grid article > span { font-size: 13px; opacity: .72; }
.access-config-grid article > small { opacity: .66; line-height: 1.45; }
.access-status {
  display: inline-flex;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}
.access-status.is-on,.verified-badge {
  color: #0d7c50;
  background: rgba(53,208,127,.15);
  border: 1px solid rgba(53,208,127,.28);
}
.access-status.is-off,.pending-badge {
  color: #985f08;
  background: rgba(255,209,102,.15);
  border: 1px solid rgba(255,209,102,.30);
}
.verified-badge,.pending-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.access-columns { align-items: stretch; }
.access-user-form,.access-import-form { display: grid; gap: 14px; }
.access-import-form p { margin: 0; opacity: .72; line-height: 1.55; }
.csv-picker {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px dashed rgba(75,140,255,.38);
  border-radius: 16px;
  background: rgba(75,140,255,.06);
  cursor: pointer;
}
.csv-picker span { font-weight: 800; }
.csv-picker input { width: 100%; }
.template-link { display: inline-block; margin-top: 14px; font-weight: 750; }
.admin-panel code,.lock-notice code { font-size: .9em; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .access-config-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 680px) {
  .access-config-grid { grid-template-columns: 1fr; }
  .verified-badge,.pending-badge { margin: 5px 0 0; }
}

/* V18 — images adaptatives, réponses multiples et écran final */
.screen-question-image img { width: auto; max-width: min(100%,760px); height: auto; max-height: 34vh; aspect-ratio: auto; object-fit: contain; }
.phone-question-image { display:flex; justify-content:center; }
.phone-question-image img { width: auto; max-width: 100%; height: auto; max-height: 240px; aspect-ratio: auto; object-fit: contain; }
.current-question-image { aspect-ratio: auto; min-height: 180px; max-height: 360px; }
.current-question-image img { width: auto; max-width: 100%; height: auto; max-height: 360px; object-fit: contain; }
.phone-answer.selected { outline: 4px solid rgba(255,255,255,.9); outline-offset: -4px; transform: scale(.985); }
.multiple-hint { margin: -4px 0 12px; color: var(--muted); font-weight: 750; }
.multiple-submit { width:100%; margin-top:12px; min-height:52px; }
.multiple-submit:disabled { opacity:.45; cursor:not-allowed; }
.bonus-badge { display:inline-flex; padding:5px 9px; border-radius:999px; background:rgba(240,176,49,.17); color:#ffd98c; font-size:11px; font-weight:900; }
.state-symbol.partial { background:rgba(240,176,49,.18); color:#ffd166; }
.multi-correct { width:min(100%,620px); }
.leaderboard-screen.is-final .game-progress { text-align:center; }
.leaderboard-screen.is-final .board-heading { text-align:center; margin-left:auto; margin-right:auto; }
.leaderboard-screen.is-final .board-layout { align-items:center; }

.join-form select { width:100%; min-height:54px; padding:0 14px; border:1px solid rgba(255,255,255,.14); border-radius:14px; background:#171e2e; color:#fff; outline:none; }
.join-form select:focus { border-color:rgba(255,69,95,.8); box-shadow:0 0 0 4px rgba(229,31,61,.12); }


/* V18.2 — corrections finales demandées */
.screen-question-image, .phone-question-image { overflow: visible; }
.screen-question-image img, .phone-question-image img { object-fit: contain !important; aspect-ratio: auto !important; }
.leaderboard-screen.is-final .board-layout { justify-items: center; text-align: center; }
.leaderboard-screen.is-final .board-heading { width: 100%; text-align: center; }
.leaderboard-screen.is-final .podium { margin-left: auto; margin-right: auto; }
.leaderboard-screen.is-final .leaderboard-list { width: min(100%, 980px); margin-left: auto; margin-right: auto; text-align: left; }
.leaderboard-screen.is-final .game-header .game-progress { text-align: center; }

/* V18.4 — alignement visuel du socle du podium */
.podium-place {
  border-radius: 24px;
}
.podium-step {
  left: 0;
  right: auto;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  border-radius: 0 0 24px 24px;
}

/* V18.5 — images de réponse sans cadre + centrage écran classement */
.screen-explanation-image,
.phone-explanation-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 18px auto 12px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.screen-explanation-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 520px);
  max-height: min(30vh, 300px);
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.phone-explanation-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 360px);
  max-height: 220px;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* L'en-tête du classement est un vrai 3-colonnes : logo / état / outils.
   Le texte "Après X questions" reste donc exactement centré sur l'écran. */
.leaderboard-screen .game-header {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  width: 100%;
}
.leaderboard-screen .game-header .brand { justify-self: start; }
.leaderboard-screen .game-header .game-progress {
  justify-self: center;
  text-align: center;
  white-space: nowrap;
}
.leaderboard-screen .game-header .screen-tools { justify-self: end; }

.leaderboard-screen .board-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1150px,100%);
  margin: 0 auto;
  padding-top: clamp(18px,3.5vh,42px);
}
.leaderboard-screen .board-heading {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}
.leaderboard-screen .board-heading .eyebrow,
.leaderboard-screen .board-heading h1 { text-align: center; }
.leaderboard-screen .podium {
  width: 100%;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

/* Un seul joueur : carte parfaitement centrée, comme la maquette validée. */
.leaderboard-screen .podium-place:only-child {
  width: min(350px, 86vw);
}
.leaderboard-screen .podium-place.place-1 {
  min-height: 375px;
  padding-top: 34px;
}
.leaderboard-screen .podium-place.place-1 .podium-avatar {
  margin-top: 0;
}
.leaderboard-screen .podium-step {
  display: grid;
  place-items: center;
  height: 77px;
  padding-top: 0;
}

@media (max-width: 760px) {
  .leaderboard-screen .game-header {
    grid-template-columns: 1fr auto;
    row-gap: 10px;
  }
  .leaderboard-screen .game-header .game-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .leaderboard-screen .game-header .screen-tools {
    grid-column: 2;
    grid-row: 1;
  }
  .leaderboard-screen .podium-place.place-1 { min-height: 315px; }
}

/* Indicateurs visuels d'images dans la liste des questions admin */
.question-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.question-meta > span { color: var(--red); font-size: 10px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.image-status-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.image-status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1.5px dashed currentColor; border-radius: 8px; font-size: 10px; font-weight: 900; letter-spacing: .02em; text-transform: none; white-space: nowrap; }
.question-image-badge { background: #eef6ff; color: #1769c2; }
.answer-image-badge { background: #eaf9f1; color: #08744c; }
.question-admin-list article.has-question-image { border-left: 4px solid #3d8ee8; }
.question-admin-list article.has-answer-image { box-shadow: inset 0 -3px 0 rgba(8,116,76,.28), var(--soft-shadow); }
.question-admin-list article.has-question-image.has-answer-image { border-left-color: #3d8ee8; }

.question-backup-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.backup-restore-label{cursor:pointer}.backup-restore-label input{display:none}.backup-restore-label:has(input:disabled){opacity:.5;pointer-events:none}


/* === OPSYNET — barre de sauvegarde Questions, version compacte === */
.question-backup-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin-left:auto;
  max-width:920px;
}
.question-backup-actions .admin-secondary,
.question-backup-actions .admin-primary,
.question-backup-actions .link-button,
.question-backup-actions .backup-restore-label{
  min-height:46px;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
  margin:0;
}
.question-backup-actions .admin-secondary,
.question-backup-actions .link-button,
.question-backup-actions .backup-restore-label{
  padding:0 17px;
  border-radius:14px;
}
.question-backup-actions .admin-primary{
  padding:0 20px;
  border-radius:14px;
}
.question-backup-actions input[type="file"]{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  opacity:0 !important;
  pointer-events:none !important;
}
@media (max-width:1100px){
  .question-backup-actions{
    justify-content:flex-start;
    margin-left:0;
    max-width:none;
  }
}
@media (max-width:680px){
  .question-backup-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    width:100%;
  }
  .question-backup-actions .admin-primary{
    grid-column:1 / -1;
  }
}

/* Regroupement visuel des questions par catégorie */
.category-group-toggle.active{background:#111a33;color:#fff;border-color:#111a33}
.question-admin-list.is-grouped{display:flex;flex-direction:column;gap:24px}
.question-category-group{display:flex;flex-direction:column;gap:12px}
.question-category-heading{display:flex;align-items:end;justify-content:space-between;padding:4px 8px 2px;border-bottom:2px solid #e5e9f2}
.question-category-heading span{display:block;color:var(--red);font-size:10px;font-weight:900;letter-spacing:.14em}
.question-category-heading h2{margin:2px 0 0;font-size:24px;color:#10172b}
.question-category-heading strong{margin-bottom:5px;padding:7px 11px;border-radius:999px;background:#eef1f6;color:#65708a;font-size:12px}
.question-category-group > article{margin:0}
@media(max-width:680px){.question-category-heading h2{font-size:20px}.question-category-heading strong{font-size:11px}}


/* === Prévisualisation des questions === */
.question-preview-button{
  width:38px;
  min-width:38px;
  height:38px;
  padding:0 !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px !important;
  font-size:16px;
  cursor:pointer;
}
.question-preview-card{max-width:980px !important;}
.question-preview-shell{
  margin:0 24px 24px;
  padding:30px;
  border-radius:22px;
  background:#f7f9fc;
  border:1px solid #e1e7ef;
}
.question-preview-top{
  display:flex;
  justify-content:space-between;
  gap:20px;
  margin-bottom:16px;
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#ed1b36;
}
.question-preview-top strong{color:#667085;}
.question-preview-shell h1{
  margin:0 0 22px;
  font-size:clamp(24px,3vw,38px);
  line-height:1.15;
  color:#101828;
}
.question-preview-image{
  display:flex;
  justify-content:center;
  margin:0 0 22px;
}
.question-preview-image img{
  display:block;
  max-width:100%;
  max-height:360px;
  object-fit:contain;
  border-radius:16px;
}
.question-preview-choices{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.question-preview-choice{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:58px;
  padding:12px 16px;
  border:1px solid #dce3ec;
  border-radius:14px;
  background:#fff;
  font-weight:800;
}
.question-preview-choice b{
  display:grid;
  place-items:center;
  width:32px;height:32px;
  border-radius:9px;
  background:#eef2f6;
}
.question-preview-note{
  margin-top:18px;
  color:#667085;
  font-size:12px;
}
.question-preview-empty{color:#667085;padding:14px;}
#question-form footer{display:flex;align-items:center;gap:10px;}
#question-form .modal-footer-spacer{flex:1;}
@media(max-width:700px){
  .question-preview-choices{grid-template-columns:1fr;}
  .question-preview-shell{margin:0 12px 18px;padding:18px;}
}

.answer-preview-button{font-size:13px !important;}
.answer-preview-shell .is-correct-answer{
  border-color:#8bd4b2;
  background:#eefaf4;
}
.answer-preview-shell .is-wrong-answer{opacity:.72;}
.answer-check{
  margin-left:auto;
  font-size:12px;
  color:#087443;
  white-space:nowrap;
}
.answer-preview-explanation{
  margin-top:20px;
  padding:18px;
  border:1px solid #dce3ec;
  border-radius:14px;
  background:#fff;
}
.answer-preview-explanation span{
  display:block;
  margin-bottom:6px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  color:#087443;
}
.answer-preview-explanation p{margin:0;line-height:1.5;}
.answer-explanation-image{margin-top:18px;}
