.container-menu {
  max-width: 1200px;
  margin: 6rem auto 3rem;
  padding: 0 1rem;
  font-family: 'Montserrat', sans-serif;
  color: #1e1e1e;
  line-height: 1.2;
  text-align: center;
  box-sizing: border-box;
}

.container-menu h1 {
  display: inline-block;
  margin: 50px 0 25px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #1a1a1a;

  font-size: clamp(1.5rem, 5vw, 2.5rem);

  white-space: normal;     
  overflow-wrap: anywhere; 
  max-width: 95%;          
  line-height: 1.2;

  position: relative;
  padding-bottom: 0.8rem;
  margin-left: auto;
  margin-right: auto;
}

.container-menu h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #007bff, #00bfff);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4);
  opacity: 0.95;
}

@media (max-width: 768px) {
  .container-menu h1 {
    font-size: clamp(1.2rem, 6vw, 1.8rem);
    margin-top: 30px;
    padding-bottom: 0.6rem;
  }

  .container-menu h1::after {
    width: 60px;
    height: 3px;
  }
}

/* ===========================
  BANNIERE CATEGORIE
=========================== */
.category-banner {
  width: 100%;
  margin-bottom: 3rem;
  text-align: center;
}

.category-banner img {
  width: 100%;
  height: 180px; 
  object-fit: cover;
  border-radius: 8px;
}

@media (max-width: 767px) {
  .category-banner img {
    height: 120px;      
    margin-bottom: 0.5rem;
  }
}

/* ===========================
  PANIER FLOTTANT
=========================== */
.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 90%;
  height: 100%;
  background: #fff;
  border-left: 2px solid #cbd5e1;
  box-shadow: -2px 0 25px rgba(0,0,0,0.12);
  padding: 1.5rem;
  transition: transform 0.4s ease-in-out;
  z-index: 2000;
  overflow-y: auto;
  transform: translateX(100%);
}
.cart-panel.active {
  transform: translateX(0);
}

.cart-panel::-webkit-scrollbar {
  width: 8px;
}

.cart-panel::-webkit-scrollbar-track {
  background: #f1f1f1; 
  border-radius: 10px;
}

.cart-panel::-webkit-scrollbar-thumb {
  background: #1e40af; 
  border-radius: 10px;
}

.cart-panel::-webkit-scrollbar-thumb:hover {
  background: #0a3288; 
}

.cart-panel h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 1rem;
  text-align: center;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.3s;
}

.cart-item:hover { background: #f1f5f9; }

.cart-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item div { flex: 1; }

.cart-item .muted {
  font-size: 0.85rem;
  color: #64748b;
}

.cart-item button {
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: #ef4444;
  color: white;
  border: none;
}

.cart-item button:hover { opacity: 0.8; }

.cart-summary {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 1rem;
  text-align: right;
  color: #1e40af;
}

.cart-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

#checkout {
  background: #1e40af;
  color: white;
  flex: 1;
  border-radius: 8px;
  padding: 0.6rem 0;
  font-weight: 700;
  transition: background 0.3s;
}

#checkout:hover { background: #1e3a8a; }

#closeCart {
  background: #e2e8f0;
  color: #1e3a8a;
  flex: 1;
  border-radius: 8px;
  padding: 0.6rem 0;
  font-weight: 700;
}

#closeCart:hover { background: #cbd5e1; }

/* ===========================
  BOUTIQUE GRILLE / MENU
=========================== */
.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
}
.filters input, .filters select {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  outline: none;
  transition: all 0.3s;
  min-width: 150px;
}
.filters input:focus, .filters select:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.2);
}

/* ===========================
  GRILLE PRODUITS
  =========================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;

  grid-auto-rows: 1fr;     
  align-items: stretch;    
}

.products-grid.single-product {
  grid-template-columns: 1fr;
  justify-items: center;
}

/*===========================
  CARTE PRODUIT
  =========================== */
.product-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;

  width: 100%;
  max-width: 300px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px) scale(1.02);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-bottom: 1px solid #e2e8f0;
}

/* ===========================
  CONTENU CARTE
=========================== */

.product-card .product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 0.6rem;
}

.product-card .product-info h3 {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  text-align: center;
  margin: 0;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; 
  line-clamp: 3;

  overflow: hidden;
  min-height: 3.6em;
}

.product-card .product-info .price {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  font-weight: 700;
  color: #16a34a;
  text-align: center;
  margin: 0 0 0.3rem;
  min-height: 1.5em;
}

.product-card .product-info label {
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  margin-top: 0.2rem;
  min-height: 1.3em;
  display: block;
}

.product-card .product-info select,
.product-card .product-info input[type="number"] {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  outline: none;
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  min-height: 2.2rem;
  width: 100%;
}

.product-card .product-info button {
  width: 100%;          
  min-height: 2.5rem;
  padding: 0.6rem 0;     
  font-size: clamp(0.9rem, 1.6vw, 1rem);
  font-weight: 700;
  border-radius: 8px;
  border: none;
  background: #1e40af;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
}

.product-card .product-info button:hover {
  background: #1e3a8a;
}

@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 600px) {  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    padding: 0;
    margin: 0;
  }

  .product-card {
    max-width: none;
  }

  .product-card .product-info {
    padding: 0.8rem;
    gap: 0.5rem;
  }

  .product-card .product-info h3 {
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 700;
    text-align: center;
    margin: 0;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; 
    line-clamp: 3;

    overflow: hidden;
    min-height: 3.6em;
  }

  .product-card .product-info .price {
    font-size: clamp(0.85rem, 3vw, 0.95rem);
    margin-bottom: 0.2rem;
    text-align: center;
    min-height: 1.5em;      
  }

  .product-card .product-info button {
    flex: 1; 
    padding: 0.5rem 0;
    font-size: clamp(0.8rem, 3vw, 0.9rem);
  }
}

/* ===========================
  PAGE PRODUIT 
=========================== */
.product-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 1000px;
  margin: 1rem auto 3rem;
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  margin-top: 150px;
}

.back-link {
  display: block;
  color: #1e40af;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s;
  align-self: flex-start;  
  margin-bottom: 1rem;    
  
}

.back-link:hover {
  color: #3b82f6;
}

.product-page img#productImage {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s;
}
.product-page img#productImage:hover {
  transform: scale(1.03);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center; 
  text-align: center;
}

.product-info h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e40af;
}

.product-info .category {
  font-size: 0.95rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.product-info .desc {
  font-size: 1rem;
  line-height: 1.6;
  color: #1f2937;
}

.product-info .allergen {
  color: #dc2626;
  font-weight: 600;
}

.product-info .advice {
  color: #15803d;
  font-style: italic;
}

.product-info .price {
  font-size: 1.4rem;
  font-weight: 700;
  color: #16a34a;
}

.product-info .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.product-info .actions > div {
  display: flex;
  flex-direction: column; 
  gap: 0.4rem;
  width: 200px; 
}

.product-info select,
.product-info input[type="number"] {
  width: 100%;
  height: 42px; 
  text-align: center;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  outline: none;
  transition: all 0.3s;
  font-size: 1rem;
}

.product-info button#addToCartProduct {
  width: 420px;              
  max-width: 100%;          
  height: 50px;
  margin-top: 1rem;
  border: none;
  border-radius: 8px;
  background: #1e40af;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.product-info select:focus,
.product-info input[type="number"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.product-info button#addToCartProduct:hover {
  background: #3b82f6;
  transform: translateY(-2px);
}

.product-info button#addToCartProduct:active {
  transform: translateY(0);
  background: #1d4ed8;
}

@media (max-width: 1024px) {
  .product-page {
    padding: 1.5rem;
    margin: 4rem auto 2rem;
    margin-top: 170px;
  }
  .product-info h2 { font-size: 1.8rem; }
  .product-info .price { font-size: 1.3rem; }
}

@media (max-width: 767px) {
  .product-page {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 110px;
  }
  .product-info select,
  .product-info input[type="number"] {
    width: 100%;
    height: 42px;
    text-align: center;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    outline: none;
    transition: all 0.3s;
    font-size: 1rem;
  }

  .product-info button#addToCartProduct {
    width: 420px;
    max-width: 100%;
    height: 45px;
    margin-top: 0.5rem;
  }
  .product-page img#productImage {
    height: 100%;       
    max-height: none;  
    object-fit: cover; 
    border-radius: 12px;
  }
}

@media (max-width: 767px) {
  .product-info button#addToCartProduct {
    width: 100%;   
    max-width: 100%;
    height: 50px;
  }
}

@media (max-width: 767px) {
    .filters {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .filters input,
  .filters select {
    width: 100%;
    max-width: 400px; 
    box-sizing: border-box;
    text-align: center;
  }
}

@media(max-width: 768px){
  .product-card img#productImage { max-height: 300px; }
  .product-info { padding: 1rem; }
  .product-card .product-info { gap: 0.5rem; }
}

/* ===========================
  PAGE PRODUIT 
=========================== */
.product-page {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 1000px;
  margin: 1rem auto 3rem;
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
  margin-top: 150px;
}

.product-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-image img#productImage {
  width: 100%;
  max-width: 400px;       
  aspect-ratio: 1 / 1;    
  object-fit: cover;      
  border-radius: 12px;
  transition: transform 0.3s;
}

.product-image img#productImage:hover {
  transform: scale(1.03);
}

.product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-details h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1e40af;
}

.product-details .category {
  font-size: 0.95rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.product-details .price {
  font-size: 1.4rem;
  font-weight: 700;
  color: #16a34a;
}

.product-details .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.product-details .actions > div {
  display: flex;
  flex-direction: column; 
  gap: 0.4rem;
  width: 200px;
}

.product-details select,
.product-details input[type="number"] {
  width: 100%;
  height: 42px;
  text-align: center;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  outline: none;
  transition: all 0.3s;
  font-size: 1rem;
}

.product-details select:focus,
.product-details input[type="number"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

#addToCartProduct {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  background: #1e40af;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

#addToCartProduct:hover {
  background: #3b82f6;
  transform: translateY(-2px);
}

#addToCartProduct:active {
  background: #1d4ed8;
  transform: translateY(0);
}

.back-link {
  display: block;
  color: #1e40af;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s;
  margin-top: 2rem;
}

.back-link:hover {
  color: #3b82f6;
}

@media (max-width: 1024px) {
  .product-page {
    padding: 1.5rem;
    gap: 1.5rem;
  }
}

@media (max-width: 1000px) {
  .product-page {
    flex-direction: column;
    margin-top: 110px;
  }
  .product-details .actions {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .product-details .actions > div {
    width: 100%;
    max-width: 300px;
  }
  #addToCartProduct {
    width: 100%;
    height: 45px;
    font-size: 0.95rem;
  }
}

/* ===========================
  ACCORDÉONS PRODUIT
=========================== */
.product-accordions {
  margin-top: 2rem;
  width: 100%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.accordion-btn {
  cursor: pointer;
  padding: 0.8rem 1rem;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  background: #f9fafb;
  font-weight: 600;
  color: #1e40af;
  border-radius: 8px;
  transition: background 0.3s;
  position: relative;
  padding-right: 2rem; 
}

.accordion-btn:hover,
.accordion-btn.active {
  background: #e0e7ff;
}

.accordion-btn::after {
  content: "▼";               
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.accordion-btn.active::after {
  content: "▲";            
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: #fefefe;
  border-left: 2px solid #3b82f6;
  border-right: 2px solid #3b82f6;
  border-bottom: 2px solid #3b82f6;
  border-radius: 0 0 8px 8px;
  padding: 0 1rem;
}

.accordion-content p {
  margin: 0.8rem 0;
  color: #1f2937;
  line-height: 1.6;
  text-align: justify;
}

@media (max-width: 767px) {
  .accordion-btn {
    font-size: 0.95rem;
    padding: 0.6rem 0.8rem;
  }
  .accordion-content p {
    font-size: 0.9rem;
  }
}

.cart-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 350px;
  max-width: 90%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  z-index: 4000;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  font-family: 'Roboto', sans-serif;
}

.cart-popup.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.popup-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.popup-content h4 {
  color: #1e40af;
  font-weight: 700;
  text-align: center;
}

.popup-product {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.8rem;
}

.popup-product img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #3b82f6;
}

.popup-product div { flex: 1; }
.popup-summary div {
  display: flex;
  justify-content: space-between;
  margin: 0.3rem 0;
  font-weight: 600;
  color: #1e40af;
}

.popup-summary .total {
  font-size: 1.2rem;
  font-weight: 700;
  color: #3b82f6;
  margin-top: 0.5rem;
}

.popup-actions {
  display: flex;
  gap: 0.5rem;
}

.popup-actions button {
  flex: 1;
  padding: 0.6rem 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

#goCheckout {
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: #fff;
}

#goCheckout:hover {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  transform: translateY(-2px);
}

#continueShopping {
  background: #e2e8f0;
  color: #1e40af;
}

#continueShopping:hover { background: #cbd5e1; }

.close-popup {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #1e40af;
  align-self: flex-end;
  cursor: pointer;
  transition: color 0.2s;
}

.close-popup:hover { color: #2563eb; }