/* Style du selecteur d'unité comme les boutons toolbar */
#unit-select.toolbar-btn-square {
  background: #f7fafd;
  color: #28333c;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 0.8em;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}


/* --- Page Connexion / Inscription --- */
.login-header {
  /* background: #282c3b; */
  padding: 0 0 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.login-logo {
  color: #fff;
  font-size: 1.7em;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 1px;
}
.login-main {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7fafd;
}
.login-container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(40,44,59,0.08);
  padding: 40px 36px 32px 36px;
  min-width: 340px;
  max-width: 400px;
  width: 100%;
  margin: 32px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.switch-group {
  display: flex;
  gap: 18px;
  margin-bottom: 32px;
}
.switch-group .main-btn {
  flex: 1;
  font-size: 1.08em;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
  border-bottom: 2px solid transparent;
}
.switch-group .main-btn.active {
  background: #28333c;
  color: #fff;
  border-bottom: 2px solid #28333c;
}
.login-container form {
  width: 100%;
  margin-bottom: 0;
}
.login-container label {
  display: block;
  margin-bottom: 12px;
  font-size: 1em;
  color: #222;
}
.login-container input,
.login-container select {
  width: 100%;
  padding: 7px 10px;
  margin-top: 4px;
  border-radius: 6px;
  border: 1px solid #b3c6e0;
  background: #f7fafd;
  font-size: 1em;
  box-sizing: border-box;
}
.login-container button[type="submit"] {
  width: 100%;
  margin-top: 18px;
  font-size: 1.08em;
  border-radius: 8px;
  padding: 10px 0;
}
/* Boutons principaux du header à droite */
.main-btn {
  padding: 10px 18px;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  color: #fff;
  border: none;
  font-size: 1em;
  transition: background 0.2s;
}
.green-btn {
  background: #3a4a6b;
  
  color: #eaf6ff;
}
.load-project-btn {
  background: #3a4a6b;
  color: #eaf6ff;
  font-size: 0.9em;
  padding: 5px 18px;
}
.delete-project-btn {
  background: white;
  color: #ff6b6b;
  font-size: 0.9em;
  padding: 5px 18px;
  border: 1px solid #ff6b6b;
}
.modal-btn {
  background: #3a4a6b;
  color: #eaf6ff;
  font-size: 0.9em;
}
.modal-grey-btn {
  background: #f0f0f0;
  color: #333;
  font-size: 0.9em;
}
.orange-btn {
  background: #3a4a6b;
  color: #eaf6ff;
}
.main-btn:hover {
  filter: brightness(1.1);
}
.delete-project-btn:hover {
  background: #ff6b6b;
  color: white;
  border: 1px solid #ff6b6b;
}
/* Icône utilisateur */
.user-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(45deg, #667eea 0%, #282c3b 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  text-decoration: none ;

}
.user-emoji {
  font-size: 22px;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  letter-spacing: 0;
}
body, html {
  margin: 0;
  height: 100%;
  font-family: Arial, sans-serif;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-items: center;
  min-height: 60px;
  padding: 0 20px; height: 60px; background: #282c3b; color: white; font-family: sans-serif;
}
body {
  overflow: hidden;
}

#add-node-btn {
  background: #3a4a6b;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}
#add-beam-btn {
  background: #3a4a6b;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}
#add-support-btn {
  background: #3a4a6b;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}

/* Styles pour les boutons Select et Move */
#select, #move {
  background: #3a4a6b;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#select:hover, #move:hover {
  filter: brightness(1.1);
}

#select.active, #move.active {
  background: #3a4a6b;
  color: white;
}

#add-support-btn {
  background: #3a4a6b;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}
#add-btn {
  background: #3a4a6b;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}
#add-material-btn {
  background: #3a4a6b;
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
}
main {
  height: calc(100vh - 80px);
  position: relative;
}

#grid-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #f1f2f6;
  cursor: crosshair;
}

footer {
  background: #282c3b;
  color: white;
  text-align: center;
  padding: 10px;
  cursor: pointer;
}

#data-table {
  position: fixed;      /* sous la bannière header (à ajuster selon ta hauteur header) */
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  /* border-top: 1px solid #ccc; */
  z-index: 1000;
  overflow: auto;
  /* padding: 10px; */
  display: flex;
  flex-direction: column;
  height:270px;
}

#data-table.hidden {
  display: none;
}

.tabs {
  flex: 0 0 auto;
  margin-bottom: 10px;
}

/* Les contenus des onglets prennent tout l’espace restant */
.tab-content {
  flex-grow: 1;
  overflow: auto;
  /* border: 1px solid #ccc; */
  border-top: none;

}


.hidden {
  display: none;
}

.tabs {
  display: flex;
  margin-bottom: 0px;
}

.tab-button {
  flex: 1;
  padding: 10px;
  background: #3a4a6b;
  border: none;
  color: white;
  cursor: pointer;
  border: 1px solid #282c3b;
  border-radius: 4px;
}
.tab-button:not(:first-child) {
  border-left: none;
}
.tab-button.active {
  background: #28333c;
  color: white;
}

.tab-content {
  background: white;

}
#toolbar {
  gap: 5px;
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

#toolbar button {
  background: white;
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 18px;
  transition: background 0.3s;
}

#toolbar button.active {
  background: #28333c;
  color: white;
}
#toggle-table {
  position: fixed;
  bottom: 0;      /* ou 10px si tu préfères un peu en dessous */
  left: 0;
  width: 100%;
  height: 30px;
  border: none;
  background-color: #282c3b;
  color: white;
  font-size: 18px;
  cursor: pointer;
  text-align: center;  /* centre la flèche */
  line-height: 20px;   /* centre verticalement */
  user-select: none;
  z-index: 50;
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  margin-top:4px
}
.blue-btn {
  background-color: #28333c;
}

#unit-select option {
  font-size: 0.95em;
  text-align: center;
  padding: 0;
}

#unit-select {
  appearance: none;
 -webkit-appearance: none;
  -moz-appearance: none;
  background: #f7fafd;
  border: 1px solid #b3c6e0;
  outline: none;
}

#unit-select::-ms-expand {
  display: none;
}