* {
  box-sizing: border-box;
}
html, body {
  -webkit-overflow-scrolling: touch; /* iOS inertie */
}


body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: var(--background-color);
  color: black;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: auto;
}





/* ✅ Rends #barre1 fixe juste sous le header */
#barre1 {
  position: sticky;
  top: 60px; /* ajuste selon la hauteur de ton header */
  z-index: 9;
  background-color: var(--primary-color);
  
}


header {
  background-color: var(--secondary-color);
  position: sticky;
  top: 0;
  z-index: 10;
  
}

.header-background {
  width: 100%;
  height: 15vh;
}

.header-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
}

#search-bar {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  margin-right: 10px;
}

#home-button img {
  width: 32px;
  height: 32px;
}

/* ✅ Barre des catégories sous le header */
#barre1 {
  position: sticky;
  top: 60px;
  z-index: 9;
  height: 19vh;
  background-color: var(--primary-color);
  overflow-x: auto;
  white-space: nowrap;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 3px;
  border-top: 5px solid var(--primary-color);
  border-bottom: 5px solid var(--primary-color);
  scrollbar-width: none;
}

/* ✅ Conteneur horizontal des catégories */
.barre1-content {
  display: flex;
  gap: 15px;
  align-items: stretch;
  zoom: 80%;
  margin-top: 15px;
}

/* ✅ Bouton de catégorie (même hauteur pour tous) */
.category-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  cursor: pointer;
  min-width: 80px;
  height: 150px; /* même hauteur fixe */
  padding: 0;
  margin-top: 10px;
}

/* ✅ Image de catégorie (si présente) */
.category-image {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
  margin-bottom: 5px;
  background-color: white;
  padding: 2px !important;
  
}

.category-image:hover {
  transform: scale(1.05);
}

/* ✅ Nom de la catégorie */
.category-name {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--secondary-color);
  text-align: center;
  max-width: 80px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  margin-top: 0;
}

/* ✅ Cas SANS image : recentrer verticalement */
.category-btn.no-image {
  justify-content: center;
}
/* ✅ Centrage vertical correct */
.category-btn.no-image .category-name {
  margin-top: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
  max-width: 80px;
  white-space: normal;
}

/* ✅ VERSION WEB (centrée + images plus grandes) */
@media (min-width: 768px) {
  #barre1 {
    justify-content: center; /* ✅ Centrage horizontal */
    overflow-x: hidden;      /* ✅ Plus besoin de scroll */
    
  }

  .barre1-content {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  /* ✅ Image ronde */
.category-image {
  zoom: 110%;
}

/* ✅ Nom de la catégorie */
.category-name {
  font-size: 0.8rem;
  font-weight: bold;
  color: var(--secondary-color);
  text-align: center;
  max-width: 80px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  margin-top: 0;
}

/* ✅ Cas SANS image : recentrer verticalement */
.category-btn.no-image {
  justify-content: center;
}
/* ✅ Centrage vertical correct */
.category-btn.no-image .category-name {
  margin-top: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
  max-width: 80px;
  white-space: normal;
}
}

  .category-image {
    width: 90px;
    height: 90px;
  }

/* supprime le cadre carré */
.category-btn.selected,
.category-btn.category-selected {
  outline: none !important;
}

/* contour rond uniquement autour de l'image */
.category-btn.selected img,
.category-btn.category-selected img {
  border-radius: 999px !important;
  box-shadow: 0 0 0 1px var(--highlight-color) !important; /* épaisseur */
}



#barre2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 colonnes mobile */
  gap: 10px;
  padding: 10px;
  
  /* ✅ Ajout important */
  padding-bottom: 80px; /* Laisse de l'espace pour le footer */
}


@media (min-width: 768px) {
  #barre2 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    padding-bottom: 100px; /* un peu plus sur grand écran */
  }
}



/* ✅ Carte produit uniforme */
.product-card {
  background-color: white;
  border-radius: 12px;
  padding: 3px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  height: 200px;              /* 🔒 Hauteur fixe */
  width: 100%;            /* Pas de dépassement */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ✅ Image produit */
.product-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto;
}

/* ✅ Nom produit */
.product-name {
  font-size: 0.9em;
  margin-top: 2px;
  color: black;
  font-weight: bold;
  line-height: 1.2;
}

/* ✅ Prix produit */
.product-price {
  color: var(--primary-color);
  font-weight: bold;
  margin-top: 5px;
  font-size: 1em;
  margin-bottom: 3px !important;
}


/* ✅ Centrage si pas d’image */
.product-card.no-image {
  justify-content: center;
  padding: 10px;
}

.product-card.no-image .product-name {
  margin-top: 100px;
  margin-bottom: 32px !important;

}

.product-card.no-image .product-price {
  margin-top: 20px !important;
}


/* ✅ Responsive : desktop → auto-adapte les colonnes */
@media (min-width: 768px) {
  #barre2 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* 🔁 s’adapte */
  }
}
/* ✅ Footer toujours collé en bas */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--highlight-color);
  padding: 10px;
  color: white;
  z-index: 100;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
}

/* ✅ Contenu interne du footer */
#footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ✅ Badge du panier */
#panier-count {
  color: var(--highlight-color);
  background-color: var(--primary-color);
  border-radius: 50%;
  padding: 3px 6px;
  font-size: 12px;
  position: absolute;
  top: -5px;
  right: -5px;
}

/* ✅ Bouton confirmer dans le footer */
#confirm-button {
  background-color: var(--background-color);
  color: var(--primary-color);
  border: none;
  border-radius: 20px;
  padding: 10px 15px;
  font-weight: bold;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Pour que le contenu principal ne passe pas sous le footer */
main {
  padding-bottom: 70px; /* pour laisser l'espace du footer */

}


/* ✅ Fond de la modale (gris transparent plein écran) */
.modal {
  display: none; /* par défaut cachée */
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(68, 66, 66, 0.84);
  z-index: 9000;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
  padding: 0 0 0 0;
}

/* ✅ Contenu interne de la modale */
.modal-content {
  background-color: white;
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  height: auto;
  animation: modalFadeIn 0.3s ease;
  position: relative;

}

/* ✅ Animation d'ouverture douce */
@keyframes modalFadeIn {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ✅ Bouton de fermeture (croix) */
.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary-color);
}

/* ✅ Responsive mobile */
@media (max-width: 480px) {
  .modal-content {
    max-width: 100%;
    padding: 15px;
  }

  .close-button {
    font-size: 22px;
    top: 8px;
    right: 12px;
  }
}






/* ✅ Style de la modale de paiement */
#payment-modal {
position: fixed;
top: 0; left: 0;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.759);
z-index: 5000;
display: flex;
justify-content: center;
align-items: center;
padding: 20px;
}

.payment-modal-content {
background-color: white;
border-radius: 12px;
padding: 20px;
width: 100%;
max-width: 480px;
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
text-align: center;
animation: modalFadeIn 0.3s ease;
}

.payment-options {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
gap: 20px;
margin-top: 20px;
}

.payment-option {
flex: 1 1 40%;
max-width: 180px;
padding: 10px;
background-color: var(--secondary-color);
border-radius: 10px;
cursor: pointer;
color: white;
font-weight: bold;
display: flex;
flex-direction: column;
align-items: center;
transition: transform 0.2s ease;
}

.payment-option:hover {
transform: scale(1.05);
}

.payment-option img {
width: 60px;
height: 60px;
margin-bottom: 10px;
}

.modal-kiosk {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  z-index: 9000;
  display: flex;
  flex-direction: column;
}

.modal-content-kiosk {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  
}

.modal-body-kiosk {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}
/* ================================
   MODALE SUGGESTIONS SITE / KIOSK
================================ */
#suggestion-modal-kiosk {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: rgba(0, 0, 0, 0.70);
    align-items: center;
    justify-content: center;
    z-index: 9000;
    overflow: hidden !important;
}

.modal-content-kiosk {
    background: var(--soft-modal-gradient, var(--background-color));
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
    padding: 0 ;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header-kiosk {
    width: calc(100% + 44px);
    margin: 0 0 16px -22px;
    padding: 0;
    margin-top: 0 !important;
}

.modal-header-kiosk h2 {
  margin-top: 0 !important;
    margin: 0 !important;
    padding: 30px 20px !important;
    width: 100%;
    text-align: center;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: clamp(34px, 5vw, 64px);
    font-weight: 950;
    color: var(--text-color);
    background: linear-gradient(
        145deg,
        color-mix(in srgb, var(--primary-color) 88%, white) 0%,
        var(--primary-color) 100%
    );
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    box-sizing: border-box;
}

.modal-body-kiosk {
    flex: 1;
    overflow-y: auto;
    padding: 18px 8px 35px;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-body-kiosk::-webkit-scrollbar {
    display: none;
}

.suggestions-container-kiosk {
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    margin: 0 auto;
    padding: 20px 0 40px;
    box-sizing: border-box;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-content: center;
    justify-content: center;
}

.suggestion-card-kiosk {
    width: 100%;
    max-width: 350px;
    justify-self: center;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    background: var(--secondary-color);
    border: none;
    border-radius: 30px;
    padding: 12px;
    cursor: pointer;
    overflow: hidden;

    box-shadow:
        0 8px 18px rgba(0,0,0,0.16),
        inset 0 2px 0 rgba(255,255,255,0.35),
        inset 0 -4px 10px rgba(0,0,0,0.10);

    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.suggestion-card-kiosk:hover {
    transform: translateY(-5px) scale(1.02);
    filter: brightness(1.03);
    box-shadow:
        0 16px 28px rgba(0,0,0,0.22),
        inset 0 2px 0 rgba(255,255,255,0.45),
        inset 0 -4px 10px rgba(0,0,0,0.12);
}

.suggestion-card-kiosk:active {
    transform: scale(0.96);
}

.suggestion-product-image,
.suggestion-card-kiosk .product-image {
    width: 100% !important;
    height: 130px !important;
    object-fit: contain !important;
    object-position: center !important;
    background: white !important;
    border-radius: 16px !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    display: block !important;
}

.suggestion-image-kiosk {
    width: 100% !important;
    height: 130px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: white !important;
    border-radius: 16px !important;
}

.suggestion-product-name,
.suggestion-card-kiosk .product-name,
.suggestion-content-kiosk h3 {
    text-align: center;
    font-size: 22px;
    font-weight: 950;
    color: var(--primary-color);
    margin: 8px 0 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    line-height: 1.15;
}

.suggestion-product-price,
.suggestion-card-kiosk .product-price,
.suggestion-content-kiosk p {
    text-align: center;
    font-size: 21px;
    font-weight: 950;
    color: #222;
    margin: 8px 0 0;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}

.suggestion-content-kiosk {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.suggestion-content-kiosk button {
    display: none !important;
}

/* ================================
   FOOTER SUGGESTIONS
================================ */
.modal-footer-kiosk {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 115px !important;

    background: linear-gradient(
        220deg,
        color-mix(in srgb, var(--primary-color) 20%, transparent) 0%,
        color-mix(in srgb, var(--primary-color) 8%, white) 100%
    ) !important;

    box-shadow: 0 -4px 12px color-mix(in srgb, var(--primary-color) 35%, transparent) !important;
    padding: 5px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9100;
    border-top-left-radius: 45px !important;
    border-top-right-radius: 45px !important;
}

.modal-footer-kiosk button,
.btn-cancel-kiosk {
    background: rgba(255,255,255,0.90) !important;
    color: var(--primary-color) !important;
    border: none !important;
    border-radius: 18px !important;
    padding: 18px 38px !important;
    cursor: pointer !important;
    font-size: 22px !important;
    font-weight: 950 !important;
    min-width: 180px !important;
    box-shadow:
        0 10px 22px rgba(0,0,0,0.13),
        inset 0 2px 0 rgba(255,255,255,0.85) !important;
    transition: transform 0.2s ease, background 0.2s ease !important;
}

.modal-footer-kiosk button:hover,
.btn-cancel-kiosk:hover {
    background: var(--primary-color) !important;
    color: var(--text-color) !important;
    transform: scale(1.04) !important;
}

.modal-footer-kiosk button:active,
.btn-cancel-kiosk:active {
    transform: scale(0.96) !important;
}

/* ✅ Commande confirmée */
.modal-content-commande {
background-color: white;
border-radius: 12px;
padding: 20px;
text-align: center;
width: 100%;
max-width: 480px;
animation: modalFadeIn 0.3s ease;
}

.image-container {
margin: 20px 0;
}

.chrono-timer {
font-weight: bold;
font-size: 1.2rem;
color: var(--primary-color);
margin-bottom: 20px;
}


/* ✅ Boutons génériques des modales */
.modal-footer button,
.modal-footer-kiosk button {
margin: 5px;
padding: 10px 20px;
border-radius: 20px;
border: none;
font-weight: bold;
font-size: 0.9rem;
cursor: pointer;
}

/* ✅ Responsive pour toutes les modales sur mobile */
@media (max-width: 480px) {
.payment-modal-content,
.modal-content-kiosk,
.modal-content,
.modal-content-commande {
  padding: 15px;
  max-width: 100%;
  zoom: 90%;

}

.payment-option {
  max-width: 100%;
  flex: 1 1 100%;
}
}



.suggestion-image-kiosk {
  width: 100PX;
  height: 100PX;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  flex-shrink: 0; /* ✅ Empêche de rétrécir dans flexbox */
}  



/* ✅ Contenu (titre + bouton) */
.suggestion-content-kiosk {
padding: 10px;
text-align: center;
}

.suggestion-content-kiosk h3 {
font-size: 1rem;
margin: 5px 0;
color: black;
}

.suggestion-content-kiosk p {
font-weight: bold;
color: var(--primary-color);
margin-bottom: 10px;
}

.suggestion-content-kiosk button {
background-color: var(--highlight-color);
color: white;
border: none;
border-radius: 20px;
padding: 8px 12px;
cursor: pointer;
font-weight: bold;
margin-top: auto; /* ✅ pousse le bouton en bas */
}

.suggestion-content-kiosk button:hover {
opacity: 0.9;
}

#panier-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.panier-content {
  height: auto 100% !important;
  width: 100% !important;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0;
  background-color: white;
  margin: 0 0 0 0;
  padding-bottom: 33% !important;
  zoom: 90%;

}


/* ✅ Style pour chaque produit dans le panier */
.produit-container {
  background-color: #fff;
  border-radius: 12px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.1); /* ajout d'une ombre plus diffuse */
  margin: 10px 0;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  
}

/* ✅ Image produit */
.panier-product-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}

.quantity-container {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 8px; /* espace entre les éléments */
}

/* ✅ Boutons quantité */
.quantity-container button,
.btn-edit,
.btn-delete {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  margin: 0 5px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s ease;
  justify-content: center;
  align-items: center;
  justify-items: center;
}

.quantity-container button:hover,
.btn-edit:hover,
.btn-delete:hover {
  background-color: var(--highlight-color);
  
}

/* ✅ Ligne bas : quantité + actions */
.produit-bottom-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.produit-nom {
  font-size: 1rem;
  font-weight: bold;
}

.produit-prix {
  font-size: 1rem;
  font-weight: bold;
  color: var(--primary-color);
}




#panier-header {
  position: sticky;
  top: 0;
  background-color: var(--highlight-color); /* identique au footer */
  color: white;
  padding: 10px;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  border-bottom: 2px solid #eee;
}

#panier-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

#mode-selection {
  margin-top: 10px;
}

#panier-total {
  margin-top: 5px;
  font-weight: bold;
  font-size: 1.2rem;
}


/* ✅ HEADER FIXE EN HAUT */
#panier-header {
  background-color: var(--highlight-color);
  color: white;
  padding: 10px;
  text-align: center;
  flex-shrink: 0;
}

#panier-header h2 {
  margin: 0;
}

#mode-selection {
  margin-top: 5px;
}

#panier-total {
  font-weight: bold;
  margin-top: 5px;
}

/* ✅ ZONE CENTRALE SCROLLABLE */
.panier-scroll-zone {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background-color: var(--background-color);
}


/* 🔻 FOOTER FIXE EN BAS */
#panier-footer {
  background-color: white;
  padding: 10px;
  display: flex;
  justify-content: space-around;
  gap: 10px;
  flex-shrink: 0;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
  border-top: 1px solid #eee;
  z-index: 10;
  position: fixed !important;
  bottom: 0 !important;
  left: 0;
  width: 100%;
}

#panier-footer button {
  flex: 1;
  padding: 12px;
  font-weight: bold;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  background-color: var(--primary-color);
  color: white;
}

/* ✅ MOBILE : BOUTONS EN COLONNE */
@media (max-width: 480px) {
  #panier-footer {
    flex-direction: column;
    align-items: stretch;
  }

  #panier-footer button {
    width: 100%;
  }
}


.btn-mode {
  padding: 10px 20px;
  font-size: 1em;
  font-weight: bold;
  border: 2px solid var(--primary-color); /* Utilisation de la couleur de bordure */
  cursor: pointer;
  border-radius: 8px;
  margin: 5px;
  transition: background 0.3s, color 0.3s;
  background-color: var(--primarycolor); /* Fond blanc */
  color: var(--highlightcolor); /* Texte noir */
}

.btn-mode.selected {
  background-color: var(--primary-color); /* Couleur principale pour le mode actif */
  color: var(--secondary-color); /* Texte blanc */
}

.btn-mode.active {
  background-color: var(--primary-color); /* Couleur principale pour le mode actif */
  color: var(--secondary-color); /* Texte blanc */
}

.btn-mode:hover {
  background-color: var(--primary-color); /* Changement de couleur au survol */
  color: var(--secondary-color); /* Texte blanc */
}




#remark-modal .modal-content h3,
#remark-modal-global .modal-content h3 {
  text-align: center;
  margin: 0;
  color: var(--primary-color);
}

#remark-modal textarea,
#remark-modal-global textarea {
  width: 100%;
  min-height: 100px;
  border-radius: 8px;
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 1rem;
  resize: vertical;
}

/* ✅ Footer boutons */
#remark-modal .modal-footer,
#remark-modal-global .modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

#remark-modal .modal-footer button,
#remark-modal-global .modal-footer button {
  flex: 1;
  padding: 10px;
  font-weight: bold;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  background-color: var(--primary-color);
  color: white;
  transition: background 0.3s ease;
}

#remark-modal .modal-footer .btn-cancel,
#remark-modal-global .modal-footer .btn-cancel {
  background-color: #ccc;
  color: #000;
}

#remark-modal .modal-footer button:hover,
#remark-modal-global .modal-footer button:hover {
  background-color: var(--highlight-color);
}

/* ✅ Animation */
@keyframes fadeIn {
  from { transform: translate(-50%, -55%); opacity: 0; }
  to   { transform: translate(-50%, -50%); opacity: 1; }
}



/* ✅ Modales ciblées */
#remark-modal,
#remark-modal-global {
  display: flex ;
}

/* ✅ Style dédié à l’affichage de la remarque globale */
.remark-global-zone {
  display: none;
  padding: 10px;
  background-color: var(--primary-color); /* tu peux personnaliser */
  color: var(--highlight-color);
  font-weight: bold;
  border-radius: 8px;
  margin: 10px;
  font-size: 1rem;
  justify-content: center;
  justify-items: center;
  align-items: center;
}


/* ✅ MODALE BESOIN FULL SCREEN MOBILE */
#besoin-additionnel-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  justify-items: center;
  align-items: center;
  z-index: 7000 !important;
}

#besoin-additionnel-modal .modal-content {
  background-color: white;
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-items: flex-start;
  padding: 15px 15px;
  overflow: hidden;
}

#besoin-additionnel-modal .modal-content > .scroll-zone {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px; /* pour ne pas cacher les boutons */
}

/* ✅ Le footer reste fixé en bas */
#besoin-additionnel-modal .modal-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--highlight-color);
  padding: 10px;
  color: white;
  z-index: 100;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-items: center;
  align-items: center;
  justify-content: center;
}

/* ✅ Image et nom produit centrés */
.product-info-section img {
  width: 150px !important;
  height: 150px !important;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0px;
}

.product-info-section {
  text-align: center;
  margin-bottom: 15px;
}

.product-description {
  font-size: 1rem;
  font-weight: bold;
  color: rgb(169, 169, 169);
  margin-top: 10px;
  
}

.separator-line {
  border: none;
  height: 2px;
  background-color: var(--primary-color);
  width: 100%;
  margin: 15px auto;
  border-radius: 2px;
}


/* ✅ Boutons niveaux prix */
.price-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.price-button {
  padding: 10px 20px;
  border-radius: 25px;
  background-color: var(--secondary-color);
  border: 1px solid var(--primary-color);
  color: black;
  font-weight: bold;
  font-size: 0.9rem;
  transition: 0.3s ease;
}

.price-button.selected {
  background-color: var(--primary-color);
  color: var(--text-color);
}

/* ✅ Conteneur CATEGORIE (différent des sous-catégories) */
.category-container {
  background: var(--background-color);
  border-radius: 20px;
  padding: 12px;
  margin-bottom: 20px;
  
}

/* ✅ Header catégorie (image + titre) */
.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 50px;
}

.category-header img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  
}

.category-header span {
  font-weight: bold;
  font-size: 1rem;
  color: var(--highlight-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--primary-color);
  padding: 10PX;
  border-radius: 20PX;
}

/* ✅ Liste des besoins = pile verticale */
.subneeds-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ✅ Carte besoin uniforme (sous-catégorie) */
.subneed-tag {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 16px;
  border: 2px solid var(--primary-color);
  padding: 0px 12px;
  min-height: 60px;
  transition: 0.2s ease;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.subneed-tag:hover {
  transform: scale(1.01);
}

.subneed-tag.selected {
  border-color: var(--highlight-color);
  box-shadow: 0 0 6px var(--highlight-color);
}

/* ✅ Image gauche */
.subneed-tag img {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background-color: #ffffff;
}

/* ✅ Nom au centre */
.subneed-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: bold;
  color: black;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ✅ Quantité à droite */
.quantity-container {
  display: flex;
  gap: 5px;
  align-items: center;
}

.quantity-button {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-weight: bold;
  font-size: 0.9rem;
}

.quantity-display {
  font-size: 0.9rem;
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}

/* ✅ Footer boutons */
.modal-footer button {
  flex: 1;
  padding: 12px;
  border-radius: 20px;
  font-weight: bold;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  margin: 0 5px;
}

.modal-footer .btn-cancel {
  background: #ccc;
  color: #000;
}

.modal-footer .btn-confirm {
  background: var(--primary-color);
  color: white;
}

/* ✅ Cacher scrollbar WebKit uniquement visuellement */
#besoin-additionnel-modal .scroll-zone {
  -ms-overflow-style: none;  /* Internet Explorer */
  scrollbar-width: none;     /* Firefox */
}

#besoin-additionnel-modal .scroll-zone::-webkit-scrollbar {
  display: none;             /* Chrome, Safari */
}



#panier-close-button {
  background-color: var(--highlight-color) !important;
  
}

#panier-close-button:hover {
  background-color: var(--primary-color);
}


#confirm-button:disabled {
  background-color: #ccc !important;
  color: #666 !important;
  pointer-events: none;
}

#confirm-button:not(:disabled):hover {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1); /* ✅ Effet de zoom */
}


/* ✅ Modale plein écran (fond + centrage) */
#confirmation-client-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(255, 255, 255); /* fond semi-transparent */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 9999;
  overflow-y: auto; 
}

/* ✅ Contenu scrollable à l’intérieur de la modale */
.confirmation-client-content {
  width: 100%;
  height: auto; /* occupe 100% hauteur écran */
  background: white;
  display: flex;
  flex-direction: column;
  border-radius: 12px 12px 0 0;
  overflow-y: auto;
  position: relative;
  padding-bottom: 20%;
 
}


/* ✅ Footer fixé EN BAS */
.confirmation-client-content .modal-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--highlight-color);
  padding: 10px;
  color: white;
  z-index: 100;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
}

/* ✅ Ligne total */
.modal-footer .total-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-weight: bold;
  font-size: 1rem;
}

/* ✅ Ligne boutons */
.modal-footer .btn-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

/* Bouton retour */
.btn-retour {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: #eee;
  color: #333;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
}

/* Bouton valider */
.btn-confirm {
  flex: 1;
  padding: 10px 16px;
  font-weight: bold;
  border-radius: 20px;
  border: none;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
}



/* Autres styles utiles */
.restaurant-header {
  margin-top: 30px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.restaurant-logo {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
}

.restaurant-info h3 {
  margin: 0;
  color: var(--primary-color);
}

.restaurant-info p {
  margin: 0;
  font-size: 0.9rem;
  color: gray;
}

.client-info-section input,
.client-info-section textarea {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.horaire-section label {
  display: block;
  margin: 8px 0;
  font-weight: bold;
}

#creneau-select {
  width: 100%;
  padding: 8px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}



.total-row {
  margin-top: 5px;
  margin-bottom: 10px;
}

.box-section {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
}

.client-info-section,
.horaire-section,
.paiement-section {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.paiement-options {
  display: flex;
  gap: 15px; /* ✅ espace entre les deux blocs */
  margin-top: 10px;
}

.paiement-option {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--highlight-color);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.paiement-option.selected {
  border: 2px solid var(--primary-color);
  background-color: rgba(255, 87, 34, 0.1); /* ✅ fond transparent avec couleur primaire */
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

.paiement-option.selected p {
  color: var(--primary-color);
}

.paiement-option img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 6px;
}

.horaire-section input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  position: relative;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  vertical-align: middle;
}

.horaire-section input[type="radio"]::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 50%;
  opacity: 0;
  transition: 0.2s ease-in-out;
}

.horaire-section input[type="radio"]:checked::before {
  opacity: 1;
}





/* ✅ Modale plein écran (fond + centrage) */
#confirmation-client-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(255, 255, 255); /* fond semi-transparent */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 9999;
  overflow-y: auto; 
}

/* ✅ Contenu scrollable à l’intérieur de la modale */
.confirmation-client-content {
  width: 100%;
  height: auto; /* occupe 100% hauteur écran */
  background: white;
  display: flex;
  flex-direction: column;
  border-radius: 12px 12px 0 0;
  overflow-y: auto;
  position: relative;
  padding-bottom: 20%;
 
}


/* ✅ Footer fixé EN BAS */
.confirmation-client-content .modal-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--highlight-color);
  padding: 10px;
  color: white;
  z-index: 100;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
}

/* ✅ Ligne total */
.modal-footer .total-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-weight: bold;
  font-size: 1rem;
}

/* ✅ Ligne boutons */
.modal-footer .btn-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

/* Bouton retour */
.btn-retour {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: #eee;
  color: #333;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
}

/* Bouton valider */
.btn-confirm {
  flex: 1;
  padding: 10px 16px;
  font-weight: bold;
  border-radius: 20px;
  border: none;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
}



/* Autres styles utiles */
.restaurant-header {
  margin-top: 30px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.restaurant-logo {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
}

.restaurant-info h3 {
  margin: 0;
  color: var(--primary-color);
}

.restaurant-info p {
  margin: 0;
  font-size: 0.9rem;
  color: gray;
}

.client-info-section input,
.client-info-section textarea {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.horaire-section label {
  display: block;
  margin: 8px 0;
  font-weight: bold;
}

#creneau-select {
  width: 100%;
  padding: 8px;
  margin-top: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}



.total-row {
  margin-top: 5px;
  margin-bottom: 10px;
}

.box-section {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
}

.client-info-section,
.horaire-section,
.paiement-section {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.paiement-options {
  display: flex;
  gap: 15px; /* ✅ espace entre les deux blocs */
  margin-top: 10px;
}

.paiement-option {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid var(--highlight-color);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.paiement-option.selected {
  border: 2px solid var(--primary-color);
  background-color: rgba(255, 87, 34, 0.1); /* ✅ fond transparent avec couleur primaire */
  color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: scale(1.02);
}

.paiement-option.selected p {
  color: var(--primary-color);
}

.paiement-option img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 6px;
}

.horaire-section input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  position: relative;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  vertical-align: middle;
}

.horaire-section input[type="radio"]::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background-color: var(--primary-color);
  border-radius: 50%;
  opacity: 0;
  transition: 0.2s ease-in-out;
}

.horaire-section input[type="radio"]:checked::before {
  opacity: 1;
}

#commande-confirmee-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;    /* largeur 100% écran */
  height: 100%;   /* hauteur 100% écran */
  background-color: rgba(255, 255, 255, 1); /* blanc opaque */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content-commande {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* bouton en bas, contenu centré */
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  zoom: 60%;
}

#commande-confirmee-text {
  margin-top: 20px !important;
  text-align: center;
  margin-top: 40px;
}

.image-container img {
  width: 180px;
  max-width: 100%;
  height: auto;
}

.chrono-wrapper {
  display: flex;
  text-align: center;
  margin-top: 20px;
  padding: 10px;
}

/* ✅ Bloc chrono */
#chrono-text {
  font-family: 'Verdana', sans-serif;
  font-size: 36px;
  font-weight: bold;
  color: var(--primary-color);
  background: white;
  padding: 15px 30px;
  border: 4px solid var(--primary-color);
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 40vh;
  animation: blinkChrono 1s infinite;
  box-shadow: 0 0 20px rgba(255, 165, 0, 0.5);
  max-width: 90%;
  word-break: break-word;
}

/* ✅ Barre de progression */
#chrono-bar {
  width: 100%;
  height: 20px;
  background: #ddd;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

#chrono-bar::before {
  content: "";
  display: block;
  height: 100%;
  background-color: var(--primary-color);
  animation: fillBar 10s linear forwards;
  transform-origin: left;
}

@keyframes fillBar {
  from { width: 100%; }
  to { width: 40%; }
}

@keyframes blinkChrono {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ✅ ✅ Adaptation mobile */
@media (max-width: 480px) {
  #chrono-text {
    font-size: 24px;
    padding: 12px 20px;
    border-width: 3px;
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.4);
  }

  #chrono-bar {
    height: 16px;
    margin-bottom: 8px;
  }
}

.modal-footer {
  width: 100%;
  text-align: center;
  padding: 20px;
  position: relative; /* pour éviter les conflits de fixed */
}

.modal-footer button {
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: bold;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.2s ease;
}

.modal-footer button:hover {
  background-color: var(--highlight-color);
}


#creneau-select {
  width: 100%;
  max-height: 200px; /* ou selon ton besoin */
  overflow-y: auto;
  box-sizing: border-box;
}


#loader {
  position: fixed;
  inset: 0;
  background: var(--primary-color); /* couleur dynamique */
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  border: 6px solid rgba(255, 255, 255, 0.3); /* cercle gris clair */
  border-top: 6px solid #fff;                  /* partie blanche qui tourne */
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;          /* rotation infinie */
  margin-bottom: 15px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}



.top-navbar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--highlight-color); 
  display: flex; justify-content: center; padding: 8px 0;
}
.top-navbar ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.top-navbar a {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; color: var(--text-color); font-weight: 500; font-size: 14px;
}
.top-navbar a:hover { color: var(--primary-color, #111); }
.top-navbar a.active { color: #000; font-weight: 600; }
.top-navbar svg { display: inline-block; }



.modal-overlay {
  z-index: 999999 !important;
}

/* ===== MODALE INFOS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000 !important;
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 18px 50px rgba(0,0,0,.2);
  animation: fadeIn .25s ease;
}

.modal-box h2 {
  margin-bottom: 14px;
  text-align: center;
  font-size: 20px;
}

.modal-box label {
  display: block;
  margin: 10px 0 4px;
  font-size: 14px;
  font-weight: 500;
}

.modal-box input,
.modal-box textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 8px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.modal-actions .btn {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.modal-actions .btn.cancel {
  background: #ddd;
  color: #111;
}

.modal-actions .btn:not(.cancel) {
  background: var(--primary-color, #2a5bd7);
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: scale(1); }
} 

/* Le conteneur scrollable dans la modale */
#besoin-additionnel-modal { overflow: hidden; }

#besoin-additionnel-modal .scroll-zone {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 100%; /* optionnel mais OK */
}

/* évite de centrer verticalement le contenu de la modale */
#besoin-additionnel-modal .modal-content {
  justify-content: flex-start; /* au lieu de center */
}





/* ===== MODALE COMPTE (ONGLETS) ===== */
.km-modal-box{
  max-width: 520px;
  width: 92%;
  max-height: 90%;
  overflow: auto;
}

.km-modal-top{
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
  padding-bottom: 10px;
}

.km-modal-tabs{
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.km-tab{
  border: 1px solid #e6e6e6;
  background: #f7f7f7;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.km-tab.active{
  background: var(--primary-color, #f5c400);
  border-color: rgba(0,0,0,0.05);
  color: #111;
}

.km-tab-panel{
  padding-top: 8px;
}

.km-muted{
  opacity: 0.75;
  font-weight: 700;
}

/* ===== LISTE COMMANDES ===== */
.km-orders-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.km-order-card{
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  background: #fff;
}

.km-order-card:hover{
  background: #fafafa;
}

.km-order-row{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
}

.km-order-sub{
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  opacity: 0.85;
}

.km-empty{
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.05);
  font-weight: 800;
  text-align: center;
}

/* ===== DETAILS ===== */
.km-order-details-head{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.km-back{
  border: 1px solid #e6e6e6;
  background: #f7f7f7;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
}

.km-order-title{
  font-weight: 900;
  font-size: 16px;
}

.km-order-details{
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
}

.km-od-block{
  margin-bottom: 12px;
}

.km-od-line{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0,0,0,0.12);
}

.km-od-line:last-child{
  border-bottom: none;
}

.km-od-muted{
  opacity: 0.75;
  font-weight: 700;
  margin-top: 6px;
}

/* ===== QR ===== */
.km-qr-wrap{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

#km-qr-img{
  width: 240px;
  height: 240px;
  border-radius: 16px;
  border: 1px solid #eee;
  background: #fff;
  object-fit: contain;
}

.km-qr-caption{
  font-weight: 900;
  opacity: 0.9;
}

.km-qr-text{
  font-family: monospace;
  font-size: 12px;
  opacity: 0.75;
  text-align: center;
  word-break: break-all;
}



/* ================================
   MODAL COMPTE : HEADER FIXE + BODY SCROLL + FOOTER FIXE
================================ */

/* La box du modal = colonne, hauteur limitée */
#modal-infos .km-modal-box{
  display: flex;
  flex-direction: column;
   width: 92%;
  overflow: auto;       /* IMPORTANT : empêche le footer de sortir */
}

/* Header (titre + tabs) reste en haut */
#modal-infos .km-modal-top{
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fff;
}

/* Chaque panel doit pouvoir “rétrécir” dans un flex parent */
#modal-infos .km-tab-panel{
  flex: 1 1 auto;
  min-height: 0;          /* CRUCIAL sinon overflow ne marche pas */
  overflow: auto;       /* on va scroller les zones internes */
}

/* ============ PANEL INFOS ============ */
/* Le form devient la zone scrollable */
#km-panel-infos form#form-infos{
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;         /* ✅ le contenu scroll */
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}

/* Le footer du form reste visible en bas pendant le scroll */
#km-panel-infos form#form-infos .modal-actions{
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  padding: 12px 0;
  margin-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ============ PANEL COMMANDES ============ */
#km-panel-orders{
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* toolbar ne scroll pas */
#km-orders-toolbar{
  flex: 0 0 auto;
}

/* ✅ seule la liste scroll */
#km-orders-list{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}

/* footer “Fermer” fixe */
#km-panel-orders .modal-actions{
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ============ PANEL DETAILS COMMANDE ============ */
#km-panel-order-details{
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* head détails ne scroll pas */
#km-panel-order-details .km-order-details-head{
  flex: 0 0 auto;
}

/* ✅ seul le bloc détails scroll */
#km-order-details{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}

/* footer “Fermer” fixe */
#km-panel-order-details .modal-actions{
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ============ PANEL BADGE ============ */
#km-panel-badge{
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* le contenu badge peut scroller si besoin */
#km-panel-badge .km-qr-wrap{
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}

/* footer “Fermer” fixe */
#km-panel-badge .modal-actions{
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}







/* MODAL DE CHOIX NIV PRIX */
.price-level-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.price-level-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.price-level-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, 92vw);
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

.price-level-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.price-level-title {
  font-size: 18px;
  font-weight: 800;
}

.price-level-close {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.price-level-product {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 14px;
}

.price-level-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-level-btn {
  display: flex;
  justify-content: center !important;
  align-items: center;
  justify-content: center !important;
  align-content: center !important;
  padding: 14px 14px;
  border-radius: 14px;
  border: 2px solid #eee;
  background: #fafafa;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.price-level-btn:active {
  transform: scale(0.99);
}

.price-level-btn .lvl-name {
  font-weight: 800;
}

.price-level-btn .lvl-price {
  font-weight: 900;
}




.header-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;              /* réduit l’espace entre recherche et boutons */
  width: 100%;
  padding: 4px 16px;     /* réduit l’espace vertical global */
  box-sizing: border-box;
}

#search-bar {
  width: 98%;
  margin: 0;
}

.mode-commande-home {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.mode-commande-home .btn-mode,
.mode-commande .btn-mode {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  background: #f2f2f2;
  color: #111;
  transition: all .2s ease;
  border: 3px solid var(--primary-color);
}

.mode-commande-home .btn-mode.selected,
.mode-commande .btn-mode.selected {
  background: var(--primary-color);
  color: #fff;
}

.mode-chooser-content {
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.mode-chooser-buttons,
#mode-chooser-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  margin-top: 0;
}

.mode-chooser-buttons .btn-mode,
#mode-chooser-buttons .btn-mode {
  min-width: 150px;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  background: var(--primary-color);
  color: #fff;
}

#mode-chooser-modal .modal-content {
  max-width: 500px;
  width: 90%;
  text-align: center;
}

/* ================================
   RESPONSIVE SUGGESTIONS
================================ */

/* ✅ Grand écran / borne large */
@media (min-width: 1200px) {
    .suggestions-container-kiosk {
        grid-template-columns: repeat(3, minmax(280px, 360px));
        gap: 34px;
        padding: 35px 40px 60px;
    }

    .suggestion-card-kiosk {
        max-width: 360px;
        min-height: 390px;
    }

    .suggestion-product-image,
    .suggestion-card-kiosk .product-image,
    .suggestion-image-kiosk {
        height: 270px;
    }
}

/* ✅ Tablette / écran moyen */
@media (max-width: 1199px) and (min-width: 768px) {
    .modal-header-kiosk h2 {
        font-size: clamp(32px, 4vw, 52px);
        padding: 24px 18px !important;
    }

    .suggestions-container-kiosk {
        grid-template-columns: repeat(2, minmax(260px, 340px));
        gap: 26px;
        align-content: center;
        justify-content: center;
        padding: 25px 25px 55px;
    }

    .suggestion-card-kiosk {
        max-width: 340px;
        min-height: 360px;
    }

    .suggestion-product-image,
    .suggestion-card-kiosk .product-image,
    .suggestion-image-kiosk {
        height: 250px;
    }

    .suggestion-product-name,
    .suggestion-card-kiosk .product-name,
    .suggestion-content-kiosk h3 {
        font-size: 24px;
    }

    .suggestion-product-price,
    .suggestion-card-kiosk .product-price,
    .suggestion-content-kiosk p {
        font-size: 23px;
    }
}

/* ✅ Petit écran mobile */
@media (max-width: 767px) {
    .modal-header-kiosk {
        width: 100%;
        margin: 0 0 12px 0;
    }

    .modal-header-kiosk h2 {
        font-size: 26px;
        padding: 18px 12px !important;
    }

    .modal-body-kiosk {
        padding: 12px 10px 140px;
    }

    .suggestions-container-kiosk {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        align-content: center;
        justify-content: center;
        padding: 15px 0 45px;
    }

    .suggestion-card-kiosk {
        max-width: 100%;
        border-radius: 22px;
        padding: 9px;
        min-height: 230px;
    }

    .suggestion-product-image,
    .suggestion-card-kiosk .product-image,
    .suggestion-image-kiosk {
        height: 145px;
        border-radius: 18px;
    }

    .suggestion-product-name,
    .suggestion-card-kiosk .product-name,
    .suggestion-content-kiosk h3 {
        font-size: 16px;
    }

    .suggestion-product-price,
    .suggestion-card-kiosk .product-price,
    .suggestion-content-kiosk p {
        font-size: 16px;
    }
}

/* ✅ Très petit écran : on garde toujours 2 colonnes */
@media (max-width: 420px) {
    .modal-body-kiosk {
        padding: 10px 6px 135px;
    }

    .suggestions-container-kiosk {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 10px 0 40px;
    }

    .suggestion-card-kiosk {
        max-width: 100%;
        min-height: 190px;
        border-radius: 18px;
        padding: 7px;
    }

.suggestion-product-image,
.suggestion-card-kiosk .product-image {
    height: 105px !important;
    object-fit: contain !important;
    background: white !important;
    padding: 7px !important;
}

.suggestion-image-kiosk {
    height: 105px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: white !important;
}

    .suggestion-product-name,
    .suggestion-card-kiosk .product-name,
    .suggestion-content-kiosk h3 {
        font-size: 13px;
        line-height: 1.1;
    }

    .suggestion-product-price,
    .suggestion-card-kiosk .product-price,
    .suggestion-content-kiosk p {
        font-size: 13px;
    }
}



/*--------------------- Modal mode livraison -------------------*/
.km-delivery-address-wrap {
  position: relative;
  width: 100%;
  margin-top: 15px;
}

#km-delivery-address {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 15px;
  box-sizing: border-box;
}

.km-delivery-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 99999;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  max-height: 230px;
  overflow-y: auto;
}

.km-delivery-suggestion-item {
  padding: 11px 13px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  text-align: left;
}

.km-delivery-suggestion-item:hover {
  background: #f5f5f5;
}

.km-delivery-result {
  margin-top: 14px;
  font-weight: 800;
  text-align: center;
  line-height: 1.5;
}

.km-delivery-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.km-delivery-alt {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.km-delivery-alt button {
  border: none;
  background: transparent;
  color: #555;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
}



/*-------------------LIVRAISON-------------------*/
.km-address-wrapper {
  position: relative;
  width: 100%;
}

.km-address-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 99999;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  max-height: 240px;
  overflow-y: auto;
}

.km-address-suggestion-item {
  padding: 11px 13px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  text-align: left;
}

.km-address-suggestion-item:hover {
  background: #f5f5f5;
}

.km-livraison-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.km-livraison-result.ok {
  background: #eaffea;
  color: #147014;
  border: 1px solid #9ad99a;
}

.km-livraison-result.error {
  background: #ffecec;
  color: #d00000;
  border: 1px solid #ffb3b3;
}

.km-livraison-result.info {
  background: #f4f4f4;
  color: #333;
  border: 1px solid #ddd;
}

.km-adresse-status {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
}

.km-total-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  margin-top: 4px;
}

.km-total-detail-row.delivery {
  color: #147014;
  font-weight: 800;
}





.restaurant-status-message {
  display: none;
  margin: 8px auto 10px auto;
  padding: 8px 12px;
  max-width: 95%;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.restaurant-status-message.info {
  background: #fff8e1;
  color: #7a4b00;
  border: 1px solid #f3d27a;
}

.restaurant-status-message.error {
  background: #ffecec;
  color: #b00020;
  border: 1px solid #ffb8b8;
}