/* ===========================
   RECETTES GOURMANDES - STYLES
   =========================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    --secondary-gradient: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
    --bg-gradient: linear-gradient(135deg, #fef3c7 0%, #fed7aa 50%, #fecaca 100%);
    --header-gradient: linear-gradient(90deg, #78350f 0%, #c2410c 50%, #991b1b 100%);
    --footer-gradient: linear-gradient(135deg, #1f2937 0%, #78350f 50%, #c2410c 100%);
    
    --color-primary: #ea580c;
    --color-secondary: #dc2626;
    --color-accent: #f59e0b;
    --color-dark: #1f2937;
    --color-gray: #6b7280;
    --color-light-gray: #f3f4f6;
    
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--color-dark);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ===========================
   HEADER
   =========================== */
.header {
    background: var(--header-gradient);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-2xl);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo-link {
    text-decoration: none;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.logo-link:hover .logo-icon {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(12deg);
}

.logo-text h1 {
    font-family: var(--font-display);
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: #fef3c7;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.nav-desktop {
    display: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #fef3c7;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: #fef3c7;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 1.5rem;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.menu-toggle:hover span {
    background: #fef3c7;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    
    .menu-toggle {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: var(--header-gradient);
    padding: 1rem;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: var(--shadow-xl);
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    position: relative;
    padding: 5rem 1rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #fed7aa 0%, #fef3c7 50%, #fecaca 100%);
    opacity: 0.5;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--header-gradient);
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-dark);
}

.hero-title-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--color-gray);
    max-width: 42rem;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

@media (min-width: 768px) {
    .hero {
        padding: 6rem 1rem;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 48rem;
    margin: 0 auto 2rem;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 4rem;
    border: 2px solid #fef3c7;
    border-radius: 1rem;
    font-size: 1.125rem;
    font-family: var(--font-body);
    background: white;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    outline: none;
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.1), var(--shadow-xl);
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.category-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    background: white;
    color: var(--color-gray);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.category-btn:hover {
    background: var(--color-light-gray);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.category-btn.active {
    background: var(--primary-gradient);
    color: white;
}

/* ===========================
   RECIPES SECTION
   =========================== */
.recipes-section {
    padding: 4rem 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--color-gray);
    font-size: 1rem;
}

.section-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray);
    font-size: 0.875rem;
}

.section-meta svg {
    color: var(--color-primary);
}

/* View All Button */
.view-all-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2.5rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    border-radius: 9999px;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
}

.view-all-btn svg {
    transition: transform 0.3s ease;
}

.view-all-btn:hover svg {
    transform: translateX(4px);
}

/* Recipe Grid */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.recipe-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.recipe-card:hover {
    box-shadow: var(--shadow-2xl);
    transform: translateY(-8px);
}

.recipe-image {
    position: relative;
    height: 14rem;
    background: linear-gradient(135deg, #fed7aa 0%, #fef3c7 100%);
    overflow: hidden;
}

.recipe-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-image-placeholder svg {
    width: 5rem;
    height: 5rem;
    color: white;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.recipe-card:hover .recipe-image-placeholder svg {
    transform: scale(1.1);
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-popularity {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #78350f;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.recipe-popularity svg {
    width: 0.75rem;
    height: 0.75rem;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #fed7aa;
    color: #c2410c;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.recipe-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.recipe-card:hover .recipe-title {
    color: var(--color-primary);
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--color-gray);
    margin-bottom: 0.75rem;
}

.recipe-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.recipe-meta-item svg {
    width: 1rem;
    height: 1rem;
}

.recipe-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-light-gray);
}

.recipe-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.recipe-rating svg {
    width: 1rem;
    height: 1rem;
    color: #fbbf24;
    fill: currentColor;
}

.recipe-rating-value {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-dark);
}

.recipe-rating-count {
    font-size: 0.75rem;
    color: var(--color-gray);
}

.recipe-link {
    color: var(--color-primary);
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-link {
    transform: translateX(4px);
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    display: none;
}

.loading.active {
    display: block;
}

.spinner {
    display: inline-block;
    width: 4rem;
    height: 4rem;
    border: 4px solid var(--color-light-gray);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: var(--footer-gradient);
    color: white;
    padding: 4rem 1rem 2rem;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-heading {
    font-weight: 700;
    color: #fef3c7;
    margin-bottom: 0.5rem;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: white;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .recipes-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recipe-card {
    animation: fadeIn 0.5s ease-out;
}

.recipe-card:nth-child(1) { animation-delay: 0.05s; }
.recipe-card:nth-child(2) { animation-delay: 0.1s; }
.recipe-card:nth-child(3) { animation-delay: 0.15s; }
.recipe-card:nth-child(4) { animation-delay: 0.2s; }
.recipe-card:nth-child(5) { animation-delay: 0.25s; }
.recipe-card:nth-child(6) { animation-delay: 0.3s; }
