/**
 * ============================================================================
 * WARAP Marketplace CSS v3.0
 * ============================================================================
 * Styles spécifiques à marketplace.html
 * Utilise les variables de styles.css
 * Date: 2026-01-04
 * ============================================================================
 */

/* ============================================
   SEARCH BAR (Amazon Style)
   ============================================ */
.search-container {
    flex: 1;
    max-width: 800px;
    display: flex;
}

.search-category {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    padding: 12px 15px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

.search-city {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-right: none;
    padding: 12px 10px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    min-width: 140px;
}

.search-input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: none;
    border-right: none;
    padding: 12px 18px;
    color: var(--text-primary);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: var(--gradient-primary);
    border: none;
    padding: 12px 25px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: scale(1.05);
}

/* ============================================
   HEADER ACTIONS (Marketplace)
   ============================================ */
.header-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
}

.header-action:hover {
    color: var(--text-primary);
}

.header-action i {
    font-size: 1.3rem;
}

.header-action .badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--accent);
    color: #000;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.btn-sell {
    background: var(--gradient-gold);
    color: #000;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-sell:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

/* ============================================
   CATEGORIES NAV
   ============================================ */
.categories-nav {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.categories-nav::-webkit-scrollbar {
    height: 0;
}

.categories-list {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 5px;
}

.cat-item {
    padding: 12px 20px;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.cat-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.cat-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.cat-item i {
    margin-right: 8px;
}

/* Category Separator & Offers/Requests */
.cat-separator {
    width: 1px;
    height: 30px;
    background: var(--border);
    margin: 0 10px;
}

.cat-item.offers {
    color: var(--success);
}

.cat-item.offers.active {
    color: var(--success);
    border-bottom-color: var(--success);
}

.cat-item.requests {
    color: var(--warning);
}

.cat-item.requests.active {
    color: var(--warning);
    border-bottom-color: var(--warning);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px 20px;
}

/* ============================================
   HERO BANNER
   ============================================ */
.hero-banner {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: 50px 40px;
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-banner h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.hero-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 25px;
    max-width: 500px;
}

.hero-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-tag:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
}

.stat-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ============================================
   LISTINGS GRID
   ============================================ */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-main {
        flex-wrap: wrap;
        gap: 15px;
    }

    .search-container {
        order: 3;
        max-width: 100%;
        flex: 1 1 100%;
    }

    .header-actions {
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .hero-banner {
        padding: 30px 20px;
    }

    .hero-banner h1 {
        font-size: 1.8rem;
    }

    .categories-list {
        padding: 0 10px;
    }

    .stats-bar {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .announcement-bar span {
        display: block;
        margin: 0;
    }

    .btn-sell span {
        display: none;
    }
}

/* ============================================
   ALERT CTA & MATCHING SYSTEM (GAFAM STYLE)
   ============================================ */
.alert-cta {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: var(--radius-lg);
    padding: 25px 30px;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    box-shadow: 0 10px 30px -10px rgba(49, 46, 129, 0.4);
    position: relative;
    overflow: hidden;
}

.alert-cta::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.alert-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-text p {
    font-size: 0.95rem;
    opacity: 0.8;
    max-width: 600px;
}

.alert-cta .btn {
    position: relative;
    z-index: 2;
    background: #fff;
    color: #312e81;
    font-weight: 600;
    border: none;
    padding: 12px 25px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-cta .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Interest Modal */
.interest-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.interest-modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.interest-header {
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    padding: 20px 25px;
    color: white;
}

.interest-header h3 {
    margin: 0;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.interest-header p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.interest-body {
    padding: 25px;
}

.interest-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 1.2rem;
}

.interest-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .alert-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        text-align: left;
    }

    .alert-cta .btn {
        width: 100%;
        justify-content: center;
    }
}