/* Tic-Tac-Toe game module. Mounted inside the hub shell's #game-mount or
   in the standalone morpion.html .game-screen. */

.morpion {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.grid-wrap {
  position: relative;
  aspect-ratio: 1;
  height: 88%;
  max-height: 100%;
}
.grid-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.grid-svg line {
  stroke: black;
  stroke-width: 3;
  stroke-linecap: round;
}
.grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
}
.cell {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  transition: none;
}
.cell:hover:not(:disabled),
.cell:focus,
.cell:focus-visible {
  background: transparent;
  color: inherit;
  box-shadow: none;
  outline: none;
}
.cell:empty:hover { background: rgba(0, 0, 0, 0.04); }
.cell svg { width: 55%; height: 55%; display: block; color: black; }
.cell:not(:empty) { cursor: default; }
.grid.locked .cell { cursor: not-allowed; }
.grid.locked .cell:empty:hover { background: transparent; }

.morpion-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}
.morpion-btn-new {
  background: white;
  color: black;
  border: 1px solid black;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 4px;
}
.morpion-btn-new:hover { background: black; color: white; }
