/* ═══════════════════════════════════════════════════════════════
   ChapChap — Espace client (v3)
   Composants premium de l'expérience de commande.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Page header ─── */
.cc-page-header {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  padding: 40px 0 48px;
  border-radius: 0 0 32px 32px;
}
.cc-page-title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 10px;
  letter-spacing: -0.025em;
}
.cc-page-subtitle {
  color: var(--color-text-secondary);
  font-size: 1rem;
  max-width: 620px;
  line-height: 1.7;
}

/* ─── Sections ─── */
.cc-section {
  padding: 40px 0;
}
.cc-section-title {
  font-size: clamp(1.25rem, 2.8vw, 1.6rem);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.cc-section-subtitle {
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* ─── Shop cards ─── */
.cc-shop-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.cc-shop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: inherit;
  border-color: rgba(255, 107, 0, 0.22);
}
.cc-shop-card-img {
  height: 150px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.cc-shop-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  background: #fff;
  transition: transform 0.35s var(--ease);
}
.cc-shop-card:hover .cc-shop-card-img img { transform: scale(1.05); }
.cc-shop-card-fallback {
  font-size: 52px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.cc-shop-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-primary-grad);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  padding: 5px 12px;
  border-radius: 50rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.cc-shop-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cc-shop-card-title {
  font-size: 1rem;
  font-weight: 750;
  color: var(--color-text);
  margin-bottom: 4px;
}
.cc-shop-card-meta {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.cc-shop-card-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: 0.83rem;
  color: var(--color-text-secondary);
}

/* ─── Menu category & items ─── */
.cc-menu-category {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  margin-bottom: 20px;
}
.cc-menu-category-header {
  padding: 15px 20px;
  background: linear-gradient(135deg, #fffaf4, #fff3e6);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 11px;
}
.cc-menu-category-header h5 {
  font-size: 0.98rem;
  font-weight: 750;
  margin: 0;
  color: var(--color-text);
}
.cc-menu-category-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-primary-dark);
  background: #fff;
  border: 1px solid rgba(255, 107, 0, 0.25);
  padding: 3px 11px;
  border-radius: 999px;
  margin-left: auto;
}
.cc-menu-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--color-border);
  transition: background-color 0.16s;
}
.cc-menu-item:last-child { border-bottom: none; }
.cc-menu-item:hover { background-color: #fbfcfe; }
.cc-menu-item-img {
  width: 78px;
  height: 78px;
  border-radius: 15px;
  background: var(--color-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 28px;
  color: var(--color-primary-dark);
}
.cc-menu-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cc-menu-item-body {
  flex: 1;
  min-width: 0;
}
.cc-menu-item-name {
  font-size: 0.97rem;
  font-weight: 750;
  color: var(--color-text);
  text-decoration: none;
  display: block;
}
.cc-menu-item-name:hover { color: var(--color-primary-dark); }
.cc-menu-item-desc {
  font-size: 0.83rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
}
.cc-menu-item-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  font-variant-numeric: tabular-nums;
}

/* ─── Product detail ─── */
.cc-product-img-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cc-product-img-card img {
  width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  display: block;
  padding: 22px;
}
.cc-product-fallback {
  font-size: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 320px;
  background: linear-gradient(135deg, #fff3e6, #ffe8cc);
  color: var(--color-primary-dark);
}

/* ─── Boutons panier / favori ─── */
.cc-btn-add {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 12px;
  border: none;
  background: var(--color-primary-grad);
  color: #fff;
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s var(--ease);
  box-shadow: var(--shadow-primary);
}
.cc-btn-add:hover { transform: scale(1.07); }
.cc-btn-add:active { transform: scale(0.94); }
.cc-btn-fav {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid var(--color-border-light);
  color: var(--color-text-muted);
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s var(--ease);
}
.cc-btn-fav:hover { border-color: var(--color-primary); color: var(--color-primary); }
.cc-btn-fav.active { border-color: var(--color-primary); background: var(--color-primary-bg); }
.cc-btn-fav.active span { color: var(--color-primary-dark); }

/* ─── Floating info card ─── */
.cc-floating-info {
  margin-top: -38px;
  position: relative;
  z-index: 2;
}
.cc-floating-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}
.cc-floating-item {
  text-align: center;
  min-width: 80px;
  flex: 1;
}
.cc-floating-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  display: block;
}
.cc-floating-label {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  font-weight: 650;
  display: block;
  margin-top: 3px;
}
.cc-floating-divider {
  width: 1px;
  min-height: 38px;
  background: var(--color-border);
  align-self: stretch;
}

/* ─── Announcement ─── */
.cc-announcement {
  background: linear-gradient(135deg, #FFF7ED, #FFE4CC);
  border: 1px solid rgba(255, 107, 0, 0.18);
  border-radius: 18px;
  padding: 17px 22px;
  border-left: 4px solid var(--color-primary);
  display: flex;
  align-items: flex-start;
  gap: 13px;
}
.cc-announcement-label {
  font-size: 11px;
  font-weight: 750;
  color: var(--color-primary-deeper);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.cc-announcement-text {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.6;
}

/* ─── Search item list ─── */
.cc-search-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 15px 17px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.cc-search-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cc-search-item-img {
  width: 60px;
  height: 60px;
  border-radius: 13px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-size: 26px;
}
.cc-search-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cc-search-item-body {
  flex: 1;
  min-width: 0;
}

/* ─── Browse horizontal card ─── */
.cc-browse-card {
  width: 164px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.cc-browse-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cc-browse-card-img {
  min-height: 112px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
}
.cc-browse-card-img img {
  width: 80%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

/* ─── Empty state ─── */
.cc-empty-state {
  text-align: center;
  padding: 52px 24px;
}
.cc-empty-icon {
  font-size: 68px;
  margin-bottom: 18px;
  color: var(--color-primary);
  opacity: 0.35;
}
.cc-empty-state h5 {
  font-size: 1.12rem;
  font-weight: 750;
  margin-bottom: 6px;
}
.cc-empty-state p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin: 0;
}

/* ─── Category chips ─── */
.cc-category-pill {
  white-space: nowrap;
  border-radius: 50rem;
  padding: 8px 17px;
  font-size: 0.85rem;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s;
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  background: #fff;
}
.cc-category-pill:hover { border-color: var(--color-primary); color: var(--color-primary-dark); background: var(--color-primary-bg); }
.cc-category-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}

/* ─── Hero shop ─── */
.cc-shop-hero {
  background: linear-gradient(135deg, #FF6B00 0%, #FF8A3C 100%);
  color: #fff;
  padding: 30px 0 66px;
  border-radius: 0 0 34px 34px;
  position: relative;
  overflow: hidden;
}
.cc-shop-hero::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 520px 320px at 12% 120%, rgba(255, 255, 255, 0.22), transparent 60%),
    radial-gradient(ellipse 400px 300px at 92% -20%, rgba(255, 255, 255, 0.14), transparent 60%);
  pointer-events: none;
}
.cc-shop-hero > .container { position: relative; z-index: 2; }
.cc-shop-hero-logo {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.16);
  box-shadow: 0 12px 32px rgba(62, 36, 8, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.25);
}
.cc-shop-hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  background: #fff;
}
.cc-shop-hero-fallback {
  font-size: 42px;
  line-height: 1;
  color: #fff;
}

/* ─── Barre panier flottante (mobile) ─── */
.cart-fab {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 900;
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--color-dark);
  color: #fff;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 18px 44px rgba(11, 18, 32, 0.45);
  text-decoration: none;
  animation: fadeInUp 0.35s var(--ease);
}
.cart-fab:hover { color: #fff; transform: translateX(-50%) translateY(-2px); }
.cart-fab .cart-fab-count {
  background: var(--color-primary-grad);
  border-radius: 999px;
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  padding: 0 8px;
}
@media (max-width: 991.98px) {
  .cart-fab.show { display: inline-flex; }
  body { padding-bottom: 76px; }
}

/* ─── Carte de commande client ─── */
.order-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s var(--ease);
  display: block;
  color: inherit;
}
.order-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }
.order-card .order-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.order-card .order-items-preview { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.order-thumb {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--color-primary-bg); color: var(--color-primary-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; overflow: hidden; flex-shrink: 0;
}
.order-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Étapes checkout ─── */
.checkout-steps { display: flex; align-items: center; gap: 6px; margin-bottom: 1.6rem; }
.checkout-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 650; color: var(--color-text-muted);
  white-space: nowrap;
}
.checkout-step .step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #F5EBDD; color: var(--color-text-secondary);
  font-weight: 700; font-size: 0.8rem;
}
.checkout-step.active { color: var(--color-text); }
.checkout-step.active .step-num { background: var(--color-primary-grad); color: #fff; box-shadow: var(--shadow-primary); }
.checkout-step.done { color: var(--color-success-dark); }
.checkout-step.done .step-num { background: var(--color-success); color: #fff; }
.checkout-step-line { flex: 1; height: 2px; background: var(--color-border-light); border-radius: 2px; min-width: 16px; }
.checkout-step-line.done { background: var(--color-success); }

/* ─── Éléments paiement ─── */
.pay-method-card {
  border: 1.5px solid var(--color-border-light);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  background: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
}
.pay-method-card:hover { border-color: rgba(255, 107, 0, 0.4); background: #fffdfa; }
.pay-method-card.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}
.pay-method-logo {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}

/* ─── Responsive ─── */
@media (max-width: 767.98px) {
  .cc-page-header { padding: 28px 0 36px; border-radius: 0 0 24px 24px; }
  .cc-page-title { font-size: 1.5rem; }
  .cc-section { padding: 28px 0; }
  .cc-shop-card-img { height: 130px; }
  .cc-shop-card-title { font-size: 0.95rem; }
  .cc-shop-card-body { padding: 14px; }
  .cc-menu-item { gap: 12px; padding: 12px 14px; }
  .cc-menu-item-img { width: 64px; height: 64px; font-size: 24px; }
  .cc-menu-item-name { font-size: 0.9rem; }
  .cc-menu-item-price { font-size: 0.95rem; }
  .cc-btn-add, .cc-btn-fav { width: 42px; height: 42px; min-width: 42px; min-height: 42px; }
  .cc-floating-info { margin-top: -30px; }
  .cc-floating-card { padding: 16px; border-radius: 16px; flex-wrap: wrap; gap: 12px; }
  .cc-floating-divider { display: none; }
  .cc-floating-item { flex: 1 1 40%; min-width: auto; }
  .cc-product-fallback, .cc-product-img-card { min-height: 250px; }
  .cc-product-fallback { font-size: 84px; }
}

@media (min-width: 768px) {
  .cc-shop-hero { padding: 38px 0 78px; border-radius: 0 0 40px 40px; }
  .cc-shop-hero-logo { width: 104px; height: 104px; }
  .cc-floating-info { margin-top: -48px; }
  .cc-floating-card { padding: 24px; }
}