﻿
.search-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    padding: 40px 0 80px;
}

.search-hero {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.9) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 50px 40px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.search-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e40af, #0891b2, #1e40af);
    background-size: 200% 100%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.search-hero h1 {
    font-size: 36px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.search-hero h1 i {
    color: #1e40af;
    font-size: 42px;
}

.search-hero p {
    font-size: 18px;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar-section {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.8);
    position: relative;
    z-index: 100;
    overflow: visible;
    padding: 20px;
}

.advanced-search-form .search-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.search-field {
    position: relative;
}

.search-field i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #1e40af;
    font-size: 18px;
    z-index: 1;
}

.search-field input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
}

.search-field input:focus {
    outline: none;
    border-color: #1e40af;
    background: white;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
    transform: translateY(-1px);
}

.search-field input::placeholder {
    color: #9ca3af;
}

.advanced-filters {
    margin-top: 20px;
}

.btn-toggle-filters {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px solid #d1d5db;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    transition: all 0.3s;
    position: relative;
}

.btn-toggle-filters:hover {
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    border-color: #1e40af;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.filter-badge {
    background: #ef4444;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.filters-panel {
    margin-top: 25px;
    padding: 30px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 16px;
    border: 2px solid #e5e7eb;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.filter-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    background: white;
    transition: all 0.3s;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: white;
    border-radius: 10px;
    transition: all 0.3s;
}

.checkbox-label:hover {
    background: #f9fafb;
    transform: translateX(5px);
}

.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #1e40af;
}

.checkbox-label span {
    font-size: 15px;
    color: #374151;
    font-weight: 500;
}

.search-stats-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 2px solid #e5e7eb;
}

.search-stat-item {
    text-align: center;
    position: relative;
    padding: 15px;
    transition: transform 0.3s;
}

.search-stat-item:hover {
    transform: translateY(-5px);
}

.search-stat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #0891b2);
    transition: width 0.3s;
}

.search-stat-item:hover::after {
    width: 80%;
}

.search-stat-number {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.search-stat-label {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.results-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #f3f4f6;
}

.results-count {
    font-size: 20px;
    color: #1f2937;
    font-weight: 600;
}

.results-count strong {
    font-size: 24px;
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

.results-sort label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
}

.results-sort select {
    padding: 10px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    transition: all 0.3s;
}

.results-sort select:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.offers-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.offer-card-list {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    border: 2px solid #f3f4f6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.offer-card-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #1e40af, #0891b2);
    transition: height 0.4s;
}

.offer-card-list:hover {
    box-shadow: 0 12px 40px rgba(30, 64, 175, 0.2);
    transform: translateX(8px);
    border-color: #1e40af;
}

.offer-card-list:hover::before {
    height: 100%;
}

.offer-card-list .offer-link {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    text-decoration: none;
    color: inherit;
}

.offer-content {
    flex: 1;
}

.offer-content .offer-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
    transition: color 0.3s;
    line-height: 1.3;
}

.offer-card-list:hover .offer-title {
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.offer-company {
    color: #6b7280;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.offer-company::before {
    content: '🏢';
    font-size: 18px;
}

.offer-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
}

.offer-meta-row span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f9fafb;
    border-radius: 8px;
    transition: all 0.3s;
}

.offer-meta-row span:hover {
    background: #eff6ff;
    transform: translateY(-2px);
}

.offer-meta-row i {
    color: #1e40af;
    font-size: 16px;
}

.offer-excerpt {
    color: #4b5563;
    line-height: 1.7;
    font-size: 15px;
}

.offer-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
}

.badge-remote {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.offer-views {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 8px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination-link {
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s;
    font-size: 15px;
    font-weight: 600;
    background: white;
}

.pagination-link:hover {
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    border-color: #1e40af;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.3);
}

.pagination-link.active {
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    color: white;
    border-color: #1e40af;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
}

.pagination-link i {
    margin: 0 5px;
}

.pagination-ellipsis {
    padding: 12px 10px;
    color: #9ca3af;
    font-weight: 600;
    user-select: none;
}

.no-results {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #fafafa 0%, #f3f4f6 100%);
    border-radius: 20px;
    border: 2px dashed #d1d5db;
}

.no-results i {
    font-size: 80px;
    color: #d1d5db;
    margin-bottom: 25px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.no-results h3 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #1f2937;
    font-weight: 700;
}

.no-results p {
    color: #6b7280;
    margin-bottom: 30px;
    font-size: 16px;
}

@media (max-width: 1024px) {
    .search-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-page {
        padding: 20px 0 40px;
    }

    .search-hero {
        padding: 30px 20px;
        border-radius: 16px;
    }

    .search-hero h1 {
        font-size: 28px;
        flex-direction: column;
    }

    .search-hero h1 i {
        font-size: 36px;
    }

    .search-bar-section {
        padding: 25px;
    }

    .advanced-search-form .search-row {
        grid-template-columns: 1fr;
    }

    .filters-panel {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .search-stats-bar {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .results-container {
        padding: 25px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .offer-card-list {
        padding: 20px;
    }

    .offer-card-list .offer-link {
        flex-direction: column;
        gap: 15px;
    }

    .offer-content .offer-title {
        font-size: 18px;
    }

    .offer-meta-row {
        flex-direction: column;
        gap: 10px;
    }

    .offer-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pagination-link {
        padding: 10px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .search-hero h1 {
        font-size: 24px;
    }

    .search-hero p {
        font-size: 15px;
    }

    .search-stat-number {
        font-size: 28px;
    }

    .offer-content .offer-title {
        font-size: 16px;
    }
}

/* === AUTOCOMPLETE MÉTIERS === */
.search-field--autocomplete {
    position: relative;
}

.metiers-suggestions-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-height: 320px;
    overflow-y: auto;
    display: none;
    border: 2px solid #1e40af;
    border-top: none;
    margin-top: -2px;
}

.metiers-suggestions-container.active {
    display: block;
}

.metier-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
}

.metier-suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.metier-suggestion-item:hover,
.metier-suggestion-item.selected {
    background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
    color: white;
}

.metier-suggestion-item mark {
    background: transparent;
    color: inherit;
    font-weight: 700;
}

/* Scrollbar personnalisée pour suggestions */
.metiers-suggestions-container::-webkit-scrollbar {
    width: 6px;
}

.metiers-suggestions-container::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.metiers-suggestions-container::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .metiers-suggestions-container {
        max-height: 250px;
    }
    
    .metier-suggestion-item {
        padding: 10px 14px;
        font-size: 13px;
    }
}