/* Papier commun : ces classes ne touchent ni le menu ni le pied du site. */
.oplc-print-margin-preload {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.oplc-print-table {
    display: table !important;
    width: 100%;
    border-collapse: collapse;
    border: 0;
}
.oplc-print-table > thead { display: table-header-group !important; }
.oplc-print-table > tfoot { display: table-footer-group !important; }
.oplc-print-table > tbody { display: table-row-group !important; }
.oplc-print-table > :is(thead, tbody, tfoot) > tr { display: table-row !important; }
.oplc-print-table > :is(thead, tbody, tfoot) > tr > td {
    display: table-cell !important;
    padding: 0;
    border: 0;
    background: none;
}
.oplc-print-table > thead > tr > td { padding-bottom: 1mm; }
.oplc-print-table > tfoot > tr > td { padding-top: 1mm; }
.oplc-print-table .oplc-flow-header,
.oplc-print-table .oplc-flow-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font: 10px/1.3 Arial, sans-serif;
}
.oplc-print-table .oplc-flow-header {
    border-bottom: 2px solid #4f46e5;
    padding: 3px 0;
}
.oplc-print-table .oplc-flow-footer {
    justify-content: space-between;
    border-top: 1px solid #cbd5e1;
    padding-top: 4px;
}
.oplc-flow-logo { width: 30px; height: 30px; object-fit: contain; }
.oplc-flow-title { color: #3730a3; font-size: 14px; font-weight: 700; }
.oplc-flow-subtitle { margin-left: 8px; padding-left: 8px; border-left: 2px solid #4f46e5; }
.oplc-branded-sheet > .oplc-sheet-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin: 0 0 10px;
    border-bottom: 2px solid #4f46e5;
    background: linear-gradient(135deg, #e0f2fe, #fff) !important;
    text-align: left;
    break-inside: avoid;
    break-after: avoid;
}
.oplc-sheet-header > .oplc-sheet-logo {
    display: block !important;
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex: 0 0 auto;
}
.oplc-sheet-header > .oplc-sheet-heading {
    min-width: 0;
    padding-left: 10px;
    border-left: 3px solid #4f46e5;
    font-family: Arial, sans-serif;
}
.oplc-sheet-heading > .oplc-sheet-title {
    margin: 0;
    color: #3730a3 !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.oplc-sheet-heading > .oplc-sheet-subtitle {
    color: #475569 !important;
    font-size: 12px;
    line-height: 1.3;
    margin-top: 3px;
}
.oplc-branded-sheet > .oplc-sheet-footer {
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid #cbd5e1;
    padding-top: 6px;
    margin-top: 10px;
    color: #64748b !important;
    background: #fff !important;
    font:
        10px/1.3 Arial,
        sans-serif;
    break-inside: avoid;
    break-before: avoid;
}
.oplc-sheet-footer > span {
    color: #64748b !important;
}
.oplc-branded-sheet > .oplc-sheet-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: #475569 !important;
    font:
        12px/1.3 Arial,
        sans-serif;
}
.oplc-sheet-info > span {
    color: #475569 !important;
}
.oplc-sheet-compact > .oplc-sheet-header {
    gap: 6px;
    padding: 4px 6px;
    margin-bottom: 5px;
}
.oplc-sheet-compact .oplc-sheet-logo {
    width: 28px;
    height: 28px;
}
.oplc-sheet-compact .oplc-sheet-heading {
    padding-left: 6px;
    border-left-width: 2px;
}
.oplc-sheet-compact .oplc-sheet-title {
    font-size: 11px;
}
.oplc-sheet-compact .oplc-sheet-subtitle {
    font-size: 9px;
}
.oplc-sheet-compact > .oplc-sheet-footer {
    gap: 5px;
    padding-top: 3px;
    margin-top: 5px;
    font-size: 8px;
}
@media print {
    .oplc-branded-sheet > .oplc-sheet-header,
    .oplc-branded-sheet > .oplc-sheet-footer {
        display: flex !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    .oplc-sheet-header > .oplc-sheet-logo {
        visibility: visible !important;
    }
}

/* Volet pédagogique à l’écran : le document imprimé garde sa mise en page. */
.oplc-correction-guide {
    margin: 0 0 16px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #172554;
    background: #f1f5f9;
    font: 0.9rem/1.55 Arial, sans-serif;
    text-align: left;
    overflow-wrap: anywhere;
}
.oplc-correction-guide > summary {
    min-height: 44px;
    padding: 10px 0;
    color: #172554;
    cursor: pointer;
    font-weight: 700;
}
.oplc-correction-guide > summary:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 3px;
    border-radius: 3px;
}
.oplc-correction-guide > p,
.oplc-correction-guide > ol {
    margin: 0 0 12px;
    color: #172554;
}
.oplc-correction-guide > ol {
    padding-left: 24px;
}
.oplc-correction-guide li + li {
    margin-top: 10px;
}
@media print {
    .oplc-correction-guide {
        display: none !important;
    }
}
