body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #004080, #0066cc);
  color: white;
  margin: 0;
  padding: 20px;
}

#menu {
  background: #004080;
  padding: 10px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
}

#menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 30px;
  transition: max-height 0.3s ease;
}

#menu a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: 0.3s;
}

#menu a:hover {
  background: #0066cc;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  height: 3px;
  width: 25px;
  background: white;
  border-radius: 2px;
}

h1 {
  text-align: center;
  margin: 20px 0 30px;
}

.group h2 {
  text-align: center;
  margin-top: 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 5px;
  font-size: 1.2rem;
  color: #ffcc00;
}

.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 20px;
}

.container2 {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 20px 0;
}

.group {
  flex: 1 1 250px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.25);
  min-width: 250px;
}

.equipes, .members, .team {
  background: rgba(255,255,255,0.15);
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  min-height: 60px;
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  transition: border-color 0.2s, background 0.2s;
  flex-direction: row;
  align-items: center;
}

.team {
  position: relative;
  padding-top: 25px;
}

.team-title {
  position: absolute;
  top: 5px;
  left: 10px;
  font-size: 14px;
  opacity: 0.8;
  pointer-events: none;
}

.equipes.dragover, .members.dragover, .team.dragover {
  border-color: #ffcc00;
  background: rgba(255, 200, 0, 0.2);
}

.person {
  background: white;
  color: #004080;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: grab;
  user-select: none;
  font-weight: 500;
  transition: transform 0.2s, background 0.2s;
}

.person:hover {
  background: #dceeff;
  transform: scale(1.05);
}

.person:active {
  cursor: grabbing;
  transform: scale(1.1);
}

.equipe {
  background: #ffcc00;
  color: #004080;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: bold;
  cursor: grab;
  transition: transform 0.2s;
}

.equipe:hover {
  transform: scale(1.05);
}

.equipe:active {
  cursor: grabbing;
  transform: scale(1.1);
}

.controls {
  text-align: center;
  margin-bottom: 20px;
}

.controls input,
.controls select {
  padding: 6px;
  border-radius: 6px;
  border: none;
  margin-right: 5px;
  max-width: 150px;
}

.controls button {
  padding: 7px 15px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.controls .add {
  background: #00cc88;
  color: white;
}

.controls .add:hover {
  background: #009966;
}

.controls .reset {
  background: #ff6666;
  color: white;
}

.controls .reset:hover {
  background: #cc0000;
}

@media (max-width: 800px) {
  .container {
    grid-template-columns: 1fr;
  }
  .controls input,
  .controls select,
  .controls button {
    width: 100%;
    margin-bottom: 10px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  #menu ul {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-height: 0;
    overflow: hidden;
  }

  #menu.active ul {
    max-height: 500px;
  }

  #menu a {
    width: 100%;
    text-align: center;
    font-size: 18px;
  }

  .menu-toggle {
    display: flex;
  }

  .group {
    padding: 10px;
    min-width: 100%;
  }

  .person, .equipe {
    padding: 5px 8px;
    font-size: 14px;
  }

  .team, .equipes, .members {
    min-height: 50px;
  }

  .controls input,
  .controls select,
  .controls button {
    width: 100%;
  }
}
