/* =====================================================================
   📁 /maths/numeration/fractions/placer_encadrer_intercaler/fiches/fiches.css
   ===================================================================== */

.pei-fiches-panel {
    position: sticky;
    top: 1rem;
}

.pei-fiches-preview {
    overflow-x: auto;
}

.pei-preview-page {
    min-width: 760px;
    background: #fff;
    border: 1px solid #d9e0e6;
    border-radius: .5rem;
    padding: 18px 22px 16px;
    color: #263238;
}

.pei-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 8px;
    margin-bottom: 9px;
    border-bottom: 2px solid #dce4eb;
}

.pei-preview-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.pei-preview-code {
    white-space: nowrap;
    font-weight: 700;
    color: #2e5f93;
}

.pei-preview-name-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .84rem;
    margin-bottom: 10px;
}

.pei-preview-correction-label {
    text-align: right;
    font-weight: 700;
    color: #7656a5;
    margin-bottom: 10px;
}

.pei-preview-section {
    border: 1px solid #d8e0e6;
    border-radius: .45rem;
    padding: 8px 10px 9px;
    margin-bottom: 10px;
}

.pei-preview-section:last-child {
    margin-bottom: 0;
}

.pei-preview-section-title {
    font-weight: 700;
    color: #2e5f93;
    margin-bottom: 7px;
}

.pei-place-line + .pei-place-line {
    margin-top: 8px;
}

.pei-fraction-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    align-items: center;
    margin-bottom: 5px;
    font-size: .85rem;
}

.pei-fraction-item {
    text-align: center;
    white-space: nowrap;
}

.pei-fraction-item strong {
    color: #3b8d3a;
}

.pei-number-line {
    width: 100%;
    display: block;
    height: auto;
}

.pei-read-answers,
.pei-encadre-grid,
.pei-intercale-grid {
    display: grid;
    gap: 8px 18px;
}

.pei-read-answers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 4px;
}

.pei-encadre-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pei-intercale-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 12px;
}

.pei-intercale-item {
    white-space: nowrap;
}

.pei-frac-blank .frac-num {
    min-width: 1.8em;
    color: transparent;
}

.pei-answer-line {
    display: inline-block;
    min-width: 48px;
    border-bottom: 1px solid #6f7f91;
    vertical-align: middle;
    height: 1em;
}

.pei-correct {
    color: #7656a5;
    font-weight: 700;
}

.pei-preview-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid #d8e0e6;
    margin-top: 9px;
    padding-top: 5px;
    font-size: .72rem;
    color: #687782;
}

.pei-fiches .frac-html {
    vertical-align: middle;
}

@media (max-width: 1199.98px) {
    .pei-fiches-panel {
        position: static;
    }
}
