/* ═══ FICHE CLIENT : BOUTON COMMISSION PAR CONTRAT (js/180, 10.10.2026) ═══ */
.fcm-bouton { background: transparent; border: 1px solid transparent; border-radius: 7px; padding: 4px 5px;
  font-size: 12px; line-height: 1; cursor: pointer; opacity: .55; filter: grayscale(.4); transition: opacity .15s, border-color .15s; }
.fcm-bouton:hover, .fcm-bouton:focus-visible { opacity: 1; filter: none; border-color: var(--border); background: var(--surface-alt); }
.fcm-modale { background: var(--surface); border-radius: 14px; padding: 20px; width: min(520px, 100%); max-height: 86vh; overflow: auto; }
.fcm-titre { font-size: 16px; font-weight: 600; color: var(--text); }
.fcm-sous { font-size: 12px; color: var(--text-muted); margin: 2px 0 14px; }
.fcm-liste { display: flex; flex-direction: column; gap: 8px; }
.fcm-ligne { border: 1px solid var(--border); border-left: 3px solid var(--c-alerte, #f59e0b); border-radius: 10px; padding: 9px 11px; background: var(--bg, transparent); }
.fcm-ligne.fcm-ok { border-left-color: var(--c-succes, #22c55e); }
.fcm-ligne.fcm-off { border-left-color: var(--border); opacity: .6; }
.fcm-tete { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fcm-nature { font-weight: 600; font-size: 13px; color: var(--text); }
.fcm-montant { font-weight: 600; font-size: 13px; color: var(--c-alerte-texte, #b45309); }
.fcm-statut { margin-left: auto; font-size: 11px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.fcm-ok .fcm-statut { color: var(--c-succes-texte, #15803d); border-color: color-mix(in srgb, var(--c-succes, #22c55e) 35%, transparent); }
.fcm-date { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.fcm-bas, .fcm-tranche { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; }
.fcm-tranches { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); }
.fcm-tranche > span:first-child { color: var(--text); }
.fcm-brd { color: var(--text-muted); }
.fcm-brd em { font-style: normal; font-size: 10.5px; border: 1px dashed var(--border); border-radius: 999px; padding: 0 6px; margin-left: 2px; }
.fcm-brd-vide { font-style: italic; }
.fcm-decompte { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); border-radius: 999px;
  padding: 2px 10px; font-size: 11.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.fcm-vide { padding: 16px; text-align: center; color: var(--text-muted); font-size: 13px; }
.fcm-fermer { margin-top: 14px; width: 100%; }

/* ═══ FICHE CLIENT : DOCUMENTS EN ARBORESCENCE (js/181, 10.10.2026) ═══ */
.dca-barre { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0 8px; }
.dca-recherche { flex: 1 1 240px; min-width: 0; }
.dca-tout { background: none; border: 0; color: var(--text-muted); font: inherit; font-size: 12px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.dca-tout:hover { color: var(--accent); background: var(--accent-dim); }
.dca-arbre { display: flex; flex-direction: column; gap: 6px; }
.dca-dossier > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none;
  padding: 7px 10px; border-radius: 10px; font-size: 13px; color: var(--text); }
.dca-dossier > summary::-webkit-details-marker { display: none; }
.dca-dossier > summary:hover { background: var(--surface-alt); }
.dca-dossier > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dca-n1 > summary { font-weight: 600; background: var(--surface-alt); }
.dca-n2 > summary, .dca-n3 > summary { font-weight: 500; padding: 5px 10px; }
.dca-chevron { display: inline-block; width: 10px; font-size: 10px; color: var(--text-muted); transition: transform .15s; }
.dca-dossier[open] > summary .dca-chevron { transform: rotate(90deg); }
.dca-icone { font-size: 15px; }
.dca-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dca-nombre { font-size: 11px; font-weight: 500; color: var(--accent); background: var(--accent-dim); border-radius: 999px; padding: 1px 8px; }
.dca-contenu { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px 14px; padding-left: 10px; border-left: 1px dashed var(--border); }
.dca-aucun { padding: 14px; text-align: center; color: var(--text-muted); font-size: 13px; }
@media (prefers-reduced-motion: reduce) { .dca-chevron { transition: none; } }
@media (max-width: 720px) { .dca-contenu { margin-left: 6px; padding-left: 6px; } }

/* ═══ FICHE CLIENT : LES COMMISSIONS DU CLIENT (js/180, 10.10.2026) ═══
   L'indicateur « Commissions à recevoir » ouvre toutes les commissions des contrats du client. */
.fcm-modale-client { width: min(620px, 100%); }
.fcm-resume { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.fcm-resume span { border-radius: 10px; padding: 7px 11px; font-size: 12px; border: 1px solid var(--border); background: var(--surface-alt); color: var(--text-muted); }
.fcm-resume b { color: var(--text); font-weight: 600; }
.fcm-resume .fcm-resume-attente { border-color: color-mix(in srgb, var(--c-alerte, #f59e0b) 45%, transparent); }
.fcm-resume .fcm-resume-ok { border-color: color-mix(in srgb, var(--c-succes, #22c55e) 45%, transparent); }
.fcm-groupe { margin-top: 14px; }
.fcm-groupe-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.fcm-groupe-tete > div { display: flex; flex-direction: column; min-width: 0; }
.fcm-groupe-tete b { font-size: 13px; font-weight: 600; color: var(--text); }
.fcm-groupe-tete small { font-size: 11.5px; color: var(--text-muted); }
.fcm-lien { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* ═══ FICHE CLIENT : DOCUMENTS COMPACTS SUR TÉLÉPHONE (js/59, 10.10.2026) ═══
   La ligne garde icône, titre, aperçu et état ; « Non lié » (lien au contrat) et « Publier » se
   replient derrière « ⋯ ». Sur ordinateur, le « ⋯ » n'existe pas et rien ne bouge. */
.dcx-doc-plus { display: none; }
@media (max-width: 720px) {
  .dcx-doc { grid-template-columns: 24px minmax(0, 1fr) auto auto; padding: 6px 8px; gap: 4px 8px; }
  .dcx-doc .dcx-vide, .dcx-doc .dcx-doc-lien:empty { display: none; }
  .dcx-doc-titre { font-size: var(--t-s); }
  .dcx-doc-plus { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
  .dcx-doc-plus[aria-expanded="true"] { border-color: var(--accent-border); background: var(--accent-dim); color: var(--accent); }
  .dcx-doc:not(.ouvert) .dcx-doc-opt { display: none; }
  .dcx-doc.ouvert .dcx-doc-opt { grid-column: 2 / -1; justify-self: start; max-width: 100%; }
  .dcx-doc.ouvert .dcx-doc-lien { display: block; justify-self: stretch; min-width: 0; }
  .dcx-doc.ouvert .dcx-doc-lien .dlc-cellule { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
  .dcx-doc.ouvert .dcx-doc-lien .dlc-select { width: 100%; max-width: 100%; }
  /* La pastille EcoHub prend la place de l'état, sous le titre (et non dans la colonne de l'icône). */
  .dcx-doc > .dcx-pastille { grid-column: 2 / -1; justify-self: start; }
  .dcx-centre-carte > .dbx-carte-tete { flex-direction: column; align-items: stretch; gap: 8px; }
}

/* ═══ FICHE CLIENT : L'EN-TÊTE LISIBLE DANS TOUS LES THÈMES (js/20, 10.10.2026) ═══
   En thème sombre (Sombre, Bleu REX, FC Barcelona), css/97 retourne le bandeau en bleu ciel et fait
   hériter l'encre marine… sauf aux puces, badges, surtitres et sous-titres, restés blancs : l'adresse,
   l'e-mail et le téléphone étaient blanc sur bleu clair, illisibles (vu sur iPhone). On leur donne
   l'encre du bandeau inversé. En clair (Clair, Valencia CF…), le bandeau reste foncé : rien à faire.
   Les teintes passent par des variables : le FC Barcelona (11.10.2026, css/99-themes et css/99-menu)
   a des bandeaux rayés blaugrana à encre BLANCHE, et prend les mêmes règles avec ses propres valeurs. */
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client {
  --fcx-surtitre: rgba(11, 36, 88, .66); --fcx-sous: rgba(11, 36, 88, .78);
  --fcx-puce: var(--bnd-encre, #0B2458); --fcx-puce-fond: rgba(255, 255, 255, .66); --fcx-puce-bord: rgba(11, 36, 88, .2); --fcx-puce-survol: #fff;
  --fcx-ok: #166534; --fcx-ok-fond: rgba(34, 197, 94, .16); --fcx-ok-bord: rgba(22, 101, 52, .38);
  --fcx-ko: #991B1B; --fcx-ko-fond: rgba(239, 68, 68, .13); --fcx-ko-bord: rgba(153, 27, 27, .38);
  --fcx-on: #0E5A74; --fcx-on-fond: rgba(0, 207, 255, .16); --fcx-on-bord: rgba(14, 90, 116, .38);
  --fcx-trait: rgba(11, 36, 88, .14); --fcx-statut-fond: rgba(11, 36, 88, .08);
}
html[data-ambiance="fcb"] body:not(.mode-cloud):not(.mode-espace-client) .fcx-client {
  --fcx-surtitre: rgba(255, 255, 255, .86); --fcx-sous: rgba(255, 255, 255, .92);
  --fcx-puce-fond: rgba(6, 14, 44, .46); --fcx-puce-bord: rgba(255, 255, 255, .36); --fcx-puce-survol: rgba(6, 14, 44, .7);
  --fcx-ok: #BBF7D0; --fcx-ok-fond: rgba(6, 14, 44, .5); --fcx-ok-bord: rgba(74, 222, 128, .65);
  --fcx-ko: #FECACA; --fcx-ko-fond: rgba(6, 14, 44, .5); --fcx-ko-bord: rgba(248, 113, 113, .7);
  --fcx-on: #FFFFFF; --fcx-on-fond: rgba(6, 14, 44, .5); --fcx-on-bord: #EDBB00;
  --fcx-trait: rgba(255, 255, 255, .22); --fcx-statut-fond: rgba(6, 14, 44, .4);
}
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-surtitre { color: var(--fcx-surtitre) !important; }
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-sous { color: var(--fcx-sous) !important; }
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-chip,
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-badge {
  color: var(--fcx-puce) !important; background: var(--fcx-puce-fond) !important; border-color: var(--fcx-puce-bord) !important;
}
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client :is(.fcx-chip, .fcx-badge) * { color: inherit !important; }
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client :is(a.fcx-chip, button.fcx-chip, button.fcx-badge):hover { background: var(--fcx-puce-survol) !important; }
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-badge.ok { color: var(--fcx-ok) !important; background: var(--fcx-ok-fond) !important; border-color: var(--fcx-ok-bord) !important; }
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-badge.revoque { color: var(--fcx-ko) !important; background: var(--fcx-ko-fond) !important; border-color: var(--fcx-ko-bord) !important; }
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-badge.on { color: var(--fcx-on) !important; background: var(--fcx-on-fond) !important; border-color: var(--fcx-on-bord) !important; }
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-hero-bas { border-top-color: var(--fcx-trait) !important; }
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-statut { background: var(--fcx-statut-fond) !important; }
html:not([data-theme="clair"]) body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-statut button.actif { box-shadow: 0 1px 3px rgba(11, 36, 88, .28), inset 0 0 0 1px rgba(11, 36, 88, .18); }
/* FC Barcelona : l'encre blanche du bandeau (forcée par css/97 dans tout le bandeau) rendait
   « ✏️ Modifier » et le statut choisi blancs sur blanc. Ces deux boutons prennent un fond foncé. */
html[data-ambiance="fcb"] body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-btn-blanc { background: var(--accent, #A50044); border-color: #EDBB00; }
html[data-ambiance="fcb"] body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-statut button.actif { background: rgba(6, 14, 44, .78); box-shadow: inset 0 0 0 1px #EDBB00; }
html[data-ambiance="fcb"] body:not(.mode-cloud):not(.mode-espace-client) .fcx-client .fcx-btn-verre { background: rgba(6, 14, 44, .46) !important; border-color: rgba(255, 255, 255, .36) !important; }
/* L'adresse (bouton de js/110) héritait la taille du bandeau : elle prend celle des autres puces. */
.fcx-client button.fcx-chip { font-size: var(--t-s); }
/* Valencia CF : bandeau noir, le repère du statut choisi prend l'orange du club. */
html[data-ambiance="valencia"] .fcx-client .fcx-statut button.actif { background: #F27F1B; color: #111 !important; }
html[data-ambiance="valencia"] .fcx-client .fcx-btn-blanc { color: #111 !important; }

/* ═══ FICHE CLIENT : EN-TÊTE COMPACT SUR TÉLÉPHONE (js/20, 10.10.2026) ═══
   Sur iPhone les onglets commençaient vers 2 270 px, à trois écrans. En dessous de 768 px : contacts
   en icônes (tel:, mailto:), statut en liste déroulante, indicateurs en grille compacte de 2 rangées
   de 3, couvertures et relation repliées — les onglets arrivent dans le premier écran. */
@media (max-width: 768px) {
  .fcx-client.fcx-hero { padding: 12px 12px 10px; border-radius: 16px; margin-bottom: 10px; }
  .fcx-client .fcx-hero-haut { gap: 10px; }
  .fcx-client .fcx-identite { gap: 10px; flex-basis: 100%; align-items: center; }
  .fcx-client .fcx-avatar { padding: 2px; }
  .fcx-client .fcx-avatar > * { width: 38px !important; height: 38px !important; font-size: 16px !important; }
  .fcx-client .fcx-identite-texte { flex: 1; min-width: 0; }
  .fcx-client .fcx-surtitre { font-size: 10px; letter-spacing: 1px; }
  .fcx-client .fcx-nom { font-size: 19px !important; margin: 1px 0 0; }
  /* Thèmes de club : le nom est souligné (css/99-menu) — on laisse la place au trait sous le nom. */
  html:is([data-ambiance="fcb"], [data-ambiance="valencia"], [data-ambiance="arsenal"]) .fcx-client .fcx-nom { margin-bottom: 8px; }
  .fcx-client .fcx-sous { font-size: var(--t-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fcx-client .fcx-contacts { flex-wrap: nowrap; gap: 6px; margin-top: 8px; }
  .fcx-client .fcx-chip { height: 36px; box-sizing: border-box; }
  .fcx-client .fcx-chip-icone { padding: 0; width: 36px; justify-content: center; flex-shrink: 0; font-size: 16px; }
  .fcx-client .fcx-chip-icone .fcx-chip-txt { display: none; }
  .fcx-client .fcx-contacts > .fcx-chip:not(.fcx-chip-icone) { flex: 1 1 auto; min-width: 0; padding: 0 10px; }
  .fcx-client .nad-chip-plus { display: none; }
  .fcx-client .fcx-actions { width: 100%; align-items: stretch; }
  .fcx-client .fcx-actions-principales { width: 100%; gap: 6px; }
  .fcx-client .fcx-actions-principales > * { flex: 1 1 0; min-height: 40px; padding: 8px 6px; font-size: var(--t-s); }
  .fcx-client .fcx-actions-principales > .fcx-btn-icone { flex: 0 0 44px; }
  .fcx-client .fcx-lib-long, .fcx-kpis-client .fcx-lib-long { display: none; }
  .fcx-client .fcx-lib-court, .fcx-kpis-client .fcx-lib-court { display: inline; }
  .fcx-client .fcx-hero-bas { margin-top: 10px; padding-top: 10px; gap: 6px; }
  .fcx-client .fcx-statut { display: none; }
  .fcx-client .fcx-statut-liste { display: inline-block; font: inherit; font-size: var(--t-s); font-weight: 500; min-height: 34px; padding: 6px 10px;
    border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .3); }
  .fcx-client .fcx-statut-liste option { color: #0E1B33; background: #fff; }
  .fcx-client .fcx-badge { min-height: 34px; padding: 6px 10px; box-sizing: border-box; }
  .fcx-client .fcx-mandat-regler { display: none; }

  .fcx-kpis-client { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
  .fcx-kpis-client .fcx-kpi { padding: 8px 9px; border-radius: 12px; gap: 1px; }
  .fcx-kpis-client .fcx-kpi-label { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fcx-kpis-client .fcx-kpi-valeur { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fcx-kpis-client .fcx-kpi-sous { display: none; }
  .fcx-opps { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 10px; scrollbar-width: none; }
  .fcx-opp { white-space: nowrap; }

  .fcx-plis { margin-bottom: 10px; }
  .fcx-plis-btn { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 8px 14px;
    border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: var(--t-s); font-weight: 500; cursor: pointer; }
  .fcx-plis-chevron { transition: transform .15s; color: var(--text-muted); }
  .fcx-plis.ouvert .fcx-plis-chevron { transform: rotate(180deg); }
  .fcx-plis.ouvert .fcx-plis-btn { margin-bottom: 10px; }
  .fcx-plis:not(.ouvert) .fcx-plis-corps { display: none; }
  .fcx-plis-corps .fcx-relation { margin-bottom: 0; }
  /* Les onglets défilent de côté : un onglet ne se tasse plus sous son texte (libellés superposés). */
  .fiche-onglets-client { scrollbar-width: none; }
  .fiche-onglets-client > * { flex-shrink: 0; }
}
