/* --- BASE ET TYPOGRAPHIE --- */
@import url('https://fonts.googleapis.com/css2?family=Russo+One&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Russo One", sans-serif;
  font-weight: 400;
  font-style: normal;
}

body {
  background-color: white;
  color: black;
  scroll-behavior: smooth;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}



/* --- HEADER ET NAVIGATION --- */
header {
  background-color: #fff;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

header a.logo {
  text-decoration: none;
  color: black;
  font-size: 2rem;
  letter-spacing: 2px;
  transition: transform 0.3s;
  width: 100px;
}

header a.logo:hover {
  transform: scale(1.05);
  color: grey;
  cursor: pointer;
}

header img.logo_rouh {
  width: min(100%, 100px);
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.contact {
  width: 30px;
  height: auto;
  margin-top: 5px;
  margin-right: 10px;
}

#cart-link {
  position: relative;
  display: inline-block;
}

#cart-icon {
  width: 30px;
  height: auto;
  vertical-align: middle;
}

#cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: grey;
  color: #111;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  display: none;
}

#cart-count.show {
  display: inline-block;
}

/* --- CONTENEUR PANIER --- */
.cart-container {
  max-width: 1100px;
  margin: 40px auto;
  margin-bottom: 150px;
  padding: 0 20px;
  flex: 1;
  width: 100%;
}

.cart-container h1 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: black;
}

.cart-container h1 span {
  color: grey;
}

/* --- ARTICLES DU PANIER (Générés par JS) --- */
#cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

#cart-items > div {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 15px;
  border: 2px solid #eee;
  border-radius: 10px;
  background: white;
  transition: transform 0.2s, box-shadow 0.2s;
  justify-content: space-between;
}

#cart-items > div:hover {
  box-shadow: 0px 4px 12px rgba(100, 100, 100, 0.1);
}

#cart-items img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
}

#cart-items a {
  color: black;
  text-decoration: none;
  font-size: 1.2rem;
  transition: color 0.3s;
}

#cart-items a:hover {
  color: grey;
}

/* Boutons de quantité et suppression du JS */
#cart-items button {
  background: grey;
  color: #111;
  border: none;
  border-radius: 50px;
  padding: 8px 15px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
}


/* --- RÉSUMÉ ET BOUTONS DE PAIEMENT --- */
.cart-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  border-top: 2px solid #eee;
  padding-top: 25px;
  gap: 20px;
}

.total {
  font-size: 1.5rem;
}

#cart-total {
  color: grey;
  font-size: 2rem;
}

.btn_pay_return {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* Lien de retour reprenant le style .back-link */
.btn-retour {
  color: grey;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}

.btn-retour:hover {
  text-decoration: underline;
}

/* Bouton principal de paiement reprenant le style .btn-add */
.btn-payer {
  background: grey;
  color: #111;
  padding: 15px 30px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.3s, transform 0.3s;
  box-shadow: 0px 4px 12px rgba(100, 100, 100, 0.4);
}

.btn-payer:hover {
  background-color: rgb(178, 178, 178);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(80, 80, 80, 0.6);
}

/* --- FENÊTRE MODALE DE SUPPRESSION --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  transition: opacity 0.3s;
}

.modal-overlay.cache {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.modal-content {
  background: white;
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0px 8px 30px rgba(0,0,0,0.3);
}

.modal-content p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  color: #111;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.modal-actions button {
  padding: 10px 25px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.btn-oui {
  background: #ff4d4d;
  color: white;
  box-shadow: 0px 4px 12px rgba(255, 77, 77, 0.4);
}

.btn-oui:hover {
  background: #e60000;
  transform: translateY(-2px);
}

.btn-non {
  background: grey;
  color: #111;
  box-shadow: 0px 4px 12px rgba(100, 100, 100, 0.4);
}

.btn-non:hover {
  background: rgb(178, 178, 178);
  transform: translateY(-2px);
}

/* INFO preco*/
/* --- INFOBULLE (TOOLTIP) --- */
.info-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.info {
  width: 24px; /* Ajuste la taille de ton icône si besoin */
  height: auto;
  transition: transform 0.2s;
}

.info-container:hover .info {
  transform: scale(1.1); /* Petit effet de zoom sur l'icône au survol */
}

.tooltip-text {
  visibility: hidden;
  width: 250px; /* Largeur de la bulle de texte */
  background-color: #333; /* Fond gris foncé/noir */
  color: #fff; /* Texte blanc */
  text-align: center;
  border-radius: 8px;
  padding: 12px;
  position: absolute;
  z-index: 10;
  
  /* Positionnement en dessous de l'image */
  top: 150%; 
  left: 50%;
  transform: translateX(-50%);
  
  /* Effet d'apparition */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  
  /* Typographie plus lisible pour les longs textes */
  font-family: sans-serif;
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: normal;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
}

/* Petite flèche pointant vers le haut de l'infobulle */
.tooltip-text::after {
  content: "";
  position: absolute;
  bottom: 100%; /* Au sommet de l'infobulle */
  left: 50%;
  margin-left: -6px;
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent #333 transparent;
}

/* Affichage au survol de la souris */
.info-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

    footer {
      background: #111;
      text-align: center;
      padding: 20px;
      color: #aaa;
      margin-top: 40px;
      font-size: 0.9rem;
      user-select: none;
      margin-top: auto;
    }