/* ============================================================
   TERANGA SÉNÉGAL — commande.css
   ============================================================ */
.order-section { background: var(--black); }
.order-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* Cart panel */
.cart-panel {
  background: var(--black-c);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--r);
  padding: 28px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.panel-header h2 { font-family: var(--fd); font-size: 1.6rem; font-weight: 400; }
.back-menu { font-size: .82rem; color: var(--gold); transition: color var(--t); }
.back-menu:hover { color: var(--gold-l); }

.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.cart-item-img {
  width: 56px; height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: .95rem; font-weight: 500; color: var(--white); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: .85rem; color: var(--gold); }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.qty-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--black-h);
  color: var(--white);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--t);
  border: 1px solid rgba(255,255,255,.08);
}
.qty-btn:hover { background: var(--gold); color: var(--black); border-color: var(--gold); }
.qty-num { font-size: .95rem; font-weight: 600; min-width: 20px; text-align: center; }
.cart-item-del {
  background: none;
  color: var(--muted);
  font-size: 1.1rem;
  padding: 6px;
  transition: color var(--t);
}
.cart-item-del:hover { color: #FF6B6B; }

.cart-empty { text-align: center; padding: 48px 20px; }
.cart-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.cart-empty p { color: var(--muted); }

.cart-summary {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: .92rem;
  color: var(--white-m);
}
.total-row { font-size: 1.05rem; color: var(--white); padding-top: 8px; border-top: 1px solid rgba(255,255,255,.06); }
.total-row strong { color: var(--gold); }

/* Form panel */
.form-panel { display: flex; flex-direction: column; gap: 0; }
.form-section {
  background: var(--black-c);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--r);
  padding: 28px;
  margin-bottom: 20px;
}
.form-section h3 {
  font-family: var(--fd);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.delivery-options { display: flex; flex-direction: column; gap: 12px; }
.delivery-opt { cursor: pointer; }
.delivery-opt input { display: none; }
.delivery-opt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: var(--r);
  transition: var(--t);
}
.delivery-opt input:checked + .delivery-opt-card {
  border-color: var(--gold);
  background: var(--gold-f);
}
.delivery-opt-card:hover { border-color: rgba(201,168,76,.4); }
.do-icon { font-size: 1.5rem; }
.delivery-opt-card strong { display: block; font-size: .95rem; color: var(--white); margin-bottom: 2px; }
.delivery-opt-card span { font-size: .82rem; color: var(--muted); }

.payment-options { display: flex; flex-direction: column; gap: 10px; }
.pay-opt { cursor: pointer; }
.pay-opt input { display: none; }
.pay-opt-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1.5px solid rgba(255,255,255,.08);
  border-radius: var(--r);
  transition: var(--t);
  font-size: .92rem;
  color: var(--white-m);
}
.pay-opt input:checked + .pay-opt-card {
  border-color: var(--gold);
  background: var(--gold-f);
  color: var(--white);
}
.pay-opt-card:hover { border-color: rgba(201,168,76,.4); }
.pay-icon { font-size: 1.2rem; }

.submit-btn { width: 100%; justify-content: center; font-size: 1rem; font-weight: 600; padding: 16px; border-radius: var(--r); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-box {
  background: var(--black-c);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: calc(var(--r) * 1.5);
  padding: 0;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: var(--sg);
  animation: modal-in .4s cubic-bezier(.25,.46,.45,.94);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-body {
  padding: 40px 40px 0;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  padding: 20px 40px 28px;
  background: var(--black-c);
  border-top: 1px solid rgba(201,168,76,0.1);
  flex-shrink: 0;
}
@keyframes modal-in { from { opacity:0; transform:scale(.9) translateY(20px); } to { opacity:1; transform:none; } }
.modal-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-d), var(--gold));
  color: var(--black);
  font-size: 2rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.modal-box h2 { font-size: 2rem; font-weight: 300; margin-bottom: 12px; }
.modal-box h2 em { font-style: italic; color: var(--gold); }
.modal-box > p, .modal-body > p { color: var(--white-m); margin-bottom: 24px; }
.modal-details {
  background: var(--black-s);
  border-radius: var(--r);
  padding: 16px 20px;
  margin-bottom: 20px;
  text-align: left;
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.8;
}
.modal-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 1024px) { .order-layout { grid-template-columns: 1fr; } .cart-panel { position: static; } }
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
  .modal-body { padding: 24px 20px 0; }
  .modal-footer { padding: 14px 20px 20px; }
  .modal-btns { flex-direction: column; gap: 10px; }
  .modal-btns .btn { width: 100%; justify-content: center; }
}
