:root {
  --krappo: #2BB2D4;
  --encre: #1C1B29;
  --encre-2: #5E5A6E;
  --papier: #FFF4E2;
  --pois: rgb(28 27 41 / .085);
  --carte: #FFFFFF;
  --juste: #2FBF71;
  --juste-pale: #DDF7E8;
  --faux: #FF5A5A;
  --faux-pale: #FFE3E0;
  --or: #FFC531;
  --bord: 3px;
  --trait: var(--bord) solid var(--encre);
  --ombre: 5px 5px 0 var(--encre);
  --ombre-petite: 3px 3px 0 var(--encre);
  --rayon: 18px;
  --titre: "Bricolage Grotesque", "Nunito", system-ui, sans-serif;
  --police: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rebond: cubic-bezier(.3, 1.6, .5, 1);
  color-scheme: light;
}

.ambiance-sobre {
  --papier: #F4F5F7;
  --pois: transparent;
  --bord: 1.5px;
  --trait: var(--bord) solid #D9DEE4;
  --ombre: 0 1px 2px rgb(16 24 40 / .05), 0 10px 28px rgb(16 24 40 / .07);
  --ombre-petite: 0 1px 2px rgb(16 24 40 / .06), 0 4px 12px rgb(16 24 40 / .06);
  --rayon: 12px;
  --titre: "Inter", system-ui, sans-serif;
  --police: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rebond: cubic-bezier(.2, .8, .3, 1);
}
.ambiance-sobre [style*="--r"] { rotate: 0deg !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--police); color: var(--encre);
  background-color: var(--papier);
  background-image: radial-gradient(var(--pois) 1.3px, transparent 1.4px);
  background-size: 22px 22px;
  font-size: 16px; line-height: 1.45;
}
h1, h2, h3, h4 { font-family: var(--titre); line-height: 1.12; margin: 0 0 .4em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: #137B9A; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--krappo); outline-offset: 3px; }

.page-joueur.ambiance-ludique::before, .page-ecran.ambiance-ludique::before, .page-animer:has(.entree)::before {
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(28vmax 28vmax at 15% 20%, rgb(43 178 212 / .28), transparent 70%),
    radial-gradient(24vmax 24vmax at 85% 15%, rgb(255 197 49 / .30), transparent 70%),
    radial-gradient(30vmax 30vmax at 75% 85%, rgb(255 126 182 / .22), transparent 70%),
    radial-gradient(26vmax 26vmax at 20% 85%, rgb(87 217 160 / .25), transparent 70%);
  animation: derive 26s ease-in-out infinite alternate;
}
@keyframes derive { to { transform: translate(4vmax, -3vmax) rotate(8deg) scale(1.08); } }

.discret { color: var(--encre-2); font-size: .92em; }
.vide { color: var(--encre-2); text-align: center; padding: 2em 0; font-style: italic; }
.chargement { color: var(--encre-2); padding: 2em; text-align: center; }

.sticker {
  background: var(--carte); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre);
  rotate: var(--r, 0deg);
}

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .62em 1.25em; border: var(--trait); border-radius: 999px; cursor: pointer;
  background: var(--krappo); color: var(--encre); font-weight: 800; text-decoration: none;
  box-shadow: var(--ombre-petite); transition: transform .08s, box-shadow .08s, background .15s;
  white-space: nowrap; font-family: var(--titre);
}
.bouton:hover { background: #5CC6E1; }
.bouton:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--encre); }
.bouton:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.bouton.gros { font-size: 1.15em; padding: .75em 1.6em; }
.bouton.petit { font-size: .88em; padding: .35em .85em; box-shadow: none; }
.bouton.secondaire { background: var(--carte); }
.bouton.secondaire:hover { background: #FFF9EE; }
.bouton.fantome { background: transparent; border-color: transparent; box-shadow: none; padding: .45em .8em; }
.bouton.fantome:hover { background: rgb(28 27 41 / .07); }
.bouton.danger, button.danger { color: #C0262B; }
.bouton.attention { background: var(--or); }
.bouton.attention::after { content: " •"; }
.ambiance-sobre .bouton { border: 0; background: #1E8FB3; color: #fff; box-shadow: none; font-weight: 700; }
.ambiance-sobre .bouton:hover { background: #167592; }
.ambiance-sobre .bouton.secondaire { background: #fff; color: var(--encre); box-shadow: inset 0 0 0 1.5px #D9DEE4; }
.ambiance-sobre .bouton.fantome { background: transparent; color: var(--encre); }
.lien { background: none; border: 0; color: #137B9A; cursor: pointer; text-decoration: underline; padding: .3em; }
.lien-discret { color: var(--encre); text-decoration: none; font-weight: 800; }

.champ {
  min-width: 0;
  width: 100%; padding: .72em 1em; border: var(--trait); border-radius: 12px;
  background: #fff; transition: box-shadow .15s;
}
.champ:focus { outline: none; box-shadow: 0 0 0 4px rgb(43 178 212 / .35); }
.champ.petit { width: auto; padding: .42em .7em; border-radius: 9px; }
textarea.champ { resize: vertical; }
.page-animer:not(.page-ecran) .champ { border-width: 2px; }
.rond {
  width: 2.6em; height: 2.6em; border-radius: 50%; border: var(--trait); background: #fff; color: var(--encre);
  font-weight: 900; font-size: 1.1em; cursor: pointer; flex: none; display: inline-grid; place-items: center; padding: 0;
}
.rond.petit { width: 2em; height: 2em; font-size: .95em; border-width: 2px; }
.rond:disabled { opacity: .3; }
.rond.vert[aria-pressed="true"], .rond.vert:hover { background: var(--juste); }
.rond.rouge[aria-pressed="true"], .rond.rouge:hover { background: var(--faux); }
.etiquette { font-weight: 800; font-size: .82em; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-2); margin: 1.2em 0 .5em; }
.case { display: flex; align-items: center; gap: .5em; margin: .5em 0; cursor: pointer; }
.case input { width: 1.2em; height: 1.2em; accent-color: var(--encre); }
.badge { display: inline-block; padding: .15em .65em; border-radius: 999px; background: #E9F7FB; border: 1.5px solid var(--encre); font-weight: 800; font-size: .78em; }

.segment { display: inline-flex; flex-wrap: wrap; background: #fff; border: var(--trait); border-radius: 14px; padding: 3px; gap: 3px; }
.segment label { cursor: pointer; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment span { display: block; padding: .42em .9em; border-radius: 10px; font-weight: 800; }
.segment input:checked + span { background: var(--krappo); }
.segment input:focus-visible + span { outline: 3px solid var(--krappo); }
.segment.petit span { padding: .28em .7em; font-size: .9em; }

.interrupteur { display: flex; gap: .8em; align-items: flex-start; padding: .55em 0; cursor: pointer; }
.interrupteur input { position: absolute; opacity: 0; }
.interrupteur .bascule { flex: none; width: 46px; height: 26px; border-radius: 99px; background: #E4E1DA; border: 2px solid var(--encre); position: relative; transition: background .2s; margin-top: 1px; }
.interrupteur .bascule::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--encre); transition: transform .25s var(--rebond); }
.interrupteur input:checked + .bascule { background: var(--juste); }
.interrupteur input:checked + .bascule::after { transform: translateX(20px); }
.interrupteur input:focus-visible + .bascule { outline: 3px solid var(--krappo); outline-offset: 2px; }
.interrupteur strong { display: block; }
.interrupteur small { color: var(--encre-2); }

.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 300; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--encre); color: #fff; padding: .8em 1.1em; border-radius: 14px; font-weight: 700; animation: monte .3s var(--rebond); box-shadow: 4px 4px 0 var(--krappo); }
.toast.erreur { box-shadow: 4px 4px 0 var(--faux); }
.toast.partir { opacity: 0; transform: translateY(8px); transition: .35s; }
@keyframes monte { from { opacity: 0; transform: translateY(14px) scale(.95); } }
body.hors-ligne::after {
  content: "Connexion perdue… reconnexion en cours"; position: fixed; top: 0; left: 0; right: 0; z-index: 400;
  background: var(--faux); color: var(--encre); text-align: center; font-weight: 800; padding: .4em; border-bottom: var(--trait);
}

.ecran { padding: 20px 16px 32px; max-width: 640px; margin: 0 auto; }
.ecran.centre { min-height: calc(100dvh - 60px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .3em; }
.entree { gap: 1.4em; }
.logo-zone { max-width: calc(100vw - 32px); display: flex; align-items: center; gap: .6em; background: #fff; padding: .7em 1.2em; border: var(--trait); border-radius: 20px; box-shadow: var(--ombre); rotate: -2deg; animation: tombe-sticker .6s var(--rebond); }
@keyframes tombe-sticker { from { transform: translateY(-30px) scale(1.15); opacity: 0; } }
.logo { height: clamp(28px, 9vw, 42px); width: auto; min-width: 0; }
.logo-quiz { font-family: var(--titre); font-weight: 800; font-size: clamp(1.2em, 6vw, 1.7em); background: var(--or); border: 2px solid var(--encre); border-radius: 10px; padding: 0 .35em; rotate: 4deg; }
.carte-entree {
  width: min(100%, 400px); background: var(--carte); border: var(--trait); border-radius: 24px; padding: 26px 22px; box-shadow: var(--ombre);
  display: flex; flex-direction: column; gap: 12px; text-align: center; animation: monte .45s .1s var(--rebond) backwards;
}
.carte-entree h1 { font-size: 1.55em; }
.champ-code { font-family: var(--titre); font-size: 2em; text-align: center; letter-spacing: .25em; font-weight: 800; padding: .4em .3em; border: var(--trait); border-radius: 14px; width: 100%; background: #FFFBF3; }
.champ-code:focus { outline: none; box-shadow: 0 0 0 4px rgb(43 178 212 / .35); }
.champ-code::placeholder { font-size: .48em; letter-spacing: .02em; font-weight: 700; font-family: var(--police); }
.message-erreur { color: #C0262B; font-weight: 800; }
.sur-titre { font-weight: 800; text-transform: uppercase; letter-spacing: .07em; font-size: .82em; color: var(--encre-2); }
.grille-avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.avatar-choix { font-size: 1.55em; aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; background: #FFF4E2; cursor: pointer; padding: 0; transition: transform .2s var(--rebond); }
.avatar-choix:hover { transform: scale(1.1) rotate(-6deg); }
.avatar-choix[aria-checked="true"] { border-color: var(--encre); background: var(--or); transform: scale(1.12) rotate(4deg); box-shadow: var(--ombre-petite); }

.bandeau-joueur {
  display: flex; align-items: center; gap: .6em; padding: 9px 14px; background: #fff;
  border-bottom: var(--trait); font-weight: 800; position: sticky; top: 0; z-index: 5;
}
.bandeau-joueur .moi { display: flex; align-items: center; gap: .4em; min-width: 0; flex: 1; }
.bandeau-joueur .pseudo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bandeau-joueur .avatar { font-size: 1.4em; }
.bandeau-joueur .progression { color: var(--encre-2); font-size: .9em; }
.bandeau-joueur .score { background: var(--or); border: 2px solid var(--encre); padding: .1em .65em; border-radius: 99px; font-family: var(--titre); }
.barre-temps { height: 10px; background: #fff; border-bottom: var(--trait); }
.barre-temps i { display: block; height: 100%; background: var(--krappo); transition: background .3s; }
.barre-temps.urgent i { background: var(--faux); animation: clignote .5s steps(2) infinite; }
@keyframes clignote { 50% { opacity: .55; } }

.grand-emoji { font-size: 4.5em; line-height: 1; }
.grand-avatar { font-size: 4.6em; line-height: 1; background: #fff; border: var(--trait); box-shadow: var(--ombre); border-radius: 50%; width: 1.55em; height: 1.55em; display: grid; place-items: center; margin-bottom: .2em; animation: flotte 3s ease-in-out infinite; }
@keyframes flotte { 50% { transform: translateY(-8px) rotate(3deg); } }
.rebond { animation: rebond .6s var(--rebond); }
@keyframes rebond { from { transform: scale(.3); opacity: 0; } }
.attente-points { display: flex; gap: 8px; margin-top: 1em; }
.attente-points i { width: 12px; height: 12px; border-radius: 50%; background: var(--encre); animation: saute 1s infinite; }
.attente-points i:nth-child(2) { animation-delay: .15s; }
.attente-points i:nth-child(3) { animation-delay: .3s; }
@keyframes saute { 50% { transform: translateY(-10px); opacity: .4; } }

.intro-numero { display: inline-flex; flex-direction: column; align-items: center; background: var(--or); border: var(--trait); border-radius: 20px; box-shadow: var(--ombre); padding: .3em 1.1em .2em; rotate: -4deg; animation: claque .55s var(--rebond); }
.intro-numero span { font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: .8em; }
.intro-numero b { font-family: var(--titre); font-size: 3em; line-height: 1; }
@keyframes claque { from { transform: scale(2.4) rotate(14deg); opacity: 0; } }
.lecture .question-texte { font-size: 1.6em; margin-top: .6em; animation: monte .5s .25s var(--rebond) backwards; }
.lecture-barre { width: min(100%, 380px); height: 16px; border-radius: 99px; background: #fff; border: var(--trait); overflow: hidden; margin-top: 1.2em; }
.lecture-barre i { display: block; height: 100%; background: repeating-linear-gradient(-45deg, var(--krappo) 0 12px, #63CBE6 12px 24px); animation: remplit linear forwards; width: 0; }
@keyframes remplit { to { width: 100%; } }

.question-tete { text-align: center; margin-bottom: 14px; }
.question-texte { font-size: 1.32em; margin: .2em 0 .4em; }
.regarde { font-size: 1.3em; font-weight: 800; }
.media { display: block; max-height: 30vh; margin: 0 auto 8px; border-radius: 14px; border: var(--trait); background: #000; max-width: 100%; }
audio.media { background: none; border: 0; width: 100%; }
.media.flou, .zone-cadre img.flou { animation-name: deflouter; animation-timing-function: cubic-bezier(.4, 0, .6, 1); animation-fill-mode: both; }
@keyframes deflouter { from { filter: blur(26px) saturate(.6); transform: scale(1.04); } to { filter: blur(0); transform: none; } }
.repondeur { display: flex; flex-direction: column; gap: 12px; }
.consigne { text-align: center; font-weight: 800; }

.grille-choix { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grille-choix.deux .choix { min-height: 34vh; }
.choix {
  --c: var(--krappo); position: relative;
  min-height: 21vh; border: var(--trait); border-radius: 20px; background: var(--c); color: var(--encre); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45em;
  font-weight: 800; font-size: 1.05em; padding: 10px; box-shadow: var(--ombre); text-align: center;
  rotate: var(--r, 0deg); animation: pose .45s var(--d, 0ms) var(--rebond) backwards;
  transition: transform .1s, box-shadow .1s;
}
@keyframes pose { from { transform: translateY(30px) scale(.8); opacity: 0; } }
.grille-choix.six .choix { min-height: 14vh; }
.choix:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--encre); }
.choix[aria-pressed="true"] { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--encre); outline: 4px dashed var(--encre); outline-offset: -11px; }
.choix[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 6px; right: 10px; font-size: 1.4em; font-weight: 900; }
.pastille-forme { display: inline-grid; place-items: center; width: 2.6em; height: 2.6em; border-radius: 50%; background: #fff; border: 2.5px solid var(--encre); flex: none; }
.pastille-forme .forme { width: 62%; height: 62%; color: var(--encre); }
.gros-symbole { font-size: 2.6em; line-height: 1; font-weight: 900; }
.choix .mini, .tuile .mini { max-height: 70px; border-radius: 8px; border: 2px solid var(--encre); }
.lettre { display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 8px; background: var(--c, #E7EEF2); color: var(--encre); font-weight: 800; flex: none; }
.ambiance-sobre .choix { background: #fff; min-height: 0; padding: 16px; flex-direction: row; justify-content: flex-start; text-align: left; border-color: #D9DEE4; }
.ambiance-sobre .grille-choix { grid-template-columns: 1fr; }
.ambiance-sobre .grille-choix.deux { grid-template-columns: 1fr 1fr; }
.ambiance-sobre .grille-choix.deux .choix { min-height: 0; justify-content: center; }
.ambiance-sobre .choix[aria-pressed="true"] { outline: 2px solid #1E8FB3; outline-offset: -2px; background: #EEF8FB; transform: none; }

.saisie { display: flex; flex-direction: column; gap: 10px; }
.saisie .champ { font-size: 1.2em; text-align: center; }
.saisie .discret { text-align: center; }
.estimation { align-items: center; text-align: center; }
.grosse-valeur { font-family: var(--titre); font-size: 3em; font-weight: 800; line-height: 1; }
.grosse-valeur small { font-size: .4em; font-weight: 700; }
.ligne-curseur { display: flex; align-items: center; gap: 10px; width: 100%; }
.curseur { flex: 1; width: 100%; accent-color: var(--encre); height: 2em; }
.bornes { display: flex; justify-content: space-between; align-items: center; width: 100%; font-weight: 800; gap: 8px; }
.bornes .champ { width: 7em; text-align: center; }

.liste-ordre { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; touch-action: none; }
.element-ordre { display: flex; align-items: center; gap: 10px; background: #fff; padding: 10px 12px; border: var(--trait); border-radius: 14px; font-weight: 800; box-shadow: var(--ombre-petite); user-select: none; cursor: grab; }
.element-ordre.tenu { position: relative; z-index: 3; box-shadow: 8px 8px 0 var(--encre); cursor: grabbing; rotate: -2deg; background: var(--or); }
.element-ordre .lib { flex: 1; }
.element-ordre .poignee { color: var(--encre-2); font-size: 1.3em; }
.element-ordre .fleches { display: flex; gap: 4px; }
.borne-ordre { font-weight: 800; margin: 0; text-align: center; font-size: .9em; color: var(--encre-2); }

.zone-cadre { --zone-max: 62vh; --ratio: 1.6; position: relative; display: block; width: min(100%, calc(var(--zone-max) * var(--ratio))); aspect-ratio: var(--ratio); margin-inline: auto; align-self: center; line-height: 0; border-radius: 14px; overflow: hidden; border: 0; box-shadow: 0 0 0 var(--bord) var(--encre); background: repeating-conic-gradient(#EEE9DE 0 25%, #fff 0 50%) 0 0 / 22px 22px; }
.zone-cadre img { display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.zone-cadre.cliquable { cursor: crosshair; touch-action: none; }
.zone-cible.editable { display: grid; place-items: center; }
.poignee-zone { line-height: 1; font-size: 1.3em; color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / .8); }
.edition-zone { display: grid; gap: 10px; }
.zone-point { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--or); border: 2px solid var(--encre); animation: rebond .4s var(--d, 0ms) backwards; }
.zone-point.moi { width: 26px; height: 26px; margin: -13px 0 0 -13px; background: var(--faux); box-shadow: 0 0 0 4px #fff; }
.zone-cible { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 4px dashed #fff; background: rgb(47 191 113 / .45); box-shadow: 0 0 0 3px var(--juste); pointer-events: none; }

.echelle-boutons { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.echelle-boutons.serre { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); }
.note { aspect-ratio: 1; border: var(--trait); border-radius: 14px; background: #fff; font-family: var(--titre); font-weight: 800; font-size: 1.4em; cursor: pointer; box-shadow: var(--ombre-petite); animation: pose .4s var(--rebond) backwards; }
.note:nth-child(2) { animation-delay: .05s; } .note:nth-child(3) { animation-delay: .1s; } .note:nth-child(4) { animation-delay: .15s; } .note:nth-child(5) { animation-delay: .2s; }
.note:active { transform: translate(3px, 3px); box-shadow: none; }
.visages .note { font-size: 2em; padding: 0; }
.echelle-bornes { display: flex; justify-content: space-between; font-weight: 800; font-size: .9em; gap: 1em; color: var(--encre-2); }

.envoye h1, .resultat h1, .verdict h1 { font-size: 1.85em; }
.cadenas { position: relative; width: 74px; height: 86px; margin-bottom: .4em; }
.cadenas .corps { position: absolute; bottom: 0; left: 0; right: 0; height: 52px; background: var(--or); border: var(--trait); border-radius: 12px; box-shadow: var(--ombre-petite); }
.cadenas .corps::after { content: ""; position: absolute; left: 50%; top: 14px; width: 10px; height: 18px; margin-left: -5px; border-radius: 5px; background: var(--encre); }
.cadenas .anse { position: absolute; left: 14px; right: 14px; top: 0; height: 52px; border: 7px solid var(--encre); border-bottom: 0; border-radius: 30px 30px 0 0; animation: ferme .5s .15s var(--rebond) backwards; }
@keyframes ferme { from { transform: translateY(-16px) rotate(-20deg); transform-origin: right bottom; } }
.recap-reponse { margin-top: .8em; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.puce { --c: #fff; display: inline-flex; align-items: center; gap: .35em; padding: .25em .8em .25em .3em; border-radius: 99px; background: var(--c); border: 2px solid var(--encre); font-weight: 800; }
.puce .pastille-forme { width: 1.6em; height: 1.6em; border-width: 2px; }
.petit-ordre { text-align: left; font-weight: 700; margin: .4em auto; display: inline-block; padding-left: 1.4em; }
.mots-envoyes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.message { font-weight: 800; font-size: 1.15em; text-align: center; }
.mon-dessin { width: 160px; border: var(--trait); border-radius: 12px; box-shadow: var(--ombre-petite); rotate: -3deg; }

.carte-mystere { width: 120px; height: 160px; border-radius: 18px; border: var(--trait); box-shadow: var(--ombre); background: repeating-linear-gradient(45deg, var(--krappo) 0 14px, #63CBE6 14px 28px); display: grid; place-items: center; margin-bottom: .6em; animation: tremble .5s ease-in-out infinite; }
.carte-mystere span { background: #fff; border: var(--trait); border-radius: 50%; width: 1.7em; height: 1.7em; display: grid; place-items: center; font-family: var(--titre); font-size: 2.6em; font-weight: 800; }
@keyframes tremble { 25% { transform: rotate(-6deg) scale(1.03); } 75% { transform: rotate(6deg) scale(1.03); } }
.resultat.retourne { animation: retourne .6s var(--rebond); }
@keyframes retourne { from { transform: perspective(800px) rotateY(90deg) scale(.8); opacity: 0; } }
.fond-juste { --papier: var(--juste-pale); }
.fond-faux { --papier: var(--faux-pale); }
.gain { font-family: var(--titre); font-size: 2.6em; font-weight: 800; background: var(--or); border: var(--trait); box-shadow: var(--ombre); padding: .05em .55em; border-radius: 18px; rotate: -3deg; }
.serie { font-weight: 800; }
.solution-joueur { margin-top: .6em; font-weight: 700; }
.explication { background: #FFF8D6; border: var(--trait); border-radius: 14px; padding: .8em 1em; margin-top: .8em; text-align: left; font-weight: 700; max-width: 900px; box-shadow: var(--ombre-petite); }
.resultat-libre { background: #fff; border: var(--trait); border-radius: 22px; box-shadow: var(--ombre); margin: 16px; }
.resultat-libre .question-texte { text-align: center; }
@media (min-width: 672px) { .resultat-libre { margin: 16px auto; } }

.grand-rang { font-family: var(--titre); font-size: 5em; font-weight: 800; line-height: 1; background: var(--or); border: var(--trait); box-shadow: var(--ombre); border-radius: 24px; padding: .05em .35em; rotate: -3deg; }
.devant { font-weight: 800; font-size: 1.1em; margin-top: .8em; }
.mini-podium { list-style: none; padding: 0; margin: 1em 0; width: min(100%, 360px); display: grid; gap: 8px; }
.mini-podium li { display: flex; gap: .6em; align-items: center; background: #fff; border: var(--trait); border-radius: 14px; padding: .5em .9em; font-weight: 800; box-shadow: var(--ombre-petite); }
.mini-podium li span:nth-child(2) { flex: 1; text-align: left; }
.diapo .details { font-size: 1.15em; font-weight: 700; }

.indices-joueur, .indices-ecran { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.indices-joueur li, .indices-ecran li { display: flex; align-items: center; gap: .6em; background: #fff; border: var(--trait); border-radius: 14px; padding: .55em .8em; font-weight: 800; box-shadow: var(--ombre-petite); text-align: left; animation: tombe-indice .6s var(--rebond); }
.indices-joueur li.vu, .indices-ecran li.vu { animation: none; }
.indices-joueur li.cache, .indices-ecran li.cache { background: transparent; border-style: dashed; box-shadow: none; color: var(--encre-2); animation: none; }
.indices-joueur .num, .indices-ecran .num { flex: none; width: 1.8em; height: 1.8em; border-radius: 50%; background: var(--or); border: 2px solid var(--encre); display: grid; place-items: center; font-size: .85em; }
.cache .num { background: #fff; }
@keyframes tombe-indice { from { transform: translateY(-24px) rotate(-4deg) scale(1.1); opacity: 0; } }

.relier { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.relier ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; }
.carte-lien { width: 100%; min-height: 3.2em; display: flex; align-items: center; gap: .4em; padding: .5em .7em; background: #fff; border: var(--trait); border-radius: 14px; font-weight: 800; cursor: pointer; text-align: left; box-shadow: var(--ombre-petite); transition: transform .15s var(--rebond); }
.carte-lien.lie { background: var(--c); }
.carte-lien.choisi { transform: translate(-2px, -2px) rotate(-2deg); box-shadow: 6px 6px 0 var(--encre); background: var(--c); outline: 3px dashed var(--encre); outline-offset: 3px; }
.carte-lien.cible { border-style: dashed; animation: appel 1.2s ease-in-out infinite; }
@keyframes appel { 50% { transform: scale(1.03); } }
.pastille-num { flex: none; width: 1.6em; height: 1.6em; border-radius: 50%; background: #fff; border: 2px solid var(--encre); display: grid; place-items: center; font-size: .82em; }

.liste-tri { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.element-tri { background: #fff; border: var(--trait); border-radius: 14px; padding: .6em .7em; box-shadow: var(--ombre-petite); display: grid; gap: 8px; transition: background .2s; }
.element-tri.range { background: color-mix(in srgb, var(--c) 30%, white); }
.element-tri .lib { font-weight: 800; font-size: 1.08em; }
.boutons-boites { display: flex; flex-wrap: wrap; gap: 6px; }
.boite-choix { flex: 1; min-width: 6em; border: 2px solid var(--encre); background: #fff; border-radius: 10px; padding: .4em .5em; font-weight: 800; cursor: pointer; }
.boite-choix[aria-pressed="true"] { background: var(--c); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .18); }

.centre-buzz { align-items: center; padding-top: 4vh; }
.gros-buzzer {
  width: min(72vw, 300px); aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--encre); cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #FF9A9A, var(--faux) 60%, #D63B3B);
  box-shadow: 0 12px 0 var(--encre); font-family: var(--titre); font-size: 3em; font-weight: 800; color: #fff;
  -webkit-text-stroke: 2px var(--encre); animation: pulse 1.4s ease-in-out infinite; touch-action: manipulation;
}
.gros-buzzer:active, .gros-buzzer.enfonce { transform: translateY(10px); box-shadow: 0 2px 0 var(--encre); animation: none; }
@keyframes pulse { 50% { transform: scale(1.04); } }

.atelier { align-items: stretch; }
.cadre-toile { border: var(--trait); border-radius: 16px; overflow: hidden; box-shadow: var(--ombre); background: #fff; line-height: 0; }
.toile { width: 100%; aspect-ratio: 1; touch-action: none; cursor: crosshair; }
.palette { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.crayon { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--encre); background: var(--c); cursor: pointer; padding: 0; }
.crayon[aria-pressed="true"] { transform: scale(1.18); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--encre); }
.crayon.gomme { background: repeating-linear-gradient(45deg, #fff 0 4px, #E4E1DA 4px 8px); }
.outils { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tailles { display: flex; gap: 6px; margin-right: auto; }
.taille { width: 2.4em; height: 2.4em; border-radius: 10px; border: 2px solid var(--encre); background: #fff; display: grid; place-items: center; cursor: pointer; }
.taille i { width: var(--t); height: var(--t); border-radius: 50%; background: var(--encre); }
.taille[aria-pressed="true"] { background: var(--or); }

.synthese { width: 100%; }
.barres { display: flex; gap: 16px; align-items: stretch; justify-content: center; min-height: 240px; width: 100%; }
.barre { --c: var(--krappo); flex: 1; max-width: 230px; display: flex; flex-direction: column; gap: 8px; min-width: 0; transition: opacity .5s, filter .5s; }
.barre-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; min-height: 120px; }
.barre-valeur { text-align: center; font-family: var(--titre); font-weight: 800; font-size: 1.35em; }
.barre-remplie { position: relative; background: var(--c); border: var(--trait); border-radius: 12px 12px 4px 4px; transform-origin: bottom; animation: pousse .8s var(--d, 0ms) var(--rebond) backwards; }
.barre-remplie.vu { animation: none; }
@keyframes pousse { from { transform: scaleY(0); } }
.barre-pied { display: flex; align-items: center; justify-content: center; gap: .3em; padding: .4em .5em; border-radius: 12px; background: #fff; border: var(--trait); font-weight: 800; text-align: center; font-size: .95em; min-height: 2.8em; min-width: 0; overflow-wrap: anywhere; }
.barre-pied .pastille-forme { width: 1.8em; height: 1.8em; border-width: 2px; }
.choix-lib { display: inline-flex; align-items: center; justify-content: center; gap: .35em; min-width: 0; flex-wrap: wrap; overflow-wrap: anywhere; hyphens: auto; }
.barre-pct { text-align: center; font-weight: 800; color: var(--encre-2); font-size: .9em; transition: opacity .4s; }
.barre-pied { position: relative; }
.tampon { position: absolute; top: -.85em; right: -.6em; width: 1.8em; height: 1.8em; z-index: 2; border-radius: 50%; background: var(--juste); border: var(--trait); display: grid; place-items: center; font-size: 1.6em; font-weight: 900; box-shadow: var(--ombre-petite); }
.synthese.revele .terne { opacity: .32; filter: grayscale(.7); }
.synthese.revele .barre.juste .barre-remplie { box-shadow: 0 0 0 5px rgb(47 191 113 / .55), var(--ombre-petite); }
.synthese.revele .juste { animation: hourra .8s var(--rebond); }
@keyframes hourra { 30% { transform: scale(1.06) rotate(-2deg); } 60% { transform: scale(.98) rotate(1deg); } }

.a-reveler { transition: opacity .45s var(--d, 0ms), transform .65s var(--rebond) var(--d, 0ms); }
.suspense:not(.revele) .a-reveler { opacity: 0; transform: scale(.4) rotate(-10deg); }
.suspense:not(.revele) .zone-cible.a-reveler { transform: translate(-50%, -50%) scale(3); }
.suspense:not(.revele) .reglette-cible.a-reveler { transform: translateY(-60px); }
.ecran-resultat.suspense:not(.monte) .barre-remplie { transform: scaleY(0); animation: none; }
.ecran-resultat.suspense .barre-remplie { transition: transform 1.5s cubic-bezier(.2, .9, .3, 1) var(--d, 0ms); animation: none; }
.ecran-resultat.suspense:not(.revele) .barre-pct { opacity: 0; }
.ecran-resultat.suspense:not(.revele) .reglette-point { animation-play-state: paused; }
.ecran-resultat.suspense.monte:not(.revele) .synthese-finale { animation: halete 1s ease-in-out infinite; }
@keyframes halete { 50% { transform: scale(1.01); } }

.nuage { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .15em .55em; padding: 1em; line-height: 1.05; }
.mot { --c: var(--krappo); font-family: var(--titre); font-weight: 800; color: color-mix(in srgb, var(--c) 62%, var(--encre)); rotate: var(--r, 0deg); animation: rebond .55s var(--d) var(--rebond) backwards; }
.mot.vu, .idee.vu, .cadre-dessin.vu { animation: none; }
.mur { columns: 3 220px; column-gap: 14px; width: 100%; }
.idee { --c: var(--krappo); break-inside: avoid; margin-bottom: 14px; background: color-mix(in srgb, var(--c) 35%, white); border: var(--trait); border-radius: 6px 6px 18px 6px; padding: .8em 1em; box-shadow: var(--ombre-petite); font-weight: 700; text-align: left; rotate: var(--r, 0deg); animation: colle .5s var(--rebond); }
@keyframes colle { from { transform: scale(1.4) rotate(8deg); opacity: 0; } }
.retire { opacity: 0 !important; transform: scale(.6) !important; transition: .3s; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; width: 100%; }
.cadre-dessin { margin: 0; background: #fff; border: var(--trait); padding: 8px 8px 4px; box-shadow: var(--ombre-petite); rotate: var(--r, 0deg); animation: colle .5s var(--rebond); cursor: pointer; }
.cadre-dessin img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border: 1px solid #E4E1DA; }
.cadre-dessin figcaption { text-align: center; font-weight: 800; padding-top: 4px; font-size: .9em; }
.groupes { list-style: none; padding: 0; margin: .6em auto; display: grid; gap: 8px; max-width: 640px; width: 100%; }
.groupes li { display: flex; justify-content: space-between; gap: 1em; padding: .5em .9em; border-radius: 12px; background: #fff; border: var(--trait); font-weight: 800; transition: background .4s, opacity .4s; }
.synthese.revele .groupes li.juste { background: var(--juste-pale); }
.synthese.revele .groupes li.juste::before { content: "✓"; color: var(--juste); margin-right: -.6em; }
.solution { font-size: 1.25em; text-align: center; margin-bottom: .6em; }
.solution strong { background: var(--juste-pale); border: 2px solid var(--encre); border-radius: 10px; padding: 0 .4em; }
.texte-res, .nombre-res, .echelle-res { width: 100%; text-align: center; }
.reglette { position: relative; height: 80px; margin: 2.4em 12px .3em; border-bottom: 5px solid var(--encre); }
.reglette-zone { position: absolute; bottom: 0; height: 100%; background: rgb(47 191 113 / .22); border: 2px dashed var(--juste); border-bottom: 0; border-radius: 8px 8px 0 0; }
.reglette-cible { position: absolute; bottom: -5px; width: 5px; height: calc(100% + 16px); background: var(--juste); margin-left: -2px; }
.reglette-cible::before { content: "🎯"; position: absolute; top: -1.3em; left: 50%; transform: translateX(-50%); font-size: 1.3em; }
.reglette-point { position: absolute; bottom: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--or); border: 2px solid var(--encre); animation: rebond .4s var(--d) backwards; }
.page-ecran .reglette-point { width: 18px; height: 18px; margin-left: -9px; }
.reglette-point:nth-child(3n) { bottom: 20px; }
.reglette-point:nth-child(3n+1) { bottom: 36px; }
.reglette-bornes { display: flex; justify-content: space-between; font-weight: 800; color: var(--encre-2); margin: 0 12px; }
.ordre-res, .paires-res { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 10px; width: min(100%, 760px); }
.ordre-res li, .paires-res li { display: flex; align-items: center; gap: .8em; background: #fff; border: var(--trait); border-radius: 14px; padding: .55em 1em; font-weight: 800; box-shadow: var(--ombre-petite); }
.ordre-res .rang { background: var(--juste); border: 2px solid var(--encre); width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ordre-res .lib, .paires-res .g, .paires-res .d { flex: 1; }
.paires-res .g { background: color-mix(in srgb, var(--c) 40%, white); border-radius: 8px; padding: .1em .5em; }
.paires-res .lien { font-size: 1.3em; }
.ordre-res .pct, .paires-res .pct { color: var(--encre-2); font-weight: 700; font-size: .9em; }
.boites-res { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; width: 100%; }
.boite { --c: var(--krappo); background: color-mix(in srgb, var(--c) 28%, white); border: var(--trait); border-radius: 16px; padding: .7em .9em; box-shadow: var(--ombre-petite); }
.boite h4 { text-align: center; font-size: 1.2em; margin: 0 0 .4em; }
.boite ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.boite li { background: #fff; border: 2px solid var(--encre); border-radius: 10px; padding: .25em .6em; font-weight: 800; display: flex; justify-content: space-between; gap: .5em; }
.boite li small { color: var(--encre-2); }
.file-buzz { list-style: none; padding: 0; margin: 0 auto; display: grid; gap: 8px; width: min(100%, 720px); }
.file-buzz li { display: flex; align-items: center; gap: .7em; background: #fff; border: var(--trait); border-radius: 14px; padding: .5em .8em; font-weight: 800; box-shadow: var(--ombre-petite); animation: monte .35s var(--rebond); }
.file-buzz .rang { font-family: var(--titre); width: 1.8em; text-align: center; }
.file-buzz .avatar { font-size: 1.4em; }
.file-buzz .pseudo { flex: 1; }
.file-buzz .temps { color: var(--encre-2); font-size: .9em; }
.file-buzz li.juste { background: var(--juste-pale); }
.file-buzz li.rate { background: var(--faux-pale); opacity: .7; }
.file-buzz li.a-la-main { background: var(--or); box-shadow: 6px 6px 0 var(--encre); }
.file-buzz .verdict { font-size: 1.3em; }
.file-buzz .actions { display: flex; gap: 6px; }
.echelle-res .barres { min-height: 180px; }

.barre-haut {
  display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: #fff;
  border-bottom: var(--trait); position: sticky; top: 0; z-index: 10; flex-wrap: wrap;
}
.marque { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--encre); }
.marque img { height: 30px; }
.marque span { font-family: var(--titre); font-weight: 800; font-size: 1.1em; background: var(--or); border: 2px solid var(--encre); border-radius: 8px; padding: 0 .3em; rotate: 4deg; }
.onglets { display: flex; gap: 6px; flex: 1; }
.onglets a { padding: .4em .9em; border-radius: 10px; text-decoration: none; color: var(--encre); font-weight: 800; border: 2px solid transparent; }
.onglets a:hover { border-color: var(--encre); }
.onglets a[aria-current="page"] { background: var(--krappo); border-color: var(--encre); box-shadow: var(--ombre-petite); }
.qui { color: var(--encre-2); font-weight: 800; }
.contenu { max-width: 1120px; margin: 0 auto; padding: 26px 16px 60px; }
.titre-page { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.titre-page h1 { margin: 0; font-size: 2.1em; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bloc { background: var(--carte); border: var(--trait); border-radius: var(--rayon); padding: 20px; box-shadow: var(--ombre); margin-bottom: 22px; }
.bloc h2 { font-size: 1.25em; }
.vide-grand { text-align: center; padding: 50px 20px; background: var(--carte); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); }
.vide-grand .actions { justify-content: center; margin-top: 1em; }

.grille-quiz { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.carte-quiz { background: var(--carte); border: var(--trait); border-radius: var(--rayon); box-shadow: var(--ombre); display: flex; flex-direction: column; transition: transform .2s var(--rebond), box-shadow .2s; }
.carte-quiz:nth-child(odd) { rotate: -.6deg; } .carte-quiz:nth-child(even) { rotate: .6deg; }
.carte-quiz:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--encre); }
.couverture { height: 120px; background-size: cover; background-position: center; border-radius: calc(var(--rayon) - 3px) calc(var(--rayon) - 3px) 0 0; border-bottom: var(--trait); position: relative; }
.couverture.sans { background-color: var(--krappo); background-image: radial-gradient(rgb(255 255 255 / .35) 2px, transparent 2.5px); background-size: 16px 16px; }
.couverture .badge { position: absolute; top: 10px; left: 10px; background: #fff; }
.carte-corps { padding: 14px 16px 6px; flex: 1; }
.carte-corps h3 { font-size: 1.2em; margin-bottom: .3em; }
.meta { color: var(--encre-2); font-size: .85em; margin: 0; }
.carte-actions { display: flex; gap: 6px; padding: 10px 16px 16px; align-items: center; }
.menu { position: relative; margin-left: auto; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu-liste { position: absolute; right: 0; bottom: calc(100% + 8px); background: #fff; border: var(--trait); border-radius: 14px; box-shadow: var(--ombre); padding: 6px; display: grid; min-width: 180px; z-index: 20; }
.menu-liste button { background: none; border: 0; text-align: left; padding: .55em .8em; border-radius: 8px; cursor: pointer; font-weight: 800; }
.menu-liste button:hover { background: #FFF4E2; }

.liste-parties { display: grid; gap: 8px; }
.partie-en-cours { display: flex; align-items: center; gap: 1em; padding: .8em 1em; border-radius: 14px; background: #FFF1C9; border: 2px solid var(--encre); text-decoration: none; color: var(--encre); flex-wrap: wrap; }
.partie-en-cours span:nth-child(2) { flex: 1; color: var(--encre-2); }

.tableau { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--carte); border: var(--trait); border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); }
.bloc .tableau { box-shadow: none; border-width: 2px; }
.tableau th, .tableau td { padding: .7em 1em; text-align: left; border-bottom: 1.5px solid #EAE5DA; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau th { font-size: .78em; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-2); background: #FFF8EC; }
.tableau td.droite { text-align: right; }
.question-bilan { border-top: 1.5px solid #EAE5DA; }
.question-bilan summary { display: flex; gap: .8em; align-items: center; padding: .8em .2em; cursor: pointer; flex-wrap: wrap; }
.question-bilan .num { background: var(--encre); color: #fff; border-radius: 8px; padding: .1em .55em; font-weight: 800; }
.question-bilan .lib { flex: 1; font-weight: 800; min-width: 200px; }
.question-bilan .taux { font-weight: 800; padding: .1em .6em; border-radius: 99px; border: 2px solid var(--encre); }
.question-bilan .taux.bon { background: var(--juste-pale); }
.question-bilan .taux.faible { background: var(--faux-pale); }
.bilan-synthese { padding: 1em 0 1.5em; }

.formulaire { display: grid; gap: 14px; max-width: 520px; }
.formulaire label { display: grid; gap: 4px; font-weight: 800; }
.lien-compte { display: flex; gap: 14px; align-items: center; }
.lien-compte > div { flex: 1; }
.lien-compte p { margin: 0; }

.dialogue { border: var(--trait); border-radius: 22px; padding: 24px; width: min(94vw, 540px); box-shadow: 8px 8px 0 var(--encre); max-height: 90vh; overflow: auto; background: #fff; }
.dialogue[open] { animation: monte .3s var(--rebond); }
.dialogue.large { width: min(94vw, 900px); }
.dialogue::backdrop { background: rgb(28 27 41 / .5); }
.dialogue h2 { font-size: 1.5em; }
.actions-dialogue { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.ligne-champ { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .5em 0; font-weight: 800; }
.famille-types h3 { font-size: 1em; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-2); margin: 1.1em 0 .6em; }
.grille-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.type-carte { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px; border-radius: 14px; border: 2px solid var(--encre); background: #fff; cursor: pointer; transition: transform .15s var(--rebond), box-shadow .15s; }
.type-carte:hover, .type-carte.actif { background: #EAF8FC; transform: translate(-2px, -2px); box-shadow: var(--ombre-petite); }
.type-carte .icone { font-size: 1.7em; }
.type-carte small { color: var(--encre-2); line-height: 1.3; }
.type-carte .badge { position: absolute; top: 10px; right: 10px; }

.barre-editeur .champ-titre { flex: 1; min-width: 200px; font-family: var(--titre); font-size: 1.3em; font-weight: 800; border: 2px solid transparent; border-radius: 10px; padding: .25em .6em; background: #FFF4E2; }
.barre-editeur .champ-titre:focus { border-color: var(--encre); outline: none; background: #fff; }
.editeur { display: grid; grid-template-columns: 290px 1fr; gap: 24px; max-width: 1280px; margin: 0 auto; padding: 22px 16px 60px; align-items: start; }
.colonne-questions { position: sticky; top: 80px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-height: calc(100vh - 100px); overflow: auto; overflow-x: hidden; padding: 4px 8px 8px 4px; }
.liste-questions { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.vignette { display: flex; gap: 8px; align-items: center; padding: 10px; border-radius: 12px; background: #fff; cursor: pointer; border: 2px solid var(--encre); font-size: .92em; transition: transform .15s var(--rebond); }
.vignette:hover { transform: translateX(3px); }
.vignette.active { background: var(--krappo); box-shadow: var(--ombre-petite); }
.vignette.survol { border-style: dashed; background: var(--or); }
.vignette.tenu { opacity: .4; }
.vignette .num { font-weight: 900; min-width: 1.4em; }
.vignette .lib { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.vignette .duree { color: var(--encre-2); font-size: .85em; }
.vignette.active .duree { color: var(--encre); }
.bouton.ajouter { width: 100%; }
.panneau-question { background: #fff; border: var(--trait); border-radius: 22px; box-shadow: var(--ombre); padding: 22px; display: grid; gap: 16px; }
.entete-panneau { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.type-actuel { display: flex; align-items: center; gap: .5em; background: var(--or); border: 2px solid var(--encre); border-radius: 12px; padding: .35em .8em; cursor: pointer; box-shadow: var(--ombre-petite); }
.type-actuel small { text-decoration: underline; }
.aide-type { color: var(--encre-2); margin: -8px 0 0; }
.intitule { font-family: var(--titre); font-size: 1.4em; font-weight: 800; }
.bloc-media { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bloc-media.sans-media { border: 2px dashed var(--encre-2); border-radius: 14px; padding: 14px; }
.bloc-media .media { max-height: 220px; margin: 0; }
.options-media { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.choix-edition { display: grid; gap: 8px; justify-items: start; }
.liste-choix { display: grid; gap: 8px; width: 100%; }
.choix-ligne { --c: var(--krappo); display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 14px; border: 2px solid var(--encre); background: #fff; }
.choix-ligne.bonne { background: var(--juste-pale); }
.choix-ligne .pastille { flex: none; width: 2.6em; height: 2.6em; border-radius: 10px; background: var(--c); border: 2px solid var(--encre); display: grid; place-items: center; }
.choix-ligne .pastille .pastille-forme { width: 2em; height: 2em; border-width: 2px; }
.choix-ligne .champ { border: 0; padding: .5em; }
.choix-ligne .champ:focus { box-shadow: none; }
.bascule-bonne { flex: none; border: 2px solid var(--encre); background: #fff; border-radius: 99px; padding: .3em .8em; font-weight: 800; cursor: pointer; color: var(--encre-2); }
.bascule-bonne[aria-pressed="true"] { background: var(--juste); color: var(--encre); }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mini-champ { display: grid; gap: 4px; font-weight: 800; font-size: .92em; }
.mini-champ .champ { width: 100%; }
.pleine { grid-column: 1 / -1; }
.bloc-champ { display: grid; gap: 6px; font-weight: 800; }
.liste-elements { display: grid; gap: 6px; padding-left: 1.4em; margin: 8px 0; }
.liste-elements li .champ { width: calc(100% - 5em); margin-right: 6px; }
.liste-paires, .liste-boites, .liste-elements-tri { display: grid; gap: 8px; margin-bottom: 8px; }
.ligne-paire, .ligne-boite, .ligne-tri { --c: #fff; display: flex; align-items: center; gap: 8px; }
.ligne-paire .champ:first-child, .ligne-boite .champ { background: color-mix(in srgb, var(--c) 35%, white); }
.ligne-paire .lien { font-size: 1.3em; font-weight: 900; }
.ligne-tri select { flex: none; }
.ligne-reglages { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 10px; border-top: 2px dashed #E4DED2; }
.ligne-reglages label { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.specifique:empty { display: none; }
.couverture-apercu { height: 140px; border-radius: 14px; border: 2px solid var(--encre); background: #FFF4E2; display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; }
.couverture-apercu img { width: 100%; height: 100%; object-fit: cover; }

.page-ecran { font-size: clamp(12px, min(1.2vw, 2.1vh), 26px); overflow: hidden; }
.page-ecran #app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.page-ecran #app > section { flex: 1; padding: 2vh 3vw 1.4vh; display: flex; flex-direction: column; gap: 1.6vh; min-height: 0; overflow: auto; }
.page-ecran #app > section > * { flex-shrink: 0; }
.page-ecran #app > section > .zone-reponses, .page-ecran #app > section > .synthese-finale, .page-ecran #app > section > .synthese-direct { flex: 1 1 auto; min-height: 0; overflow: auto; }
.barre-ecran { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 2vw; background: #fff; border-top: var(--trait); flex-wrap: wrap; position: sticky; bottom: 0; z-index: 5; }
.barre-ecran .gauche, .barre-ecran .droite { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.code-rappel { font-weight: 800; color: var(--encre-2); }
.code-rappel strong { color: var(--encre); letter-spacing: .08em; }

.ecran-salle { display: grid !important; grid-template-columns: minmax(300px, 36%) 1fr; gap: 3vw !important; align-items: start; }
.rejoindre { padding: 3vh 2vw; text-align: center; rotate: -1.5deg; animation: tombe-sticker .7s var(--rebond); }
.rejoindre p { margin: 0; font-weight: 800; color: var(--encre-2); }
.rejoindre .adresse { font-family: var(--titre); font-size: 1.6em; color: var(--encre); margin: .1em 0 .3em; word-break: break-all; }
.code-geant { display: flex; justify-content: center; gap: .12em; margin: .2em 0 .5em; }
.code-geant span { font-family: var(--titre); font-size: 3.6em; font-weight: 800; line-height: 1; background: var(--or); border: var(--trait); border-radius: 14px; box-shadow: var(--ombre-petite); padding: .08em .14em; animation: claque .5s var(--d) var(--rebond) backwards; }
.code-geant span:nth-child(even) { background: var(--krappo); rotate: 3deg; }
.code-geant span:nth-child(odd) { rotate: -3deg; }
.code-geant span:nth-child(3) { margin-right: .25em; }
.qr { width: min(230px, 62%); margin: 0 auto; border: var(--trait); border-radius: 12px; padding: 6px; background: #fff; }
.qr svg { width: 100%; height: auto; display: block; }
.titre-partie { font-size: 2.6em; }
.salle-compteur { display: inline-flex; gap: .4em; align-items: center; font-family: var(--titre); font-size: 1.5em; font-weight: 800; background: #fff; border: var(--trait); box-shadow: var(--ombre-petite); padding: .15em .8em; border-radius: 99px; margin-bottom: 1em; }
.nuage-joueurs { display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start; max-height: 58vh; overflow: auto; padding: 4px 8px 8px 4px; }
.bulle-joueur { --c: var(--krappo); display: inline-flex; align-items: center; gap: .4em; padding: .35em .95em .35em .4em; border-radius: 99px; background: color-mix(in srgb, var(--c) 40%, white); border: var(--trait); font-weight: 800; font-size: 1.1em; cursor: pointer; box-shadow: var(--ombre-petite); animation: arrive .55s var(--rebond), flotte 3.4s var(--d) ease-in-out infinite; }
.bulle-joueur.vu { animation: flotte 3.4s var(--d) ease-in-out infinite; }
@keyframes arrive { from { transform: scale(0) rotate(-20deg); } }
.bulle-joueur:hover { text-decoration: line-through; background: var(--faux-pale); }
.bulle-joueur.parti { opacity: .4; animation: none; }
.bulle-joueur .avatar { font-size: 1.35em; background: #fff; border: 2px solid var(--encre); border-radius: 50%; width: 1.5em; height: 1.5em; display: grid; place-items: center; }
.aide-salle { margin-top: 1em; }

.entete-question { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.espace { flex: 1; }
.pastille { background: #fff; border: 2px solid var(--encre); padding: .22em .85em; border-radius: 99px; font-weight: 800; }
.pastille.progression { background: var(--encre); color: #fff; font-family: var(--titre); }
.pastille.double { background: var(--or); animation: pulse 1.2s ease-in-out infinite; }
.pastille.taux.bon { background: var(--juste-pale); }
.pastille.taux.faible { background: var(--faux-pale); }
.compteur-pastille { display: inline-flex; align-items: center; gap: .45em; background: #fff; border: 2px solid var(--encre); border-radius: 99px; padding: .18em .75em; font-weight: 800; }
.compteur-pastille b { font-family: var(--titre); min-width: 2.6em; text-align: center; }
.jauge-mini { width: 5em; height: .55em; background: #EEE9DE; border: 1.5px solid var(--encre); border-radius: 99px; overflow: hidden; }
.jauge-mini i { display: block; height: 100%; width: 0; background: var(--juste); transition: width .4s var(--rebond); }
.compteur-pastille.tilt { animation: tilt .35s var(--rebond); }
@keyframes tilt { 40% { transform: scale(1.15) rotate(-4deg); } }

.page-ecran #app > .ecran-question.intro, .page-ecran #app > .ecran-question.diapo { align-items: center; justify-content: center; text-align: center; gap: 3vh; }
.ecran-question.intro .intro-numero { font-size: 1.4em; }
.intro-type { animation: monte .4s .2s var(--rebond) backwards; }
.question-geante { font-size: 3.2em; max-width: 26ch; margin: 0; animation: monte .6s .35s var(--rebond) backwards; }
.ecran-question.intro .lecture-barre { width: min(60%, 700px); height: 18px; margin: 0; }
.ecran-question.diapo .details { padding: .8em 1.4em; font-size: 1.4em; max-width: 40ch; }

.carte-question { position: relative; padding: 1.1em 7.5em 1.1em 1.4em; rotate: -.4deg; animation: tombe-sticker .5s var(--rebond); }
.carte-question h1 { font-size: 2.15em; margin: 0; text-align: center; }
.badge-chrono { position: absolute; right: -.5em; top: 50%; translate: 0 -50%; }
.chrono { width: 7.4em; height: 7.4em; display: block; filter: drop-shadow(4px 4px 0 var(--encre)); }
.chrono-fond { fill: #fff; stroke: var(--encre); stroke-width: 3; }
.chrono-arc { fill: none; stroke: var(--krappo); stroke-width: 10; stroke-linecap: round; transform: rotate(-90deg) scale(.86); transform-origin: 50% 50%; transition: stroke .3s; }
.chrono.urgent .chrono-arc { stroke: var(--faux); }
.chrono.urgent { animation: tremble .4s ease-in-out infinite; }
.chrono-texte { font-size: 34px; font-weight: 800; fill: var(--encre); font-family: var(--titre); }
.sans-chrono { width: 3.4em; height: 3.4em; border-radius: 50%; background: #fff; border: var(--trait); box-shadow: var(--ombre-petite); display: grid; place-items: center; font-size: 2em; font-weight: 900; }
.media-zone { display: flex; justify-content: center; min-height: 0; }
.media-zone .media { max-height: 36vh; margin: 0; box-shadow: var(--ombre); }
.zone-reponses { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.type-buzzer .zone-reponses { justify-content: flex-start; overflow: auto; padding: 4px 10px 10px 4px; }
.synthese-direct { flex: 1; background: #fff; border: var(--trait); border-radius: 22px; box-shadow: var(--ombre); padding: 2vh 2vw; display: flex; align-items: center; justify-content: center; overflow: auto; min-height: 30vh; }
.synthese-direct .nuage { font-size: 1.6em; }
.synthese-direct [data-id] { cursor: pointer; }
.page-ecran .idee { font-size: 1.3em; }
.page-ecran .mur { columns: 3 320px; align-self: flex-start; }

.tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 2vh 1.6vw; }
.tuiles.six { grid-template-columns: 1fr 1fr 1fr; }
.tuile { --c: var(--krappo); background: var(--c); border: var(--trait); border-radius: 20px; box-shadow: var(--ombre); padding: 2.2vh 1.4vw; display: flex; align-items: center; gap: .7em; font-family: var(--titre); font-weight: 800; font-size: 1.55em; rotate: var(--r, 0deg); animation: pose .5s var(--d, 0ms) var(--rebond) backwards; }
.tuile .pastille-forme { font-size: .8em; }
.tuiles:not(.six) .tuile { min-height: 15vh; }
.tuiles.deux .tuile { justify-content: center; font-size: 2.1em; }
.ambiance-sobre .tuile { background: #fff; }
.consigne-ecran { padding: 1em; text-align: center; font-family: var(--titre); font-size: 1.8em; font-weight: 800; }
.consigne-ecran.petite { font-size: 1.2em; padding: .2em; }
.ordre-ecran ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.ordre-ecran li { padding: .5em 1em; font-weight: 800; font-size: 1.35em; animation: pose .5s var(--d) var(--rebond) backwards; }
.ordre-ecran .borne-ordre { margin: .7em 0; font-size: 1.1em; }
.zone-cadre.ecran { --zone-max: 52vh; }
.paires-ecran { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2vw; align-items: center; }
.paires-ecran ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.paires-ecran li { padding: .5em 1em; font-weight: 800; font-size: 1.3em; text-align: center; animation: pose .5s var(--d) var(--rebond) backwards; }
.paires-ecran ul:first-child li { background: color-mix(in srgb, var(--c) 45%, white); }
.liens-deco { font-size: 3em; }
.categories-ecran { display: grid; gap: 3vh; }
.boites { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2vw; }
.boites .boite { min-height: 14vh; display: grid; place-items: center; box-shadow: var(--ombre); }
.boites .boite h4 { font-size: 1.7em; }
.jetons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.jeton { background: #fff; border: var(--trait); border-radius: 12px; padding: .35em .9em; font-weight: 800; font-size: 1.2em; box-shadow: var(--ombre-petite); rotate: var(--r); animation: pose .5s var(--d) var(--rebond) backwards; }
.devinette { width: min(100%, 1000px); margin: 0 auto; display: grid; gap: 1.5vh; }
.indices-ecran li { font-size: 1.45em; padding: .6em 1em; }
.zone-buzzer { display: grid; gap: 2vh; justify-items: center; }
.buzzer-attente { display: flex; align-items: center; gap: .6em; font-family: var(--titre); font-size: 1.6em; font-weight: 800; }
.cloche { font-size: 2em; display: inline-block; animation: sonne 1s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes sonne { 20% { transform: rotate(18deg); } 40% { transform: rotate(-16deg); } 60% { transform: rotate(10deg); } 80% { transform: rotate(-6deg); } }
.reponse-animateur { background: #FFF8D6; border: 2px dashed var(--encre); border-radius: 12px; padding: .4em 1em; font-weight: 700; }
.file-buzz.direct li { font-size: 1.3em; }
.page-ecran .ordre-res li, .page-ecran .paires-res li, .page-ecran .groupes li { font-size: 1.35em; }
.page-ecran .ordre-res, .page-ecran .paires-res { width: min(100%, 1000px); }
.page-ecran .boite li { font-size: 1.3em; }
.page-ecran .boite h4 { font-size: 1.7em; }

.question-texte-ecran { padding: .6em 1em; text-align: center; font-size: 1.9em; margin: 0; }
.synthese-finale { padding: 2.5vh 2vw; flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; }
.synthese-finale > * { max-width: 1400px; }
.ecran-resultat .zone-cadre { --zone-max: 54vh; }
.ecran-resultat .barres { min-height: 34vh; }
.ecran-resultat .explication { margin: 0 auto; font-size: 1.15em; }
.page-ecran .barre-valeur { font-size: 1.6em; }
.tampon-fin { position: fixed; inset: 0; display: grid; place-items: center; z-index: 50; pointer-events: none; background: rgb(255 244 226 / .55); animation: efface .9s ease-in forwards; }
.tampon-fin span { font-family: var(--titre); font-size: clamp(2.5rem, 7vw, 7rem); font-weight: 800; color: var(--faux); border: .12em solid var(--faux); border-radius: .25em; padding: .1em .5em; rotate: -8deg; background: rgb(255 255 255 / .85); animation: tamponne .45s var(--rebond); }
@keyframes tamponne { from { transform: scale(3); opacity: 0; } }
@keyframes efface { 80% { opacity: 1; } to { opacity: 0; } }

.ecran-classement h1, .ecran-fin h1 { text-align: center; font-size: 2.8em; }
.liste-classement { list-style: none; padding: 0; margin: 0 auto; width: min(100%, 1100px); display: grid; gap: 10px; }
.liste-classement li { --c: var(--krappo); position: relative; display: grid; grid-template-columns: 2.2em 2.2em minmax(6em, 14em) 1fr auto; align-items: center; gap: 1em; padding: .55em 1em; font-weight: 800; font-size: 1.3em; box-shadow: var(--ombre-petite); }
.liste-classement li.glisse { transition: transform 1.1s cubic-bezier(.5, 0, .2, 1); }
.liste-classement .rang { font-family: var(--titre); font-size: 1.2em; text-align: center; }
.liste-classement li:first-child { background: #FFF1C9; }
.liste-classement li:first-child .rang::before { content: "👑"; position: absolute; left: -.6em; top: -.7em; rotate: -20deg; font-size: 1.1em; }
.liste-classement .avatar { font-size: 1.3em; }
.liste-classement .pseudo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-classement .points { font-family: var(--titre); text-align: right; min-width: 5em; }
.liste-classement .gain { display: block; font-size: .6em; color: #178A4C; background: none; border: 0; box-shadow: none; padding: 0; rotate: 0deg; opacity: 0; transform: translateY(6px); transition: .4s .9s var(--rebond); }
.liste-classement li.compte .gain { opacity: 1; transform: none; }
.liste-classement .monte { position: absolute; right: -.6em; top: -.6em; background: var(--juste); border: 2px solid var(--encre); border-radius: 99px; padding: 0 .45em; font-size: .7em; opacity: 0; transform: scale(0); transition: .4s var(--rebond); }
.liste-classement.fini .monte { opacity: 1; transform: none; }
.jauge { height: .8em; background: #EEE9DE; border: 2px solid var(--encre); border-radius: 99px; overflow: hidden; }
.jauge i { display: block; height: 100%; background: var(--c); transition: width 1.3s cubic-bezier(.2, .9, .3, 1); }

.annonce { text-align: center; font-family: var(--titre); font-size: 2em; font-weight: 800; height: 1.3em; opacity: 0; }
.spectacle .annonce { animation: annonce 2.2s 2.6s ease-in-out both; }
@keyframes annonce { 15%, 80% { opacity: 1; transform: none; } from { opacity: 0; transform: translateY(10px); } to { opacity: 0; } }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1.5vw; flex: 1; min-height: 0; }
.marche { position: relative; display: flex; flex-direction: column; align-items: center; width: min(26vw, 300px); }
.marche.vide { visibility: hidden; }
.podium-joueur { display: flex; flex-direction: column; align-items: center; gap: .2em; padding: .8em 1em; width: 100%; text-align: center; margin-bottom: 12px; }
.podium-joueur .avatar { font-size: 2.4em; line-height: 1; }
.podium-joueur .pseudo { font-family: var(--titre); font-weight: 800; font-size: 1.35em; overflow-wrap: anywhere; }
.podium-joueur .points { font-weight: 800; color: var(--encre-2); }
.socle { width: 100%; display: grid; place-items: center; border: var(--trait); border-bottom: 0; border-radius: 16px 16px 0 0; transform-origin: bottom; }
.socle span { font-family: var(--titre); font-size: 3em; font-weight: 800; background: #fff; border: var(--trait); border-radius: 50%; width: 1.4em; height: 1.4em; display: grid; place-items: center; }
.marche.p1 .socle { height: 19vh; background: var(--or); }
.marche.p2 .socle { height: 13vh; background: #DCE6EE; }
.marche.p3 .socle { height: 8vh; background: #F2B98A; }
.spectacle .marche .socle { animation: pousse .7s var(--rebond) backwards; }
.spectacle .marche .podium-joueur { animation: tombe-sticker .7s var(--rebond) backwards; }
.spectacle .marche.p3 .socle { animation-delay: .3s; } .spectacle .marche.p3 .podium-joueur { animation-delay: .6s; }
.spectacle .marche.p2 .socle { animation-delay: 1.4s; } .spectacle .marche.p2 .podium-joueur { animation-delay: 1.7s; }
.spectacle .marche.p1 .socle { animation-delay: 4.4s; } .spectacle .marche.p1 .podium-joueur { animation-delay: 4.8s; }
.marche.p1::before { content: ""; position: absolute; bottom: 0; left: 50%; width: 180%; height: 140%; translate: -50% 0; background: radial-gradient(ellipse at 50% 100%, rgb(255 197 49 / .45), transparent 65%); z-index: -1; }
.spectacle .marche.p1::before { animation: projecteur 1s 4.6s ease-out backwards; }
@keyframes projecteur { from { opacity: 0; transform: scaleY(.2); } }
.suite-classement { columns: 3 220px; font-weight: 800; width: min(100%, 1000px); margin: 0 auto; }
.suite-classement li { margin-bottom: .3em; }
.suite-classement b { margin-left: .6em; color: var(--encre-2); }

.confettis { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confettis i { position: absolute; top: -20px; width: 11px; height: 17px; border-radius: 2px; border: 1.5px solid var(--encre); animation: chute linear forwards; }
@keyframes chute { to { top: 110vh; transform: rotate(720deg) translateX(60px); } }
.etincelles { position: fixed; z-index: 70; pointer-events: none; }
.etincelles i { position: absolute; width: 12px; height: 12px; margin: -6px; border-radius: 50%; border: 2px solid var(--encre); animation: eclate .9s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes eclate { to { transform: translate(var(--x), var(--y)) scale(.3); opacity: 0; } }

@media (max-width: 860px) {
  .editeur { grid-template-columns: 1fr; }
  .colonne-questions { position: static; max-height: none; }
  .liste-questions { grid-auto-flow: column; grid-auto-columns: 200px; overflow-x: auto; padding-bottom: 6px; }
  .ecran-salle { grid-template-columns: 1fr; }
  .tuiles.six { grid-template-columns: 1fr 1fr; }
  .liste-classement li { grid-template-columns: 2em 1.8em 1fr auto; }
  .liste-classement .jauge { display: none; }
  .barre-haut { padding: 10px 16px; }
  .onglets { order: 3; flex-basis: 100%; }
  .barres { gap: 6px; }
  .barre-pied { font-size: .8em; }
  .carte-question { padding-right: 5.5em; }
  .chrono { width: 5.5em; height: 5.5em; }
  .paires-ecran { grid-template-columns: 1fr; }
  .liens-deco { display: none; }
}
@media (max-width: 420px) {
  .avatar-choix { font-size: 1.3em; border-radius: 10px; }
  .carte-actions { flex-wrap: wrap; }
  .relier { gap: 8px; }
  .carte-lien { font-size: .92em; padding: .45em .5em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.ecran-fin { gap: 1vh !important; }
.ecran-fin h1 { font-size: 2.2em; margin: 0; }
.socle span { font-size: 2.2em; }

@media (max-width: 700px) {
  .tableau, .tableau tbody, .tableau tr, .tableau td { display: block; width: 100%; }
  .tableau thead { display: none; }
  .tableau tr { padding: .7em 1em; border-bottom: 1.5px solid #EAE5DA; }
  .tableau tr:last-child { border-bottom: 0; }
  .tableau td { border: 0; padding: .1em 0; text-align: left !important; }
  .tableau td[data-label]::before { content: attr(data-label) " : "; font-weight: 800; color: var(--encre-2); }
  .tableau td.titre-cellule { font-weight: 800; font-size: 1.05em; }
  .tableau td.droite { margin-top: .4em; }
}

.carte-question h1.long, .question-texte-ecran.long, .question-geante.long { font-size: 1.65em; }
.carte-question h1.tres-long, .question-texte-ecran.tres-long, .question-geante.tres-long { font-size: 1.35em; }
.question-geante.long { font-size: 2.4em; } .question-geante.tres-long { font-size: 1.9em; }
.question-texte.long { font-size: 1.12em; } .question-texte.tres-long { font-size: 1em; }
@media (max-width: 600px) {
  .carte-question { padding: .8em 4.6em .8em 1em; }
  .badge-chrono { right: .4em; }
  .chrono { width: 3.8em; height: 3.8em; }
}

.ecran-classement h1 { font-size: min(2.8em, 6vh); margin: 0; }
.liste-classement { gap: min(10px, 1.2vh); }
.liste-classement li { font-size: min(1.3em, 3vh); padding: .35em 1em; }

html:has(.page-joueur), .page-joueur { overflow-x: clip; }
@keyframes tombe-indice { from { transform: translateY(-24px) rotate(-3deg); opacity: 0; } }

.repondeur > .bouton.gros { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 3; }
.page-ecran #app > section > .synthese-finale, .page-ecran #app > section > .zone-reponses, .synthese-direct { overflow-x: hidden; }
.page-ecran #app > section { overflow-x: hidden; }
@keyframes colle { from { transform: scale(1.12) rotate(6deg); opacity: 0; } }

.vignette .lib, .ordre-res .lib, .paires-res .g, .paires-res .d, .groupes li span, .file-buzz .pseudo, .element-ordre .lib { min-width: 0; overflow-wrap: anywhere; }
.ordre-res li, .paires-res li { flex-wrap: wrap; }
.barres { padding-inline: .6em; }
.galerie { padding: 10px; }
.contenu { overflow-x: clip; }
.liste-questions { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) { .liste-questions { grid-template-columns: none; } .vignette { min-width: 0; } }
@media (max-width: 600px) {
  .barre-editeur { position: static; gap: 8px; padding: 10px 14px; }
  .barre-editeur .champ-titre { flex-basis: 100%; order: -1; }
  .barre-editeur > .bouton:last-child { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20; box-shadow: var(--ombre); }
  .panneau-question { padding: 16px; }
  .editeur { padding-bottom: 90px; }
}
.grand-avatar.petit { font-size: 2.6em; margin: 0 auto; animation: none; }
.carte-pin { margin-top: 1.2em; display: grid; gap: .2em; justify-items: center; background: #fff; border: 2px dashed var(--encre); border-radius: 14px; padding: .7em 1em; max-width: 320px; }
.carte-pin strong { font-family: var(--titre); font-size: 2em; letter-spacing: .2em; }
.carte-pin small { color: var(--encre-2); }
.champ-code.pin { letter-spacing: .5em; }
.cle-reprise { background: #fff; border: 2px solid var(--encre); border-radius: 8px; padding: 0 .35em; cursor: pointer; font-size: 1em; }
.bouton-lien { background: none; border: 0; cursor: pointer; text-decoration: underline; font: inherit; }
.avertissement { background: #FFF1C9; border: 2px dashed var(--encre); border-radius: 10px; padding: .5em .8em; font-size: .9em; font-weight: 700; }
.demandes-reprise { position: fixed; top: 12px; right: 12px; z-index: 80; display: grid; gap: 8px; width: min(380px, calc(100vw - 24px)); }
.demande { display: flex; align-items: center; gap: .6em; padding: .55em .7em; background: #fff; animation: tombe-sticker .5s var(--rebond); }
.demande .avatar { font-size: 1.6em; }
.demande > div { flex: 1; min-width: 0; display: grid; }
.demande small { color: var(--encre-2); }

.couverture .badge.visibilite { left: auto; right: 10px; }
.couverture .badge.visibilite.public { background: var(--juste-pale); }
.origine, .auteur { margin: .2em 0; font-size: .88em; color: var(--encre-2); }
.origine { font-style: italic; }
.recherche { width: 100%; max-width: 420px; margin-bottom: 18px; }
.rien-trouve { text-align: center; padding: 2em 0; }
.grille-quiz [hidden] { display: none; }

.bandeau-copie { margin: 0 16px 12px; padding: .7em 1em; background: #FFF6D6; border: var(--trait); border-radius: 12px; font-weight: 700; box-shadow: var(--ombre-petite); }
.bandeau-copie[hidden] { display: none; }
.bouton.coller { width: 100%; margin-top: 8px; }
.zone-collage { width: 100%; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .92em; line-height: 1.5; }
.segment.visibilite { margin-bottom: .4em; }

.apercu-cadre { padding: .7em 1em; margin: .4em 0 1em; background: var(--papier); border-radius: 12px; border: 1.5px dashed var(--encre-2); }
.apercu-trous { display: inline; margin: 0; line-height: 2; }
.trou-apercu { display: inline-block; padding: 0 .6em; margin: 0 .15em; border-bottom: 3px solid var(--krappo); background: #E9F7FB; border-radius: 6px 6px 0 0; font-weight: 800; }

ul.ajustements { list-style: none; margin: 0; padding: 0; font-size: .88em; }
ul.ajustements .plus { color: #178A4C; font-weight: 800; }
ul.ajustements .moins { color: #C93030; font-weight: 800; }

.bouton.vert { background: var(--juste); color: #fff; }
.bouton.rouge { background: var(--faux); color: #fff; }
.dialogue-points .liste-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 42vh; overflow: auto; padding: 4px; margin: .8em 0; }
.ligne-points { display: flex; align-items: center; gap: .5em; padding: .5em .7em; background: #fff; border: 2px solid var(--encre); border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; text-align: left; min-width: 0; }
.ligne-points .pseudo { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne-points b { font-variant-numeric: tabular-nums; }
.ligne-points.choisi { background: var(--krappo); box-shadow: var(--ombre-petite); }
.ligne-points .ajuste { font-size: .78em; padding: .05em .45em; border-radius: 999px; }
.ligne-points .ajuste.plus { background: var(--juste-pale); }
.ligne-points .ajuste.moins { background: var(--faux-pale); }
.dialogue-points > .champ { width: 100%; }
.montants { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: .8em 0; }
.montants .separateur { width: 1px; align-self: stretch; background: var(--encre-2); opacity: .3; margin: 0 4px; }
.montant-libre { display: flex; gap: 8px; align-items: center; }
.montant-libre .champ { width: 8em; }

.phrase-trous { font-size: 1.25em; line-height: 2.2; font-weight: 700; margin: .4em 0; }
.phrase-trous.petite { font-size: 1em; line-height: 1.9; margin: 0; }
.phrase-trous .trou { display: inline-flex; align-items: center; justify-content: center; min-width: 3.4em; padding: 0 .6em; margin: 0 .15em; border: 2px dashed var(--encre); border-radius: 10px; background: #fff; font: inherit; font-weight: 800; color: var(--encre-2); vertical-align: baseline; line-height: 1.6; }
.phrase-trous button.trou { cursor: pointer; }
.phrase-trous .trou.actif { border-style: solid; border-color: var(--krappo); box-shadow: 0 0 0 3px rgb(43 178 212 / .35); }
.phrase-trous .trou.rempli { border-style: solid; background: var(--c, var(--juste-pale)); color: var(--encre); }
.trous-ecran { display: grid; gap: 3vh; justify-items: center; }
.trous-ecran .phrase-trous { padding: .6em 1em; text-align: center; max-width: 30em; margin: 0; }
.trous-ecran .trou { color: var(--encre); background: var(--c); border-style: solid; }
.reserve-mots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 1em 0; }
.jeton-mot { border: var(--trait); background: #fff; border-radius: 12px; padding: .45em .9em; font: inherit; font-weight: 800; font-size: 1.05em; cursor: pointer; box-shadow: var(--ombre-petite); transition: transform .15s var(--rebond), opacity .2s; }
.jeton-mot:active { transform: scale(.94); }
.jeton-mot:disabled { opacity: .25; box-shadow: none; cursor: default; }
.trous-res .phrase-trous { font-size: 1.5em; text-align: center; line-height: 2.6; }
.trou-res { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: 0 .2em; padding: .05em .6em; background: var(--c); border: var(--trait); border-radius: 10px; line-height: 1.2; animation: pose .5s var(--d) var(--rebond) backwards; }
.trou-res small { font-size: .55em; font-weight: 700; }

.annonce-ajustement { position: fixed; left: 50%; top: 22%; translate: -50% 0; z-index: 400; display: grid; justify-items: center; gap: .2em; padding: 1em 1.6em; min-width: 230px; text-align: center; background: var(--or); border: var(--trait); border-radius: 22px; box-shadow: var(--ombre); animation: claque .45s var(--rebond); transition: opacity .5s, transform .5s; }
.annonce-ajustement.malus { background: var(--faux-pale); }
.annonce-ajustement .icone { font-size: 2.4em; }
.annonce-ajustement strong { font-family: var(--titre); font-size: 2.6em; line-height: 1; }
.annonce-ajustement span { font-weight: 800; }
.annonce-ajustement small { font-size: 1em; font-weight: 700; color: var(--encre-2); max-width: 16em; }
.annonce-ajustement.part { opacity: 0; transform: translateY(-20px) scale(.9); }
.gain.perte { background: var(--faux-pale); rotate: 2deg; }
.ligne-champ small { display: block; font-weight: 600; color: var(--encre-2); font-size: .82em; }
.repondeur > .bouton.gros:disabled { opacity: 1; background: #E4E0D8; color: var(--encre-2); box-shadow: var(--ombre-petite); }
.trous-ecran .phrase-trous { font-size: clamp(1.15em, 3.4vmin, 2em); }
