/* Hub2Dev — marketplace (chargée après annuaire.css) */

/* Bandeau avec cartes de modules flottantes */
.m-hero { padding-bottom: 110px; }
.m-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; }
.m-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; font-size: 14.5px; color: #e2eefa; }
.m-trust span { display: inline-flex; align-items: center; gap: 8px; }
.m-trust svg { color: #7dd3fc; }
.m-stack { position: relative; height: 330px; }
.m-float { position: absolute; width: 250px; background: #fff; color: var(--text); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 60px -24px rgba(2,12,30,.75); animation: float 7s ease-in-out infinite; }
.m-float.f0 { left: 4%; top: 40px; transform: rotate(-7deg); z-index: 1; }
.m-float.f1 { left: 32%; top: 0; z-index: 3; animation-delay: -2.3s; }
.m-float.f2 { right: 0; top: 70px; transform: rotate(6deg); z-index: 2; animation-delay: -4.6s; }
.m-float.f0, .m-float.f2 { animation-name: float-r; }
@keyframes float-r { 50% { translate: 0 -10px; } }
.mf-img { height: 120px; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 80%, #fff), color-mix(in srgb, var(--c) 50%, #0a1f3f)); }
.mf-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mf-body { padding: 14px 16px 16px; display: grid; gap: 2px; }
.mf-body small { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c); }
.mf-body b { font-family: var(--display); font-size: 15px; }
.mf-body span { font-family: var(--display); font-weight: 800; color: var(--accent); }

/* Bande de catégories */
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 10px 4px 14px; margin-top: 6px; position: relative; z-index: 3; scrollbar-width: none; scroll-snap-type: x proximity;
  mask-image: linear-gradient(90deg, #000 92%, transparent); }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; scroll-snap-align: start; }
.cat input { position: absolute; opacity: 0; pointer-events: none; }
.cat span { display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px 8px 8px; border-radius: 99px; background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; box-shadow: 0 12px 26px -16px rgba(10,31,63,.5); border: 1px solid transparent; transition: transform .2s, background .2s, color .2s, border-color .2s; }
.cat span:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 40%, #fff); }
.cat i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); transition: background .2s, color .2s; }
.cat em { font-style: normal; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--bg-3); color: var(--text-3); }
.cat input:checked + span { background: var(--c); color: #fff; }
.cat input:checked + span i { background: rgba(255,255,255,.22); color: #fff; }
.cat input:checked + span em { background: rgba(255,255,255,.22); color: #fff; }
.cat input:focus-visible + span { outline: 3px solid #7dd3fc; outline-offset: 2px; }
.cat.empty span { color: var(--text-3); }
.cat.empty i { filter: grayscale(1); opacity: .6; }

/* Barre de filtres horizontale au-dessus de la grille */
.m-full { padding-bottom: 90px; margin-top: 8px; }
.m-full .active-chips { margin-top: 14px; }
.opt.free span { color: #047857; }
.opt.free input:checked + span { background: #059669; border-color: #059669; color: #fff; }
.panel-post.sell { background: linear-gradient(135deg, #e8f8f1, #eaf4ff); }
.panel-post.sell .post-ic { background: #059669; }
.panel-post.sell .link { color: #047857; }

/* Grille de modules */
.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 18px; }
/* Sélections de 3 modules (accueil, « du même éditeur ») : 3 colonnes ; spécificité basse pour laisser jouer le responsive */
.m-grid:where(.home-modules), :where(#editeur) .m-grid { grid-template-columns: repeat(3, 1fr); }
.m-card { --c: var(--accent); display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; transition: transform .25s, box-shadow .25s, border-color .25s; }
.m-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--c) 35%, #fff); box-shadow: 0 26px 46px -26px color-mix(in srgb, var(--c) 70%, transparent); }
.m-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 85%, #fff), color-mix(in srgb, var(--c) 55%, #0a1f3f)); }
.m-thumb::before { content: ""; position: absolute; width: 140px; height: 140px; right: -40px; top: -50px; border-radius: 50%; background: rgba(255,255,255,.15); }
.m-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.m-card:hover .m-thumb img { transform: scale(1.06); }
.m-fallback { position: relative; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.18); }
.m-cms { position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.95); color: #df0067; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); }
.m-free { position: absolute; right: 12px; top: 12px; padding: 4px 11px; border-radius: 99px; font-size: 12px; font-weight: 800; background: #22c55e; color: #fff; box-shadow: 0 6px 14px -6px rgba(34,197,94,.9); transform: rotate(4deg); }
.m-body { padding: 18px 20px 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.m-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--c); }
.m-cat i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 12%, #fff); }
.m-body h3 { font-size: 17px; line-height: 1.3; }
.m-body p { font-size: 14px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.m-vendor { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 14px 0; font-size: 13px; color: var(--text-3); }
.m-vendor img, .m-vlogo { width: 26px; height: 26px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.m-vlogo { display: grid; place-items: center; font-size: 10px; font-weight: 800; color: var(--accent); }
.m-vendor b { color: var(--text); font-weight: 600; }
.m-ver { margin-left: auto; font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--bg-3); }
.m-foot { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-top: 1px dashed var(--line); background: var(--bg-2); }
.m-price { font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.m-rating { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: #fff5e1; color: #b45309; }
.m-go { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--accent); transition: background .2s, color .2s, transform .25s; }
.m-card:hover .m-go { background: var(--c); color: #fff; transform: rotate(-45deg); }

/* Bandeau « vendre ses modules » */
.sell-band { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 56px; border-radius: 36px; color: #fff;
  background: radial-gradient(ellipse 50% 90% at 100% 0%, rgba(52,211,153,.35), transparent 60%), radial-gradient(ellipse 50% 80% at 0% 100%, rgba(14,165,198,.4), transparent 60%), var(--navy); }
.sell-band > * { position: relative; z-index: 1; }
.sell-band > .sb-shapes { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.sb-shapes span { position: absolute; border-radius: 24px; border: 2px solid rgba(255,255,255,.1); }
.sb-shapes span:nth-child(1) { width: 120px; height: 120px; right: 34%; top: -40px; transform: rotate(20deg); animation: bob 10s ease-in-out infinite; }
.sb-shapes span:nth-child(2) { width: 60px; height: 60px; right: 6%; bottom: 30px; border-radius: 50%; background: rgba(255,255,255,.05); }
.sb-shapes span:nth-child(3) { width: 220px; height: 220px; left: -80px; bottom: -120px; border-radius: 50%; border-width: 30px; border-color: rgba(255,255,255,.04); }
.sell-band .label { background: rgba(255,255,255,.1); color: #6ee7b7; }
.sell-band h2 { margin: 14px 0 10px; }
.sell-band h2 em { color: #6ee7b7; }
.sell-band p { color: #a9bdd6; max-width: 520px; }
.sb-steps { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 26px; }
.sb-steps div { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 99px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); font-size: 14px; }
.sb-steps b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #059669, #34d399); font-family: var(--display); }
.sell-band .btn-primary { background: #fff; color: #047857; }
.sb-stats { display: grid; gap: 14px; }
.sb-stats div { padding: 20px 24px; border-radius: 22px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 16px; }
.sb-stats b { font: 800 38px/1 var(--display); color: #6ee7b7; min-width: 56px; }
.sb-stats .sb-ic { display: grid; place-items: center; width: 56px; height: 38px; }
.sb-stats span { color: #c6d6ea; }

/* Responsive */
@media (max-width: 1180px) {
  .m-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .m-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .m-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .m-stack { display: none; }
  .sell-band { grid-template-columns: minmax(0, 1fr); padding: 40px 30px; }
}
@media (max-width: 680px) {
  .m-grid { grid-template-columns: minmax(0, 1fr); }
  .sell-band { padding: 32px 20px; border-radius: 26px; }
}
