/* HEADER */
body{
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #FFFFFFDF;
}

.header2 {
  background: #FFFFFFDF;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header2 img.logo {
  width: 51px;
  height: auto;
}

.logo {
  width: 15px;
  height: auto;
  display: block;
  padding: 5px;
}

.nav {
  display: flex;
  list-style: none;
  justify-content: center;
  gap: 20px; 
}

.nav-mobile {
  display: none;
}

.nav li {
  margin: 0 15px;
  font-size: 18px;
}

.nav a {
  text-decoration: none;
  color: black;
  font-weight: regular;
}

.nav a:hover {
  text-decoration: none;
  color: rgb(150, 150, 150);
  font-weight: regular;
}

.nav2 {
  display: flex;
  align-items: center;
  padding: 10px;
}

.logo-panier {
  width: 40px;
  height: auto;
}

/* Nombre d'articles dans le panier */
#cart-count {
position: absolute;
top: 4px;
right: 4px;
background: red;
color: white;
font-size: 12px;
font-weight: bold;
height: 20px;            
min-width: 20px;          
padding: 0 6px;           
border-radius: 9999px;    
display: flex;
align-items: center;
justify-content: center;
}

.section-title {
  font-size: 40px; /* Augmentez la valeur selon vos besoins */
  text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f4f4f4;
}

.decrease-quantity, .increase-quantity{
  background: none;
  border: non
}

.button {
  margin: 10px;
    padding: 10px 20px;
    border: none;
    background: black;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.btn-danger {
    background: red;
    color: white;
}

.btn-success {
    background: green;
    color: white;
}

.cart-img {
    width: 60px;
    height: auto;
    object-fit: contain;
}

.checkout-btn, .clear-cart {
    display: block;
    padding: 12px;
    width: 48%;
    text-align: center;
    margin: 10px auto;
    border: none;
    cursor: pointer;
    font-size: 18px;
    border-radius: 5px;
}

.checkout-btn {
    background: green;
    color: white;
}

.clear-cart {
    background: red;
    color: white;
}

.checkout-btn:hover {
    background: darkgreen;
}

.clear-cart:hover {
    background: darkred;
}

/*   Zone des totaux (PC & tel)  */
.totals {
  max-width: 400px;       /* Largeur max pour un bloc centré */
  margin: 20px auto;      /* Centre horizontalement + marge verticale */
  text-align: center;
  font-size: 18px;
  color: #333;
}

.totals p {
  margin: 8px 0;          /* Espacement vertical entre les lignes */
}

.totals .base-total {
  font-size: 20px;
  font-weight: 600;       /* Met en avant le total initial */
  color: #000;            /* Couleur du texte */
}

.totals .promo-total {
  font-size: 20px;
  font-weight: 600;       /* Met en avant le total après réduction */
  color: #E53935;         /* Couleur rouge (par exemple) pour indiquer la réduction */
  margin-top: 10px;       /* Espace au-dessus */
}

/*  Zone Code Promo */
.promo-section {
  max-width: 400px;
  margin: 30px auto;      /* Marge verticale plus généreuse */
  padding: 20px;
  background: #f8f8f8;
  border: 1px solid #ccc;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.promo-section label {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  display: block;
}

.promo-section input {
  padding: 10px;
  font-size: 16px;
  width: 80%;
  margin: 0 auto 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: block;
}

.promo-section button {
  padding: 10px 16px;
  font-size: 16px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 80%;
  max-width: 200px;
  margin: 0 auto;
}

.promo-section button:hover {
  background-color: #555;
}


/* ✅ FOOTER */
footer {
    text-align: center;
    padding: 20px;
    background: #222;
    color: white;
}

footer .cgv {
    color: #fff;
    text-decoration: none;
}

footer .cgv:hover {
    text-decoration: underline;
}

/*  Responsive Design pour toutes les tailles d'écran  */
/*  Empécher le décalage horizontal */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/*  HEADER - Alignement uniforme sur PC et téléphone  */
.header2 {
  display: flex;
  align-items: center;
  justify-content: center; /* Centrer les catÃ©gories sur PC */
  padding: 10px 20px;
  width: 100%;
  height: 80px;
  background-color: white;
  z-index: 1000;
  position: relative;
}

/*  LOGO  */
.logo {
  display: block;
  width: 70px;
  height: auto;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/*  MENU BURGER  */
.menu-icon {
  display: none;
  font-size: 30px;
  cursor: pointer;
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-50%); /* AlignÃ© avec le logo et le panier */
  top: 50%;
  color: black;
  background: none;
  border: none;
  z-index: 1001;
}

/*  PANIER  */
.nav2 {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
}

.logo-panier {
  width: 40px;
  height: auto;
  display: block;
}


/* ðŸ“Œ MENU MOBILE */
@media (max-width: 768px) {
  .menu-icon {
    display: block;
    position: absolute;
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
    color: black;
  }
  
  .nav {
    display: none;
  }

  .header2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px;
    background-color: white;
    position: relative;
    z-index: 1000;
  }

  .nav-mobile {
    display: none;
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px); /* âœ… Assure un centrage pixel-perfect */
    max-width: 320px; /* âœ… Ajustement prÃ©cis */
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    text-align: center;
    padding: 10px;
  }

  .nav-mobile.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .nav-mobile a {
    text-decoration: none;
    color: black;
    padding: 12px;
    width: 100%;
    font-size: 18px;
    text-align: center;
    border-bottom: 1px solid #ccc;
    display: block;
  }

  .nav-mobile a:last-child {
    border-bottom: none;
  }
}

/* ðŸ“Œ PANIER EN HAUT Ã€ DROITE - AjustÃ© lÃ©gÃ¨rement vers la gauche */
.nav2 {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
}
  
/* RESPONSIVE TABLE / CART CARD STYLE */
/* Transformation du tableau en "cart cards" pour un rendu plus moderne sur mobile */
@media (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
    padding: 5px;
  }
    
  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
    
  tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 10px;
    background: #fff;
  }
    
  td {
    border: none;
    position: relative;
    padding-left: 50%;
    text-align: left;
    font-size: 14px;
    color: #333;
    white-space: normal;
  }
    
  td:before {
    position: absolute;
    left: 10px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
    text-transform: uppercase;
  }
    
  td:nth-of-type(1):before { content: "Image"; }
  td:nth-of-type(2):before { content: "Produit"; }
  td:nth-of-type(3):before { content: "Taille"; }
  td:nth-of-type(4):before { content: "Quantité"; }
  td:nth-of-type(5):before { content: "Prix"; }
  td:nth-of-type(6):before { content: "Action"; }
    
  
  .cart-img {
    
    width: 50px;
    height: auto;
  }
  /* Masquer la poubelle sur mobile */
  .delete-item {
    display: none;
  }
  /* Masquer la colonne Action sur mobile */
  th:nth-child(6), td:nth-child(6) {
    display: none;
  }
  /* Dans la section responsive, pour masquer le label "Image" quand le panier est vide */
  .empty-cart td:nth-of-type(1):before {
  content: "" !important;
  }
  /* Modifier les boutons - et + pour mobile */
  .decrease-quantity, .increase-quantity {
    background-color: transparent; /* Aucun fond */
    color: black; /* Couleur du texte */
    border: none; /* Suppression de la bordure */
    padding: 10px 15px; /* Espacement autour du texte */
    cursor: pointer; /* Le pointeur de la souris devient une main */
    font-size: 18px; /* Taille de la police */
    outline: none; /* Suppression de l'effet de focus */
  }

  .decrease-quantity:hover, .increase-quantity:hover {
    background-color: #f4f4f4; /* Couleur de fond claire au survol */
  }
    
  .decrease-quantity:focus, .increase-quantity:focus {
    outline: none; /* Suppression de l'effet de focus pour éviter les contours gris */
  }

  /* Ajustements pour le panier sur mobile */
  .cart-img {
    width: 50px;
    height: auto;
  }
  
  /* Boutons passent en pleine largeur sur mobile */
  .checkout-btn,
  .clear-cart {
    margin: 8px auto;
    display: block;
    padding: 6px 8px;
    font-size: 14px;
  }

}

/*  Totaux  */
@media (max-width: 768px) {
  .totals {
    max-width: 95%;
    margin: 10px auto;
    text-align: center;
    font-size: 20px;
    color: #333;
  }
  .totals p {
    margin: 10px 0;
  }
  
  /* Zone Code Promo optimisée */
  .promo-section {
    max-width: 95%;
    margin: 0 10px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  .promo-section label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
    display: block;
  }
  .promo-section input {
    padding: 12px;
    font-size: 16px;
    width: 100%;
    max-width: 90%;
    margin: 0 auto 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: block;
  }
  .promo-section button {
    padding: 12px;
    font-size: 16px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    max-width: 90%;
  }
  .promo-section button:hover {
    background-color: #555;
  }

  /* ------ Footer ------ */
  footer {
    padding: 20px 15px;
    text-align: center;
    font-size: 14px;
    color: #ffffff;
  }
  
  footer a.cgv {
    color: #ffffff;
    text-decoration: none;
  }
}

@media (min-width: 1600px) {
  footer {
    padding: 20px 15px;
    text-align: center;
    font-size: 14px;
    color: #ffffff;
    margin-top: 238px;

  }
  footer a.cgv {
    color: #ffffff;
    text-decoration: none;
  }
}

@media (max-width: 1600px) {
  footer {
    padding: 20px 15px;
    text-align: center;
    font-size: 14px;
    color: #ffffff;

  }
  footer a.cgv {
    color: #ffffff;
    text-decoration: none;
  }
}

/* 📌 Cacher le menu burger sur PC */
@media (min-width: 769px) {
  .menu-icon {
    display: none;
  }
}

/* Affichage de la poubelle et des boutons + et - sur PC */
@media (min-width: 769px) {
  .delete-item {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: red;
  }
}