/* DESIGN.md §12 — feuille print pour courriers PDF / impression d'écrans.
 * Auto-active via @media print. Masque sidebar/header/boutons, étend le contenu pleine largeur.
 */

@media print {
    /* Masquer toute UI fonctionnelle */
    .sidebar, .app-header, .btn, button, form,
    .pagination, .actions, [data-close], dialog.modal,
    .nav, .breadcrumbs, .nav__badge {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
        font-family: 'Helvetica Neue', Arial, sans-serif;
    }

    .app-shell {
        padding-left: 0 !important;
    }
    .app-main {
        padding: 0 !important;
        background: white !important;
        min-height: 0 !important;
    }

    .card,
    .card--hero {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 0 1.5cm !important;
        page-break-inside: avoid;
    }

    h1, h2, h3, h4 {
        color: #234470 !important;
        page-break-after: avoid;
    }

    .table {
        page-break-inside: auto;
        border-collapse: collapse;
        width: 100%;
    }
    .table thead {
        display: table-header-group;
    }
    .table tr {
        page-break-inside: avoid;
    }
    .table thead th {
        background: #f0eee9 !important;
        color: #234470 !important;
        border-bottom: 2pt solid #234470 !important;
        padding: 6pt 8pt !important;
    }
    .table tbody td {
        padding: 5pt 8pt !important;
        border-bottom: 0.5pt solid #cccccc !important;
    }

    .badge {
        border: 0.5pt solid #999;
        background: white !important;
        padding: 1pt 6pt !important;
    }
    .badge__dot { display: none; }

    /* Footer page : URL + date d'impression (utile pour audit courrier) */
    @page {
        margin: 1.5cm 1.5cm 2cm 1.5cm;
        @bottom-right {
            content: counter(page) ' / ' counter(pages);
            font-family: 'Helvetica Neue', Arial, sans-serif;
            font-size: 9pt;
            color: #807D7D;
        }
    }

    /* Évite les liens transformés en "(http://...)" sur la marge */
    a[href]:after { content: none !important; }
}
