/* =========================================================
   BARRE FLOTTANTE - TAILLE MOYENNE
   ========================================================= */

/* Bouton toggle pour afficher/masquer la barre */
.toolbar-toggle-btn {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary, #0d3380);
  border: 2px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  transition: all 0.3s ease;
}

.toolbar-toggle-btn:hover {
  background: var(--secondary, #439543);
  transform: translateX(-50%) scale(1.1);
}

.toolbar-toggle-btn.hidden {
  bottom: 10px;
}

.toolbar-toggle-btn i {
  transition: transform 0.3s ease;
}

/* Barre flottante - TAILLE MOYENNE */
.floating-toolbar {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: none;
}

.floating-toolbar.is-visible {
  display: block;
  animation: slideUp 0.3s ease;
}

.floating-toolbar.collapsed {
  display: none !important;
}

.toolbar-container {
  background: var(--primary, #0d3380);
  border-radius: 28px;
  height: 58px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.22);
}

/* Navigation buttons - TAILLE MOYENNE */
.nav-button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.nav-button:hover {
  background: var(--secondary, #439543);
  color: white;
}

/* Tools list */
.tools-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 8px;
  scrollbar-width: none;
  max-width: 700px;
}

.tools-list::-webkit-scrollbar {
  display: none;
}

/* Tool items - TAILLE MOYENNE */
.tool-item {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  text-align: center;
  cursor: pointer;
  height: auto;
  padding: 3px 6px;
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
  outline: none;
}

.tool-item:hover .tool-icon {
  background: rgb(255 255 255 / 30%);
}

.tool-item.is-active .tool-icon {
  background: var(--secondary, #439543);
}

.tool-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgb(255 255 255 / 10%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}

.tool-label {
  font-size: 9px;
  color: white;
  margin-top: 3px;
  white-space: nowrap;
  max-width: 55px;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}

.tool-item:focus,
.tool-item:focus-visible {
  outline: none;
}

.tool-item:focus-visible .tool-icon,
.tool-item:active .tool-icon {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.tool-item i {
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
  pointer-events: none;
}

/* Separator */
.separator {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 6px;
}

/* Responsive */
@media (max-width: 768px) {
  .toolbar-toggle-btn {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .floating-toolbar {
    bottom: 55px;
    left: 10px;
    right: 10px;
    transform: none;
  }

  .toolbar-container {
    height: 48px;
    border-radius: 24px;
  }

  .tools-list {
    max-width: none;
  }

  .tool-icon {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .tool-label {
    font-size: 8px;
    max-width: 45px;
  }
}

/* Animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
