/**
 * NovaPress Users — nova-users.css
 * Styles passe-partout pour la page de profil public.
 * Hérite des couleurs du thème actif — zéro couleur forcée.
 * Zéro !important — jamais.
 * Préfixe : nova-user-
 *
 * NP-CHANTIER 2026-08-26 : la gestion des membres est passée en back-office.
 * Les règles d'édition de profil, d'outils d'admin et d'annuaire ont été
 * déplacées vers wp-content/plugins/novamembers/admin/css/novamembers-admin.css.
 * Les règles mortes (NovaFeed : follow/social-counts, signature de forum,
 * toggle modérateur) ont été supprimées. Ce fichier ne sert plus qu'à
 * l'affichage en lecture seule de /members/{slug}/.
 *
 * @package NovaPress
 * @since 8.6
 */


/* ============================================================
   1. CSS VARIABLES — fallbacks neutres, écrasées par le thème
   ============================================================ */

:root {
    --nova-user-radius: 8px;
    --nova-user-gap: 1.25rem;
    --nova-user-avatar-size: 120px;
    --nova-user-avatar-size-mobile: 88px;
    --nova-user-max-width: 780px;
    --nova-user-border-color: rgba(128, 128, 128, 0.15);
    --nova-user-bg-subtle: rgba(128, 128, 128, 0.04);
    --nova-user-text-muted: rgba(128, 128, 128, 0.65);
}

/* ============================================================
   2. PROFILE — Container principal
   ============================================================ */

.nova-user-profile {
    max-width: var(--nova-user-max-width);
    margin: 2rem auto;
    padding: 1.5rem;
    background: #fff;
    border-radius: var(--nova-user-radius);
}

/* ============================================================
   3. PROFILE HEADER — Avatar + identité
   ============================================================ */

.nova-user-header {
    display: flex;
    align-items: flex-start;
    gap: var(--nova-user-gap);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--nova-user-border-color);
}

.nova-user-avatar {
    flex-shrink: 0;
    width: var(--nova-user-avatar-size);
    height: var(--nova-user-avatar-size);
    border-radius: 50%;
    object-fit: cover;
}

.nova-user-identity {
    flex: 1;
    min-width: 0;
}

.nova-user-display-name {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.25rem;
}

.nova-user-role {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15em 0.6em;
    border-radius: 3px;
    border: 1px solid var(--nova-user-border-color);
    color: inherit;
    opacity: 0.7;
}

.nova-user-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: inherit;
    opacity: 0.6;
}

.nova-user-meta-line span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* ============================================================
   4. BIO
   ============================================================ */

.nova-user-bio {
    padding: 1.25rem 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: break-word;
}

.nova-user-bio:empty {
    display: none;
}

/* ============================================================
   5. NETWORK — Website, Mastodon, Lemmy (icon-based)
   ============================================================ */

.nova-user-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
}

.nova-user-network {
    padding: 1rem 0;
    border-top: 1px solid var(--nova-user-border-color);
}

.nova-user-network-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nova-user-network-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.nova-user-network-item:hover {
    opacity: 1;
}

.nova-user-network-item img {
    border-radius: 4px;
}

/* ============================================================
   6. SECTIONS — Stats, Recent posts, etc.
   ============================================================ */

.nova-user-section {
    padding: 1.25rem 0;
    border-top: 1px solid var(--nova-user-border-color);
}

.nova-user-section-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem;
    opacity: 0.55;
}

/* ============================================================
   6b. BOOKS — la rangée de couvertures de l'auteur
   ============================================================ */

.nova-user-books-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* 5 / 8 = le ratio des couvertures NovaBook. Posé sur le lien : la case garde
   sa hauteur pendant le chargement, et une couverture manquante occupe
   exactement la même place qu'une autre. */
.nova-user-book {
    display: block;
    aspect-ratio: 5 / 8;
    overflow: hidden;
    border-radius: var(--nova-user-radius);
    background: var(--nova-user-bg-subtle);
    transition: transform 0.2s ease;
}

.nova-user-book:hover {
    transform: translateY(-3px);
}

.nova-user-book img,
.nova-user-book-empty {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================================
   7. STATS GRID — Topics, Replies, Comments, etc.
   ============================================================ */

.nova-user-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nova-user-stat {
    flex: 1 1 auto;
    min-width: 100px;
    padding: 0.75rem 1rem;
    border-radius: var(--nova-user-radius);
    background: var(--nova-user-bg-subtle);
    text-align: center;
}

.nova-user-stat-value {
    display: block;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
}

.nova-user-stat-label {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.15rem;
    opacity: 0.6;
}

/* ============================================================
   8. ACTIVITY LISTS — Recent topics, replies, comments
   ============================================================ */

.nova-user-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nova-user-activity-list li {
    padding: 0.5rem 0;
    font-size: 0.875rem;
    line-height: 1.4;
    border-bottom: 1px solid var(--nova-user-border-color);
}

.nova-user-activity-list li:last-child {
    border-bottom: none;
}

.nova-user-activity-list a {
    text-decoration: none;
}

.nova-user-activity-list a:hover {
    text-decoration: underline;
}

.nova-user-activity-date {
    font-size: 0.75rem;
    opacity: 0.5;
    margin-left: 0.5rem;
}

@media (max-width: 600px) {
    .nova-user-profile {
        padding: 1.5rem 0.75rem;
        margin: 0 auto;
        border-radius: 0;
    }

    .nova-user-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }

    .nova-user-avatar {
        width: var(--nova-user-avatar-size-mobile);
        height: var(--nova-user-avatar-size-mobile);
    }

    .nova-user-display-name {
        font-size: 1.25rem;
    }

    .nova-user-meta-line {
        justify-content: center;
    }

    .nova-user-books-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .nova-user-stats {
        gap: 0.5rem;
    }

    .nova-user-stat {
        min-width: 80px;
        padding: 0.6rem 0.75rem;
    }

    .nova-user-stat-value {
        font-size: 1.125rem;
    }
}
