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

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

.ler-fiches-preview {
    min-height: 380px;
}

.ler-preview-viewport {
    width: 100%;
    overflow-x: auto;
    padding: .25rem 0 .5rem;
}

.ler-preview-sheet {
    width: min(100%, 980px);
    min-width: 850px;
    aspect-ratio: 297 / 210;
    margin: 0 auto;
    padding: 16px 18px 13px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border: 1px solid #d6dbe3;
    border-radius: .45rem;
    background: #fff;
    box-shadow: 0 .2rem .8rem rgba(0, 0, 0, .06);
    color: #20252b;
}

.ler-preview-header {
    display: grid;
    grid-template-columns: 80px 1fr 80px;
    align-items: center;
    margin-bottom: 8px;
}

.ler-preview-logo,
.ler-preview-code,
.ler-preview-footer {
    color: #6c757d;
    font-size: .68rem;
}

.ler-preview-code {
    text-align: right;
}

.ler-preview-title {
    color: #2f4f90;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
}

.ler-preview-name {
    display: flex;
    gap: 2.2rem;
    margin-bottom: 8px;
    font-size: .72rem;
}

.ler-preview-correction {
    margin-bottom: 8px;
    color: #198754;
    font-size: .74rem;
    font-weight: 700;
}

.ler-section {
    flex: 1 1 0;
    min-height: 0;
    margin-bottom: 9px;
    display: flex;
    flex-direction: column;
}

.ler-section-title {
    margin-bottom: 5px;
    padding: 5px 8px;
    background: #eef3fb;
    font-size: .76rem;
    font-weight: 700;
}

.ler-grid {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px 10px;
    grid-auto-rows: minmax(0, 1fr);
    align-items: stretch;
}

.ler-item {
    min-width: 0;
    font-size: .72rem;
    line-height: 1.18;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ler-item--word {
    text-align: left;
    justify-content: flex-start;
}


.ler-answer-line {
    display: inline-block;
    min-width: 105px;
    margin-left: 4px;
    border-bottom: 1px solid #8f99a5;
}

.ler-correct {
    color: #198754;
    font-weight: 700;
}

.ler-strip {
    display: grid;
    width: 100%;
    height: 34px;
    margin: 2px auto;
    border: 1px solid #263238;
}

.ler-strip-cell {
    border-right: 1px solid #263238;
    background: #fff;
}

.ler-strip-cell:last-child {
    border-right: 0;
}

.ler-strip-cell.is-filled {
    background: #b9d8ff;
}

.ler-item--decomp {
    font-size: .69rem;
    white-space: nowrap;
}

.ler-decomp-blank {
    display: inline-block;
    min-width: 20px;
    border-bottom: 1px solid #737d88;
}

.ler-preview-footer {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
}

#lerPreviewSwitch .btn.active {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

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

/* Le rendu des fractions et opérateurs vient de /assets/css/fraction_francaise.css. */
.ler-preview-sheet .frac-html { font-size: 1em; }
.ler-preview-sheet .math-line { font-size: .78rem; line-height: 2.15; }
