/* =========================================================
   RÉSERVATION & COMMANDE PAGES
   ========================================================= */

/* Common Page Layout */
.page-header{
  background:var(--ink);
  padding:8rem 2rem 4rem;
  text-align:center;
  color:#fff;
}
.page-header .h2{color:#fff;margin-bottom:1rem}
.page-header p{color:rgba(255,255,255,.8);max-width:600px;margin:0 auto}

/* RÉSERVATION PAGE */
.reservation-section{
  padding:4rem 2rem 6rem;
  background:linear-gradient(135deg,var(--cream) 0%,var(--ivory) 100%);
  min-height:calc(100vh - 300px);
}
.reservation-section__inner{
  max-width:900px;margin:0 auto;
}

/* Reservation Form */
.reservation-form{
  background:#fff;
  padding:3rem;
  border-radius:4px;
  box-shadow:0 20px 60px -20px rgba(31,42,36,.2);
}
.form-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:1.5rem;
}
.form-group{
  display:flex;
  flex-direction:column;
  gap:.5rem;
}
.form-group--full{grid-column:1/-1}
.form-group label{
  font-size:.85rem;
  font-weight:500;
  color:var(--ink);
  letter-spacing:.02em;
}
.form-group label .required{
  color:var(--terracotta);
  margin-left:.25rem;
}
.form-group input,
.form-group select,
.form-group textarea{
  padding:1rem 1.25rem;
  border:1px solid var(--line);
  border-radius:var(--radius);
  font-size:1rem;
  background:#fff;
  transition:border-color .3s,box-shadow .3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  outline:none;
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(204,160,96,.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder{
  color:var(--muted);
}
.form-group select{
  cursor:pointer;
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 1rem center;
  padding-right:2.5rem;
}
.form-group textarea{
  min-height:120px;
  resize:vertical;
}

.form-hint{
  font-size:.8rem;
  color:var(--muted);
  margin-top:.25rem;
}

.form-actions{
  margin-top:2rem;
  display:flex;
  gap:1rem;
  justify-content:flex-end;
}

/* Time Slots */
.time-slots{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(100px,1fr));
  gap:.75rem;
}
.time-slot{
  padding:.75rem .5rem;
  text-align:center;
  border:1px solid var(--line);
  border-radius:var(--radius);
  cursor:pointer;
  transition:all .3s;
  font-size:.9rem;
}
.time-slot:hover{
  border-color:var(--gold);
  background:rgba(204,160,96,.05);
}
.time-slot.selected{
  background:var(--gold);
  border-color:var(--gold);
  color:var(--ink);
  font-weight:500;
}
.time-slot.unavailable{
  opacity:.4;
  cursor:not-allowed;
  background:var(--cream);
}

/* Reservation Summary */
.reservation-summary{
  background:var(--cream);
  padding:2rem;
  border-radius:4px;
  margin-top:2rem;
  border-left:3px solid var(--gold);
}
.reservation-summary h3{
  font-family:'Fraunces',serif;
  font-size:1.3rem;
  margin:0 0 1rem;
  color:var(--ink);
}
.summary-row{
  display:flex;
  justify-content:space-between;
  padding:.75rem 0;
  border-bottom:1px solid var(--line);
}
.summary-row:last-child{
  border-bottom:none;
  font-weight:600;
  color:var(--gold);
  font-size:1.1rem;
}

/* Confirmation Message */
.confirmation-message{
  text-align:center;
  padding:4rem 2rem;
  background:#fff;
  border-radius:4px;
  box-shadow:0 20px 60px -20px rgba(31,42,36,.2);
}
.confirmation-message .icon{
  width:80px;
  height:80px;
  background:var(--gold);
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 2rem;
  font-size:2.5rem;
}
.confirmation-message h2{
  font-family:'Fraunces',serif;
  font-size:2rem;
  margin-bottom:1rem;
  color:var(--ink);
}
.confirmation-message p{
  color:var(--muted);
  max-width:500px;
  margin:0 auto 2rem;
}
.confirmation-actions{
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  justify-content:center;
  margin-top:2rem;
}
.confirmation-actions .btn{
  flex:1 1 220px;
  max-width:100%;
  justify-content:center;
}

/* =========================================================
   COMMANDE / ORDERING PAGE
   ========================================================= */
.ordering-section{
  padding:2rem 2rem 6rem;
  background:var(--ivory);
  min-height:calc(100vh - 300px);
}
.ordering-section__inner{
  max-width:1400px;margin:0 auto;
  display:grid;
  grid-template-columns:1fr 380px;
  gap:3rem;
}

/* Menu Categories */
.menu-categories{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  margin-bottom:2rem;
  padding-bottom:1rem;
  border-bottom:1px solid var(--line);
}
.menu-category-btn{
  padding:.75rem 1.5rem;
  border:1px solid var(--line);
  background:#fff;
  border-radius:var(--radius);
  font-size:.9rem;
  cursor:pointer;
  transition:all .3s;
}
.menu-category-btn:hover{
  border-color:var(--gold);
  color:var(--gold);
}
.menu-category-btn.active{
  background:var(--gold);
  border-color:var(--gold);
  color:var(--ink);
  font-weight:500;
}

/* Menu Grid */
.order-menu{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:1.5rem;
}
.order-menu--list{
  grid-template-columns:1fr;
}

/* Menu Item Card */
.menu-item{
  background:#fff;
  border-radius:4px;
  overflow:hidden;
  box-shadow:0 4px 20px -10px rgba(31,42,36,.15);
  transition:transform .3s,box-shadow .3s;
  display:flex;
  flex-direction:column;
}
.menu-item:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 30px -10px rgba(31,42,36,.25);
}
.menu-item__image{
  aspect-ratio:16/10;
  background:var(--cream);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.menu-item__image img{
  width:100%;
  height:100%;
  object-fit:cover;
  cursor:default;
  user-select:none;
  -webkit-user-drag:none;
}
.menu-item__content{
  padding:1.5rem;
  flex:1;
  display:flex;
  flex-direction:column;
}
.menu-item__title{
  font-family:'Fraunces',serif;
  font-size:1.2rem;
  margin:0 0 .5rem;
  color:var(--ink);
}
.menu-item__desc{
  font-size:.9rem;
  color:var(--muted);
  margin:0 0 1rem;
  flex:1;
}
.menu-item__footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
}
.menu-item__price{
  font-family:'Fraunces',serif;
  font-size:1.3rem;
  color:var(--gold);
  font-weight:500;
}
.menu-item__price-wrap{
  display:flex;
  flex-direction:column;
  gap:.15rem;
  align-items:flex-start;
}
.menu-item__tva{
  font-size:.75rem;
  color:var(--muted);
}
.menu-item__add{
  padding:.6rem 1.2rem;
  background:var(--gold);
  color:var(--ink);
  border:none;
  border-radius:var(--radius);
  font-weight:500;
  cursor:pointer;
  transition:all .3s;
}
.menu-item__add:hover{
  background:var(--ink);
  color:var(--gold);
}
.item-options{
  min-width:0;
}
.item-options label{
  align-items:flex-start;
}
.item-options label > span{
  flex:1 1 auto;
  min-width:0;
  overflow-wrap:anywhere;
}
.item-options label > span span{
  white-space:nowrap;
}

/* Cart Sidebar */
.cart-sidebar{
  position:sticky;
  top:100px;
  background:#fff;
  border-radius:4px;
  box-shadow:0 10px 40px -20px rgba(31,42,36,.2);
  display:flex;
  flex-direction:column;
  max-height:calc(100vh - 120px);
}
.cart-header{
  padding:1.5rem;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
}
.cart-header h3{
  font-family:'Fraunces',serif;
  font-size:1.3rem;
  margin:0;
  display:flex;
  align-items:center;
  gap:.75rem;
  flex:1;
  min-width:0;
}
.cart-header h3 svg{
  flex-shrink:0;
}
.cart-count{
  flex-shrink:0;
  white-space:nowrap;
}
.cart-close{
  display:none;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border:none;
  background:var(--cream);
  border-radius:50%;
  color:var(--muted);
  font-size:1.2rem;
  cursor:pointer;
  flex-shrink:0;
  transition:background .2s,color .2s;
}
.cart-close:hover{
  background:var(--line);
  color:var(--ink);
}
.cart-count{
  background:var(--gold);
  color:var(--ink);
  font-size:.75rem;
  padding:.25rem .6rem;
  border-radius:20px;
  font-family:'Inter',sans-serif;
  font-weight:600;
}
.cart-items{
  flex:1;
  overflow-y:auto;
  padding:1rem 1.5rem;
}
.cart-empty{
  text-align:center;
  padding:3rem 1rem;
  color:var(--muted);
}
.cart-empty-icon{
  font-size:3rem;
  margin-bottom:1rem;
  opacity:.5;
}

/* Cart Item */
.cart-item{
  display:grid;
  grid-template-columns:1fr auto auto;
  gap:.75rem;
  align-items:center;
  padding:1rem 0;
  border-bottom:1px solid var(--line);
}
.cart-item:last-child{border-bottom:none}
.cart-item__info{min-width:0}
.cart-item__name{
  font-weight:500;
  font-size:.95rem;
  margin:0 0 .25rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.cart-item__price{
  font-size:.85rem;
  color:var(--muted);
}
.cart-item__qty{
  display:flex;
  align-items:center;
  gap:.5rem;
}
.cart-item__qty-btn{
  width:28px;
  height:28px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:var(--radius);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:all .2s;
  font-size:1rem;
  line-height:1;
}
.cart-item__qty-btn:hover{
  border-color:var(--gold);
  background:var(--gold);
}
.cart-item__qty-value{
  font-weight:500;
  min-width:24px;
  text-align:center;
}
.cart-item__remove{
  width:28px;
  height:28px;
  border:none;
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:color .2s;
}
.cart-item__remove:hover{color:var(--terracotta)}

/* Cart Footer */
.cart-footer{
  padding:1.5rem;
  border-top:1px solid var(--line);
  background:var(--cream);
  border-radius:0 0 4px 4px;
}
.cart-total-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:1rem;
  font-size:1.1rem;
}
.cart-total-row.total{
  font-family:'Fraunces',serif;
  font-size:1.4rem;
  color:var(--gold);
  font-weight:500;
  padding-top:1rem;
  border-top:1px solid var(--line);
  margin-top:1rem;
}
.cart-checkout-btn{
  width:100%;
  padding:1rem;
  background:var(--gold);
  color:var(--ink);
  border:none;
  border-radius:var(--radius);
  font-size:1rem;
  font-weight:600;
  cursor:pointer;
  transition:all .3s;
}
.cart-checkout-btn:hover{
  background:var(--ink);
  color:var(--gold);
}
.cart-checkout-btn:disabled{
  opacity:.5;
  cursor:not-allowed;
}

/* Checkout Modal */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(31,42,36,.6);
  backdrop-filter:blur(4px);
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:2rem;
  opacity:0;
  visibility:hidden;
  transition:all .3s;
}
.modal-overlay.active{
  opacity:1;
  visibility:visible;
}
.modal{
  background:#fff;
  border-radius:8px;
  max-width:600px;
  width:100%;
  max-height:90vh;
  overflow-y:auto;
  transform:scale(.95);
  transition:transform .3s;
}
.modal-overlay.active .modal{
  transform:scale(1);
}
.modal-header{
  padding:1.5rem;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.modal-header h3{
  font-family:'Fraunces',serif;
  font-size:1.5rem;
  margin:0;
}
.modal-close{
  width:36px;
  height:36px;
  border:none;
  background:var(--cream);
  border-radius:50%;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .3s;
}
.modal-close:hover{background:var(--line)}
.modal-body{
  padding:1.5rem;
}
.modal-footer{
  padding:1.5rem;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:flex-end;
  gap:1rem;
}

/* Pickup Time Selection */
.pickup-slots{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:.75rem;
  margin-top:1rem;
}
.pickup-slot{
  padding:1rem;
  text-align:center;
  border:1px solid var(--line);
  border-radius:var(--radius);
  cursor:pointer;
  transition:all .3s;
  font-size:.9rem;
}
.pickup-slot:hover{
  border-color:var(--gold);
}
.pickup-slot.selected{
  background:var(--gold);
  border-color:var(--gold);
  color:var(--ink);
  font-weight:500;
}

/* Order Summary in Modal */
.order-summary{
  background:var(--cream);
  padding:1.5rem;
  border-radius:4px;
  margin-bottom:1.5rem;
}
.order-summary h4{
  font-family:'Fraunces',serif;
  margin:0 0 1rem;
  font-size:1.1rem;
}
.order-summary-item{
  display:flex;
  justify-content:space-between;
  padding:.5rem 0;
  font-size:.9rem;
  border-bottom:1px dashed var(--line);
}

/* Responsive */
@media (max-width:1024px){
  .ordering-section__inner{
    grid-template-columns:1fr;
  }
  .cart-sidebar{
    position:fixed;
    bottom:env(safe-area-inset-bottom,0);
    left:0;
    right:0;
    max-height:min(85vh,600px);
    border-radius:16px 16px 0 0;
    z-index:100;
    transform:translateY(100%);
    transition:transform .3s;
  }
  .cart-sidebar.open{
    transform:translateY(0);
  }
  .cart-header{
    padding:1rem 1.25rem;
  }
  .cart-header h3{
    font-size:1.15rem;
    gap:.5rem;
  }
  .cart-header h3 svg{
    width:20px;
    height:20px;
    margin-right:0 !important;
  }
  .cart-close{
    display:flex;
  }
  .cart-items{
    padding:1rem 1.25rem;
  }
  .cart-footer{
    padding:1rem 1.25rem;
  }
  .cart-toggle{
    position:fixed;
    bottom:calc(20px + env(safe-area-inset-bottom,0));
    right:20px;
    width:56px;
    height:56px;
    background:var(--gold);
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 4px 20px rgba(31,42,36,.3);
    z-index:90;
    cursor:pointer;
    border:none;
    font-size:1.4rem;
  }
  .cart-toggle::after{
    content:attr(data-count);
    position:absolute;
    top:-4px;
    right:-4px;
    width:22px;
    height:22px;
    background:var(--terracotta);
    color:#fff;
    border-radius:50%;
    font-size:.7rem;
    display:flex;
    align-items:center;
  justify-content:center;
    font-weight:600;
  }
  .ordering-section{
    padding-bottom:120px;
  }
}

@media (max-width:720px){
  .cart-sidebar{
    bottom:env(safe-area-inset-bottom,0);
    max-height:min(85vh,600px);
    z-index:100;
    border-radius:16px 16px 0 0;
  }
  .cart-toggle{
    bottom:calc(20px + env(safe-area-inset-bottom,0));
    right:16px;
    z-index:90;
  }
}

@media (max-width:640px){
  .form-grid{
    grid-template-columns:1fr;
  }
  .reservation-form{
    padding:1.5rem;
  }
  .form-actions{
    flex-direction:column;
    align-items:stretch;
    gap:1rem;
  }
  .form-actions .btn{
    width:100%;
    text-align:center;
    white-space:normal;
  }
  .page-header{
    padding:6rem 1.5rem 3rem;
  }
  .time-slots{
    grid-template-columns:repeat(2,1fr);
    gap:1rem;
  }
  .time-slot{
    padding:1rem .5rem;
    font-size:1rem;
    min-height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .pickup-slots{
    grid-template-columns:repeat(2,1fr);
    gap:1rem;
  }
  .pickup-slot{
    padding:1rem .5rem;
    font-size:1rem;
    min-height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .menu-categories{
    flex-wrap:nowrap;
    overflow-x:auto;
    gap:.5rem;
    padding-bottom:.25rem;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .menu-categories::-webkit-scrollbar{display:none}
  .menu-category-btn{
    flex:0 0 auto;
    white-space:nowrap;
    padding:.6rem 1rem;
    font-size:.85rem;
  }
  .ordering-section{
    padding:1.5rem 1rem 120px;
  }
  .order-menu{
    grid-template-columns:1fr;
    gap:1rem;
  }
  .menu-item{
    flex-direction:row;
    align-items:stretch;
    gap:1rem;
    padding:.75rem;
  }
  .menu-item__image{
    width:110px;
    min-width:110px;
    aspect-ratio:1/1;
    border-radius:4px;
    align-self:flex-start;
  }
  .menu-item__content{
    padding:0;
    flex:1;
    min-width:0;
    justify-content:space-between;
  }
  .menu-item__title{
    font-size:1.05rem;
    margin:0 0 .35rem;
    overflow-wrap:anywhere;
  }
  .menu-item__desc{
    font-size:.85rem;
    margin:0 0 .5rem;
    display:-webkit-box;
    -webkit-line-clamp:2;
    line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
    overflow-wrap:anywhere;
  }
  .menu-item__footer{
    flex-wrap:nowrap;
    align-items:flex-end;
    gap:.75rem;
    margin-top:.5rem;
  }
  .menu-item__price{
    font-size:1.1rem;
  }
  .menu-item__add{
    flex:0 0 auto;
    min-width:auto;
    padding:.5rem .9rem;
    font-size:.85rem;
  }
  .cart-item__qty-btn,.cart-item__remove{
    width:36px;
    height:36px;
    font-size:1.1rem;
  }
  .cart-item__qty-value{
    min-width:28px;
  }
  .modal-overlay{
    padding:1rem;
    align-items:flex-end;
  }
  .modal{
    border-radius:12px 12px 0 0;
    max-height:92vh;
  }
  .modal-header,.modal-body,.modal-footer{
    padding:1.25rem;
  }
}

@media (max-width:480px){
  .menu-item__image{
    width:90px;
    min-width:90px;
  }
  .menu-item__title{
    font-size:1rem;
  }
  .menu-item__desc{
    font-size:.8rem;
    -webkit-line-clamp:2;
    line-clamp:2;
  }
  .menu-item__price{
    font-size:1rem;
  }
  .menu-item__add{
    padding:.45rem .75rem;
    font-size:.8rem;
  }
}

/* ── Pages légales / confidentialité ── */
.legal-content{
  text-align:center;
  max-width:800px;
  margin:0 auto;
}
.legal-content ul,
.legal-content ol{
  display:table;
  margin:1rem auto;
  text-align:left;
  padding-left:1.25rem;
}
