
/* === Toolbar principale === */
#custom-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 14px;
    padding: 10px;
    z-index: 9999;
}

/* === Toolbar dépliée (colonne d'outils) === */
#toggled-toolbar {
    max-height: 400px;
    max-width: 200px;
    margin-left: 70px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 12px;
    border-radius: 14px;
    z-index: 9999;
}

.tool-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.tool-btn.active-tool {
    background-color: rgba(139, 0, 0, 0.7);
    box-shadow: 0 0 4px rgba(139, 0, 0, 0.6);
}

/* === Bouton de toggle === */
#toggleToolbar {
    position: absolute;
    top: 20px;
    left: 20px;
}

/* === Conteneur des output boxes === */
#output-boxes-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    z-index: 99999;
    max-height: 50vh; /* ✅ limite de hauteur pour éviter débordement */
    padding-right: 6px; /* petit espace pour éviter que la scroll bar ne cache le contenu */
    scrollbar-width: none; /* Firefox */
}

#output-boxes-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, etc. */
}

/* === Style général des output boxes === */
.output-box {
    display: none;
    background: rgba(20, 20, 20, 0.95);
    color: #f0f0f0;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    width: max-content;
    max-width: 280px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 99999;
    line-height: 1.6;
	margin: 0;
    min-height: 80px;
    max-height: 220px;
	width: 400px;
}

/* === Titre dans une output box === */
.output-header {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
    color: #ffffff;
}

/* === Groupes de contenus internes === */
.output-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.output-section.horizontal {
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
}

.section-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.axis-icon img {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* === Données (texte affiché) === */
.output-text,
.output-box .output-text {
    font-weight: 600;
    font-size: 15px;
    color: #ffffff;
}

/* === HR personnalisé === */
.output-box hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

/* === Actions dans les fenêtres (copier, fermer) === */
.output-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.output-actions button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

#sections-box {
	height: 600px;
}

/* === Animation d’apparition douce === */
.output-box.show {
    animation: slideIn 0.25s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Style spécifique pour infoPosition === */
#infoPositionContainer i {
    cursor: pointer;
    margin-left: 10px;
    color: #ccc;
    transition: color 0.2s;
}

#infoPositionContainer i:hover {
    color: white;
}

.hidden {
    display: none !important;
}

.section-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.axis-icon img {
  width: 20px;
  height: 20px;
  cursor: pointer;
}
.output-section.horizontal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

/* === Section Tool Box === */
#sections-box {
    display: none;
    background: rgba(20, 20, 20, 0.95);
    color: #f0f0f0;
    padding: 16px;
    border-radius: 14px;
    font-size: 14px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
    width: max-content;
    min-width: 280px;
    backdrop-filter: blur(6px);
    animation: slideIn 0.3s ease-out;
  }
  
  #sections-box table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
  }
  
  #sections-box tr td {
    padding: 6px 8px;
    vertical-align: middle;
  }
  
  #sections-box hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
  }
  
  /* === Sliders === */
  #sections-box input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, darkred, #491010);
    outline: none;
    -webkit-appearance: none;
  }
  
  #sections-box input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid darkred;
  }
  
  #sections-box input[type="checkbox"] {
    transform: scale(1.2);
    accent-color: darkred;
    margin-left: 6px;
  }
  
  /* === Axis icons === */
  .axis-icon img {
    width: 24px;
    height: 24px;
    filter: invert(1);
    cursor: pointer;
  }
  
  .section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
  }

  #sections-box table tr.section-row td {
    padding-top: 4px;
    padding-bottom: 4px;
  }
  
  
  .output-section.horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }

  #sections-box table tr + tr {
    border-top: 1px solid rgba(255,255,255,0.05);
  }
  