/* ═══════════════════════════════════════════════════
   SynFus — Marketplace CSS (thème violet SynFus)
   ═══════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────── */
.market-body { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.market-page { flex: 1; padding: 100px 0 80px; }
.market-container { max-width: 900px; margin: 0 auto; padding: 0 24px; }

/* ── Navbar active link ───────────────────────────── */
.nav-active { color: var(--accent-light) !important; }

/* ── Titre ────────────────────────────────────────── */
.market-title-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.market-title { font-size: 26px; font-weight: 800; }
.market-secure-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.25);
    border-radius: 100px; padding: 5px 14px;
    font-size: 12px; font-weight: 600; color: #22c55e;
}

/* ── Search card ──────────────────────────────────── */
.search-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.search-fields {
    display: grid;
    grid-template-columns: 1fr 180px 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.search-field { display: flex; flex-direction: column; gap: 8px; }
.search-label {
    font-size: 13px; font-weight: 600; color: var(--text-dim);
    display: flex; align-items: center; gap: 4px;
}
.required { color: var(--accent-light); }

/* Select custom */
.custom-select-wrap { position: relative; }
.custom-select {
    width: 100%; appearance: none; -webkit-appearance: none;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    padding: 11px 36px 11px 14px; font-size: 14px; font-family: var(--font);
    cursor: pointer; transition: border-color 0.2s;
}
.custom-select:focus { outline: none; border-color: var(--accent); }
.custom-select option { background: var(--bg-card); }
.select-arrow {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    pointer-events: none; color: var(--text-muted);
}

/* Input quantité */
.qty-input-wrap { position: relative; display: flex; align-items: center; }
.search-input {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    padding: 11px 40px 11px 14px; font-size: 14px; font-family: var(--font);
    transition: border-color 0.2s;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.qty-unit {
    position: absolute; right: 14px;
    font-size: 13px; font-weight: 600; color: var(--accent-light);
    pointer-events: none;
}

/* Bouton recherche */
.search-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px;
    background: var(--accent); color: #fff;
    border: none; border-radius: var(--radius-sm);
    font-size: 15px; font-weight: 600; font-family: var(--font);
    cursor: pointer; transition: all 0.2s;
    box-shadow: 0 0 20px rgba(124,58,237,0.3);
}
.search-btn:hover { background: var(--accent2); box-shadow: 0 0 30px rgba(124,58,237,0.4); }
.search-btn:active { transform: scale(0.99); }

/* ── État initial / vide ──────────────────────────── */
.results-empty {
    display: flex; flex-direction: column; align-items: center;
    padding: 64px 20px; gap: 12px; text-align: center; color: var(--text-muted);
}
.results-empty p { font-size: 15px; color: var(--text-dim); }
.results-empty strong { color: var(--text); }

/* Suggestions */
.suggestions { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.suggestion-item {
    font-size: 13px; color: var(--text-muted); cursor: pointer;
    transition: color 0.15s; display: flex; align-items: center; gap: 6px;
}
.suggestion-item:hover { color: var(--accent-light); }
.suggestion-kamas { display: inline-flex; align-items: center; gap: 4px; }
.kamas-icon {
    width: 20px; height: 20px; border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800; color: #fff;
}

/* ── Résultats ────────────────────────────────────── */
.results-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.results-count { font-size: 14px; color: var(--text-muted); }
.results-count strong { color: var(--text); }

/* Table */
.offers-table {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
}
.offers-head {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr 1fr 1fr 1fr 0.8fr 120px;
    padding: 12px 20px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-dim);
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted);
}
.offer-row {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr 1fr 1fr 1fr 0.8fr 120px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-dim);
    align-items: center; transition: background 0.15s; cursor: default;
}
.offer-row:last-child { border-bottom: none; }
.offer-row:hover { background: var(--bg-hover); }

.offer-seller { display: flex; align-items: center; gap: 10px; }
.offer-avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
}
.offer-name { font-size: 14px; font-weight: 600; color: var(--text); }
.offer-txcount { font-size: 11px; color: var(--text-muted); }

.offer-server-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.2);
    border-radius: 6px; padding: 4px 10px; font-size: 12px;
    font-weight: 600; color: var(--accent-light);
}
.offer-qty { font-size: 15px; font-weight: 700; color: var(--text); }
.offer-qty span { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.offer-ppm { font-size: 14px; font-weight: 600; color: var(--accent-light); }
.offer-total { font-size: 15px; font-weight: 700; color: #22c55e; }
.offer-rating { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.offer-rating .star-on { color: #f59e0b; }
.offer-rating .star-off { color: var(--border); }
.offer-new { font-size: 11px; color: var(--text-muted); }

.btn-contact {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; background: var(--accent);
    color: #fff; border: none; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; font-family: var(--font);
    cursor: pointer; transition: all 0.2s; text-decoration: none;
    box-shadow: 0 0 12px rgba(124,58,237,0.25);
}
.btn-contact:hover { background: var(--accent2); color: #fff; transform: translateY(-1px); }

/* Skeleton rows */
.offer-skeleton {
    height: 68px; background: var(--bg-elevated);
    animation: sk-pulse 1.5s ease-in-out infinite;
    border-bottom: 1px solid var(--border-dim);
}
@keyframes sk-pulse { 0%,100%{opacity:.5} 50%{opacity:1} }

/* ── Pagination ───────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.page-btn {
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-dim); font-size: 13px; cursor: pointer; transition: all 0.15s;
    font-family: var(--font);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent-light); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Modals ───────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px); z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 16px; border-bottom: 1px solid var(--border-dim);
}
.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px; transition: all 0.15s; }
.modal-close:hover { color: var(--text); background: var(--bg-hover); }
.modal-body { padding: 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.info-banner {
    background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.25);
    border-radius: var(--radius-sm); padding: 12px 14px;
    font-size: 13px; color: var(--text-dim); margin-bottom: 20px;
    display: flex; align-items: flex-start; gap: 8px; line-height: 1.5;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-dim); margin-bottom: 6px; }
.form-input {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    padding: 10px 12px; font-size: 14px; font-family: var(--font); transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block; }
.form-hint.error { color: var(--error); }
.total-preview { font-size: 13px; color: var(--text-muted); white-space: nowrap; padding: 0 4px; }
.total-preview strong { color: #22c55e; font-size: 15px; }

/* ── Footer ───────────────────────────────────────── */
.market-footer {
    border-top: 1px solid var(--border-dim);
    padding: 20px 0;
    font-size: 13px; color: var(--text-muted);
}
.market-footer .market-container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); transition: color 0.15s; }
.footer-links a:hover { color: var(--accent-light); }

/* ── Navbar extras ────────────────────────────────── */
.nav-icon-btn {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius-sm);
    color: var(--text-dim); transition: all 0.2s; border: 1px solid var(--border);
    text-decoration: none;
}
.nav-icon-btn:hover { color: var(--text); border-color: var(--accent); background: rgba(124,58,237,0.1); }
.nav-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--error); color: #fff; border-radius: 100px;
    font-size: 9px; font-weight: 700; padding: 1px 5px; min-width: 16px; text-align: center;
}

/* ── Listing / Messages / Seller pages ────────────── */
.breadcrumb-bar { background: var(--bg-dark); border-bottom: 1px solid var(--border-dim); padding: 12px 0; }
.breadcrumb-bar .container { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-muted); }
.breadcrumb-bar a { color: var(--accent-light); }

/* Chat bubbles */
.chat-msg { max-width: 80%; }
.chat-msg.mine { align-self: flex-end; }
.chat-msg.theirs { align-self: flex-start; }
.chat-bubble { padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.chat-msg.mine .chat-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.theirs .chat-bubble { background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border-dim); border-bottom-left-radius: 4px; }
.chat-msg-meta { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.chat-msg.mine .chat-msg-meta { text-align: right; }

/* Messages page */
.messages-main { padding: 40px 0 80px; min-height: 80vh; }
.messages-layout { display: grid; grid-template-columns: 300px 1fr 260px; gap: 20px; height: calc(100vh - 180px); min-height: 500px; }
.conv-sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.conv-header { padding: 16px 20px 12px; border-bottom: 1px solid var(--border-dim); display: flex; align-items: center; justify-content: space-between; }
.conv-header h2 { font-size: 16px; font-weight: 700; }
.conv-count { background: var(--accent); color: #fff; border-radius: 100px; font-size: 11px; font-weight: 600; padding: 2px 8px; }
.conv-search { padding: 10px 16px; border-bottom: 1px solid var(--border-dim); display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.conv-search input { flex: 1; background: none; border: none; color: var(--text); font-size: 13px; font-family: var(--font); }
.conv-search input:focus { outline: none; }
.conv-list { flex: 1; overflow-y: auto; }
.conv-item { padding: 14px 16px; cursor: pointer; transition: background 0.15s; border-bottom: 1px solid var(--border-dim); display: flex; gap: 10px; }
.conv-item:hover { background: var(--bg-hover); }
.conv-item.active { background: rgba(124,58,237,0.1); border-left: 2px solid var(--accent); }
.conv-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-preview { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv-item.unread .conv-preview { color: var(--text); font-weight: 500; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conv-time { font-size: 11px; color: var(--text-muted); }
.conv-unread-badge { background: var(--accent); color: #fff; border-radius: 100px; font-size: 10px; font-weight: 700; padding: 1px 6px; }
.conv-skeleton { height: 72px; background: var(--bg-hover); animation: sk-pulse 1.5s infinite; border-bottom: 1px solid var(--border-dim); }
.chat-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.chat-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); gap: 12px; font-size: 14px; }
#chat-active { display: flex; flex-direction: column; height: 100%; }
.chat-section-header { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border-dim); }
.back-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: 6px; display: none; }
.peer-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.peer-name { font-size: 14px; font-weight: 600; }
.peer-listing { font-size: 12px; color: var(--text-muted); }
.chat-section-header .btn-ghost { margin-left: auto; }
.chat-messages-full { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-dim); }
.chat-input { flex: 1; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); padding: 10px 12px; font-size: 13px; font-family: var(--font); resize: none; min-height: 40px; max-height: 120px; transition: border-color 0.2s; }
.chat-input:focus { outline: none; border-color: var(--accent); }
.chat-send-btn { width: 40px; height: 40px; flex-shrink: 0; background: var(--accent); border: none; border-radius: var(--radius-sm); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.chat-send-btn:hover { background: var(--accent2); }
.tx-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.tx-header { padding: 16px 20px 12px; border-bottom: 1px solid var(--border-dim); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tx-list { padding: 12px; overflow-y: auto; max-height: calc(100% - 50px); display: flex; flex-direction: column; gap: 10px; }
.tx-empty { text-align: center; padding: 24px 12px; color: var(--text-muted); font-size: 13px; }
.tx-card { background: var(--bg-elevated); border: 1px solid var(--border-dim); border-radius: var(--radius); padding: 12px; font-size: 12px; }
.tx-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tx-card-server { font-weight: 600; font-size: 13px; }
.tx-status { padding: 2px 8px; border-radius: 100px; font-size: 10px; font-weight: 700; }
.tx-status.pending { background: rgba(245,158,11,0.15); color: #f59e0b; }
.tx-status.in_progress { background: rgba(124,58,237,0.15); color: var(--accent-light); }
.tx-status.completed { background: rgba(34,197,94,0.15); color: #22c55e; }
.tx-status.cancelled { background: rgba(239,68,68,0.15); color: var(--error); }
.tx-card-detail { color: var(--text-dim); margin-bottom: 4px; }
.tx-card-price { font-weight: 700; color: #22c55e; }
.btn-review { margin-top: 8px; width: 100%; padding: 6px; background: rgba(124,58,237,0.12); border: 1px solid rgba(124,58,237,0.3); border-radius: var(--radius-sm); color: var(--accent-light); font-size: 12px; cursor: pointer; transition: all 0.2s; }
.btn-review:hover { background: var(--accent); color: #fff; }

/* Star rating modal */
.star-rating { display: flex; justify-content: center; gap: 6px; }
.star { font-size: 32px; color: var(--border); background: none; border: none; cursor: pointer; transition: color 0.15s; line-height: 1; padding: 0; }
.star.active { color: #f59e0b; }

/* Listing page */
.listing-main { padding: 40px 0 80px; }
.listing-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.listing-details { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.listing-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.detail-stat { background: var(--bg-elevated); border: 1px solid var(--border-dim); border-radius: var(--radius); padding: 14px; }
.detail-stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.detail-stat-value { font-size: 20px; font-weight: 700; }
.detail-stat-value.green { color: #22c55e; }
.detail-stat-value.purple { color: var(--accent-light); }
.listing-chat-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; position: sticky; top: 80px; display: flex; flex-direction: column; }
.chat-header { display: flex; align-items: center; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--border-dim); font-size: 14px; font-weight: 600; }
.chat-messages { flex: 1; padding: 16px; min-height: 240px; max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: auto; }
.chat-input-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-dim); }
.chat-login-prompt { padding: 12px 16px; border-top: 1px solid var(--border-dim); text-align: center; }
.chat-own-listing { padding: 12px 16px; border-top: 1px solid var(--border-dim); text-align: center; }
.middleman-section { padding: 14px 16px; border-top: 1px solid var(--border-dim); }
.middleman-card { display: flex; align-items: flex-start; gap: 10px; background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.2); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.middleman-icon { color: #22c55e; flex-shrink: 0; }
.middleman-title { font-size: 13px; font-weight: 600; color: #22c55e; }
.middleman-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.price-preview-badge { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 16px; font-weight: 700; color: #22c55e; min-height: 42px; display: flex; align-items: center; }
.w-100 { width: 100%; justify-content: center; }
.listing-skeleton-full { height: 380px; background: var(--bg-elevated); border-radius: var(--radius-lg); animation: sk-pulse 1.5s infinite; }
.listing-desc { background: var(--bg-elevated); border: 1px solid var(--border-dim); border-radius: var(--radius); padding: 14px; font-size: 14px; color: var(--text-dim); line-height: 1.6; margin-top: 16px; }
.seller-card { background: var(--bg-elevated); border: 1px solid var(--border-dim); border-radius: var(--radius); padding: 14px; margin-top: 16px; display: flex; align-items: center; justify-content: space-between; text-decoration: none; }
.seller-card:hover { border-color: var(--accent); }
.seller-card-info { display: flex; align-items: center; gap: 12px; }
.seller-card-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.seller-card-name { font-size: 14px; font-weight: 600; color: var(--text); }
.seller-card-stats { font-size: 12px; color: var(--text-muted); }

/* Seller page */
.seller-main { padding: 40px 0 80px; }
.seller-profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 28px; }
.seller-profile-header { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.seller-big-avatar { width: 68px; height: 68px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-light)); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: #fff; flex-shrink: 0; }
.seller-big-name { font-size: 24px; font-weight: 800; }
.seller-big-since { font-size: 13px; color: var(--text-muted); }
.seller-big-stats { margin-left: auto; display: flex; gap: 24px; }
.seller-big-stat { text-align: center; }
.seller-big-stat-val { font-size: 22px; font-weight: 700; }
.seller-big-stat-val.green { color: #22c55e; }
.seller-big-stat-lbl { font-size: 12px; color: var(--text-muted); }
.seller-content { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.reviews-list { display: flex; flex-direction: column; gap: 10px; }
.review-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.review-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.review-author { font-size: 13px; font-weight: 600; }
.review-date { font-size: 11px; color: var(--text-muted); }
.review-stars { color: #f59e0b; font-size: 14px; margin-bottom: 4px; }
.review-comment { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.listings-empty { text-align: center; padding: 32px; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.seller-skeleton-header { height: 110px; background: var(--bg-elevated); border-radius: var(--radius); animation: sk-pulse 1.5s infinite; }
.review-skeleton { height: 80px; background: var(--bg-elevated); border-radius: var(--radius); animation: sk-pulse 1.5s infinite; }

/* Listing card (pour seller page) */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.listing-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; cursor: pointer; transition: all 0.2s; text-decoration: none; display: block; }
.listing-card:hover { border-color: rgba(124,58,237,0.4); transform: translateY(-2px); }
.listing-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.listing-server-badge { display: inline-flex; align-items: center; gap: 5px; background: rgba(124,58,237,0.1); border: 1px solid rgba(124,58,237,0.2); border-radius: 100px; padding: 3px 10px; font-size: 11px; font-weight: 600; color: var(--accent-light); }
.listing-qty { font-size: 26px; font-weight: 800; }
.listing-qty span { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.listing-price-row { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; }
.listing-ppm { font-size: 13px; color: var(--text-dim); }
.listing-ppm strong { color: var(--accent-light); }
.listing-total { font-size: 14px; font-weight: 700; color: #22c55e; }
.listing-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-dim); }
.listing-seller { display: flex; align-items: center; gap: 8px; }
.seller-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.seller-name { font-size: 12px; font-weight: 500; }
.listing-age { font-size: 11px; color: var(--text-muted); }

/* Modal success */
.modal-success-icon { text-align: center; margin-bottom: 14px; color: #22c55e; }
.modal-success-icon + h3 { text-align: center; font-size: 18px; margin-bottom: 8px; }
.modal-success-icon + h3 + p { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 20px; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 860px) {
    .search-fields { grid-template-columns: 1fr 1fr; }
    .search-field-qty { grid-column: span 2; }
    .offers-head { display: none; }
    .offer-row { grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px 16px; }
    .offer-row > span:nth-child(7) { grid-column: span 2; }
    .listing-layout { grid-template-columns: 1fr; }
    .listing-chat-panel { position: static; }
    .messages-layout { grid-template-columns: 1fr; position: relative; }
    .chat-section { position: absolute; inset: 0; transform: translateX(100%); transition: transform 0.3s; z-index: 10; }
    .chat-section.mobile-open { transform: translateX(0); }
    .back-btn { display: flex !important; }
    .tx-panel { display: none; }
    .seller-content { grid-template-columns: 1fr; }
    .seller-big-stats { margin-left: 0; width: 100%; justify-content: space-around; }
}
@media (max-width: 560px) {
    .search-fields { grid-template-columns: 1fr; }
    .search-field-qty { grid-column: span 1; }
    .market-title-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .form-row-2 { grid-template-columns: 1fr; }
    .footer-links { flex-wrap: wrap; gap: 12px; }
    .offers-head { display: none; }
    .offer-row { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; gap: 8px; padding: 16px; }
    .offer-row > div:nth-child(1) { grid-column: 1 / -1; }
    .offer-row > div:nth-child(7) { grid-column: 1 / -1; }
    .results-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ── Stats bar ─────────────────────────────────────── */
.stat-pill { font-size: 13px; color: var(--text-dim); }
.stat-pill strong { color: var(--accent-light); font-weight: 700; }
.stat-sep { color: var(--border); font-size: 16px; }

/* ── Badges offres ────────────────────────────────── */
.badge-best-price {
    display: inline-flex; align-items: center;
    background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.3);
    color: #22c55e; font-size: 10px; font-weight: 700;
    padding: 2px 6px; border-radius: 4px; margin-right: 4px;
    text-transform: uppercase; letter-spacing: .04em;
}
.badge-confirmed {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(124,58,237,.2); border: 1px solid rgba(124,58,237,.4);
    color: var(--accent-light); font-size: 10px; font-weight: 700;
    width: 16px; height: 16px; border-radius: 50%; margin-left: 4px;
    cursor: default;
}
.offer-age { color: var(--text-muted); font-size: 11px; }

/* ── Calc match highlight ─────────────────────────── */
.offer-row.calc-match {
    background: rgba(124,58,237,.07);
    border-color: rgba(124,58,237,.3);
}

/* ── Hover amélioré ───────────────────────────────── */
.offer-row {
    transition: background .15s, transform .1s, border-color .15s;
}
.offer-row:hover {
    transform: translateX(2px);
    border-color: rgba(124,58,237,.25) !important;
}

/* ── Toast ────────────────────────────────────────── */
.mkt-toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    padding: 12px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 600;
    transform: translateY(20px); opacity: 0;
    transition: all .25s; pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.mkt-toast.show { transform: translateY(0); opacity: 1; }
.mkt-toast-info    { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); }
.mkt-toast-success { background: rgba(5,150,105,.15); border: 1px solid rgba(5,150,105,.3); color: #34d399; }
.mkt-toast-warn    { background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.3); color: #fbbf24; }
.mkt-toast-error   { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.25); color: #f87171; }

/* ── Search btn loading ───────────────────────────── */
.search-btn.btn-loading { opacity: .7; cursor: not-allowed; }
.search-btn.btn-loading::after {
    content: ''; display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
    border-radius: 50%; animation: spin .7s linear infinite; margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Results header responsive ────────────────────── */
.results-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; gap: 12px; flex-wrap: wrap;
}
