/* Style du menu principal */
.navbar {
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 0;
}


/* Correction pour la largeur du menu */
.navbar-dark {
  background-color: transparent !important;
  width: 100%;
}

.navbar-brand {
  padding: 0px;
}

.navbar-brand img {
  height: 50px;
}

/* Style des liens principaux */
.navbar-nav > .nav-item > .nav-link {
  color: #333;
  text-transform: uppercase;
  padding: 10px 5px;
  transition: color 0.3s;
  font-size: 15px;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.5rem 0.5rem;
  font-family: var(--morel-font-family);
  font-weight: 400;
}

.navbar-nav > .nav-item > .nav-link:hover,
.navbar-nav > .nav-item.active > .nav-link,
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: #fff;
  background-color: rgba(0, 0, 0, 0.1);
}

/* Style des sous-menus */
.dropdown-menu {
  border: none;
  border-radius: 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 0;
  margin-top: 0;
  background-color: #343a40;
}

/* Style des titres dans les sous-menus */
.dropdown-header {
  color: #333;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1rem;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--morel-secondary);
  white-space: nowrap;
}

/* Style des liens dans les sous-menus */
.dropdown-item {
  color: #666;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--morel-secondary);
  background-color: transparent;
}

.dropdown-menu .nav-item {
  padding: 0 !important;
  margin: 0 !important;
  font-size: 1.1rem;
}


/* Style du mega menu */
.mega-menu {
  width: 100%;
  max-width: 100%;
}

.mega-menu .container {
  margin: 0 auto;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.mega-menu .text-uppercase {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--morel-secondary);
  padding-bottom: 0.5rem;
  color: #fff;
}

.mega-menu .nav-link {
  padding: 0.25rem 0;
  color: rgba(255, 255, 255, 0.7) !important;
}

.mega-menu .nav-link:hover {
  color: var(--morel-secondary) !important;
  background: transparent;
}

.mega-menu img {
  margin-bottom: 0.5rem;
}

.mega-menu p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #fff;
}

/* Styles pour les écrans larges */
@media (min-width: 992px) {
  /* Comportement du dropdown */
  .navbar .dropdown {
    position: static;
  }
  
  .navbar .dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    top: 70px;
    display: block;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s linear;
  }
  
  .navbar .dropdown:hover .dropdown-menu, 
  .navbar .dropdown .dropdown-menu:hover {
    visibility: visible;
    opacity: 1;
    display: block;
  }
  
  /* Espacement des éléments */
  .navbar .nav-item {
    padding: .5rem .5rem;
    margin: 0 .25rem;
  }
  
  .mega-menu {
    margin-top: 0;
  }
}

/* Styles pour les écrans mobiles */
@media (max-width: 991.98px) {
  .mega-menu .container {
    padding: 1rem;
  }
  
  .mega-menu .row > div {
    margin-bottom: 1rem;
  }
  
  .mega-menu .row > div:last-child {
    margin-bottom: 0;
  }
  
  .navbar-toggler {
    margin: 0.5rem 1rem;
  }
  
  .dropdown-menu {
    box-shadow: none;
  }
}

/* Correction pour Bootstrap 5 */
.show {
  display: block !important;
}

/* General styling */
/* adds some margin below the link sets  */
.navbar .dropdown-menu div[class*="col"] {
   margin-bottom:1rem;
}

.navbar .dropdown-menu {
  border:none;
  background-color:rgba(15, 15, 14, 1)!important
}

/* breakpoint and up - mega dropdown styles */
@media screen and (min-width: 992px) {
  
  /* remove the padding from the navbar so the dropdown hover state is not broken */
.navbar {
  padding-top:30px;
  padding-bottom:30px;
}

/* remove the padding from the nav-item and add some margin to give some breathing room on hovers */
.navbar .nav-item {
  padding:.5rem .5rem;
  margin:0 .25rem;
}

/* makes the dropdown full width  */
.navbar .dropdown {position:static;}

.navbar .dropdown-menu {
  width:100%;
  left:0;
  right:0;
/*  height of nav-item  */
  top:70px;
  display:block;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s linear;
  
}
  
 
  /* shows the dropdown menu on hover */
.navbar .dropdown:hover .dropdown-menu, .navbar .dropdown .dropdown-menu:hover {
  display:block;
  visibility: visible;
  opacity: 1;
  transition: visibility 0s, opacity 0.3s linear;
}
  
  .navbar .dropdown-menu {
    /* border: 1px solid rgba(0,0,0,.15); */
    background-color: #fff;
  }

}


/* Styles pour les nouveautés dans le menu principal */
.mega-menu-nouveautes {
  position: relative;
  padding: 15px;
  background-color: rgba(25, 25, 25, 0.95);
  border-radius: 5px;
  overflow: hidden;
  transition: all 0.3s ease;
}

/* Conteneur de l'image */
.mega-menu-nouveautes a {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  margin-bottom: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transform: translateY(0);
  transition: all 0.3s ease;
}

.mega-menu-nouveautes a:hover {
  transform: translateY(-5px);
}

/* Badge "Nouveauté" */
.mega-menu-nouveautes a::before {
  content: "NOUVEAUTÉ";
  position: absolute;
  top: 15px;
  right: -35px;
  background-color: var(--morel-secondary, #ff5e15);
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 5px 40px;
  transform: rotate(45deg);
  z-index: 2;
  text-transform: uppercase;
}

/* Image */
.mega-menu-nouveautes img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.mega-menu-nouveautes a:hover img {
  transform: scale(1.05);
}

/* Overlay sur l'image */
.mega-menu-nouveautes a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  z-index: 1;
}

/* Titre de la nouveauté */
.mega-menu-nouveautes p {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin: 8px 0 0;
  line-height: 1.3;
  text-align: center;
  position: relative;
  padding-bottom: 12px;
}

/* Ligne décorative sous le titre */
.mega-menu-nouveautes p::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background-color: var(--morel-secondary, #ff5e15);
}

/* Animation d'entrée */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mega-menu-nouveautes {
  animation: fadeInUp 0.4s ease-out forwards;
}

/* Adaptation pour mobile */
@media (max-width: 767px) {
  .mega-menu-nouveautes {
    padding: 10px;
  }
  
  .mega-menu-nouveautes img {
    height: 140px;
  }
  
  .mega-menu-nouveautes p {
    font-size: 14px;
  }
}

@media (max-width: 991.98px) {
  .navbar,
  .navbar-dark,
  .navbar-collapse.show {
    background: rgba(0,0,0,0.97) !important;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 9999;
  }
  .navbar-nav .nav-link,
  .navbar-nav .dropdown-item {
    color: #fff !important;
  }
  .navbar-nav .nav-link:hover,
  .navbar-nav .dropdown-item:hover {
    color: var(--morel-secondary, #e6007f) !important;
  }
}