/* CRM Régie — habillage : marque, bandeau de vue de test, blocs de couleur. */

.crm-marque { display: flex; align-items: center; gap: .75rem; }
.crm-marque img { height: 2.75rem; width: auto; }
.crm-marque span { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; line-height: 1.15; white-space: nowrap; }
.fi-simple-header .crm-marque { flex-direction: column; gap: .5rem; }
.fi-simple-header .crm-marque img { height: 4.5rem; }
.fi-simple-header .crm-marque span { font-size: 1.25rem; }

.crm-imitation { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1rem; padding: .5rem 1rem;
    background: #7c2d12; color: #fff; font-size: .875rem; }
.crm-imitation button { background: #fff; color: #7c2d12; font-weight: 700; border-radius: .375rem; padding: .25rem .75rem; cursor: pointer; }

/* Blocs de couleur : un liseré et un en-tête teinté par nature d'information.
   La classe est posée sur l'enveloppe d'une section (.fi-sc-section > .fi-section) ou sur un tableau (.fi-ta > .fi-ta-ctn). */
.crm-bloc { --crm-teinte: 99 102 241; }
.crm-bloc .fi-section, .crm-bloc.fi-ta .fi-ta-ctn, .crm-bloc .fi-ta-ctn { border-top: 3px solid rgb(var(--crm-teinte)); }
.crm-bloc .fi-section-header, .crm-bloc .fi-ta-header { background: rgb(var(--crm-teinte) / .10); }
.crm-bloc .fi-section-header-heading, .crm-bloc .fi-ta-header-heading { color: rgb(var(--crm-teinte)); }
.dark .crm-bloc .fi-section-header, .dark .crm-bloc .fi-ta-header { background: rgb(var(--crm-teinte) / .20); }
.dark .crm-bloc .fi-section-header-heading, .dark .crm-bloc .fi-ta-header-heading { color: rgb(var(--crm-teinte-clair, var(--crm-teinte))); }

.crm-entreprise { --crm-teinte: 30 64 175; --crm-teinte-clair: 147 197 253; }      /* bleu : l'entreprise */
.crm-contacts { --crm-teinte: 59 130 246; --crm-teinte-clair: 147 197 253; }        /* bleu plus clair : ses contacts */
.crm-situation { --crm-teinte: 13 148 136; --crm-teinte-clair: 94 234 212; }        /* vert sarcelle : la situation commerciale */
.crm-rappels { --crm-teinte: 217 119 6; --crm-teinte-clair: 252 211 77; }           /* ambre : les rappels */
.crm-montants { --crm-teinte: 13 148 136; --crm-teinte-clair: 94 234 212; }
.crm-signature { --crm-teinte: 124 58 237; --crm-teinte-clair: 196 181 253; }       /* violet : envoi et signature */
.crm-lignes { --crm-teinte: 71 85 105; --crm-teinte-clair: 203 213 225; }
.crm-repartition { --crm-teinte: 217 119 6; --crm-teinte-clair: 252 211 77; }
.crm-spots { --crm-teinte: 190 24 93; --crm-teinte-clair: 249 168 212; }               /* rose : les spots */

/* Fiche entreprise plus dense */
.crm-dense .fi-section-content { padding-block: .75rem; }
.crm-dense .fi-sc { gap: .5rem 1.25rem; }

.crm-avertissement { border: 1px solid #dc2626; background: rgb(220 38 38 / .08); color: #b91c1c; border-radius: .5rem; padding: .625rem .875rem; font-weight: 600; font-size: .9rem; }
.dark .crm-avertissement { color: #fca5a5; }

/* Page de connexion : le logo et le titre l'un sous l'autre, sans chevaucher le texte du formulaire */
.fi-simple-header .fi-logo { height: auto !important; margin-bottom: .75rem; }
.fi-logo { display: flex; align-items: center; }

/* Petits contours autour de chaque information, pour lire un bloc d'un coup d'œil */
.crm-encadre .fi-in-entry { border: 1px solid rgb(148 163 184 / .35); border-radius: .5rem; padding: .4rem .65rem; background: rgb(148 163 184 / .06); height: 100%; }
.dark .crm-encadre .fi-in-entry { border-color: rgb(148 163 184 / .25); background: rgb(148 163 184 / .08); }

/* Tableaux de pilotage (CA par commercial, pilotage) */
.crm-ca { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
.crm-ca th, .crm-ca td { padding: .55rem .75rem; border-bottom: 1px solid rgb(148 163 184 / .25); text-align: right; white-space: nowrap; }
.crm-ca th:first-child, .crm-ca td:first-child { text-align: left; }
.crm-ca thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: rgb(100 116 139); vertical-align: bottom; white-space: normal; }
.dark .crm-ca thead th { color: rgb(148 163 184); }
.crm-ca tfoot td { font-weight: 700; border-top: 2px solid rgb(100 116 139 / .5); }
.crm-ca .crm-ca-bord { border-left: 1px solid rgb(148 163 184 / .25); }
.crm-ca-atteint { color: #15803d; font-weight: 700; } .crm-ca-proche { color: #b45309; font-weight: 700; } .crm-ca-loin { color: #b91c1c; font-weight: 700; }
.dark .crm-ca-atteint { color: #4ade80; } .dark .crm-ca-proche { color: #fbbf24; } .dark .crm-ca-loin { color: #f87171; }
.crm-ca-vues { display: inline-flex; flex-wrap: wrap; border: 1px solid rgb(148 163 184 / .4); border-radius: .5rem; overflow: hidden; }
.crm-ca-vues button { padding: .45rem .9rem; font-size: .875rem; font-weight: 600; }
.crm-ca-vues button[aria-pressed="true"] { background: rgb(227 6 19); color: #fff; }
.crm-ca-note { margin-top: .75rem; font-size: .82rem; color: rgb(100 116 139); line-height: 1.5; }
.dark .crm-ca-note { color: rgb(148 163 184); }

/* Synthèse de la relation (rédigée par Claude) */
.crm-synthese .fi-prose { font-size: .92rem; line-height: 1.45; }
.crm-synthese .fi-prose p { margin: .35rem 0; }

/* Pilotage : en-têtes triables */
.crm-ca th.crm-ca-tri { cursor: pointer; user-select: none; }
.crm-ca th.crm-ca-tri:hover { color: rgb(227 6 19); }
.crm-ca th.crm-ca-tri-actif { color: rgb(17 24 39); }
.dark .crm-ca th.crm-ca-tri-actif { color: rgb(243 244 246); }
.crm-ca th.crm-ca-gauche { text-align: left; }
.crm-ca .crm-ca-fleche { font-size: .7em; opacity: .55; }
.crm-ca th.crm-ca-tri-actif .crm-ca-fleche { opacity: 1; }

/* Pilotage : tableau « à renouveler » sans ascenseur latéral */
.crm-ca-etroit { table-layout: fixed; font-size: .82rem; }
.crm-ca-etroit th, .crm-ca-etroit td { white-space: normal; padding: .45rem .5rem; overflow-wrap: anywhere; }
.crm-ca-etroit th:first-child, .crm-ca-etroit td:first-child { width: 17%; }

/* Fiche client : bande « situation commerciale » sous le titre */
.crm-bande .fi-sc-section-content { padding-top: .35rem; padding-bottom: .35rem; }
.crm-bande .fi-in-entry-label { font-size: .68rem; }

/* Fiche client : cartouche des onglets — pastilles alignées à gauche sur le bord du tableau, onglet actif en rouge */
.fi-resource-view-record-page .fi-tabs { justify-content: flex-start; background: transparent; border: 0; box-shadow: none; padding: 0; gap: .5rem; flex-wrap: wrap; }
.fi-resource-view-record-page .fi-tabs .fi-tabs-item { background: #fff; border: 1px solid rgb(148 163 184 / .55); border-radius: 9999px; padding: .5rem 1.1rem; font-weight: 600; font-size: .875rem; color: rgb(55 65 81); box-shadow: 0 1px 2px rgb(0 0 0 / .06); }
.fi-resource-view-record-page .fi-tabs .fi-tabs-item:hover { border-color: rgb(227 6 19); color: rgb(227 6 19); background: #fff; }
.fi-resource-view-record-page .fi-tabs .fi-tabs-item.fi-active { background: rgb(227 6 19); border-color: rgb(227 6 19); color: #fff; box-shadow: 0 2px 6px rgb(227 6 19 / .35); }
.fi-resource-view-record-page .fi-tabs .fi-tabs-item.fi-active * { color: #fff !important; }
.fi-resource-view-record-page .fi-tabs .fi-tabs-item .fi-badge { background: rgb(255 255 255 / .25); color: inherit; }
.dark .fi-resource-view-record-page .fi-tabs .fi-tabs-item { background: rgb(24 24 27); border-color: rgb(63 63 70); color: rgb(228 228 231); }
.dark .fi-resource-view-record-page .fi-tabs .fi-tabs-item:hover { background: rgb(24 24 27); color: #fff; border-color: rgb(227 6 19); }
.dark .fi-resource-view-record-page .fi-tabs .fi-tabs-item.fi-active { background: rgb(227 6 19); border-color: rgb(227 6 19); color: #fff; }
/* Encart contacts vide : compact */
.crm-contacts .fi-ta-empty-state { padding: .6rem 1rem; }
.crm-contacts .fi-ta-empty-state-heading { font-size: .85rem; }
.crm-contacts .fi-ta-empty-state-icon-ctn { display: none; }

/* ===================================================================================================================
   Habillage « Tertio » (14/10/2026) : coque sombre (barre du haut et menu) relevée de rouge Tertio, contenu clair et
   aéré, cartes arrondies à ombre douce, chiffres bien visibles, boutons rouges en dégradé. Tout est en surcharge
   de Filament : aucune compilation nécessaire.
   =================================================================================================================== */
:root { --crm-rouge: 227 6 19; --crm-rouge-fonce: 180 4 20; --crm-nuit: 11 15 25; --crm-nuit-2: 19 25 40; --crm-fond: 243 244 248; }

body.fi-body { background: rgb(var(--crm-fond)); }
.dark body.fi-body, body.fi-body.dark, .dark .fi-body { background: #0b0f19; }

/* --- Barre du haut et menu : la coque sombre --- */
.fi-topbar > nav, .fi-topbar nav.fi-topbar-ctn, .fi-topbar { background: rgb(var(--crm-nuit)) !important; border-bottom: 1px solid rgb(255 255 255 / .06) !important; box-shadow: none; }
.fi-topbar .crm-marque span, .fi-topbar .fi-logo { color: #fff; }
.fi-topbar .fi-icon-btn, .fi-topbar button { color: rgb(226 232 240 / .8); }
.fi-topbar .fi-input-wrp { background: rgb(255 255 255 / .07) !important; border-color: rgb(255 255 255 / .12) !important; border-radius: .75rem; box-shadow: none; }
.fi-topbar .fi-input-wrp input, .fi-topbar .fi-input { color: #fff !important; }
.fi-topbar .fi-input-wrp input::placeholder { color: rgb(226 232 240 / .5); }
.fi-topbar .fi-input-wrp-prefix svg { color: rgb(226 232 240 / .5); }
.fi-topbar .fi-avatar { box-shadow: 0 0 0 2px rgb(var(--crm-rouge)); }

.fi-sidebar { background: linear-gradient(180deg, rgb(var(--crm-nuit-2)) 0%, rgb(var(--crm-nuit)) 100%) !important; border-right: 0 !important; }
.fi-sidebar-header { background: transparent !important; border-bottom: 1px solid rgb(255 255 255 / .06) !important; }
.fi-sidebar-header .crm-marque span { color: #fff; }
.fi-sidebar-nav { padding-top: .75rem; }
.fi-sidebar-group-label { color: rgb(255 255 255 / .42) !important; text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 700; }
.fi-sidebar-group-collapse-btn, .fi-sidebar-group-collapse-btn svg { color: rgb(255 255 255 / .35) !important; }
.fi-sidebar-item-btn { color: rgb(226 232 240 / .82) !important; border-radius: .75rem; transition: background .15s, color .15s; }
.fi-sidebar-item-btn:hover { background: rgb(255 255 255 / .07) !important; color: #fff !important; }
.fi-sidebar-item-icon { color: rgb(148 163 184) !important; }
.fi-sidebar-item-label { color: inherit !important; font-weight: 500; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn, .fi-sidebar-item-btn.fi-active {
    background: linear-gradient(90deg, rgb(var(--crm-rouge)), rgb(190 18 60)) !important; color: #fff !important;
    box-shadow: 0 8px 18px -6px rgb(var(--crm-rouge) / .6); font-weight: 600; }
.fi-sidebar-item.fi-active .fi-sidebar-item-icon, .fi-sidebar-item.fi-active .fi-sidebar-item-label { color: #fff !important; }
.fi-sidebar-item-badge-ctn .fi-badge { background: rgb(255 255 255 / .12) !important; color: #fff !important; border: 0; }
.fi-sidebar-item.fi-active .fi-sidebar-item-badge-ctn .fi-badge { background: rgb(255 255 255 / .25) !important; }
.fi-sidebar-item-grouped-border-part { border-color: rgb(255 255 255 / .12) !important; }

/* --- Titres de page --- */
.fi-header-heading { font-size: 1.75rem !important; font-weight: 800 !important; letter-spacing: -.025em; line-height: 1.15; }
.fi-header-heading::after { content: ''; display: block; width: 2.75rem; height: .25rem; margin-top: .45rem; border-radius: 9999px;
    background: linear-gradient(90deg, rgb(var(--crm-rouge)), rgb(251 113 133)); }
.fi-breadcrumbs-item-label { font-weight: 500; }

/* --- Cartes : arrondies, ombre douce, sans trait dur --- */
.fi-section:not(.fi-section-not-contained), .fi-ta-ctn, .fi-wi-stats-overview-stat, .fi-wi-chart, .crm-carte {
    border-radius: 1rem !important; border: 1px solid rgb(226 232 240 / .9) !important;
    box-shadow: 0 1px 2px rgb(15 23 42 / .04), 0 12px 28px -18px rgb(15 23 42 / .25) !important; }
.dark .fi-section:not(.fi-section-not-contained), .dark .fi-ta-ctn, .dark .fi-wi-stats-overview-stat, .dark .fi-wi-chart {
    border-color: rgb(255 255 255 / .08) !important; box-shadow: none !important; }
.fi-section-not-contained { border: 0 !important; box-shadow: none !important; background: transparent !important; }
.fi-resource-view-record-page .fi-sc-tabs { border: 0 !important; box-shadow: none !important; background: transparent !important; padding: 0 !important; }
.fi-sc-tabs:not(.fi-resource-view-record-page .fi-sc-tabs) { border-radius: 1rem !important; }
.fi-section-header-heading, .fi-ta-header-heading { font-weight: 700; letter-spacing: -.01em; }
.crm-bloc .fi-section, .crm-bloc .fi-ta-ctn { border-top-width: 3px !important; }

/* --- Indicateurs du tableau de bord : une teinte par carte, un chiffre qui se voit --- */
.fi-wi-stats-overview-stat { position: relative; overflow: hidden; --crm-accent: var(--crm-rouge); padding: 1.1rem 1.25rem !important; }
.fi-wi-stats-overview-stat::before { content: ''; position: absolute; inset: 0 0 auto 0; height: .3rem; background: rgb(var(--crm-accent)); }
.fi-wi-stats-overview-stat::after { content: ''; position: absolute; right: -2.5rem; top: -2.5rem; width: 8rem; height: 8rem; border-radius: 9999px;
    background: radial-gradient(circle, rgb(var(--crm-accent) / .16), transparent 70%); pointer-events: none; }
/* Chaque indicateur est dans sa colonne de grille : la teinte suit le rang de la colonne */
.fi-grid-col:nth-child(1) > .fi-sc-component > .fi-wi-stats-overview-stat, .fi-wi-stats-overview-stat:nth-child(1) { --crm-accent: 217 119 6; }       /* rappels : ambre */
.fi-grid-col:nth-child(2) > .fi-sc-component > .fi-wi-stats-overview-stat, .fi-wi-stats-overview-stat:nth-child(2) { --crm-accent: 13 148 136; }      /* pot commun : sarcelle */
.fi-grid-col:nth-child(3) > .fi-sc-component > .fi-wi-stats-overview-stat, .fi-wi-stats-overview-stat:nth-child(3) { --crm-accent: 124 58 237; }      /* signatures : violet */
.fi-grid-col:nth-child(4) > .fi-sc-component > .fi-wi-stats-overview-stat, .fi-wi-stats-overview-stat:nth-child(4) { --crm-accent: var(--crm-rouge); } /* chiffre d'affaires : rouge Tertio */
.fi-grid-col:nth-child(5) > .fi-sc-component > .fi-wi-stats-overview-stat, .fi-wi-stats-overview-stat:nth-child(5) { --crm-accent: 190 24 93; }       /* impayés : rose */
.fi-grid-col:nth-child(6) > .fi-sc-component > .fi-wi-stats-overview-stat, .fi-wi-stats-overview-stat:nth-child(6) { --crm-accent: 37 99 235; }
.fi-wi-stats-overview-stat-label { font-size: .72rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgb(100 116 139) !important; }
.dark .fi-wi-stats-overview-stat-label { color: rgb(148 163 184) !important; }
.fi-wi-stats-overview-stat-value { font-size: 2.25rem !important; font-weight: 800 !important; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fi-wi-stats-overview-stat-description { font-weight: 600; }

/* --- Boutons --- */
.fi-btn { border-radius: .75rem !important; font-weight: 600; }
.fi-btn.fi-color-primary { background: linear-gradient(135deg, rgb(255 45 59), rgb(var(--crm-rouge-fonce))) !important; color: #fff !important; border: 0 !important;
    box-shadow: 0 6px 14px -4px rgb(var(--crm-rouge) / .55) !important; }
.fi-btn.fi-color-primary:hover { filter: brightness(1.06); box-shadow: 0 8px 18px -4px rgb(var(--crm-rouge) / .65) !important; }
.fi-btn.fi-color-primary * { color: #fff !important; }
.fi-btn.fi-color-success { background: linear-gradient(135deg, rgb(34 197 94), rgb(21 128 61)) !important; color: #fff !important; border: 0 !important; }
.fi-btn.fi-color-success * { color: #fff !important; }
.fi-btn.fi-color-gray, .fi-btn:not([class*="fi-color-"]) { background: #fff; }
.dark .fi-btn.fi-color-gray { background: rgb(255 255 255 / .05); }
.fi-badge { border-radius: 9999px !important; font-weight: 700; letter-spacing: .01em; }

/* --- Tableaux --- */
.fi-ta-header-cell { background: rgb(248 250 252); }
.fi-ta-header-cell, .fi-ta-header-cell-sort-btn, .fi-ta-header-cell span { font-size: .72rem !important; text-transform: uppercase; letter-spacing: .06em; color: rgb(100 116 139) !important; font-weight: 700 !important; }
.dark .fi-ta-header-cell { background: rgb(255 255 255 / .03); }
.dark .fi-ta-header-cell, .dark .fi-ta-header-cell span { color: rgb(148 163 184) !important; }
.fi-ta-row:hover { background: rgb(var(--crm-rouge) / .035) !important; }
.fi-ta-row { transition: background .12s; }
.fi-ta-empty-state-icon-bg { background: rgb(var(--crm-rouge) / .08) !important; }
.fi-ta-empty-state-icon-bg svg { color: rgb(var(--crm-rouge)) !important; }

/* --- Onglets (listes, fiche) : des pilules, la pilule active en rouge Tertio --- */
.fi-tabs { justify-content: flex-start; background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; gap: .5rem; flex-wrap: wrap; }
.fi-tabs .fi-tabs-item { background: #fff; border: 1px solid rgb(226 232 240); border-radius: 9999px !important; padding: .5rem 1.1rem; font-weight: 600; font-size: .875rem; color: rgb(55 65 81); box-shadow: 0 1px 2px rgb(0 0 0 / .05); }
.dark .fi-tabs .fi-tabs-item { background: rgb(255 255 255 / .05); border-color: rgb(255 255 255 / .1); color: rgb(226 232 240); }
.fi-tabs .fi-tabs-item:hover { border-color: rgb(var(--crm-rouge)); color: rgb(var(--crm-rouge)); }
.fi-tabs .fi-tabs-item.fi-active { background: linear-gradient(90deg, rgb(var(--crm-rouge)), rgb(190 18 60)) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 6px 14px -4px rgb(var(--crm-rouge) / .55); }
.fi-tabs .fi-tabs-item.fi-active * { color: #fff !important; }
.fi-tabs .fi-tabs-item .fi-badge { background: rgb(15 23 42 / .06); color: inherit; }
.fi-tabs .fi-tabs-item.fi-active .fi-badge { background: rgb(255 255 255 / .25) !important; }
.crm-ca-vues button[aria-pressed="true"] { background: linear-gradient(90deg, rgb(var(--crm-rouge)), rgb(190 18 60)); }

/* --- Formulaires et champs --- */
.fi-input-wrp { border-radius: .75rem !important; }
.fi-input-wrp:focus-within { box-shadow: 0 0 0 3px rgb(var(--crm-rouge) / .18) !important; }

/* --- Connexion : un fond qui a du caractère --- */
.fi-simple-layout { background: radial-gradient(1200px 600px at 10% -10%, rgb(var(--crm-rouge) / .55), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgb(190 18 60 / .45), transparent 60%), linear-gradient(180deg, rgb(var(--crm-nuit-2)), rgb(var(--crm-nuit))) !important; }
.fi-simple-main { border-radius: 1.25rem !important; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .6) !important; border: 0 !important; }
.fi-simple-header .crm-marque span { color: rgb(var(--crm-rouge)); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }

/* Synthèses : les deux titres se détachent ; liste des sources dans la fenêtre */
.crm-synthese .fi-in-entry-label { font-size: 1.1rem !important; font-weight: 800 !important; color: rgb(var(--crm-rouge)) !important; letter-spacing: -.01em; }
.crm-synthese .fi-in-entry-content { font-size: .95rem; }
.crm-sources { list-style: disc; padding-left: 1.25rem; display: grid; gap: .35rem; }
.crm-sources a { text-decoration: underline; color: rgb(var(--crm-rouge)); }

/* Bon de commande : négociation libre et majoration en italique (facultatives), prix plancher en indication grisée */
.crm-facultatif .fi-fo-field-label-content, .crm-facultatif .fi-fo-field-label { font-style: italic; font-weight: 400 !important; color: rgb(100 116 139) !important; }
.crm-facultatif .fi-input-wrp { border-style: dashed; }
.crm-facultatif .fi-input { font-style: italic; }
.crm-pu::placeholder { color: rgb(148 163 184); font-style: italic; }
.crm-sauvegarde-auto { display: none; }

.crm-compteur { font-size: 1.05rem; } .crm-compteur b { color: rgb(var(--crm-rouge)); font-size: 1.4rem; }

/* Bouton « retour » en haut à gauche (remplace la flèche qui repliait le menu) */
.crm-retour { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; margin-right: .35rem; border-radius: .75rem; color: rgb(226 232 240 / .9);
    background: rgb(255 255 255 / .08); transition: background .15s, color .15s; flex: none; }
.crm-retour:hover { background: rgb(var(--crm-rouge)); color: #fff; }
.fi-topbar-collapse-sidebar-btn-ctn, .fi-topbar-close-collapse-sidebar-btn { display: none !important; }

/* Synthèses : un encart d'information (fond gris, pointillés, texte réduit), pas un bloc de travail */
.crm-synthese .fi-section { background: rgb(241 245 249) !important; border: 1px dashed rgb(148 163 184) !important; box-shadow: none !important; border-top-width: 1px !important; }
.crm-synthese .fi-section-header { background: transparent !important; padding-block: .4rem; }
.crm-synthese .fi-section-header-heading { color: rgb(100 116 139) !important; font-size: .74rem !important; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; }
.crm-synthese .fi-section-header-description { font-size: .75rem; color: rgb(100 116 139); }
.crm-synthese .fi-section-content { padding-block: .45rem !important; padding-inline: 1rem !important; font-size: .8rem; }
.crm-synthese .fi-in-entry-label { font-size: .84rem !important; font-weight: 700 !important; color: rgb(71 85 105) !important; }
.crm-synthese .fi-in-entry-content { font-size: .8rem; line-height: 1.4; color: rgb(51 65 85); }
.crm-synthese .fi-prose { font-size: .8rem; line-height: 1.38; } .crm-synthese .fi-prose p { margin: .2rem 0; } .crm-synthese .fi-prose ul { margin: .15rem 0; }
.dark .crm-synthese .fi-section { background: rgb(30 41 59 / .55) !important; border-color: rgb(148 163 184 / .35) !important; }
.dark .crm-synthese .fi-in-entry-label, .dark .crm-synthese .fi-section-header-heading { color: rgb(148 163 184) !important; }
.dark .crm-synthese .fi-in-entry-content { color: rgb(203 213 225); }

/* Boutons neutres en mode sombre : fond sombre et texte clair (le blanc sur blanc était illisible) */
.dark .fi-btn:not([class*="fi-color-"]), .dark .fi-btn.fi-color-gray { background: rgb(255 255 255 / .08) !important; color: rgb(226 232 240) !important; border: 1px solid rgb(255 255 255 / .16) !important; box-shadow: none !important; }
.dark .fi-btn:not([class*="fi-color-"]) *, .dark .fi-btn.fi-color-gray * { color: rgb(226 232 240) !important; }
.dark .fi-btn:not([class*="fi-color-"]):hover, .dark .fi-btn.fi-color-gray:hover { background: rgb(255 255 255 / .14) !important; }
.dark .fi-tabs .fi-tabs-item { color: rgb(226 232 240); }

/* Contrat annuel : réserve à programmer */
.crm-reserve { width: 100%; border-collapse: collapse; font-size: .88rem; }
.crm-reserve th, .crm-reserve td { padding: .4rem .6rem; border-bottom: 1px solid rgb(148 163 184 / .3); text-align: left; }
.crm-reserve th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: rgb(100 116 139); }
.crm-reserve .crm-n { text-align: right; font-variant-numeric: tabular-nums; }

/* Choix « une option parmi plusieurs » bien visibles (type de bon, contrat en produits ou en €, plan média) :
   chaque bouton est encadré en permanence, l'option retenue est pleine, en couleur de marque. */
.crm-choix .fi-fo-toggle-buttons-btn-ctn label.fi-btn { border: 2px solid rgb(100 116 139 / .55) !important; background: rgb(148 163 184 / .14) !important; color: inherit !important;
    font-weight: 600; padding: .55rem 1rem; box-shadow: none !important; cursor: pointer; }
.crm-choix .fi-fo-toggle-buttons-btn-ctn label.fi-btn * { color: inherit !important; }
.crm-choix .fi-fo-toggle-buttons-btn-ctn label.fi-btn:hover { background: rgb(148 163 184 / .26) !important; }
.crm-choix .fi-fo-toggle-buttons-input:checked + label.fi-btn { background: rgb(var(--crm-rouge, 227 6 19)) !important; border-color: rgb(var(--crm-rouge, 227 6 19)) !important; color: #fff !important;
    box-shadow: 0 0 0 3px rgb(var(--crm-rouge, 227 6 19) / .25) !important; }
.crm-choix .fi-fo-toggle-buttons-input:checked + label.fi-btn * { color: #fff !important; }

/* Encart d'aide ou de comptage dans le plan média */
.crm-mode-aide { border: 1px solid rgb(217 119 6 / .55); background: rgb(217 119 6 / .09); border-radius: .5rem; padding: .55rem .85rem; font-size: .88rem; line-height: 1.45; }

/* Ascenseur latéral toujours visible sous tous les tableaux (macOS masque les barres de défilement tant qu'on ne touche pas la souris) :
   tableaux Filament, tableaux de pilotage / CA / rapports / planning (enveloppes « crm-defile » ou overflow-x:auto) et agenda. */
.fi-ta-content-ctn, .crm-defile, .crm-ps-cadre, div[style*="overflow-x:auto"], .overflow-x-auto { overflow-x: auto; }
.fi-ta-content-ctn::-webkit-scrollbar, .crm-defile::-webkit-scrollbar, .crm-ps-cadre::-webkit-scrollbar, div[style*="overflow-x:auto"]::-webkit-scrollbar, .overflow-x-auto::-webkit-scrollbar { height: 14px; width: 14px; -webkit-appearance: none; }
.fi-ta-content-ctn::-webkit-scrollbar-track, .crm-defile::-webkit-scrollbar-track, .crm-ps-cadre::-webkit-scrollbar-track, div[style*="overflow-x:auto"]::-webkit-scrollbar-track, .overflow-x-auto::-webkit-scrollbar-track { background: rgb(148 163 184 / .18); border-radius: 8px; }
.fi-ta-content-ctn::-webkit-scrollbar-thumb, .crm-defile::-webkit-scrollbar-thumb, .crm-ps-cadre::-webkit-scrollbar-thumb, div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb, .overflow-x-auto::-webkit-scrollbar-thumb { background: rgb(100 116 139 / .75); border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
.fi-ta-content-ctn::-webkit-scrollbar-thumb:hover, .crm-defile::-webkit-scrollbar-thumb:hover, .crm-ps-cadre::-webkit-scrollbar-thumb:hover, div[style*="overflow-x:auto"]::-webkit-scrollbar-thumb:hover, .overflow-x-auto::-webkit-scrollbar-thumb:hover { background: rgb(227 6 19 / .8); background-clip: padding-box; }
@supports not selector(::-webkit-scrollbar) { .fi-ta-content-ctn, .crm-defile, .crm-ps-cadre, div[style*="overflow-x:auto"], .overflow-x-auto { scrollbar-width: auto; } }

/* Ascenseur latéral collé au bas de l'écran : le cadre du tableau défile dans les deux sens (hauteur ajustée par js/crm-defile.js ; valeur de repli ici),
   l'en-tête des colonnes reste en haut du cadre. */
.fi-ta-content-ctn, .crm-defile { overflow: auto; max-height: calc(100vh - 18rem); min-height: 0; }
.fi-ta-content-ctn thead th, .crm-defile thead th { position: sticky; top: 0; z-index: 3; background-color: #f9fafb; box-shadow: 0 1px 0 rgb(148 163 184 / .35); }
.dark .fi-ta-content-ctn thead th, .dark .crm-defile thead th { background-color: rgb(24 24 27); }

