/* Alignement de la marketplace avec le design system du dashboard. */
:root {
  --bg: #080809;
  --surface: #0e0e12;
  --card-bg: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e8e8;
  --dim: rgba(255, 255, 255, 0.45);
  --accent: #7c3aed;
  --al: #a78bfa;
  --green: #06d6a0;
  --blue: #4361ee;
  --cyan: #22d3ee;
}

body {
  font-feature-settings: 'cv11', 'ss01', 'cv05';
  text-rendering: optimizeLegibility;
}

.yk-skip-link {
  position: fixed;
  top: max(8px, env(safe-area-inset-top, 0px));
  left: max(8px, env(safe-area-inset-left, 0px));
  z-index: 14000;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 9px 13px;
  transform: translateY(calc(-100% - 20px));
  border-radius: 9px;
  background: #fff;
  color: #080809;
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease;
}

.yk-skip-link:focus-visible { transform: translateY(0); }

.glow-orbs { display: none; }

.wrap {
  max-width: none;
  margin: 0;
  padding: 0 0 80px;
}

nav.source-nav {
  position: static;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px 14px;
  margin: 0;
  padding: 10px 28px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
  background: var(--surface);
  backdrop-filter: none;
}

.source-nav-logo {
  flex-shrink: 0;
  margin-right: 4px;
  padding-right: 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  font-family: inherit;
  font-size: 1rem;
}

.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.source-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-bottom: 2px solid transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.87rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.source-tab > img {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  object-fit: contain;
  filter: brightness(1.22) contrast(1.08);
}

.source-tab:hover { color: rgba(255, 255, 255, 0.75); }
.source-tab.active {
  border-bottom-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.source-nav .nav-r {
  margin-left: auto;
}

.source-nav .nbtn {
  border-radius: 8px;
  min-height: 36px;
}

.source-nav .nbtn.p {
  background: var(--accent);
  color: #fff;
}

.source-nav .nbtn.p:hover {
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.28);
}

.hero,
.cat-nav,
.section-header,
.sc-grid,
.my-purchases,
.faq-block,
.public-reviews,
.page-footer {
  width: min(100% - 48px, 1180px);
  margin-right: auto;
  margin-left: auto;
}

.hero {
  padding: 40px 0 32px;
  text-align: left;
}

.hero h1,
.section-header h2,
.sc-title,
.sc-price,
.purch-title,
.faq-title,
.modal-box h3 {
  font-family: inherit;
}

.hero h1 {
  max-width: 780px;
  font-size: clamp(2.15rem, 4.4vw, 3.8rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.commerce-page .gr {
  background: none;
  color: var(--text);
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: currentColor;
}

.hero p {
  max-width: 620px;
  margin-right: 0;
  margin-left: 0;
}

.trust-row { justify-content: flex-start; }
.hero-badge,
.trust-pill,
.count-chip,
.sc-badge,
.purchase-status { border-radius: 8px; }

.cat-nav {
  justify-content: flex-start;
  max-width: 1180px;
  margin-bottom: 32px;
  padding: 0;
}

.cat-pill {
  min-height: 42px;
  border-radius: 10px;
}

.cat-pill.active {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.16);
  color: #fff;
}

.sc-grid { gap: 16px; }
.sc-card,
.my-purchases,
.faq-sc-item,
.public-review,
.empty-sc {
  border-radius: 16px;
  background: var(--card-bg);
}

.sc-card {
  min-height: 420px;
  padding: 22px;
}

.sc-card:hover {
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(255, 255, 255, 0.045);
}

.sc-card::before {
  background: var(--accent);
}

.sc-buy-btn,
.btn-confirm {
  border-radius: 8px;
  background: #f7f7f8;
  color: #080809;
}

.sc-buy-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.source-nav .yk-nav-icon-action {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
}

.source-nav .yk-nav-icon-action img,
.source-nav .bal-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

html[data-yk-theme="light"] .source-nav .yk-nav-icon-action img,
html[data-yk-theme="light"] .source-nav .bal-chip img {
  filter: brightness(.35) contrast(1.15);
}

/* La boutique de landings réutilise le même shell, la même largeur et les
   mêmes surfaces que la marketplace source code et le dashboard. */
.store-commerce .hero,
.store-commerce .filters,
.store-commerce .grid,
.store-commerce .public-reviews,
.store-commerce .faq-section,
.store-commerce .page-footer {
  width: min(100% - 48px, 1180px);
  margin-right: auto;
  margin-left: auto;
}

.store-commerce .hero { text-align: left; }
.store-commerce .hero p { margin-right: 0; margin-left: 0; }
.store-commerce .chips,
.store-commerce .filters { justify-content: flex-start; }
.store-commerce .grid { gap: 16px; }
.store-commerce .card {
  border-radius: 16px;
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--card-bg);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.store-commerce .card:hover {
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: none;
  transform: translateY(-2px);
}
.store-commerce .btn.buy,
  .store-commerce .nbtn.p { background: #f7f7f8; color: #080809; }
.store-commerce .thumb img { transition-duration: 0.25s; }

.modal-box {
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 30px 28px;
}

.faq-title { text-align: left; }

@media (max-width: 768px) {
  nav.source-nav {
    padding: 12px 16px;
    gap: 10px 8px;
  }

  .source-nav-logo {
    margin-right: 2px;
    padding-right: 12px;
  }

  .source-tabs {
    order: 10;
    flex-basis: 100%;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 8px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-padding-inline: 14px;
    overscroll-behavior-inline: contain;
  }

  .source-tabs::-webkit-scrollbar { display: none; }
  .source-tab {
    padding: 11px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.9rem;
  }
  .source-tab > img { width: 22px; height: 22px; flex-basis: 22px; }

  .source-nav .nav-r { margin-left: auto; }
  .source-nav .nbtn.p { display: none; }
  .source-commerce .source-nav .nbtn,
  .store-commerce .source-nav .nbtn { min-height: 44px; }

  .hero,
  .cat-nav,
  .section-header,
  .sc-grid,
  .my-purchases,
  .faq-block,
  .public-reviews,
  .page-footer {
    width: min(100% - 36px, 1180px);
  }

  .store-commerce .hero,
  .store-commerce .filters,
  .store-commerce .grid,
  .store-commerce .public-reviews,
  .store-commerce .faq-section,
  .store-commerce .page-footer {
    width: min(100% - 36px, 1180px);
  }

  .source-commerce .hero,
  .store-commerce .hero { padding: 42px 0 34px !important; }
}

@media (max-width: 480px) {
  nav.source-nav { padding: 12px 14px; }
  .source-nav .nbtn.g:not(.bal-chip) { display: none; }
  .hero,
  .cat-nav,
  .section-header,
  .sc-grid,
  .my-purchases,
  .faq-block,
  .public-reviews,
  .page-footer {
    width: calc(100% - 28px);
  }
  .store-commerce .hero,
  .store-commerce .filters,
  .store-commerce .grid,
  .store-commerce .public-reviews,
  .store-commerce .faq-section,
  .store-commerce .page-footer { width: calc(100% - 28px); }
  .sc-card { min-height: 0; }
  .sc-title-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
  .sc-desc { font-size: .9rem; line-height: 1.6; }
  .sc-more summary {
    display: flex;
    min-height: 44px;
    align-items: center;
    cursor: pointer;
  }
  .cat-pill,
  .source-commerce .source-tab,
  .source-commerce .source-nav .nbtn {
    min-height: 44px;
  }
  .modal-actions { flex-direction: column; }
  .modal-actions button { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-card,
  .sc-buy-btn,
  .nbtn { transition: none; }
  .sc-card:hover,
  .sc-buy-btn:hover,
  .nbtn:hover { transform: none; }
}

/* Harmonisation avec Store et le dashboard : mêmes surfaces, focus et cibles tactiles. */
.source-commerce .source-nav,
.source-commerce .source-nav.yk-site-nav { min-height:64px; padding:10px clamp(16px,3vw,40px); background:var(--yk-nav-bg,rgba(8,8,12,.88)); border-bottom:1px solid var(--yk-border,rgba(255,255,255,.08)); box-shadow:none; }
.source-commerce .source-nav-logo { border-right:0; padding-right:0; }
.source-commerce .yk-nav-links a,.source-commerce .source-tab,.source-commerce .source-nav .nbtn { min-height:44px; }
.source-commerce a:focus-visible,.source-commerce button:focus-visible { outline:3px solid #a78bfa; outline-offset:3px; }
.download-safety { margin:28px 0; padding:20px 22px; border:1px solid rgba(124,58,237,.28); border-radius:16px; background:rgba(124,58,237,.08); }
.download-safety p { margin:8px 0 0; color:var(--dim,rgba(255,255,255,.68)); line-height:1.65; max-width:78ch; }
@media (max-width:760px) { .source-commerce .source-nav { padding-inline:14px; } .source-commerce .yk-nav-links a { font-size:.76rem; padding-inline:8px; } }

/* Refonte 2026-07 : le catalogue devient un espace produit, pas une landing. */
:root {
  --bg:#080809;
  --surface:#0e0e12;
  --card-bg:#111115;
  --border:rgba(255,255,255,.09);
  --text:#f2f2f4;
  --dim:#9999a3;
  --accent:#7c3aed;
  --al:#c4b5fd;
  --green:#57f287;
  --blue:#8b5cf6;
  --cyan:#a78bfa;
}

body.source-commerce {
  min-height:100vh;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,system-ui,sans-serif;
  font-feature-settings:'cv11','ss01','cv05';
}
.source-commerce .glow-orbs { display:none; }
.source-commerce .wrap { max-width:none; margin:0; padding:0 0 80px; }
.source-commerce main { width:min(100% - 48px,1240px); margin:0 auto; padding-top:34px; }
.source-commerce nav.source-nav { margin:0!important; }
.source-commerce .source-tabs[hidden],
.source-commerce .yk-nav-links[hidden] { display:none!important; }
.source-commerce .source-tabs,
.source-commerce .yk-nav-links { flex:1 1 auto; }
.source-commerce .source-nav .nav-r { justify-self:end; }
.source-commerce .source-nav .yk-site-account-actions { flex-wrap:nowrap; }
.source-commerce .yk-nav-links a img {
  width:19px!important;
  height:19px!important;
  flex:0 0 19px;
  object-fit:contain;
}

.source-commerce .hero {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:28px;
  width:100%;
  margin:0;
  padding:6px 0 28px;
  border-bottom:1px solid var(--border);
  text-align:left;
}
.source-commerce .hero-badge {
  display:inline-flex;
  min-height:28px;
  align-items:center;
  margin:0 0 12px;
  padding:5px 9px;
  border:1px solid rgba(124,58,237,.3);
  border-radius:7px;
  background:rgba(124,58,237,.12);
  color:#c4b5fd;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:0;
}
.source-commerce .badge-dot { display:none; }
.source-commerce .hero h1 {
  max-width:720px;
  margin:0 0 10px;
  color:var(--text);
  font:750 2rem/1.15 Inter,system-ui,sans-serif;
  letter-spacing:-.025em;
}
.source-commerce .hero p { max-width:68ch; margin:0; color:var(--dim); font-size:.9rem; line-height:1.65; }
.source-commerce .gr { background:none; color:inherit; -webkit-background-clip:initial; background-clip:initial; -webkit-text-fill-color:currentColor; }
.source-commerce .trust-row { display:flex; justify-content:flex-end; gap:8px; margin:0; }
.source-commerce .trust-pill {
  min-height:34px;
  padding:7px 10px;
  border:1px solid var(--border)!important;
  border-radius:8px;
  background:rgba(255,255,255,.035)!important;
  color:#c7c7ce!important;
  font-size:.72rem;
}
.source-commerce .trust-pill svg { color:#a78bfa; }

.source-commerce .ownership-choice {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin:20px 0 30px;
  padding:16px 18px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--card-bg);
}
.source-commerce .ownership-choice strong { margin:0 0 3px; font-family:inherit; font-size:.9rem; }
.source-commerce .ownership-choice span { color:var(--dim); font-size:.78rem; }
.source-commerce .ownership-choice a {
  min-height:40px;
  padding:9px 13px;
  border:1px solid rgba(167,139,250,.42);
  border-radius:8px;
  background:rgba(124,58,237,.14);
  color:#ede9fe;
  font-size:.78rem;
  font-weight:700;
}

.source-commerce .section-header { display:flex; align-items:center; gap:9px; width:100%; margin:0 0 14px; }
.source-commerce .section-header h2 { font-family:inherit; font-size:1rem; font-weight:700; }
.source-commerce .count-chip { padding:3px 7px; border:0; border-radius:6px; background:rgba(124,58,237,.14); color:#c4b5fd; font-size:.68rem; }
.source-commerce .sc-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; width:100%; margin:0; }
.source-commerce .sc-card {
  min-height:386px;
  padding:18px;
  gap:13px;
  overflow:visible;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--card-bg);
  box-shadow:none;
  transition:border-color 160ms ease,background-color 160ms ease;
}
.source-commerce .sc-card::before { display:none; }
.source-commerce .sc-card:hover { border-color:rgba(167,139,250,.38); background:#141419; box-shadow:none; transform:none; }
.source-commerce .sc-header { gap:11px; padding-right:48px; }
.source-commerce .sc-icon {
  width:40px;
  height:40px;
  border:1px solid rgba(124,58,237,.22)!important;
  border-radius:9px;
  background:rgba(124,58,237,.11)!important;
  color:#c4b5fd!important;
}
.source-commerce .sc-icon svg { width:19px; height:19px; }
.source-commerce .sc-title { margin-bottom:4px; font-family:inherit; font-size:.95rem; font-weight:700; }
.source-commerce .sc-lang,
.source-commerce .sc-delivery,
.source-commerce .sc-badge { border-radius:6px; font-size:.65rem; letter-spacing:0; text-transform:none; }
.source-commerce .sc-lang { border-color:var(--border); background:rgba(255,255,255,.045); color:#a7a7b0; }
.source-commerce .sc-badge { top:15px; right:15px; background:rgba(124,58,237,.14)!important; color:#d8ccff!important; }
.source-commerce .sc-desc { color:var(--dim); font-size:.78rem; line-height:1.55; }
.source-commerce .sc-features { gap:6px; }
.source-commerce .sc-feature { gap:7px; color:#d8d8dd; font-size:.75rem; }
.source-commerce .sc-feature svg { color:#8b5cf6; }
.source-commerce .sc-more { padding-top:7px; border-top:1px solid var(--border); }
.source-commerce .sc-more summary { min-height:36px; color:#aaaab3; font-size:.73rem; }
.source-commerce .sc-footer {
  display:grid;
  grid-template-columns:minmax(84px,auto) minmax(0,1fr);
  align-items:end;
  gap:10px;
  padding-top:14px;
  border-top:1px solid var(--border);
}
.source-commerce .sc-price { font-family:inherit; font-size:1.15rem; font-weight:750; }
.source-commerce .sc-price small { color:var(--dim); font-family:inherit; font-size:.65rem; }
.source-commerce .sc-action-stack { display:grid; grid-template-columns:1fr; gap:7px; justify-content:stretch; }
.source-commerce .sc-buy-btn,
.source-commerce .btn-confirm {
  width:100%;
  min-height:44px;
  justify-content:center;
  padding:8px 10px;
  border:1px solid rgba(167,139,250,.45);
  border-radius:8px;
  background:#7c3aed;
  color:#fff;
  box-shadow:none;
  font-size:.75rem;
}
.source-commerce .sc-buy-btn:hover,
.source-commerce .btn-confirm:hover { background:#6d28d9; box-shadow:none; transform:none; }
.source-commerce .sc-buy-btn.secondary,
.source-commerce .sc-buy-btn.login,
.source-commerce .sc-buy-btn.owned,
.source-commerce .btn-cancel { border-color:var(--border); background:rgba(255,255,255,.05); color:#e8e8eb; }

.source-commerce .my-purchases,
.source-commerce .public-reviews,
.source-commerce .faq-block { width:100%; margin:44px 0 0; }
.source-commerce .my-purchases { padding:20px; border:1px solid var(--border); border-radius:12px; background:var(--card-bg); }
.source-commerce .purch-title,
.source-commerce .faq-title { font-family:inherit; font-size:1rem; font-weight:700; text-align:left; }
.source-commerce .purchase-row { border-bottom-color:var(--border); }
.source-commerce .faq-title { margin-bottom:14px; }
.source-commerce .faq-sc-item,
.source-commerce .public-review,
.source-commerce .empty-sc { border:1px solid var(--border); border-radius:10px; background:var(--card-bg); }
.source-commerce .faq-sc-q { min-height:48px; padding:13px 16px; }
.source-commerce .faq-sc-icon { width:26px; height:26px; border-color:var(--border); border-radius:7px; }
.source-commerce .download-safety { margin:28px 0; padding:18px 20px; border:1px solid var(--border); border-radius:12px; background:var(--card-bg); }
.source-commerce .download-safety p { max-width:78ch; margin:7px 0 0; color:var(--dim); line-height:1.6; }
.source-commerce .page-footer,
.source-commerce .yk-page-footer { width:100%; margin-top:52px; }
.source-commerce .modal-box { padding:28px; border:1px solid var(--border); border-radius:14px; background:var(--surface); box-shadow:0 24px 56px rgba(0,0,0,.42); }
.source-commerce .modal-icon { border-radius:10px; background:rgba(124,58,237,.12); }
.source-commerce .modal-close { width:40px; height:40px; padding:0; }
.source-commerce a:focus-visible,
.source-commerce button:focus-visible,
.source-commerce summary:focus-visible { outline:3px solid #a78bfa; outline-offset:3px; }

html[data-yk-theme="light"] {
  --bg:#f6f6f8;
  --surface:#fff;
  --card-bg:#fff;
  --border:rgba(19,19,27,.11);
  --text:#17171b;
  --dim:#62626c;
}
html[data-yk-theme="light"] body.source-commerce { background:var(--bg); color:var(--text); }
html[data-yk-theme="light"] .source-commerce .trust-pill { border-color:var(--border)!important; background:#fff!important; color:#4f4f59!important; }
html[data-yk-theme="light"] .source-commerce .ownership-choice,
html[data-yk-theme="light"] .source-commerce .sc-card,
html[data-yk-theme="light"] .source-commerce .my-purchases,
html[data-yk-theme="light"] .source-commerce .faq-sc-item,
html[data-yk-theme="light"] .source-commerce .public-review,
html[data-yk-theme="light"] .source-commerce .download-safety { border-color:var(--border); background:#fff; }
html[data-yk-theme="light"] .source-commerce .sc-card:hover { border-color:rgba(124,58,237,.34); background:#fff; }
html[data-yk-theme="light"] .source-commerce .sc-lang { border-color:var(--border); background:#f1f1f4; color:#565660; }
html[data-yk-theme="light"] .source-commerce .sc-feature { color:#313137; }
html[data-yk-theme="light"] .source-commerce .sc-buy-btn.secondary,
html[data-yk-theme="light"] .source-commerce .sc-buy-btn.login,
html[data-yk-theme="light"] .source-commerce .sc-buy-btn.owned,
html[data-yk-theme="light"] .source-commerce .btn-cancel { border-color:var(--border); background:#f1f1f4; color:#25252b; }
html[data-yk-theme="light"] .source-commerce .faq-sc-q { color:var(--text); }
html[data-yk-theme="light"] .source-commerce .modal-box { background:#fff; }

@media (max-width:1040px) {
  .source-commerce .hero { grid-template-columns:1fr; }
  .source-commerce .trust-row { justify-content:flex-start; }
  .source-commerce .sc-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .source-commerce main { width:calc(100% - 28px); padding-top:24px; }
  .source-commerce .source-nav .nbtn.p { display:none; }
  .source-commerce .hero { gap:18px; padding-bottom:22px; }
  .source-commerce .hero h1 { font-size:1.65rem; }
  .source-commerce .trust-row { overflow-x:auto; flex-wrap:nowrap; justify-content:flex-start; padding-bottom:2px; }
  .source-commerce .trust-pill { flex:0 0 auto; }
  .source-commerce .ownership-choice { align-items:flex-start; flex-direction:column; }
  .source-commerce .ownership-choice a { width:100%; }
  .source-commerce .sc-grid { grid-template-columns:1fr; }
  .source-commerce .sc-card { min-height:0; }
  .source-commerce .sc-footer { grid-template-columns:1fr; }
  .source-commerce .modal-actions { flex-direction:column; }
}
@media (max-width:480px) {
  .source-commerce .source-nav .nbtn.g:not(.bal-chip) { display:none; }
  .source-commerce .trust-row { display:none; }
  .source-commerce .sc-title-link,
  .source-commerce .sc-more summary { min-height:44px; }
  .source-commerce .sc-desc { font-size:.84rem; }
}
@media (prefers-reduced-motion:reduce) {
  .source-commerce *,
  .source-commerce *::before,
  .source-commerce *::after { transition-duration:.01ms!important; animation-duration:.01ms!important; }
}
