/* Navigation commune, sans remplacer le style propre à chaque jeu. */
.portfolio-game {
  box-sizing: border-box;
  min-height: 100vh;
  margin: 0;
  padding: 90px 20px 40px;
}

.game-navigation {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid #dedbd6;
  color: #333;
  background: #fff;
  font:
    14px/1.5 Helvetica,
    Arial,
    sans-serif;
}

.game-navigation a {
  color: inherit;
  text-decoration: none;
}
.game-navigation a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.portfolio-game :focus-visible {
  outline: 2px solid #79532f;
  outline-offset: 4px;
}
.portfolio-game h1 {
  overflow-wrap: anywhere;
}

/* Les grilles et les boutons s'adaptent aux petits écrans. */
.game-morpion .container {
  grid-template-columns: repeat(3, min(27vw, 100px));
  grid-template-rows: repeat(3, min(27vw, 100px));
}

.game-morpion #rec {
  display: inline-block;
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid #333;
  color: #333;
  background: #fff;
  font:
    16px Arial,
    sans-serif;
  cursor: pointer;
}

.game-morpion .btn:disabled {
  color: #333;
  cursor: default;
}
.game-chifoumi .choix {
  flex-wrap: wrap;
  gap: 8px;
}
.game-chifoumi .btn {
  width: clamp(76px, 25vw, 180px);
  height: clamp(76px, 25vw, 180px);
  margin: 0;
  font-size: clamp(36px, 9vw, 72px);
}
.game-chifoumi .titre {
  font-size: clamp(28px, 5vw, 50px);
}
.game-chifoumi #mess {
  font-size: clamp(24px, 5vw, 40px);
}

.game-chiffres .container {
  max-width: 380px;
}
.game-chiffres .aloneButton {
  width: 210px;
  height: 100px;
  font-size: 28px;
}
.game-chiffres .resultatMoment {
  font-size: 20px;
  line-height: 1.5;
}

.game-code .container {
  box-sizing: border-box;
  max-width: 100%;
  grid-template-columns: repeat(3, min(23vw, 100px));
}
.game-code .game-grid {
  width: min(23vw, 100px);
  height: min(23vw, 100px);
}

.game-pendu .jeu {
  padding-inline: 0;
}
.game-pendu #wordCounter {
  gap: clamp(2px, 1vw, 8px);
}
.game-pendu .case-lettre {
  flex: 0 1 35px;
  min-width: 0;
  font-size: clamp(16px, 4vw, 28px);
}

.game-vie .grid-help {
  max-width: 600px;
  margin: 0 auto 20px;
  font:
    16px/1.6 Arial,
    sans-serif;
}
.game-vie #grille {
  width: 100%;
  max-height: 65vh;
  overflow: auto;
  justify-content: start;
  border: 1px solid #8c968f;
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-game * {
    transition: none !important;
  }
}
