/* Conteneur principal */


/*Fenetre pour mettre name and categorie */
/* Style du modal */
#saveMaterialModal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #1e1e1e;
  padding: 24px 28px;
  border-radius: 12px;
  color: #fff;
  z-index: 1000;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  min-width: 340px;
  max-width: 95vw;
}

#saveMaterialModal label {
  display: block;
  font-size: 0.9em;
  margin-bottom: 12px;
  color: #ccc;
}

#saveMaterialModal input,
#saveMaterialModal select {
  width: 100%;
  padding: 8px 10px;
  margin-top: 4px;
  border: 1px solid #444;
  border-radius: 5px;
  background: #2e2e2e;
  color: #fff;
  font-size: 0.95em;
  box-sizing: border-box;
}

#saveMaterialModal input[type="text"]::placeholder {
  color: #888;
  font-style: italic;
}

/* Groupe de boutons */
.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  gap: 10px;
}

/* Boutons arrondis style capsule */
.modal-actions button {
  flex: 1;
  padding: 9px 14px;
  font-weight: bold;
  font-size: 0.9em;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#saveMaterialDownload {
  background: #0097a7;
  color: white;
}
#saveMaterialDownload:hover {
  background: #007f90;
}

#saveMaterialServer {
  background: #4caf50;
  color: white;
}
#saveMaterialServer:hover {
  background: #3b9244;
}

#saveMaterialCancel {
  background: #e53935;
  color: white;
}
#saveMaterialCancel:hover {
  background: #c62828;
}

/* Icônes FontAwesome */
.modal-actions i {
  font-size: 1em;
}

/* Cacher le modal par défaut */
.hidden {
  display: none;
}

















/*OPEN AND SAVE Button */
.material-editor h1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.material-toolbar-icons {
  display: flex;
  gap: 10px;
}

.material-toolbar-icons i {
  color: #aaa;
  font-size: 15px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.material-toolbar-icons i:hover {
  color: #00bcd4;
  transform: scale(1.1);
}






.collapsible {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 10px;
  user-select: none;
}

.collapsible .chevron {
  transform: rotate(-90deg); /* fermé par défaut */
  transition: transform 0.3s ease;
}

.collapsible:not(.collapsed) .chevron {
  transform: rotate(0deg); /* ouvert */
}

.group-content {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 1;
}

.group-content.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}






.material-editor {
  position: fixed;
  top: 0;
  left: 0;
  max-width: 300px;
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  font-size: 12px;
  background: #222;
  color: #ddd;
  padding: 0px 20px;
  border-right: 1px solid #444;
  overflow-y: auto;
}

/* Titres de section */
.material-editor h1, 
.material-editor h2 {
  font-weight: 500;
  margin: 15px 0 8px;
  padding-bottom: 3px;
  color: #eee;
  border-bottom: 1px solid #555;
}

/* Chaque ligne avec flexbox compacte */
.material-editor label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

/* Texte des labels condensé */
.material-editor label span {
  /* width: 120px; */
  min-width: 120px;
  padding-right: 8px;
  flex-shrink: 0;
  color: #aaa;
}

/* Input générique compact */
.material-editor input[type="color"],
.material-editor input[type="number"],
.material-editor input[type="range"] {
  flex: 1;
  height: 24px;
  background: #333;
  border: 1px solid #444;
  border-radius: 3px;
  color: #ccc;
  margin-right: 5px;
}

/* Spécifique pour color picker */
.material-editor input[type="color"] {
  height: 24px;
  padding: 0;
}

/* Slider plus compact */
.material-editor input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: #444;
  border-radius: 2px;
  cursor: pointer;
}

.material-editor input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #00bcd4;
  border-radius: 50%;
  cursor: pointer;
}

/* Gestion des fichiers compacte */
.material-editor input[type="file"] {
  font-size: 10px;
  border: none;
  background: transparent;
  color: #aaa;
  flex-shrink: 1;
  width: 90px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.material-editor .range-value {
  font-size: 11px;
  color: #bbb;
  min-width: 30px;
  text-align: left;
}

/* Checkbox compacte */
.material-editor input[type="checkbox"] {
  transform: scale(1.1);
  cursor: pointer;
  accent-color: #00bcd4;
}

/* Scrollbar élégante */
.material-editor::-webkit-scrollbar {
  width: 6px;
}

.material-editor::-webkit-scrollbar-track {
  background: #2b2b2b;
}

.material-editor::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}



.file-input {
  display: flex;
  align-items: center;
}

.file-input .btn-file {
  background-color: #00bcd4;
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  user-select: none;
  transition: background-color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.file-input .btn-file:hover {
  background-color: #0097a7;
}

.file-input .remove-file {
  margin-left: 5px;
  cursor: pointer;
  color: #ff5252;
  user-select: none;
  font-size: 13px;
  visibility: hidden; /* Caché par défaut */
}