@page {
    size: A4 portrait;
    margin: 4mm 8mm 4mm 8mm;
}

table {
    width: 19.4cm;
    border: none;
    border-collapse: separate;
    border-spacing: 0;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 0.35cm;
    font-family: 'grobold', sans-serif;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid #43a66b;
}

table:last-child,
table:last-of-type {
    margin-bottom: 0 !important;
    break-after: avoid !important;
    page-break-after: avoid !important;
}

td {
    padding: 4px 8px;
    vertical-align: top;
    border: none;
}

td.titre {
    text-align: center;
    background: linear-gradient(135deg, #43a66b 0%, #368a56 100%);
    color: white;
    font-size: 15px;
    padding: 4px 8px;
    letter-spacing: 0.5px;
    text-shadow: none;
    line-height: 1.15;
}

.objectif_titre,
.contenu_titre {
    font-size: 13px;
    font-weight: bold;
    color: #43a66b;
    margin-bottom: 2px;
    padding-bottom: 1px;
    border-bottom: 1.5px solid #f0f7f3;
    display: flex;
    align-items: center;
}

.tdobj {
    width: 15cm;
    background-color: #f9fdfa;
    border-right: 1px solid #edf5ef;
}

.listeobj {
    width: 100%;
    font-size: 11px;
    line-height: 1.25;
    color: #2c3e50;
}

.contenu {
    background-color: white;
    border-top: 1px solid #edf5ef;
}

.listecontenu {
    width: 100%;
    font-size: 10.5px;
    line-height: 1.15;
    color: #5d6d7e;
}

.qrcode {
    width: 4cm;
    text-align: center;
    vertical-align: middle;
    background-color: white;
    padding: 2px 4px;
}

.qrcode canvas {
    display: none !important;
}

.qrcode img {
    margin: auto;
    max-width: 2.2cm;
    max-height: 2.2cm;
    width: auto !important;
    height: auto !important;
    display: block;
}

.impr-icon {
    width: 15px !important;
    height: 15px !important;
    margin-right: 4px !important;
}

td.titre .impr-icon {
    width: 17px !important;
    height: 17px !important;
}

body {
    margin: 0px;
    background-color: white;
    font-family: 'grobold', sans-serif;
}

html {
    margin: 0;
    padding: 0;
}

/* Hide navigation elements from print */
#cadrechapitre, 
#divcontenuchapitre, 
#divcontenubackground,
#auteur {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

#impression {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

@media print {
    html, body {
        height: 100% !important;
        max-height: 29.7cm !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
    }

    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    #impression {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    table {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        margin-bottom: 0.2cm !important;
        box-shadow: none !important;
    }

    table:last-child,
    table:last-of-type {
        margin-bottom: 0 !important;
        break-after: avoid !important;
        page-break-after: avoid !important;
    }
}
