/* ============================= */
/* RESET / STYLES DE BASE        */
/* ============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================= */
/* CONTENEUR PRINCIPAL           */
/* ============================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ============================= */
/* ENTÊTE (logo + slogan)        */
/* ============================= */
.header {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  padding: 20px 0;
  margin-bottom: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.header-logo {
  max-width: 300px;
  width: 100%;
  height: auto;
  margin-bottom: 10px;
}
.header-slogan {
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
}

/* ============================= */
/* INFO TABLE                    */
/* ============================= */
.table-info {
  background: linear-gradient(45deg, #ff6b6b 0%, #ee5a52 100%);
  color: #fff;
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-weight: bold;
  display: inline-block;
}

/* ============================= */
/* CACHER PAR DÉFAUT             */
/* ============================= */
.hidden {
  display: none !important;
}

/* ============================= */
/* CATÉGORIES (icônes + labels)  */
/* ============================= */
.categories {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
}
.category-btn {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 2px solid transparent;
  border-radius: 12px;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  text-align: center;
  padding: 8px;
}
.category-btn:hover {
  transform: translateY(-3px);
  border-color: #764ba2;
}
.category-btn.selected {
  border-color: #764ba2;
  box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
  background: rgba(255, 255, 255, 1);
}
.category-icon {
  font-size: 2.5rem;
  color: #667eea;
  margin-bottom: 4px;
}
.category-label {
  font-size: 0.9rem;
  color: #333;
}

/* ============================= */
/* SOUS-CATÉGORIES               */
/* ============================= */
.subcategories-container {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.subcategory-btn {
  background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.subcategory-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.subcategory-btn.selected {
  background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%);
}

/* ============================= */
/* NOTE GLACES (message sous titre) */
/* ============================= */
.glaces-note {
  margin-top: 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: #fff;
  text-align: center;
  font-style: italic;
}

/* ============================= */
/* TITRE DE SECTION (h2)         */
/* ============================= */
h2.section-title {
  color: #fff;    /* !!! Titre des sections en blanc !!! */
  margin-bottom: 12px;
}

/* ============================= */
/* GRILLE D’ARTICLES (ITEMS)     */
/* ============================= */
.items-container {
  margin-bottom: 30px;
}
.menu-grid {
  display: grid;
  grid-gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.menu-item {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  border: 2px solid transparent;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, border-color 0.2s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.menu-item:hover {
  transform: translateY(-3px);
}
.menu-item.selected {
  border-color: #667eea;
}
.item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.item-header h4 {
  font-size: 1.2rem;
  color: #333;
}
.item-header span {
  font-size: 1.2rem;
  font-weight: bold;
  color: #667eea;
}
.item-description {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: #555;
}
.spacer {
  flex-grow: 1;
}

/* ============================= */
/* CONTRÔLES DE QUANTITÉ (– / +)  */
/* ============================= */
.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.quantity-controls button {
  background: #667eea;
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.quantity-controls button:hover {
  transform: translateY(-2px);
  background: #5a67d8;
}
.quantity-controls span {
  font-size: 1rem;
  margin: 0 10px;
}

/* ============================= */
/* BOUTON PANIER FIXE            */
/* ============================= */
.cart-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #764ba2;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 15px 20px;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 1000;
}
.cart-button:hover {
  transform: scale(1.05);
}
.cart-count {
  background: #ff6b6b;
  color: #fff;
  border-radius: 50%;
  padding: 4px 8px;
  margin-left: 8px;
  font-size: 0.9rem;
  font-weight: bold;
}

/* ============================= */
/* MODALE PANIER                 */
/* ============================= */
.modal {
  display: none; /* masquée par défaut */
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
}
.modal.show {
  display: flex;
}
.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 80%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-height: 80vh;
  overflow-y: auto;
}
.close-btn {
  color: #aaa;
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close-btn:hover {
  color: #000;
}

/* ============================= */
/* CONTENU DE LA MODALE (PANIER) */
/* ============================= */
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e0e0;
}
.cart-item p {
  margin-bottom: 4px;
  color: #333;
}
.cart-total {
  margin-top: 20px;
  padding: 10px;
  background: #f8f8f8;
  border-radius: 8px;
  text-align: right;
  font-size: 1.1rem;
  color: #667eea;
}
.validate-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
  width: 100%;
  font-size: 1.1rem;
}
.validate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* ============================= */
/* SPINNER & MESSAGE SUCCÈS      */
/* ============================= */
.loading {
  display: none;
  text-align: center;
  margin-top: 20px;
}
.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #764ba2;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.success-message {
  display: none;
  text-align: center;
  margin-top: 20px;
  color: #2ecc71;
  font-weight: bold;
}

/* ============================= */
/* PARFUMS (deux colonnes)       */
/* ============================= */
.flavors-container {
  display: flex;
  gap: 20px;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  background-color: #fafafa;
  padding-left: 12px;
  margin-bottom: 16px;
  border-radius: 0.5rem;
}
.flavors-column {
  flex: 1;
}
.flavors-column p {
  margin-bottom: 8px;
  font-size: 1rem;
  color: #333;
}
.flavor-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.flavor-item input[type="checkbox"] {
  margin-right: 6px;
  cursor: pointer;
}

/* ============================= */
/* EXTRAS (boules, etc.)         */
/* ============================= */
.extras {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  background-color: #fafafa;
  padding-left: 12px;
  margin-bottom: 12px;
  border-radius: 0.5rem;
}
.extra-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}
.extra-item input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}
.extra-item label {
  font-size: 0.9rem;
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
  cursor: pointer;
}
.extra-item label:hover {
  background: #e0e0e0;
}

/* ============================= */
/* GOURMANDISES (deux colonnes)   */
/* ============================= */
.gourmandises-container {
  display: none; /* on affichera seulement après sélection de “boules” */
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  background-color: #fafafa;
  margin-bottom: 16px;
  border-radius: 0.5rem;

  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-left: 12px;
}
.gourmandises-container > p:first-child {
  flex: 0 0 100%;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #333;
}
.gourmandise-item {
  flex: 0 0 calc(50% - 1rem);
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.gourmandise-item input[type="checkbox"] {
  margin-right: 6px;
  cursor: pointer;
}
.gourmandise-item label {
  cursor: pointer;
}

/* ============================= */
/* COULIS (deux colonnes)         */
/* ============================= */
.coulis-container {
  display: none; /* on affichera seulement après sélection de “boules” */
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  background-color: #fafafa;
  margin-bottom: 16px;
  border-radius: 0.5rem;

  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-left: 12px;
}
.coulis-container > p:first-child {
  flex: 0 0 100%;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #333;
}
.coulis-item {
  flex: 0 0 calc(50% - 1rem);
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}
.coulis-item input[type="radio"] {
  margin-right: 6px;
  cursor: pointer;
}
.coulis-item label {
  cursor: pointer;
}

/* ============================= */
/* RESPONSIVE                     */
/* ============================= */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  .category-btn {
    width: 80px;
    height: 80px;
  }
  .menu-grid {
    grid-template-columns: 1fr;
  }
  .cart-button {
    bottom: 15px;
    right: 15px;
    padding: 12px 16px;
    font-size: 1rem;
  }
  .modal-content {
    width: 95%;
  }
}
