/* ============================================================
   e-commerce.css : Démo interactive E-commerce, réservation & paiement
   Deux parcours fictifs : boutique (catalogue → panier → coordonnées →
   paiement simulé → confirmation) et prise de rendez-vous (service →
   grille hebdomadaire → confirmation).
   Sublime Gestion Site Vitrine
   ============================================================ */

.ec-mode[hidden] { display: none; }
.ec-mode.is-active { animation: fadeIn 0.3s ease both; }

/* === BOUTIQUE === */

.shop {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.03);
  max-width: 960px;
  margin: 0 auto;
  scroll-margin-top: 100px;
}

.shop__body {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.shop__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.shop__brand { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.shop__brand small { font-weight: 500; color: var(--muted); }

.shop__steps { display: flex; gap: 4px; }

.shop__steps span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted-light);
  padding: 4px 10px;
  border-radius: 100px;
  position: relative;
}

.shop__steps span.is-active { background: rgba(var(--orange-rgb), 0.1); color: var(--orange); }
.shop__steps span.is-done { color: var(--success); }

.shop__cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.shop__cart-btn:hover { border-color: var(--orange); }
.shop__cart-btn svg { width: 15px; height: 15px; }

.shop__cart-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 100px;
  background: var(--orange);
  color: #FFFFFF;
  font-size: 10.5px;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease-bounce);
}

.shop__cart-count.is-bump { transform: scale(1.35); }

.shop__stage { padding: 22px; }
.shop__view[hidden] { display: none; }
.shop__view.is-active { animation: fadeIn 0.3s ease both; }

.shop__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.shop__product {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease;
}

.shop__product:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.shop__visual {
  aspect-ratio: 1;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--wood-a), var(--wood-b));
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(100deg, rgba(0, 0, 0, 0.05) 0 3px, transparent 3px 11px);
  opacity: 0.7;
}

.shop__visual i {
  position: relative;
  display: block;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.shop__visual--board i { width: 58%; height: 70%; border-radius: 10px 10px 18px 18px; }
.shop__visual--shelf i { width: 78%; height: 14%; border-radius: 3px; box-shadow: 0 14px 18px -4px rgba(0, 0, 0, 0.25); }
.shop__visual--knife i { width: 40%; height: 62%; border-radius: 6px 6px 3px 3px; }
.shop__visual--box i { width: 52%; height: 44%; border-radius: 6px; }

.shop__name { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.shop__desc { font-size: 11px; color: var(--muted); line-height: 1.4; }

.shop__variants { display: flex; gap: 4px; }

.shop__variant {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--muted);
  cursor: pointer;
}

.shop__variant.is-active { border-color: var(--ink); color: var(--ink); }

.shop__price-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.shop__price { font-size: 14px; font-weight: 700; color: var(--ink); }

.shop__btn {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 100px;
  border: 1px solid transparent;
  background: var(--orange);
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.shop__btn:hover { background: var(--orange-hover); }
.shop__btn:active { transform: scale(0.98); }
.shop__btn:disabled { opacity: 0.45; cursor: not-allowed; }
.shop__btn--sm { padding: 7px 12px; font-size: 11px; }
.shop__btn--full { width: 100%; }
.shop__btn--ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.shop__btn--ghost:hover { background: var(--bg); }
.shop__btn.is-busy { pointer-events: none; opacity: 0.8; }

.shop__link {
  background: none;
  border: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

.shop__link:hover { color: var(--orange); }

/* Formulaires */
.shop__form { max-width: 480px; display: flex; flex-direction: column; gap: 12px; }
.shop__form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shop__view-title { font-size: 17px; font-weight: 700; color: var(--ink); margin: 0 0 4px; letter-spacing: -0.01em; }
.shop__lock { width: 15px; height: 15px; vertical-align: -2px; color: var(--success); display: inline-block; }
.shop__hint { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.shop__hint b { color: var(--ink); font-variant-numeric: tabular-nums; }

.shop__field { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }

.shop__field input {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.shop__field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(var(--orange-rgb), 0.12); background: #FFFFFF; }
.shop__field.has-error input { border-color: #DC2626; }
.shop__error { font-size: 12px; color: #DC2626; margin: 0; }
.shop__form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

/* Confirmation */
.shop__done { text-align: center; max-width: 440px; margin: 0 auto; padding: 12px 0; }

.shop__done-check {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--success);
  color: #FFFFFF;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.5s var(--ease-bounce) both;
}

.shop__done-sub { font-size: 13px; color: var(--muted); margin: 0 0 16px; }
.shop__done-sub b { color: var(--ink); }

.shop__recap {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 14px;
  margin-bottom: 16px;
  font-size: 12.5px;
}

.shop__recap div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--muted); }
.shop__recap div:last-child { border-bottom: none; color: var(--ink); font-weight: 700; }
.shop__recap div b { color: var(--ink); }

/* Panier (volet) */
.shop__cart {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 100%);
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 48px rgba(0, 0, 0, 0.1);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 4;
  animation: slideInRight 0.3s var(--ease-spring) both;
  overflow-y: auto;
}

.shop__cart-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink); }

.shop__cart-close {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.shop__cart-items { display: flex; flex-direction: column; gap: 8px; }
.shop__cart-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 20px 0; }

.shop__cart-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; animation: fadeUp 0.25s ease both; }
.shop__cart-item .shop__visual { width: 40px; aspect-ratio: 1; border-radius: 8px; }
.shop__cart-item .shop__visual i { transform: scale(0.9); }
.shop__cart-item__name { font-size: 12px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.shop__cart-item__price { font-size: 11px; color: var(--muted); }

.shop__qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 100px; overflow: hidden; }
.shop__qty button { width: 24px; height: 24px; border: none; background: var(--bg); color: var(--ink); font-size: 13px; cursor: pointer; }
.shop__qty button:hover { background: var(--border); }
.shop__qty span { width: 22px; text-align: center; font-size: 11.5px; font-weight: 700; }

.shop__remove { background: none; border: none; color: var(--muted-light); font-size: 11px; cursor: pointer; padding: 0; margin-left: 6px; }
.shop__remove:hover { color: #DC2626; }

.shop__shipping { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: var(--muted); }
.shop__shipping-bar { height: 5px; border-radius: 3px; background: var(--border); overflow: hidden; }
.shop__shipping-bar i { display: block; height: 100%; width: 0; background: var(--orange); border-radius: 3px; transition: width 0.5s var(--ease-standard), background-color 0.3s ease; }
.shop__shipping.is-free .shop__shipping-bar i { background: var(--success); }
.shop__shipping.is-free { color: var(--success); font-weight: 600; }

.shop__promo { display: flex; gap: 6px; }
.shop__promo input { flex: 1; min-width: 0; font-family: 'Inter', sans-serif; font-size: 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 100px; background: var(--bg); text-transform: uppercase; }
.shop__promo input:focus { outline: none; border-color: var(--orange); }
.shop__promo.is-applied input { border-color: var(--success); color: var(--success); font-weight: 700; }

.shop__totals { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; }
.shop__totals div { display: flex; justify-content: space-between; }
.shop__totals .is-total { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 4px; }
.shop__totals .is-discount { color: var(--success); }

/* === RÉSERVATION === */

.booking-mockup {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.03);
  max-width: 960px;
  margin: 0 auto;
  scroll-margin-top: 100px;
}

.booking-mockup__body { padding: 22px; min-height: 520px; }

.booking-step {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 240px;
  gap: 18px;
  align-items: start;
}

.booking-services { display: flex; flex-direction: column; gap: 8px; }

.booking-service {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.booking-service strong { font-size: 13px; color: var(--ink); }
.booking-service span { font-size: 11px; color: var(--muted); }
.booking-service:hover { border-color: rgba(var(--orange-rgb), 0.5); }
.booking-service.is-selected { border-color: var(--orange); background: rgba(var(--orange-rgb), 0.06); }

.booking-week__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.booking-week__label { font-size: 13px; font-weight: 700; color: var(--ink); }

.booking-week__btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink);
  font-size: 16px;
  cursor: pointer;
}

.booking-week__btn:disabled { opacity: 0.3; cursor: not-allowed; }

.booking-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }

.booking-grid__day { font-size: 10.5px; font-weight: 700; text-align: center; color: var(--muted); padding: 4px 0 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.booking-grid__day b { display: block; font-size: 13px; color: var(--ink); }
.booking-grid__day.is-today b { color: var(--orange); }

.booking-slot {
  padding: 7px 2px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-standard);
  font-variant-numeric: tabular-nums;
}

.booking-slot:hover:not(:disabled) { border-color: var(--orange); background: rgba(var(--orange-rgb), 0.06); color: var(--orange); }
.booking-slot.is-selected { background: var(--orange); border-color: transparent; color: #FFFFFF; }
.booking-slot:disabled { background: transparent; color: var(--muted-light); text-decoration: line-through; cursor: not-allowed; border-color: transparent; }
.booking-slot--gap { visibility: hidden; }

.booking-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.booking-legend span { display: inline-flex; align-items: center; gap: 5px; }
.booking-legend__dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.booking-legend__dot--free { background: var(--bg); border: 1px solid var(--border); }
.booking-legend__dot--taken { background: var(--border); }
.booking-legend__dot--picked { background: var(--orange); }

.booking-side { display: flex; flex-direction: column; gap: 12px; }

.booking-summary { background: var(--noir); color: #FFFFFF; border-radius: 14px; padding: 14px 16px; }
.booking-summary__label { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(var(--orange-rgb), 0.9); margin-bottom: 8px; }
.booking-summary__empty { font-size: 12px; color: rgba(255, 255, 255, 0.55); line-height: 1.5; }
.booking-summary__body { display: flex; flex-direction: column; gap: 3px; animation: fadeUp 0.3s ease both; }
.booking-summary__body strong { font-size: 13.5px; }
.booking-summary__body span { font-size: 12px; color: rgba(255, 255, 255, 0.7); }

.booking-form { display: flex; flex-direction: column; gap: 10px; animation: fadeUp 0.3s ease both; }

.booking-confirmation { text-align: center; max-width: 420px; margin: 40px auto; animation: scaleIn 0.4s var(--ease-spring) both; }

.booking-confirmation__check {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: var(--success);
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.booking-confirmation__title { font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: var(--space-5); }
.booking-confirmation__recap { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 4px 16px; margin: 0 auto var(--space-5); text-align: left; }
.booking-confirmation__row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); padding: 9px 0; border-top: 1px solid var(--border); }
.booking-confirmation__row:first-child { border-top: none; }
.booking-confirmation__row strong { color: var(--ink); font-weight: 600; text-align: right; }
.booking-confirmation__actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .shop__grid { grid-template-columns: repeat(2, 1fr); }
  .booking-step { grid-template-columns: 1fr; }
  .booking-services { flex-direction: row; flex-wrap: wrap; }
  .booking-service { flex: 1; min-width: 160px; }
}

@media (max-width: 640px) {
  .shop__steps { display: none; }
  .shop__grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .shop__form-row { grid-template-columns: 1fr; }
  .booking-grid { grid-template-columns: repeat(3, 1fr); }
  .booking-grid__day:nth-child(n+4), .booking-slot[data-col="3"], .booking-slot[data-col="4"], .booking-slot[data-col="5"] { display: none; }
}
