/* Print Stylesheet */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    body {
        font-family: "Times New Roman", serif;
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    /* Hide non-essential elements */
    header nav,
    .sidebar,
    .ad-banner,
    .share-buttons,
    .newsletter-signup,
    .related-recipes,
    footer,
    .breadcrumb {
        display: none !important;
    }

    /* Show only logo in header */
    header {
        background: none !important;
        color: #000 !important;
        position: static !important;
        box-shadow: none !important;
        padding: 20pt 0 10pt 0;
        border-bottom: 2pt solid #000;
    }

    .header-top {
        border: none !important;
        padding: 0 !important;
    }

    .logo {
        color: #000 !important;
        font-size: 18pt !important;
    }

    /* Page layout */
    .content-wrapper {
        display: block !important;
        margin: 0 !important;
    }

    .content-main {
        padding: 0 !important;
        background: none !important;
        box-shadow: none !important;
    }

    /* Recipe specific */
    .recipe-header {
        background: none !important;
        padding: 20pt 0 !important;
        page-break-inside: avoid;
    }

    .recipe-image {
        max-width: 100% !important;
        height: auto !important;
        margin: 15pt 0 !important;
        page-break-inside: avoid;
    }

    .recipe-info {
        background: #f5f5f5 !important;
        border: 1pt solid #ccc !important;
        padding: 15pt !important;
        margin: 15pt 0 !important;
        page-break-inside: avoid;
    }

    .info-item .value {
        font-size: 14pt !important;
        font-weight: bold !important;
    }

    .info-item .label {
        font-size: 10pt !important;
    }

    /* Typography */
    h1 {
        font-size: 20pt !important;
        margin-bottom: 10pt !important;
        page-break-after: avoid;
    }

    h2 {
        font-size: 16pt !important;
        margin-bottom: 8pt !important;
        margin-top: 15pt !important;
        page-break-after: avoid;
    }

    h3 {
        font-size: 14pt !important;
        margin-bottom: 6pt !important;
        margin-top: 12pt !important;
        page-break-after: avoid;
    }

    h4, h5, h6 {
        font-size: 12pt !important;
        margin-bottom: 4pt !important;
        page-break-after: avoid;
    }

    p {
        margin-bottom: 6pt !important;
        orphans: 3;
        widows: 3;
    }

    /* Ingredients */
    .ingredients {
        background: #f9f9f9 !important;
        border: 1pt solid #ccc !important;
        padding: 15pt !important;
        margin: 15pt 0 !important;
        page-break-inside: avoid;
    }

    .ingredients h3 {
        border-bottom: 1pt solid #000 !important;
        margin-top: 0 !important;
    }

    .ingredients-list li {
        padding: 3pt 0 !important;
        border-bottom: none !important;
        padding-left: 20pt !important;
    }

    .ingredients-list li:before {
        content: "• " !important;
        position: absolute !important;
        left: 0 !important;
    }

    /* Instructions */
    .instructions {
        margin: 20pt 0 !important;
    }

    .instructions h3 {
        border-bottom: 1pt solid #000 !important;
        margin-top: 0 !important;
    }

    .instruction-step {
        background: #f9f9f9 !important;
        border: 1pt solid #ddd !important;
        border-left: 3pt solid #000 !important;
        padding: 12pt !important;
        margin-bottom: 10pt !important;
        page-break-inside: avoid;
    }

    .step-number {
        background: #000 !important;
        color: #fff !important;
        width: 25pt !important;
        height: 25pt !important;
        font-size: 10pt !important;
        left: -13pt !important;
    }

    /* Tips and notes */
    .chef-tip,
    .wine-pairing,
    .nutrition-info {
        background: #f5f5f5 !important;
        border: 1pt solid #999 !important;
        padding: 12pt !important;
        margin: 12pt 0 !important;
        page-break-inside: avoid;
    }

    .chef-tip::before,
    .wine-pairing::before,
    .nutrition-info::before {
        display: none !important;
    }

    /* Print-specific additions */
    .print-only {
        display: block !important;
    }

    .no-print {
        display: none !important;
    }

    /* Page breaks */
    .page-break-before {
        page-break-before: always;
    }

    .page-break-after {
        page-break-after: always;
    }

    .page-break-inside-avoid {
        page-break-inside: avoid;
    }

    /* Links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    /* Tables (if any) */
    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }

    th, td {
        border: 1pt solid #000 !important;
        padding: 8pt !important;
        text-align: left !important;
    }

    th {
        background: #f0f0f0 !important;
        font-weight: bold !important;
    }

    /* Ensure images don't break across pages */
    img {
        page-break-inside: avoid;
        max-width: 100% !important;
        height: auto !important;
    }

    /* Recipe metadata for print */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20pt;
        padding-bottom: 10pt;
        border-bottom: 1pt solid #ccc;
    }

    .print-date:after {
        content: "Imprimé le " date();
        font-size: 10pt;
        color: #666;
    }
}