    /* Polices hébergées chez nous (RGPD : aucune requête vers Google). Licence OFL. */
    @font-face { font-family: "DM Sans"; src: url(fonts/dm-sans.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
    @font-face { font-family: "Outfit"; src: url(fonts/outfit.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }


    /* Couleurs « Bleu ERPB » (celles de Y3B Gestion), choisies par Yvan le 29/11 à la place du bleu pétrole. */
    :root {
      --bg: #f3f5f9;
      --surface: #ffffff;
      --raised: #ffffff;
      --soft: #eef1f6;
      --ink: #1b2437;
      --muted: #6b7488;
      --border: #e3e7ef;
      --accent: #1e4fb8;
      --accent-soft: #e6eefd;
      --button: #2f6fed;
      --logo-bg: #cfdcfb;
      --logo-ink: #1e4fb8;
      --shadow: 0 12px 35px #1b243710;
      --sidebar: 220px;
      color-scheme: light; /* cases, listes et barres de défilement suivent le thème du site, pas celui de l'appareil */
    }

    /* Mode sombre : gris-bleu très foncé, le bleu reste un accent. */
    [data-theme="dark"] {
      --bg: #14171f;
      --surface: #1c2028;
      --raised: #232833;
      --soft: #10131a;
      --ink: #edeff4;
      --muted: #9ca3b4;
      --border: #2a2f3a;
      --accent: #7ea6ff;
      --accent-soft: #1d2a47;
      --button: #2f6fed;
      --shadow: 0 12px 35px #00000028;
      color-scheme: dark;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; scroll-padding-top: 90px; }
    body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 "DM Sans",sans-serif; transition: background .25s,color .25s; }
    h1,h2,h3,p { margin: 0; }
    h1,h2,h3,.brand,.art-title { font-family: "Outfit",sans-serif; }
    button,input { font: inherit; }
    button { cursor: pointer; }
    button:disabled { cursor: default; }
    a { color: inherit; text-decoration: none; }
    button,a,input { -webkit-tap-highlight-color: transparent; }
    button:focus-visible,a:focus-visible,input:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
    svg { display: block; }
    .icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
    [hidden] { display: none !important; }
    .sprite { position: absolute; }

    .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--surface); border-right: 1px solid var(--border); padding: 29px 17px 22px; display: flex; flex-direction: column; z-index: 60; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
    .sidebar-head { display: flex; justify-content: space-between; align-items: center; }
    .brand { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 800; line-height: 1; letter-spacing: -.8px; }
    .logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--logo-bg); color: var(--logo-ink); font-size: 29px; transform: rotate(-7deg); }
    .brand small { display: block; margin-top: 5px; font: 600 11px "DM Sans",sans-serif; letter-spacing: 3px; color: var(--muted); }
    .nav-label { margin: 43px 13px 12px; font-size: 11px; letter-spacing: 1.6px; color: var(--muted); }
    .side-nav { display: grid; gap: 5px; }
    .nav-item { min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 11px; color: var(--muted); font-size: 13px; font-weight: 600; transition: background .2s,color .2s; }
    .nav-item:hover { background: var(--soft); color: var(--ink); }
    .nav-item.active { background: var(--accent-soft); color: var(--accent); }
    .count { margin-left: auto; background: var(--raised); border-radius: 5px; padding: 1px 6px; font-size: 11px; }
    .sidebar-bottom { margin-top: auto; }
    .sidebar-note { padding: 20px 12px; font-size: 12px; color: var(--muted); }
    .sidebar-note strong { display: block; color: var(--ink); font-family: "Outfit",sans-serif; font-size: 16px; margin-bottom: 6px; }
    .theme-button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px; border: 1px solid var(--border); border-radius: 11px; background: var(--soft); color: var(--ink); font-size: 12px; }
    .theme-button > span { display: flex; align-items: center; gap: 10px; }
    .switch { width: 32px; height: 19px; border-radius: 20px; padding: 3px; background: var(--border); }
    .switch::before { content: ""; width: 13px; height: 13px; background: white; border-radius: 50%; transition: transform .2s; }
    [data-theme="dark"] .switch { background: var(--button); }
    [data-theme="dark"] .switch::before { transform: translateX(13px); }

    .app { margin-left: var(--sidebar); }
    .topbar { height: 77px; padding: 0 32px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
    .topbar-left,.topbar-right { display: flex; align-items: center; gap: 14px; }
    .breadcrumb { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); }
    .breadcrumb strong { color: var(--ink); font-weight: 500; }
    .preview-label { font-size: 11px; letter-spacing: .6px; color: var(--muted); border: 1px solid var(--border); padding: 5px 8px; border-radius: 6px; }
    .profile { display: flex; align-items: center; gap: 8px; font-size: 12px; }
    .profile-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: var(--soft); font-size: 21px; }
    .icon-button { display: grid; place-items: center; width: 38px; height: 38px; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 10px; transition: background .2s; }
    .icon-button:hover { background: var(--raised); }
    .menu-open,.menu-close { display: none; }

    main { max-width: 1550px; margin: auto; padding: 32px 32px 26px; }
    .welcome { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 28px; }
    /* Rejoindre depuis l'accueil (Yvan 29/11) */
    .quick-join { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin: -8px 0 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
    .quick-join label { flex: 1 1 220px; font-size: 15px; }
    .quick-join .code-input { width: 150px; min-height: 44px; text-align: center; font-size: 18px; }
    .public-check { flex-wrap: wrap; }
    .public-check small { flex-basis: 100%; padding-left: 26px; font-size: 11px; color: var(--muted); font-weight: 400; }
    .open-rooms { margin: -12px 0 26px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
    .open-rooms h2 { font-size: 16px; margin-bottom: 10px; }
    .open-rooms ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 0; padding: 0; }
    .open-rooms .open-empty { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
    .open-card { width: 100%; display: flex; align-items: stretch; text-align: left; padding: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
      background: var(--accent-soft); color: inherit; font: inherit; cursor: pointer; transition: transform .15s, border-color .15s; }
    .open-card:hover, .open-card:focus-visible { transform: translateY(-2px) rotate(-.5deg); border-color: var(--accent); }
    .open-main { flex: 1; min-width: 0; display: grid; gap: 4px; padding: 9px 12px; }
    .open-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
    .open-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
    .open-count { flex: none; padding: 1px 7px; border-radius: 99px; background: #0003; font-size: 11px; font-weight: 700; }
    .open-game { font-size: 12px; color: var(--muted); }
    .open-code { writing-mode: vertical-rl; text-orientation: mixed; display: grid; place-items: center; padding: 6px 7px; border-left: 2px dashed var(--border);
      font: 800 13px "Outfit", sans-serif; letter-spacing: 3px; color: var(--muted); }
    .quick-join .action-button { width: auto; padding: 0 24px; }
    @media (max-width: 540px) { .quick-join .code-input { flex: 1; width: auto; } }
    h1 { font-size: clamp(30px,3vw,39px); font-weight: 600; letter-spacing: -1.3px; line-height: 1.2; }
    .welcome p { color: var(--muted); font-size: 13px; margin-top: 8px; }
    .browser-note { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
    .browser-note .icon { width: 15px; height: 15px; }
    .dashboard { display: grid; grid-template-columns: minmax(0,1fr) 285px; gap: 25px; align-items: start; }
    h2 { font-size: 20px; font-weight: 600; letter-spacing: -.4px; }
    .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
    .section-heading span { color: var(--muted); font-size: 11px; }
    .game-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
    .game { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s,border-color .25s; }
    .game:hover { transform: translateY(-5px); border-color: var(--accent); }
    .art { height: 205px; padding: 20px; position: relative; overflow: hidden; display: flex; align-items: flex-end; isolation: isolate; }
    .art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(currentColor .7px,transparent .7px); background-size: 17px 17px; opacity: .1; z-index: -1; }
    .art-tag { position: absolute; top: 13px; left: 13px; background: #ffffff20; padding: 5px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; backdrop-filter: blur(8px); z-index: 3; }
    .art-title { position: relative; z-index: 3; font-size: 29px; font-weight: 800; line-height: 1.05; letter-spacing: -.7px; }
    .art-title small { display: block; font: 500 11px "DM Sans",sans-serif; letter-spacing: 1.8px; margin-bottom: 7px; opacity: .8; }
    .illustration { position: absolute; width: 175px; height: 162px; top: 10px; left: calc(50% - 87.5px); }
    .traitors { background: #143c4a; color: #efe3ba; }
    .culture { background: #c9e8f2; color: #134a64; }
    .impostor { background: #274e66; color: #e0f0f5; }
    .geography { background: #bfe0d3; color: #234f48; }
    .potato { background: #f4d4aa; color: #5b3928; }
    .quiz-block { position: absolute; top: 38px; left: calc(50% - 40px); width: 80px; height: 83px; background: #00739b; color: #f1f8e8; border-radius: 18px; font: 800 67px/1 "Outfit",sans-serif; display: grid; place-items: center; transform: rotate(12deg); box-shadow: 7px 8px 0 #134a6415; }
    .quiz-bubble { position: absolute; top: 30px; right: 20px; padding: 5px 9px; border-radius: 8px 8px 8px 0; background: #fffdf4; color: #174a60; font-size: 11px; font-weight: 700; transform: rotate(-8deg); }
    .spark { position: absolute; top: 63px; left: 25px; color: #00739b; font-size: 28px; }
    .game-body { padding: 17px; }
    .game-name { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
    .game-name h3 { font-size: 19px; font-weight: 600; letter-spacing: -.4px; }
    .category { font-size: 11px; padding: 3px 6px; border-radius: 5px; background: var(--soft); color: var(--muted); white-space: nowrap; }
    .game-body p { font-size: 12px; line-height: 1.65; color: var(--muted); margin-top: 9px; min-height: 60px; }
    .game-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 11px; margin: 15px 0; }
    .game-meta span { display: flex; align-items: center; gap: 5px; }
    .game-meta .icon { width: 14px; height: 14px; }
    .play-button { width: 100%; min-height: 41px; border: 0; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 7px; }
    .play-button .icon { width: 15px; height: 15px; }
    .collection-note { padding-top: 19px; font-size: 11px; color: var(--muted); }

    .room-column { position: sticky; top: 24px; }
    .room-area { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
    .room-top p { font-size: 12px; color: var(--muted); margin-top: 5px; }
    .tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 10px; margin: 18px 0; }
    .tab { flex: 1; min-height: 35px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; transition: background .2s; }
    .tab:hover { color: var(--ink); }
    .tab[aria-selected="true"] { background: var(--raised); color: var(--ink); box-shadow: 0 2px 5px #00000015; }
    .field { margin-bottom: 15px; }
    .field label,.field-label { display: block; font-size: 11px; font-weight: 600; margin-bottom: 7px; }
    .text-input { width: 100%; min-height: 43px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--ink); padding: 11px 12px; font-size: 12px; }
    .text-input::placeholder { color: var(--muted); opacity: .85; }
    .code-input { font-family: "Outfit",sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: 5px; }
    .action-button { width: 100%; min-height: 44px; border: 0; border-radius: 9px; background: var(--button); color: white; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; font-weight: 600; }
    .action-button .icon { width: 16px; height: 16px; }
    .form-note { color: var(--muted); font-size: 11px; text-align: center; margin-top: 9px; }
    .aside-tip { display: flex; gap: 9px; padding: 20px 5px; font-size: 11px; line-height: 1.7; color: var(--muted); }
    .aside-tip > span { font-size: 20px; }
    .aside-tip strong { color: var(--ink); font-weight: 500; }
        .help { border-top: 1px solid var(--border); margin-top: 31px; padding-top: 23px; }
    .help-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 25px; margin-top: 17px; }
    .help-step { display: flex; align-items: flex-start; gap: 10px; }
    .step-number { flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--soft); font: 12px "Outfit",sans-serif; }
    .help-step strong { font-size: 12px; font-weight: 600; }
    .help-step p { color: var(--muted); font-size: 11px; margin-top: 4px; }
    footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-top: 32px; color: var(--muted); font-size: 11px; }
    .backdrop { position: fixed; inset: 0; background: #000000a6; backdrop-filter: blur(3px); border: 0; z-index: 50; }
    .mobile-nav { display: none; }
    .reveal { animation: reveal .55s both; }
    /* Écran de jeu redessiné à l'identique (portal.js) : les animations d'apparition sont déjà finies, celles en boucle continuent */
    #game-area.calm *, #game-area.calm *::before, #game-area.calm *::after { animation-delay: -60s !important; }
    .game:nth-child(2) { animation-delay: .06s; }
    .game:nth-child(3) { animation-delay: .12s; }
    .game:nth-child(4) { animation-delay: .18s; }
    .game:nth-child(5) { animation-delay: .24s; }
    @keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

    @media (min-width: 1530px) {
      .game-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    }
    @media (max-width: 1200px) {
      :root { --sidebar: 190px; }
      .brand { font-size: 20px; }
      .sidebar { padding-inline: 12px; }
      main,.topbar { padding-inline: 25px; }
      .dashboard { gap: 19px; grid-template-columns: minmax(0,1fr) 260px; }
      .game-grid { gap: 14px; }
      .game-name { flex-direction: column; align-items: flex-start; gap: 5px; }
      .game-body { padding: 15px; }
      .game-body p { min-height: 80px; }
      .art { padding: 17px; }
      .art-title { font-size: 26px; }
      .room-area { padding: 17px; }
    }
    @media (min-width: 761px) and (max-width: 1000px) {
      :root { --sidebar: 78px; }
      body:not(.rail-open) .sidebar { align-items: center; }
      body:not(.rail-open) :is(.brand > span:last-child,.nav-label,.nav-item > span,.sidebar-note,.theme-text,.switch,.palette-pick) { display: none !important; }
      body:not(.rail-open) .side-nav { width: 100%; margin-top: 40px; }
      body:not(.rail-open) .nav-item { justify-content: center; padding: 13px; }
      body:not(.rail-open) .sidebar-bottom { width: 100%; }
      body:not(.rail-open) .theme-button { justify-content: center; }
      body:not(.rail-open) .sidebar-head { flex-direction: column; gap: 14px; }
      .rail-toggle { display: grid; }
      .browser-note { display: none; }
    }
    @media (max-width: 900px) {
      .dashboard { grid-template-columns: 1fr; gap: 25px; }
      .room-column { position: static; grid-row: 1; }
      .room-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
      .tabs { min-width: 230px; margin: 0; }
      .room-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 15px; margin-top: 19px; }
      .avatar-group { grid-column: 1; }
      .submit-group { grid-column: 2; align-self: end; }
      .aside-tip { display: none; }
      .game-name { flex-direction: row; align-items: center; }
      .game-body p { min-height: 60px; }
      .art { height: 220px; }
    }
    @media (max-width: 760px) {
      :root { --sidebar: 258px; }
      .sidebar { transform: translateX(-100%); transition: transform .25s ease; padding: 23px 18px; }
      body.menu-visible .sidebar { transform: translateX(0); }
      body.menu-visible { overflow: hidden; }
      .menu-open,.menu-close { display: grid; }
      .menu-close { width: 32px; height: 32px; }
      .app { margin-left: 0; }
      .topbar { height: 68px; padding-inline: 20px; background: var(--surface); }
      .breadcrumb { font-family: "Outfit",sans-serif; font-size: 19px; font-weight: 700; color: var(--ink); }
      .desktop-crumb,.profile > span:last-child,.browser-note { display: none; }
      main { padding: 26px 20px 95px; }
      .mobile-nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-around; background: var(--surface); border-top: 1px solid var(--border); padding: 8px 8px max(8px,env(safe-area-inset-bottom)); z-index: 40; }
      .mobile-nav a,.mobile-nav button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; padding: 6px 12px; background: transparent; color: var(--muted); border: 0; border-radius: 10px; font-size: 11px; }
      .mobile-nav .active { color: var(--accent); background: var(--accent-soft); }
    }
    @media (max-width: 540px) {
      .topbar { padding-inline: 16px; }
      .topbar-left { gap: 9px; }
      .preview-label { display: none; }
      main { padding-inline: 16px; }
      h1 { font-size: 31px; }
      .welcome p { font-size: 12px; max-width: 285px; line-height: 1.7; }
      .room-top { display: block; }
      .room-top h2 { font-size: 19px; }
      .tabs { margin-top: 15px; }
      .room-form { gap: 0 10px; margin-top: 16px; }
      .action-button { font-size: 11px; gap: 5px; min-height: 41px; }
      .form-note { font-size: 11px; }
      .game-grid { gap: 12px; }
      .art { height: 182px; padding: 13px; }
      .art-tag { font-size: 11px; top: 10px; left: 10px; padding: 4px 6px; }
      .art-title { font-size: 22px; }
      .art-title small { font-size: 11px; letter-spacing: .9px; }
      .illustration { width: 138px; height: 140px; left: calc(50% - 69px); top: 5px; }
      .quiz-block { top: 39px; width: 64px; height: 69px; font-size: 54px; left: calc(50% - 32px); }
      .quiz-bubble { top: 24px; right: 10px; padding: 4px 6px; font-size: 11px; }
      .spark { left: 12px; font-size: 23px; }
      .game-body { padding: 12px; }
      .game-name { flex-direction: column; align-items: flex-start; }
      .game-name h3 { font-size: 17px; }
      .category { font-size: 11px; }
      .game-body p { font-size: 11px; min-height: 92px; }
      .game-meta { flex-direction: column; gap: 6px; margin: 12px 0; }
      .play-button { font-size: 11px; gap: 5px; }
      .play-button .icon { width: 12px; height: 12px; }
      .help-steps { grid-template-columns: 1fr; gap: 16px; }
      footer { line-height: 1.7; }
    }
    @media (max-width: 360px) {
      .game-grid { grid-template-columns: 1fr; }
      .art { height: 205px; }
      .art-title { font-size: 29px; }
      .illustration { width: 175px; height: 165px; left: calc(50% - 87.5px); }
      .game-name { flex-direction: row; align-items: center; }
      .game-body p { min-height: 0; }
      .game-meta { flex-direction: row; gap: 12px; }
      .room-form { grid-template-columns: 1fr; }
      .avatar-group,.submit-group { grid-column: 1; }
      .submit-group { margin-top: 16px; }
    }
    @media (prefers-reduced-motion: reduce) {
      *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    }

    /* ───── Écran de la room ───── */
    .room-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
    .room-game { font-size: clamp(26px,3vw,34px); font-weight: 700; letter-spacing: -.8px; }
    .room-code-box { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px 16px; border-radius: 9px; background: var(--accent-soft); }
    .room-kicker { font-size: 11px; letter-spacing: 3px; color: var(--muted); }
    .room-code { font: 800 28px/1.1 "Outfit",sans-serif; letter-spacing: 5px; color: var(--accent); }
    .room-head-actions { align-items: stretch; margin-left: auto; justify-content: flex-end; }
    .room-status { color: var(--muted); font-size: 13px; margin-top: 4px; }
    .room-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
    .room-head-actions .play-button { width: auto; padding: 0 16px; font-size: 12px; }
    .room-message { min-height: 20px; font-size: 13px; color: var(--accent); margin-bottom: 10px; }
    .room-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 25px; align-items: start; }
    .player-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
    .player { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--soft); flex-wrap: wrap; }
    .player.offline { opacity: .55; }
    .player-avatar { font-size: 24px; width: 34px; text-align: center; }
    .player-name { font-weight: 600; font-size: 14px; flex: 1; min-width: 100px; overflow-wrap: anywhere; }
    .badge { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--raised); color: var(--muted); white-space: nowrap; }
    .badge.host { background: var(--accent-soft); color: var(--accent); }
    .player-actions { display: flex; gap: 6px; flex-wrap: wrap; }
    .player-actions button { min-height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 11px; }
    .player-actions button:hover { background: var(--raised); }
    .player-actions .danger { color: #e5484d; }
    .game-placeholder { margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
    .host-panel h2 { margin-bottom: 16px; }
    select.text-input { appearance: auto; }
    .check { display: flex; align-items: center; gap: 9px; font-size: 12px; margin-bottom: 16px; cursor: pointer; }
    .check input { width: 18px; height: 18px; accent-color: var(--button); }
    .host-buttons { display: grid; gap: 8px; }
    @media (max-width: 900px) {
      .room-layout { grid-template-columns: 1fr; }
    }
    @media (max-width: 540px) {
      .room-head-actions, .room-head-actions .play-button { width: 100%; }
      .room-code-box { width: 100%; flex-direction: row; gap: 12px; padding: 8px; }
    }


    /* Meme du patron : le GIF apparaît au survol (ou au toucher) de « C’est moiii ». */
    .boss-me { position: relative; cursor: help; border-bottom: 2px dotted var(--accent); }
    .boss-gif { position: absolute; left: 0; top: calc(100% + 8px); width: 220px; height: auto; border-radius: 12px; box-shadow: var(--shadow); z-index: 20; display: none; }
    .boss-me:hover .boss-gif, .boss-me:focus .boss-gif { display: block; }
    @media (prefers-reduced-motion: reduce) { .boss-me:hover .boss-gif, .boss-me:focus .boss-gif { display: none; } }
    .card-credit { margin-top: 10px; font-size: 11px; line-height: 1.4; color: var(--muted); opacity: .75; }
    .credit-info { position: absolute; top: 13px; right: 13px; z-index: 4; }
    .credit-info summary { list-style: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #ffffff20; backdrop-filter: blur(8px); font: italic 700 13px/1 Georgia,serif; cursor: pointer; }
    .credit-info summary::-webkit-details-marker { display: none; }
    .credit-info p { position: absolute; top: 28px; right: 0; width: 210px; padding: 8px 10px; border-radius: 8px; background: #000000cc; color: #fff; font-size: 11px; line-height: 1.4; }
    /* Étiquettes empilées sous le nom du jeu (alignées comme le nom selon la largeur d'écran). */
    .categories { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
    .friendship-killer { background: #e5484d22; color: #e5484d; }
    @media (max-width: 1200px) { .categories { align-items: flex-start; } }
    @media (max-width: 900px) { .categories { align-items: flex-end; } }
    @media (max-width: 540px) { .categories { align-items: flex-start; } }
    @media (max-width: 360px) { .categories { align-items: flex-end; } }
    /* ───── Chat ───── */
    .room-main { display: grid; gap: 25px; min-width: 0; }
    .chat-log { list-style: none; margin: 0 0 12px; padding: 4px; height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: var(--bg); border-radius: 12px; }
    .chat-empty { margin: auto; color: var(--muted); font-size: 13px; text-align: center; }
    .msg { display: flex; gap: 9px; padding: 6px 8px; border-radius: 10px; }
    .msg:hover { background: var(--soft); }
    .msg-avatar { font-size: 22px; line-height: 1.2; }
    .msg-body { min-width: 0; flex: 1; }
    .msg-head { display: flex; gap: 8px; align-items: baseline; font-size: 12px; }
    .msg-head strong { font-size: 13px; }
    .msg.mine .msg-head strong { color: var(--accent); }
    .msg-head time { color: var(--muted); font-size: 11px; }
    .msg-text { font-size: 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
    .msg-tools { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
    .msg-tools button { min-height: 28px; padding: 0 8px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink); font-size: 12px; }
    .msg-tools button.empty { opacity: 0; }
    .msg:hover .msg-tools button.empty, .msg:focus-within .msg-tools button.empty { opacity: .6; }
    .msg-tools button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
    .msg-tools .report { margin-left: auto; color: var(--muted); }
    @media (hover: none) { .msg-tools button.empty { opacity: .45; } }
    .chat-form { position: relative; display: flex; gap: 8px; }
    .chat-form .text-input { flex: 1; min-width: 0; }
    .chat-send { width: 48px; flex-shrink: 0; }
    .chat-form .icon-button { width: 44px; height: auto; font-size: 20px; }
    .emoji-panel { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 10; display: grid; grid-template-columns: repeat(8, 36px); gap: 4px; padding: 8px; background: var(--raised); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
    .emoji-panel button { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; font-size: 20px; }
    .emoji-panel button:hover { background: var(--accent-soft); }
    .report-dialog { max-width: min(460px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--ink); padding: 22px; }
    .report-dialog::backdrop { background: #000000a6; }
    .report-quote { margin: 12px 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--soft); border-radius: 8px; font-size: 13px; overflow-wrap: anywhere; }
    .report-reasons { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; font-size: 13px; }
    .report-reasons legend { font-weight: 600; margin-bottom: 8px; }
    .report-reasons label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
    .report-note { font-size: 11px; color: var(--muted); margin-bottom: 14px; }
    .dialog-buttons { display: flex; gap: 10px; justify-content: flex-end; }
    .dialog-buttons button { width: auto; padding: 0 18px; }
    @media (max-width: 540px) { .emoji-panel { grid-template-columns: repeat(6, 36px); } .chat-log { height: 300px; } }
    .host-panel { position: relative; }
    .host-panel h2 { padding-right: 44px; }
    .boss-crown { position: absolute; top: -18px; right: 16px; font-size: 40px; transform: rotate(14deg); filter: drop-shadow(0 4px 6px #00000040); pointer-events: none; }
    /* ───── Jeu : Imposteur ───── */
    .game-paused { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 600; margin-bottom: 12px; }
    /* Pause (Yvan 29/11) : le jeu flouté sous un voile, pour tout le monde */
    #game-area { position: relative; }
    #game-area.is-paused > :not(.pause-veil) { filter: blur(14px); pointer-events: none; user-select: none; }
    .pause-veil { position: absolute; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 20px; text-align: center;
      border-radius: inherit; background: color-mix(in srgb, var(--bg) 45%, transparent); }
    .pause-veil .pause-icon { font-size: 54px; animation: imp-zoom .4s both; }
    .pause-veil strong { font: 800 32px "Outfit", sans-serif; }
    .pause-veil p { color: var(--muted); margin: 0; }
    .pause-veil .action-button { width: auto; padding: 0 26px; margin-top: 10px; }
    .pause-button { width: auto; min-height: 32px; padding: 0 12px; font-size: 12px; }
    #game-area > .pause-button { margin: 0 0 8px auto; }
    .imp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
    .imp-timer { font: 700 18px "Outfit",sans-serif; color: var(--accent); }
    .imp-layout { display: grid; grid-template-columns: minmax(0,1fr) 200px; gap: 20px; align-items: start; }
    .imp-body { display: grid; gap: 12px; min-width: 0; }
    .imp-say { font-size: 14px; }
    .imp-say.big { font: 600 18px/1.4 "Outfit",sans-serif; }
    .imp-say.good { color: #30a46c; }
    .imp-say.bad { color: #e5484d; }
    .imp-sub { font-size: 12px; color: var(--muted); }
    .imp-secret { display: grid; gap: 8px; }
    .imp-role { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
    .imp-role.bad { font: 700 20px "Outfit",sans-serif; text-transform: none; letter-spacing: 0; color: #e5484d; }
    .imp-word { font: 800 30px "Outfit",sans-serif; color: var(--accent); margin: 4px 0; overflow-wrap: anywhere; }
    .imp-hold { user-select: none; -webkit-user-select: none; touch-action: none; }
    .imp-form { display: flex; gap: 8px; }
    .imp-form .text-input { flex: 1; min-width: 0; }
    .imp-form .action-button { width: auto; padding: 0 16px; }
    .imp-clues, .imp-scores { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
    .imp-clues li, .imp-scores li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; background: var(--soft); font-size: 13px; }
    .imp-clues li.muted strong { color: var(--muted); font-weight: 500; }
    .imp-scores li.me { outline: 1px solid var(--accent); }
    .imp-scores.podium li { font-size: 16px; padding: 12px 14px; }
    .imp-side h3 { font-size: 14px; margin-bottom: 8px; }
    .imp-vote { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
    .imp-vote .play-button[aria-pressed="true"] { background: var(--button); color: white; }
    @media (max-width: 700px) { .imp-layout { grid-template-columns: 1fr; } }
    /* ───── Animations des jeux (coupées par la règle « moins d'animations » en haut du fichier) ───── */
    @keyframes imp-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
    @keyframes imp-slide { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
    @keyframes imp-zoom { 0% { opacity: 0; transform: scale(.6); } 70% { opacity: 1; transform: scale(1.06); } 100% { transform: scale(1); } }
    @keyframes imp-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
    @keyframes imp-glow { 0%, 100% { box-shadow: 0 0 0 0 #7ea6ff80; } 50% { box-shadow: 0 0 0 7px #7ea6ff00; } }
    @keyframes imp-float { 0% { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px); } }
    @keyframes imp-fall { from { transform: translateY(-10vh) rotate(0); } to { transform: translateY(110vh) rotate(720deg); } }
    @keyframes imp-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
    @keyframes imp-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }

    .imp-enter > * { animation: imp-in .45s both; }
    .imp-enter > *:nth-child(2) { animation-delay: .06s; }
    .imp-enter > *:nth-child(3) { animation-delay: .12s; }
    .imp-enter > *:nth-child(4) { animation-delay: .18s; }
    .imp-enter > *:nth-child(n+5) { animation-delay: .24s; }
    .imp-reveal { animation: imp-in .5s both !important; }
    .imp-verdict.imp-reveal { animation-name: imp-zoom !important; animation-duration: .7s !important; }
    .imp-new { animation: imp-slide .4s both; }
    .imp-myturn { animation: imp-wiggle .5s 2; }
    .imp-timer.hurry { color: #e5484d; animation: imp-pulse 1s infinite; display: inline-block; }

    /* Carte secrète qui se retourne en 3D */
    .imp-card { perspective: 900px; }
    .imp-card-inner { display: grid; min-height: 130px; transition: transform .5s cubic-bezier(.2,.8,.2,1.2); transform-style: preserve-3d; }
    .imp-card.shown .imp-card-inner { transform: rotateY(180deg); }
    .imp-card-back, .imp-card-front { grid-area: 1 / 1; padding: 16px; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; align-content: center; }
    .imp-card-back { place-items: center; gap: 4px; color: #e0f0f5; background: repeating-linear-gradient(45deg, #274e66 0 12px, #2e5a75 12px 24px); border: 2px solid #3d7180; }
    .imp-card-back span { font: 800 40px/1 "Outfit",sans-serif; color: #ffd36b; }
    .imp-card-back strong { font: 600 14px "Outfit",sans-serif; }
    .imp-card-front { transform: rotateY(180deg); background: var(--soft); border: 2px solid var(--accent); }

    /* Ordre de parole en pastilles, l'orateur pulse */
    .imp-order { display: flex; flex-wrap: wrap; gap: 6px; }
    .imp-chip { padding: 5px 10px; border-radius: 20px; background: var(--soft); font-size: 12px; color: var(--muted); transition: background .3s, color .3s; }
    .imp-chip.speaking { background: var(--accent-soft); color: var(--accent); font-weight: 700; animation: imp-glow 1.4s infinite; }

    /* Vote */
    .imp-pop > * { animation: imp-zoom .4s both; }
    .imp-vote .play-button { transition: transform .15s, background .2s; }
    .imp-vote .play-button:hover { transform: translateY(-2px); }
    .imp-vote .play-button[aria-pressed="true"] { transform: scale(1.04); }
    .imp-progress { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
    .imp-progress i { display: block; height: 100%; background: var(--button); transition: width .4s ease; }

    /* Points gagnés et confettis */
    .imp-scores strong { position: relative; }
    .imp-plus { position: absolute; right: 0; top: -14px; color: #30a46c; font-size: 13px; animation: imp-float 1.8s both; }
    .imp-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; overflow: hidden; }
    .imp-confetti i { position: absolute; top: 0; width: 8px; height: 14px; border-radius: 2px; animation: imp-fall linear both; }

    /* Podium de fin */
    .imp-podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; margin: 8px 0 16px; }
    .imp-step { display: grid; justify-items: center; gap: 2px; text-align: center; animation: imp-in .6s both; }
    .imp-step strong { font-size: 14px; overflow-wrap: anywhere; }
    .imp-step span { font-size: 12px; color: var(--muted); }
    .imp-step .imp-step-face { font-size: 34px; color: inherit; }
    .imp-step-block { width: 100%; margin-top: 6px; border-radius: 10px 10px 0 0; display: grid; place-items: start center; padding-top: 8px; font-size: 26px; transform-origin: bottom; animation: imp-rise .7s both; animation-delay: inherit; }
    .imp-step.rank1 .imp-step-block { height: 120px; background: linear-gradient(#ffd36b, #c9a227); }
    .imp-step.rank2 .imp-step-block { height: 85px; background: linear-gradient(#e5e7eb, #9ca3af); }
    .imp-step.rank3 .imp-step-block { height: 60px; background: linear-gradient(#f4b183, #b0703c); }
    /* ───── Disposition de la room : jeu à gauche, chat à droite ───── */
    .room-layout { grid-template-columns: minmax(0,1fr) 340px; }
    .room-side { display: grid; gap: 25px; align-content: start; position: sticky; top: 16px; }
    .room-side .chat-log { height: min(52vh, 460px); }
    .host-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }
    .host-strip > span { margin-right: auto; }
    .host-strip .play-button { width: auto; padding: 0 14px; min-height: 36px; background: var(--surface); }
    @media (max-width: 900px) {
      /* Sur téléphone : le jeu, puis le chat, puis les joueurs. */
      .room-main, .room-side { display: contents; }
      .room-layout { display: grid; grid-template-columns: 1fr; gap: 18px; }
      .host-strip { order: 0; } .host-panel { order: 1; } .game-area { order: 2; } .chat { order: 3; } .players-area { order: 4; } .rules-area { order: 5; }
      .room-side .chat-log { height: 300px; }
    }
    /* ───── Imposteur : plateau en colonnes ───── */
    @keyframes imp-dropin { from { opacity: 0; transform: translateY(-18px) scale(.6); } to { opacity: 1; transform: none; } }
    @keyframes imp-cardflip { from { opacity: 0; transform: perspective(700px) rotateY(90deg); } to { opacity: 1; transform: none; } }
    .imp-top { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
    .imp-status { display: grid; gap: 8px; align-content: start; }
    .imp-mycard { display: grid; gap: 4px; padding: 14px 16px; border-radius: 14px; background: var(--soft); border: 2px solid var(--accent); }
    .imp-mycard span { font-size: 12px; color: var(--muted); }
    .imp-mycard .imp-word { margin: 0; }
    .imp-word.bad { color: #e5484d; font-size: 22px; }
    .imp-flip { animation: imp-cardflip .7s both; }
    .imp-board { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; }
    .imp-col { flex: 1 0 118px; max-width: 170px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 14px; background: var(--soft); text-align: center; scroll-snap-align: start; transition: background .3s, outline-color .3s; outline: 2px solid transparent; }
    .imp-col.speaking { outline-color: var(--accent); animation: imp-glow 1.4s infinite; }
    .imp-col.voted { outline-color: var(--button); }
    .imp-col.out { background: #e5484d22; outline-color: #e5484d; }
    .imp-col.me .imp-col-name { color: var(--accent); }
    .imp-col-face { font-size: 40px; line-height: 1.1; }
    .imp-col.speaking .imp-col-face { animation: imp-pulse 1.2s infinite; }
    .imp-col-name { font-size: 14px; overflow-wrap: anywhere; }
    .imp-col-pts { position: relative; font-size: 11px; color: var(--muted); }
    .imp-col-pts .imp-plus { right: -26px; top: -6px; }
    .imp-col-clues { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; width: 100%; }
    .imp-col-clues li { font-size: 13px; font-weight: 600; padding: 4px 6px; border-radius: 8px; background: var(--surface); overflow-wrap: anywhere; }
    .imp-col-clues li.muted { color: var(--muted); font-weight: 400; }
    .imp-col-votes { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 30px; width: 100%; padding: 4px; border-radius: 8px; background: var(--bg); }
    .imp-voter { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: var(--raised); font-size: 15px; }
    .imp-drop { animation: imp-dropin .45s both; }
    .imp-col-vote { margin-top: auto; min-height: 36px; font-size: 12px; }
    .imp-col-vote[aria-pressed="true"] { background: #30a46c; }
    .imp-col-role { width: 100%; display: grid; gap: 2px; padding: 6px; border-radius: 8px; font-size: 12px; }
    .imp-col-role.crew { background: #30a46c22; color: #30a46c; }
    .imp-col-role.impostor { background: #e5484d22; color: #e5484d; }
    .imp-col-role.ghost { background: #c6a8ff33; color: #9b7be0; }
    @media (max-width: 700px) { .imp-top { grid-template-columns: 1fr; } .imp-col { flex-basis: 104px; } }
    /* Menu déroulant « Joueurs » dans la barre du patron */
    .host-strip { position: relative; }
    .strip-players { position: static; }
    .strip-players summary { list-style: none; width: auto; padding: 0 14px; min-height: 36px; background: var(--surface); }
    .strip-players summary::-webkit-details-marker { display: none; }
    .strip-players-box { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; max-height: 60vh; overflow-y: auto; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 18px 40px #00000055; color: var(--ink); font-weight: 400; }

    /* Imposteur : ta carte centrée au-dessus du plateau */
    .imp-top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .imp-mycard { width: min(100%, 460px); justify-items: center; text-align: center; }
    .imp-mycard .imp-word { font-size: 38px; }
    .imp-status { justify-items: center; width: 100%; }
    .imp-form { width: min(100%, 460px); }
    .imp-status > .play-button, .imp-status > .action-button { width: min(100%, 460px); }
    /* Chat replié en bulle pendant la partie */
    .chat-close { display: none; width: 32px; height: 32px; margin-left: 8px; }
    .chat-bubble { position: fixed; right: 22px; bottom: 22px; z-index: 46; width: 58px; height: 58px; border: 0; border-radius: 50%; background: var(--button); color: white; font-size: 26px; box-shadow: 0 10px 28px #00000066; transition: transform .2s; }
    .chat-bubble:hover { transform: scale(1.08); }
    .chat-unread { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: #e5484d; color: white; font: 700 12px/22px "DM Sans",sans-serif; animation: imp-pulse 1.2s infinite; }
    body.in-game .room-layout { grid-template-columns: minmax(0, 1fr); }
    body.in-game .room-side { position: static; }
    body.in-room .chat { display: none; position: fixed; right: 22px; bottom: 92px; z-index: 45; width: min(380px, calc(100vw - 32px)); box-shadow: 0 18px 48px #00000077; animation: imp-in .25s both; }
    body.in-room.chat-open .chat { display: block; }
    body.in-room .chat .chat-log { height: min(45vh, 360px); }
    body.in-room .chat-close { display: grid; }
    body.in-room .chat-motto { display: none; }
    @media (max-width: 760px) {
      .chat-bubble { bottom: 86px; right: 16px; }
      body.in-room .chat { bottom: 156px; right: 16px; }
    }
    /* ───── Imposteur, déroulé KCorp : mot en grand, plateau, zone d'action en bas ───── */
    .imp-head { margin-bottom: 6px; }
    .imp-top { display: grid; justify-items: center; text-align: center; gap: 8px; margin-bottom: 18px; }
    .imp-bigword { display: grid; justify-items: center; gap: 4px; }
    .imp-bigword strong { font: 800 clamp(34px, 5vw, 56px)/1.05 "Outfit",sans-serif; color: var(--accent); letter-spacing: -1px; text-transform: uppercase; overflow-wrap: anywhere; }
    .imp-bigword.ghost strong { color: #9b7be0; text-transform: none; font-size: clamp(26px, 4vw, 40px); }
    .imp-bigword span { font-size: 12px; color: var(--muted); }
    .imp-turn { font: 600 18px "Outfit",sans-serif; }
    .imp-reveal-lines { display: grid; gap: 4px; font-size: 15px; }
    .imp-reveal-lines strong { font-family: "Outfit",sans-serif; }
    .imp-reveal-lines strong.good { color: #30a46c; }
    .imp-reveal-lines strong.bad { color: #e5484d; }
    .imp-bottom { display: grid; justify-items: center; gap: 8px; margin-top: 16px; text-align: center; }
    .imp-bottom > .play-button, .imp-bottom > .action-button { width: min(100%, 320px); }
    .imp-count { font-size: 11px; color: var(--muted); }
    .imp-voter.pending { background: #e5484d; }
    .imp-voter.locked { background: #30a46c; }
    .imp-col-ghost { min-height: 32px; font-size: 11px; width: 100%; }
    .imp-col-ghost.picked { display: block; padding: 6px; border-radius: 8px; background: #c6a8ff33; color: #9b7be0; font-weight: 600; }
    .imp-col-score { font: 800 24px "Outfit",sans-serif; }
    .imp-col-gain { font-size: 11px; font-weight: 600; color: #30a46c; line-height: 1.3; }
    .imp-lock:disabled { opacity: .5; }
    /* ───── Avatars dessinés (Toon Head, CC BY 4.0) ───── */
    .face { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 22%; user-select: none; }
    .face.emoji { display: grid; place-items: center; border-radius: 0; }
    .face.small { display: inline-block; width: 22px; height: 22px; vertical-align: middle; margin-right: 6px; }
    .profile-avatar { overflow: hidden; padding: 0; }
    .profile-avatar .face.emoji { font-size: 21px; }
    .player-avatar { width: 38px; height: 38px; font-size: 24px; display: grid; place-items: center; }
    .msg-avatar { width: 32px; height: 32px; flex-shrink: 0; font-size: 22px; display: grid; place-items: center; }
    .imp-col-face { width: 64px; height: 64px; display: grid; place-items: center; font-size: 40px; }
    .imp-voter { width: 30px; height: 30px; padding: 2px; overflow: hidden; }
    .imp-voter .face { border-radius: 6px; }
    .imp-step-face { width: 64px; height: 64px; display: grid; place-items: center; font-size: 40px; }
    .imp-inline { display: inline-flex; align-items: center; }
    .credits { font-size: 11px; color: var(--muted); }
    .credits a { text-decoration: underline; }
    /* ───── Retours d'Yvan 28/11 : menu caché en partie, joueurs centrés, indices plus gros ───── */
    /* Room et page « Jouer » (Yvan 29/11) : menu replié en icônes (comme l'écran moyen), en-tête et commandes de la room cachés */
    @media (min-width: 761px) {
      body:is(.in-room, [data-page="play"]) { --sidebar: 78px; }
      body:is(.in-room, [data-page="play"]):not(.rail-open) .sidebar { align-items: center; padding-inline: 12px; }
      body:is(.in-room, [data-page="play"]):not(.rail-open) :is(.brand > span:last-child,.nav-label,.nav-item > span,.sidebar-note,.theme-text,.switch,.palette-pick) { display: none !important; }
      body:is(.in-room, [data-page="play"]):not(.rail-open) .side-nav { width: 100%; margin-top: 40px; }
      body:is(.in-room, [data-page="play"]):not(.rail-open) .nav-item { justify-content: center; padding: 13px; }
      body:is(.in-room, [data-page="play"]):not(.rail-open) .sidebar-bottom { width: 100%; }
      body:is(.in-room, [data-page="play"]):not(.rail-open) .theme-button { justify-content: center; }
      body:is(.in-room, [data-page="play"]):not(.rail-open) .sidebar-head { flex-direction: column; gap: 14px; }
      body:is(.in-room, [data-page="play"]) .rail-toggle { display: grid; }
    }
    body.in-game .topbar, body.in-game .room-head > div:first-child, body.in-game .room-head-actions > :not(#leave-room) { display: none; }
    body.in-game main { padding-top: 14px; }
    body.in-game .room-head { margin-bottom: 8px; }
    body.in-game .room-head-actions, body.in-game #leave-room { width: auto; }
    body.in-game #leave-room { min-height: 34px; }
    .imp-col:first-child { margin-left: auto; } /* centre les colonnes sans casser le défilement */
    .imp-col:last-child { margin-right: auto; }
    .imp-col { max-width: 200px; }
    .imp-col-clues { gap: 6px; }
    .imp-col-clues li { font-size: 18px; font-weight: 700; padding: 7px 8px; line-height: 1.25; }
    .imp-col-clues li.muted { font-size: 14px; }
    @media (max-width: 700px) { .imp-col-clues li { font-size: 16px; } }
    /* ───── Bouton « Signaler un bug » ───── */
    .bug-button { width: 100%; border: 0; background: transparent; cursor: pointer; margin-bottom: 8px; }
    .bug-emoji { font-weight: 400; font-size: 16px; line-height: 1; }
    #bug-text { resize: vertical; font: inherit; margin: 8px 0; }

    @keyframes neon-jelly { 30% { transform: scale(1.1, .9) translateY(3px); } 60% { transform: scale(.95, 1.07) translateY(-5px); } }

    /* ═════════ Salon de la room (demande d'Yvan du 28/11) : 3 colonnes dans la hauteur de l'écran ═════════
       joueurs (étroit) · réglages du patron au centre · chat ; pas de barre du haut, le moins de défilement possible. */
    body.in-room .topbar { display: none; }
    body.in-room main { padding-top: 16px; padding-bottom: 12px; }
    body.in-room .room-head { margin-bottom: 10px; gap: 12px; }
    body.in-room .room-game { font-size: 24px; }
    body.in-room .room-status { margin-top: 0; font-size: 12px; }
    body.in-room .room-code-box { flex-direction: row; gap: 10px; padding: 4px 12px; }
    body.in-room .room-code { font-size: 22px; }
    body.in-room .room-head-actions .play-button { min-height: 38px; }
    body.in-room .room-message { min-height: 0; margin-bottom: 6px; }
    body.in-room .room-message:empty { display: none; }
    .player-menu { position: relative; margin-left: auto; }
    .player-menu summary { list-style: none; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; color: var(--muted); }
    .player-menu summary::-webkit-details-marker { display: none; }
    .player-menu summary:hover, .player-menu[open] summary { background: var(--accent-soft); color: var(--accent); }
    .player-menu .player-actions { position: absolute; right: 0; top: 34px; z-index: 30; display: grid; gap: 4px; min-width: 170px; padding: 6px;
      background: var(--raised); border: 2px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
    .player-menu .player-actions button { width: 100%; text-align: left; }
    .waiting-panel { text-align: center; display: grid; place-items: center; align-content: center; gap: 10px; }
    .waiting-emoji { font-size: 54px; display: inline-block; animation: neon-jelly 1.8s ease-in-out infinite; }
    .waiting-panel h2 { font-family: "Bungee", sans-serif; font-size: 26px; color: var(--accent); text-shadow: 0 0 14px rgb(0 217 255 / var(--glow)); }
    .waiting-panel p { color: var(--muted); }
    /* Barre du haut (VicTeams / Gaming zone, BÊTA, profil) retirée partout sur PC et tablette (Yvan 28/11).
       Sur téléphone elle reste : elle porte le bouton du menu. */
    @media (min-width: 761px) { .topbar { display: none; } main { padding-top: 22px; } }

    /* ═════════ Épuration (tablette d'Yvan 28/11 : 853 × ~480 px utiles) ═════════ */
    /* Dans une room : menu de gauche réduit en icônes (Yvan 29/11), pas de pied de page ; sur téléphone, menu dans ☰. */
    body.in-room footer { display: none; }
    @media (min-width: 761px) {
      body:is(.in-room, [data-page="play"]):not(.rail-open) .sub-nav { margin: 2px 0; padding: 0; border: 0; }
      body:is(.in-room, [data-page="play"]):not(.rail-open) .sub-item { justify-content: center; }
      body:is(.in-room, [data-page="play"]):not(.rail-open) .socials { gap: 4px; }
      body:is(.in-room, [data-page="play"]):not(.rail-open) .social { width: 26px; height: 26px; }
    }
    /* Room sur tablette : en-tête et champs plus compacts. */
    @media (min-width: 761px) and (max-width: 1279px) {
      body.in-room .text-input { min-height: 38px; padding: 7px 10px; }
      body.in-room main { padding: 10px 16px; }
      body.in-room .room-head { margin-bottom: 8px; }
      body.in-room .room-head-actions .play-button { min-height: 36px; padding: 0 12px; }
    }
    /* Écran peu haut (tablette à l'horizontale) : plateau de jeu plus compact. */
    @media (max-height: 700px) {
      body.in-game main { padding-top: 8px; }
      body.in-game .game-area { padding: 12px 16px; }
      body.in-game .imp-head { margin-bottom: 0; }
      body.in-game .imp-top { gap: 2px; margin-bottom: 10px; }
      body.in-game .imp-bigword strong { font-size: clamp(30px, 4vw, 42px); }
      body.in-game .imp-bigword:not(.ghost) > :not(strong) { display: none; }
      body.in-game .imp-turn { font-size: 16px; }
      body.in-game .imp-col { padding: 8px 6px; gap: 4px; }
      body.in-game .imp-col-face { width: 48px; height: 48px; font-size: 32px; }
      body.in-game .imp-col-clues li { font-size: 15px; padding: 4px 6px; }
    }
    /* Tablette : en-tête de la room sur une seule ligne (boutons en icônes), titre du patron sur une ligne. */
    @media (min-width: 761px) and (max-width: 1279px) {
      body.in-room .room-head { flex-wrap: nowrap; }
      body.in-room .room-status { display: none; }
      body.in-room .room-head-actions { flex-wrap: nowrap; }
      body.in-room .room-head-actions .play-button span { display: none; }
      body.in-room .room-head-actions .play-button { width: 42px; padding: 0; font-size: 16px; }
      body.in-room .room-code-box { padding: 2px 10px; }
      body.in-room .room-kicker { display: none; }
    }
    /* Pendant qu'on tape son indice sur un écran peu haut (clavier de tablette/téléphone ouvert) :
       on cache tout le superflu et on met la case juste sous le mot, les indices des autres en dessous. */
    @media (max-height: 560px) {
      body:has(#imp-clue:focus) :is(.room-head, .host-strip, .imp-head, .chat-bubble, .imp-turn, .imp-count) { display: none; }
      body:has(#imp-clue:focus) main { padding-top: 4px; }
      body:has(#imp-clue:focus) .game-area { display: flex; flex-direction: column; padding: 8px 12px; }
      body:has(#imp-clue:focus) .imp-top { order: 1; margin-bottom: 6px; }
      body:has(#imp-clue:focus) .imp-bigword strong { font-size: 26px; }
      body:has(#imp-clue:focus) .imp-bottom { order: 2; margin-bottom: 8px; }
      body:has(#imp-clue:focus) .imp-board { order: 3; }
      body:has(#imp-clue:focus) .imp-col-face { width: 34px; height: 34px; font-size: 22px; }
      body:has(#imp-clue:focus) .imp-col { padding: 6px 4px; }
    }
    /* Bouton « Quitter » : jamais écrasé, texte visible pendant la partie (Yvan 28/11, tablette). */
    body.in-room .room-head-actions #leave-room { min-height: 40px; flex-shrink: 0; }
    body.in-game .room-head-actions #leave-room { width: auto; padding: 0 16px; font-size: 12px; }
    body.in-game .room-head-actions #leave-room span { display: inline; }

    /* ═════════ Épuré (Yvan 28/11) : thème d'origine, sans les petits textes d'ambiance ═════════ */
    .waiting-panel h2 { font-family: "Outfit", sans-serif; text-shadow: none; }

    /* ═════════ Accueil : les jeux en pleine largeur ; le formulaire s'ouvre en fenêtre après le clic sur un jeu ═════════ */
    #home .dashboard { grid-template-columns: minmax(0, 1fr); }
    #home .game-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
    #home .room-column { display: none; }
    /* Pages (Yvan 29/11) : accueil / « Jouer » (formulaire en page, plus en fenêtre) / page d'un jeu */
    body[data-page="play"] #home > :not(.dashboard), body[data-page="play"] #jeux,
    body[data-page="game"] #home > :not(.game-page) { display: none; }
    body[data-page="play"] #home .room-column { display: grid; gap: 16px; position: static; width: min(460px, 100%); margin: 8px auto 0; animation: imp-in .2s both; }
    .back-link { display: inline-block; margin-bottom: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
    .back-link:hover { color: var(--accent); }
    .game.clickable { cursor: pointer; }
    .game .play-button:disabled { pointer-events: none; }
    .game-page { max-width: 980px; margin: 0 auto; animation: imp-in .2s both; }
    .game-page-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 26px; align-items: start; }
    .game-page-art .art { border-radius: 14px; min-height: 300px; }
    .game-page h1 { font-family: "Outfit", sans-serif; font-size: 30px; margin-bottom: 10px; }
    .game-page h2 { font-size: 16px; margin: 20px 0 10px; }
    .game-page .categories { display: flex; flex-wrap: wrap; gap: 6px; }
    .game-page-pitch { color: var(--muted); margin: 12px 0; font-size: 14px; }
    .game-rules { display: grid; gap: 10px; padding-left: 20px; font-size: 14px; line-height: 1.5; }
    .game-page-play { margin-top: 22px; width: 100%; justify-content: center; }
    .game-page-play.disabled { opacity: .5; cursor: not-allowed; }
    @media (max-width: 760px) { .game-page-card { grid-template-columns: 1fr; } .game-page-art .art { min-height: 220px; } }
    /* Menu « Jeux » dépliable */
    .nav-group > summary { cursor: pointer; list-style: none; }
    .nav-group > summary::-webkit-details-marker { display: none; }
    .nav-arrow { transition: transform .2s; }
    .nav-group[open] .nav-arrow { transform: rotate(180deg); }
    .sub-nav { display: grid; gap: 2px; margin: 2px 0 4px 14px; padding-left: 8px; border-left: 1px solid var(--border); }
    .sub-item { min-height: 38px; padding: 8px 10px; font-size: 12.5px; }
    .sub-emoji { width: 20px; text-align: center; font-size: 15px; }
    /* Réseaux sociaux (sous Clair/Sombre) */
    .socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 10px; }
    .social { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; background: var(--soft); color: var(--muted); transition: background .2s, color .2s; }
    .social svg { width: 17px; height: 17px; fill: currentColor; }
    a.social:hover { background: var(--accent-soft); color: var(--accent); }
    span.social { opacity: .45; }
    /* Galerie d'avatars : un seul, en grand, flèches de part et d'autre */
    .avatar-gallery { display: flex; align-items: center; justify-content: center; gap: 14px; }
    .avatar-stage { width: 120px; height: 120px; border-radius: 22px; background: var(--soft); border: 2px solid var(--accent); padding: 6px; touch-action: pan-y; user-select: none; }
    .avatar-stage .avatar-big { width: 100%; height: 100%; border-radius: 16px; display: block; animation: imp-in .15s both; }
    .avatar-nav { width: 42px; height: 42px; font-size: 26px; line-height: 1; }
    .avatar-count { text-align: center; color: var(--muted); font-size: 11px; margin: 6px 0 14px; }
    .room-game-name { font-weight: 600; color: var(--accent); }
    .game-page .category { margin: 0; }
    @media (min-width: 761px) and (max-width: 1000px) {
      body:not(.rail-open) .sub-nav { margin: 2px 0; padding: 0; border: 0; }
      body:not(.rail-open) .sub-item { justify-content: center; }
      body:not(.rail-open) .socials { gap: 4px; }
      body:not(.rail-open) .social { width: 26px; height: 26px; }
    }
    .game.playable .play-button { background: var(--button); color: #fff; }

    /* ═════════ Salon : chat en bulle (Yvan 28/11) → joueurs + réglages seulement ═════════ */
    body.in-room:not(.in-game) .chat { display: none !important; }
    body.in-room.chat-open:not(.in-game) .chat { display: flex !important; flex-direction: column; position: fixed; right: 22px; bottom: 92px; z-index: 45;
      width: min(380px, calc(100vw - 32px)); height: auto; padding: 16px; box-shadow: 0 18px 48px #00000077; }
    body.in-room.chat-open:not(.in-game) .chat .chat-log { flex: none; height: min(45dvh, 360px); }
    /* Formulaire créer/rejoindre sur écran peu haut (tablette à l'horizontale) : 2 colonnes, sans défilement. */
    @media (max-height: 640px) and (min-width: 700px) {
      body[data-page="play"] #home .room-column { width: min(780px, 100%); }
      body[data-page="play"] #home .room-column > .room-area { padding: 16px 20px; }
      body[data-page="play"] #home .room-column .aside-tip, body[data-page="play"] #home .room-top p:not(.room-game-name) { display: none; }
      #home .room-top h2 { font-size: 18px; }
      #home .tabs { margin: 10px 0; }
      #home .room-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; }
      #home .room-form > * { grid-column: 1; }
      #home .room-form > .avatar-group { grid-column: 2; grid-row: 1 / span 4; }
      #home .field { margin-bottom: 10px; }
    }

    /* ═════════ Salon façon KCorp, en plus joli (Yvan 29/11) : réglages à gauche, joueurs (avatar + pseudo) à droite ═════════ */
    .face:not(.emoji) { background: var(--accent-soft); }               /* même fond pour tous les avatars */
    @media (min-width: 761px) {
      body.in-room:not(.in-game) .room-main, body.in-room:not(.in-game) .room-side { display: contents; }
      body.in-room:not(.in-game) .room-layout { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); grid-template-areas: "center players" "center rules"; grid-template-rows: auto 1fr;
        max-width: 1100px; margin-inline: auto; gap: 20px; align-items: start; }
      body.in-room:not(.in-game) .host-panel, body.in-room:not(.in-game) .waiting-panel { grid-area: center; }
      body.in-room:not(.in-game) .players-area { grid-area: players; }
      body.in-room:not(.in-game) .rules-area { grid-area: rules; }   /* règles sous les joueurs (Yvan 29/11) */
    }
    body.in-room:not(.in-game) .host-panel h2 { font-size: 17px; margin-bottom: 12px; }
    .rules-area h2 { font-size: 17px; margin-bottom: 12px; }
    .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
    .settings-grid .field { margin: 0; }
    .settings-grid label { font-size: 11px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .settings-grid .check { align-self: end; margin: 0; padding-bottom: 8px; font-size: 12px; white-space: normal; overflow: visible; }
    .stepper { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; height: 38px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); overflow: hidden; }
    .stepper output { text-align: center; font-weight: 700; font-size: 14px; }
    .step-button { height: 100%; border: 0; background: var(--soft); color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; }
    .step-button:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
    .step-button:disabled { opacity: .3; cursor: default; }
    .settings-grid select.text-input { min-height: 38px; height: 38px; padding: 0 10px; }
    body.in-room .player-avatar .face.emoji { font-size: 44px; border-radius: 20px; background: var(--accent-soft); }
    @media (max-width: 1279px) { body.in-room:not(.in-game) .host-panel h2 br { display: none; } body.in-room:not(.in-game) .host-panel h2 { margin-bottom: 8px; } }
    .host-start { width: 100%; justify-content: center; margin-top: 16px; min-height: 46px; font-size: 15px; }
    .room-options { margin-top: 12px; }
    .room-options summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 600; }
    .room-options-box { display: grid; gap: 10px; margin-top: 10px; }
    .room-options-box .field { margin: 0; }
    /* Joueurs : une grille d'avatars, le pseudo dessous, rien d'autre */
    body.in-room .player-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 14px 8px; }
    body.in-room .player { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0; background: none; border-radius: 0; flex-wrap: nowrap; }
    body.in-room .player-avatar { position: relative; width: 74px; height: 74px; }
    body.in-room .player-avatar .face { border-radius: 20px; }
    body.in-room .player.me .player-avatar .face { outline: 2px solid var(--accent); outline-offset: 2px; }
    body.in-room .player.offline { opacity: .45; }
    body.in-room .player-name { flex: none; min-width: 0; max-width: 100%; font-size: 13px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .player-tag { position: absolute; font-size: 18px; line-height: 1; filter: drop-shadow(0 1px 2px #0008); }
    .player-tag.tag-0 { top: -9px; left: -6px; transform: rotate(-18deg); }
    .player-tag.tag-1 { bottom: -4px; left: -6px; }
    .player-tag.tag-2 { bottom: -4px; right: -6px; }
    body.in-room .player-menu { position: absolute; top: -6px; right: 0; margin: 0; }
    body.in-room .player-menu summary { width: 26px; height: 26px; background: var(--raised); }
    @media (max-height: 640px) and (min-width: 761px) {
      body.in-room .player-avatar { width: 60px; height: 60px; }
      body.in-room .player-list { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px 6px; }
      .settings-grid { gap: 6px 12px; }
      .host-start { margin-top: 10px; min-height: 40px; }
      .room-options { margin-top: 8px; }
    }

    /* Connexion Discord (facultative) */
    .discord-box { display: grid; gap: 4px; margin: 0 0 14px; }
    @media (max-height: 640px) and (min-width: 700px) { .discord-box { margin-bottom: 10px; } .discord-hint { display: none; } }
    .discord-login, .discord-on { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
    .discord-login { justify-self: start; padding: 8px 12px; border-radius: 9px; background: #5865f2; color: #fff; }
    .discord-login:hover { background: #4752c4; }
    .discord-login svg, .discord-on svg { width: 16px; height: 16px; fill: currentColor; }
    .discord-on { color: #7983f5; }
    .discord-hint { font-size: 11px; color: var(--muted); }
    .link-button { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
    #nickname[readonly] { opacity: .8; cursor: not-allowed; }
    .discord-badge { display: inline-block; width: 13px; height: 13px; fill: #7983f5; vertical-align: -2px; margin-right: 4px; }

    /* Adresse du site en haut à droite, quand le menu est réduit (pub dans les streams, Yvan 29/11) */
    .site-tag { display: none; position: fixed; top: 6px; right: 16px; z-index: 50; font: 800 13px/1 "Outfit", sans-serif; letter-spacing: .02em; color: var(--accent); opacity: .9; }
    @media (min-width: 761px) {
      body:is(.in-room, [data-page="play"]) .site-tag { display: block; }
      body:is(.in-room, [data-page="play"]) main { padding-top: 30px; }
    }
    @media (min-width: 761px) and (max-width: 1000px) {
      .site-tag { display: block; }
      main { padding-top: 30px; }
    }

    /* Bouton ☰ du menu réduit (Yvan 29/11) : déplie le menu complet par-dessus la page */
    .rail-toggle { display: none; width: 40px; height: 40px; }
    body.rail-open .sidebar { width: 240px; align-items: stretch; box-shadow: 0 0 0 100vmax #0006, 0 0 40px #0008; z-index: 120; overflow-y: auto; }

    /* Contours des cartouches plus discrets (Yvan 29/11 : « trop prononcés ») : même trait, couleur à moitié fondue dans le fond */
    .game, .room-area { border-color: color-mix(in srgb, var(--border) 50%, transparent); }

    /* Page « Jouer » sur téléphone / tablette en hauteur : formulaire sur une seule colonne (Yvan 29/11 : il fallait glisser l'écran).
       (La tablette à l'horizontale, peu haute, garde ses 2 colonnes : règle « max-height: 640px » plus haut.) */
    @media (max-width: 900px) and (min-height: 641px), (max-width: 699px) {
      #home .room-form { display: block; }
      #home .room-top { display: block; }
      #home .tabs { min-width: 0; margin: 16px 0; }
    }

    /* Room sur téléphone : de la place sous le contenu pour la barre du bas (Yvan 29/11 : le dernier joueur était caché dessous) */
    @media (max-width: 760px) { body.in-room main { padding-bottom: 95px; } }

    /* Haut de la room sur téléphone : 4 boutons rangés sur 2 lignes au lieu de 4 (Yvan 29/11) */
    @media (max-width: 760px) {
      body.in-room:not(.in-game) .room-head-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
      body.in-room:not(.in-game) .room-head-actions > * { width: auto; min-width: 0; min-height: 42px; }
      body.in-room:not(.in-game) .room-head-actions .play-button { padding: 0 8px; font-size: 12px; line-height: 1.2; text-align: center; }
    }

    /* ═════════ Cultur'G (29/11, style VicTeams ; refait aéré et vertical, comme la KCorp, à la demande d'Yvan) ═════════ */
    /* pleine largeur, comme le reste du site (Yvan 29/11 : « concentré au centre alors que le reste prend toute la largeur ») */
    .cg { display: grid; gap: 28px; width: 100%; padding: 8px clamp(0px, 2vw, 24px) 24px; }
    .cg-answer, .cg-choices, .cg-order, .cr-send { width: min(900px, 100%); justify-self: center; }
    .cg-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
    .cg-theme { padding: 7px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }
    .cg-count { color: var(--muted); font-size: 13px; font-weight: 600; }
    .cg-timer { margin-left: auto; font: 800 20px "Outfit", sans-serif; }
    .cg-timer.hurry { color: #e5484d; }
    .cg-card { display: grid; justify-items: center; gap: 14px; padding: clamp(28px, 5vw, 52px) clamp(20px, 4vw, 44px); border-radius: 24px; text-align: center; color: #fff;
      background: linear-gradient(160deg, #2f6fed, #1e4fb8 60%, #5b4fd8); box-shadow: 0 20px 50px #2f6fed2e; animation: imp-in .35s both; }
    .cg-text { font: 700 clamp(20px, 2.8vw, 30px)/1.35 "Outfit", sans-serif; max-width: 30ch; }
    .cg-sub { font-size: 14px; opacity: .85; }
    .cg-letter { font: 900 clamp(84px, 14vw, 130px)/1 "Outfit", sans-serif; text-shadow: 0 10px 30px #0005; animation: imp-zoom .5s both; }
    .cg-answer { display: flex; gap: 12px; }
    .cg-answer .text-input { flex: 1; min-width: 0; font-size: 18px; min-height: 56px; padding: 0 18px; }
    .cg-send { min-height: 56px; padding: 0 26px; width: auto; flex: none; }
    .cg-choices { display: grid; gap: 12px; }
    .cg-choice { text-align: left; min-height: 56px; padding: 14px 18px; border-radius: 16px; border: 2px solid var(--border); background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 600; }
    .cg-choice:hover { border-color: var(--accent); background: var(--accent-soft); }
    .cg-order { display: grid; gap: 14px; }
    .cg-picked { margin: 0; padding-left: 26px; display: grid; gap: 8px; min-height: 10px; }
    .cg-items { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
    .cg-item { padding: 12px 16px; border-radius: 14px; border: 2px dashed var(--border); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; }
    .cg-item.picked { border-style: solid; border-color: var(--accent); background: var(--accent-soft); width: 100%; text-align: left; }
    /* petit bac : une colonne, le nom de la catégorie au-dessus de sa case */
    .cg-bac-form { display: grid; gap: 6px; width: min(480px, 100%); margin: 0 auto; }
    .cg-bac-row { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
    .cg-bac-form .text-input { min-height: 50px; font-size: 17px; padding: 0 16px; }
    .cg-bac-form .cg-send { width: 100%; margin-top: 18px; }
    .cg-sent { text-align: center; font-weight: 700; font-size: 16px; color: var(--accent); }
    .cg-cancel { width: auto; justify-self: center; padding: 0 18px; font-size: 13px; }
    .cg-hint { text-align: center; color: var(--muted); font-size: 13px; }
    .cg-who { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
    .cg-face { width: 44px; height: 44px; display: inline-grid; flex: none; }
    .cg-who .cg-face { opacity: .35; filter: grayscale(1); transition: opacity .3s, filter .3s, transform .3s; }
    .cg-who .cg-face.done { opacity: 1; filter: none; transform: translateY(-3px); }
    .cg-stop { justify-self: center; width: auto; padding: 0 20px; }
    .cg-solution { display: grid; justify-items: center; gap: 6px; padding: 18px; border-radius: 18px; background: var(--accent-soft); animation: imp-zoom .4s both; }
    .cg-solution-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
    .cg-solution strong { font: 800 24px "Outfit", sans-serif; color: var(--accent); text-align: center; }
    .cg-correction { display: grid; gap: 20px; }
    .cg-answers { display: grid; gap: 10px; }
    .cg-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 16px; background: var(--surface); }
    .cg-name { font-weight: 700; min-width: 80px; }
    .cg-said { flex: 1; min-width: 120px; font-size: 16px; }
    .cg-mark { width: 40px; height: 40px; border-radius: 50%; border: 0; font-size: 18px; font-weight: 900; color: #fff; flex: none; }
    .cg-mark.ok { background: #2fb870; } .cg-mark.ko { background: #e5484d; }
    .cg-mark:disabled { cursor: default; }
    .cg-words { display: grid; gap: 6px; flex-basis: 100%; }
    .cg-word { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-radius: 12px; background: var(--soft); font-size: 15px; }
    .cg-word small { color: var(--muted); font-size: 11px; width: 110px; flex: none; }
    .cg-word b { flex: 1; }
    .cg-word .cg-mark { width: 30px; height: 30px; font-size: 14px; }
    .cg-word.empty { opacity: .45; }
    .cg-foot { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
    .cg-foot .action-button { width: auto; padding: 0 26px; }
    .cg-flag { font-size: 12px; width: auto; padding: 0 16px; }
    .cg-board summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: 13px; }
    .cg-scores, .cg-podium { display: grid; gap: 8px; margin-top: 10px; }
    .cg-score { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; background: var(--surface); }
    .cg-score b { margin-left: auto; }
    .cg-podium .cg-score { padding: 14px 18px; font-size: 17px; animation: imp-in .4s both; }
    .cg-podium .r1 { background: linear-gradient(90deg, #ffd36b55, var(--surface)); font-size: 20px; }
    .cg-rank { width: 30px; text-align: center; font-weight: 800; }
    .cg-final { text-align: center; font: 800 30px "Outfit", sans-serif; }
    .chips { display: flex; flex-wrap: wrap; gap: 6px; }
    .chip { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; }
    .chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
    .settings-grid .field-wide { grid-column: 1 / -1; }
    /* Cultur'G : épreuves à images */
    .cg-img { display: block; margin: 4px auto 0; max-width: 100%; max-height: min(46vh, 420px); border-radius: 16px; box-shadow: 0 10px 30px #0005; background: #fff; }
    .cg-quatre { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px auto 0; width: min(400px, 100%); }
    .cg-quatre img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
    .cg-lines { margin: 16px auto 0; max-width: 560px; white-space: pre-line; font: italic 600 17px/1.5 "DM Sans", sans-serif; opacity: .95; }
    .cg-credit { margin-top: 8px; font-size: 10px; opacity: .75; }

    /* Volume des sons (à côté du minuteur) et barre de fin de partie, communs à tous les jeux (Yvan 29/11) */
    .volume { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 4px 10px; border-radius: 999px; background: var(--soft); flex: none; }
    .volume-icon { font-size: 15px; }
    .volume input { width: 80px; accent-color: var(--button); }
    .replay-bar { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
    .replay-bar .action-button, .replay-bar .play-button { width: auto; padding: 0 26px; min-height: 48px; }
    .game-wait { color: var(--muted); font-size: 14px; text-align: center; }

    /* Code de la route au format de l'examen (Yvan 29/11) : photo vue du conducteur + bandeau bleu foncé, OUI … A / NON … B */
    .cr { border-radius: 18px; overflow: hidden; box-shadow: 0 18px 44px #0006; animation: imp-in .35s both; width: min(980px, 100%); justify-self: center; }
    .cr-photo { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
    .cr-panel { background: #0b2a5b; color: #fff; padding: 18px clamp(16px, 4vw, 40px) 16px; display: grid; gap: 6px; }
    .cr-stem { font: 800 clamp(18px, 2.2vw, 24px)/1.3 "DM Sans", sans-serif; }
    .cr-statement { margin-top: 8px; padding-left: clamp(0px, 4vw, 48px); font: 700 clamp(16px, 2vw, 21px)/1.3 "DM Sans", sans-serif; }
    .cr-line { display: flex; gap: clamp(16px, 8vw, 90px); padding-left: clamp(12px, 8vw, 110px); flex-wrap: wrap; }
    .cr-choice { display: flex; align-items: center; gap: 8px; font: 600 clamp(15px, 1.8vw, 20px) "DM Sans", sans-serif; color: #9cc3ff; min-width: 180px; }
    .cr-dots { flex: 1; min-width: 50px; border-bottom: 2px dotted #9cc3ff88; transform: translateY(-4px); }
    .cr-letter { width: 40px; height: 40px; border-radius: 8px; border: 2px solid #ffffffaa; background: #00000055; color: #fff; font: 800 18px "DM Sans", sans-serif; }
    .cr-letter:not(:disabled):hover { border-color: #fff; background: #ffffff22; }
    .cr-letter.on { background: #ffd34d; color: #0b2a5b; border-color: #ffd34d; }
    .cr-letter:disabled { cursor: default; }
    .cr-letter.good { background: #2fb870; border-color: #2fb870; }
    .cr-tick { color: #5fe08f; font-size: 22px; font-weight: 900; }
    .cr-many { justify-self: end; font-size: 12px; opacity: .8; margin-top: 6px; }
    .cr-send { min-height: 52px; }

    /* Mention de la modération sous le chat (Yvan 29/11 : surveillance annoncée = légale) */
    .chat-notice { margin-top: 6px; font-size: 10.5px; line-height: 1.35; color: var(--muted); }

    /* ═════════ Géographie (Yvan 29/11) : drapeau, silhouette, carte du monde ═════════ */
    .geo-flag { width: min(320px, 70vw); aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 30px #0004; background: #fff; }
    .geo-big { font: 800 clamp(30px, 5vw, 48px)/1.1 "Outfit", sans-serif; text-shadow: 0 6px 20px #0004; }
    .geo-shape { width: min(260px, 60vw); height: auto; fill: #fff; filter: drop-shadow(0 8px 20px #0005); }
    .geo-map { width: 100%; overflow-x: auto; border-radius: 16px; background: #0b2a5b; border: 1px solid var(--border); }
    .geo-map-inner { position: relative; min-width: 680px; width: min(100%, calc((100vh - 400px) * 2.48)); margin: auto; }
    .geo-k-map { padding: 16px 20px; gap: 4px; }
    .geo-k-map .cg-text { font-size: 16px; }
    .geo-k-map .geo-big { font-size: clamp(24px, 3.5vw, 34px); }
    .geo-map-inner img { display: block; width: 100%; height: auto; user-select: none; }
    .geo-map.pick .geo-map-inner { cursor: crosshair; }
    .geo-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
    .geo-target { fill: #2fa36b; stroke: #fff; stroke-width: .8; }
    .geo-pin circle { fill: #f5a623; stroke: #fff; stroke-width: 2.5; }
    .geo-pin.me circle { fill: #e5484d; }
    .geo-pin text { fill: #fff; font: 700 13px "DM Sans", sans-serif; text-anchor: middle; paint-order: stroke; stroke: #0b2a5bcc; stroke-width: 4px; }
    .geo-pick { display: grid; gap: 12px; justify-items: center; }
    .geo-send { width: auto; padding: 0 28px; }
    .geo-pts { min-width: 52px; text-align: right; color: var(--accent); }

    /* ═════════ Patate chaude (Yvan 29/11) : les joueurs en rond, la bombe qui tremble ═════════ */
    .pt-ring { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; }
    .pt-seat { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 12px; border-radius: 16px; min-width: 92px; transition: transform .2s, background .2s; }
    .pt-seat .cg-face { width: 58px; height: 58px; }
    .pt-seat.holder { background: #e5484d22; transform: scale(1.08); }
    .pt-seat.out { opacity: .35; filter: grayscale(1); }
    .pt-seat.boomed { animation: pt-shake .5s both; }
    .pt-bomb { position: absolute; top: -6px; right: 2px; font-size: 30px; animation: pt-shake .35s infinite; }
    .pt-lives { font-size: 12px; letter-spacing: 1px; }
    .pt-who { text-align: center; font: 800 20px "Outfit", sans-serif; }
    .pt-card { padding: clamp(22px, 4vw, 40px); }
    .pt-phrase { font: 700 clamp(22px, 3.4vw, 34px)/1.35 "Outfit", sans-serif; margin: 0; }
    .pt-hole { display: inline-block; min-width: 3.2em; margin: 0 .2em; border-bottom: 4px dashed #fff; text-align: center; animation: pt-blink 1s infinite; }
    .pt-attempts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
    .pt-attempts span { padding: 4px 10px; border-radius: 99px; background: #e5484d22; color: #e5484d; font-weight: 600; font-size: 13px; }
    .pt-last { text-align: center; color: #2fa36b; font-weight: 600; margin: 0; }
    .pt-boom { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 20px; }
    .pt-boom-icon { font-size: 90px; animation: imp-zoom .4s both; }
    .pt-boom strong { font: 900 42px "Outfit", sans-serif; color: #e5484d; }
    .pt-boom p { margin: 0; font-size: 18px; }
    .pt-solution { color: var(--muted); font-size: 15px !important; }
    @keyframes pt-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
    @keyframes pt-blink { 50% { opacity: .4; } }
    @media (prefers-reduced-motion: reduce) { .pt-bomb, .pt-hole, .pt-seat.boomed { animation: none; } }
    /* Patate chaude, mode Lettre (Yvan 30/11) */
    .pt-letter { font: 900 clamp(84px, 14vw, 130px)/1 "Outfit", sans-serif; text-shadow: 0 10px 30px #0005; animation: imp-zoom .4s both; }
    .pt-said { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
    .pt-said small { color: var(--muted); }
    .pt-said span { padding: 3px 9px; border-radius: 99px; background: var(--soft); font-size: 13px; font-weight: 600; }

    /* ═════════ Patate chaude en cercle (Yvan 30/11) : bombe au centre, flèche, chaleur, flash ═════════ */
    .pt-arena { position: relative; width: min(100%, 480px, 46vh); aspect-ratio: 1; margin: 0 auto; border-radius: 50%;
      background: radial-gradient(circle, var(--accent-soft) 0%, transparent 62%); }
    .pt-arena.boom { animation: pt-quake .5s both; }
    .pt-arena .pt-seat { position: absolute; transform: translate(-50%, -50%); min-width: 0; width: 118px; padding: 6px; text-align: center; z-index: 2; }
    .pt-arena .pt-seat .cg-face { width: 50px; height: 50px; }
    .pt-arena .pt-seat.holder { background: #e5484d26; box-shadow: 0 0 0 2px #e5484d; transform: translate(-50%, -50%) scale(1.1); }
    .pt-arena .pt-seat.life { animation: pt-glow 1s both; }
    .pt-arena .cg-name { font-size: 12px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pt-lives { font-size: 11px; letter-spacing: 0; }
    .pt-word { display: block; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 13px; text-transform: uppercase; color: var(--muted); }
    .pt-word.typing { color: var(--ink); }
    .pt-word.typing::after { content: "▌"; animation: pt-blink .8s infinite; color: var(--accent); }
    .pt-word mark { background: none; color: #2fa36b; }
    .pt-pop { position: absolute; top: -10px; right: 4px; font-size: 26px; animation: pt-pop 1s both; pointer-events: none; }
    .pt-arrow { position: absolute; left: 50%; top: 50%; width: 10px; height: 34%; margin-left: -5px; transform-origin: 50% 0;
      background: linear-gradient(var(--accent), #f5a623); border-radius: 6px; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); z-index: 1; }
    .pt-arrow { translate: 0 0; rotate: 180deg; }   /* la flèche part du centre vers le haut à 0° */
    .pt-arrow::after { content: ""; position: absolute; bottom: -14px; left: -9px; border: 14px solid transparent; border-top-color: #f5a623; border-bottom: 0; }
    .pt-center { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 30%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
      background: var(--surface); border: 3px solid var(--border); box-shadow: 0 10px 40px #0005; z-index: 3; }
    .pt-bomb-big { font-size: clamp(40px, 7vw, 64px); line-height: 1; grid-area: 1 / 1; opacity: .35; }
    .pt-syl { grid-area: 1 / 1; font: 900 clamp(28px, 5.5vw, 46px)/1 "Outfit", sans-serif; letter-spacing: 2px; color: var(--ink); text-shadow: 0 3px 12px #0006; }
    .pt-center.heat1 { animation: pt-shake .5s infinite; border-color: #f5a623; }
    .pt-center.heat2 { animation: pt-shake .28s infinite; border-color: #e5484d; box-shadow: 0 0 30px #e5484d66; }
    .pt-center.heat3 { animation: pt-shake .14s infinite; border-color: #e5484d; box-shadow: 0 0 50px #e5484daa; background: #e5484d22; }
    .pt-who.boom { color: #e5484d; font-size: 24px; animation: imp-zoom .4s both; }
    .pt-flash { animation: pt-flash .6s both; }
    .pt-announce { justify-self: center; padding: 8px 20px; border-radius: 99px; background: #f5a623; color: #1b2437; font: 800 20px "Outfit", sans-serif; animation: pt-announce 2.2s both; }
    .pt-bonus { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
    .pt-bonus span { width: 24px; height: 26px; display: grid; place-items: center; border-radius: 6px; background: var(--soft); color: var(--muted); font: 700 12px "Outfit", sans-serif; transition: background .3s, color .3s; }
    .pt-bonus span.on { background: #2fa36b; color: #fff; }
    .pt-form { max-width: 520px; justify-self: center; width: 100%; }
    @keyframes pt-quake { 20% { translate: -8px 4px; } 40% { translate: 7px -5px; } 60% { translate: -5px -3px; } 80% { translate: 4px 5px; } }
    @keyframes pt-flash { 0% { box-shadow: inset 0 0 0 2000px #f5a62388; } 100% { box-shadow: inset 0 0 0 2000px transparent; } }
    @keyframes pt-pop { 0% { opacity: 0; transform: translateY(10px) scale(.5); } 30% { opacity: 1; transform: translateY(-6px) scale(1.2); } 100% { opacity: 0; transform: translateY(-30px); } }
    @keyframes pt-glow { 0%, 100% { box-shadow: none; } 40% { box-shadow: 0 0 0 4px #2fa36b, 0 0 30px #2fa36b; } }
    @keyframes pt-announce { 0% { opacity: 0; transform: scale(.4); } 15% { opacity: 1; transform: scale(1.15); } 25%, 80% { transform: scale(1); opacity: 1; } 100% { opacity: 0; } }
    @media (max-width: 540px) { .pt-arena .pt-seat { width: 84px; } .pt-arena .pt-seat .cg-face { width: 38px; height: 38px; } .pt-word { font-size: 11px; max-width: 84px; } }
    @media (prefers-reduced-motion: reduce) { .pt-center[class*="heat"], .pt-arena.boom, .pt-flash, .pt-announce { animation: none; } }
    .cg.pt { gap: 14px; }
    .pt-countdown { font: 800 72px/1 "Outfit",sans-serif; text-align: center; color: var(--accent); animation: pt-pop-in .9s ease-out infinite; }
    @keyframes pt-pop-in { from { transform: scale(1.3); opacity: .4; } to { transform: scale(1); opacity: 1; } }   /* Patate chaude : tout tient dans l'écran (Yvan 30/11 : « un poil trop grand ») */
    /* Patate (Yvan 30/11) : cadre du joueur plus discret (anneau autour de l'avatar), l'avatar ne bouge plus à l'explosion,
       la flèche s'arrête avant le joueur, compte à rebours dans la bombe */
    .pt-arena { margin-bottom: 26px; }
    .pt-arena .pt-seat.holder { background: none; box-shadow: none; transform: translate(-50%, -50%); }
    .pt-arena .pt-seat.holder .cg-face { box-shadow: 0 0 0 3px #e5484d, 0 0 18px #e5484d99; border-radius: 50%; }
    .pt-arena .pt-seat.boomed { animation: pt-wobble .5s both; }
    .pt-arrow { height: 20%; z-index: 1; }
    .pt-left { grid-area: 1 / 1; align-self: end; margin-bottom: 8%; font: 800 clamp(12px, 2vw, 15px) "Outfit", sans-serif; color: var(--muted); }
    .pt-left.hurry { color: #e5484d; }
    @keyframes pt-wobble { 25% { rotate: -10deg; } 75% { rotate: 10deg; } }
    .settings-more { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; }
    .settings-more:not([open]) { display: block; }
    .settings-more summary { grid-column: 1 / -1; cursor: pointer; font-weight: 700; color: var(--muted); }
    .settings-more .field-wide { grid-column: 1 / -1; }

    /* ═════════ Accueil sur tablette et téléphone (Yvan 30/11) : cartes compactes, « Détails » pour déplier ═════════ */
    .art-emoji, .details-btn { display: none; }
    @media (max-width: 1000px) {
      .game-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
      .game:not(.open) { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: stretch; }
      .game:not(.open) .art { height: auto; min-height: 84px; padding: 0; display: grid; place-items: center; }
      .game:not(.open) .art > :not(.art-emoji) { display: none; }
      .game:not(.open) .art-emoji { display: block; font-size: 40px; filter: drop-shadow(0 4px 10px #0004); }
      .game:not(.open) .game-body { padding: 10px 12px; display: grid; gap: 8px; align-content: center; }
      .game:not(.open) .game-body > p, .game:not(.open) .game-meta { display: none; }
      .game:not(.open) .game-name { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; }
      .game:not(.open) .game-name h3 { font-size: 17px; margin-right: auto; }
      .game:not(.open) .play-button { min-height: 36px; }
      .details-btn { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 99px;
        background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; }
      .game.open .details-btn { margin-left: auto; }
      .game.open { grid-column: 1 / -1; }
    }

    /* Onglets du chat : canaux privés ouverts par un jeu (Yvan 30/11) */
    .chat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
    .chat-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 99px;
      background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
    .chat-tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
    .chat-tab-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e5484d; color: #fff; font-size: 11px; display: grid; place-items: center; }

    /* ═════════ Les Hypocrites (portage des Traîtres, 30/11) : ambiance château, tons dorés ═════════ */
    .hyp { --gold: #d9a441; gap: 16px; }
    .hyp-banner { position: relative; min-height: 150px; border-radius: 18px; background-size: cover; background-position: center; display: flex; align-items: flex-end;
      justify-content: space-between; padding: 16px 20px; overflow: hidden; box-shadow: inset 0 -90px 60px -30px #000c; }
    .hyp-banner h2 { margin: 0; color: #fff3d6; font: 800 clamp(22px, 3vw, 32px) "Outfit", sans-serif; text-shadow: 0 3px 14px #000; }
    .hyp-banner small { color: var(--gold); letter-spacing: 3px; font-weight: 700; text-shadow: 0 2px 8px #000; }
    .hyp-banner .cg-timer { color: #fff3d6; text-shadow: 0 2px 8px #000; }
    .hyp-me { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .hyp-tag { padding: 4px 10px; border-radius: 99px; background: var(--soft); font-size: 12px; font-weight: 600; }
    .hyp-role { padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: #2fa36b26; color: #2fa36b; }
    .hyp-role.hypo { background: #e5484d26; color: #e5484d; }
    .hyp-role.big { font-size: 14px; padding: 5px 12px; }
    .hyp-carnet { flex-basis: 100%; }
    .hyp-carnet summary, .hyp-traps summary, .hyp-memory summary, .hyp-grenier summary { cursor: pointer; font-weight: 700; }
    .hyp-notes { width: 100%; resize: vertical; margin: 8px 0; font: inherit; }
    .hyp-cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
    .hyp-seat { position: relative; display: grid; justify-items: center; gap: 3px; padding: 10px 6px; border-radius: 14px; background: var(--soft);
      border: 2px solid transparent; color: var(--ink); font: inherit; text-align: center; }
    button.hyp-seat { cursor: pointer; } button.hyp-seat:hover { border-color: var(--gold); }
    .hyp-seat .cg-face { width: 54px; height: 54px; }
    .hyp-seat strong { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hyp-seat small { font-size: 11px; color: var(--muted); min-height: 14px; }
    .hyp-seat.out { opacity: .45; filter: grayscale(.8); }
    .hyp-seat.dungeon { border-style: dashed; border-color: #8a6bd1; }
    .hyp-seat.picked { border-color: #e5484d; background: #e5484d1f; }
    .hyp-seat.me { box-shadow: 0 0 0 2px var(--accent) inset; }
    .hyp-count { position: absolute; top: 4px; right: 6px; font-size: 12px; font-weight: 800; color: #e5484d; }
    .hyp-callout, .hyp-announce, .hyp-night { padding: 16px 18px; border-radius: 14px; background: #d9a44122; border: 1px solid #d9a44166; font-weight: 600; }
    .hyp-announce { font: 800 20px "Outfit", sans-serif; text-align: center; animation: imp-zoom .5s both; }
    .hyp-night { background: #0b1230; border-color: #2a3a80; color: #c9d3ff; text-align: center; font-size: 17px; padding: 34px 18px; }
    .hyp-secret { padding: 12px 16px; border-radius: 12px; background: #e5484d1f; border: 1px solid #e5484d66; color: #ff9b9e; font-weight: 600; }
    .hyp-note { color: var(--muted); margin: 0; }
    .hyp-topic { font: 700 18px "Outfit", sans-serif; text-align: center; margin: 0; }
    .hyp-ready { justify-self: center; width: auto; padding: 0 26px; }
    .hyp-reveal { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 20px; border-radius: 18px; animation: imp-zoom .6s both; }
    .hyp-reveal img { width: 120px; height: 120px; image-rendering: pixelated; border-radius: 16px; box-shadow: 0 10px 30px #0006; }
    .hyp-reveal h2 { margin: 0; font: 900 clamp(24px, 4vw, 34px) "Outfit", sans-serif; }
    .hyp-reveal.hypo { background: radial-gradient(circle, #e5484d33, transparent 70%); } .hyp-reveal.hypo h2 { color: #e5484d; }
    .hyp-reveal.reglo { background: radial-gradient(circle, #2fa36b33, transparent 70%); } .hyp-reveal.reglo h2 { color: #2fa36b; }
    .hyp-allies { text-align: center; font-weight: 700; color: #e5484d; }
    .hyp-shop { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; } .hyp-shop h3 { flex-basis: 100%; text-align: center; margin: 0; }
    .hyp-shop .play-button { width: auto; padding: 0 16px; }
    .hyp-groups { display: flex; flex-wrap: wrap; gap: 10px; } .hyp-group { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--soft); }
    .hyp-votes { display: grid; gap: 6px; padding: 0; list-style: none; }
    .hyp-votes li { padding: 10px 14px; border-radius: 12px; background: var(--soft); font-size: 16px; opacity: 0; animation: hyp-vote .5s forwards; }
    .hyp-dague { justify-self: center; }
    .hyp-flame { justify-self: center; width: auto; padding: 0 34px; min-height: 64px; font-size: 20px; }
    .hyp-memory { padding: 10px 14px; border-radius: 12px; background: var(--soft); }
    .hyp-memory p { margin: 6px 0 0; white-space: pre-wrap; }
    .hyp-grenier { padding: 12px 16px; border-radius: 14px; border: 1px solid var(--gold); display: grid; gap: 8px; }
    .hyp-wall { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; } .hyp-wall p { margin: 0; }
    .hyp-chests { display: grid; grid-template-columns: repeat(3, minmax(0, 110px)); gap: 10px; justify-content: center; }
    .hyp-chest { aspect-ratio: 1; display: grid; place-items: center; align-content: center; gap: 2px; border-radius: 14px; border: 2px solid var(--gold); background: #d9a44118;
      font-size: 30px; cursor: pointer; color: var(--ink); }
    .hyp-chest.open { font-size: 14px; font-weight: 700; background: var(--soft); animation: imp-zoom .4s both; } .hyp-chest small { font-size: 11px; color: var(--muted); }
    .hyp-chest:disabled:not(.open) { opacity: .6; cursor: default; }
    .hyp-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
    .hyp-row .on, .hyp-mj .on { outline: 3px solid var(--gold); }
    .hyp-win { text-align: center; font: 900 clamp(26px, 5vw, 42px) "Outfit", sans-serif; padding: 26px; border-radius: 18px; animation: imp-zoom .6s both; }
    .hyp-win.hypos { color: #e5484d; background: #e5484d1a; } .hyp-win.reglos { color: #2fa36b; background: #2fa36b1a; }
    .hyp-mj { display: grid; gap: 10px; }
    .hyp-mj-step { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--soft); }
    .hyp-small { width: auto; min-height: 32px; padding: 0 12px; font-size: 12px; }
    .hyp-tiny { width: auto; min-height: 24px; padding: 0 6px; font-size: 11px; display: inline-flex; }
    .hyp-small.danger { color: #e5484d; }
    .hyp-in { width: auto; min-height: 32px; padding: 4px 8px; font-size: 12px; }
    .hyp-scroll { overflow-x: auto; }
    .hyp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
    .hyp-table th, .hyp-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
    .hyp-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
    .hyp-table .cg-face { width: 28px; height: 28px; vertical-align: middle; } .hyp-table tr.out { opacity: .5; }
    .hyp-live { display: grid; gap: 2px; max-height: 220px; overflow-y: auto; font-size: 13px; } .hyp-live p { margin: 0; }
    .hyp-traps { padding: 10px 12px; border-radius: 12px; background: var(--soft); display: grid; gap: 8px; } .hyp-traps p { margin: 0; }
    .hyp-minigame:empty { display: none; }
    .hyp-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: #000c; pointer-events: none; animation: hyp-fade 2.5s both; }
    .hyp-overlay img { max-width: 80vw; max-height: 80vh; border-radius: 18px; filter: contrast(1.2) saturate(.6); }
    .hyp-overlay.voice { animation-duration: 7s; } .hyp-overlay p { color: #d8b0ff; font: italic 700 clamp(22px, 4vw, 40px) "Outfit", sans-serif; text-align: center; padding: 20px; text-shadow: 0 0 20px #9b30c0; }
    @keyframes hyp-vote { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
    @keyframes hyp-fade { 0% { opacity: 0; } 10%, 85% { opacity: 1; } 100% { opacity: 0; } }
    .hyp-news { margin: 0; padding: 10px 14px; border-radius: 12px; border-left: 4px solid var(--gold); background: #d9a44114; font-weight: 700; animation: hyp-vote .5s both; }
    .hyp-clue { padding: 14px 18px; border-radius: 14px; background: #2a3a8033; border: 1px solid #6f86ff88; color: var(--ink); font: 700 17px "Outfit", sans-serif; text-align: center; animation: imp-zoom .5s both; }

    /* Couleur du site au choix du joueur (Yvan 30/11), sous le mode clair/sombre ; « Bleu » = les couleurs de base (:root) */
    .palette-pick { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; padding: 0 4px; font-size: 12px; color: var(--muted); }
    .palette-pick button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); padding: 0; cursor: pointer; }
    .palette-pick button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
    [data-palette="violet"] {
      --bg: #ecebf3; --surface: #f8f7fc; --raised: #fdfcff; --soft: #e3e0f0; --ink: #221d3a; --muted: #6f6a88;
      --border: #d6d2e6; --accent: #5b45d6; --accent-soft: #ebe7fd; --button: #5b45d6; --logo-bg: #cfc6ff; --logo-ink: #3b2a9e; }
    [data-theme="dark"][data-palette="violet"] {
      --bg: #16141d; --surface: #1f1c28; --raised: #282433; --soft: #25212f; --ink: #f2f0f7; --muted: #a7a2b8;
      --border: #36314a; --accent: #a594ff; --accent-soft: #2b2545; --button: #6a55e8; }
    [data-palette="corail"] {
      --bg: #f2ece8; --surface: #fbf8f6; --raised: #fffdfc; --soft: #ebe2dc; --ink: #2e1f1a; --muted: #85716a;
      --border: #e2d6cf; --accent: #c94f2c; --accent-soft: #fbe8e1; --button: #d4552f; --logo-bg: #ffc9b3; --logo-ink: #8a2f14; }
    [data-theme="dark"][data-palette="corail"] {
      --bg: #1c1918; --surface: #262220; --raised: #302b28; --soft: #2c2725; --ink: #f5f1ee; --muted: #b0a6a0;
      --border: #403833; --accent: #ff9a76; --accent-soft: #3d2820; --button: #d9582f; }
    [data-palette="emeraude"] {
      --bg: #e8eeeb; --surface: #f6faf8; --raised: #fcfefd; --soft: #dde8e3; --ink: #15302a; --muted: #64807a;
      --border: #cfdfd8; --accent: #0b7a55; --accent-soft: #dcf3ea; --button: #0b8a5f; --logo-bg: #bff0dc; --logo-ink: #0b5c41; }
    [data-theme="dark"][data-palette="emeraude"] {
      --bg: #141a19; --surface: #1d2422; --raised: #262e2c; --soft: #222a28; --ink: #eff5f3; --muted: #9fb0ab;
      --border: #33403c; --accent: #5fe0b0; --accent-soft: #1a3a30; --button: #0f8f63; }
    [data-palette-pick=""] { background: #2f6fed; } [data-palette-pick="violet"] { background: #6a55e8; }
    [data-palette-pick="corail"] { background: #d9582f; } [data-palette-pick="emeraude"] { background: #0f8f63; }

    /* ═════════ Les Hypocrites (Yvan 30/11 : « l'ambiance glauque a disparu », « le chat au centre a disparu ») ═════════
       Pendant la partie, tout le site passe en château la nuit (quels que soient le thème et la couleur choisis),
       et le chat reste ouvert à droite sur grand écran (onglets : room, entretien avec le MJ, Conseil…). */
    body[data-game="hypocrites"] {
      --bg: #0c0908; --surface: #17110e; --raised: #1f1713; --soft: #241a15; --ink: #eee2c9; --muted: #a8977c;
      --border: #3b2b22; --accent: #d9a441; --accent-soft: #3a2a12; --button: #8b1e1b;
      background: linear-gradient(#0c0908e6, #0c0908f2), url(/games/hypocrites/img/chateau.jpg) center / cover fixed; }
    body[data-game="hypocrites"] :is(.hyp h2, .hyp h3, .hyp-banner h2, .hyp-announce, .hyp-topic, .hyp-win, #chat-title) { font-family: Georgia, "Times New Roman", serif; letter-spacing: .5px; }
    body[data-game="hypocrites"] .room-area { background: #17110ee6; border-color: #3b2b22; }
    body[data-game="hypocrites"] .hyp-banner { box-shadow: inset 0 -110px 70px -30px #000e, 0 0 0 1px #d9a44144; filter: saturate(.8); }
    body[data-game="hypocrites"] .hyp-seat { background: #1f1713; border-color: #3b2b22; }
    body[data-game="hypocrites"] .action-button { background: #8b1e1b; }
    @media (min-width: 1100px) {
      body.in-game[data-game="hypocrites"] .room-layout { grid-template-columns: minmax(0, 1fr) 340px; }
      body.in-game[data-game="hypocrites"] .room-side { position: sticky; top: 16px; }
      body.in-game[data-game="hypocrites"] .chat { display: flex !important; flex-direction: column; position: static; width: auto; height: calc(100dvh - 32px);
        box-shadow: none; animation: none; }
      body.in-game[data-game="hypocrites"] .chat .chat-log { flex: 1; height: auto; min-height: 0; }
      body.in-game[data-game="hypocrites"] :is(.chat-close, .chat-bubble) { display: none !important; }
    }
    .hyp-journal { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid #d9a44155; background: #0008; }
    .hyp-journal .hyp-wall { max-height: 200px; font-size: 13px; } .hyp-journal .spy { color: var(--muted); }
    .hyp-day { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
    .hyp-day li { padding: 5px 10px; border-radius: 99px; background: var(--soft); color: var(--muted); }
    .hyp-day li.on { background: #d9a441; color: #1a1208; font-weight: 800; }
    .hyp-todo { padding: 14px 18px; border-radius: 14px; background: #8b1e1b33; border: 1px solid #8b1e1b; font: 700 17px Georgia, "Times New Roman", serif; text-align: center; }
    /* jeu désactivé dans l'admin (Yvan 30/11) : toujours visible, mais grisé et injouable */
    .game.off .art { filter: grayscale(1); opacity: .55; }
