/* assets/css/opportunites.css */

/* ── Type color map (CSS custom props) ─────────────────── */
:root {
    --c-appel: #0077b6;
    --c-finance: #00B894;
    --c-entrepr: #FF6B35;
    --c-projet: #7c3aed;
    --c-subv: #d97706;
    --c-autre: #6b7a8d;
}

/* ==================== HERO ==================== */
.opportunites-hero {
    position: relative;
    background: var(--text);
    padding: 64px 0 72px;
    overflow: hidden;
}

.opportunites-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 80% at 8% 55%, rgba(0, 119, 182, .15) 0%, transparent 65%),
        radial-gradient(ellipse 50% 70% at 90% 20%, rgba(0, 184, 148, .1) 0%, transparent 60%);
    pointer-events: none;
}

.opportunites-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: .6;
}

.opportunites-hero .container {
    position: relative;
    z-index: 2;
}

.hero-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: .8rem;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, .5);
    flex-wrap: wrap;
}

.hero-breadcrumb a {
    color: rgba(255, 255, 255, .6);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .2s;
}

.hero-breadcrumb a:hover {
    color: #fff;
}

.hero-breadcrumb .fa-chevron-right {
    font-size: .6rem;
    opacity: .4;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #60b4ff;
    background: rgba(0, 119, 182, .14);
    border: 1px solid rgba(0, 119, 182, .25);
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 14px;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.hero-title span {
    color: #60b4ff;
    background: linear-gradient(90deg, #60b4ff, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, .6);
    margin: 0;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    gap: 28px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-stat strong {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.hero-stat span {
    font-size: .75rem;
    color: rgba(255, 255, 255, .45);
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, .12);
    align-self: center;
}

/* ==================== BODY ==================== */
.opportunites-body {
    padding: 52px 0 100px;
    background: var(--bg-soft);
}

.opportunites-layout {
    display: grid;
    grid-template-columns: 1fr 308px;
    gap: 48px;
    align-items: start;
}

.opportunites-main-col {
    min-width: 0;
}

/* Toolbar */
.content-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.results-info {
    font-size: .875rem;
    color: var(--text-muted);
}

.results-info strong {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #0077b6;
}

/* Active filters */
.active-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 18px;
    background: rgba(0, 119, 182, .05);
    border: 1px solid rgba(0, 119, 182, .15);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.filters-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    flex-shrink: 0;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px;
    background: #0077b6;
    color: #fff;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
}

.filter-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    background: rgba(255, 255, 255, .25);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    font-size: .68rem;
    transition: all .18s;
}

.filter-remove:hover {
    background: rgba(255, 255, 255, .45);
    transform: rotate(90deg);
}

.clear-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    background: var(--bg-muted);
    color: var(--text-muted) !important;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none !important;
    margin-left: auto;
    transition: all .2s;
}

.clear-filters:hover {
    background: #e74c3c;
    color: #fff !important;
}

/* ==================== BANNER AD ==================== */
.opp-banner-ad {
    margin-bottom: 28px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    background: var(--bg-muted);
    transition: box-shadow .2s;
}

.opp-banner-ad:hover {
    box-shadow: var(--shadow-md);
}

.opp-banner-ad img {
    width: 100%;
    display: block;
    max-height: 100px;
    object-fit: cover;
}

.opp-banner-ad a {
    display: block;
    text-decoration: none !important;
}

/* ==================== OPPORTUNITES GRID ==================== */
.opportunites-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-bottom: 44px;
}

/* opp-card — maintenant <a> élément */
.opp-card {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit !important;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
    transition: all .32s var(--ease-spring);
    position: relative;
    overflow: hidden;
}

/* Accent line top */
.opp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--opp-color, #0077b6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease-out);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.opp-card:hover::before {
    transform: scaleX(1);
}

.opp-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

/* Header row */
.opp-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.opp-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    color: #fff;
    border-radius: 20px;
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    flex-shrink: 0;
}

.opp-deadline-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--bg-muted);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}

.opp-deadline-pill.urgent {
    background: rgba(220, 38, 38, .1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, .2);
    animation: urgentPulse 2s ease infinite;
}

@keyframes urgentPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .75;
    }
}

.opp-title {
    font-family: var(--font-display);
    font-size: 1.025rem;
    font-weight: 700;
    color: var(--text) !important;
    margin: 0 0 10px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.opp-card:hover .opp-title {
    color: #0077b6 !important;
}

.opp-organisme {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
}

.opp-organisme i {
    color: var(--primary);
    font-size: .78rem;
    flex-shrink: 0;
}

.opp-excerpt {
    font-size: .825rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0 0 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.opp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
    margin-bottom: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .77rem;
    color: var(--text-muted);
    font-weight: 500;
}

.meta-item i {
    color: #0077b6;
    font-size: .72rem;
}

/* opp-cta — now <span> inside <a.opp-card> */
.opp-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #0077b6 !important;
    font-weight: 600;
    font-size: .82rem;
    transition: gap .2s;
    margin-top: auto;
}

.opp-cta i {
    font-size: .75rem;
    transition: transform .2s;
}

.opp-cta:hover {
    gap: 11px;
}

.opp-cta:hover i {
    transform: translateX(3px);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 80px 24px;
}

.empty-state i {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
    color: var(--border);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
}

.empty-state p {
    font-size: .95rem;
    color: var(--text-muted);
    margin: 0 0 28px;
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    background: #0077b6;
    color: #fff !important;
    border-radius: 50px;
    font-weight: 600;
    font-size: .875rem;
    text-decoration: none !important;
    transition: all .22s var(--ease-spring);
    box-shadow: 0 4px 14px rgba(0, 119, 182, .25);
}

.btn-reset:hover {
    background: #005e8e;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 119, 182, .35);
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--bg);
    color: var(--text-muted) !important;
    border: 1.5px solid var(--border);
    border-radius: 50px;
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none !important;
    transition: all .22s;
}

.pagination-btn:hover {
    background: #0077b6;
    color: #fff !important;
    border-color: #0077b6;
    transform: translateY(-2px);
}

.pagination-numbers {
    display: flex;
    gap: 6px;
}

.pagination-number {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--text-muted) !important;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .875rem;
    text-decoration: none !important;
    transition: all .2s;
}

.pagination-number:hover {
    background: var(--bg-muted);
    color: #0077b6 !important;
    border-color: #0077b6;
    transform: translateY(-2px);
}

.pagination-number.active {
    background: #0077b6;
    color: #fff !important;
    border-color: #0077b6;
    box-shadow: 0 4px 12px rgba(0, 119, 182, .28);
}

.pagination-dots {
    display: flex;
    align-items: center;
    padding: 0 4px;
    color: var(--text-light);
    font-size: .875rem;
}

/* ==================== SIDEBAR ==================== */
.opportunites-sidebar {
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-search {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
}

.sidebar-search-form {
    display: flex;
    gap: 8px;
}

.sidebar-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: .875rem;
    font-weight: 400;
    font-family: var(--font-body);
    outline: none;
    background: var(--bg-soft);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}

.sidebar-search-input:focus {
    border-color: #0077b6;
    box-shadow: 0 0 0 3px rgba(0, 119, 182, .1);
    background: var(--bg);
}

.sidebar-search-btn {
    width: 40px;
    height: 40px;
    background: #0077b6;
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: .875rem;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-search-btn:hover {
    background: #005e8e;
    transform: scale(1.05);
}

.sidebar-widget {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
}

.widget-title {
    font-family: var(--font-display);
    font-size: .975rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #0077b6;
    border-radius: 2px;
}

.widget-title i {
    color: #0077b6;
    font-size: .875rem;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 11px;
    border-radius: var(--radius-sm);
    color: var(--text-muted) !important;
    font-weight: 500;
    font-size: .83rem;
    text-decoration: none !important;
    border: 1px solid transparent;
    transition: all .18s;
}

.filter-item:hover {
    background: var(--bg-soft);
    color: var(--text) !important;
    transform: translateX(3px);
}

.filter-item.active {
    background: rgba(0, 119, 182, .08);
    color: #0077b6 !important;
    border-color: rgba(0, 119, 182, .2);
}

.filter-item i {
    font-size: .75rem;
    flex-shrink: 0;
    width: 15px;
    text-align: center;
}

.filter-count {
    margin-left: auto;
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-light);
    background: var(--bg-muted);
    padding: 1px 7px;
    border-radius: 10px;
}

.filter-item.active .filter-count {
    background: rgba(0, 119, 182, .15);
    color: #0077b6;
}

.region-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 3px;
}

.region-scroll::-webkit-scrollbar {
    width: 3px;
}

.region-scroll::-webkit-scrollbar-track {
    background: var(--bg-muted);
    border-radius: 3px;
}

.region-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Featured opportunites sidebar */
.featured-opps {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feat-opp-item {
    display: block;
    padding: 12px 14px;
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    text-decoration: none !important;
    color: inherit !important;
    transition: all .2s;
}

.feat-opp-item:hover {
    background: var(--bg);
    border-color: var(--border);
    transform: translateX(3px);
    box-shadow: var(--shadow-xs);
}

.feat-opp-type {
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    display: block;
    margin-bottom: 4px;
}

.feat-opp-title {
    font-size: .83rem;
    font-weight: 600;
    color: var(--text) !important;
    margin: 0 0 5px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feat-opp-item:hover .feat-opp-title {
    color: #0077b6 !important;
}

.feat-opp-org {
    font-size: .72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.feat-opp-org i {
    color: var(--primary);
    font-size: .65rem;
}

.feat-opp-date {
    font-size: .7rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.feat-opp-date i {
    color: #0077b6;
    font-size: .65rem;
}

/* Placeholder pub vide */
.pub-placeholder {
    padding: 28px;
    text-align: center;
    color: var(--text-light);
}

.pub-placeholder i {
    font-size: 1.8rem;
    opacity: .25;
}

/* Pub wrap */
.pub-sidebar-wrap {
    position: relative;
    background: var(--bg-muted);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow .3s;
}

.pub-sidebar-wrap:hover {
    box-shadow: var(--shadow-md);
}

.pub-sidebar-wrap a {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
}

.pub-sidebar-wrap img {
    width: 100%;
    display: block;
    transition: transform .4s;
}

.pub-sidebar-wrap:hover img {
    transform: scale(1.02);
}

.pub-sidebar-label {
    position: absolute;
    top: 7px;
    right: 7px;
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-light);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(4px);
    padding: 2px 7px;
    border-radius: 4px;
}

/* Animations */
.fade-in {
    animation: fadeUp .6s var(--ease-out) both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1199px) {
    .opportunites-layout {
        grid-template-columns: 1fr 276px;
        gap: 36px;
    }
}

@media (max-width: 991px) {
    .opportunites-layout {
        grid-template-columns: 1fr;
    }

    .opportunites-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .hero-stats {
        gap: 20px;
    }

    .hero-stat strong {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .opportunites-hero {
        padding: 48px 0 56px;
    }

    .opportunites-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .opportunites-body {
        padding: 36px 0 72px;
    }

    .hero-stat-divider {
        display: none;
    }
}

@media (max-width: 576px) {
    .opportunites-sidebar {
        grid-template-columns: 1fr;
    }

    .active-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .clear-filters {
        margin-left: 0;
    }

    .opp-card {
        padding: 18px;
    }

    .opp-card-header {
        flex-direction: column;
        gap: 7px;
    }
}
