/* ==========================================================================
   EPIM Afrique — Knowledge Hub & Campus Digital Design System
   Anti-slop editorial styling for:
   - /knowledge-hub/ela
   - /knowledge-hub/rami
   - /ressources-analyses
   - /intranet
   - /digital-campus
   ========================================================================== */

/* ── Hero éditorial sobre ──────────────────────────────────────────────── */

.kc-hero {
    position: relative;
    padding: 3.5rem 0 3rem;
    background: #f8fafc;
    border-top: 1px solid rgba(15, 59, 99, 0.08);
    border-bottom: 1px solid rgba(15, 59, 99, 0.08);
}

.kc-hero--navy {
    background: #0b2545;
    color: #ffffff;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kc-hero-kicker {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color, #0f3b63);
    margin-bottom: 0.85rem;
    display: inline-block;
}

.kc-hero--navy .kc-hero-kicker {
    color: #d4af37;
}

.kc-hero-title {
    font-size: clamp(2rem, 4vw, 3.1rem);
    font-weight: 800;
    line-height: 1.15;
    color: #0b2545;
    letter-spacing: -0.025em;
    margin-bottom: 1.15rem;
}

.kc-hero--navy .kc-hero-title {
    color: #ffffff;
}

.kc-hero-lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #475569;
    max-width: 780px;
    margin-bottom: 1.75rem;
}

.kc-hero--navy .kc-hero-lead {
    color: #cbd5e1;
}

.kc-hero-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

/* ── Cartes éditoriales & piliers ──────────────────────────────────────── */

.kc-card {
    background: #ffffff;
    border: 1px solid rgba(15, 59, 99, 0.12);
    border-radius: 12px;
    padding: 1.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kc-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 59, 99, 0.28);
    box-shadow: 0 8px 24px rgba(15, 59, 99, 0.08);
}

.kc-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(15, 59, 99, 0.06);
    color: #0f3b63;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1.15rem;
    flex-shrink: 0;
}

.kc-card-step {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #0f3b63;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.kc-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0b2545;
    margin-bottom: 0.65rem;
    line-height: 1.35;
}

.kc-card-desc {
    font-size: 0.94rem;
    line-height: 1.65;
    color: #475569;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

/* ── Barre d'ancrage / Navigation de collection ───────────────────────── */

.kc-nav-strip {
    background: #ffffff;
    border-bottom: 1px solid rgba(15, 59, 99, 0.1);
    padding: 0.85rem 0;
    position: sticky;
    top: 72px;
    z-index: 10;
}

.kc-nav-strip-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.kc-nav-strip-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    background: #f1f5f9;
    transition: background 0.15s ease, color 0.15s ease;
}

.kc-nav-strip-link:hover,
.kc-nav-strip-link.active {
    background: #0f3b63;
    color: #ffffff;
}

/* ── Catalogue d'articles / ressources ─────────────────────────────────── */

.kc-resource-card {
    background: #ffffff;
    border: 1px solid rgba(15, 59, 99, 0.12);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kc-resource-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 59, 99, 0.28);
    box-shadow: 0 8px 24px rgba(15, 59, 99, 0.08);
}

.kc-resource-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #eef2f7;
    overflow: hidden;
}

.kc-resource-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.kc-resource-card:hover .kc-resource-media img {
    transform: scale(1.02);
}

.kc-resource-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b2545 0%, #0f3b63 100%);
    color: #d4af37;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.kc-resource-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(11, 37, 69, 0.88);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.22rem 0.65rem;
    border-radius: 6px;
}

.kc-resource-content {
    padding: 1.35rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.kc-resource-meta {
    font-size: 0.78rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.75rem;
}

.kc-resource-title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.35;
    color: #0b2545;
    margin-bottom: 0.45rem;
}

.kc-resource-author {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 0.65rem;
    font-style: italic;
}

.kc-resource-summary {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kc-resource-action {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f3b63;
    text-decoration: none;
    margin-top: auto;
}

.kc-resource-action:hover {
    color: #0b2545;
    text-decoration: underline;
}

/* ── Section collection ────────────────────────────────────────────────── */

.kc-collection-section {
    padding: 3.5rem 0;
    border-bottom: 1px solid rgba(15, 59, 99, 0.08);
}

.kc-collection-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.kc-collection-title-wrap h2 {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0b2545;
    margin-bottom: 0.4rem;
}

.kc-collection-desc {
    font-size: 0.95rem;
    color: #64748b;
    max-width: 680px;
    margin-bottom: 0;
}

.kc-collection-more {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f3b63;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.kc-collection-more:hover {
    text-decoration: underline;
}

/* ── Bannière d'action éditoriale ──────────────────────────────────────── */

.kc-cta {
    background: #0b2545;
    color: #ffffff;
    border-radius: 14px;
    padding: 2.75rem 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.kc-cta-title {
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.65rem;
}

.kc-cta-desc {
    font-size: 1rem;
    line-height: 1.65;
    color: #cbd5e1;
    margin-bottom: 0;
    max-width: 650px;
}

/* ── SharePoint & Intranet ─────────────────────────────────────────────── */

.kc-portal-banner {
    background: #ffffff;
    border: 1px solid rgba(15, 59, 99, 0.14);
    border-radius: 14px;
    padding: 2.25rem;
    margin-bottom: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.kc-portal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0b2545;
    margin-bottom: 0.4rem;
}

.kc-portal-desc {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 0;
    max-width: 620px;
}

.kc-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: #e6f6ed;
    color: #14713d;
}

.kc-status-pill::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #16a34a;
}

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 767.98px) {
    .kc-hero {
        padding: 2.5rem 0 2rem;
    }
    .kc-cta {
        padding: 2rem 1.5rem;
    }
    .kc-portal-banner {
        padding: 1.5rem;
    }
}

/* ── Helpers de mise en page (remplacement utilitaires purgés) ─────────── */
.kc-card-meta-line {
    border-top: 1px solid rgba(15, 59, 99, 0.08);
    padding-top: 0.65rem;
    margin-top: auto;
}

.kc-card-action-bar {
    border-top: 1px solid rgba(15, 59, 99, 0.08);
    padding-top: 0.85rem;
    margin-top: auto;
}

.kc-list-clean {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.kc-logo-box {
    display: inline-block;
}

.kc-icon-gap {
    margin-left: 0.35rem;
}

.kc-section-spacer {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.kc-section-divider {
    border-top: 1px solid rgba(15, 59, 99, 0.08);
    padding-top: 3rem;
}

.kc-nav-strip-label {
    display: none;
}

@media (min-width: 768px) {
    .kc-nav-strip-label {
        display: inline;
    }
}

