/* =========================================================
   CM Bloc 2 — Global Frontend Styles  v3.0
   Premium dark theme — charlymedium.fr
   ========================================================= */

/* ── Design tokens ──────────────────────────────────────── */
:root {
  --c-bg:        #060f1a;
  --c-surface:   #0b1a2b;
  --c-card:      #0f2237;
  --c-card2:     #132840;
  --c-border:    #1a3450;
  --c-border2:   #234567;
  --c-text:      #e8edf3;
  --c-muted:     #7a9bb5;
  --c-or:        #f5a623;
  --c-or2:       #e8921a;
  --c-teal:      #1F8F8F;
  --c-teal2:     #17a2b8;
  --c-purple:    #7c4dab;
  --c-purple2:   #9b59d0;
  --c-green:     #2ecc71;
  --c-red:       #e74c3c;
  --c-shadow:    0 4px 24px rgba(0,0,0,.55);
  --c-shadow-lg: 0 8px 48px rgba(0,0,0,.7);
  --radius:      14px;
  --radius-sm:   8px;
  --transition:  .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & base ───────────────────────────────────────── */
.cmb2-body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  margin: 0;
  padding: 0;
}
.cmb2-body *, .cmb2-body *::before, .cmb2-body *::after {
  box-sizing: border-box;
}
.cmb2-body a { color: var(--c-teal2); text-decoration: none; }
.cmb2-body a:hover { color: var(--c-or); }
.cmb2-body img { max-width: 100%; display: block; }

/* ── Breadcrumb ─────────────────────────────────────────── */
.cmb2-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 14px 32px;
  font-size: .82rem;
  color: var(--c-muted);
  background: rgba(0,0,0,.25);
  border-bottom: 1px solid var(--c-border);
}
.cmb2-breadcrumb a {
  color: var(--c-muted);
  transition: color var(--transition);
}
.cmb2-breadcrumb a:hover { color: var(--c-or); }
.cmb2-breadcrumb span:last-child { color: var(--c-text); font-weight: 600; }

/* ── Store badges ───────────────────────────────────────── */
.cmb2-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.cmb2-badge-physical { background: rgba(31,143,143,.2); color: var(--c-teal2); border: 1px solid var(--c-teal); }
.cmb2-badge-digital  { background: rgba(124,77,171,.2); color: var(--c-purple2); border: 1px solid var(--c-purple); }
.cmb2-badge-boutique { background: rgba(245,166,35,.15); color: var(--c-or); border: 1px solid rgba(245,166,35,.3); }
.cmb2-badge-voyance  { background: rgba(124,77,171,.2); color: var(--c-purple2); border: 1px solid var(--c-purple); }

/* ── Store hero ─────────────────────────────────────────── */
.cmb2-store-hero {
  position: relative;
  padding: 60px 32px 50px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(160deg, #0b1e33 0%, #060f1a 60%);
  border-bottom: 1px solid var(--c-border);
}
.cmb2-store-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(31,143,143,.15) 0%, transparent 70%);
  pointer-events: none;
}
.cmb2-store-hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 12px 0 8px;
  background: linear-gradient(135deg, #fff 0%, var(--c-or) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cmb2-store-hero-sub {
  font-size: 1.05rem;
  color: var(--c-muted);
  max-width: 520px;
  margin: 0 auto 20px;
}
.cmb2-store-hero-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.cmb2-meta-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--c-border2);
  border-radius: 20px;
  font-size: .82rem;
  color: var(--c-muted);
}

/* ── Section headings ───────────────────────────────────── */
.cmb2-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 48px 32px 28px;
}
.cmb2-section-head h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  color: var(--c-text);
}
.cmb2-section-head::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

/* ── Category grid ──────────────────────────────────────── */
.cmb2-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 32px 48px;
}
@media(max-width:900px){ .cmb2-cat-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:580px){ .cmb2-cat-grid { grid-template-columns: 1fr; } }

.cmb2-cat-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.cmb2-cat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--c-shadow-lg);
  border-color: var(--c-teal);
}

.cmb2-cat-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--c-card2);
}
.cmb2-cat-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.cmb2-cat-card:hover .cmb2-cat-img-wrap img { transform: scale(1.07); }

.cmb2-cat-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,15,26,.85) 0%, transparent 55%);
}
.cmb2-cat-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 52px;
  background: linear-gradient(135deg, var(--c-card2), var(--c-card));
}

.cmb2-cat-body {
  padding: 18px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cmb2-cat-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text);
  margin: 0 0 6px;
}
.cmb2-cat-desc {
  font-size: .85rem;
  color: var(--c-muted);
  margin: 0 0 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cmb2-cat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.cmb2-cat-count {
  font-size: .78rem;
  color: var(--c-muted);
  background: rgba(255,255,255,.05);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid var(--c-border);
}
.cmb2-cat-arrow {
  font-size: .85rem;
  color: var(--c-teal2);
  font-weight: 600;
  transition: transform var(--transition);
}
.cmb2-cat-card:hover .cmb2-cat-arrow { transform: translateX(4px); }

.cmb2-cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}
.cmb2-cat-tag {
  font-size: .7rem;
  padding: 2px 8px;
  background: rgba(31,143,143,.12);
  color: var(--c-teal2);
  border-radius: 10px;
  border: 1px solid rgba(31,143,143,.25);
}

/* ── Product grid ───────────────────────────────────────── */
.cmb2-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 0 32px 48px;
}
@media(max-width:900px){ .cmb2-product-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:580px){ .cmb2-product-grid { grid-template-columns: 1fr; } }

.cmb2-prod-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  color: inherit;
}
.cmb2-prod-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--c-shadow-lg);
  border-color: var(--c-or);
}

.cmb2-prod-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--c-card2);
  overflow: hidden;
}
.cmb2-prod-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.cmb2-prod-card:hover .cmb2-prod-img-wrap img { transform: scale(1.08); }
.cmb2-prod-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 52px;
}
.cmb2-prod-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,15,26,.7) 0%, transparent 50%);
}
.cmb2-prod-store-tag {
  position: absolute;
  top: 10px;
  left: 10px;
}
.cmb2-prod-body {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cmb2-prod-name {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cmb2-prod-short {
  font-size: .82rem;
  color: var(--c-muted);
  margin: 0 0 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cmb2-prod-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.cmb2-prod-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--c-or);
}
.cmb2-prod-cta {
  font-size: .8rem;
  padding: 6px 14px;
  background: rgba(31,143,143,.15);
  color: var(--c-teal2);
  border: 1px solid rgba(31,143,143,.3);
  border-radius: 20px;
  transition: background var(--transition), color var(--transition);
}
.cmb2-prod-card:hover .cmb2-prod-cta {
  background: var(--c-teal);
  color: #fff;
}
.cmb2-stock-badge {
  font-size: .72rem;
  padding: 2px 9px;
  border-radius: 10px;
  font-weight: 600;
}
.cmb2-stock-badge.in  { background: rgba(46,204,113,.15); color: var(--c-green); border:1px solid rgba(46,204,113,.3); }
.cmb2-stock-badge.out { background: rgba(231,76,60,.12);  color: var(--c-red);   border:1px solid rgba(231,76,60,.25); }

/* ── Product single page ────────────────────────────────── */
.cmb2-product-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 80px;
}
.cmb2-product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 40px 32px;
}
@media(max-width:760px){ .cmb2-product-layout { grid-template-columns:1fr; gap:24px; padding:20px 16px; } }

/* Images */
.cmb2-main-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
  display: block;
}
.cmb2-product-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-card);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
}
.cmb2-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.cmb2-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid var(--c-border);
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}
.cmb2-thumb:hover, .cmb2-thumb.active { border-color: var(--c-or); transform: scale(1.05); }

/* Product info */
.cmb2-product-info { display: flex; flex-direction: column; gap: 16px; }
.cmb2-cat-link {
  font-size: .82rem;
  color: var(--c-teal2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.cmb2-product-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  color: var(--c-text);
}
.cmb2-product-short { color: var(--c-muted); font-size: 1rem; margin: 0; line-height: 1.7; }

.cmb2-product-price-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.cmb2-product-price-large {
  font-size: 2rem;
  font-weight: 900;
  color: var(--c-or);
}
.cmb2-stock-label {
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
}
.cmb2-stock-label.in  { background:rgba(46,204,113,.12); color:var(--c-green); }
.cmb2-stock-label.out { background:rgba(231,76,60,.1);   color:var(--c-red); }

.cmb2-delivery-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cmb2-delivery-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--c-muted);
  padding: 6px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--c-border);
  border-radius: 20px;
}

.cmb2-btn-buy-large {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--c-or2), var(--c-or));
  color: #0a1520;
  font-size: 1.05rem;
  font-weight: 800;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  letter-spacing: .02em;
}
.cmb2-btn-buy-large:hover:not(:disabled) { opacity: .9; transform: translateY(-2px); }
.cmb2-btn-buy-large:disabled {
  background: var(--c-card2);
  color: var(--c-muted);
  border: 1px solid var(--c-border);
  cursor: not-allowed;
}
.cmb2-sku { font-size: .8rem; color: var(--c-muted); margin: 0; }
.cmb2-sku code { background: var(--c-card); padding: 2px 6px; border-radius: 4px; }

/* Description longue */
.cmb2-product-description {
  margin: 0 32px 40px;
  padding: 30px;
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.cmb2-product-description h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--c-text);
}
.cmb2-desc-content { color: var(--c-muted); line-height: 1.8; }

/* ── Back link ───────────────────────────────────────────── */
.cmb2-back-link {
  padding: 0 32px 40px;
}
.cmb2-back-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: var(--c-muted);
  padding: 8px 18px;
  border: 1px solid var(--c-border);
  border-radius: 20px;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.cmb2-back-link a:hover {
  color: var(--c-text);
  border-color: var(--c-border2);
  background: rgba(255,255,255,.04);
}

/* ── Empty state ─────────────────────────────────────────── */
.cmb2-empty-state {
  text-align: center;
  padding: 80px 32px;
  color: var(--c-muted);
}
.cmb2-empty-state .cmb2-empty-icon { font-size: 56px; margin-bottom: 20px; opacity: .5; }
.cmb2-empty-state h3 { font-size: 1.3rem; margin: 0 0 10px; color: var(--c-text); }

/* ── Stars animation (voyance) ──────────────────────────── */
@keyframes twinkle {
  0%,100% { opacity: .2; transform: scale(.8); }
  50%      { opacity: 1;  transform: scale(1.2); }
}
.cmb2-stars { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cmb2-star {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
  animation: twinkle var(--dur, 2s) var(--delay, 0s) infinite;
}

/* ── Voyance accent overrides ────────────────────────────── */
.cmb2-voyance .cmb2-cat-card:hover { border-color: var(--c-purple); }
.cmb2-voyance .cmb2-cat-tag { background: rgba(124,77,171,.12); color: var(--c-purple2); border-color: rgba(124,77,171,.25); }
.cmb2-voyance .cmb2-cat-arrow { color: var(--c-purple2); }
.cmb2-voyance .cmb2-store-hero::before {
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(124,77,171,.2) 0%, transparent 70%);
}

/* ── Responsive util ────────────────────────────────────── */
.cmb2-wrap { max-width: 1200px; margin: 0 auto; }
