/* =====================================================================
   Qui est-ce ? — styles propres au jeu (préfixe qe-)
   La barre, le plein écran et les infobulles sont dans css/games.css.
   ===================================================================== */

/* Barre commune aux couleurs du jeu */
.qe-jeu {
  --mg-jeu-largeur: 1204px; /* barre de 1180 px + marges de 12 px : ne pas changer */
  --mgb-fond: linear-gradient(120deg, #0d2a5c, #1e56b8 58%, #c9283f);
  --mgb-accent: #ffd84d;
  --mgb-titre: linear-gradient(100deg, #ffffff, #ffd84d);
  --mgb-police-titre: "Madimi One", "Outfit", sans-serif;
  --mg-stat-largeur: 4.6em;
  --mg-fs-fond: #081a3d;
  --mg-bulle-fond: #0d2a5c;

  --qe-bleu: #1e56b8;
  --qe-bleu-fonce: #123d86;
  --qe-rouge: #e63946;
  --qe-rouge-fonce: #a51d2b;
  --qe-jaune: #ffd84d;
  --qe-encre: #1d2440;
}

.qe-jeu [hidden] {
  display: none !important;
}

/* ---------- Zone de jeu ---------- */
.qe-zone {
  position: relative;
  box-sizing: border-box;
  align-self: center;
  width: min(var(--mg-barre-largeur, 1180px), calc(100vw - 24px));
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  gap: 14px;
  padding: 14px;
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--qe-encre);
  background:
    radial-gradient(rgba(255, 255, 255, 0.07) 1.2px, transparent 1.6px) 0 0 / 18px 18px,
    radial-gradient(circle at 25% 15%, #2a6ad6 0, #143f8f 48%, #0a2350 100%);
}
.qe-zone *,
.qe-zone *::before,
.qe-zone *::after {
  box-sizing: border-box;
}

/* Plein écran : la zone prend toute la place sous la barre */
.qe-jeu.mg-fs .qe-zone {
  align-self: stretch;
  width: auto;
  flex: 1;
  min-height: 0;
  border-radius: 0;
}
.qe-jeu.mg-fs .qe-panneau {
  width: 340px;
}

/* ---------- Plateau : le grand bac bleu ---------- */
.qe-plateau {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #2160c8, #17489f);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    inset 0 -7px 0 rgba(0, 0, 0, 0.22),
    0 12px 30px rgba(0, 0, 0, 0.35);
}
.qe-grille {
  display: grid;
  grid-template-columns: repeat(var(--cols, 6), var(--cw, 110px));
  grid-auto-rows: var(--ch, 143px);
  gap: var(--gap, 10px);
}

/* ---------- Cartes : un cadre (la fente) et une carte qui bascule ---------- */
.qe-carte {
  --r: calc(var(--cw) * 0.09);
  position: relative;
  width: var(--cw);
  height: var(--ch);
  padding: 0;
  border: 0;
  border-radius: var(--r);
  background: linear-gradient(180deg, #0c2f70, #0a275d);
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.15);
  cursor: pointer;
  perspective: 700px;
  font: inherit;
}
.qe-carte:focus-visible {
  outline: 3px solid var(--qe-jaune);
  outline-offset: 3px;
}
.qe-carte-in {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.3, 1.35, 0.5, 1);
}
.qe-carte:hover .qe-carte-in {
  transform: translateY(-4px);
}
.qe-carte.qe-bas .qe-carte-in {
  transform: rotateX(180deg) scale(0.94);
}
.qe-carte.qe-bas:hover .qe-carte-in {
  transform: rotateX(180deg) scale(0.97);
}
.qe-recto,
.qe-verso {
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.qe-recto {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: calc(var(--cw) * 0.045) solid #fff;
  box-shadow: 0 3px 0 #b9c6e0, 0 7px 12px rgba(0, 0, 0, 0.35);
}
.qe-recto .qe-portrait {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: block;
  border-radius: calc(var(--r) * 0.6) calc(var(--r) * 0.6) 0 0;
}
.qe-nom {
  display: block;
  background: var(--qe-jaune);
  color: #3a2a00;
  font-family: "Madimi One", "Outfit", sans-serif;
  font-size: calc(var(--cw) * 0.135);
  line-height: 1.15;
  padding: 0.14em 0.2em 0.1em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 0 0 calc(var(--r) * 0.6) calc(var(--r) * 0.6);
}
.qe-verso {
  transform: rotateX(180deg);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 6px, transparent 6px 12px),
    linear-gradient(180deg, #2f6fd8, #1a4aa2);
  border: calc(var(--cw) * 0.045) solid #3b7be6;
  box-shadow: 0 3px 0 #0c2f70;
}
.qe-verso-motif {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.qe-verso-motif::before {
  content: "?";
  display: grid;
  place-items: center;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.55);
  font-family: "Madimi One", "Outfit", sans-serif;
  font-size: calc(var(--cw) * 0.34);
  line-height: 1;
}
.qe-verso-nom {
  position: relative;
  margin-bottom: 0.45em;
  color: rgba(255, 255, 255, 0.6);
  font-size: calc(var(--cw) * 0.11);
  font-weight: 600;
}

/* Désigner un suspect */
.qe-mode-designer .qe-carte:not(.qe-bas) {
  cursor: crosshair;
}
.qe-mode-designer .qe-carte:not(.qe-bas) .qe-recto {
  animation: qe-cible 1.1s ease-in-out infinite;
}
.qe-mode-designer .qe-carte.qe-bas {
  cursor: not-allowed;
}
@keyframes qe-cible {
  50% {
    box-shadow: 0 0 0 3px var(--qe-jaune), 0 0 22px var(--qe-jaune);
  }
}
.qe-bandeau-designer {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 16px;
  border-radius: 999px;
  background: var(--qe-jaune);
  color: #3a2a00;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: qe-pop 0.25s ease-out;
}
.qe-mini-btn {
  border: 0;
  border-radius: 999px;
  padding: 4px 12px;
  background: #3a2a00;
  color: #fff;
  font: 600 13px "Outfit", sans-serif;
  cursor: pointer;
}

/* Le personnage de Gaspard, révélé en fin de partie */
.qe-carte.qe-coupable .qe-carte-in {
  transform: none;
}
.qe-carte.qe-coupable .qe-recto {
  box-shadow: 0 0 0 4px var(--qe-rouge), 0 0 26px var(--qe-rouge);
  animation: qe-revele 1.4s ease-in-out infinite;
}
@keyframes qe-revele {
  50% {
    box-shadow: 0 0 0 4px var(--qe-jaune), 0 0 30px var(--qe-jaune);
  }
}

/* ---------- Panneau latéral ---------- */
.qe-panneau {
  flex: none;
  width: 300px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: #f5f7ff;
  box-shadow: inset 0 -5px 0 #d8dff0, 0 12px 30px rgba(0, 0, 0, 0.35);
}
.qe-duel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.qe-secret,
.qe-adversaire {
  border-radius: 14px;
  padding: 8px;
  text-align: center;
}
.qe-secret {
  background: linear-gradient(180deg, #dce8ff, #c8daff);
}
.qe-secret-lib {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--qe-bleu);
  margin-bottom: 5px;
}
.qe-petite-carte {
  --cw: 110px;
  width: 100%;
  max-width: 116px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px var(--qe-bleu), 0 6px 12px rgba(18, 61, 134, 0.3);
}
.qe-petite-carte .qe-portrait {
  display: block;
  width: 100%;
  aspect-ratio: 100 / 112;
  border-radius: 6px 6px 0 0;
}
.qe-petite-carte .qe-nom {
  font-size: 15px;
  border-radius: 0 0 6px 6px;
}
.qe-adversaire {
  background: linear-gradient(180deg, #ffe4e7, #ffd3d8);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qe-robot {
  width: 62px;
  height: 62px;
}
.qe-robot svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.qe-robot-yeux {
  transform-box: fill-box;
  transform-origin: center;
  animation: qe-cligne 4.5s infinite;
}
.qe-pense .qe-robot-yeux {
  animation: qe-cherche 1.3s ease-in-out infinite alternate;
}
.qe-pense .qe-antenne {
  animation: qe-antenne 0.5s ease-in-out infinite alternate;
}
@keyframes qe-cligne {
  0%,
  94%,
  100% {
    transform: scaleY(1);
  }
  97% {
    transform: scaleY(0.1);
  }
}
@keyframes qe-cherche {
  from {
    transform: translateX(-4px);
  }
  to {
    transform: translateX(4px);
  }
}
@keyframes qe-antenne {
  from {
    fill: #ffd84d;
  }
  to {
    fill: #ff4d6d;
  }
}
.qe-adv-nom {
  font-family: "Madimi One", "Outfit", sans-serif;
  color: #c1283a;
  font-size: 17px;
  line-height: 1.1;
  margin: 2px 0 6px;
}
.qe-mini {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  width: 100%;
  max-width: 112px;
}
.qe-mini i {
  aspect-ratio: 3 / 4;
  border-radius: 2px;
  background: var(--qe-rouge);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
  transform-origin: bottom;
  transition: transform 0.4s, background 0.4s;
}
.qe-mini i.qe-bas {
  background: #f0b8bf;
  transform: scaleY(0.3);
}

/* Bandeau du tour */
.qe-tour {
  padding: 8px 12px;
  border-radius: 999px;
  text-align: center;
  font-weight: 800;
  font-size: 14.5px;
  transition: background 0.3s, color 0.3s;
}
.qe-tour-moi {
  background: var(--qe-jaune);
  color: #3a2a00;
}
.qe-tour-ordi {
  background: #ffe1e4;
  color: #c1283a;
}
.qe-tour-ordi::after {
  content: "";
  display: inline-block;
  width: 1.2em;
  text-align: left;
  animation: qe-points 1.2s steps(4) infinite;
}
@keyframes qe-points {
  0% { content: ""; }
  25% { content: "."; }
  50% { content: ".."; }
  75% { content: "..."; }
}
.qe-tour-gagne {
  background: #22b39a;
  color: #fff;
}
.qe-tour-perdu {
  background: var(--qe-rouge);
  color: #fff;
}

/* Dialogue */
.qe-journal {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 2px 6px rgba(29, 36, 64, 0.08);
  scrollbar-width: thin;
  scrollbar-color: #c8d3ec transparent;
}
.qe-msg {
  max-width: 88%;
  padding: 6px 11px 7px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.3;
  animation: qe-pop 0.22s ease-out;
}
.qe-msg-qui {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.65;
}
.qe-msg-moi {
  align-self: flex-end;
  background: var(--qe-bleu);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.qe-msg-ordi {
  align-self: flex-start;
  background: #ffe1e4;
  color: #6b1420;
  border-bottom-left-radius: 4px;
}
.qe-msg-ordi.qe-rep-oui {
  background: #d3f6e8;
  color: #0b6b4c;
  font-weight: 700;
}
.qe-msg-ordi.qe-rep-non {
  background: #ffcfd5;
  color: #a3162a;
  font-weight: 700;
}
.qe-msg-moi.qe-rep-oui,
.qe-msg-moi.qe-rep-non {
  font-weight: 700;
}
.qe-msg-info {
  align-self: center;
  max-width: 100%;
  padding: 0 6px;
  font-size: 12px;
  font-style: italic;
  color: #6a7390;
}

/* Actions */
.qe-actions-ligne {
  display: flex;
  gap: 8px;
}
.qe-btn {
  flex: 1;
  padding: 11px 10px 10px;
  border: 0;
  border-radius: 13px;
  font: 700 15px "Outfit", sans-serif;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, filter 0.15s;
}
.qe-btn:hover:not(:disabled) {
  filter: brightness(1.08);
}
.qe-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--ombre);
}
.qe-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.qe-btn-principal {
  --ombre: var(--qe-bleu-fonce);
  background: var(--qe-bleu);
  color: #fff;
  box-shadow: 0 4px 0 var(--ombre);
}
.qe-btn-designer {
  --ombre: #c39d1c;
  flex: 0.7;
  background: var(--qe-jaune);
  color: #3a2a00;
  box-shadow: 0 4px 0 var(--ombre);
}
.qe-btn-oui {
  --ombre: #13806a;
  background: #22b39a;
  color: #fff;
  box-shadow: 0 4px 0 var(--ombre);
  font-size: 17px;
}
.qe-btn-non {
  --ombre: var(--qe-rouge-fonce);
  background: var(--qe-rouge);
  color: #fff;
  box-shadow: 0 4px 0 var(--ombre);
  font-size: 17px;
}
.qe-pulse {
  animation: qe-pulse 1s ease-in-out infinite;
}
@keyframes qe-pulse {
  50% {
    transform: scale(1.06);
    box-shadow: 0 4px 0 var(--ombre), 0 0 0 6px rgba(255, 216, 77, 0.45);
  }
}

/* ---------- Fenêtres (dans la zone : visibles en plein écran) ---------- */
.qe-voile {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: inherit;
  background: rgba(8, 22, 54, 0.55);
  backdrop-filter: blur(3px);
  animation: qe-fondu 0.2s ease-out;
}
.qe-fenetre {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  padding: 18px 20px;
  border-radius: 20px;
  background: #fff;
  color: var(--qe-encre);
  box-shadow: 0 -5px 0 #dfe6f6 inset, 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: qe-pop 0.28s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.qe-fenetre h2 {
  margin: 0;
  font: 400 23px "Madimi One", "Outfit", sans-serif;
  color: var(--qe-bleu);
}
.qe-fenetre-tete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.qe-fermer {
  flex: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #eef2fb;
  color: var(--qe-encre);
  font-size: 15px;
  cursor: pointer;
}
.qe-fermer:hover {
  background: #dfe6f6;
}
.qe-fenetre-pied {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

/* Questions */
.qe-fenetre-questions {
  width: 680px;
}
.qe-groupe h3 {
  margin: 12px 0 7px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a93a6;
}
.qe-puces {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.qe-q {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  border: 2px solid #d5def0;
  border-radius: 999px;
  background: #f5f7ff;
  color: var(--qe-encre);
  font: 600 14.5px "Outfit", sans-serif;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s, background 0.12s, box-shadow 0.12s;
}
.qe-q:hover:not(:disabled) {
  border-color: var(--qe-bleu);
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(30, 86, 184, 0.2);
}
.qe-q:disabled {
  opacity: 0.38;
  text-decoration: line-through;
  cursor: default;
}
.qe-sw {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.25);
}

/* Réglages */
.qe-fenetre-config {
  width: 470px;
}
.qe-config-lib {
  margin: 12px 0 8px;
  font-weight: 700;
}
.qe-segments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.qe-segments button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 9px 6px;
  border: 2px solid #d5def0;
  border-radius: 13px;
  background: #f5f7ff;
  color: var(--qe-encre);
  font: 600 15px "Outfit", sans-serif;
  cursor: pointer;
}
.qe-segments button small {
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.7;
}
.qe-segments button.actif {
  border-color: var(--qe-bleu);
  background: var(--qe-bleu);
  color: #fff;
}
.qe-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 15px;
  cursor: pointer;
}
.qe-config-note {
  font-family: inherit;
  margin: 14px 0 0;
  font-size: 12.5px;
  color: #6a7390;
}

/* Fin de partie */
.qe-fenetre-fin {
  width: 500px;
  text-align: center;
  overflow: hidden;
}
.qe-fenetre-fin h2 {
  font-size: 30px;
  color: var(--qe-rouge);
}
.qe-fenetre-fin.qe-fin-gagne h2 {
  color: #13a085;
}
.qe-fenetre-fin p {
  font-family: inherit;
  margin: 6px 0 14px;
  font-size: 15.5px;
}
.qe-fin-cartes {
  display: flex;
  justify-content: center;
  gap: 28px;
  perspective: 800px;
}
.qe-fin-cartes figure {
  margin: 0;
  width: 120px;
}
.qe-fin-cartes figcaption {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #6a7390;
}
.qe-fin-carte-ordi .qe-petite-carte {
  box-shadow: 0 0 0 2px var(--qe-rouge), 0 6px 12px rgba(165, 29, 43, 0.3);
  animation: qe-retourne 0.8s 0.25s cubic-bezier(0.3, 1.3, 0.5, 1) backwards;
}
@keyframes qe-retourne {
  from {
    transform: rotateY(90deg) scale(0.8);
  }
}
.qe-fenetre-fin .qe-fenetre-pied {
  justify-content: center;
}
.qe-confettis {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.qe-confettis i {
  position: absolute;
  top: -14px;
  width: 8px;
  height: 13px;
  border-radius: 2px;
  animation: qe-chute 3s linear backwards;
}
@keyframes qe-chute {
  to {
    top: 105%;
    rotate: 540deg;
  }
}

@keyframes qe-pop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
}
.qe-bandeau-designer {
  animation-name: qe-pop-centre;
}
@keyframes qe-pop-centre {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0.9);
  }
}
@keyframes qe-fondu {
  from {
    opacity: 0;
  }
}

/* ---------- Écran étroit : panneau sous le plateau ---------- */
.qe-zone.qe-etroit {
  flex-direction: column;
  padding: 8px;
  gap: 10px;
}
.qe-etroit .qe-plateau {
  padding: 8px;
  flex: none;
}
.qe-etroit .qe-panneau {
  width: auto;
}
.qe-etroit .qe-journal {
  flex: none;
  height: 170px;
}
.qe-etroit .qe-fin-cartes {
  gap: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .qe-carte-in,
  .qe-mini i {
    transition: none;
  }
}

/* Textes des fenêtres : police et couleur du jeu, pas celles du site */
.qe-zone label,
.qe-option span,
.qe-segments b,
.qe-segments small {
  font-family: inherit;
  color: inherit;
}

/* ---------- Choix du personnage secret ---------- */
.qe-mode-choix .qe-carte {
  cursor: pointer;
}
.qe-mode-choix .qe-carte:hover .qe-recto {
  box-shadow: 0 0 0 3px var(--qe-jaune), 0 0 22px var(--qe-jaune);
}
.qe-carte-vide {
  display: flex;
  flex-direction: column;
}
.qe-vide {
  display: grid;
  place-items: center;
  aspect-ratio: 100 / 112;
  border-radius: 6px 6px 0 0;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 6px, transparent 6px 12px), linear-gradient(180deg, #2f6fd8, #1a4aa2);
  color: rgba(255, 255, 255, 0.75);
  font: 400 44px "Madimi One", "Outfit", sans-serif;
}

/* ---------- Mode facile : carte abaissée par erreur ---------- */
.qe-carte.qe-erreur .qe-verso {
  border-color: #ff9f1c;
  animation: qe-alerte 1.2s ease-in-out infinite;
}
.qe-carte.qe-erreur .qe-verso::after {
  content: "!";
  position: absolute;
  top: 6%;
  right: 6%;
  display: grid;
  place-items: center;
  width: calc(var(--cw) * 0.24);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ff9f1c;
  color: #fff;
  font: 400 calc(var(--cw) * 0.17) "Madimi One", "Outfit", sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
@keyframes qe-alerte {
  50% {
    box-shadow: 0 3px 0 #0c2f70, 0 0 0 3px #ff9f1c, 0 0 18px #ff9f1c;
  }
}
#qe-actions-choix .qe-btn {
  flex: 1;
  white-space: nowrap;
}

/* Carte qu'on ne peut pas encore abaisser */
.qe-carte.qe-refus {
  animation: qe-refus 0.4s ease-in-out;
}
@keyframes qe-refus {
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* ---------- Questions : onglets des catégories, puis questions ---------- */
.qe-fenetre-questions {
  width: 640px;
}
.qe-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid #c3d0ea;
}
.qe-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 5px;
  border: 2px solid #d5def0;
  border-radius: 999px;
  background: #f5f7ff;
  color: var(--qe-encre);
  font: 600 15px "Outfit", sans-serif;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.qe-cat:hover:not(:disabled) {
  border-color: var(--qe-bleu);
  background: #fff;
}
.qe-cat.actif,
.qe-cat.actif:hover:not(:disabled) {
  border-color: var(--qe-bleu);
  background: var(--qe-bleu);
  color: #fff;
}
.qe-cat:disabled {
  opacity: 0.4;
  cursor: default;
}
.qe-cat-icone {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #dce8ff;
  color: var(--qe-bleu);
}
.qe-cat-icone svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qe-cat-sw {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.18);
}
.qe-questions-liste .qe-puces {
  min-height: 48px;
  align-items: center;
}
.qe-questions-liste .qe-q {
  padding: 8px 18px;
  font-size: 15px;
}
.qe-questions-liste .qe-sw {
  width: 16px;
  height: 16px;
}
.qe-q-aide {
  margin: 0;
  color: #6a7390;
  font-family: inherit;
  font-size: 15px;
}

/* ---------- Suspects restants de Robot ---------- */
.qe-adversaire {
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.qe-adversaire:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(193, 40, 58, 0.25);
}
.qe-adversaire:focus-visible {
  outline: 3px solid var(--qe-rouge);
  outline-offset: 2px;
}
.qe-fenetre-suspects {
  width: 720px;
}
.qe-suspects-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.qe-suspects-liste .qe-petite-carte {
  box-shadow: 0 0 0 2px var(--qe-rouge), 0 4px 10px rgba(165, 29, 43, 0.25);
}
.qe-suspects-liste .qe-nom {
  font-size: 13px;
}

/* Message du système (fausse réponse) */
.qe-msg-systeme {
  align-self: stretch;
  max-width: 100%;
  background: #fff4e0;
  color: #8a4b00;
  border: 2px solid #ffb547;
  text-align: center;
  white-space: pre-line;
}
