
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');

body {
  margin: 0;
  font-family: 'Fredoka One', cursive;
  background-image: url('fond-accueil.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  min-height: 100vh;
  overflow-x: hidden;
}

header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 1.5rem 1rem 0.5rem;
  background: none;
  z-index: 2;
}

.title-group {
  line-height: 1.2;
}

.title-main {
  font-size: 3.8rem;
  color: yellow;
  text-shadow: 2px 2px 4px #000;
}

.title-sub {
  font-size: 1.4rem;
  color: white;
  text-shadow: 1px 1px 2px #000;
  letter-spacing: 1px;
}

.top-buttons {
  position: absolute;
  right: 1rem;
  top: 1rem;
  display: flex;
  gap: 1rem;
}

.top-buttons button {
  background: rgba(255, 255, 255, 0.3);
  border: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  font-size: 1.2rem;
  cursor: pointer;
  color: white;
}

.burger-button {
  position: fixed;
  left: 1rem;
  top: 1.2rem;
  font-size: 2rem;
  cursor: pointer;
  display: none;
  z-index: 5;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  box-sizing: border-box;
  z-index: 4;
  overflow-y: auto;
  transform: translateX(0);
  transition: transform 0.3s ease;
}

nav.hidden {
  transform: translateX(-100%);
}

.nav-title {
  font-size: 1.6rem;
  color: yellow;
  cursor: pointer;
  margin-bottom: 2rem;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav ul li {
  margin: 1rem 0;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 220px 2rem 2rem 240px;
  box-sizing: border-box;
  overflow-y: auto;
  z-index: 1;
}

.node {
  background: rgba(0, 0, 0, 0.6);
  padding: 1.4rem;
  border-radius: 1rem;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  width: 300px;
  color: white;
  backdrop-filter: blur(3px);
  transition: transform 0.2s ease;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.node:hover {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.4), 0 0 15px #f9d74d;
}

.node h2 {
  margin-top: 0;
  color: #f9d74d;
  font-size: 1.3rem;
  text-shadow: 1px 1px 2px #000;
}

.node p {
  font-size: 1rem;
  line-height: 1.4;
  text-shadow: 1px 1px 1px #000;
}

.grid.focused {
  justify-content: center;
  align-items: center;
  padding: 0;
}

.node.expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 600px;
  max-height: 90vh;
  width: 90%;
  background: rgba(255, 255, 255, 0.9);
  color: black;
  text-shadow: none;
  z-index: 10;
  overflow-y: auto;
  padding: 2rem;
  font-size: 1.2rem;
  line-height: 1.6;
  backdrop-filter: blur(6px);
  border: 2px solid #ffcc00;
  cursor: pointer;
  box-sizing: border-box;
}


/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
.node:nth-child(n) { animation-delay: 0.1s; }

/* Responsive */
@media (max-width: 768px) {
  .burger-button {
    display: block;
  }

  nav {
    transform: translateX(-100%);
  }

  nav.show {
    transform: translateX(0);
  }

  .grid {
    flex-direction: column;
    align-items: center;
    padding: 200px 1rem 2rem 1rem;
    height: auto;
  }

  .node {
    width: 90%;
    max-width: 360px;
  }

  body {
    overflow-y: auto;
  }
}
.effect-glow-plus:hover {
  transform: scale(1.05);
  box-shadow:
    0 0 10px #f9d74d,
    0 0 20px #f9d74d,
    0 0 40px #f9d74d,
    0 0 60px #f9d74d;
}
.effect-glow-plus:active {
  transform: scale(0.98);
}
.node.expanded {
  position: fixed;
  top: 5vh;
  left: 5vw;
  width: 90vw;
  max-height: 90vh;
  background: rgba(255, 255, 255, 0.95);
  color: black;
  text-shadow: none;
  z-index: 10;
  overflow-y: auto;
  padding: 1.2rem;
  font-size: 1rem;
  line-height: 1.5;
  border: 2px solid #ffcc00;
  box-sizing: border-box;
  backdrop-filter: blur(6px);
}




.node p {
  font-size: 1rem;
  line-height: 1.5;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  font-family: 'Montserrat', sans-serif;
}

.overlay-box {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}


.overlay-box {
  background: rgba(255, 255, 255, 0.9);
  color: #222;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  padding: 1.5rem;
  border-radius: 1rem;
  max-height: 85vh;
  overflow-y: auto;
}
@media (max-width: 768px) {
  .overlay-box {
    width: 90vw;
    max-width: 95%;
    padding: 1.2rem;
    box-sizing: border-box;
    overflow-wrap: break-word;
  }
}
