/* fonts */
@font-face {
  font-display: swap;
  font-family: "Roboto";
  font-style: normal;
  font-weight: 300;
  src: url('./assets/fonts/Roboto-Light.ttf') format('ttf');
}

@font-face {
  font-display: swap;
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  src: url('./assets/fonts/Roboto-Regular.ttf') format('ttf');
}

@font-face {
  font-display: swap;
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  src: url('./assets/fonts/Roboto-Medium.ttf') format('ttf');
}

/* nav bar */
.navigation {
  position: relative;
  margin-top: -2rem; /* Negative margin to pull buttons up near subtitle */
  margin-bottom: 1rem;
  width: 100%;
  background-color: transparent;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-right: 1rem; /* Reduced padding to align with line end */
  pointer-events: none;
}

/* Mobile responsive behavior */
@media (max-width: 768px) {
  .navigation {
    position: static;
    margin-top: 1rem;
    margin-bottom: 1rem;
    justify-content: center; /* Center buttons on mobile */
    padding-right: 0;
  }
  
  .nav-links ul {
    gap: 10px; /* Reduce gap on mobile */
  }
  
  .nav-links a {
    width: 100px; /* Slightly smaller width on mobile */
    font-size: 0.8rem; /* Smaller font on mobile */
  }
}

.nav-links {
  position: relative;
  pointer-events: auto; /* Re-enable clicks for the nav links */
}

.nav-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  display: inline-block;
  width: 120px; /* Wider for oval shape */
  height: 40px; /* Reduced height for smaller oval */
  border-radius: 20px; /* Adjusted to half of new height */
  background-color: #000; /* Black background */
  color: #fff; /* White text */
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem; /* Slightly smaller font to fit reduced height */
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid #333; /* Dark border */
}

.nav-links a:hover {
  background-color: #333; /* Dark grey on hover */
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: #555;
}

body {
  font-family: "Roboto", sans-serif;

  height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

header {
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

header a {
  color: black;         /* Définit la couleur du texte en noir */
  text-decoration: none; /* Supprime le soulignement */
}

h1 {
  font-size: 3.5rem;
  font-weight: 500;
  margin: 0;
  padding: 0;
}

h2 {
  font-size: 2rem;
  font-weight: 300;
  margin: 0;
  padding: 0;
}

h3 {
  font-size: 1.3rem;
  font-weight: 400;
  margin: 0;
  padding: 0;
}

h4 {
  font-size: 1.1rem;
  font-weight: 400;
}

.line {
  border: 1px solid black;
  margin: 1rem 1rem 0 1rem;
  display: inline-block;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  padding: 1rem;
}

/* Main Content Styles */
main {
  flex: 1;
  padding: 0 2rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem;
}

.game-tile {
  width: 20rem;
  height: 20rem;
  display: grid;
  margin: auto;

  text-decoration: none;

  border-radius: 20px;
}

.game-tile-front, .game-tile-back {
  grid-area: 1 / 1;
}

.game-tile-front {
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 20px;

  display: flex;
}

.game-tile-front img {
  width: 70%;
  height: 70%;
  padding-top: 3rem;
  margin: auto;
}

.game-tile-front h3 {
  margin: 0 1rem;
  font-size: 1.7rem;
  line-height: 120%;
  color: white;
  position: absolute;
  top: 0.5rem;
  left: 0;
  z-index: 1;
}

.game-tile-back {
  color: white;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: .2s ease;
  z-index: 5;
  padding: 1rem;
  border-radius: 20px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-tile-back:hover {
  opacity: 1;
}

.activity-description {
  font-size: 1.3rem;
}

.activity-objective {
  font-size: 1.1rem;
  font-weight: 300;
  padding: 0.5rem;
}

.game-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-row {
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.flex-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 1rem;
}

.game-container {
  text-align: center;

  padding: 0.5rem 1rem;
  border: 1px solid black;
  border-radius: 10px;
}

.game-width {
  max-width: 80rem;
}

.game-video {
  width: 100%;
  max-width: 80rem;
}

.game-button {
  flex: 1 1 0;
  width: 0;

  padding: 0.5rem;
  border: 1px solid black;
  border-radius: 5px;
  text-decoration: none;
  text-align: center;
  min-width: 8rem;
}

/* Colour classes */
.yellow-background {
  background-color: #f6b010;
}

.blue-background {
  background-color: #000671;
}

.orange-background {
  background-color: #f03c02;
}

.green-background {
  background-color: #0d6644;
}

.grey-background {
  background-color: #a5bcb3;
}

.disabled {
  background-color: dimgrey;
  color: linen;
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer Styles */
footer {
  color: #000000d1;
  text-align: center;
  padding: 1rem;
}
