/**
 * Squelette de structure — réseau Kawadema Network
 * Affiché pendant le chargement / navigation (header reste visible).
 */

.network-page-skeleton {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 40;
    min-height: calc(100vh - 64px);
    padding: 1rem 0.75rem 2rem;
    background: var(--gray-50, #f9fafb);
    box-sizing: border-box;
}

.network-page-skeleton.is-visible {
    display: block;
    animation: nps-fade-in 0.2s ease-out;
}

.network-page-skeleton.is-leaving {
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

body.network-page.network-page--booting .main-container > *:not(#network-page-skeleton) {
    opacity: 0 !important;
    pointer-events: none !important;
}

body.network-page.network-page--booting {
    cursor: wait;
}

.nps-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 1024px) {
    body.home-page:not(.guest-feed) .network-page-skeleton[data-nps-variant="feed"] .nps-layout {
        grid-template-columns: 240px 1fr 240px;
        gap: 0.75rem;
    }
}

.nps-side {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    body.home-page:not(.guest-feed) .network-page-skeleton[data-nps-variant="feed"] .nps-side {
        display: flex;
    }
}

.nps-panel,
.nps-card {
    background: #fff;
    border: 1px solid var(--gray-200, #e5e7eb);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.nps-feed {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

.nps-bone {
    display: block;
    border-radius: 8px;
    background: linear-gradient(
        90deg,
        #e8edf4 0%,
        #f3f6fa 45%,
        #e8edf4 90%
    );
    background-size: 200% 100%;
    animation: nps-shimmer 1.15s ease-in-out infinite;
}

.nps-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nps-line {
    height: 12px;
    width: 100%;
}

.nps-line--sm { height: 10px; width: 42%; }
.nps-line--md { height: 12px; width: 68%; }
.nps-line--lg { height: 14px; width: 88%; }
.nps-line--title { height: 18px; width: 55%; margin-bottom: 0.35rem; }

.nps-media {
    height: 180px;
    width: 100%;
    margin-top: 0.85rem;
    border-radius: 10px;
}

.nps-card__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.nps-card__meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.nps-card__actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.nps-chip {
    height: 28px;
    width: 72px;
    border-radius: 999px;
}

.nps-panel .nps-line + .nps-line {
    margin-top: 0.55rem;
}

.nps-composer {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.nps-composer .nps-bone:last-child {
    flex: 1;
    height: 40px;
    border-radius: 999px;
}

.nps-page-title {
    height: 22px;
    width: min(280px, 55%);
    margin-bottom: 1rem;
}

.nps-toolbar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.nps-hint {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--primary-500, #1F3A5F);
    opacity: 0.85;
}

@keyframes nps-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@keyframes nps-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .nps-bone { animation: none; }
    .network-page-skeleton.is-visible { animation: none; }
}
