/* Import des polices Google */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&family=Nunito+Sans:wght@400;600&display=swap');

/* Reset et variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs Vetzio */
    --vetzio-blue: #2C5F8D;
    --vetzio-orange: #F47D3B;
    --vetzio-white: #FFFFFF;
    --vetzio-text: #333333;
    --vetzio-light-bg: #F8F9FA;
    --vetzio-border: #E0E0E0;
    
    /* Ombres */
    --shadow: 0 2px 4px rgba(44, 95, 141, 0.08);
    --shadow-md: 0 4px 6px rgba(44, 95, 141, 0.1);
    --shadow-lg: 0 10px 15px rgba(44, 95, 141, 0.15);
    
    /* Hauteur navbar - ajustée pour les proportions du logo */
    --navbar-height: 60px;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    color: var(--vetzio-text);
    background-color: var(--vetzio-white);
    line-height: 1.6;
    padding-top: var(--navbar-height);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typographie */
h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--vetzio-blue);
    font-weight: 600;
}

/* ============================================
   BARRE DE NAVIGATION FIXE ORANGE
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: linear-gradient(90deg, #F27D3C 0%, #f89a6b 40%, #fbb896 80%, #fdd4be 100%);
    box-shadow: 0 2px 10px rgba(244, 125, 59, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    padding-right: 30px;
}

.navbar-content {
    display: flex;
    align-items: center;
    gap: 25px;
    justify-content: flex-start;
}

.navbar-logo {
    height: 45px;
    width: auto;
    cursor: pointer;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.navbar-logo:hover {
    opacity: 0.9;
}

.navbar-tagline {
    color: var(--vetzio-white);
    font-size: 0.95rem;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    margin: 0;
    display: none;
    flex-shrink: 0;
}

@media (min-width: 900px) {
    .navbar-tagline {
        display: block;
    }
}

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */
.main-wrapper {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    gap: 20px;
    padding: 30px 20px;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   PUBLICITÉS LATÉRALES
   ============================================ */
.ad-sidebar {
    width: 160px;
    position: sticky;
    top: calc(var(--navbar-height) + 20px);
}

.ad-left,
.ad-right {
    display: none;
}

@media (min-width: 1280px) {
    .ad-left,
    .ad-right {
        display: block;
    }
}

.ad-vertical {
    background: #FFF4ED;
    border: 2px dashed var(--vetzio-orange);
    padding: 20px 10px;
    border-radius: 8px;
    color: var(--vetzio-orange);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Publicité mobile */
.ad-mobile {
    display: none;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .ad-mobile {
        display: block;
    }
}

.ad-placeholder {
    background: #FFF4ED;
    border: 2px dashed var(--vetzio-orange);
    padding: 20px;
    border-radius: 8px;
    color: var(--vetzio-orange);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-align: center;
}

/* ============================================
   PUBLICITÉ D'ACCUEIL (avant recherche)
   ============================================ */
.welcome-ad {
    background: var(--vetzio-white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 40px;
    margin-bottom: 30px;
    text-align: center;
}

.welcome-ad-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.welcome-ad-large {
    background: linear-gradient(135deg, #FFF4ED 0%, #FFE5D9 100%);
    border: 3px dashed var(--vetzio-orange);
    padding: 60px 40px;
    border-radius: 12px;
    color: var(--vetzio-orange);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.welcome-message h2 {
    color: var(--vetzio-blue);
    font-size: 2rem;
    margin-bottom: 15px;
}

.welcome-message p {
    color: var(--vetzio-text);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.welcome-hint {
    color: var(--vetzio-orange);
    font-weight: 600;
    font-size: 1rem !important;
    margin-top: 20px !important;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ============================================
   SECTION RECHERCHE
   ============================================ */
.search-section {
    background: var(--vetzio-white);
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    position: sticky;
    top: calc(var(--navbar-height) + 20px);
    z-index: 100;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: 'Nunito Sans', sans-serif;
    border: 2px solid var(--vetzio-border);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--vetzio-blue);
    box-shadow: 0 0 0 3px rgba(44, 95, 141, 0.1);
}

.search-btn {
    padding: 16px 32px;
    background-color: var(--vetzio-orange);
    color: var(--vetzio-white);
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-btn:hover {
    background-color: var(--vetzio-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Filtres */
.filters {
    display: flex;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--vetzio-border);
}

.filter-item {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.filter-item label {
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 6px;
    color: var(--vetzio-blue);
}

.filter-item input,
.filter-item select {
    padding: 10px 12px;
    border: 1px solid var(--vetzio-border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Nunito Sans', sans-serif;
    transition: border-color 0.3s ease;
}

.filter-item input:focus,
.filter-item select:focus {
    outline: none;
    border-color: var(--vetzio-blue);
}

/* ============================================
   CHARGEMENT
   ============================================ */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid var(--vetzio-border);
    border-top-color: var(--vetzio-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    font-family: 'Nunito Sans', sans-serif;
    color: var(--vetzio-text);
}

/* ============================================
   STATISTIQUES
   ============================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    background: var(--vetzio-white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    font-family: 'Nunito Sans', sans-serif;
    color: var(--vetzio-text);
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: var(--vetzio-orange);
}

/* ============================================
   RÉSULTATS
   ============================================ */
.results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.result-card {
    background: var(--vetzio-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--vetzio-border);
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--vetzio-blue);
}

/* Carte publicitaire intégrée */
.result-card.ad-card {
    background: #FFF4ED;
    border: 2px dashed var(--vetzio-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    cursor: default;
}

.result-card.ad-card:hover {
    transform: none;
}

.ad-card-content {
    text-align: center;
    color: var(--vetzio-orange);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    padding: 20px;
    font-size: 0.9rem;
}

.result-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--vetzio-light-bg);
}

.result-content {
    padding: 16px;
}

.result-site {
    display: inline-block;
    padding: 4px 10px;
    background: var(--vetzio-blue);
    color: var(--vetzio-white);
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Nunito Sans', sans-serif;
    margin-bottom: 8px;
    color: var(--vetzio-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.result-price {
    font-size: 1.3rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: var(--vetzio-orange);
    margin-bottom: 6px;
}

.result-score {
    font-size: 0.8rem;
    font-family: 'Nunito Sans', sans-serif;
    color: var(--vetzio-text);
    opacity: 0.7;
}

/* ============================================
   AUTRES ÉLÉMENTS
   ============================================ */
.ad-bottom {
    margin: 30px 0;
    text-align: center;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--vetzio-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.no-results p:first-child {
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    color: var(--vetzio-blue);
    margin-bottom: 10px;
}

.no-results p {
    font-family: 'Nunito Sans', sans-serif;
    color: var(--vetzio-text);
}

/* Footer */
.footer {
    background: var(--vetzio-blue);
    color: var(--vetzio-white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

.footer p {
    opacity: 0.9;
    margin: 5px 0;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .results {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }
    
    .navbar-logo {
        height: 38px;
    }
    
    .navbar {
        padding: 0 15px;
    }
    
    .navbar-content {
        gap: 15px;
    }
    
    .search-section {
        position: relative;
        top: auto;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }

    .filters {
        flex-direction: column;
        gap: 12px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }

    .results {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .main-wrapper {
        padding: 20px 15px;
    }
    
    .result-card.ad-card {
        min-height: 180px;
    }
    
    .welcome-ad {
        padding: 25px;
    }
    
    .welcome-ad-large {
        padding: 40px 20px;
        min-height: 200px;
        font-size: 1.1rem;
    }
    
    .welcome-message h2 {
        font-size: 1.5rem;
    }
    
    .welcome-message p {
        font-size: 1rem;
    }
}