.parent-categories {
  list-style: none;
  display: flex;
  justify-content: space-around;
  padding: 0;
  margin: 0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  background: var(--background-main);
}

.parent-category {
  flex: 1;
  position: relative;
  font-size: 80%;
  z-index: 20;
  border-radius: 5px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  margin: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.parent-category:first-child a {
  font-weight: bold;
  color: black;
  text-decoration: none;
  padding: 10px 15px;
  display: block;
  border-radius: 5px;
  text-align: center;
}

.parent-category:first-child a:hover {
  background-color: var(--background-hover);
}

.parent-category:not(:first-child) > a {
  color: var(--text-color);
  text-decoration: none;
  font-family: "Georgia", serif;
  font-weight: bold;
  display: block;
  border-radius: 5px;
  text-align: center;
}

.parent-category:not(:first-child) > a::after {
  content: " ▼";
  font-size: 0.8em;
  color: var(--icon-color);
  margin-left: 5px;
}

.parent-category:not(:first-child):hover {
  transform: translateY(-3px);
  background-color: var(--background-hover);
}

.parent-category:not(:first-child):hover > a::after {
  content: " ▲";
}

.parent-category:not(:first-child) > a:hover {
  color: var(--text-hover-color);
}

.sub-categories {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  list-style: none;
  background: var(--background-main);
  margin-top: 10px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Créez un pseudo-élément pour étendre la zone de survol */
.parent-category:not(:first-child):after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 10px; /* Doit correspondre à la marge-top de .sub-categories */
}

.parent-category:not(:first-child):hover .sub-categories {
  display: block;
  opacity: 1;
  visibility: visible;
}

.sub-categories li {
  padding: 10px 20px;
}

.sub-categories li a {
  color: #000000;
  text-decoration: none;
  font-family: "Georgia", serif;
  text-shadow: 1px 1px 2px white, -1px -1px 2px white, 1px -1px 2px white,
    -1px 1px 2px white;
  -webkit-text-stroke: 0.2px black;
  margin: 50px;
}

.sub-categories li a:hover {
  color: var(--text-hover-color);
}
