/* === RESET GÉNÉRAL === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8f8f8;
  color: #1d1d1f;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* === Patienter === */
#loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loader-box {
  background: white;
  padding: 2rem 3rem;
  border-radius: 1.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  text-align: center;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top: 4px solid #111;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* === HEADER & NAVIGATION === */
.header {
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
  padding: 1.5rem 0;
}

.header .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
}

.logo {
  justify-self: start;
  font-size: 2rem;
  font-weight: 700;
}

.nav {
  justify-self: center;
}

.nav ul {
  display: flex;
  gap: 2rem;
}

.nav a {
  text-decoration: none;
  color: #363636;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.nav a:hover {
  color: #000000;
  transform: scale(1.1);
}

/* === ICÔNE PANIER === */
.panier-icone {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  width: 40px;
  color: #111;
  transition: transform 0.2s ease;
  position: relative;
}

.panier-icone:hover {
  transform: scale(1.1);
}

.panier-icone svg {
  width: 24px;
  height: 24px;
  stroke: #111;     /* couleur du contour en clair */
  fill: none;
}

.panier-badge {
  position: absolute;
  bottom: -4px;
  right: -6px;
  background-color: #000;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
  box-shadow: 0 0 0 2px white;
  display: none;
}

/* === SECTION HERO (page d'accueil) === */
.hero {
  text-align: center;
  background: #f1f1f1;
  padding: 6rem 2rem;
  margin-top: 2rem;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 2rem;
}

.hero a {
  display: inline-block;
  background-color: #000000;
  color: white;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.hero a:hover {
  background-color: #005bb5;
}

/* === FOOTER === */
.footer {
  background: #f1f1f1;
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-top: 4rem;
}

/* === PRODUITS === */
.grid-produits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.produit {
  background-color: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.2s ease;
}

.produit:hover {
  transform: translateY(-4px);
}

.produit img {
  max-width: 100%;
  height: 200px;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.produit h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.produit p {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.produit span {
  display: block;
  font-weight: bold;
  margin-bottom: 1rem;
}

.produit button {
  background-color: #000000;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.produit button:hover {
  background-color: #005bb5;
}

/* === PRODUIT : CARROUSEL D'IMAGES === */
.produit-slider {
  height: 200px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scroll-snap-type: x mandatory;
  display: flex;
  gap: 8px;
  border-radius: 10px;
  margin-bottom: 1rem;
scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;
}

.produit-slider::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.produit-slider img {
  flex: 0 0 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  scroll-snap-align: center;
}

.produit-slider a {
  flex: 0 0 auto;
  width: 160px; /* ou la largeur que tu veux pour chaque image */
  scroll-snap-align: center;
  display: block;
}


/* === Taille fixe uniforme pour les bulles === */
.produit {
  height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}


/* === PANIER === */
.panier-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid #e5e5e5;
  gap: 1rem;
}

.panier-info {
  flex: 1;
}

.panier-nom {
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.2rem;
}

.panier-prix-unitaire {
  color: #888;
  font-size: 0.9rem;
}

.panier-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.quantite-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f5f5f7;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 1rem;
}

.quantite-control button {
  all: unset;
  cursor: pointer;
  width: 24px;
  height: 24px;
  text-align: center;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.quantite-control button:hover {
  background: rgba(0,0,0,0.05);
  border-radius: 50%;
}

.panier-sous-total {
  min-width: 80px;
  text-align: right;
  font-weight: bold;
}

.supprimer-btn {
  all: unset;
  cursor: pointer;
  font-size: 1.2rem;
  transition: color 0.2s ease;
}

.supprimer-btn:hover {
  color: red;
}

/* === BOUTON DE COMMANDE === */
.btn-paiement {
  display: inline-block;
  background-color: #000;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.9rem 2rem;
  border-radius: 2rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.btn-paiement:hover {
  background-color: #1a1a1a;
  transform: scale(1.02);
}

.bouton-droite {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
}

/* === FORMULAIRE DE CONTACT === */
#form-contact {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

#form-contact label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: #333;
}

#form-contact input,
#form-contact textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 0.75rem;
  background-color: #f9f9f9;
  transition: all 0.2s ease-in-out;
  font-family: inherit;
  resize: none;
}

#form-contact input:focus,
#form-contact textarea:focus {
  outline: none;
  border-color: #aaa;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

#form-contact button[type="submit"] {
  background-color: #000;
  color: white;
  font-weight: 500;
  border: none;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

#form-contact button[type="submit"]:hover {
  background-color: #333;
}

#resultat-formulaire {
  font-size: 0.9rem;
  color: #007600;
}
/* === EFFETS FEU D’ARTIFICE === */
.fireworks {
  position: fixed;
  pointer-events: none;
  top: 0;
  left: 0;
  z-index: 9998;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.fireworks span {
  position: absolute;
  width: 6px;
  height: 6px;
  background: black; /* ✅ noir sur fond clair */
  border-radius: 50%;
  animation: explode 0.6s ease-out forwards;
}

@keyframes explode {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--x), var(--y)) scale(0.8);
    opacity: 0;
  }
}
/* === BULLE DE CONFIRMATION PANIER === */
.notif-panier {
  position: fixed;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: black;
  padding: 1rem 2rem;
  border-radius: 999px;
  box-shadow: 0 0 20px rgba(0,0,0,0.15);
  font-weight: 500;
  font-size: 1.1rem;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.notif-panier.active {
  opacity: 1;
  transform: translateX(-50%) scale(1.05);
}







/* === RESPONSIVE DESIGN === */
/* === CORRECTION RESPONSIVE PAGE PRODUIT === */
@media (max-width: 768px) {
  .produit-page {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    width: 100%;
    margin: 0 auto;
    box-shadow: none;
    border-radius: 0;
  }

  .carte-img {
    width: 100%;
    max-width: 100% !important;
    margin: 0 auto;
  }

  .carte-details {
    padding: 1rem;
    margin-top: 0px;
  }

  .carte-details h1 {
    margin-top: 0;
    margin-bottom: 0.5rem;
  }

  .carte-details p {
    text-align: justify;
    margin-bottom: 1rem;
  }
}


@media (max-width: 768px) {
  /* Masquer le panier en haut du header */
  .header .panier-icone {
    display: none;
  }

  .header {
    position: relative;
    z-index: 20;
  }

  .header .container {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;
  }

  .nav {
    display: none;
  }

  #burger {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    justify-self: end;
    z-index: 11;
  }

  #burger svg {
    width: 28px;
    height: 28px;
  }

  #menu-mobile {
    display: none;
    flex-direction: column;
    background-color: white;
    padding: 1rem 2rem;
    gap: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    z-index: 10;
  }

  #menu-mobile.active {
    display: flex;
  }

  #menu-mobile ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  #menu-mobile li a {
    font-size: 1.2rem;
    font-weight: 500;
    color: #111;
    text-align: left;
    display: inline-block;
    transform: scale(1);
    transform-origin: left center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 1;
  }

  #menu-mobile li a:hover {
    transform: scale(1.12);
  }

  .menu-panier-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
  }

  .menu-panier-wrapper .panier-icone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .menu-panier-wrapper .panier-icone svg {
    width: 24px;
    height: 24px;
  }

  .menu-panier-wrapper .panier-badge {
    font-size: 0.75rem;
    background-color: #000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1;
  }
}

@media (min-width: 769px) {
  .header .panier-icone {
    display: flex;
  }

  #burger,
  #menu-mobile {
    display: none !important;
  }

  .nav {
    display: block;
  }
}




/* Fix taille carte produit et image */
.carte-produit {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
  overflow: hidden;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  height: 350px; /* 🔒 fixe la hauteur */
}

.carte-img {
  height: 220px; /* 🔒 fixe la hauteur image */
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}

.carte-img img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  display: block;
}

.carte-details {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}





/* === MODE SOMBRE AUTOMATIQUE === */
@media (prefers-color-scheme: dark) {
  html, body {
    background-color: #1d1d1f;
    color: #f5f5f7;
  }

  .header {
    background: #161617;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
  }

  .nav a {
    color: #e5e5e7;
  }

  .nav a:hover {
    color: #ffffff;
  }

  .panier-icone {
    color: #f5f5f7;
  }

  .panier-badge {
    background-color: #fff;
    color: #000;
    box-shadow: 0 0 0 2px #1d1d1f;
  }

  .hero {
    background: #2c2c2e;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }

  .hero p {
    color: #cccccc;
  }

  .hero a {
    background-color: #ffffff;
    color: #000;
  }

  .hero a:hover {
    background-color: #999;
  }

  .footer {
    background: #2c2c2e;
    color: #aaaaaa;
  }

  .produit {
    background-color: #2c2c2e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  .produit p {
    color: #cccccc;
  }

  .produit button {
    background-color: #fff;
    color: #000;
  }

  .produit button:hover {
    background-color: #999;
  }

  .quantite-control {
    background: #3a3a3c;
  }

  .quantite-control button:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .panier-item {
    border-bottom: 1px solid #444;
  }

  .panier-prix-unitaire {
    color: #aaa;
  }

  .supprimer-btn:hover {
    color: #ff5555;
  }

  .btn-paiement {
    background-color: #fff;
    color: #000;
  }

  .btn-paiement:hover {
    background-color: #ccc;
  }

  #form-contact {
    background: #2c2c2e;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  }

  #form-contact label {
    color: #e5e5e7;
  }

  #form-contact input,
  #form-contact textarea {
    background-color: #3a3a3c;
    color: #f5f5f7;
    border: 1px solid #555;
  }

  #form-contact input:focus,
  #form-contact textarea:focus {
    background-color: #2c2c2e;
    border-color: #888;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  }

  #form-contact button[type="submit"] {
    background-color: #fff;
    color: #000;
  }

  #form-contact button[type="submit"]:hover {
    background-color: #ccc;
  }

  #resultat-formulaire {
    color: #28c76f;
  }

  .notif-panier {
    background: #2c2c2e;
    color: #fff;
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
  }

  .fireworks span {
    background: white;
  }

  #menu-mobile {
    background-color: #1c1c1e;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);
  }

  #menu-mobile li a {
    color: #f5f5f7;
  }

  #menu-mobile li a:hover {
    transform: scale(1.12);
  }

  .menu-panier-wrapper .panier-badge {
    background-color: #fff;
    color: #000;
  }

/* Forcer couleur blanche du bouton burger et de l'icône panier */
  .panier-icone svg {
    stroke: white;
    fill: none;
  }

  .panier-icone {
    color: white;
  }

  #burger svg {
    fill: white;
    stroke: white;
  }
}

.carte-details p {
  text-align: justify;
}
