/* Inter (variable, graisses 400 à 700) hébergée avec le site : aucune requête vers un service tiers. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/inter-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Fredoka (variable, 400 à 700) : titres, boutons et scores. */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/fredoka-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/fredoka-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

    /* =====================================================================================================
       Quiz BTS Aéronautique : thème « arcade ». Toutes les animations utilisent uniquement transform et opacity
       (composées par le GPU) ; la classe .lite (appareil modeste ou lent) les coupe presque toutes.
       ===================================================================================================== */
    :root {
      --bg: #0e1530;
      --card: rgba(255, 255, 255, .07);
      --card-solid: #1b2550;
      --card-strong: #151d42;
      --line: rgba(255, 255, 255, .14);
      --text: #ffffff;
      --muted: #a9b4d6;
      --accent: #f2c94c;
      --pink: #7c8cf5;
      --cyan: #5cc6e6;
      --ok: #3fbf86;
      --bad: #ee6b79;
      --red: #e5586b;
      --blue: #4a86e8;
      --yellow: #e9b43f;
      --green: #3aa86f;
      --shadow: 0 16px 40px rgba(4, 8, 30, .5);
      --font-display: 'Fredoka', 'Inter', system-ui, sans-serif;
      --ease-pop: cubic-bezier(.2, 1.5, .4, 1);
    }
    * { -webkit-tap-highlight-color: transparent; }
    body { font-family: 'Inter', system-ui, sans-serif; color: var(--text); background: var(--bg); position: relative; overflow-x: hidden; }
    h1, h2, h3, .font-display { font-family: var(--font-display); }

    /* --- Fond animé : trois grandes lueurs qui dérivent lentement (une seule couche composée) --- */
    body::before { content: ''; position: fixed; inset: 0; z-index: -2;
      background: radial-gradient(1100px 700px at 10% -10%, rgba(66, 98, 214, .55) 0%, transparent 60%),
                  radial-gradient(900px 620px at 105% 5%, rgba(92, 70, 190, .35) 0%, transparent 58%),
                  radial-gradient(1000px 700px at 55% 125%, rgba(30, 120, 160, .4) 0%, transparent 58%),
                  linear-gradient(160deg, #101836, #0b1230); }
    .bg-fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
    .bg-fx i { position: absolute; border-radius: 50%; opacity: .6; will-change: transform; }
    .bg-fx i:nth-child(1) { width: 46vmax; height: 46vmax; left: -12vmax; top: 18vh; background: radial-gradient(circle, rgba(92, 120, 230, .26), transparent 68%); animation: drift1 38s ease-in-out infinite alternate; }
    .bg-fx i:nth-child(2) { width: 40vmax; height: 40vmax; right: -10vmax; bottom: -8vmax; background: radial-gradient(circle, rgba(80, 180, 215, .2), transparent 68%); animation: drift2 44s ease-in-out infinite alternate; }
    .bg-fx i:nth-child(3) { width: 30vmax; height: 30vmax; left: 38vw; top: -12vmax; background: radial-gradient(circle, rgba(139, 124, 246, .18), transparent 68%); animation: drift1 52s ease-in-out infinite alternate-reverse; }
    @keyframes drift1 { to { transform: translate3d(14vw, 10vh, 0) scale(1.15); } }
    @keyframes drift2 { to { transform: translate3d(-16vw, -12vh, 0) scale(1.1); } }

    /* --- Cartes, étiquettes, champs --- */
    .card { background: var(--card); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .14); }
    .label { font-family: var(--font-display); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
    .field { width: 100%; padding: .9rem 1rem; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .14); background: rgba(8, 12, 36, .55);
             color: var(--text); text-align: center; font-size: 1.1rem; font-weight: 600; font-family: var(--font-display); transition: border-color .15s, box-shadow .15s; }
    .field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(242, 201, 76, .2); }
    .field::placeholder { color: rgba(195, 189, 234, .55); font-weight: 500; }

    /* --- Boutons « touches de console » --- */
    .btn { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; padding: .95rem 1.1rem; border-radius: 18px;
           font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: .01em;
           transition: transform .12s var(--ease-pop), box-shadow .12s, filter .15s; }
    .btn-primary { background: linear-gradient(180deg, #5b8def, #3f6fe0); color: #fff; box-shadow: 0 4px 0 #2a4fb5, 0 10px 22px rgba(40, 80, 200, .3); }
    .btn-primary:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 6px 0 #2a4fb5, 0 14px 26px rgba(40, 80, 200, .36); }
    .btn-primary:active { transform: translateY(3px); box-shadow: 0 1px 0 #2a4fb5, 0 4px 10px rgba(40, 80, 200, .25); }
    .btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; filter: grayscale(.5); }
    .btn-outline { background: rgba(255, 255, 255, .1); color: var(--text); box-shadow: 0 4px 0 rgba(0, 0, 0, .25); border: 1px solid var(--line); }
    .btn-outline:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .17); }
    .btn-outline:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
    .ctl-btn { padding: .5rem 1rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--text);
               font-size: .88rem; font-weight: 600; font-family: var(--font-display); transition: transform .12s var(--ease-pop), background .15s; }
    .ctl-btn:hover { background: rgba(255, 255, 255, .16); transform: translateY(-1px); }
    .ctl-btn:active { transform: translateY(1px) scale(.98); }
    .ctl-btn.danger:hover { border-color: var(--bad); color: #ffc2c9; }
    .chip { padding: .25rem .8rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--muted); font-size: .82rem; font-weight: 600;
            transition: transform .12s var(--ease-pop), background .15s, border-color .15s; }
    .chip:hover { border-color: #6f9cf0; color: var(--text); transform: translateY(-1px); }
    .chip.on { background: rgba(74, 134, 232, .3); border-color: #6f9cf0; color: #fff; }
    .tiny { padding: .22rem .6rem; border-radius: 9px; border: 1px solid var(--line); font-size: .72rem; color: var(--muted); background: rgba(255, 255, 255, .05); }
    .tiny:hover { border-color: var(--accent); color: var(--text); }
    .tiny.danger:hover { border-color: var(--bad); color: #ffc2c9; }

    /* --- En-tête --- */
    header { border-bottom: 1px solid rgba(255, 255, 255, .1) !important; flex-wrap: wrap; gap: .5rem; }
    header h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem !important; letter-spacing: .01em; }
    header h1 b { background: linear-gradient(90deg, #ffffff, #b9ccff); -webkit-background-clip: text; background-clip: text; color: transparent; }
    .logo-plane { animation: fly 5s ease-in-out infinite; transform-origin: center; }
    @keyframes fly { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(3px, -3px) rotate(6deg); } }
    header button, #role-badge { border: 1px solid var(--line) !important; color: var(--muted) !important; background: rgba(255, 255, 255, .06); }
    #sound-btn { transition: transform .12s var(--ease-pop); }
    #sound-btn:hover { transform: scale(1.05); }

    /* --- Transition entre écrans --- */
    .view-in { animation: viewIn .38s var(--ease-pop) both; }
    @keyframes viewIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
    .fade-up { opacity: 0; transform: translateY(14px); animation: fadeUp .7s ease forwards; }
    @keyframes fadeUp { to { opacity: 1; transform: none; } }
    .pop { animation: pop .55s var(--ease-pop) both; }
    @keyframes pop { from { transform: scale(.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }

    /* --- Salon --- */
    #game-pin { font-family: var(--font-display); background: linear-gradient(180deg, #fff, #cfe0ff 70%, #a9c4ff); -webkit-background-clip: text; background-clip: text; color: transparent !important;
                filter: drop-shadow(0 4px 16px rgba(80, 120, 230, .4)); }
    .pin-box { background: rgba(8, 12, 36, .55); border: 2px solid rgba(255, 255, 255, .16); box-shadow: inset 0 0 40px rgba(70, 100, 220, .22); }
    .qr-frame { background: #fff; padding: 9px; border-radius: 18px; display: inline-block; line-height: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
    .lobby-chip { padding: .35rem .85rem .35rem .45rem; border-radius: 999px; font-weight: 700; font-size: .92rem; font-family: var(--font-display);
                  background: rgba(255, 255, 255, .12); border: 1px solid var(--line); display: inline-flex; align-items: center; gap: .5rem; animation: pop .5s var(--ease-pop) both; }
    .lobby-chip button { margin-left: .15rem; color: var(--muted); opacity: .7; }
    .lobby-chip button:hover { opacity: 1; color: #fff; }
    .player-box { background: rgba(8, 12, 36, .45); border: 1px solid var(--line); }
    .pulse { width: .85rem; height: .85rem; border-radius: 999px; background: var(--accent); animation: pulse 1.4s ease-in-out infinite; box-shadow: 0 0 16px var(--accent); }
    @keyframes pulse { 0%, 100% { opacity: .3; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
    .wait-orbit { position: relative; width: 120px; height: 120px; margin: 0 auto 1rem; }
    .wait-orbit::before, .wait-orbit::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(242, 201, 76, .4); animation: ripple 2.4s ease-out infinite; }
    .wait-orbit::after { animation-delay: 1.2s; }
    .wait-orbit > * { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
    @keyframes ripple { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.35); opacity: 0; } }

    /* --- Question : minuteur circulaire --- */
    .dial { position: relative; width: 4.6rem; height: 4.6rem; flex-shrink: 0; }
    .dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
    .dial .track { fill: rgba(8, 12, 36, .5); stroke: rgba(255, 255, 255, .14); stroke-width: 9; }
    .dial .arc { fill: none; stroke: var(--cyan); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke .3s; }
    .dial.warn .arc { stroke: var(--accent); }
    .dial.danger .arc { stroke: var(--bad); }
    .dial.danger { animation: tick .5s ease-in-out infinite alternate; }
    @keyframes tick { to { transform: scale(1.1); } }
    .dial > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; font-variant-numeric: tabular-nums; }
    .dial.small { width: 3.4rem; height: 3.4rem; }
    .dial.small > span { font-size: 1.25rem; }
    .answers-progress { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; margin-top: .35rem; width: 11rem; }
    .answers-progress > i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #4a86e8, var(--ok)); transition: width .45s var(--ease-pop); }
    .q-card { background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); }
    .q-in { animation: qIn .5s var(--ease-pop) both; }
    @keyframes qIn { from { opacity: 0; transform: translateY(26px) scale(.96); } to { opacity: 1; transform: none; } }

    /* --- Réponses (boutons colorés en relief, comme sur une console) --- */
    .ans { border-radius: 20px; color: #fff; font-family: var(--font-display); font-weight: 600; text-shadow: 0 1px 0 rgba(0, 0, 0, .22);
           box-shadow: 0 5px 0 rgba(0, 0, 0, .25), 0 12px 22px rgba(0, 0, 0, .2); }
    .btn-red { background: linear-gradient(180deg, #ee6f82, var(--red)); }
    .btn-blue { background: linear-gradient(180deg, #6a9bee, var(--blue)); }
    .btn-yellow { background: linear-gradient(180deg, #efc35f, var(--yellow)); color: #3b2a00; text-shadow: none; }
    .btn-green { background: linear-gradient(180deg, #55bd88, var(--green)); }
    .shape { width: 2.2rem; height: 2.2rem; border-radius: 12px; background: rgba(0, 0, 0, .2); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
    .btn-yellow .shape { background: rgba(0, 0, 0, .14); }
    .ans-in { animation: ansIn .5s var(--ease-pop) both; }
    @keyframes ansIn { from { opacity: 0; transform: translateY(34px) scale(.88); } to { opacity: 1; transform: none; } }
    button.ans { transition: transform .12s var(--ease-pop), box-shadow .12s, filter .15s; }
    button.ans:hover { transform: translateY(-3px); filter: brightness(1.06); }
    button.ans:active { transform: translateY(5px); box-shadow: 0 1px 0 rgba(0, 0, 0, .28); }
    .pq-btn { display: flex; align-items: center; gap: .7rem; padding: .95rem; min-height: 5.2rem; text-align: left; font-size: 1rem; line-height: 1.25; }
    .pq-btn.pq-shape-only { justify-content: center; min-height: 9.5rem; }
    .pq-big-shape { font-size: 3rem; }
    .pq-label { flex: 1; min-width: 0; word-break: break-word; }
    .pq-btn:disabled { cursor: default; }
    .pq-btn.chosen { transform: scale(.96); filter: brightness(1.1); outline: 4px solid #fff; }
    .pq-btn.dim { opacity: .38; filter: grayscale(.6); }

    /* --- Classement intermédiaire --- */
    .lb-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem; border-radius: 18px; background: rgba(255, 255, 255, .09); border: 1px solid var(--line);
              transition: transform .9s cubic-bezier(.3, 1.2, .4, 1); position: relative; }
    .lb-row.first { background: linear-gradient(90deg, rgba(242, 201, 76, .22), rgba(255, 255, 255, .07)); border-color: rgba(242, 201, 76, .6); box-shadow: 0 0 20px rgba(242, 201, 76, .16); }
    .lb-row.me { border-color: var(--cyan); }
    .lb-rank { font-family: var(--font-display); font-weight: 700; width: 2.2rem; text-align: center; font-size: 1.2rem; flex-shrink: 0; }
    .lb-name { flex: 1; min-width: 0; font-weight: 700; font-family: var(--font-display); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
    .lb-score { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--accent); min-width: 4.2rem; text-align: right; }
    .lb-gain { position: absolute; right: .9rem; top: -.55rem; font-family: var(--font-display); font-weight: 700; font-size: .85rem; padding: .05rem .5rem; border-radius: 999px;
               background: var(--ok); color: #06301a; animation: gainIn .5s var(--ease-pop) both; }
    @keyframes gainIn { from { opacity: 0; transform: translateY(10px) scale(.5); } to { opacity: 1; transform: none; } }
    .lb-move { font-size: .72rem; font-weight: 700; width: 2.1rem; text-align: center; flex-shrink: 0; }
    .lb-move.up { color: var(--ok); } .lb-move.down { color: var(--bad); }
    .lb-streak { font-size: .8rem; font-weight: 700; color: #f0b35c; white-space: nowrap; }
    .reveal-banner { display: inline-flex; align-items: center; gap: .55rem; padding: .55rem 1.1rem; border-radius: 999px; background: linear-gradient(90deg, #2fae78, #3fbf86); color: #04281a;
                     font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); animation: pop .55s var(--ease-pop) both; }
    .dist { display: flex; align-items: flex-end; justify-content: center; gap: .7rem; height: 6.2rem; margin: 1rem 0 .4rem; }
    .dist-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 3.6rem; height: 100%; }
    .dist-bar { width: 100%; border-radius: 12px 12px 4px 4px; height: 0; min-height: 4px; transition: height 1s var(--ease-pop); position: relative; }
    .dist-bar.good::after { content: '✓'; position: absolute; top: .15rem; left: 0; right: 0; text-align: center; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
    .dist-n { font-family: var(--font-display); font-weight: 700; font-size: .95rem; margin-bottom: .15rem; }
    .dist-shape { margin-top: .25rem; font-size: .8rem; opacity: .85; }
    .explain { background: rgba(8, 12, 36, .5); border: 1px solid var(--line); border-radius: 16px; }

    /* --- Retour sur téléphone : plein écran coloré --- */
    #view-player-feedback { transition: background .4s; }
    #view-player-feedback.fb-ok { background: linear-gradient(170deg, rgba(63, 191, 134, .28), rgba(255, 255, 255, .06)); border-color: rgba(63, 191, 134, .7); }
    #view-player-feedback.fb-bad { background: linear-gradient(170deg, rgba(238, 107, 121, .28), rgba(255, 255, 255, .06)); border-color: rgba(238, 107, 121, .7); animation: shake .55s both; }
    #view-player-feedback.fb-late { background: linear-gradient(170deg, rgba(233, 180, 63, .24), rgba(255, 255, 255, .06)); border-color: rgba(233, 180, 63, .6); }
    @keyframes shake { 15%, 55% { transform: translateX(-9px); } 35%, 75% { transform: translateX(9px); } 100% { transform: none; } }
    .fb-icon { font-size: 4.2rem; line-height: 1; margin-bottom: .4rem; animation: pop .6s var(--ease-pop) both; }
    .fb-points { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.1; }
    .fb-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .8rem; border-radius: 999px; background: rgba(0, 0, 0, .26); font-weight: 700; font-size: .85rem; margin: .2rem; animation: pop .5s var(--ease-pop) both; }
    .rank-badge { width: 104px; height: 104px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-family: var(--font-display);
                  font-size: 2.4rem; font-weight: 700; color: #1a0f45; animation: pop .7s var(--ease-pop) both; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
    .waiting-dots::after { content: ''; display: inline-block; width: 1.4em; text-align: left; animation: dots 1.4s steps(4) infinite; }
    @keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75%, 100% { content: '...'; } }

    /* --- Podium final --- */
    #view-host-final { position: fixed; inset: 0; z-index: 50; width: 100vw; max-width: none !important; height: 100vh; height: 100dvh; overflow-x: hidden; overflow-y: auto; isolation: isolate; display: flex; flex-direction: column; align-items: center; padding: clamp(1rem,3vh,2.2rem) clamp(1rem,4vw,4rem) 3rem; background: radial-gradient(circle at 50% 48%,rgba(44,74,168,.42),transparent 36%),radial-gradient(circle at 15% 50%,rgba(24,143,185,.2),transparent 34%),radial-gradient(circle at 86% 48%,rgba(111,60,190,.22),transparent 34%),linear-gradient(155deg,#07112d,#080b23 58%,#13082e); }
    #view-host-final.hidden { display: none; }
    #view-host-final > * { position: relative; z-index: 2; }
    #view-host-final > h2 { font-size: clamp(2.2rem,5vw,4.8rem); text-shadow: 0 0 28px rgba(92,198,230,.35),0 8px 28px rgba(0,0,0,.55); }
    #view-host-final #final-sub { margin-bottom: clamp(.5rem,1.5vh,1.2rem) !important; }
    #view-host-final.celebrating::before, #view-host-final.celebrating::after { content: ''; position: fixed; top: -8vh; bottom: -8vh; width: 46vw; z-index: -1; opacity: .42; filter: blur(2px); pointer-events: none; }
    #view-host-final.celebrating::before { left: 3%; background: linear-gradient(110deg, transparent 12%, rgba(92,198,230,.36) 48%, transparent 72%); transform-origin: top left; animation: spotLeft 4s ease-in-out infinite alternate; }
    #view-host-final.celebrating::after { right: 3%; background: linear-gradient(250deg, transparent 12%, rgba(139,124,246,.36) 48%, transparent 72%); transform-origin: top right; animation: spotRight 4.6s ease-in-out infinite alternate; }
    @keyframes spotLeft { to { transform: rotate(13deg); opacity: .7; } }
    @keyframes spotRight { to { transform: rotate(-14deg); opacity: .7; } }
    #view-host-final.celebrating > h2 { animation: trophyIn .9s var(--ease-pop) both; }
    @keyframes trophyIn { 0% { opacity: 0; transform: translateY(-24px) scale(.65) rotate(-5deg); } 70% { transform: translateY(3px) scale(1.08) rotate(2deg); } 100% { opacity: 1; transform: none; } }
    #podium { width: min(100%,1050px); height: min(53vh,500px); min-height: 420px; flex: 0 0 auto; position: relative; perspective: 900px; overflow: visible; margin-bottom: clamp(1.8rem,4vh,3.5rem) !important; }
    #podium::after { content: ''; position: absolute; z-index: -3; left: 3%; right: 3%; bottom: -22px; height: 72px; border-radius: 50%; background: radial-gradient(ellipse,rgba(92,198,230,.28),rgba(74,134,232,.1) 48%,transparent 72%); filter: blur(4px); animation: stagePulse 2.8s ease-in-out infinite alternate; }
    @keyframes stagePulse { to { transform: scaleX(1.08); opacity: .65; } }
    .pod { flex: 1; max-width: 200px; height: 100%; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; transform-style: preserve-3d; }
    .pod-label { text-align: center; margin-bottom: .6rem; opacity: 0; transform: translateY(16px) scale(.9); transition: opacity .6s ease, transform .7s var(--ease-pop); max-width: 100%; }
    .pod-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pod-medal { min-height: 1.35rem; font: 800 .67rem/1 var(--font-display); letter-spacing: .1em; color: var(--accent); margin-bottom: .38rem; text-shadow: 0 2px 8px rgba(0,0,0,.6); }
    .pod-score { font-family: var(--font-display); font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: .1rem; color: var(--accent); }
    .pod-block { width: 100%; height: var(--h); flex: 0 0 var(--h); border-radius: 18px 18px 0 0; display: flex; align-items: flex-start; justify-content: center; padding-top: .8rem; overflow: hidden;
                 transform: scaleY(0) rotateX(-5deg); transform-origin: center bottom; opacity: 0; transition: transform 1.05s cubic-bezier(.16,1.35,.35,1), opacity .2s; position: relative; box-shadow: inset 0 4px 0 rgba(255,255,255,.42), 0 14px 25px rgba(0,0,0,.28); }
    .pod-block::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg,rgba(255,255,255,.32),transparent 28%,transparent 68%,rgba(0,0,0,.14)); pointer-events: none; }
    .pod-block::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: rgba(35,25,75,.2); box-shadow: inset 0 3px 8px rgba(0,0,0,.18); }
    .pod-rank { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: rgba(26, 15, 69, .55); line-height: 1; }
    .pod.show .pod-label { opacity: 1; transform: none; }
    .pod.show .pod-block { transform: scaleY(1) rotateX(0); opacity: 1; }
    .pod[data-place="1"] { --h: 225px; }
    .pod[data-place="2"] { --h: 158px; }
    .pod[data-place="3"] { --h: 116px; }
    .pod[data-place="1"] .pod-block { background: linear-gradient(180deg, #ffe58a, #f2a900); }
    .pod[data-place="2"] .pod-block { background: linear-gradient(180deg, #e8edf7, #9aa6c0); }
    .pod[data-place="3"] .pod-block { background: linear-gradient(180deg, #f0b58a, #b9703f); }
    .pod[data-place="1"].show .pod-block { animation: glow 2.4s ease-in-out 1.4s infinite; }
    @keyframes glow { 0%, 100% { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 0 0 0 rgba(255, 210, 63, 0); } 50% { box-shadow: inset 0 3px 0 rgba(255, 255, 255, .35), 0 0 30px 4px rgba(242, 201, 76, .35); } }
    .crown { position: absolute; top: -2.3rem; left: 50%; font-size: 2.2rem; transform: translateX(-50%) scale(0); transition: transform .7s var(--ease-pop) .5s; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
    .pod.show .crown { transform: translateX(-50%) scale(1) rotate(-8deg); animation: crownBob 2.2s ease-in-out 1.4s infinite; }
    @keyframes crownBob { 0%, 100% { transform: translateX(-50%) rotate(-8deg); } 50% { transform: translateX(-50%) translateY(-6px) rotate(6deg); } }
    .winner-rays { position: absolute; left: 50%; bottom: 125px; width: 260px; height: 260px; margin: 0 0 -130px -130px; z-index: -1; opacity: 0;
                   background: repeating-conic-gradient(from 0deg, rgba(255,224,112,.28) 0 8deg, transparent 8deg 20deg); border-radius: 50%; transform: scale(.25); }
    .pod.show .winner-rays { animation: raysIn 1s ease 1s forwards, raysTurn 18s linear 2s infinite; }
    @keyframes raysIn { to { opacity: .8; transform: scale(1); } }
    @keyframes raysTurn { from { transform: rotate(0); } to { transform: rotate(360deg); } }
    .winner-sparks { position: absolute; left: 50%; bottom: 205px; width: 1px; height: 1px; pointer-events: none; }
    .winner-sparks i { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0; box-shadow: 0 0 12px #fff3a0; }
    .pod.show .winner-sparks i { animation: spark 1.8s ease-out calc(1.2s + var(--delay, 0s)) infinite; }
    .winner-sparks i:nth-child(1) { --x:-72px; --y:-54px; --delay:.1s } .winner-sparks i:nth-child(2) { --x:68px; --y:-70px; --delay:.5s }
    .winner-sparks i:nth-child(3) { --x:-88px; --y:8px; --delay:.9s } .winner-sparks i:nth-child(4) { --x:86px; --y:2px; --delay:1.3s }
    .winner-sparks i:nth-child(5) { --x:-48px; --y:-105px; --delay:.7s } .winner-sparks i:nth-child(6) { --x:42px; --y:-112px; --delay:1.1s }
    .winner-sparks i:nth-child(7) { --x:-105px; --y:-34px; --delay:1.5s } .winner-sparks i:nth-child(8) { --x:108px; --y:-42px; --delay:.3s }
    @keyframes spark { 0% { opacity: 0; transform: translate(0,0) scale(.3); } 20% { opacity: 1; } 75%,100% { opacity: 0; transform: translate(var(--x),var(--y)) scale(1.3); } }
    .pod-impact { position: absolute; z-index: 4; left: 50%; bottom: calc(var(--h) - 5px); width: 75%; height: 22px; border: 3px solid rgba(255,255,255,.85); border-radius: 50%; opacity: 0; transform: translateX(-50%) scale(.2); pointer-events: none; }
    .pod.show .pod-impact { animation: podiumImpact 1s ease-out .72s both; }
    @keyframes podiumImpact { 0% { opacity: 0; transform: translateX(-50%) scale(.2); } 22% { opacity: .95; } 100% { opacity: 0; transform: translateX(-50%) scale(1.8); } }
    .champion-tag { position: absolute; left: 50%; bottom: 180px; z-index: 3; padding: .18rem .75rem; border-radius: 999px; background: linear-gradient(180deg,#fff2a8,#f2b51d); color: #3b2700; border: 2px solid rgba(255,255,255,.75); box-shadow: 0 5px 18px rgba(242,185,30,.45); font: 800 .7rem/1 var(--font-display); letter-spacing: .12em; opacity: 0; transform: translateX(-50%) scale(.3) rotate(-8deg); }
    .pod.show .champion-tag { animation: championIn .75s var(--ease-pop) 1.15s forwards, championFloat 2s ease-in-out 2s infinite alternate; }
    @keyframes championIn { to { opacity: 1; transform: translateX(-50%) scale(1) rotate(-3deg); } }
    @keyframes championFloat { to { transform: translateX(-50%) translateY(-5px) rotate(3deg); } }
    .podium-countdown { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; pointer-events: none; color: #fff; font: 800 clamp(5rem,18vw,12rem)/1 var(--font-display); text-shadow: 0 0 20px rgba(92,198,230,.9), 0 10px 40px rgba(0,0,0,.65); background: radial-gradient(circle,rgba(74,134,232,.28),rgba(6,10,30,.72)); backdrop-filter: blur(2px); }
    .podium-countdown.hit { animation: countdownHit .55s var(--ease-pop) both; }
    @keyframes countdownHit { 0% { opacity: 0; transform: scale(2.2); } 35% { opacity: 1; transform: scale(.86); } 70% { transform: scale(1); } 100% { opacity: 0; transform: scale(.65); } }
    .podium-announcement { position: fixed; inset: 0; z-index: 64; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; background: radial-gradient(circle,rgba(74,134,232,.34),rgba(5,8,28,.88) 62%); animation: announceIn .55s var(--ease-pop) both; }
    .podium-announcement span { color: var(--accent); font: 800 clamp(.9rem,2vw,1.35rem)/1 var(--font-display); letter-spacing: .24em; }
    .podium-announcement strong { max-width: 90vw; margin: .35rem 0; color: #fff; font: 800 clamp(4rem,13vw,9rem)/.95 var(--font-display); text-align: center; text-transform: uppercase; text-shadow: 0 0 34px rgba(92,198,230,.7),0 12px 40px rgba(0,0,0,.7); }
    .podium-announcement small { color: #fff; font: 700 clamp(1rem,2.5vw,1.6rem)/1 var(--font-display); }
    .podium-announcement.out { animation: announceOut .28s ease-in both; }
    @keyframes announceIn { from { opacity: 0; transform: scale(1.35); filter: blur(12px); } to { opacity: 1; transform: none; filter: none; } }
    @keyframes announceOut { to { opacity: 0; transform: scale(.72); filter: blur(10px); } }
    .row-in { opacity: 0; transform: translateY(14px); animation: fadeUp .5s ease forwards; }
    .final-row { display: flex; justify-content: space-between; align-items: center; padding: .65rem 1rem; border-radius: 16px; background: rgba(255, 255, 255, .09); border: 1px solid var(--line); }
    #final-others { width: min(100%,760px); }
    .fireworks-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 58; pointer-events: none; }
    .demo-exit { position: fixed !important; top: max(1rem,env(safe-area-inset-top)); right: max(1rem,env(safe-area-inset-right)); z-index: 66 !important; }

    /* --- Dock : joueurs, réactions, chat, tableau --- */
    #dock { position: fixed; right: 14px; bottom: 14px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; max-width: calc(100vw - 28px); }
    #dock.hidden { display: none; }
    .dock-panel { width: min(340px, calc(100vw - 28px)); background: var(--card-strong); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; animation: viewIn .28s var(--ease-pop) both; }
    .dock-panel.wide { width: min(780px, calc(100vw - 28px)); }
    .dock-panel.hidden { display: none; }
    .dock-head { display: flex; justify-content: space-between; align-items: center; gap: .4rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); font-weight: 700; font-family: var(--font-display); font-size: 1rem; }
    .dock-head .spacer { flex: 1; }
    .dock-head button { color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 0 .3rem; }
    .dock-head button:hover { color: #fff; }
    .dock-buttons { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
    .dock-btn { position: relative; padding: .5rem .95rem; border-radius: 999px; background: var(--card-solid); border: 1px solid var(--line); font-size: .86rem; font-weight: 700; font-family: var(--font-display);
                color: var(--text); box-shadow: 0 5px 0 rgba(0, 0, 0, .3), 0 10px 22px rgba(0, 0, 0, .3); transition: transform .12s var(--ease-pop); }
    .dock-btn:hover, .dock-btn.active { border-color: #6f9cf0; transform: translateY(-2px); }
    .dock-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
    .dock-btn .dot { position: absolute; top: -3px; right: -2px; width: .8rem; height: .8rem; border-radius: 50%; background: var(--pink); border: 2px solid var(--card-solid); }
    .dock-btn .dot.hidden { display: none; }
    .badge { position: absolute; top: -7px; right: -5px; background: var(--pink); color: #fff; font-size: .68rem; min-width: 1.25rem; height: 1.25rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 .25rem; animation: pop .4s var(--ease-pop) both; }
    .badge.hidden { display: none; }
    .chat-log { height: 250px; overflow-y: auto; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .45rem; }
    .msg { max-width: 88%; padding: .45rem .7rem; border-radius: 16px 16px 16px 4px; background: rgba(255, 255, 255, .12); font-size: .86rem; word-break: break-word; align-self: flex-start; animation: pop .3s var(--ease-pop) both; }
    .msg.me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: linear-gradient(180deg, #4f7be8, #3f64cf); }
    .msg.host { border: 1px solid rgba(242, 201, 76, .55); }
    .msg .who { display: block; font-size: .7rem; color: var(--muted); margin-bottom: .1rem; }
    #chat-form { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--line); }
    #chat-input { flex: 1; min-width: 0; padding: .55rem .8rem; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .14); background: rgba(8, 12, 36, .55); color: var(--text); font-size: .9rem; }
    #chat-input:focus { outline: none; border-color: var(--accent); }
    #chat-input:disabled { opacity: .45; }
    .mini-btn { padding: .5rem .85rem; border-radius: 12px; background: linear-gradient(180deg, #5b8def, #3f6fe0); color: #fff; font-weight: 700; font-family: var(--font-display); font-size: .85rem; box-shadow: 0 3px 0 #2a4fb5; }
    .mini-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #2a4fb5; }
    .mini-btn:disabled { opacity: .4; }
    .note { padding: 0 .8rem .6rem; font-size: .75rem; color: #ffb3bd; min-height: 1rem; }
    .players-list { max-height: 250px; overflow-y: auto; padding: .5rem .7rem; display: flex; flex-direction: column; gap: .4rem; }
    .player-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .35rem .5rem; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-size: .84rem; }
    .player-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tg-row { display: flex; flex-wrap: wrap; gap: .4rem; padding: .6rem .7rem; border-top: 1px solid var(--line); }
    #toast { position: fixed; right: 16px; bottom: 76px; z-index: 45; background: var(--card-solid); border: 1px solid var(--line); border-radius: 14px; padding: .5rem .9rem; font-size: .85rem; font-weight: 600; box-shadow: var(--shadow); animation: fadeUp .25s ease both; }
    #toast.hidden { display: none; }

    /* --- Réactions : toujours visibles (une simple apparition en fondu si les animations sont réduites) --- */
    .react-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; padding: .7rem; max-height: min(55vh, 330px); overflow-y: auto; }
    .react-btn { height: 52px; padding: 3px; border-radius: 14px; background: rgba(255, 255, 255, .09); transition: transform .12s var(--ease-pop), background .15s; }
    .react-btn img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
    .react-btn:hover { background: rgba(255, 255, 255, .18); transform: translateY(-3px) scale(1.12); }
    .react-btn:active { transform: scale(.85); }
    .react-btn:disabled { opacity: .4; }
    #reactions-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 55; }
    .float-react { position: absolute; bottom: 90px; display: flex; flex-direction: column; align-items: center; animation: floatUp 3.2s ease-out forwards; }
    .float-react > img { width: clamp(76px, 12vw, 145px); height: clamp(76px, 12vw, 145px); object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .28)); }
    .float-react small { font-size: .68rem; font-weight: 700; color: #fff; margin-top: .1rem; background: rgba(0, 0, 0, .35); padding: .02rem .45rem; border-radius: 999px; max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    @keyframes floatUp { 0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.5); } 10% { opacity: 1; transform: translate3d(0, -6vh, 0) scale(1.2); }
                         55% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--dx, 0), -70vh, 0) scale(1.3) rotate(var(--rot)); } }
    .float-react.calm { animation: fadeStill 2.2s ease-out forwards; }
    @keyframes fadeStill { 0% { opacity: 0; transform: scale(.7); } 15%, 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }

    /* --- Tableau blanc --- */
    .board-wrap { padding: .6rem; }
    #board-canvas { display: block; width: 100%; aspect-ratio: 10 / 7; background: #fff; border-radius: 14px; touch-action: none; cursor: crosshair; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .06); }
    .board-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: 0 .6rem .6rem; }
    .swatch { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .35); transition: transform .12s var(--ease-pop); }
    .swatch.on { border-color: #fff; transform: scale(1.18); box-shadow: 0 0 0 3px rgba(111, 156, 240, .8); }
    .swatch.eraser { background: #fff !important; position: relative; }
    .swatch.eraser::after { content: '⌫'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .8rem; color: #444; }
    .size-dot { width: 1.7rem; height: 1.7rem; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .1); }
    .size-dot i { display: block; border-radius: 50%; background: #fff; }
    .size-dot.on { background: rgba(74, 134, 232, .35); box-shadow: 0 0 0 2px #6f9cf0; }
    .board-note { font-size: .72rem; color: var(--muted); padding: 0 .8rem .6rem; }

    /* --- Photos de profil --- */
    .avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; overflow: hidden; flex-shrink: 0; color: #fff; font-weight: 700; font-family: var(--font-display);
              line-height: 1; user-select: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
    .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .avatar-pick { width: 100px; height: 100px; border-radius: 999px; border: 3px dashed rgba(255, 255, 255, .4); display: flex; align-items: center; justify-content: center; cursor: pointer;
                   background: rgba(255, 255, 255, .07) center / cover no-repeat; color: var(--muted); font-size: 2.2rem; transition: border-color .15s, transform .15s var(--ease-pop); }
    .avatar-pick:hover { border-color: var(--accent); transform: scale(1.05); }

    /* --- Divers --- */
    :root { --fs-mult: 1; }
    html { font-size: calc(clamp(14px, 0.55vw + 11px, 22px) * var(--fs-mult)); }
    @media (min-width: 1500px) { html { font-size: calc(clamp(18px, 0.6vw + 11px, 30px) * var(--fs-mult)); } }
    @media (max-width: 480px) { html { font-size: calc(15px * var(--fs-mult)); } header h1 span { display: none; } header { padding-left: .8rem !important; padding-right: .8rem !important; } }

    /* --- Téléphones : toute la zone utile reste visible, y compris avec encoche et barre d'accueil. --- */
    @media (max-width: 640px) {
      body { min-height: 100svh; min-height: 100dvh; }
      header { padding: calc(.55rem + env(safe-area-inset-top)) .75rem .55rem !important; gap: .35rem; }
      header h1 { font-size: 1rem !important; white-space: nowrap; }
      header .logo-plane { width: 23px; height: 23px; }
      header > div:last-child { gap: .3rem; margin-left: auto; }
      header button, #role-badge { min-height: 36px; padding: .35rem .6rem !important; font-size: .7rem !important; }
      #role-badge { display: none; }
      #fs-controls { display: none !important; }

      main { align-items: flex-start !important; min-height: 0; padding: .75rem .75rem calc(5.3rem + env(safe-area-inset-bottom)) !important; }
      main > .card { border-radius: 20px; }
      #view-mode-select, #view-player-join, #view-player-wait, #view-player-feedback { padding: 1.25rem !important; margin: auto 0; }
      #view-player-game { max-width: none; }
      #view-player-game > .flex:first-child { margin-bottom: .45rem !important; }
      #pq-ring { width: 3rem; height: 3rem; }
      #pq-ring > span { font-size: 1.05rem; }
      #pq-img { width: 100%; max-height: 22dvh !important; object-fit: contain; margin-bottom: .55rem !important; }
      #pq-text { margin-bottom: .65rem !important; padding: .7rem .8rem !important; border-radius: 16px; max-height: 19dvh; overflow-y: auto; }
      #pq-options { gap: .6rem !important; }
      .pq-btn { min-height: 4.65rem; padding: .7rem; gap: .5rem; border-radius: 16px; font-size: .95rem; }
      .pq-btn.pq-shape-only { min-height: min(22dvh, 8rem); }
      .pq-big-shape { font-size: 2.5rem; }
      .shape { width: 1.9rem; height: 1.9rem; border-radius: 9px; }
      .field, #chat-input { font-size: 16px; }
      .avatar-pick { width: 86px; height: 86px; }
      .wait-orbit { width: 100px; height: 100px; margin-bottom: .65rem; }
      .fb-icon { font-size: 3.3rem; }
      .fb-points { font-size: 2.2rem; }

      #dock { left: .5rem; right: .5rem; bottom: calc(.5rem + env(safe-area-inset-bottom)); max-width: none; width: auto; }
      .dock-panel, .dock-panel.wide { width: 100%; max-height: calc(100dvh - 7.2rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); border-radius: 18px; }
      .dock-buttons { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; width: 100%; }
      .dock-btn { min-width: 0; min-height: 44px; padding: .42rem .2rem; font-size: .69rem; line-height: 1.1; white-space: normal; }
      .chat-log { height: min(42dvh, 280px); }
      .react-row { grid-template-columns: repeat(5, 1fr); max-height: min(54dvh, 390px); gap: .4rem; }
      .react-btn { height: 58px; }
      .board-wrap { padding: .45rem; }
      #toast { left: .75rem; right: .75rem; bottom: calc(4.8rem + env(safe-area-inset-bottom)); text-align: center; }
      .float-react { bottom: calc(5.2rem + env(safe-area-inset-bottom)); }
      .float-react > img { width: clamp(70px, 24vw, 105px); height: clamp(70px, 24vw, 105px); }
      #podium { height: 350px; gap: .45rem !important; }
      .pod[data-place="1"] { --h: 172px; }
      .pod[data-place="2"] { --h: 120px; }
      .pod[data-place="3"] { --h: 88px; }
      .pod-label .avatar { width: 52px !important; height: 52px !important; }
      .pod-name { font-size: .88rem; }
      .pod-score { font-size: .78rem; }
      .champion-tag { bottom: 138px; transform: translateX(-50%) scale(.3); font-size: .55rem; }
      .winner-rays { bottom: 95px; width: 190px; height: 190px; margin: 0 0 -95px -95px; }
      #view-host-final { padding: calc(.8rem + env(safe-area-inset-top)) .65rem calc(1.5rem + env(safe-area-inset-bottom)); }
      #view-host-final > h2 { padding-right: 2.6rem; font-size: 2rem; }
      #view-host-final #final-sub { margin-bottom: .35rem !important; }
      .demo-exit { top: max(.55rem,env(safe-area-inset-top)); right: max(.55rem,env(safe-area-inset-right)); font-size: .7rem; }
    }

    @media (max-width: 640px) and (max-height: 620px) {
      header { padding-top: calc(.35rem + env(safe-area-inset-top)) !important; padding-bottom: .35rem !important; }
      main { padding-top: .4rem !important; }
      #pq-img { max-height: 16dvh !important; }
      #pq-text { max-height: 16dvh; padding-top: .5rem !important; padding-bottom: .5rem !important; }
      .pq-btn { min-height: 3.8rem; }
      .pq-btn.pq-shape-only { min-height: 17dvh; }
    }
    .rtable { width: 100%; border-collapse: collapse; font-size: .85rem; }
    .rtable th, .rtable td { padding: .45rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
    .rtable th { color: var(--muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-display); }
    .bar { height: 6px; width: 120px; border-radius: 3px; background: rgba(255, 255, 255, .15); overflow: hidden; margin-bottom: .2rem; }
    .bar > i { display: block; height: 100%; }
    #update-bar { background: linear-gradient(90deg, #3f6fe0, #6a5fe0) !important; font-weight: 600; }

    /* --- Appareils modestes ou lents (classe posée par le script) : presque plus d'animations continues --- */
    .lite .bg-fx { display: none; }
    .lite .logo-plane, .lite .pulse, .lite .wait-orbit::before, .lite .wait-orbit::after, .lite .dial.danger, .lite .pod[data-place="1"].show .pod-block, .lite .crown { animation: none !important; }
    .lite .view-in, .lite .ans-in, .lite .q-in { animation-duration: .01s; }
    .lite .lb-row { transition-duration: .3s; }
    @media (prefers-reduced-motion: reduce) {
      .bg-fx, .logo-plane { display: none; animation: none; }
      .fade-up, .row-in, .rank-badge, .view-in, .ans-in, .q-in, .pop, .lobby-chip, .msg, .badge { animation: none; opacity: 1; transform: none; }
      .pod-label, .pod-block, .lb-row, .dist-bar { transition: none; }
      #view-host-final.celebrating::before, #view-host-final.celebrating::after, .pod[data-place="1"].show .pod-block, .crown, .champion-tag, .winner-rays, .winner-sparks i, .dial.danger, .pulse, .wait-orbit::before, .wait-orbit::after { animation: none; }
      .winner-rays { opacity: .35; transform: scale(1); }
      .champion-tag { opacity: 1; transform: translateX(-50%); }
    }

*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-10{margin-bottom:2.5rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.max-h-\[220px\]{max-height:220px}.min-h-\[2\.4rem\]{min-height:2.4rem}.min-h-\[84px\]{min-height:84px}.min-h-screen{min-height:100vh}.w-full{width:100%}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-\[290px\]{max-width:290px}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-grow,.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-start{align-content:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.625rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem*var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-full{border-radius:9999px}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pl-\[\.25em\]{padding-left:.25em}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-snug{line-height:1.375}.tracking-\[\.25em\]{letter-spacing:.25em}.tracking-\[\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.underline{text-decoration-line:underline}.\!ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)!important;--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)!important;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)!important}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@media (min-width:640px){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:gap-5{gap:1.25rem}.sm\:p-8{padding:2rem}}