:root{--muted:#64748b;--line:#e5e7eb;--lh:1.35;}
body{margin-top:85px}
.marketpage{max-width:1240px;margin:0 auto;padding:12px 16px 64px;}
.project-title{font-weight:600;margin:8px 0 4px;font-size:15px;line-height:1.3;color:#111;}
.clamp-2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;max-height:2.6em;}
.tabs{display:flex;gap:12px;margin:8px 0 16px;}
.tab{flex:1;text-align:center;padding:12px;border-radius:12px;background:#f2f3f5;font-weight:600;color:#111;text-decoration:none}
.tab.active{background:#111;color:#fff}

/* Filters */
.filterbar{display:flex;gap:10px;align-items:center;margin:10px 0 12px;flex-wrap:wrap}
.filterbar input[type="search"]{flex:1;min-width:260px;padding:12px;border:1px solid #ddd;border-radius:10px;}
.btn-filter{display:inline-flex;gap:8px;align-items:center;padding:10px 14px;border:1px solid #ddd;background:#f8fafc;border-radius:12px;cursor:pointer}
.btn-filter.active{border-color:#111;box-shadow:0 0 0 2px #1111}
.btn-search{padding:10px 14px;border-radius:12px;background:#111;color:#fff;border:none;cursor:pointer}
.count{margin-left:auto;color:#666;font-size:13px}
.filters{border:1px solid var(--line);background:#f8fafc;border-radius:12px;padding:14px;margin:8px 0 16px;display:none}
.filters.open{display:block}
.range-row{display:flex;gap:12px;align-items:center;margin-top:8px}
.range{appearance:none;width:100%;height:6px;border-radius:999px;background:#111;outline:none}
.range::-webkit-slider-thumb{appearance:none;width:18px;height:18px;border-radius:50%;background:#fff;border:2px solid #111;cursor:pointer}
.range-labels{display:flex;justify-content:space-between;color:#7c8a9a;font-size:12px;margin-top:6px}

/* Grid & cards */
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media (max-width:980px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:640px){.grid{grid-template-columns:1fr}}

.card{background:#fff;border:1px solid #eee;border-radius:16px;overflow:hidden}
.card-body{padding:14px}
.header{display:flex;align-items:center;gap:10px}
.avatar-initial{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#f3f4f6;color:#111;font-weight:700}
.avatar{width:40px;height:40px;border-radius:50%;object-fit:cover;object-position:center;border:1px solid #eee;background:#fafafa;display:block}
.username{font-weight:700;text-decoration:none;color:inherit}
.dot{width:10px;height:10px;border-radius:50%;margin-left:auto}
.dot.online{background:#22c55e}.dot.offline{background:#cbd5e1}

.rating{color:#111;font-weight:600}
.rating small{color:var(--muted);font-weight:400}
.badge{display:inline-flex;align-items:center;gap:6px;background:#f3f4f6;color:#111;padding:6px 10px;border-radius:999px;font-size:12px}
.lvl-1{background:#fef3c7;color:#b45309}
.lvl-3{background:#e9d5ff;color:#6d28d9}
.lvl-5{background:#fee2e2;color:#b91c1c}
.price{margin-left:auto;font-weight:700}

/* Clamp strict 2 lignes (zéro fuite) */
.clamp-2{
  --lh:1.35;
  line-height:var(--lh);
  height:calc(var(--lh) * 2em);   /* EXACT 2 lignes */
  overflow:hidden;                /* cache dur */
  overflow:clip;                  /* où dispo */
  display:block;
  word-break:break-word;
}
.desc{color:var(--muted);margin-top:10px}

/* footer */
.footer{display:flex;gap:18px;align-items:center;color:var(--muted);font-size:13px;margin-top:12px}
.footer .ico{display:inline-block;width:6px;height:6px;background:#cbd5e1;border-radius:50%}
.btn{width:100%;margin-top:12px;padding:12px;border-radius:12px;background:#111;color:#fff;border:none;cursor:pointer}

/* Project card */
.project-card{background:#fff;border:1px solid #eee;border-radius:16px;overflow:hidden;display:flex;flex-direction:column}
.media{position:relative;display:block;aspect-ratio:16/9;background:#f5f6f7;overflow:hidden;background-size:cover;background-position:center;background-repeat:no-repeat}

/* Titre 2 lignes nettes */
.project-title{-webkit-line-clamp: 2;padding:12px 14px 0px 14px;font-weight:700}
.project-title.clamp-2{margin-bottom:2px} /* micro-ajustement anti-souffle */

.project-row{display:flex;align-items:center;gap:10px;padding:0 14px 6px;color:var(--muted)}
.project-author{display:flex;align-items:center;gap:8px;text-decoration:none;color:inherit}
.project-author .avatar{width:28px;height:28px;border-radius:50%;object-fit:cover;object-position:center;border:1px solid #eee;background:#fafafa;display:block}
.project-author .avatar-initial{width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#f3f4f6;color:#111;font-weight:700;font-size:12px}
.project-meta{display:flex;gap:12px;align-items:center;color:#111;padding:0 14px 14px;font-weight:600}
.project-meta .cat{color:#64748b;font-weight:400;margin-left:auto}
.empty{padding:28px;text-align:center;color:#61708b}