/* =====================================================================
   /maths/calcul/division/fiches/fiches.css
   ===================================================================== */
.division-fiches-preview { min-height: 420px; }

.df-page {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    padding: 1rem;
}

.df-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid #ced4da;
    border-radius: .5rem;
    padding: .5rem .75rem;
    margin-bottom: 1rem;
    font-size: .95rem;
}

.df-page-meta { font-weight: 700; }

.df-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
}

.df-grid.student { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.df-card {
    border: 1px solid #d9d9d9;
    border-radius: .8rem;
    padding: .6rem .7rem;
    background: #fff;
    min-width: 0;
}

.df-card-title {
    color: #6c757d;
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.df-transformation {
    text-align: center;
    font-size: .76rem;
    color: #6c757d;
    margin-bottom: .3rem;
}

.df-potence-wrap {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding: .2rem 0;
}

.df-potence {
    display: flex;
    align-items: stretch;
    justify-content: center;
    font-family: "Courier New", monospace;
}

.df-potence-vline {
    flex: 0 0 0;
    width: 0;
    border-left: 2px solid #212529;
    align-self: stretch;
}

.df-work {
    display: flex;
    flex-direction: column;
    padding-right: .35rem;
}

.df-work-row {
    display: flex;
    height: 22px;
    line-height: 1;
}

.df-sign {
    width: 18px;
    min-width: 18px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
}

.df-cell {
    width: 18px;
    min-width: 18px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 1.05rem;
    font-weight: 700;
}

.df-dividend { color: #198754; }
.df-product { color: #d63384; border-bottom: 1.5px solid #212529; }
.df-remainder { color: #fd7e14; }
.df-quotient-digit { color: #6f42c1; }
.df-zero-added { color: #adb5bd; }

.df-has-comma { position: relative; }
.df-comma {
    position: absolute;
    right: -4px;
    bottom: -2px;
    color: #dc3545;
    font-family: Arial, sans-serif;
    font-size: 1.2rem;
    line-height: 1;
    z-index: 2;
}

.df-bring-down::before {
    content: "↓";
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    color: #0d6efd;
    font-size: .72rem;
    font-family: Arial, sans-serif;
}

.df-right {
    min-width: 70px;
    font-family: "Courier New", monospace;
}

.df-divisor-box {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 .4rem;
    border-bottom: 2px solid #212529;
    font-size: 1.05rem;
    font-weight: 700;
    color: #198754;
}

.df-quotient-box {
    min-height: 30px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: .2rem .3rem 0;
}

.df-quotient-blank {
    display: block;
    min-width: 48px;
    min-height: 22px;
    border-bottom: 1px dotted #adb5bd;
}

.df-blank-row .df-cell {
    border-bottom: 1px solid #f0f1f2;
}

.df-proof {
    margin-top: .35rem;
    text-align: center;
    font-size: .75rem;
    color: #495057;
}

.df-inline-expression {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: .35rem 0 .55rem;
}

.df-to-pose-grid {
    height: 150px;
    border: 1px solid #d9d9d9;
    background-image:
        linear-gradient(#e9ecef 1px, transparent 1px),
        linear-gradient(90deg, #e9ecef 1px, transparent 1px);
    background-size: 22px 22px;
}

@media (max-width: 992px) {
    .df-grid,
    .df-grid.student {
        grid-template-columns: 1fr;
    }
}
