/* ============================================================
   FindAndWorks — Page d'accueil et liste d'offres
   ============================================================ */

/* ─── MAIN HEADER ─── */
.main-header {
    background: rgba(7, 9, 15, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-header .logo {
    display: flex;
    flex-direction: column;
}

.main-header .logo p {
    font-size: 0.7rem;
    color: var(--muted);
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.main-nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--text);
}

/* ─── RECHERCHE ─── */
.search-section {
    padding: 2rem 0;
}

.search-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#search-input {
    flex: 1;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    color: var(--text);
    font-size: 0.95rem;
}

#search-input:focus {
    outline: none;
    border-color: var(--blue);
}

#search-btn {
    background: var(--grad);
    border: none;
    border-radius: var(--radius-sm);
    width: 48px;
    color: white;
    cursor: pointer;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}

.filters select {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
}

/* ─── GRILLE D'OFFRES ─── */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.offer-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 280px;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.offer-card:hover {
    transform: translateY(-5px);
    border-color: var(--blue);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.offer-content {
    background: linear-gradient(0deg, rgba(7, 9, 15, 0.95) 0%, rgba(7, 9, 15, 0.4) 100%);
    padding: 1.5rem;
    color: white;
}

.offer-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.offer-type.offer {
    background: var(--blue);
}

.offer-type.request {
    background: var(--teal);
}

.offer-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.offer-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.offer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.offer-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.offer-price {
    color: var(--teal);
    font-weight: 700;
}

.offer-creator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.creator-info p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.creator-type {
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
}

.creator-type.pro {
    background: rgba(79, 142, 247, 0.2);
    color: var(--blue);
}

.creator-type.part {
    background: rgba(0, 212, 160, 0.2);
    color: var(--teal);
}

.offer-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── PAGINATION ─── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.3s;
}

.page-btn:hover:not(.disabled) {
    border-color: var(--blue);
    color: var(--text);
}

.page-btn.active {
    background: var(--grad);
    color: white;
    border-color: transparent;
}

.page-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ─── MOBILE TABBAR ─── */
.mobile-tabbar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 0.5rem;
    justify-content: space-around;
    z-index: 100;
}

.tab-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.7rem;
    padding: 0.5rem;
}

.tab-link i {
    font-size: 1.2rem;
}

.tab-link.active {
    color: var(--blue);
}

@media (max-width: 900px) {
    .main-nav.desktop-nav {
        display: none;
    }
    
    .mobile-tabbar {
        display: flex;
    }
    
    body {
        padding-bottom: 70px;
    }
}

@media (max-width: 600px) {
    .offers-grid {
        grid-template-columns: 1fr;
    }
}