/* ============================================================
   marketplacepage.css — Page publique marketplace
   Style inspiré de X (ex-Twitter) : fond sombre, typographie
   propre, cartes produit légères sur fond blanc.
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
body.mp-public-page {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
}

/* ── Banner ───────────────────────────────────────────────── */
.mp-public-cover {
    width: 100%;
    height: 150px;
    background-color: #333;
    overflow: hidden;
    position: relative;
}

.mp-public-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Body Container ───────────────────────────────────────── */
.mp-public-body {
    padding: 0 15px;
    position: relative;
}

/* ── Profile Header : avatar + bouton ────────────────────── */
.mp-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: -45px; /* chevauchement avatar / bannière */
    margin-bottom: 15px;
}

.mp-public-profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px solid #000;
    overflow: hidden;
    background: #000;
}

.mp-public-avatar-inline {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mp-btn-edit {
    border: 1px solid #536471;
    background: transparent;
    color: white;
    padding: 8px 16px;
    border-radius: 9999px;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
}

/* ── Infos de la page ─────────────────────────────────────── */
.mp-info-section h1 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
}

.mp-handle {
    color: #71767b;
    font-size: 15px;
    margin-bottom: 12px;
}

.mp-bio {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.mp-link-blue {
    color: #1d9bf0;
    text-decoration: none;
}

/* ── Description dépliable ────────────────────────────────── */
.mp-description-block {
    color: #1d9bf0;
}

.mp-description-summary {
    list-style: none;
    cursor: pointer;
}

.mp-description-summary::-webkit-details-marker {
    display: none;
}

.mp-description-more-label {
    font-size: 13px;
    opacity: 0.75;
    margin-left: 4px;
}

/* ── Métadonnées (localisation, date…) ───────────────────── */
.mp-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #71767b;
    font-size: 14px;
    margin-bottom: 12px;
}

.mp-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Stats (abonnés…) ─────────────────────────────────────── */
.mp-stats-row {
    display: flex;
    gap: 20px;
    font-size: 14px;
    padding-bottom: 15px;
    border-bottom: 1px solid #2f3336;
}

.mp-stats-row span {
    color: #fff;
    font-weight: bold;
}

.mp-stats-row label {
    color: #71767b;
}

/* ── Onglets ──────────────────────────────────────────────── */
.mp-tabs {
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid #2f3336;
}

.mp-tab {
    padding: 15px 0;
    color: #71767b;
    font-weight: bold;
    position: relative;
}

.mp-tab.active {
    color: #fff;
}

.mp-tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #1d9bf0;
    border-radius: 2px;
}

/* ── Grille produits ──────────────────────────────────────── */
.mp-feed-wrap {
    max-width: 760px;
    margin: 12px auto 24px;
    padding: 0 14px;
}

#mp-feed-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

@media (min-width: 768px) {
    #mp-feed-container {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }
}

.mp-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #9ca3af;
    font-size: 13px;
    margin-bottom: 10px;
}

/* ── Carte produit ────────────────────────────────────────── */
.mp-feed-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 8px;
    overflow: visible;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mp-feed-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.mp-feed-media {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f5f6f7;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.mp-feed-empty-media {
    width: 100%;
    aspect-ratio: 9 / 14;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    background: #151718;
}

.mp-feed-body {
    padding: 5px 6px 6px;
}

.mp-feed-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.mp-feed-title {
    margin: 0;
    color: #1f2937;
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-feed-meta {
    margin-top: 4px;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
}

.mp-feed-shared {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1d4ed8;
    font-size: 8px;
    font-weight: 600;
}

.mp-feed-actions {
    margin-top: 8px;
}

.mp-feed-nav-btn,
.mp-feed-open-btn {
    border-radius: 8px;
    border: 1px solid #dbeafe;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 6px 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
}

.mp-feed-nav-btn.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.mp-feed-empty {
    background: #0f0f10;
    border: 1px solid #2f3336;
    border-radius: 14px;
    padding: 20px;
    color: #9ca3af;
    text-align: center;
}

/* ── Loader infinite scroll ───────────────────────────────── */
.mp-loader-wrap {
    display: none;
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

.mp-loader-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #1d9bf0;
    border-radius: 50%;
    border-top-color: transparent;
    animation: mp-spin 0.8s linear infinite;
}

.mp-loader-label {
    margin-top: 1rem;
    color: #71767b;
    font-size: 14px;
}

@keyframes mp-spin {
    to { transform: rotate(360deg); }
}

/* ── Responsive mobile ────────────────────────────────────── */
@media (max-width: 768px) {
    .mp-feed-wrap {
        padding: 0 10px;
        margin-top: 8px;
    }

    .mp-feed-media,
    .mp-feed-empty-media {
        aspect-ratio: 9 / 13;
    }

    .mp-feed-actions {
        flex-wrap: wrap;
    }

    .mp-feed-open-btn,
    .mp-feed-nav-btn {
        flex: 1 1 calc(50% - 4px);
        text-align: center;
    }
}
