/* ============================================================
   Onglet Simulation : charte commune (08/10/2026), même géométrie
   que Comparaison et Portefeuille. Préfixe `.sim-`, tokens `.bk-*`
   de book_theme.css : la surface `.bk-block-card` est fixe et sombre
   dans les deux thèmes (jamais un littéral de couleur seul, règle D1b).
   Libellés et aides de champ : `.bk-field-label` / `.bk-field-help`.
   ============================================================ */

.sim-root { font-family: var(--font-primary); }

/* --- Modèle choisi --- */
.sim-model-desc:empty { display: none; }
.sim-model-card {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid var(--bk-glass-border);
    border-radius: 12px;
    background: var(--bk-glass-bg);
}
.sim-model-name {
    font-weight: 700;
    color: var(--bk-cyan);
    margin-bottom: 4px;
}
.sim-model-text {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--bk-ink);
    margin-bottom: 6px;
}
.sim-root .sim-param-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bk-ink);
    margin-bottom: 4px;
}
.sim-auto-calibration {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border: 1px dashed var(--bk-glass-border);
    border-radius: 12px;
    font-size: 0.88rem;
    color: var(--bk-muted);
}

/* --- Fenêtre : le sélecteur de dates prend la largeur de sa colonne --- */
.sim-root .sim-date-range,
.sim-root .sim-date-range .DateRangePickerInput {
    width: 100%;
    display: flex;
}
/* MESURÉ (390 px) : `.DateRangePicker` et son div intermédiaire restaient
   inline-block à 238 px, champs à 74 px, dates coupées (« 2020-0 »). */
.sim-root .sim-date-range .DateRangePicker,
.sim-root .sim-date-range .DateRangePicker > div { display: block; width: 100%; }
.sim-root .sim-date-range .DateRangePickerInput { align-items: center; }
.sim-root .sim-date-range .DateInput {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}
.sim-root .sim-date-range .DateInput_input {
    width: 100%;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
    font-variant-numeric: tabular-nums;
}
.sim-root .sim-date-range .DateRangePickerInput_arrow { flex: 0 0 auto; padding: 0 6px; }

/* --- Lancement --- */
.sim-actions { display: flex; }
.sim-actions .sim-cta { flex: 1 1 auto; }

/* --- Résultats --- */
.sim-results:empty { display: none; }
.sim-results > .bk-blocks { gap: 1.9rem; }
.sim-metric-label {
    font-size: 0.7rem;
    color: var(--bk-muted);
    max-width: 18ch;
    line-height: 1.25;
}
.sim-gain { color: var(--bk-gain) !important; }
.sim-loss { color: var(--bk-loss) !important; }
.sim-convention { margin-top: -0.6rem; margin-bottom: 0.8rem; }
.sim-quality { margin-bottom: 1.2rem; }
.sim-quality .bk-eyebrow + .bk-eyebrow { margin-top: 4px; }
.sim-section { margin-top: 1.4rem; }
.sim-graph { width: 100%; }
