/* =====================================================================
   /maths/numeration/nombres_decimaux/placer_encadrer_intercaler_fractions_decimales/fiches/fiches.css
   ===================================================================== */
.dfp-fiches-panel { position: sticky; top: 1rem; }
.dfp-fiches-preview { overflow-x: auto; padding-bottom: .5rem; }
.dfp-preview-page {
    width: 100%;
    max-width: 760px;
    min-width: 640px;
    aspect-ratio: 210 / 297;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #d8e0e6;
    box-shadow: 0 .25rem .9rem rgba(0,0,0,.08);
    padding: 22px 24px 18px;
    color: #263238;
    font-size: 13px;
    display: flex;
    flex-direction: column;
}

.dfp-preview-header { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; border-bottom:2px solid #dce4eb; padding-bottom:8px; margin-bottom:8px; }
.dfp-preview-title { font-size:19px; font-weight:700; line-height:1.15; }
.dfp-preview-code { color:#2e5f93; font-weight:700; white-space:nowrap; }
.dfp-preview-meta { display:flex; justify-content:space-between; margin-bottom:8px; font-size:12px; }
.dfp-preview-correction { color:#7656a5; font-weight:700; text-align:right; }
.dfp-preview-section { border:1px solid #d8e0e6; border-radius:8px; padding:10px 12px; margin-bottom:18px; background:#fff; display:flex; flex-direction:column; }
.dfp-preview-section:nth-of-type(1) { flex:1.55 1 0; justify-content:space-between; }
.dfp-preview-section:nth-of-type(2) { flex:1.00 1 0; justify-content:space-between; }
.dfp-preview-section:nth-of-type(3) { flex:1.15 1 0; }
.dfp-preview-section:nth-of-type(4) { flex:1.90 1 0; margin-bottom:0; }
.dfp-preview-section:nth-of-type(3) .dfp-two-col,
.dfp-preview-section:nth-of-type(4) .dfp-two-col { flex:1; align-items:center; }
.dfp-preview-section:last-of-type { margin-bottom:0; }
.dfp-preview-section h3 { color:#2e5f93; font-size:14px; margin:0 0 6px; font-weight:700; }
.dfp-place-row + .dfp-place-row { margin-top:12px; }
/* Exercice 1 : la liste commence plus tôt et chaque égalité est centrée sur la barre de fraction. */
.dfp-line-head { display:grid; grid-template-columns:27% minmax(0,1fr); align-items:start; column-gap:10px; margin-bottom:5px; }
.dfp-line-title { font-weight:700; }
.dfp-fraction-list { display:flex; flex-wrap:wrap; gap:8px 15px; justify-content:flex-start; align-items:center; padding-top:7px; }
.dfp-fraction-item { display:inline-flex; align-items:center; white-space:nowrap; }
.dfp-label { font-weight:700; color:#3b8d3a; }
.dfp-math-text { display:inline-block; line-height:1; position:relative; top:-.10em; }
.dfp-number-line { display:block; width:100%; height:auto; flex:0 0 auto; overflow:visible; }
/* Exercice 2 : pas de marge négative ; le SVG réserve l'espace sous la droite pour les lettres. */
.dfp-number-line--read { margin-top:5px; margin-bottom:4px; }
.dfp-answer-row { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:7px; text-align:center; align-items:center; }
.dfp-answer-expression { display:inline-flex; align-items:center; justify-content:center; white-space:nowrap; }
.dfp-answer-line { display:inline-block; min-width:54px; border-bottom:1px solid #74838f; height:1.15em; vertical-align:bottom; }
/* Le corrigé conserve exactement la zone de réponse de la fiche élève. */
.dfp-answer-line--correct { height:auto; min-height:2.35em; padding:0 4px 2px; display:inline-flex; align-items:flex-end; justify-content:center; vertical-align:middle; }
.dfp-correct { color:#7656a5; font-weight:700; }
.dfp-two-col { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:14px; }
.dfp-mini-title { font-weight:700; margin-bottom:4px; color:#455a64; }
/* Exercice 3 : 4 items répartis sur 2 lignes pour éviter tout débordement. */
.dfp-grid-4 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:14px; row-gap:12px; align-items:center; }
.dfp-grid-3 { display:grid; grid-template-columns:repeat(3,1fr); column-gap:7px; row-gap:12px; align-items:center; }
.dfp-math-item { text-align:center; white-space:nowrap; min-width:0; min-height:42px; display:flex; justify-content:center; align-items:center; }
.dfp-order-set + .dfp-order-set { margin-top:14px; }
.dfp-order-source { display:flex; justify-content:center; flex-wrap:wrap; gap:6px 12px; align-items:center; }
.dfp-order-answer { margin-top:8px; min-height:28px; text-align:center; }
.dfp-order-blank { display:block; width:92%; margin:2px auto 0; border-bottom:1px solid #74838f; height:16px; }
/* Même ligne de réponse en mode exercice et corrigé ; la solution vient se poser dessus. */
.dfp-order-blank--correct { height:auto; min-height:34px; padding:0 4px 3px; display:flex; align-items:flex-end; justify-content:center; }
.dfp-frac { display:inline-flex; flex-direction:column; align-items:center; justify-content:center; line-height:1; min-width:2.1em; vertical-align:middle; }
.dfp-frac-n { padding:0 .2em .12em; color:#2458d3; font-weight:700; }
.dfp-frac-bar { width:100%; border-top:1.3px solid #263238; }
.dfp-frac-d { padding:.12em .2em 0; color:#d51f1f; font-weight:700; }
.dfp-op { display:inline-flex; align-items:center; justify-content:center; min-width:1.2em; margin:0 .18em; font-weight:700; position:relative; top:-.10em; line-height:1; }
.dfp-op--sep { min-width:auto; margin:0 .12em; font-weight:400; }
/* Exercice 4 : une réponse attendue entre deux fractions est matérialisée
   par un pointillé placé au niveau de leur barre, jamais par des underscores. */
.dfp-compare-blank { display:inline-block; width:30px; height:0; margin:0 5px; border-top:1.4px dotted #6f7f91; align-self:center; position:relative; top:-.10em; }
.dfp-footer { margin-top:auto; padding-top:7px; display:flex; justify-content:space-between; color:#6f7f91; font-size:10px; }
@media (max-width: 1199.98px) { .dfp-fiches-panel { position: static; } }
