html, body {
  margin: 0;
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #f3f3f3;
  display: block; /* ❌ pas de centering */
}

.dock-wrapper {
  position: fixed; /* ancré à l'écran */
  bottom: 50px;     /* hauteur depuis le bas */
  left: 50px;          /* ✅ ancrage à gauche */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 1000;
}

.submenu {
  position: absolute;
  bottom: 110px;
  left: 0;
  border: solid 2px #f7f7f7;
  padding: 10px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: row;
  gap: 16px;
  overflow-x: auto;         /* ✅ scroll horizontal */
  overflow-y: hidden;       /* ✅ bloque le scroll vertical */
  max-width: 100vw;         /* ✅ largeur max = écran */
  width: 100%;              /* ✅ important pour le comportement fluide */
  white-space: nowrap;      /* ✅ évite que les items passent à la ligne */
  height: 75px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;   /* ✅ évite que le padding déborde */
}

.submenu::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid white;
}

.submenu-item {
  height: 100%;
  display: inline-flex;          /* ✅ au lieu de flex pour respecter nowrap */
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 180px;
  background: #fff;
  border: 2px solid #fff;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  box-sizing: border-box;
}

.submenu-item:hover {
  border: 2px solid #453EDB;
  background-color: rgba(69, 62, 219, 0.3);
}

.submenu-item span {
  font-weight: bold;
}

.submenu-item small {
  font-size: 12px;
  color: #666;
}

.submenu-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.submenu-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.dock {
  background: white;
  padding: 10px 20px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  z-index: 2;
  overflow: hidden; /* empêche débordement visuel */
}

.dock-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100vw;
  white-space: nowrap;
  scroll-behavior: smooth;
  padding: 5px 10px;
  -webkit-overflow-scrolling: touch;
}

.dock button {
  background: none;
  border: 2px solid transparent;
  cursor: pointer;
  box-shadow: 0 1px 5px rgba(0,0,0,0.2);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 
    transform 0.2s ease,
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.dock button:hover {
  border-color: #e1e1e1;
}

.dock button.active {
  border-color: #453EDB;
  background-color: rgba(69, 62, 219, 0.3);
}

.dock img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.submenu a.submenu-item {
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s ease, border 0.3s ease;
}
