/* L'intrus : la grille de carrés, l'annonce des succès et leur carnet. Le reste vient de /games/_shared/css/party.css. */

/* Indonésie : encre jade */
:root { --accent: var(--jade); --accent-dark: #2f5f4f; }

.intrus-stage {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.9rem 0.9rem 0.8rem;
}

/* La grille : un carré aussi grand que la place le permet */
.grid-box { flex: 1; min-height: 0; display: grid; place-items: center; container-type: size; }
.intrus-grid {
  display: grid;
  grid-template-columns: repeat(var(--side, 2), 1fr);
  gap: clamp(3px, 1.2cqmin, 8px);
  width: min(100cqw, 100cqh, 34rem);
  aspect-ratio: 1;
  padding: clamp(5px, 1.6cqmin, 12px);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
}
.intrus-grid[hidden] { display: none; }

/* Pas d'effet de survol : il ne doit rien changer à la couleur des carrés */
.tile { position: relative; min-width: 0; padding: 0; border: 0; border-radius: 4px; cursor: pointer; }
.tile:active:not(:disabled) { transform: scale(0.94); }
.tile:disabled { cursor: default; }
.tile:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; z-index: 1; }
/* L'intrus, révélé : entouré à l'encre ; un carré touché à tort : entouré de cinabre */
.tile.is-odd, .tile.is-wrong { z-index: 1; box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink); }
.tile.is-wrong { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--cinabre); }

/* Sous la grille : le message du tour, puis un succès débloqué */
.below { display: grid; gap: 0.6rem; flex: none; width: min(100%, 34rem); margin: 0 auto; }
.below [data-feedback] { min-height: 2.9rem; }

/* Le dessin d'un succès : sur papier blanc, comme un timbre, même en thème sombre */
.succes-art { display: block; width: 100%; height: 100%; }
.unlock-art,
.succes-badge {
  flex: none;
  display: block;
  padding: 0.2rem;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 8px;
}
.unlock-art { width: 3.6rem; height: 3.6rem; }

.unlock {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin: 0;
  padding: 0.6rem 0.85rem;
  background: var(--accent);
  color: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 3px 3px 0 var(--ink);
  animation: unlock-in 0.35s ease-out both;
}
.unlock[hidden] { display: none; }
.unlock-body { display: grid; gap: 0.1rem; min-width: 0; }
.unlock-title { font-family: var(--data); font-size: 0.8rem; color: #ffffffcc; }
.unlock-name { font-family: var(--title); font-weight: 800; font-size: 1.2rem; line-height: 1.15; }
.unlock-text { font-size: 0.9rem; }
@keyframes unlock-in { from { transform: translate(-3px, 6px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .unlock { animation: none; } }

/* ---------- Le carnet des succès, sous les règles ---------- */
.carnet { max-width: 34rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1.5px solid var(--rule); }
.carnet h2 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.carnet-record { margin: 0 0 1rem; color: var(--soft); }
.carnet-note { margin: 1rem 0 0; color: var(--soft); font-size: 0.85rem; }

.succes { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.succes li {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  padding: 0.6rem 0.75rem 0.7rem;
  border: 1.5px dashed var(--soft);
  border-radius: 8px;
  color: var(--soft);
}
.succes li.is-got { border: 2px solid var(--ink); background: var(--paper); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
/* Le dessin, et l'étape en pastille sur son coin */
.succes-badge { position: relative; width: 3.4rem; height: 3.4rem; }
.succes li:not(.is-got) .succes-badge { border: 1.5px dashed var(--soft); }
.succes li:not(.is-got) .succes-art { filter: grayscale(1); opacity: 0.35; }
.succes-step {
  position: absolute;
  right: -0.55rem;
  bottom: -0.45rem;
  display: grid;
  place-items: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.2rem;
  background: var(--ground);
  border: 1.5px dashed var(--soft);
  border-radius: 999px;
  color: var(--soft);
  font-family: var(--data);
  font-weight: 700;
  font-size: 0.75rem;
}
.is-got .succes-step { border: 2px solid var(--ink); background: var(--accent); color: #ffffff; }
.succes-body { display: grid; gap: 0.05rem; min-width: 0; }
.succes-body b { font-family: var(--title); font-weight: 800; }
.succes-body small { font-size: 0.85rem; line-height: 1.3; }
