/* ========================= */
/* RESET ET STRUCTURE */
/* ========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background: #f5f5f5;
}

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

.menu-container {
  display: flex;
  gap: 20px;
  margin: 20px;
  flex-wrap: wrap;
}

/* ========================= */
/* SIDEBAR */
/* ========================= */

.menu-sidebar li:hover,
.menu-sidebar li.active {
  background: #e63946;
  color: #fff;
  border-color: #e63946;
}

.menu-sidebar {
  width: 200px;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  border: 1px solid #ddd;
  flex-shrink: 0;
}

.menu-sidebar ul {
  list-style: none;
  padding: 0;
}

.menu-sidebar li {
  padding: 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: 0.2s;
  text-align: center;
  margin-bottom: 5px;
  border: 1px solid transparent;
  
}

.menu-sidebar li:hover,
.menu-sidebar li.active {
  background: #e63946;
  color: #fff;
  border-color: #e63946;
}

/* ========================= */
/* CONTENU MENU */
/* ========================= */


.menu-content {
  flex: 1;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #ddd;
  min-width: 300px;
}

.category {
  display: none;
}

.category.active {
  display: block;
}

/* ========================= */
/* PRODUITS */
/* ========================= */
.products {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.product {
  width: 150px;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  background: #fff;
  transition: 0.2s;
}

.product:hover {
  transform: scale(1.03);
}

.product img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  margin-bottom: 5px;
  border-radius: 6px;
}

.product button {
  background: #e63946;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.2s;
}

.product button:hover {
  background: #d62828;
}

/* ========================= */
/* POPUP */
/* ========================= */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: flex-start;
  padding: 40px 0;
  overflow-y: auto;
  z-index: 1000;
  pointer-events: none; /* ← désactive les clics quand caché */
}

.modal-content {
  max-height: 90vh;
  overflow-y: scroll; /* ← scroll natif sans bloquer le select */
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}


.modal-content h3 {
  margin-top: 10px;
  margin-bottom: 10px;
  color: #e63946;
}

/* ========================= */
/* SAUCES & GARNITURES */
/* ========================= */
.sauce-list,
.garniture-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sauce-list label,
.garniture-list label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.sauce-list img,
.garniture-list img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #ddd;
}

.garniture-list img {
  width: 70px;
  height: 70px;
}

/* ========================= */
/* OPTIONS AVEC IMAGES */
/* ========================= */
.option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}


.option-list label {
  width: 100px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 5px;
  transition: 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.option-list img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #ddd;
  margin-bottom: 5px;
}

.option-list input {
  display: none;
}

.option-list input:checked + img {
  border: 3px solid #e63946;
}

.option-list label:hover {
  border-color: #e63946;
}

/* ========================= */
/* SELECT BOISSON */
/* ========================= */

#drink-select,
#crousty-drink-select {
  display: none;
  flex-direction: column;
  margin-top: 10px;
  position: relative;
  z-index: 5;
}

.drink-list {
  margin-top: 8px;
}

.drink-list p {
  margin: 0;
}

.drink-placeholder {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 2px solid #ddd;
  background: #f0f0f0;
  color: #555;
  font-size: 28px;
  font-weight: 700;
}

.garniture-list input:checked + .drink-placeholder {
  border: 2px solid #007BFF;
  transform: scale(1.05);
}

.garniture-list input:checked + .drink-placeholder + p {
  color: #e63946;
  font-weight: 700;
}

.menu-formula-choice {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-formula-choice img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ead3bf;
  flex-shrink: 0;
}

/* ========================= */
/* BOUTONS POPUP */
/* ========================= */
.modal-content button {
  margin-top: 15px;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #e63946;
  color: white;
  font-weight: bold;
}

.modal-content button:hover {
  background: #d62828;
}

/* ========================= */
/* RESPONSIVE */
/* ========================= */
@media(max-width:768px) {
  .menu-container {
    position: relative;
    z-index: 1; /* inférieur à 1000 du modal */
    }

  .menu-sidebar {
    width: 100%;
    display: flex;
    overflow-x: auto;
  }

  .menu-sidebar ul {
    display: flex;
    width: 100%;
  }

  .menu-sidebar li {
    flex: 1;
    margin-bottom: 0;
  }

  .products {
    justify-content: center;
  }

  .product {
    width: 45%;
  }

  .modal-content {
    width: 90%;
  }
}

/* ========================= */
/* CROUSTY */
/* ========================= */

.price-box{
font-size:22px;
font-weight:bold;
color:#e63946;
margin-bottom:15px;
}

.modal-content {
  max-width: 600px;
  margin: auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
}
.garniture-list, .sauce-list {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}
.garniture-list label, .sauce-list label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 6px;
  padding: 5px;
  border: 2px solid transparent;
  transition: border 0.2s;
}
.garniture-list img, .sauce-list img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}
.garniture-list input[type="radio"], .sauce-list input[type="radio"],
.garniture-list input[type="checkbox"] {
  margin-top: 5px;
}
.garniture-list input:checked + img,
.sauce-list input:checked + img {
  border: 2px solid #007BFF;
  transform: scale(1.05);
}
.size-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  justify-content: center;
}

.size-card {
  cursor: pointer;
}

.size-card input[type="radio"] {
  margin-top: 5px;
}

.size-option {
  min-width: 110px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: #fff;
  transition: border 0.2s, transform 0.2s;
}

.size-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.size-price {
  margin: 0;
  font-size: 14px;
  color: #e63946;
  font-weight: 700;
}

.size-card input[type="radio"]:checked + .size-option {
  border-color: #007BFF;
  transform: scale(1.05);
}

/* ========================= */
/* HARMONISATION MENU / PANIER */
/* ========================= */

.page-modern-menu .product button {
  background: linear-gradient(135deg, #2b1708, #5b3110);
  color: #fff7ef;
  border: 1px solid rgba(91, 49, 16, 0.2);
  box-shadow: 0 12px 24px rgba(43, 23, 8, 0.16);
}

.page-modern-menu .product button:hover {
  background: linear-gradient(135deg, #3a1f0b, #744018);
  color: #fffaf4;
}

.page-modern-menu .product-drink img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  object-position: center;
  padding: 10px;
  background: #fff;
}

.page-modern-menu .modal {
  background: rgba(20, 8, 3, 0.56);
  align-items: center;
  padding: 20px 12px;
  pointer-events: auto;
}

.page-modern-menu .modal-content {
  width: min(1040px, calc(100vw - 24px));
  max-height: 88vh;
  overflow-y: auto;
  margin: auto;
  padding: 26px;
  background: #fffaf4;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(40, 23, 7, 0.24);
}

.page-modern-menu .modal-content h3 {
  margin: 0 0 18px;
  color: #261406;
  font-size: 1.55rem;
}

.page-modern-menu .modal-content h4 {
  margin: 18px 0 12px;
  color: #40220d;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.page-modern-menu .sauce-list,
.page-modern-menu .garniture-list,
.page-modern-menu .size-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  justify-content: initial;
}

.page-modern-menu .sauce-list label,
.page-modern-menu .garniture-list label,
.page-modern-menu .size-card,
.page-modern-menu #product-modal .modal-content > label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
  padding: 14px 12px;
  border: 1px solid #eadbcf;
  border-radius: 16px;
  background: #fffdf9;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.page-modern-menu .sauce-list label:hover,
.page-modern-menu .garniture-list label:hover,
.page-modern-menu .size-card:hover,
.page-modern-menu #product-modal .modal-content > label:hover {
  transform: translateY(-1px);
  border-color: #e3a062;
  box-shadow: 0 12px 24px rgba(201, 128, 55, 0.12);
}

.page-modern-menu .sauce-list img,
.page-modern-menu .garniture-list img,
.page-modern-menu .drink-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #eadbcf;
  background: #f7ede2;
  object-fit: cover;
  flex: 0 0 48px;
}

.page-modern-menu .sauce-list label p,
.page-modern-menu .garniture-list label p,
.page-modern-menu .size-name,
.page-modern-menu .size-price {
  text-align: left;
}

.page-modern-menu .sauce-list label p,
.page-modern-menu .garniture-list label p {
  margin: 0;
  color: #29170b;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.page-modern-menu .sauce-list input,
.page-modern-menu .garniture-list input,
.page-modern-menu .size-card input,
.page-modern-menu #product-modal .modal-content > label input {
  margin-top: 4px;
  accent-color: #d97706;
  flex: 0 0 auto;
}

.page-modern-menu .sauce-list label,
.page-modern-menu .garniture-list label {
  min-width: 0;
}

.page-modern-menu .sauce-list label:has(input:checked),
.page-modern-menu .garniture-list label:has(input:checked),
.page-modern-menu .size-card:has(input:checked),
.page-modern-menu #product-modal .modal-content > label:has(input:checked) {
  border-color: #d97706;
  background: #fff5e8;
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.16);
}

.page-modern-menu #product-modal .modal-content > label {
  display: inline-flex;
  width: calc(50% - 8px);
  margin: 0 12px 12px 0;
  color: #29170b;
  font-weight: 700;
}

.page-modern-menu #product-modal .modal-content > label span {
  display: inline-block;
  line-height: 1.3;
}

.page-modern-menu .size-option {
  min-width: auto;
  min-height: auto;
  width: 100%;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.page-modern-menu .size-name {
  margin: 0;
  color: #29170b;
}

.page-modern-menu .size-price {
  margin: 0;
  color: #8b6a52;
  font-size: 0.88rem;
}

.page-modern-menu #drink-select,
.page-modern-menu #crousty-drink-select {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #f2decc;
  border-radius: 18px;
  background: #fff;
}

.page-modern-menu .menu-formula-choice img {
  width: 40px;
  height: 40px;
}

.page-modern-menu .modal-content button {
  margin-top: 0;
  padding: 12px 18px;
  border-radius: 999px;
}

.page-modern-menu #add-final,
.page-modern-menu #add-crousty-final,
.page-modern-menu #add-assiette-final {
  background: linear-gradient(135deg, #f6d58f, #efbf62);
  color: #3d2308;
  box-shadow: 0 14px 28px rgba(215, 146, 42, 0.18);
}

.page-modern-menu #add-final:hover,
.page-modern-menu #add-crousty-final:hover,
.page-modern-menu #add-assiette-final:hover {
  background: linear-gradient(135deg, #f8dfaa, #d7922a);
}

.page-modern-menu #cancel-product,
.page-modern-menu #cancel-crousty,
.page-modern-menu #cancel-assiette {
  background: #fff6e8;
  color: #7c5518;
  box-shadow: none;
  border: 1px solid rgba(215, 146, 42, 0.2);
}

.page-modern-menu #cancel-product:hover,
.page-modern-menu #cancel-crousty:hover,
.page-modern-menu #cancel-assiette:hover {
  background: #f8ebd0;
}

@media (max-width: 768px) {
  .page-modern-menu .modal-content {
    width: min(100%, calc(100vw - 20px));
    padding: 18px;
  }

  .page-modern-menu .sauce-list,
  .page-modern-menu .garniture-list,
  .page-modern-menu .size-list {
    grid-template-columns: 1fr 1fr;
  }

  .page-modern-menu #product-modal .modal-content > label {
    width: 100%;
    margin-right: 0;
  }
}

@media (max-width: 540px) {
  .page-modern-menu .sauce-list,
  .page-modern-menu .garniture-list,
  .page-modern-menu .size-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-modern-menu .menu-container {
    margin: 12px 10px 20px;
    gap: 12px;
  }

  .page-modern-menu .menu-sidebar {
    width: 100%;
    padding: 10px;
    border-radius: 22px;
    border: 1px solid rgba(23, 20, 17, 0.08);
    box-shadow: 0 14px 34px rgba(29, 21, 16, 0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .page-modern-menu .menu-sidebar ul {
    display: flex;
    width: max-content;
    gap: 8px;
  }

  .page-modern-menu .menu-sidebar li {
    flex: 0 0 auto;
    min-width: 96px;
    margin-bottom: 0;
    padding: 12px 16px;
    border-radius: 16px;
    font-weight: 700;
    white-space: nowrap;
  }

  .page-modern-menu .menu-content {
    width: 100%;
    min-width: 0;
    padding: 18px 14px;
    border-radius: 24px;
    box-shadow: 0 14px 34px rgba(29, 21, 16, 0.06);
  }

  .page-modern-menu .category h2 {
    text-align: center;
    margin-bottom: 18px;
  }
}


