* {
  box-sizing: border-box;
}

html,
body {
  overflow: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #eff3ff;
  font-family: "Open Sans", sans-serif;
}

/* conteneur global centré */
.game-container {
  max-width: 2000px;
  margin: 0 auto;
  padding: 0 4rem; /* ← PLUS D’AIR À DROITE */
}


/* HOME */
.home-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem; /* moins d’espace sous Home */
  margin-top: -1.5rem;   /* Home légèrement plus haut */
}


#home {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  font-family: "Futura", sans-serif;
  padding: 0.3rem 1.2rem;
  margin: 0 5px;
  border-radius: 5px;
  background: #dc143c;
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
position: relative;
  top: -100px; /* ← ajuste ici (ex: -5px, -15px, -20px) */
}


/* LAYOUT */
.layout {
  display: flex;
  align-items: center; /* alignement vertical des colonnes */
  gap: 2rem;
}


/* SIDEBAR */
#text {
  width: 260px;
  flex-shrink: 0;
  padding-left: 2rem; /* ← décale les draggables vers la droite */
}

.draggable-elements {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

/* MAP */
/* MAP */
.map-wrapper {
  position: relative;
  flex: none;
  width: min(60vw, 900px); /* ← ICI */
  margin-left: 8rem;
}

.map-image {
  width: 100%;
  height: auto;
  display: block;
}

/* LABELS */
.textArea {
  display: grid;
  place-content: center;
  min-width: 90px;
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 12px;
  background: #2c2f36;
  color: #fff;
  user-select: none;
}

.bigArea {
  grid-column: span 2;
}

/* DRAG */
.draggable {
  cursor: grab;
}

.draggable.dragged {
  opacity: 0.4;
  pointer-events: none;
}

/* DROP */
.droppable {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}


.droppable.dropped {
  background-color: #35A993;
}

/** SPLIT **/

.split.attacker {
  top: 88.27%;
  left: 45.50%;
}
.split.defender {
  top: 14.30%;
  left: 47.10%;
}


.split.a1 {
  top: 24.30%;
  left: 84.10%;
}
.split.a2 {
  top: 35.50%;
  left: 90.30%;
}
.split.a3 {
  top: 52.90%;
  left: 82.20%;
}
.split.a4 {
  top: 69.90%;
  left: 83.40%;
}
.split.a5 {
  top: 18.00%;
  left: 78.00%;
}
.split.a6 {
  top: 51.70%;
  left: 67.40%;
}
.split.a7 {
  top: 35.30%;
  left: 74.00%;
}
.split.a8 {
  top: 30.30%;
  left: 66.10%;
}
.split.a9 {
  top: 67.50%;
  left: 68.40%;
}

.split.b1 {
  top: 28.90%;
  left: 5.50%;
}
.split.b2 {
  top: 33.70%;
  left: 17.00%;
}
.split.b3 {
  top: 56.90%;
  left: 13.50%;
}
.split.b4 {
  top: 70.90%;
  left: 20.90%;
}
.split.b5 {
  top: 64.90%;
  left: 33.60%;
}
.split.b6 {
  top: 22.70%;
  left: 23.40%;
}
.split.b7 {
  top: 38.90%;
  left: 24.40%;
}
.split.b8 {
  top: 46.20%;
  left: 31.60%;
}
.split.b9 {
  top: 33.90%;
  left: 38.30%;
}

.split.m1 {
  top: 49.50%;
  left: 38.70%;
}
.split.m2 {
  top: 52.00%;
  left: 46.20%;
}
.split.m3 {
  top: 64.50%;
  left: 45.20%;
}
.split.m4 {
  top: 42.10%;
  left: 56.50%;
}
/* MOBILE */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  #text {
    width: 100%;
  }

  .draggable-elements {
    grid-template-columns: repeat(3, 1fr);
  }
}


#error-container {
  width: 140px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-left: 5rem; /* ← micro déplacement gauche */


}

#error {
  color: crimson;
  font-size: 96px;
  font-weight: 900;
  font-family: "Futura", sans-serif;
  visibility: hidden;
}

#error1 {
  color: crimson;
  font-size: 28px;
  font-weight: 900;
  visibility: hidden;
  font-family: "Futura", sans-serif;
}


/* CASE FANTÔME (debug positions)
#css-helper {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem;
  background: #2c2f36;
  border-radius: 8px;
  z-index: 1000;
}

#css-helper select,
#css-helper button {
  height: 32px;
  font-size: 14px;
}

#css-helper button {
  background: crimson;
  color: white;
  border: none;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
}

#css-helper button:hover {
  opacity: 0.9;
}

.ghost {
  position: absolute;
  width: 90px;
  height: 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;
  font-weight: bold;

  background: rgba(220, 38, 38, 0.25);
  border: 2px dashed crimson;
  border-radius: 12px;

  color: crimson;

  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 999;
}

.droppable {
  pointer-events: none;
}
*/