/* ═══════════════════════════════════════════════
   COMMANDE.CSS — Océan de Saveurs · Dark Edition
   ═══════════════════════════════════════════════ */

.commande-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2.5rem 5rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

/* ── LÉGENDE TAILLES ─────────────────────────── */
.sizes-legend {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid rgba(42,157,200,0.10);
  box-shadow: 0 2px 14px rgba(13,43,62,0.20);
}
.page-header-deo { filter: blur(3px);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  z-index: 0;
}
.size-pill { display: flex; align-items: center; gap: 0.5rem; font-size: 0.83rem; color: var(--text-light); }
.size-pill strong { color: var(--text-dark); }
.size-pill em { font-style: normal; color: var(--text-light); }
.spill-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.size-s .spill-dot { background: var(--sage); }
.size-m .spill-dot { background: var(--gold); }
.size-l .spill-dot { background: var(--apricot); }

.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  grid-column: 1 / -1;
}
.filter-btn {
  background: var(--surface);
  border: 1.5px solid rgba(42,157,200,0.15);
  border-radius: 50px;
  padding: 0.5rem 1.3rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--gold); color: var(--text-dark); background: rgba(42,157,200,0.06); }
.filter-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--apricot));
  border-color: transparent;
  color: #0D2B3E;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(42,157,200,0.25);
}

/* ── PRODUCT GRID ────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.25rem;
  align-content: start;
}
.product-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(42,157,200,0.10);
  box-shadow: 0 2px 16px rgba(13,43,62,0.20);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(13,43,62,0.30), 0 0 20px rgba(42,157,200,0.08);
  border-color: rgba(212,168,67,0.22);
}

.product-img {
  font-size: 3.5rem;
  text-align: center;
  padding: 2rem 1rem 1rem;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  line-height: 1;
}
.product-body { padding: 1rem 1.25rem 1.25rem; }
.product-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.tag {
  display: inline-block;
  background: rgba(42,157,200,0.08);
  border: 1px solid rgba(42,157,200,0.18);
  border-radius: 50px;
  padding: 0.18rem 0.65rem;
  font-size: 0.7rem; font-weight: 500;
  color: var(--text-mid); letter-spacing: 0.04em;
}
.gold-tag {
  background: linear-gradient(135deg, var(--gold), var(--apricot));
  border-color: transparent;
  color: #0D2B3E;
  font-weight: 700;
}
.product-body h3 { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--text-dark); margin-bottom: 0.4rem; }
.product-body p { font-family: 'Cormorant Garamond', serif; font-size: 0.95rem; color: var(--text-light); line-height: 1.6; margin-bottom: 0.85rem; }

/* ── SÉLECTEUR DE TAILLE ────────────────────── */
.product-options { margin-bottom: 1rem; }
.product-options label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); display: block; margin-bottom: 0.45rem; }

.size-selector { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.35rem; }
.size-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.45rem 0.3rem;
  border-radius: 10px;
  border: 1.5px solid rgba(42,157,200,0.12);
  background: var(--surface-2);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.size-btn span { font-size: 0.72rem; font-weight: 500; color: var(--text-light); }
.size-btn em { font-size: 0.78rem; font-style: normal; font-weight: 700; color: var(--gold); }
.size-btn:hover { border-color: var(--gold); background: rgba(42,157,200,0.08); }
.size-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(42,157,200,0.15), rgba(42,157,200,0.06));
  box-shadow: 0 0 10px rgba(42,157,200,0.15);
}
.size-btn.active span { color: var(--text-dark); }
.size-btn.active em { color: var(--gold-light); }

.size-btn[data-size="petite"] { position: relative; }
.size-btn[data-size="petite"]::after {
  content: '−⅓';
  position: absolute;
  top: -6px; right: -4px;
  background: var(--sage);
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 50px;
}

.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--gold-light), var(--apricot));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* ── PANIER SIDEBAR ──────────────────────────── */
.cart-sidebar {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid rgba(42,157,200,0.12);
  box-shadow: 0 4px 24px rgba(13,43,62,0.25);
  position: sticky;
  top: 100px;
  overflow: hidden;
}
.cart-header {
  background: linear-gradient(135deg, rgba(255,247,237,0.95), rgba(255,238,206,0.95));
  padding: 1.2rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(42,157,200,0.10);
}
.cart-header h3 { font-family: 'Playfair Display', serif; color: var(--text-dark); font-size: 1rem; }
.cart-count {
  background: linear-gradient(135deg, var(--gold), var(--apricot));
  color: #0D2B3E;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700;
  box-shadow: 0 0 10px rgba(42,157,200,0.30);
}
.cart-items { padding: 1rem; min-height: 100px; max-height: 360px; overflow-y: auto; }
.cart-empty { text-align: center; color: var(--text-light); font-family: 'Cormorant Garamond', serif; font-size: 0.95rem; padding: 2rem 0; }
.cart-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(42,157,200,0.08);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-icon { font-size: 1.5rem; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.85rem; font-weight: 500; color: var(--text-dark); }
.cart-item-size { font-size: 0.75rem; color: var(--text-light); margin: 0.1rem 0; }
.cart-item-price { font-size: 0.82rem; color: var(--gold); font-weight: 600; }
.cart-item-qty { display: flex; align-items: center; gap: 0.4rem; }
.cart-item-qty button {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(42,157,200,0.25); background: none;
  color: var(--text-mid); font-size: 0.95rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.cart-item-qty button:hover {
  background: linear-gradient(135deg, var(--gold), var(--apricot));
  color: #0D2B3E;
  border-color: transparent;
}
.cart-item-qty span { font-size: 0.9rem; font-weight: 600; min-width: 18px; text-align: center; color: var(--text-dark); }
.cart-footer { padding: 1rem 1.5rem; border-top: 1px solid rgba(42,157,200,0.08); }
.cart-total { font-size: 0.95rem; color: var(--text-light); margin-bottom: 0.75rem; }
.cart-total strong {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--gold-light), var(--apricot));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── MODAL ───────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--surface);
  border-radius: 24px;
  padding: 2rem 2.5rem 2.5rem;
  max-width: 560px; width: 100%;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(42,157,200,0.15);
  max-height: 92vh; overflow-y: auto;
  border: 1px solid rgba(42,157,200,0.12);
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(42,157,200,0.10); border: none;
  width: 34px; height: 34px; border-radius: 50%;
  cursor: pointer; font-size: 0.9rem; color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover { background: rgba(42,157,200,0.20); color: var(--text-dark); }

/* Barre d'étapes modal */
.modal-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 1.75rem;
}
.mstep {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 500;
  color: var(--text-light); text-transform: uppercase; letter-spacing: 0.07em;
  opacity: 0.4; transition: opacity 0.3s;
}
.mstep.active { opacity: 1; color: var(--gold-light); }
.mstep span {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(42,157,200,0.10); color: var(--text-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; transition: all 0.3s;
}
.mstep.active span {
  background: linear-gradient(135deg, var(--gold), var(--apricot));
  color: #0D2B3E;
  box-shadow: 0 0 12px rgba(42,157,200,0.30);
}
.mstep-line { width: 30px; height: 1px; background: rgba(42,157,200,0.15); margin: 0 0.25rem 0.1rem; }

.modal-box h2 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--text-dark); margin-bottom: 0.35rem; }
.modal-sub { font-family: 'Cormorant Garamond', serif; color: var(--text-light); font-size: 1rem; margin-bottom: 1.5rem; }

/* Formulaire modal */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-light); font-weight: 500; }
.form-group input, .form-group select, .form-group textarea {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid rgba(42,157,200,0.12); border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; color: var(--text-dark);
  background: var(--surface-2); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(42,157,200,0.10);
}
.form-group textarea { min-height: 80px; }
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23D4A843'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  cursor: pointer;
}

/* Récap montant */
.recap-amount {
  background: rgba(42,157,200,0.05);
  border-radius: 12px;
  padding: 1rem 1.25rem; margin-bottom: 1.5rem;
  border: 1px solid rgba(42,157,200,0.12);
}
.recap-row { display: flex; justify-content: space-between; align-items: center; padding: 0.3rem 0; font-size: 0.88rem; color: var(--text-light); }
.recap-total { border-top: 1px solid rgba(42,157,200,0.10); margin-top: 0.4rem; padding-top: 0.6rem; font-size: 1rem; font-weight: 600; color: var(--gold-light); }

/* Modes de paiement */
.payment-methods { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1.5rem; }
.pay-option {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.9rem 1rem; border-radius: 14px;
  border: 1.5px solid rgba(42,157,200,0.12);
  cursor: pointer; transition: all 0.2s;
  background: var(--surface-2);
}
.pay-option input { display: none; }
.pay-option:hover { border-color: rgba(42,157,200,0.30); background: rgba(42,157,200,0.05); }
.pay-option.active { border-color: rgba(42,157,200,0.35); background: rgba(42,157,200,0.08); box-shadow: 0 0 12px rgba(42,157,200,0.10); }
.pay-icon { font-size: 1.5rem; flex-shrink: 0; }
.pay-info { flex: 1; }
.pay-info strong { display: block; font-size: 0.9rem; color: var(--text-dark); }
.pay-info span { font-size: 0.78rem; color: var(--text-light); }
.pay-check {
  width: 22px; height: 22px; border-radius: 50%;
  background: transparent; border: 1.5px solid rgba(42,157,200,0.25);
  color: transparent; font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.pay-option.active .pay-check {
  background: linear-gradient(135deg, var(--gold), var(--apricot));
  border-color: transparent;
  color: #0D2B3E;
  box-shadow: 0 0 8px rgba(42,157,200,0.30);
}

.pay-fields { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.85rem; }
.pay-instruction {
  display: flex; align-items: flex-start; gap: 0.6rem;
  background: rgba(42,157,200,0.06); border-left: 2px solid var(--gold);
  border-radius: 0 10px 10px 0;
  padding: 0.75rem 1rem; font-size: 0.85rem; color: var(--text-light);
}

.btn-back-modal {
  background: none; border: 1px solid rgba(42,157,200,0.20);
  border-radius: 50px; padding: 0.4rem 1rem;
  font-size: 0.82rem; color: var(--text-light); cursor: pointer;
  margin-bottom: 1.25rem; transition: all 0.2s;
}
.btn-back-modal:hover { background: rgba(42,157,200,0.08); color: var(--text-dark); border-color: var(--gold); }

/* Succès modal */
.confirm-success { text-align: center; padding: 1rem 0; }
.confirm-check {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--apricot));
  color: #0D2B3E; font-size: 2rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 0 30px rgba(212,168,67,0.4);
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes popIn { from{transform:scale(0);opacity:0;} to{transform:scale(1);opacity:1;} }
.confirm-success h2 { font-family:'Playfair Display',serif; font-size:1.6rem; color:var(--text-dark); margin-bottom:0.5rem; }
.confirm-success p { color:var(--text-light); font-family:'Cormorant Garamond',serif; font-size:1.05rem; }
.confirm-ref {
  display: inline-block;
  background: rgba(42,157,200,0.08);
  border: 1px solid rgba(42,157,200,0.25);
  border-radius: 8px;
  padding: 0.5rem 1rem; font-family: monospace; font-size: 0.88rem;
  color: var(--gold); margin-top: 0.75rem;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {
  .commande-main { grid-template-columns: 1fr; }
  .cart-sidebar { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .sizes-legend { flex-direction: column; }
}

/* ── CARTES AVEC IMAGE EN ARRIÈRE-PLAN ────────── */
.product-card[style*="background-image"] {
  background-size: cover !important;
  background-position: center !important;
  position: relative;
}
.product-card[style*="background-image"]::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,5,2,0.3) 0%, rgba(10,5,2,0.65) 60%, rgba(10,5,2,0.88) 100%);
  border-radius: 20px;
  pointer-events: none; z-index: 0;
}
.product-card[style*="background-image"] .product-body {
  position: relative; z-index: 1; background: transparent !important;
}
.product-card[style*="background-image"] h3 { color: #F5E6C8 !important; }
.product-card[style*="background-image"] .size-btn {
  background: rgba(42,157,200,0.12);
  border-color: rgba(42,157,200,0.30);
  backdrop-filter: blur(4px);
}
.product-card[style*="background-image"] .size-btn span { color: rgba(245,230,200,0.85); }
.product-card[style*="background-image"] .size-btn em { color: var(--gold-light); }
.product-card[style*="background-image"] .size-btn.active {
  background: rgba(42,157,200,0.35);
  border-color: var(--gold-light);
}
.product-card[style*="background-image"] .product-price { color: var(--gold-light) !important; -webkit-text-fill-color: var(--gold-light) !important; }
.product-card[style*="background-image"] .product-options label { color: rgba(245,230,200,0.6); }
.product-card[style*="background-image"] .tag {
  background: rgba(42,157,200,0.15);
  border-color: rgba(42,157,200,0.30);
  color: rgba(245,230,200,0.9);
  backdrop-filter: blur(4px);
}
.product-body[style*="background-image"] {
  background-size: cover !important;
  background-position: center !important;
  position: relative;
  border-radius: 0 0 20px 20px;
  min-height: 280px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.product-body[style*="background-image"]::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(10,5,2,0.1), rgba(10,5,2,0.82));
  border-radius: 0 0 20px 20px; z-index: 0;
}
.product-body[style*="background-image"] > * { position: relative; z-index: 1; }
.product-body[style*="background-image"] h3 { color: #F5E6C8 !important; }
.product-body[style*="background-image"] .product-price { color: var(--gold-light) !important; -webkit-text-fill-color: var(--gold-light) !important; }
.product-body[style*="background-image"] .size-btn {
  background: rgba(42,157,200,0.12);
  border-color: rgba(42,157,200,0.30);
  backdrop-filter: blur(4px);
}
.product-body[style*="background-image"] .size-btn span { color: rgba(245,230,200,0.85); }
.product-body[style*="background-image"] .size-btn em { color: var(--gold-light); }
.product-body[style*="background-image"] .size-btn.active {
  background: rgba(42,157,200,0.35);
  border-color: var(--gold-light);
}
.product-body[style*="background-image"] .product-options label { color: rgba(245,230,200,0.6); }
