/* ============================================================
   Recette V6 — Comptabilité (plan comptable, paramètres, journaux,
   FEC, clôture, archives) et Statistiques.
   Fichier séparé d'app.css : il reprend les jetons Aurora (--grad,
   --v1…, --r-lg…) sans toucher aux règles communes.
   ============================================================ */

/* ---------- Bandeau de module ---------- */
.cpt-hero {
    position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 1.6rem 1.9rem; margin-bottom: 1.2rem; color: #fff;
    background: linear-gradient(120deg, #2b1f6b 0%, #5b3cf0 42%, #4f7ff0 78%, #22c7e6 125%);
    box-shadow: 0 22px 48px rgba(60, 40, 180, .30);
}
.cpt-hero::before {
    content: ""; position: absolute; right: -80px; top: -110px; width: 340px; height: 340px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.26), transparent 65%);
}
.cpt-hero::after {
    content: ""; position: absolute; left: 32%; bottom: -150px; width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, rgba(184,242,74,.28), transparent 62%);
}
.cpt-hero > * { position: relative; z-index: 1; }
.cpt-hero .cpt-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.cpt-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; margin: .15rem 0 .25rem; color: #fff; }
.cpt-hero .cpt-sous { opacity: .9; font-size: .92rem; max-width: 62rem; }
.cpt-hero .cpt-big { font-family: var(--font-display); font-weight: 700; font-size: 2.35rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cpt-hero .cpt-hero-row { display: flex; flex-wrap: wrap; gap: 1.2rem 2.2rem; align-items: flex-end; justify-content: space-between; }
.cpt-hero .btn-light { background: rgba(255,255,255,.92); color: #3b2bb8; border: 0; }
.cpt-hero .btn-light:hover { background: #fff; color: var(--v1); }
.cpt-hero .btn-outline-light { border: 1.5px solid rgba(255,255,255,.55); color: #fff; }
.cpt-hero .btn-outline-light:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- Sous-navigation du module ---------- */
.cpt-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.3rem; }
.cpt-nav a {
    display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: 999px;
    background: rgba(255,255,255,.75); border: 1px solid var(--line); color: var(--ink-soft); font-weight: 600; font-size: .86rem;
    transition: background .15s, color .15s, box-shadow .15s, transform .12s;
}
.cpt-nav a:hover { background: #fff; color: var(--v1); transform: translateY(-1px); }
.cpt-nav a.is-active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: var(--sh-glow); }

/* ---------- Choix de la société (pastilles) ---------- */
.cpt-societes { display: flex; flex-wrap: wrap; gap: .35rem; }
.cpt-societe {
    display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .75rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
    background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28);
}
.cpt-societe:hover { background: rgba(255,255,255,.26); color: #fff; }
.cpt-societe.is-active { background: #fff; color: #3b2bb8; border-color: #fff; }
.cpt-societe .cpt-dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
/* Recette V9 : mêmes pastilles sur fond clair (plan comptable de l'administration). */
.cpt-societes--clair .cpt-societe { background: #fff; color: var(--ink); border-color: rgba(124,92,255,.22); }
.cpt-societes--clair .cpt-societe:hover { background: #f7f6fe; color: var(--ink); }
.cpt-societes--clair .cpt-societe.is-active { background: var(--grad-soft); color: var(--v1); border-color: rgba(124,92,255,.45); }
.cpt-societes--clair .cpt-societe .cpt-dot { box-shadow: none; }

/* ---------- Pastilles d'état ---------- */
.cpt-pill {
    display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; font-weight: 600; font-size: .76rem;
    padding: .2rem .65rem; border-radius: 999px; background: var(--grad-soft); color: var(--v1); border: 1px solid rgba(124,92,255,.16);
}
.cpt-pill.is-ok { background: rgba(34,197,94,.13); color: #15803d; border-color: rgba(34,197,94,.22); }
.cpt-pill.is-warn { background: rgba(245,158,11,.15); color: #b45309; border-color: rgba(245,158,11,.28); }
.cpt-pill.is-ko { background: rgba(239,68,68,.12); color: #b91c1c; border-color: rgba(239,68,68,.25); }
.cpt-pill.is-lock { background: #1f1b45; color: #fff; border-color: #1f1b45; }
.cpt-hero .cpt-pill { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.3); }
.cpt-hero .cpt-pill.is-ok { background: rgba(187,247,208,.95); color: #166534; border-color: transparent; }
.cpt-hero .cpt-pill.is-ko { background: #fee2e2; color: #991b1b; border-color: transparent; }
.cpt-hero .cpt-pill.is-warn { background: #fef3c7; color: #92400e; border-color: transparent; }

/* ---------- Bento de la page d'accueil ---------- */
.cpt-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.cpt-tile {
    grid-column: span 4; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: .35rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.15rem 1.25rem 1.2rem;
    box-shadow: var(--sh-sm); color: inherit; transition: transform .18s, box-shadow .18s, border-color .18s;
}
.cpt-tile.is-large { grid-column: span 6; }
.cpt-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: #dcd7fb; color: inherit; }
.cpt-tile::after {
    content: ""; position: absolute; right: -44px; top: -44px; width: 130px; height: 130px; border-radius: 50%;
    background: var(--grad-soft); opacity: .8;
}
.cpt-tile > * { position: relative; z-index: 1; }
.cpt-tile .cpt-chip {
    width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem;
    background: var(--grad); color: #fff; box-shadow: var(--sh-glow); margin-bottom: .35rem;
}
.cpt-tile h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: var(--ink); margin: 0; }
.cpt-tile p { margin: 0; color: var(--ink-faint); font-size: .85rem; }
.cpt-tile .cpt-tile-value { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.cpt-tile .cpt-tile-foot { margin-top: auto; padding-top: .5rem; display: flex; flex-wrap: wrap; gap: .35rem; }
@media (max-width: 1199.98px) { .cpt-tile, .cpt-tile.is-large { grid-column: span 6; } }
@media (max-width: 767.98px) { .cpt-tile, .cpt-tile.is-large { grid-column: span 12; } }

/* ---------- Tableau des sociétés (état comptable) ---------- */
.cpt-etat-societe { display: flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--ink); }
.cpt-etat-societe .cpt-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.cpt-table { margin-bottom: 0; }
.cpt-table td, .cpt-table th { vertical-align: middle; }
.cpt-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cpt-table code, .cpt-compte {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .84rem; background: #f1f0fb; color: #4c36d8;
    padding: .12rem .45rem; border-radius: 7px; white-space: nowrap;
}

/* ---------- Plan comptable ---------- */
.cpt-categorie {
    display: flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 700; color: var(--ink);
    font-size: .95rem; margin: 0 0 .6rem;
}
.cpt-categorie .cpt-flag { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: var(--v1); }
.cpt-compte-row .cpt-barre { height: 6px; border-radius: 6px; background: #efeefa; overflow: hidden; min-width: 70px; }
.cpt-compte-row .cpt-barre span { display: block; height: 100%; border-radius: 6px; background: var(--grad); }
.cpt-progression .cpt-barre { height: 8px; border-radius: 8px; background: #efeefa; overflow: hidden; }
.cpt-progression .cpt-barre span { display: block; height: 100%; border-radius: 8px; background: var(--grad); transition: width .3s ease; }
.cpt-progression[hidden] { display: none; }
.cpt-alerte-card { border-color: rgba(245,158,11,.35); }
.cpt-alerte-card .card-header { background: linear-gradient(90deg, rgba(245,158,11,.12), transparent 70%); }
.cpt-tiers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.cpt-tiers {
    border-radius: var(--r-md); padding: .65rem .8rem; background: #fafaff; border: 1px solid var(--line);
    display: flex; flex-direction: column; gap: .15rem; min-width: 0;
}
.cpt-tiers .cpt-tiers-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.cpt-tiers .cpt-tiers-value { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }

/* ---------- Paramètres ---------- */
.cpt-avertissement {
    display: flex; gap: .8rem; align-items: flex-start; border-radius: var(--r-md); padding: .85rem 1rem; margin-bottom: 1rem;
    background: linear-gradient(120deg, rgba(245,158,11,.14), rgba(245,158,11,.04)); border: 1px solid rgba(245,158,11,.3); color: #7c4a03;
}
.cpt-avertissement i { font-size: 1.2rem; color: #d97706; }
.cpt-avertissement.is-ok { background: linear-gradient(120deg, rgba(34,197,94,.12), rgba(34,197,94,.03)); border-color: rgba(34,197,94,.3); color: #14532d; }
.cpt-avertissement.is-ok i { color: #16a34a; }
.cpt-avertissement.is-ko { background: linear-gradient(120deg, rgba(239,68,68,.13), rgba(239,68,68,.03)); border-color: rgba(239,68,68,.3); color: #7f1d1d; }
.cpt-avertissement.is-ko i { color: #dc2626; }
.cpt-avertissement[hidden] { display: none; }
.cpt-pill.is-fige { background: linear-gradient(120deg, rgba(109,75,255,.14), rgba(14,159,189,.1)); color: #4c1d95; border-color: rgba(109,75,255,.25); }
.cpt-form-section { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: .95rem; display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.cpt-form-section i { color: var(--v1); }
/* Code et libellé de journal côte à côte (col-4 / col-8) : dans les cartes en
   trois colonnes d'un écran de 1440 px, le libellé par défaut « Journal des
   encaissements » était coupé (passe globale, U4). Sous 24rem de carte, les deux
   champs passent l'un sous l'autre, sur toute la largeur. */
.compta-parametres .card-body { container-type: inline-size; }
@container (max-width: 24rem) {
    .compta-parametres .card-body > .row:has(> .col-8) { --bs-gutter-y: 0; }
    .compta-parametres .card-body > .row > .col-4,
    .compta-parametres .card-body > .row > .col-8 { flex: 0 0 100%; width: 100%; }
}
input.compta-compte, input.compta-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; }

/* ---------- Journal ---------- */
.cpt-filtres { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.cpt-filtres .form-control, .cpt-filtres .form-select { min-width: 9.5rem; }
.cpt-raccourcis { display: flex; flex-wrap: wrap; gap: .35rem; }
.cpt-raccourcis a { font-size: .78rem; padding: .25rem .65rem; border-radius: 999px; background: #f3f2fd; color: var(--v1); font-weight: 600; border: 1px solid rgba(124,92,255,.14); }
.cpt-raccourcis a:hover, .cpt-raccourcis a.is-active { background: var(--grad); color: #fff; }
.cpt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.3rem; }
.cpt-kpi { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1rem 1.15rem; box-shadow: var(--sh-sm); }
.cpt-kpi::after { content: ""; position: absolute; right: -28px; top: -28px; width: 96px; height: 96px; border-radius: 50%; background: var(--grad-soft); }
.cpt-kpi > * { position: relative; z-index: 1; }
.cpt-kpi .cpt-kpi-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.cpt-kpi .cpt-kpi-value { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.cpt-kpi .cpt-kpi-sub { font-size: .8rem; color: var(--ink-faint); }
.cpt-kpi.is-ok { border-color: rgba(34,197,94,.3); }
.cpt-kpi.is-ok .cpt-kpi-value { color: #15803d; }
.cpt-kpi.is-ko { border-color: rgba(239,68,68,.35); }
.cpt-kpi.is-ko .cpt-kpi-value { color: #b91c1c; }
.cpt-onglets { display: inline-flex; gap: .25rem; padding: .25rem; border-radius: 999px; background: #eceaf9; }
.cpt-onglets a { padding: .38rem .95rem; border-radius: 999px; font-weight: 600; font-size: .84rem; color: var(--ink-soft); }
.cpt-onglets a.is-active { background: #fff; color: var(--v1); box-shadow: var(--sh-sm); }
.cpt-ecritures { margin: 0; }
.cpt-ecritures > :not(caption) > * > * { padding: .45rem .75rem; }
.cpt-ecritures tbody.cpt-piece { border-top: 2px solid #e4e2f5; }
.cpt-ecritures tbody.cpt-piece:first-of-type { border-top: 0; }
.cpt-ecritures tr.cpt-piece-head td {
    background: linear-gradient(90deg, rgba(124,92,255,.07), rgba(34,211,238,.03) 70%, transparent) !important;
    font-weight: 600; color: var(--ink); padding-top: .6rem; padding-bottom: .55rem;
}
.cpt-ecritures tr.cpt-piece-head .cpt-piece-num { font-family: var(--font-display); font-weight: 700; color: var(--v1); }
.cpt-ecritures td.cpt-montant { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; width: 8.5rem; }
.cpt-ecritures td.cpt-montant.is-zero { color: #c6c8d8; }
.cpt-ecritures tr.cpt-anomalie td { background: #fff7ed !important; color: #9a3412; font-size: .8rem; }
.cpt-ecritures .cpt-aux { font-size: .76rem; color: var(--ink-faint); }
.cpt-synthese .cpt-solde-debit { color: #1d4ed8; }
.cpt-synthese .cpt-solde-credit { color: #7c3aed; }

/* ---------- Clôture ---------- */
.cpt-cloture-etat { display: flex; align-items: center; gap: 1.1rem; }
.cpt-cadenas {
    width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 1.7rem; flex: 0 0 auto;
    background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
}
.cpt-danger-card { border: 1px solid rgba(239,68,68,.28); }
.cpt-danger-card .card-header { background: linear-gradient(90deg, rgba(239,68,68,.10), transparent 70%); color: #991b1b; }
.cpt-confirmation { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .12em; max-width: 12rem; }
.cpt-apercu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin: .4rem 0 1rem; }
.cpt-apercu > div { border-radius: var(--r-md); background: #fafaff; border: 1px solid var(--line); padding: .6rem .75rem; }
.cpt-apercu .cpt-apercu-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.cpt-apercu .cpt-apercu-value { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 575.98px) { .cpt-apercu { grid-template-columns: 1fr; } }
.cpt-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.cpt-timeline::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.cpt-timeline li { position: relative; display: flex; gap: .8rem; padding: .45rem 0 .75rem; }
.cpt-timeline .cpt-tl-chip {
    width: 36px; height: 36px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; z-index: 1;
    background: #1f1b45; color: #fff; box-shadow: 0 6px 14px rgba(31,27,69,.25);
}
.cpt-timeline li.is-reouverture .cpt-tl-chip { background: #f59e0b; box-shadow: 0 6px 14px rgba(245,158,11,.3); }
.cpt-timeline .cpt-tl-title { font-weight: 600; color: var(--ink); }
.cpt-timeline .cpt-tl-sub { font-size: .8rem; color: var(--ink-faint); }
.cpt-timeline .cpt-tl-motif { font-size: .84rem; color: var(--ink-soft); background: #fafaff; border-left: 3px solid #f59e0b; padding: .3rem .6rem; border-radius: 0 8px 8px 0; margin-top: .3rem; }

/* ---------- Archives ---------- */
.cpt-archive { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.15rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cpt-archive:last-child { border-bottom: 0; }
.cpt-archive .cpt-archive-chip {
    width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto; display: grid; place-items: center; font-size: 1.25rem;
    background: var(--grad-soft); color: var(--v1); border: 1px solid rgba(124,92,255,.14);
}
.cpt-archive .cpt-archive-body { flex: 1 1 260px; min-width: 0; }
.cpt-archive .cpt-archive-title { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.cpt-archive .cpt-archive-sub { font-size: .8rem; color: var(--ink-faint); }
.cpt-empreinte { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.cpt-archive .cpt-archive-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }

/* ---------- Page « Période clôturée » ---------- */
.cpt-refus { max-width: 640px; margin: 1.5rem auto; text-align: center; }
.cpt-refus .cpt-refus-halo {
    width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 1rem; display: grid; place-items: center; font-size: 2.1rem; color: #fff;
    background: linear-gradient(135deg, #1f1b45, #5b3cf0); box-shadow: 0 18px 40px rgba(60,40,180,.35);
}
.cpt-refus h2 { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.45rem; margin: .5rem 0; }
.cpt-refus p { color: var(--ink-soft); }

/* ============================================================
   Statistiques
   ============================================================ */
.sta-evol { display: inline-flex; align-items: center; gap: .2rem; font-weight: 700; font-size: .8rem; padding: .12rem .5rem; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sta-evol.is-up { background: rgba(34,197,94,.13); color: #15803d; }
.sta-evol.is-down { background: rgba(239,68,68,.12); color: #b91c1c; }
.sta-evol.is-flat { background: #eeedf7; color: #55586b; }
.cpt-hero .sta-evol.is-up { background: rgba(187,247,208,.95); color: #166534; }
.cpt-hero .sta-evol.is-down { background: #fee2e2; color: #991b1b; }
.cpt-hero .sta-evol.is-flat { background: rgba(255,255,255,.25); color: #fff; }
.sta-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.sta-grid > .card { grid-column: span 6; min-width: 0; margin: 0; }
.sta-grid > .card.is-full { grid-column: span 12; }
/* Deux tableaux de six colonnes côte à côte ne tiennent qu'au-delà de ~1700 px :
   en dessous (1440 × 900 compris), ils s'empilent plutôt que de rogner N-1 et l'évolution. */
@media (max-width: 1679.98px) { .sta-grid > .card { grid-column: span 12; } }
.sta-card-head { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; }
.sta-card-head form { display: flex; gap: .4rem; align-items: center; }
.sta-card-head .form-control { max-width: 14rem; padding: .32rem .7rem; font-size: .84rem; }
.sta-table { margin: 0; }
.sta-table > :not(caption) > * > * { padding: .55rem .7rem; }
.sta-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sta-table td.sta-nom { min-width: 11rem; overflow-wrap: anywhere; }
.sta-table tr.is-special td { background: #fafaff; font-style: italic; color: var(--ink-soft); }
.sta-part { display: flex; align-items: center; gap: .45rem; min-width: 7.5rem; }
.sta-part .sta-part-bar { flex: 1 1 auto; height: 6px; border-radius: 6px; background: #efeefa; overflow: hidden; }
.sta-part .sta-part-bar span { display: block; height: 100%; border-radius: 0 4px 4px 0; background: #6d4bff; }
.sta-part .sta-part-val { font-size: .76rem; color: var(--ink-faint); width: 2.9rem; text-align: right; font-variant-numeric: tabular-nums; }

/* Évolution mensuelle : deux colonnes par mois (N, N-1), une seule échelle.
   N = violet Aurora, N-1 = bleu pétrole : paire validée pour les daltonismes
   (ΔE 17,5) ; la légende et le tableau portent l'identité, pas la couleur seule. */
.sta-chart { --sta-n: #6d4bff; --sta-n1: #0e9fbd; position: relative; }
.sta-legende { display: flex; gap: 1rem; font-size: .8rem; color: var(--ink-soft); }
.sta-legende span { display: inline-flex; align-items: center; gap: .4rem; }
.sta-legende i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sta-bars { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding: 0 .25rem; border-bottom: 1px solid #e6e5f2; position: relative; }
.sta-bars .sta-grille { position: absolute; left: 0; right: 0; border-top: 1px solid #f1f0f8; pointer-events: none; }
.sta-mois { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; position: relative; cursor: default; }
.sta-mois:hover { background: rgba(124,92,255,.05); border-radius: 8px 8px 0 0; }
.sta-bar { width: min(24px, 42%); border-radius: 4px 4px 0 0; min-height: 0; transition: filter .15s; }
.sta-bar.is-n { background: var(--sta-n); }
.sta-bar.is-n1 { background: var(--sta-n1); }
.sta-bar.is-neg { opacity: .45; }
.sta-mois:hover .sta-bar { filter: brightness(1.08); }
.sta-tip {
    position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5; white-space: nowrap;
    background: #1b1a2e; color: #fff; font-size: .76rem; padding: .45rem .6rem; border-radius: 10px; box-shadow: var(--sh-md);
    opacity: 0; pointer-events: none; transition: opacity .12s;
}
.sta-tip strong { display: block; font-family: var(--font-display); margin-bottom: .1rem; }
.sta-mois:hover .sta-tip, .sta-mois:focus-visible .sta-tip { opacity: 1; }
.sta-mois:hover { outline: none; }
.sta-mois .sta-tip { bottom: auto; top: -.5rem; transform: translate(-50%, -100%); }
.sta-libelles { display: flex; gap: 6px; padding: .35rem .25rem 0; }
.sta-libelles span { flex: 1 1 0; min-width: 0; text-align: center; font-size: .72rem; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sta-reconciliation { font-size: .82rem; color: var(--ink-soft); display: flex; gap: .5rem; align-items: flex-start; }
.sta-reconciliation i { color: var(--v1); }
.cpt-table tr.cpt-categorie-row td {
    background: linear-gradient(90deg, rgba(124,92,255,.08), rgba(34,211,238,.03) 70%, transparent) !important;
    padding-top: .55rem; padding-bottom: .55rem;
}
/* Centralisation à côté des écritures seulement quand il y a la place pour ses
   quatre colonnes (compte, libellé, débit, crédit) : en dessous, elle passe au-dessus. */
.cpt-journal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 1680px) { .cpt-journal-grid { grid-template-columns: minmax(430px, 5fr) minmax(0, 8fr); } }
@media (min-width: 1680px) { .cpt-journal-grid .cpt-synthese { position: sticky; top: 90px; } }

/* Passe globale (D1) : entité légale couverte par le FEC, sous les boutons d'export. */
.cpt-hero .cpt-fec-entite { margin-top: .45rem; font-size: .8rem; opacity: .9; max-width: 34rem; margin-left: auto; text-align: right; }
