/* Conteneur principal */
.nim-app {
    font-family: teX;
    max-width: inherit;
    margin: 0em auto;
    padding: 1em;
    border: 0px solid #ccc;
    border-radius: 8px;
}

/* Zone d'état */
.nim-app .nim-status {
  text-align: center;
  margin-bottom: 0.5em;
  font-weight: normal;
}

/* Tas d'allumettes */
.nim-app .nim-pile {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 1em 0;
}

/* Allumette */
.nim-app .nim-match {
  width: 8px;
  height: 72px;
  background: #CBA;
  border-radius: 3px;
  position: relative;
  transition: transform 0.3s, opacity 0.3s;
}

/* Tête rouge */
.nim-app .nim-match::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -1px;
  width: 11px;
  height: 16px;
  background: red;
  border-radius: 3px 3px 0 0;
}

/* Disparition */
.nim-app .nim-match.removed {
  opacity: 0;
  transform: translateY(-10px);
}

/* Boutons */
.nim-app .nim-controls {
  display: flex;
  justify-content: center;
  gap: 0.5em;
}

.nim-app .nim-btn {
  padding: 0.4em 0.8em;
  border: 1px solid #888;
  background: #f5f5f5;
  cursor: pointer;
  border-radius: 4px;
  font-family:monospace;
}

.nim-app .nim-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* Mode théorie */
.nim-app[data-mode="theory"].losing {
  border-color: #c00;
    background: #ffecec;
  background:inherit;
}

.nim-app[data-mode="theory"].winning {
  border-color: #06c;
    background: #eef6ff;
  background:inherit
}
