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

body {
  font-family: 'Fredoka One', cursive;
  text-align: center;
  background-color: #87CEFA;
  padding: 20px;
  margin: 0;
}

/* HEADER */
.magic-header {
  background: linear-gradient(90deg, #FF4500, #FFD700, #32CD32, #1E90FF, #FF4500);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
}

.magic-title {
  font-size: 50px;
  color: white;
  text-shadow: 4px 4px 0px #000;
}

/* GAME SECTION */
.game-selection {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.game-card {
  width: 300px;
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
  text-align: center;
  cursor: pointer;
  transition: 0.3s ease;
  animation: fadeInUp 0.6s ease;
}

.game-card:hover {
  transform: scale(1.05);
  background: #FFD700;
}

.game-card h2 {
  color: #FF4500;
  font-size: 20px;
  margin: 0;
}

/* ANIMATION */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* BADGE NOUVEAU */
.badge-nouveau {
  display: inline-block;
  background: linear-gradient(45deg, #FF0000, #FF4500, #FFD700);
  color: white;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: bold;
  animation: pulseBadge 1s infinite alternate;
  box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
  margin-left: 10px;
}

@keyframes pulseBadge {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.15); opacity: 1; }
}

/* FILTRES */
.filter-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.filter-menu button {
  font-family: 'Fredoka One', cursive;
  border: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s ease-in-out;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

/* FILTRES PAR CATÉGORIE */
.filter-menu button[data-filter="all"]        { background-color: #FFD700; color: black; }
.filter-menu button[data-filter="educatif"]   { background-color: #1E90FF; color: white; }
.filter-menu button[data-filter="reflexion"]  { background-color: #32CD32; color: white; }
.filter-menu button[data-filter="creativite"] { background-color: #FF69B4; color: white; }
.filter-menu button[data-filter="observation"]{ background-color: #FFA500; color: white; }
.filter-menu button[data-filter="deux"]       { background-color: #8A2BE2; color: white; }
.filter-menu button[data-filter="societe"]    { background-color: #A52A2A; color: white; }

.filter-menu button:hover {
  transform: scale(1.1);
  filter: brightness(1.1);
}

/* CATÉGORIE - COULEUR PAR THÈME */
.educatif .game-card    { border-top: 6px solid #1E90FF; }
.reflexion .game-card   { border-top: 6px solid #32CD32; }
.creativite .game-card  { border-top: 6px solid #FF69B4; }
.observation .game-card { border-top: 6px solid #FFA500; }
.deux .game-card        { border-top: 6px solid #8A2BE2; }
.societe .game-card     { border-top: 6px solid #A52A2A; }
.magic-footer {
  background-color: #FF4500;
  color: white;
  padding: 20px;
  font-size: 16px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -3px 10px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  text-align: center;
  margin-top: 50px;
}
.magic-header {
  background: linear-gradient(90deg, #FF4500, #FFD700, #32CD32, #1E90FF, #FF4500);
  padding: 20px;
  border-radius: 15px;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.magic-title {
  font-size: 50px;
  color: white;
  text-shadow: 4px 4px 0px #000;
  margin: 0;
}

.member-area {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 10px 15px;
  font-family: 'Fredoka One', cursive;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
}

.member-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid #FFD700;
  object-fit: cover;
}

.member-info p {
  margin: 0;
  font-size: 14px;
  text-align: left;
}

.signup-button {
  background-color: #FF4500;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  font-family: 'Fredoka One', cursive;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.signup-button:hover {
  background-color: #e63e00;
}
.signup-form {
  max-width: 400px;
  margin: 30px auto;
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-family: 'Fredoka One', cursive;
}

.signup-form input {
  padding: 12px;
  border: 2px solid #FFD700;
  border-radius: 10px;
  font-size: 16px;
}

.signup-form button {
  background-color: #FF4500;
  color: white;
  border: none;
  padding: 12px;
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s ease;
}

.signup-form button:hover {
  background-color: #e63e00;
}
.avatar-label {
  font-size: 18px;
  margin: 10px 0 5px;
  text-align: left;
}

.avatar-selection {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin: 10px 0 20px;
}

.avatar-option {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: 0.2s;
  object-fit: cover;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
}

.avatar-option:hover {
  transform: scale(1.1);
}

.avatar-option.selected {
  border-color: #FFD700;
  box-shadow: 0 0 10px #FFD700;
}
.icon-avatar-selection {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 15px 0 25px;
}

.avatar-icon {
  font-size: 40px;
  padding: 15px;
  border-radius: 50%;
  background-color: white;
  color: #FF4500;
  border: 3px solid transparent;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
}

.avatar-icon:hover {
  transform: scale(1.2);
  background-color: #FFD700;
  color: #000;
}

.avatar-icon.selected {
  border-color: #FFD700;
  background-color: #FFFACD;
  color: #000;
  box-shadow: 0 0 12px #FFD700;
}
.member-avatar-icon {
  font-size: 36px;
  color: #FF4500;
  margin-right: 10px;
}
.logout-button {
  margin-top: 10px;
  display: inline-block;
  background-color: #A52A2A;
  color: white;
  padding: 8px 15px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-family: 'Fredoka One', cursive;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

.logout-button:hover {
  background-color: #8B0000;
}
.login-popup {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.login-box {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  width: 300px;
  position: relative;
  font-family: 'Fredoka One', cursive;
  text-align: center;
}

.login-box h2 {
  margin-top: 0;
  color: #FF4500;
}

.login-box input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  font-size: 16px;
  border: 2px solid #FFD700;
  border-radius: 10px;
}

.login-box button[type="submit"] {
  width: 100%;
  background-color: #FF4500;
  color: white;
  padding: 10px;
  border: none;
  font-size: 18px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 10px;
}

.login-box button[type="submit"]:hover {
  background-color: #e63e00;
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #FFD700;
  color: black;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-weight: bold;
}

.login-error {
  color: red;
  font-size: 14px;
  margin-top: 10px;
}

