/* =====================================================
   JOBSTATION — OPPORTUNITY FEED
   DESKTOP / TABLETTE / MOBILE
===================================================== */

.opportunity-feed {
    width: 100%;
    padding: 72px 0;
    background: #F5F7FB;
}

.opportunity-feed,
.opportunity-feed * {
    box-sizing: border-box;
}

.opportunity-feed .container {
    width: 100%;
    min-width: 0;
}

/* ---------- EN-TÊTE ---------- */

.opportunity-feed .section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.opportunity-feed .section-header > div {
    min-width: 0;
}

.opportunity-feed .section-header h2 {
    margin: 8px 0;
    color: #0B1930;
    font-size: clamp(24px, 2.5vw, 34px);
    line-height: 1.2;
}

.opportunity-feed .section-header p {
    margin: 0;
    color: #64748B;
    line-height: 1.6;
}

.opportunity-feed .view-all {
    flex: 0 0 auto;
    color: #FF7900;
    font-weight: 700;
    text-decoration: none;
}

/* ---------- FILTRES ---------- */

.opportunity-feed .feed-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 28px;
    padding: 0;
    min-width: 0;
}

.opportunity-feed .feed-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 9px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    background: #FFFFFF;
    color: #475569;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
}

.opportunity-feed .feed-tabs button:hover {
    border-color: #FF7900;
    color: #FF7900;
}

.opportunity-feed .feed-tabs button.active {
    border-color: #FF7900;
    background: #FF7900;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(255,121,0,.18);
}

.opportunity-feed .feed-tabs button:focus-visible {
    outline: 3px solid rgba(255,121,0,.28);
    outline-offset: 3px;
}

/* ---------- FEED + SIDEBAR ---------- */

.opportunity-feed .feed-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(250px, .85fr);
    align-items: start;
    gap: 28px;
    width: 100%;
    min-width: 0;
}

.opportunity-feed .feed-content {
    width: 100%;
    min-width: 0;
}

/* ---------- GRILLE DES OPPORTUNITÉS ---------- */

.opportunity-feed #latestGrid,
.opportunity-feed .latest-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.opportunity-feed #latestGrid > .opportunity-card,
.opportunity-feed .latest-grid > .opportunity-card {
    width: 100%;
    min-width: 0;
    max-width: none;
}

/* ---------- SIDEBAR ---------- */

.opportunity-feed .feed-sidebar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.opportunity-feed .sidebar-widget {
    width: 100%;
    min-width: 0;
    padding: 22px;
    border: 1px solid #E8EDF4;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
}

.opportunity-feed .sidebar-widget h3 {
    margin: 0 0 12px;
    color: #0B1930;
    font-size: 18px;
}

.opportunity-feed .sidebar-widget p {
    margin: 0 0 16px;
    color: #64748B;
    font-size: 14px;
    line-height: 1.6;
}

.opportunity-feed .sidebar-widget img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* ---------- TABLETTE ---------- */

@media (max-width: 900px) {

    .opportunity-feed {
        padding: 60px 0;
    }

    .opportunity-feed .feed-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }

    .opportunity-feed .feed-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

/* ---------- MOBILE ---------- */

@media (max-width: 600px) {

    .opportunity-feed {
        padding: 45px 0;
    }

    .opportunity-feed .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 22px;
    }

    .opportunity-feed #latestGrid,
    .opportunity-feed .latest-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .opportunity-feed .feed-sidebar {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .opportunity-feed .sidebar-widget {
        padding: 18px;
    }

    .opportunity-feed .feed-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding: 3px 2px 10px;
        margin-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .opportunity-feed .feed-tabs button {
        min-height: 36px;
        padding: 9px 13px;
        font-size: 12px;
        white-space: nowrap;
    }
}

/* ---------- ACCESSIBILITÉ ---------- */

@media (prefers-reduced-motion: reduce) {
    .opportunity-feed .feed-tabs button {
        transition: none;
    }
}