/* ==========================================================================
   LaFriteuse.com - Stylesheet
   Palette : Orange doré (#E8850C), Brun chaud (#5C3D2E), Crème (#FFF8F0)
   ========================================================================== */

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

:root {
    --primary: #E8850C;
    --primary-dark: #C46D00;
    --primary-light: #FFAA40;
    --secondary: #5C3D2E;
    --secondary-light: #8B6B5A;
    --accent: #D4380D;
    --cream: #FFF8F0;
    --cream-dark: #F5EDE3;
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-600: #4B5563;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --green: #16A34A;
    --red: #DC2626;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    --radius: 8px;
    --radius-lg: 12px;
    --max-width: 1200px;
    --transition: .2s ease;
}

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--gray-800);
    background: var(--cream);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* Page content wrapper (used on brand/type/guide pages) */
.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 20px 60px;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.page-content .intro {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

a { color: var(--primary-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }

img { max-width: 100%; height: auto; display: block; }

/* Prevent overflow from any element */
table, pre, code, blockquote, .product-card, .comparison-table, .recipe-card, .faq-section {
    max-width: 100%;
}

.site-main { overflow-x: hidden; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', 'Georgia', serif;
    color: var(--secondary);
    line-height: 1.3;
    margin-bottom: .5em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-top: 2rem; }
h3 { font-size: 1.35rem; margin-top: 1.5rem; }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1em; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.4rem;
    color: var(--secondary);
    font-weight: 500;
}

.logo-icon { font-size: 1.8rem; }
.logo strong { color: var(--primary); }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
}

.main-nav > ul > li > a {
    display: block;
    padding: 24px 16px;
    color: var(--gray-800);
    font-weight: 500;
    font-size: .95rem;
    transition: all var(--transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Dropdown */
.has-dropdown { position: relative; }

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius) var(--radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all var(--transition);
    z-index: 100;
    border-top: 2px solid var(--primary);
}

.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    color: var(--gray-600);
    font-size: .9rem;
    border-bottom: 1px solid var(--gray-100);
}

.dropdown li a:hover {
    background: var(--cream);
    color: var(--primary);
}

.dropdown li:last-child a { border-bottom: none; }

/* ==========================================================================
   Main content
   ========================================================================== */
.site-main {
    min-height: 60vh;
}

.page-header {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--white);
    padding: 50px 0 40px;
    margin-bottom: 40px;
}

.page-header h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: .3em;
}

.page-header .lead {
    font-size: 1.15rem;
    opacity: .9;
    max-width: 700px;
    line-height: 1.6;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding-bottom: 60px;
}

.content-main { min-width: 0; }

.content-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    font-size: .85rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.breadcrumb li::after {
    content: '›';
    margin: 0 8px;
    color: var(--gray-400);
}

.breadcrumb li:last-child::after { display: none; }
.breadcrumb li.active { color: var(--gray-400); }

/* ==========================================================================
   Product Cards
   ========================================================================== */
.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: 280px 1fr;
    margin-bottom: 30px;
    transition: box-shadow var(--transition);
    border: 1px solid var(--gray-200);
}

.product-card:hover { box-shadow: var(--shadow-lg); }

.product-card__image {
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-card__image img {
    max-height: 250px;
    object-fit: contain;
}

.product-card__content { padding: 24px; }

.product-card__content h3 {
    font-size: 1.3rem;
    margin-bottom: .5rem;
    margin-top: 0;
}

.product-card__desc {
    color: var(--gray-600);
    font-size: .95rem;
    margin-bottom: .75rem;
}

.product-card__rating {
    margin-bottom: .5rem;
    font-size: .95rem;
}

.stars { color: var(--primary); letter-spacing: 2px; }

.product-card__price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
}

.product-card__pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 1.2rem;
    font-size: .9rem;
}

.pros ul, .cons ul { padding-left: 18px; margin-top: 5px; }
.pros li { color: var(--green); }
.pros li::marker { content: '✓ '; }
.cons li { color: var(--red); }
.cons li::marker { content: '✗ '; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-light);
    color: var(--white);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: .85rem;
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */
.table-responsive { overflow-x: auto; margin: 20px 0; max-width: 100%; -webkit-overflow-scrolling: touch; }

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.comparison-table thead {
    background: var(--secondary);
    color: var(--white);
}

.comparison-table th {
    padding: 14px 16px;
    font-weight: 600;
    text-align: left;
    font-size: .9rem;
}

.comparison-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: .9rem;
}

.comparison-table tbody tr:hover {
    background: var(--cream);
}

.comparison-table tbody tr:last-child td { border-bottom: none; }

.stars-sm { color: var(--primary); font-weight: 600; }

/* ==========================================================================
   Recipe Cards
   ========================================================================== */
.recipe-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.recipe-card__header { position: relative; }

.recipe-card__header img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.recipe-card__meta {
    display: flex;
    gap: 20px;
    padding: 15px 24px;
    background: var(--secondary);
    color: var(--white);
    font-size: .9rem;
}

.recipe-card__ingredients,
.recipe-card__steps {
    padding: 20px 24px;
}

.recipe-card__ingredients { border-bottom: 1px solid var(--gray-200); }
.recipe-card__ingredients ul { padding-left: 20px; }
.recipe-card__ingredients li { margin-bottom: 4px; }
.recipe-card__steps ol { padding-left: 20px; }
.recipe-card__steps li { margin-bottom: 10px; line-height: 1.6; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-section { margin: 40px 0; }

.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 10px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    color: var(--secondary);
    font-size: 1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 700;
    transition: transform var(--transition);
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-answer {
    padding: 0 20px 16px;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ==========================================================================
   TOC (Table of Contents)
   ========================================================================== */
.toc {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--primary);
    margin-bottom: 30px;
}

.toc h2 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: .75rem;
}

.toc ol { padding-left: 20px; }

.toc li {
    margin-bottom: 6px;
    font-size: .95rem;
}

.toc a { color: var(--gray-600); }
.toc a:hover { color: var(--primary); }

/* ==========================================================================
   Internal Links (Cocon)
   ========================================================================== */
.internal-links {
    background: var(--cream-dark);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--gray-200);
}

.internal-links h3 {
    font-size: 1rem;
    margin-top: 0;
    color: var(--secondary);
    margin-bottom: .75rem;
}

.internal-links ul { list-style: none; }

.internal-links li { margin-bottom: 6px; }

.internal-links a {
    display: block;
    padding: 6px 0;
    color: var(--gray-600);
    font-size: .9rem;
    border-bottom: 1px solid var(--gray-200);
}

.internal-links a:hover { color: var(--primary); }
.internal-links li:last-child a { border-bottom: none; }

/* ==========================================================================
   Sidebar widgets
   ========================================================================== */
.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--gray-200);
}

.sidebar-widget h3 {
    font-size: 1.05rem;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    margin-bottom: 15px;
}

.sidebar-widget ul { list-style: none; }

.sidebar-widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: .9rem;
}

.sidebar-widget li:last-child { border-bottom: none; }

/* ==========================================================================
   Homepage
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #3D2517 100%);
    color: var(--white);
    padding: 70px 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: .5em;
}

.hero .lead {
    font-size: 1.2rem;
    opacity: .9;
    max-width: 650px;
    margin: 0 auto 2rem;
}

.hero-cta { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

.section { padding: 60px 0; }
.section-alt { background: var(--white); }

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 { font-size: 2rem; }

.section-title p {
    color: var(--gray-600);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.card__image {
    height: 200px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--primary);
}

.card__body { padding: 20px; }

.card__body h3 {
    margin-top: 0;
    font-size: 1.15rem;
}

.card__body p {
    color: var(--gray-600);
    font-size: .9rem;
    margin-bottom: 1rem;
}

.card__link {
    font-weight: 600;
    font-size: .9rem;
    color: var(--primary);
}

.card__link:hover { color: var(--primary-dark); }

/* Brand grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.brand-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    border: 1px solid var(--gray-200);
    transition: all var(--transition);
    font-weight: 600;
    color: var(--secondary);
}

.brand-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    color: var(--primary);
}

/* ==========================================================================
   Content typography
   ========================================================================== */
.content-main h2 { border-bottom: 2px solid var(--cream-dark); padding-bottom: .5rem; }

.content-main ul, .content-main ol {
    padding-left: 24px;
    margin-bottom: 1em;
}

.content-main li { margin-bottom: .3em; }

.content-main blockquote {
    border-left: 4px solid var(--primary);
    padding: 15px 20px;
    background: var(--cream-dark);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5em 0;
    font-style: italic;
    color: var(--gray-600);
}

.highlight-box {
    background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
    border: 1px solid var(--primary-light);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
}

.highlight-box strong { color: var(--primary-dark); }

.verdict-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 20px 0;
    border: 2px solid var(--green);
}

.verdict-box h3 { color: var(--green); margin-top: 0; }

/* Recipe grid on hub page */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.recipe-grid-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition);
}

.recipe-grid-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.recipe-grid-item__image {
    height: 180px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.recipe-grid-item__body { padding: 16px; }
.recipe-grid-item__body h3 { margin-top: 0; font-size: 1.05rem; }
.recipe-grid-item__body p { font-size: .85rem; color: var(--gray-600); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 50px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--gray-800);
}

.footer-col h4 {
    color: var(--white);
    font-family: 'Inter', sans-serif;
    font-size: .95rem;
    margin-bottom: 15px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 6px; }

.footer-col a {
    color: var(--gray-400);
    font-size: .85rem;
}

.footer-col a:hover { color: var(--primary-light); }

.footer-bottom {
    padding-top: 25px;
    text-align: center;
    font-size: .8rem;
    color: var(--gray-400);
}

.footer-disclaimer {
    font-size: .75rem;
    margin-top: 10px;
    opacity: .7;
}

.footer-legal {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
}

.footer-legal a { color: var(--gray-400); font-size: .8rem; }
.footer-legal a:hover { color: var(--primary-light); }

/* ==========================================================================
   404
   ========================================================================== */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 6rem;
    color: var(--primary);
    margin-bottom: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .content-wrapper { grid-template-columns: 1fr; }
    .product-card { grid-template-columns: 200px 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .menu-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
        box-shadow: var(--shadow-lg);
    }

    .main-nav.open { max-height: calc(100vh - 70px); overflow-y: auto; }

    .main-nav ul { flex-direction: column; }

    .main-nav > ul > li > a {
        padding: 15px 20px;
        border-bottom: 1px solid var(--gray-100);
        margin-bottom: 0;
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        border-top: none;
        background: var(--gray-50);
    }

    .dropdown-open .dropdown { display: block; }

    .dropdown li a { padding-left: 40px; }

    .hero h1 { font-size: 2rem; }
    .page-header h1 { font-size: 1.8rem; }

    .product-card { grid-template-columns: 1fr; }
    .product-card__image { height: 200px; }
    .product-card__pros-cons { grid-template-columns: 1fr; }

    .comparison-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 3px;
        color: var(--secondary);
    }

    .footer-grid { grid-template-columns: 1fr; }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    body { font-size: 15px; }
    .hero { padding: 40px 0; }
    .hero h1 { font-size: 1.6rem; }
    .section { padding: 40px 0; }
    .card-grid { grid-template-columns: 1fr; }
    .recipe-card__meta { flex-direction: column; gap: 5px; }
}
