@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,600&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
    text-decoration: none;
}
:root{
   --body-color:#f5f6f9;
   --text-color:#666666;
}
/* Animation transition entre pages */
body {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}
body.fade-in {
  opacity: 1;
}


/* Global */
.box{
    width: 90%;
    margin:auto;
}

/* En-tête */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: #2c522b;
    transition: background 0.5s ease-in-out;
}
hr{ color:#555; }

.header-box{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo a img { width: 140px; height: auto; }

/* Liens navigation */
.nav-links ul {
    display: flex;
    gap: 25px;
}
.nav-links ul li a{
   display: inline-flex;
   align-items: center;
   gap: 8px;
   font-size: 14px;
   text-decoration: none;
   color: #fff; /* gris permanent par défaut */
   text-transform: uppercase;
}
.nav-links ul li a:hover{ border-bottom: 2px solid #5d8c4a; }

.icons  { display: flex; gap: 20px; }
.nav-links ul li a i{ margin-right: 5px; }
.icons button{ background: none; }
.icons button i{ font-size: 20px; color:#fff; }

.header .icons .notif {
    position: relative;
    background: none;
    border: none;
    margin-top: 6px;
    cursor: pointer;
}
.header .icons .notif span{
  position: absolute;
	top: -10px;
	right:-11px;
	width: 18px;
	height:18px;
	border-radius: 50%;
  border: 2px solid; 
	background:#5d8c4a ;
	display: flex;
	justify-content: center;
	align-items: center;
	color:#fff;
	font-size: 10px;
	font-weight: 700;
}

/* Effet scroll : agit uniquement sur le header */
.header.header-scrolled {
  background-color: #2c522b !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  animation: slideDown 0.33s ease-in-out forwards; 
}


.btn_open_menu{ display: none; color:#fff; }
.btn_close_menu{ display:none; }

/* Header transparent sur page accueil (desktop uniquement) */
body.transparent-header .header { background: transparent; }

body.transparent-header .header.header-scrolled {
  background-color: #2c522b !important;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-links ul li a.active {
  color: #fff;
  border-bottom: 2px solid #a5f585;
}

/* Panier */
.wrapper-cart{
  position: fixed;
  right: 0;
  top:-2000px;
  background:#fff;
  z-index: 1100;
  padding: 30px;
  border-left: 1px solid #f5f6f9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 400px;
  transition: 1s ease;
}
.wrapper-cart.active{ bottom: 0; top: 0; }  

.wrapper-cart .top-cart{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.top-cart h3{ font-size: 15px; }
.top-cart h3 span{ font-size: 12px; color:#666666; font-weight: normal; margin-left: 5px; }
.wrapper-cart .top-cart i{ font-size: 20px; cursor: pointer; }

.wrapper-cart  .items_in_cart{
  padding: 20px 0;
  border-block: 1px solid #e1e3e7;
  margin-block: 20px;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}
.quantity-controls{
  display: flex;
  align-items: center; 
  justify-content: flex-end; 
  margin-right: 10px;
  gap: 8px;
  margin-bottom: 8px;
}
.quantity-controls button{
  border: none;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}
.quantity-controls span{ font-size: 12px; }

.wrapper-cart .cart-item .cart-content{ border-bottom:2px dotted #666666; width: 100%; }
.wrapper-cart .items_in_cart .cart-item{
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  text-transform: capitalize;
}
.wrapper-cart .cart-item img{
  max-width: 80px;
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.wrapper-cart .cart-item h3{ margin: 10px 0; color:#000; font-weight: 500; font-size:12px; }
.wrapper-cart .cart-item .price{ font-weight: bold; color:#5d8c4a; font-size: 14px; }
.wrapper-cart .cart-item .desc{ font-size: 12px; color: #333; margin-bottom:10px; }
.wrapper-cart .cart-item .delete{ border: none; background: none; }
.wrapper-cart .cart-item .delete i{ font-size:16px; cursor: pointer; transition: 0.3s; }
.wrapper-cart .cart-item .delete i:hover{ color:#666666; transform: scale(1.1); }

.wrapper-cart .bottom-cart .total{
  display: flex;
  justify-content:space-between ;
  margin: 10px 0 30px 0;
  font-weight: 500;
}
.wrapper-cart .bottom-cart .price-total{ color:#000; font-weight: bold; }

.wrapper-cart .button-cart{ display: flex; flex-direction: column; gap: 20px; }
.button-cart .btn_cart{
  background-color:  #5d8c4a;
  border-radius: 5px;
  padding: 8px 10px;
  text-align: center;
  color:#fff;
  font-weight: bold;
  border: none;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.3s ease;
}
.wrapper-cart .button-cart .btn_cart:hover{ background:  #2c522b; }

/* Dropdown user */
.dropdown-user {
  display: none;
  position: absolute;
  top: 50px;
  right: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding:20px 10px;
  z-index: 200;
  font-size: 14px;
  width:200px;
}
.dropdown-user a {
  display: block;
  padding: 6px 10px;
  color: #333;
}
.dropdown-user a:hover { background: #f2f2f2; }
.dropdown-user p{ font-size: 16px; font-weight: bold; }

/* Animations */
@keyframes slideDown {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width:1069px){
  .header-box .logo img{ width: 100px; }
  .header-box .nav-links{ padding: 20px 0; }
  .header-box .nav-links ul{
    position: fixed;
    top: 0;
    left:-500%;
    bottom: 0;
     width: 100%;
    flex-direction: column;
    gap: 20px;
    background:#2c522b; 
    height:100vh;
 
    transition:1s ease;
    padding:80px 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 2000;
  }
  .header-box .nav-links ul li a{ margin-top:20px; }
  .header-box .nav-links ul.active{ left: 0; }

  .header .btn_open_menu{
    display: block;
    font-size:20px;
    cursor: pointer;
  }
  .header .btn_close_menu{
    display:none !important;
    position: absolute;
    bottom:-0px;
    right:-0px;
    font-size: 24px;
    cursor: pointer;
    z-index: 3001;
    color:#fff;
    border: none;
    background:none;
  }
  .nav-links ul.active ~ .btn_close_menu{ display:block !important; }

  .wrapper-cart{ left: 0; right: 0; width: 100%; height: 100vh; }
}

@media (max-width:768px){
  .wrapper-cart .item-cart h3{ font-size: 12px; }
  .item-cart .price{ font-size: 12px; }
  .wrapper-cart .item-cart .delete i{ font-size:12px; }
  .wrapper-cart .item-cart img{ max-width:100px; }
  .dropdown-user{ font-size: 12px; }
    .header .btn_close_menu{
    display:none !important;
    position: absolute;
    top:-10px;
    right:40px;
    font-size: 24px;
    cursor: pointer;
    z-index: 3001;
    color:#fff;
    border: none;
    background:none;
  }
}
