/*  ── DENSITÉ « COMPACT » (10/10/2026, Arthur : « que le toggle confort/compact impacte plus de choses que juste les cards du hub »)
    Apparence → Confort | Compact pose html[data-density="compact"] (iku.density, anti-flash d'index.html, window.ikuDensity).
    But du Compact : PLUS DE CHIFFRES VISIBLES SANS DÉFILER. On resserre espacements, hauteurs de lignes, de graphiques et de
    contrôles ; on ne réduit ni les chiffres ni les titres. Au téléphone, les cibles tactiles gardent 44 px (le Compact réduit
    l'espace, jamais le confort du doigt). Le Confort ne change pas : toute règle est sous html[data-density="compact"].
    Feuille chargée après les feuilles de style (Mat, Papier) : elle s'applique dans les trois styles.
    Les règles historiques du Compact restent dans analyses.css (bloc « Densité »). */


/*  ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
    1. LOT A : les tableaux (pilotage, Mes analyses, Mes clients, Reporting, Portefeuille, détail par compte).
    ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/*  Principe : rangées ~20 % plus basses (marges verticales des cellules), texte courant d'un demi-pixel plus petit, rangées
    d'en-tête allégées. Les chiffres des totaux et des en-têtes gardent leur corps. Seules les marges VERTICALES bougent : les
    marges horizontales (et leurs variantes au téléphone) restent celles de chaque feuille. Mesures à 1 440 × 900 dans le
    rapport du lot ; aucun texte rogné vérifié en Moderne sombre et Papier clair. */

/*  ── A1. Le tableau du pilotage (FinTreeTable, .ftt) et ses hôtes ─────────────────────────────────────────────────────────
    Le composant pose déjà `td { padding-block: 0 }` en Compact (FinTreeTable.razor) : on ajoute le demi-pixel de texte sur
    les rangées courantes et des rangées d'en-tête plus basses. Le <style> du composant est dans le corps de la page, donc
    APRÈS cette feuille : chaque règle ici est plus spécifique que celle qu'elle contredit. */
html[data-density="compact"] .ftt tbody tr:not(.ft-major):not(.ft-sub):not(.ft-title) {
    font-size: calc(var(--ftt-fs, 11px) - .5px); }
/*  Interligne 1,5 → 1,4 : un pixel de plus par rangée, sans rogner les champs de 15 px (le Reporting est déjà à 1,4). */
html[data-density="compact"] .ftt tbody td { line-height: 1.4; }
/*  Bande « Historique / Prévisionnel » : 16 px au lieu de 20. Sa hauteur est aussi le `top` collant du 2e étage (variable
    partagée) ; interligne et marges ramenés pour que le contenu (10,5 px) tienne dans les 16 px, sinon la bande grandit et les
    deux étages se chevauchent au défilement. La Création de valeur, sans bande (0 px), le reste. */
html[data-density="compact"] .ftt-wrap { --ftt-bandh: 16px; }
html[data-density="compact"] .crea-etats-tab .ftt-wrap { --ftt-bandh: 0px; }
html[data-density="compact"] .ftt tr.ftt-band th { line-height: 1.3; padding-top: 1px; padding-bottom: 1px; }
html[data-density="compact"] .ftt thead tr.ftt-head th,
html[data-density="compact"] .ftt.ftt-noband thead th.ftt-hdrtools { padding-top: 1px; padding-bottom: 1px; }
/*  Les champs de taux (%Mb, croissance) : 17 px alignés sur la ligne de base faisaient des rangées de taux de 18,2 px, plus
    hautes que les montants. 15 px centrés : la rangée suit son texte. */
html[data-density="compact"] .ftt .margin-edit-cell { height: 15px; vertical-align: middle; }

/*  Reporting (.rep-tab) : le Compact du composant mettait ses rangées de 32 px à 18 px (−44 %), au point d'écraser le relief
    voulu le 28/09. On les ramène à ~25 px (−22 %) ; agrégats, taux et en-tête suivent la même proportion. */
html[data-density="compact"] .rep-tab .ftt tbody td { padding-top: 3px; padding-bottom: 3px; }
html[data-density="compact"] .rep-card.rep-tab .ftt tbody tr.ft-major > td { padding-top: 6px; padding-bottom: 6px; }
html[data-density="compact"] .rep-card.rep-tab .ftt tbody tr.ft-perc > td { padding-top: 2px; padding-bottom: 3px; }
html[data-density="compact"] .rep-tab .ftt.ftt-noband thead th,
html[data-density="compact"] .rep-card.rep-tab .ftt.ftt-noband thead th { padding-top: 7px; padding-bottom: 6px; }
html[data-density="compact"] .rep-card.rep-tab .ftt.rpc-t tr.ftt-band th { padding-top: 6px; padding-bottom: 4px; }

/*  ── A2. Mes analyses (.atb-fin : qualité, rapprochement ; .aex-tbl : charges, point mort, concentration) ───────────────
    Rangée : 28,5 px → ~23 px. Les totaux (tr.tot, tr.is-tot) gardent 11,5 px. */
html[data-density="compact"] .atb-fin,
html[data-density="compact"] .aex-tbl { font-size: 11px; }
html[data-density="compact"] .atb-fin th,
html[data-density="compact"] .atb-fin td,
html[data-density="compact"] .aex-tbl th,
html[data-density="compact"] .aex-tbl td { padding-top: 3.5px; padding-bottom: 3.5px; }
html[data-density="compact"] .aex-tbl thead th { padding-top: 4px; padding-bottom: 3.5px; }
html[data-density="compact"] .atb-fin tr.tot > *,
html[data-density="compact"] .aex-tbl tr.is-tot > * { font-size: 11.5px; }
html[data-density="compact"] .aex-tbl .aex-cell-l small { margin-top: 0; }

/*  ── A3. Valorisation, financement, cession (.lbo-fin, .csn-fin) : même gabarit que Mes analyses ───────────────────────── */
html[data-density="compact"] .lbo-fin,
html[data-density="compact"] .csn-fin { font-size: 11px; }
html[data-density="compact"] .lbo-fin th,
html[data-density="compact"] .lbo-fin td,
html[data-density="compact"] .csn-fin th,
html[data-density="compact"] .csn-fin td:not(.in):not(.c-x) { padding-top: 3.5px; padding-bottom: 3.5px; }
html[data-density="compact"] .lbo-fin thead th,
html[data-density="compact"] .csn-fin thead th { padding-top: 5px; padding-bottom: 4px; }
/*  Les totaux ont leur corps propre (12 px, 12,5 px en cession) : seules leurs marges baissent ; le sous-total le garde. */
html[data-density="compact"] .lbo-fin tr.sub > * { font-size: 11.5px; }
html[data-density="compact"] .lbo-fin tr.tot > *,
html[data-density="compact"] .csn-fin tr.tot > * { padding-top: 5px; padding-bottom: 5px; }
/*  Échéancier : l'en-tête de groupe et l'espace avant chaque groupe (fait d'une ombre intérieure de la couleur du fond). */
html[data-density="compact"] .lbo-fin tr.grp > th { padding-top: 6px; padding-bottom: 5px; }
html[data-density="compact"] .lbo-fin tr.grp:not(:first-child) > th { padding-top: 13px; box-shadow: inset 0 7px 0 var(--tw-bg); }
html[data-density="compact"] .lbo-fin tr.end > * { padding-bottom: 6px; }

/*  ── A4. Mes clients (.tcl-*, grille en display: contents) ──────────────────────────────────────────────────────────────
    Rangée de 37,6 px (nom sur deux lignes) → ~31 px. Le pied (totaux) garde son corps : seul le corps défilant rapetisse. */
html[data-density="compact"] .tcl-td { padding-top: 3px; padding-bottom: 3px; }
html[data-density="compact"] .tcl-th { padding-top: 4px; padding-bottom: 4px; }
html[data-density="compact"] .tcl-table-body-scroll .tcl-table { font-size: 10.5px; }
html[data-density="compact"] .tcl-rank-badge { height: 20px; }

/*  ── A5. Portefeuille (.pf-tbl, .pf-prev) ────────────────────────────────────────────────────────────────────────────────
    Le pied (totaux) et l'en-tête gardent leur corps ; leurs 11 px de marge passent à 7. */
html[data-density="compact"] .pf-tbl { font-size: 12px; }
html[data-density="compact"] .pf-tbl th,
html[data-density="compact"] .pf-tbl td { padding-top: 4px; padding-bottom: 4px; }
html[data-density="compact"] .pf-tbl thead th { padding-top: 7px; padding-bottom: 7px; }
html[data-density="compact"] .pf-tbl tfoot td { padding-top: 7px; padding-bottom: 7px; font-size: 12.5px; }
html[data-density="compact"] .pf-tbl tbody tr.pf-tier td { padding-top: 5px; padding-bottom: 4px; }
html[data-density="compact"] .pf-prev td { padding-top: 4px; padding-bottom: 4px; }
/*  La hauteur d'une rangée est celle de la colonne « Tréso. prévi » : courbe de 20 px + pastille empilées (56 px en Confort).
    Courbe de 16 px (tracé étiré, preserveAspectRatio='none') et pastille d'un pixel plus mince : ~41 px. */
html[data-density="compact"] .pf-tbl .pf-traj-spk { height: 16px; margin-bottom: 1px; }
html[data-density="compact"] .pf-tbl .pf-traj { padding-top: 1px; padding-bottom: 1px; }

/*  ── A6. Comparables et multiples (.cmp-tbl, .mx-table) ──────────────────────────────────────────────────────────────── */
html[data-density="compact"] .cmp-tbl td { padding-top: 3.5px; padding-bottom: 3.5px; }
html[data-density="compact"] .cmp-tbl th { padding-top: 5px; padding-bottom: 5px; }
html[data-density="compact"] .mx-table td,
html[data-density="compact"] .mx-table th { padding-top: 5px; padding-bottom: 5px; }

/*  (fin du lot A) */



/*  ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
    2. LOT B : le hub au-dessus de la ligne de flottaison, et les hauteurs des graphiques.
    ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/*  2.1 Hub (FecLoader.razor, actualisation.css) : on rapproche la barre du haut, les chiffres clés, le bandeau d'actualisation, la
    barre des formules, « Que voulez-vous explorer ? », « Aujourd'hui » et les priorités, pour que les trois cartes remontent.
    Mesure à 1440 x 900 (FEC fictifs alpha) : haut de .intent-cards 551 px en Confort, 385 en Compact (les
    trois cartes entières à l'écran). Écran large seulement (au-delà de 900 px) : au téléphone, les chiffres clés sont repliés et les cibles tactiles gardent leur taille. Chiffres et titres inchangés. */
@media (min-width: 901px) {
    html[data-density="compact"] :is(.recap-bar, .hg-barre) { padding-top: 6px; padding-bottom: 6px; }
    html[data-density="compact"] .intent-zone { gap: 10px; padding-top: 8px; padding-bottom: 16px; }
    html[data-density="compact"] .kpi-strip { margin-bottom: 4px; }
    html[data-density="compact"] .kpi { padding-top: 6px; padding-bottom: 5px; row-gap: 0; }
    html[data-density="compact"] .kpi-ico { width: 28px; height: 28px; border-radius: 9px; }
    /*  Bandeau d'actualisation et barre des formules : la barre reste accrochée au bandeau (6 px entre les deux, comme en Confort :
        marge du bandeau + écart de la colonne, moins ce retrait). */
    html[data-density="compact"] .actu-bandeau { padding-top: 5px; padding-bottom: 5px; margin-bottom: 6px; }
    html[data-density="compact"] .actu-bandeau + .vit-barre { margin-top: -10px; }
    html[data-density="compact"] .vit-barre { margin-bottom: 2px; }
    html[data-density="compact"] .vit-in { padding-top: 3px; padding-bottom: 3px; }
    html[data-density="compact"] .vit-seg { padding: 2px; }
    html[data-density="compact"] .vit-seg-b { padding-top: 5px; padding-bottom: 5px; }
    /*  « Aujourd'hui » et « Mes priorités » : un seul bloc serré sous le titre. */
    html[data-density="compact"] .prio-wrap { gap: 6px; margin-bottom: 4px; }
    html[data-density="compact"] .today-band { padding-top: 4px; padding-bottom: 4px; margin-bottom: 0; }
    html[data-density="compact"] .today-go,
    html[data-density="compact"] .today-plan { padding-top: 4px; padding-bottom: 4px; }
    html[data-density="compact"] .prio-chip { padding-top: 4px; padding-bottom: 4px; }
    /*  Bandeau de couverture (Mat, Papier, avec une image d'ambiance) : il finit 16 px sous la barre du haut ; la barre perd 12 px. */
    html[data-density="compact"][data-style="mat"] { --mt-couverture: 84px; }
}

/*  2.2 Hauteurs des graphiques : un graphique et ses chiffres sur un même écran. Les graphiques ApexCharts prennent la hauteur de
    leur conteneur (clientHeight ou '100 %') : on raccourcit le conteneur, le JS suit au rendu suivant ; une bascule Confort ⇄ Compact
    redessine les graphiques ouverts (ikuDensity.set, app.js). */

/*  Simulateur de trésorerie (Overview, #apexTresoChart) : le conteneur porte sa hauteur EN LIGNE (clamp(260px,44vh,440px), 28vh au
    téléphone sous 460 px) ; il suit l'en-tête de la carte. 396 px à 900 px de haut en Confort, 297 px en Compact. */
@media (min-width: 460px) {
    html[data-density="compact"] .overview-chart-card[data-blk="treso-chart"] > .chart-header + div { height: clamp(200px, 33vh, 330px) !important; }
}
html[data-density="compact"] .overview-chart-card .chart-header { margin-bottom: 4px; }

/*  Pilotage, vue Graphiques (PilotDataViz.razor) : 300 et 320 px en Confort. Les anneaux (rentabilité, BFR) portent des chiffres :
    leur taille ne change pas. */
html[data-density="compact"] .pdvb-chart { height: 228px; }
html[data-density="compact"] .pdvb-chart-tall { height: 244px; }

/*  Reporting (reporting.css) : graphiques SVG à viewBox. Celui de l'année s'étire (preserveAspectRatio none) : on borne sa hauteur.
    Celui du mois et le pont gardent leurs proportions (224 et 204 px mesurés à 1440 px, inchangés) : les raccourcir en CSS les
    rétrécirait aussi en largeur ; il faudrait une hauteur de viewBox propre au Compact (Layout.IsCompact, ReportingView.razor). */
html[data-density="compact"] .rep-g { min-height: 7rem; margin-top: 6px; }
html[data-density="compact"] .rep-g-an { min-height: 9rem; }
html[data-density="compact"] .rep-g-an > svg { height: 9rem; }
html[data-density="compact"] .rep-pont { margin-top: 6px; }

/*  Autres graphiques à hauteur fixe (analyses.css) : trésorerie du rapport, arbitrage de rémunération, synthèse du pilotage,
    évolution (cev), hypothèses. Environ trois quarts. */
html[data-density="compact"] .rpt-treso-block:not(.rpt-treso-fill) .rpt-treso-canvas { height: 256px; }
html[data-density="compact"] .rpt-treso-block:not(.rpt-treso-fill) .rpt-treso-canvas-wrap { height: 256px; }
html[data-density="compact"] .remun-arb-chart { height: 180px; }
html[data-density="compact"] .fts-chart-canvas { height: 168px; }
html[data-density="compact"] .cev-chart { height: 228px; }
html[data-density="compact"] .hyp-chart-body { height: 150px; }

/*  (fin du lot B) */



/*  ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
    3. LOT C : fenêtres et volets (en-têtes, marges, écarts entre cartes, largeur des volets), menus, boutons, champs, sélecteurs.
    ════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════

    Règle d'écriture : chaque surcharge reprend le sélecteur d'origine précédé de html[data-density="compact"], ce qui la place
    exactement un cran au-dessus de lui et pas plus. Quand une règle de base est souvent affinée ailleurs (.apop-content,
    .apop-header, .custom-dropdown-trigger), elle passe par :where() : le Compact bat la règle générique et laisse gagner les
    réglages propres à une vue (la coque des Analyses, la barre de la Cession, la combo d'un en-tête).
    Tout est réservé aux écrans de plus de 720 px (fenêtres) ou de 640 px (menus et contrôles) : au téléphone, les vues ont déjà
    leurs propres marges resserrées et les cibles tactiles gardent leurs 44 px. Les chiffres et les titres gardent leur taille. */

/*  ── 3.1 Fenêtres : en-têtes plus minces, marges et écarts entre cartes réduits d'un tiers environ ───────────────────────────── */
@media (min-width: 721px) {
    /*  Vues du hub (simulateur, Mes clients, valorisation…) : l'en-tête passe de 57 à 45 px. Les flèches suivent (28 px) pour que le
        titre reste centré sur elles ; les pastilles de vue, hors flux sous le titre, gardent 6 px d'air au-dessus du filet. */
    html[data-density="compact"] .intent-popup-header { padding: 4px 5px 12px; }
    html[data-density="compact"] .intent-popup-arrow,
    html[data-density="compact"] .intent-popup-close { width: 28px; height: 28px; }
    html[data-density="compact"] .intent-popup-view-wrapper { padding: 6px; }

    /*  Mes analyses, Cession, Financement (.apop) : barre absolue de 47 à 39 px, le contenu remonte d'autant. */
    html[data-density="compact"] :where(.apop-header) { padding-top: 4px; padding-bottom: 4px; }
    html[data-density="compact"] :where(.apop-content) { padding: 44px 14px 16px; }
    html[data-density="compact"] .apop-plein:not(.atb-coque) .apop-content.is-lbo { padding-top: 44px; }
    /*  Cession : barre d'onglets de 50 à 42 px, le défileur la suit (sa réserve basse pour les boutons flottants ne bouge pas). */
    html[data-density="compact"] .apop-header.csn-bar { height: 42px; }
    html[data-density="compact"] .apop-content.csn-content { padding-top: 52px; padding-left: 14px; padding-right: 14px; }
    html[data-density="compact"] .csn { gap: 10px; }
    html[data-density="compact"] .csn-card { padding: 9px 12px 10px; }
    html[data-density="compact"] .csn-card-t { margin-bottom: 7px; }
    html[data-density="compact"] .csn-kpis { gap: 7px; }
    html[data-density="compact"] .csn-pont { gap: 12px; }
    html[data-density="compact"] .csn-pont-side { padding-left: 12px; }

    /*  Mes analyses (coque .atb-coque) : barre d'onglets de 54 à 44 px en large, onglets moins hauts en étroit. */
    @container atb-barre (min-width: 1281px) {
        html[data-density="compact"] .atb-bar-in { min-height: 44px; }
        html[data-density="compact"] .atb-tab { padding: 12px 12px 10px; }
    }
    @container atb-barre (max-width: 1280px) {
        html[data-density="compact"] .atb-bar-in { padding-top: 4px; }
        html[data-density="compact"] .atb-tab { padding-top: 6px; padding-bottom: 8px; }
    }
    html[data-density="compact"] .atb-coque .apop-content:not(.is-lbo) { padding-top: 12px; padding-left: clamp(10px, 2vw, 20px); padding-right: clamp(10px, 2vw, 20px); }
    html[data-density="compact"] .atb-root { gap: 10px; }
    html[data-density="compact"] .atb-kpis { gap: 7px; }
    html[data-density="compact"] .atb-card { padding: 9px 12px; }
    html[data-density="compact"] .atb-card-t { margin-bottom: 6px; }

    /*  Financement (LBO, emprunt) */
    html[data-density="compact"] .lbo { gap: 8px; padding-top: 9px; padding-left: 16px; padding-right: 16px; }
    html[data-density="compact"] .lbo-cfg { gap: 6px; }
    html[data-density="compact"] .lbo-res { gap: 8px; padding-top: 8px; }
    html[data-density="compact"] .lbo-res-2 { gap: 8px; }
    html[data-density="compact"] .lbo-top { gap: 7px; }
    html[data-density="compact"] .lbo-main { column-gap: 12px; }
    html[data-density="compact"] .lbo-head { gap: 12px; }
    html[data-density="compact"] .lbo-kpis { gap: 7px; }
    html[data-density="compact"] .lbo-card { padding: 9px 12px; }
    html[data-density="compact"] .lbo-card-t { margin-bottom: 6px; }

    /*  Simulateur (vue d'ensemble .ov4) */
    html[data-density="compact"] .ov4-main { gap: 10px; }
    html[data-density="compact"] .ov4-left { gap: 10px; }
    html[data-density="compact"] .ov4-side { gap: 8px; }
    html[data-density="compact"] .ov4-tiles { gap: 8px; }
    html[data-density="compact"] .ov4-card { padding: 9px 11px; }
    html[data-density="compact"] .ov4-card-t { margin-bottom: 6px; }
    html[data-density="compact"] .ov4-sub-t { margin: 8px 0 4px; padding-top: 7px; }

    /*  Valorisation (.vl3) */
    html[data-density="compact"] .vl3-shell { gap: 10px; }
    html[data-density="compact"] .vl3-hero { padding: 9px 14px; gap: 12px; }
    html[data-density="compact"] .vl3-soccer { padding: 7px 14px 10px; }
    html[data-density="compact"] .vl3-panel { gap: 7px; padding: 9px; }
    html[data-density="compact"] .vl3-card { padding: 8px 10px; }
    html[data-density="compact"] .vl3-card-t { margin-bottom: 6px; }
    html[data-density="compact"] .stresspanel-dock { padding: 9px; }

    /*  Mes clients (.tcl) */
    html[data-density="compact"] .tcl-hero { padding: 9px 14px; gap: 12px; }
    html[data-density="compact"] .tcl-main { gap: 8px; padding: 8px 10px 10px; }
    html[data-density="compact"] .tcl-panel { gap: 6px; }

    /*  Pilotage : volet des hypothèses de 320 à 300 px de large, marges intérieures resserrées (essayé à 284 px : les onglets
        « Hypothèses (3) » et « Repères » passaient sur deux lignes et les noms d'hypothèse étaient coupés, le volet s'allongeait).
        Une largeur choisie à la poignée (style en ligne) l'emporte toujours ; sous 1 120 px, le volet est empilé sous l'arbre. */
    html[data-density="compact"] .fintree-side { padding: 7px 10px 9px; }
    html[data-density="compact"] .side-modebar { gap: 6px; margin-bottom: 7px; }
    html[data-density="compact"] .pilot-tab { padding: 5px 6px; }
    html[data-density="compact"] .fintree-side-scroll { margin: 0 -10px; padding: 2px 10px; }
    html[data-density="compact"] .fintree-tools-menu { padding: 4px; }
    html[data-density="compact"] .fintree-tools-grp { padding: 4px 10px 1px; }

    /*  PowerPoint (.memo-*) : en-tête de 54 à 44 px, étapes, corps et pied resserrés. */
    html[data-density="compact"] .memo-fond { padding: 10px; }
    html[data-density="compact"] .memo-tete { padding: 7px 12px 6px 18px; }
    html[data-density="compact"] .memo-etapes { padding: 8px 18px 0; }
    html[data-density="compact"] .memo-etapes button { gap: 6px; padding-bottom: 8px; }
    html[data-density="compact"] .memo-corps { padding: 12px 18px 14px; gap: 11px; }
    html[data-density="compact"] .memo-cartes { gap: 8px; }
    html[data-density="compact"] .memo-carte { padding: 10px 12px 9px; }
    html[data-density="compact"] .memo-carte-ic { width: 34px; height: 34px; }
    html[data-density="compact"] .memo-grille { gap: 8px; padding: 2px 12px 10px; }
    html[data-density="compact"] .memo-pied { padding: 9px 18px; gap: 12px; }

    /*  Reporting (.rep-*) : en-tête de 59 à 49 px, barre de contrôle, corps et cartes. */
    html[data-density="compact"] .rep-head { padding-top: 7px; padding-bottom: 7px; }
    html[data-density="compact"] .rep-ctrl { padding-top: 6px; padding-bottom: 6px; }
    html[data-density="compact"] .rep-body { padding-top: 10px; padding-bottom: 12px; }
    html[data-density="compact"] .rep-bord { gap: 8px; }
    html[data-density="compact"] .rep-constat { gap: 18px; }
    html[data-density="compact"] .rep-preuve,
    html[data-density="compact"] .rep-bas { gap: 10px; }
    html[data-density="compact"] .rep-card { padding: 13px; }
    html[data-density="compact"] .rep-att { padding: 12px; }
    html[data-density="compact"] .rep-att-l { margin-top: 6px; }

    /*  Portefeuille (.pf-*) : barre du haut de 13 à 8 px de marge. */
    html[data-density="compact"] .pf-top { padding-top: 8px; padding-bottom: 8px; }
}

/*  Pilotage : la largeur du volet ne se règle qu'en disposition côte à côte (au-dessus de 1 120 px). */
@media (min-width: 1121px) {
    html[data-density="compact"] .fintree-side { flex-basis: 300px; }
}

/*  Copilote ancré à droite : rail de 420 à 372 px, le hub et la coquille rendent la même largeur (au téléphone, le panneau est
    une feuille du bas pleine largeur, inchangée). */
@media (min-width: 641px) {
    html[data-density="compact"] .cop-panel.docked,
    html[data-density="compact"] .cop-panel.docked.has-chart { width: 372px; }
    html[data-density="compact"] body:has(.cop-panel.docked) .mud-layout { width: calc(100% - 372px); }
    html[data-density="compact"] body:has(.cop-panel.docked) .fec-loader { right: 372px; }
}

/*  ── 3.2 Menus, boutons, champs, sélecteurs (souris seulement : au-dessus de 640 px) ─────────────────────────────────────────── */
@media (min-width: 641px) {
    /*  Menu des boutons flottants : éléments de 37 à 31 px (au téléphone, la feuille garde ses 44 px, règle plus précise). */
    html[data-density="compact"] .fec-fab-menu { padding: 6px; }
    html[data-density="compact"] .fec-fab-item { padding-top: 4px; padding-bottom: 4px; }
    html[data-density="compact"] .fec-fab-grp-h { padding-top: 3px; padding-bottom: 3px; }
    html[data-density="compact"] .fec-fab-grp { padding: 2px 0; }

    /*  Menu du compte (la feuille du téléphone, .mcpt[data-feuille], garde ses propres marges). */
    html[data-density="compact"] .mcpt-tete { gap: 7px; padding: 6px 8px 8px; }
    html[data-density="compact"] .mcpt-i { padding-top: 5px; padding-bottom: 5px; }
    html[data-density="compact"] .mcpt-solde { padding-top: 6px; padding-bottom: 6px; }

    /*  Listes déroulantes et menu Outils du pilotage */
    html[data-density="compact"] .custom-dropdown-item { padding-top: 5px; padding-bottom: 5px; }
    html[data-density="compact"] :where(.custom-dropdown-trigger) { padding-top: 4px; padding-bottom: 4px; }
    html[data-density="compact"] .fintree-tools-item { padding-top: 5px; padding-bottom: 5px; }

    /*  Boutons et champs */
    html[data-density="compact"] .memo-btn { padding: 7px 14px; }
    html[data-density="compact"] .memo-btn.primaire.grand { padding: 9px 20px; }
    html[data-density="compact"] .memo-champ input,
    html[data-density="compact"] .memo-champ select,
    html[data-density="compact"] .memo-champ textarea { padding-top: 6px; padding-bottom: 6px; }
    html[data-density="compact"] :is(.dest-exemplaire, .logo-soc) { gap: 6px; padding: 8px 11px; }
    html[data-density="compact"] :where(.iku-btn-primary, .iku-btn-outlined, .iku-btn-text) { padding-top: 6px; padding-bottom: 6px; }
    html[data-density="compact"] :where(.iku-input, .iku-select) { padding-top: 5px; padding-bottom: 5px; }
    html[data-density="compact"] .rep-btn { height: 30px; }
    html[data-density="compact"] .rep-btn.rep-btn-ic { width: 30px; }
    html[data-density="compact"] .rep-x { width: 30px; height: 30px; }
    html[data-density="compact"] .apop-export-btn { padding-top: 4px; padding-bottom: 4px; }

    /*  Sélecteurs segmentés */
    html[data-density="compact"] .appx-density-seg button { padding: 4px 10px; }
    html[data-density="compact"] .appx-style-ligne button { padding: 3px 9px; }
    html[data-density="compact"] .rep-root .rep-seg .iku-seg-b { height: 25px; }
}

/*  (fin du lot C) */
