/* Habillage Finactys Commercial : menu latéral sombre, contenu clair en cartes,
   indicateurs en tuiles, pastilles de statut (esprit outils CRM / ESN). */
:root {
  --f-nav: #16233a;
  --f-nav-texte: #b8c3d6;
  --f-nav-actif: #24375a;
  --f-accent: #2563eb;
  --f-accent-doux: #e8efff;
  --f-fond: #f4f6fa;
  --f-carte: #ffffff;
  --f-bord: #e3e8f0;
  --f-texte: #1d2939;
  --f-gris: #667085;
  --f-vert: #12805c;   --f-vert-doux: #e3f6ee;
  --f-orange: #b54708; --f-orange-doux: #fff1e0;
  --f-rouge: #c01c28;  --f-rouge-doux: #fdecec;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-color: var(--f-texte);
  --bs-primary: var(--f-accent);
  --bs-link-color: var(--f-accent);
}

body { background: var(--f-fond); font-size: .92rem; }

/* Mise en page : menu à gauche, bandeau en haut, contenu */
.f-app { display: flex; min-height: 100vh; }
.f-menu {
  width: 232px; flex-shrink: 0; background: var(--f-nav); color: var(--f-nav-texte);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.f-marque { padding: 1.25rem 1.25rem 1rem; color: #fff; font-weight: 700; font-size: 1.05rem;
  letter-spacing: .01em; display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.f-marque .f-logo { width: 30px; height: 30px; border-radius: 8px; background: var(--f-accent);
  display: grid; place-items: center; font-size: .95rem; }
.f-marque small { display: block; font-weight: 400; font-size: .72rem; color: var(--f-nav-texte); }
.f-rubrique { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: #7c8aa5; padding: 1rem 1.25rem .35rem; }
.f-lien { display: flex; align-items: center; gap: .7rem; padding: .5rem 1.25rem;
  color: var(--f-nav-texte); text-decoration: none; border-left: 3px solid transparent; }
.f-lien i { font-size: 1.05rem; width: 1.1rem; text-align: center; }
.f-lien:hover { color: #fff; background: rgba(255,255,255,.04); }
.f-lien.actif { color: #fff; background: var(--f-nav-actif); border-left-color: var(--f-accent); }
.f-lien.bientot { opacity: .45; pointer-events: none; }
.f-lien .badge { margin-left: auto; font-weight: 500; }
.f-menu-pied { margin-top: auto; padding: 1rem 1.25rem; font-size: .8rem;
  border-top: 1px solid rgba(255,255,255,.08); }

.f-corps { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.f-bandeau { height: 60px; background: var(--f-carte); border-bottom: 1px solid var(--f-bord);
  display: flex; align-items: center; gap: 1rem; padding: 0 1.75rem; position: sticky; top: 0;
  z-index: 10; }
.f-recherche { max-width: 380px; flex: 1; position: relative; }
.f-recherche i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%);
  color: var(--f-gris); }
.f-recherche input { padding-left: 2.2rem; background: var(--f-fond); border-color: transparent; }
.f-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--f-accent-doux);
  color: var(--f-accent); display: grid; place-items: center; font-weight: 600; font-size: .8rem; }
.f-contenu { padding: 1.75rem; }

/* Titres de page */
.f-titre { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.5rem; flex-wrap: wrap; }
.f-titre h1 { font-size: 1.45rem; font-weight: 700; margin: 0; }
.f-titre p { color: var(--f-gris); margin: .2rem 0 0; }

/* Cartes et tuiles d'indicateurs */
.f-carte { background: var(--f-carte); border: 1px solid var(--f-bord); border-radius: 12px; }
.f-carte-entete { padding: 1rem 1.25rem; border-bottom: 1px solid var(--f-bord);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.f-carte-entete h2 { font-size: 1rem; font-weight: 600; margin: 0; }
.f-tuiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 1.5rem; }
.f-tuile { padding: 1rem 1.15rem; position: relative; overflow: hidden; }
.f-tuile .f-tuile-libelle { color: var(--f-gris); font-size: .8rem; font-weight: 500; }
.f-tuile .f-tuile-valeur { font-size: 1.85rem; font-weight: 700; line-height: 1.2; margin-top: .2rem; }
.f-tuile .f-tuile-aide { color: var(--f-gris); font-size: .75rem; }
.f-tuile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--f-accent); }
.f-tuile.vert::before { background: var(--f-vert); }
.f-tuile.orange::before { background: #f79009; }
.f-tuile.rouge::before { background: var(--f-rouge); }
.f-tuile.gris::before { background: #98a2b3; }

/* Tableaux */
.f-table { margin: 0; }
.f-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--f-gris); font-weight: 600; background: #f9fafc; border-bottom-color: var(--f-bord);
  white-space: nowrap; padding: .7rem 1rem; }
.f-table td { padding: .7rem 1rem; vertical-align: middle; border-color: var(--f-bord); }
.f-table tbody tr:hover { background: #f9fbff; }
.f-table .f-nom { font-weight: 600; color: var(--f-texte); text-decoration: none; }
.f-table .f-ref { color: var(--f-gris); font-size: .75rem; }
.f-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Pastilles de statut */
.f-pastille { display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .6rem;
  border-radius: 999px; font-size: .75rem; font-weight: 600; white-space: nowrap;
  background: #eef1f5; color: #475467; }
.f-pastille::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; }
.f-pastille.recente, .f-pastille.vert { background: var(--f-vert-doux); color: var(--f-vert); }
.f-pastille.ancienne, .f-pastille.orange { background: var(--f-orange-doux); color: var(--f-orange); }
.f-pastille.a_relancer, .f-pastille.rouge { background: var(--f-rouge-doux); color: var(--f-rouge); }
.f-pastille.bleu { background: var(--f-accent-doux); color: var(--f-accent); }

.f-vide { padding: 2.5rem 1rem; text-align: center; color: var(--f-gris); }
.f-vide i { font-size: 1.8rem; display: block; margin-bottom: .5rem; }

.f-filtres { display: flex; gap: .5rem; flex-wrap: wrap; }
.f-filtres .btn { border-radius: 999px; font-size: .8rem; }

/* Saisie : panneau latéral, formulaires utilisables sur 375 px (CDC-11) */
[x-cloak] { display: none !important; }
.f-message { background: var(--f-vert-doux); color: var(--f-vert); border-radius: 10px;
  padding: .6rem 1rem; margin-bottom: 1rem; font-weight: 500; }
.f-panneau:empty { display: none; }
.f-panneau { position: fixed; inset: 0; z-index: 1050; background: rgba(16, 24, 40, .35);
  display: flex; justify-content: flex-end; }
.f-panneau > .f-formulaire { width: min(520px, 100%); height: 100%; overflow-y: auto;
  background: var(--f-carte); box-shadow: -8px 0 24px rgba(16, 24, 40, .15); }
.f-page-formulaire { max-width: 560px; margin: 0 auto; }
.f-formulaire { padding: 0 1.25rem 1.25rem; }
.f-formulaire-entete { display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--f-carte); padding: 1rem 0 .75rem; z-index: 1;
  border-bottom: 1px solid var(--f-bord); margin-bottom: .75rem; }
.f-formulaire-entete h2 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.f-fermer { border: 0; background: none; color: var(--f-gris); font-size: 1.1rem; padding: .25rem; }
.f-rappel { background: var(--f-fond); border-radius: 8px; padding: .5rem .75rem; font-size: .85rem; }
.f-champ { margin-bottom: .8rem; }
.f-libelle { display: block; font-weight: 600; font-size: .82rem; margin-bottom: .3rem; }
.f-requis { color: var(--f-rouge); }
.f-aide { color: var(--f-gris); font-size: .78rem; margin-top: .2rem; }
.f-erreur { color: var(--f-rouge); font-size: .8rem; margin-top: .2rem; }
.f-champ.erreur input, .f-champ.erreur select { border-color: var(--f-rouge); }
.f-formulaire input[type=text], .f-formulaire input[type=email], .f-formulaire input[type=date],
.f-formulaire select { width: 100%; padding: .5rem .7rem; border: 1px solid var(--f-bord);
  border-radius: 8px; font: inherit; font-size: 16px; /* pas de zoom sur téléphone */
  background: #fff; min-height: 42px; }
.f-deux { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.f-boutons { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .4rem; }
.f-boutons.serre { grid-template-columns: repeat(6, 1fr); }
.f-bouton { margin: 0; }
.f-bouton input { position: absolute; opacity: 0; pointer-events: none; }
.f-bouton span { display: block; text-align: center; padding: .5rem .3rem; border-radius: 8px;
  border: 1px solid var(--f-bord); font-size: .8rem; cursor: pointer; min-height: 42px;
  display: grid; place-items: center; }
.f-bouton input:checked + span { background: var(--f-accent); border-color: var(--f-accent); color: #fff; }
.f-bouton input:focus-visible + span { outline: 2px solid var(--f-accent); outline-offset: 2px; }
.f-cases { display: flex; flex-direction: column; gap: .15rem; }
.f-cases-defilantes { max-height: 190px; overflow-y: auto; border: 1px solid var(--f-bord);
  border-radius: 8px; padding: .35rem .6rem; }
.f-case { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; cursor: pointer; }
.f-case input { width: 18px; height: 18px; flex-shrink: 0; }
.f-case .f-pastille { margin-left: auto; }
.f-lien-action { border: 0; background: none; color: var(--f-accent); font-weight: 500;
  padding: .35rem 0; font-size: .85rem; }
.f-en-ligne { border: 1px dashed var(--f-accent); border-radius: 10px; padding: .75rem;
  margin: .5rem 0 .25rem; background: #fbfcff; }
.f-en-ligne-titre { display: flex; gap: .4rem; align-items: center;
  font-weight: 600; margin-bottom: .5rem; }
.f-en-ligne-titre .f-fermer { margin-left: auto; }
.f-alerte { border-radius: 10px; padding: .75rem; margin-bottom: .8rem; }
.f-alerte.orange { background: var(--f-orange-doux); }
.f-alerte.rouge { background: var(--f-rouge-doux); color: var(--f-rouge); font-weight: 500; }
.f-homonyme { display: block; width: 100%; text-align: left; margin-top: .4rem; }
.f-etape-suite h3 { font-size: 1rem; font-weight: 700; margin: .25rem 0 .5rem; }
.f-sans-suite { border-top: 1px solid var(--f-bord); padding-top: .6rem; margin-top: .4rem; }
.f-pied { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem;
  position: sticky; bottom: 0; background: var(--f-carte); padding: .75rem 0 0; }
.f-pied .btn { min-height: 42px; padding: .4rem 1.1rem; border-radius: 8px; }
.f-saisie-rapide { white-space: nowrap; text-align: right; }
.f-saisie-rapide a { color: var(--f-gris); padding: .25rem .35rem; border-radius: 6px; }
.f-saisie-rapide a:hover { color: var(--f-accent); background: var(--f-accent-doux); }

/* Fiche client (section 9) */
.f-selection { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  padding: .75rem 1rem; margin-bottom: 1.25rem; }
.f-selection .f-libelle { margin: 0; }
.f-selection select, .f-filtres-onglet select { padding: .35rem .6rem; border: 1px solid var(--f-bord);
  border-radius: 8px; font: inherit; background: #fff; max-width: 100%; }
.f-selection #choix-groupe { min-width: 220px; font-weight: 600; }
.f-selection .btn { margin-left: auto; }
.f-titre-fiche { margin-bottom: .75rem; }
.f-onglets { display: flex; gap: .25rem; border-bottom: 1px solid var(--f-bord);
  margin-bottom: 1.25rem; overflow-x: auto; }
.f-onglets a { padding: .55rem .9rem; color: var(--f-gris); text-decoration: none; font-weight: 500;
  border-bottom: 2px solid transparent; white-space: nowrap; }
.f-onglets a.actif { color: var(--f-accent); border-bottom-color: var(--f-accent); }
.f-synthese { margin-bottom: 1.25rem; }
.f-champs-lecture { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 2rem;
  padding: 1rem 1.25rem; margin: 0; }
.f-champs-lecture > div { display: grid; grid-template-columns: 170px 1fr; gap: .5rem; }
.f-champs-lecture .f-large { grid-column: 1 / -1; }
.f-champs-lecture dt { color: var(--f-gris); font-weight: 500; }
.f-champs-lecture dd { margin: 0; }
.f-grille-synthese { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0 1rem; padding-top: 1rem; }
.f-grille-synthese .f-champ:has(textarea) { grid-column: 1 / -1; }
.f-formulaire textarea { width: 100%; border: 1px solid var(--f-bord); border-radius: 8px;
  padding: .5rem .7rem; font: inherit; }
.f-compteurs { grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
.f-compteurs .f-tuile-valeur { font-size: 1.4rem; }
.f-niveaux { display: flex; gap: .9rem; }
.f-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.f-colonne-titre { padding: .7rem 1.25rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; font-size: .8rem; border-radius: 12px 12px 0 0;
  background: var(--f-accent-doux); color: var(--f-accent); }
.f-colonne.achats .f-colonne-titre { background: var(--f-orange-doux); color: var(--f-orange); }
.f-bloc { padding: .9rem 1.25rem; border-top: 1px solid var(--f-bord); }
.f-bloc:first-of-type { border-top: 0; }
.f-bloc-titre { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.f-bloc-titre h3 { font-size: .92rem; font-weight: 700; margin: 0 0 .5rem; }
.f-liste { list-style: none; margin: 0 0 .25rem; padding: 0; }
.f-liste li { display: flex; gap: .75rem; align-items: flex-start; padding: .45rem 0;
  border-bottom: 1px dashed var(--f-bord); }
.f-liste li:last-child { border-bottom: 0; }
.f-liste .f-date { flex-shrink: 0; width: 82px; color: var(--f-gris); font-size: .82rem;
  font-variant-numeric: tabular-nums; }
.f-liste .f-ref { color: var(--f-gris); font-size: .78rem; }
.f-grandit { flex: 1; min-width: 0; }
.f-boutons-ligne { display: flex; gap: .15rem; flex-shrink: 0; }
.f-boutons-ligne a { color: var(--f-gris); padding: .15rem .35rem; border-radius: 6px; }
.f-boutons-ligne a:hover { color: var(--f-accent); background: var(--f-accent-doux); }
.f-gris { opacity: .5; }
.f-prox, .f-case-reseau { display: inline-grid; place-items: center; width: 26px; height: 26px;
  border-radius: 6px; font-weight: 700; font-size: .8rem; flex-shrink: 0;
  background: #eef1f5; color: #475467; }
/* Proximité 0 à 5 en dégradé de vert (onglet « Réseau » de l'Excel) */
.prox-0 { background: #f2f4f7; color: #98a2b3; }
.prox-1 { background: #e3f6ee; color: #12805c; }
.prox-2 { background: #bfe9d5; color: #0d6e4e; }
.prox-3 { background: #86d4b1; color: #0a5a40; }
.prox-4 { background: #3fb487; color: #fff; }
.prox-5 { background: #12805c; color: #fff; }
.prox-x { background: transparent; }
.f-reseau td, .f-reseau th { padding: .5rem .6rem; }
.f-filtres-onglet { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin-bottom: 1rem; }
.f-groupe-ligne td { background: #f4f6fa; font-weight: 700; }
.f-sous-groupe-ligne td { color: var(--f-gris); font-weight: 600; padding-left: 1.75rem !important;
  font-size: .82rem; }
.mt-3 { margin-top: 1rem; }

/* Accueil personnel (section 7) */
.f-voir-comme { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  background: var(--f-orange-doux); border-radius: 10px; padding: .5rem .9rem; margin-bottom: 1rem;
  font-size: .85rem; font-weight: 500; }
.f-voir-comme select { padding: .3rem .5rem; border: 1px solid var(--f-bord); border-radius: 8px;
  font: inherit; background: #fff; max-width: 100%; }
a.f-tuile { color: inherit; text-decoration: none; display: block; }
a.f-tuile:hover { border-color: var(--f-accent); }
.f-tuile.actif { outline: 2px solid var(--f-accent); }
.f-accueil { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.f-accueil > .f-carte { grid-column: span 2; min-width: 0; }
.f-accueil > .f-accueil-a-faire { grid-column: span 4; }
.f-liste-accueil { padding: .25rem 1.25rem .5rem; }
.f-liste-accueil .f-vide { display: block; border: 0; padding: 1.5rem .5rem; }
.f-retard { background: linear-gradient(90deg, var(--f-rouge-doux), transparent 40%); }
.f-confiee { color: var(--f-accent); font-weight: 500; }
.f-actions-ligne { display: flex; gap: .35rem; flex-shrink: 0; align-items: flex-start; }
.f-actions-ligne .btn { font-size: .78rem; padding: .2rem .55rem; border-radius: 6px; }
.f-reporter { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.f-reporter input { padding: .2rem .4rem; border: 1px solid var(--f-bord); border-radius: 6px;
  font: inherit; font-size: 16px; }
.f-suivi { border-style: dashed; }

/* Messages d'erreur */
.f-message.error { background: var(--f-rouge-doux); color: var(--f-rouge); }

/* Opportunités : pipeline (section 10, CDC-26) */
.f-pipeline { display: grid; grid-template-columns: repeat(6, minmax(160px, 1fr)); gap: .6rem;
  overflow-x: auto; padding-bottom: .5rem; align-items: start; }
.f-pipeline-colonne { background: #eef1f6; border-radius: 12px; padding: .5rem; min-height: 160px;
  transition: background .15s; }
.f-pipeline-colonne.survol { background: var(--f-accent-doux); outline: 2px dashed var(--f-accent); }
.f-pipeline-colonne.cloturee { background: #f4f5f7; }
.f-pipeline-colonne header { display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: .8rem; padding: .25rem .35rem .5rem; }
.f-pipeline-cartes { display: flex; flex-direction: column; gap: .5rem; }
.f-carte-opp { background: var(--f-carte); border: 1px solid var(--f-bord); border-radius: 10px;
  padding: .6rem .7rem; cursor: grab; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.f-carte-opp.deplacee { opacity: .4; }
.f-carte-opp .f-nom { display: block; font-weight: 600; line-height: 1.25; }
.f-carte-opp .f-ref { color: var(--f-gris); font-size: .75rem; }
.f-carte-opp-pied { display: flex; justify-content: space-between; align-items: center; gap: .35rem;
  margin-top: .35rem; font-size: .75rem; color: var(--f-gris); flex-wrap: wrap; }
.f-pipeline-vide { color: #98a2b3; text-align: center; padding: 1rem 0; }
.px-2 { padding-left: .35rem; padding-right: .35rem; }

/* Fiche opportunité : étapes du cycle (CDC-22) */
.f-etapes { display: flex; list-style: none; padding: 0; margin: 0 0 1rem; gap: .25rem;
  overflow-x: auto; counter-reset: none; }
.f-etapes li { flex: 1; min-width: 120px; padding: .45rem .6rem; font-size: .78rem; font-weight: 600;
  background: #eef1f5; color: var(--f-gris); border-radius: 8px; white-space: nowrap; }
.f-etapes li.passee { background: var(--f-vert-doux); color: var(--f-vert); }
.f-etapes li.courante { background: var(--f-accent); color: #fff; }
.f-etape-courante { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem;
  flex-wrap: wrap; }
.f-etape-courante h2 { font-size: 1.15rem; font-weight: 700; margin: .1rem 0 .35rem; }
.f-question { color: var(--f-accent); font-weight: 500; margin: 0 0 .5rem; }
.f-etape-boutons { display: flex; flex-direction: column; gap: .4rem; align-items: flex-end; }
.f-etape-boutons .btn[disabled] { opacity: .5; cursor: not-allowed; }
.f-une-colonne > div { grid-template-columns: 150px 1fr; }
.f-champs-lecture.f-une-colonne { grid-template-columns: 1fr; }
.f-depot { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .75rem 1.25rem;
  border-top: 1px solid var(--f-bord); }
.f-depot select { padding: .3rem .5rem; border: 1px solid var(--f-bord); border-radius: 8px; font: inherit; }
.f-plus { margin: .5rem 0 .8rem; }
.f-plus summary { cursor: pointer; color: var(--f-accent); font-weight: 500; font-size: .85rem;
  margin-bottom: .5rem; }
.mb-0 { margin-bottom: 0; }

@media (max-width: 1100px) {
  .f-colonnes, .f-champs-lecture { grid-template-columns: 1fr; }
  .f-accueil > .f-carte, .f-accueil > .f-accueil-a-faire { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .f-liste-accueil li { flex-wrap: wrap; }
  .f-tuiles { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .f-tuile { padding: .75rem .85rem; }
  .f-tuile .f-tuile-valeur { font-size: 1.4rem; }
}
@media (max-width: 600px) {
  .f-champs-lecture > div { grid-template-columns: 1fr; gap: 0; }
  .f-selection .btn { margin-left: 0; }
}

@media (max-width: 900px) {
  .f-menu { width: 64px; }
  .f-menu .f-texte, .f-rubrique, .f-marque small, .f-marque span, .f-menu-pied { display: none; }
  .f-lien { justify-content: center; padding: .7rem 0; }
  .f-contenu { padding: 1rem; }
  .f-bandeau { padding: 0 1rem; }
}

/* Socle de secours : la mise en page tient même si le CDN Bootstrap est bloqué
   (réseau d'entreprise). Bootstrap, quand il charge, applique les mêmes règles. */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--f-texte); line-height: 1.5; }
a { color: var(--f-accent); }
.d-flex { display: flex; } .align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.ms-auto { margin-left: auto; } .gap-2 { gap: .5rem; } .text-end { text-align: right; }
.text-muted { color: var(--f-gris); } .small, small { font-size: .82em; }
.fw-semibold { font-weight: 600; } .lh-sm { line-height: 1.25; } .w-100 { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 1rem; } .row > * { flex: 1 1 320px; min-width: 0; }
@media (min-width: 1200px) { .col-xl-8 { flex: 2 1 0; } .col-xl-4 { flex: 1 1 0; } }
.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid var(--f-bord); text-align: left; }
.table th.f-num, .table td.f-num { text-align: right; }
.list-group { list-style: none; margin: 0; padding: 0; }
.list-group-item { padding: .6rem 1.25rem; border-bottom: 1px solid var(--f-bord); }
.list-group-item:last-child { border-bottom: 0; }
.form-control { width: 100%; padding: .35rem .75rem; border: 1px solid var(--f-bord);
  border-radius: 8px; font: inherit; }
.btn { display: inline-block; padding: .3rem .85rem; border: 1px solid var(--f-bord);
  text-decoration: none; color: var(--f-texte); background: var(--f-carte); }
.btn-primary { background: var(--f-accent); border-color: var(--f-accent); color: #fff; }
.badge { display: inline-block; padding: .2rem .5rem; border-radius: 6px; font-size: .72rem; }
.text-bg-warning { background: #ffc107; color: #000; }

/* Pilotage (section 11) : alertes, vue cabinet, listes, fusion */
.f-alertes > summary { list-style: none; cursor: pointer; }
.f-alertes > summary::-webkit-details-marker { display: none; }
.mb-3 { margin-bottom: 1rem; }
.f-filtres-tableau { padding: .75rem 1rem; margin: 0; border-bottom: 1px solid var(--f-bord); }
.f-filtres-tableau input[type=search], .f-filtres-tableau input[type=date],
.f-filtres-tableau select { padding: .35rem .6rem; border: 1px solid var(--f-bord); border-radius: 8px;
  font: inherit; background: #fff; max-width: 100%; }
form.f-filtres-onglet.f-filtres-tableau:not(.f-carte *) { background: var(--f-carte);
  border: 1px solid var(--f-bord); border-radius: 12px; margin-bottom: 1rem; }
.f-filtre-date { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem;
  color: var(--f-gris); }
.f-tri { color: inherit; text-decoration: none; white-space: nowrap; }
.f-tri.actif { color: var(--f-accent); }
.f-table-cabinet td { white-space: nowrap; }
.f-matrice th, .f-matrice td { vertical-align: top; }
.f-matrice td { min-width: 140px; }
.f-case-prioritaire { outline: 2px solid var(--f-rouge); outline-offset: -3px;
  background: var(--f-rouge-doux); }
.f-pagination { display: flex; gap: .75rem; align-items: center; justify-content: center;
  margin-top: 1rem; }
.f-doublons { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.f-difference { background: var(--f-orange-doux); }
.f-fusion-choix { display: flex; gap: .75rem; justify-content: flex-end; padding: 1rem 1.25rem;
  flex-wrap: wrap; }

/* Fiche opportunité sur téléphone : rien ne dépasse de l'écran */
.f-colonnes > * { min-width: 0; }
.f-depot input[type=file] { max-width: 100%; }
@media (max-width: 600px) {
  .f-une-colonne > div { grid-template-columns: 1fr; gap: 0; }
  .f-etape-boutons { align-items: stretch; width: 100%; }
}
/* Domaines et compétences des contacts métier, organigramme du client (décision 0012) */
.f-etiquette { display: inline-block; padding: .05rem .45rem; margin: .1rem .2rem .1rem 0;
  border-radius: 6px; font-size: .72rem; font-weight: 600; background: #eef1f5; color: #475467; }
.f-etiquette.domaine { background: var(--f-accent-doux); color: var(--f-accent); }
.f-cases:has(.f-puce) { flex-direction: row; flex-wrap: wrap; gap: .35rem; }
.f-case:has(.f-puce) { border: 1px solid var(--f-bord); border-radius: 999px; padding: .25rem .75rem;
  font-size: .85rem; }
.f-case:has(.f-puce:checked) { background: var(--f-accent-doux); border-color: var(--f-accent);
  color: var(--f-accent); font-weight: 600; }
.f-case .f-puce { width: 15px; height: 15px; }
.f-organigramme { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1rem; align-items: start; }
.f-org-domaine header { display: flex; justify-content: space-between; align-items: center;
  padding: .75rem 1rem; border-bottom: 1px solid var(--f-bord); background: var(--f-accent-doux);
  border-radius: 12px 12px 0 0; }
.f-org-domaine header h2 { font-size: .95rem; font-weight: 700; margin: 0; color: var(--f-accent);
  text-transform: uppercase; letter-spacing: .04em; }
.f-org-domaine.vide { opacity: .6; }
.f-org-domaine.sans header { background: #f4f5f7; }
.f-org-domaine.sans header h2 { color: var(--f-gris); }
.f-org-niveau { display: grid; grid-template-columns: 105px 1fr; gap: .5rem; padding: .6rem 1rem;
  border-top: 1px dashed var(--f-bord); position: relative; }
.f-org-niveau:first-of-type { border-top: 0; }
.f-org-libelle { font-size: .75rem; font-weight: 700; color: var(--f-gris); text-transform: uppercase;
  letter-spacing: .04em; padding-top: .35rem; }
.f-org-cartes { display: flex; flex-direction: column; gap: .4rem; }
.f-org-niveau.manager .f-org-cartes { padding-left: .75rem; border-left: 2px solid var(--f-bord); }
.f-org-niveau.collaborateur .f-org-cartes { padding-left: 1.5rem; border-left: 2px solid var(--f-bord); }
.f-org-contact { display: block; border: 1px solid var(--f-bord); border-radius: 8px;
  padding: .4rem .6rem; color: inherit; text-decoration: none; background: var(--f-carte); }
.f-org-contact:hover { border-color: var(--f-accent); }
.f-org-nom { font-weight: 600; display: flex; align-items: center; gap: .4rem; }
.f-org-nom .f-prox { width: 22px; height: 22px; font-size: .72rem; }
.f-org-vide { color: #98a2b3; padding-top: .3rem; }
/* Fiche contact (section 9) : identité, échanges, relations et opportunités */
.f-fiche-contact { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr) minmax(260px, 1fr);
  gap: 1rem; align-items: start; }
.f-pile { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.f-fiche-contact > * { min-width: 0; }
.f-ma-proximite { padding: .75rem 1.25rem 1rem; border-top: 1px solid var(--f-bord); }
@media (max-width: 1100px) {
  .f-fiche-contact { grid-template-columns: 1fr; }
}
.f-fiche-contact .f-une-colonne > div { grid-template-columns: 95px 1fr; }
.f-champs-lecture dd { overflow-wrap: anywhere; min-width: 0; }
/* Opportunités : responsable de la réponse, go / no-go, profils, dépôt (décision 0013) */
.f-responsable { display: flex; align-items: center; gap: .6rem; background: var(--f-carte);
  border: 1px solid var(--f-bord); border-radius: 12px; padding: .5rem .9rem .5rem .6rem; }
.f-responsable .f-avatar { width: 40px; height: 40px; font-size: .9rem; }
.f-go { display: flex; gap: .4rem; }
.f-go form { margin: 0; }
.f-btn-go { background: var(--f-vert); border-color: var(--f-vert); color: #fff; }
.f-btn-nogo { background: var(--f-carte); border-color: var(--f-rouge); color: var(--f-rouge); }
.f-profils { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: .75rem; padding: 1rem 1.25rem; }
.f-profil { border: 1px solid var(--f-bord); border-radius: 10px; padding: .7rem .85rem; min-width: 0; }
.f-profil.sans-candidat { border-color: var(--f-rouge); background: #fffafa; }
.f-profil header { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start;
  flex-wrap: wrap; margin-bottom: .35rem; }
.f-profil-etat { display: flex; align-items: center; gap: .2rem; }
.f-candidats li { align-items: center; }
.f-etat-candidat { margin: 0; }
.f-etat-candidat select { border: 1px solid var(--f-bord); border-radius: 999px; padding: .2rem .6rem;
  font: inherit; font-size: .78rem; font-weight: 600; background: #eef1f5; }
.f-etat-candidat select.etat-cv_envoye, .f-etat-candidat select.etat-entretien {
  background: var(--f-accent-doux); color: var(--f-accent); }
.f-etat-candidat select.etat-retenu { background: var(--f-vert-doux); color: var(--f-vert); }
.f-etat-candidat select.etat-refuse, .f-etat-candidat select.etat-retire {
  background: var(--f-rouge-doux); color: var(--f-rouge); }
.f-depot-zone { padding: .75rem 1.25rem 1rem; border-top: 1px solid var(--f-bord); }
.f-depot-cible { display: flex; align-items: center; gap: .75rem; border: 2px dashed var(--f-bord);
  border-radius: 10px; padding: .9rem 1rem; cursor: pointer; color: var(--f-gris); }
.f-depot-cible i { font-size: 1.6rem; color: var(--f-accent); }
.f-depot-cible input { display: none; }
.f-depot-zone.survol .f-depot-cible, .f-depot-cible:hover { border-color: var(--f-accent);
  background: var(--f-accent-doux); }
.f-depot-type { margin-top: .5rem; font-size: .82rem; display: flex; gap: .5rem; align-items: center;
  flex-wrap: wrap; }
.f-depot-type select { padding: .2rem .5rem; border: 1px solid var(--f-bord); border-radius: 6px; font: inherit; }
.f-formulaire textarea { min-height: 70px; }
.f-formulaire input[type=number] { width: 100%; padding: .5rem .7rem; border: 1px solid var(--f-bord);
  border-radius: 8px; font: inherit; font-size: 16px; min-height: 42px; }
/* Saisie plus fluide (décision 0014) : choix avec recherche, filtre des contacts, dates rapides */
.f-combo { position: relative; min-width: 0; }
.f-selection .f-combo { min-width: 240px; }
.f-combo-champ { width: 100%; padding: .5rem 2rem .5rem .7rem; border: 1px solid var(--f-bord);
  border-radius: 8px; font: inherit; font-size: 16px; min-height: 42px; background: #fff
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23667085' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E")
  no-repeat right .7rem center; }
.f-selection .f-combo-champ { min-height: 34px; padding-top: .35rem; padding-bottom: .35rem; font-weight: 600; }
.f-combo-champ:focus { outline: 2px solid var(--f-accent-doux); border-color: var(--f-accent); }
/* La vraie liste reste dans la page (valeur envoyée, contrôle « obligatoire ») mais invisible */
.f-combo-cache { position: absolute !important; left: 0; bottom: 0; width: 100% !important;
  height: 1px !important; opacity: 0; pointer-events: none; }
.f-combo-liste { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 2px);
  max-height: 260px; overflow-y: auto; margin: 0; padding: .25rem 0; list-style: none;
  background: var(--f-carte); border: 1px solid var(--f-bord); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .12); }
.f-combo-liste li { padding: .45rem .75rem; cursor: pointer; }
.f-combo-liste li:hover, .f-combo-liste li.actif { background: var(--f-accent-doux); }
.f-combo-liste li.choisi { font-weight: 600; color: var(--f-accent); }
.f-combo-liste .f-combo-vide { color: var(--f-gris); cursor: default; }
.f-filtre-cases { width: 100%; margin-bottom: .35rem; padding: .4rem .7rem; border: 1px solid var(--f-bord);
  border-radius: 8px; font: inherit; font-size: 16px; }
.f-dates-rapides { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.f-dates-rapides button { border: 1px solid var(--f-bord); background: var(--f-carte); border-radius: 999px;
  padding: .15rem .6rem; font-size: .78rem; color: var(--f-accent); cursor: pointer; }
.f-dates-rapides button:hover { background: var(--f-accent-doux); border-color: var(--f-accent); }
.f-reporter .f-dates-rapides { width: 100%; }/* Fiche action (décision 0015) : compte rendu au centre, détails à droite */
.f-fiche-action { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1rem; align-items: start; }
.f-fiche-action > * { min-width: 0; }
.f-fiche-action .f-une-colonne > div { grid-template-columns: 120px 1fr; }
.f-compte-rendu { padding: 1rem 1.25rem 1.25rem; line-height: 1.6; overflow-wrap: anywhere; }
.f-compte-rendu p:last-child { margin-bottom: 0; }
.f-lien-fiche { color: inherit; text-decoration: none; }
.f-lien-fiche:hover { color: var(--f-accent); text-decoration: underline; }
.f-extrait { color: var(--f-gris); font-size: .85rem; white-space: pre-line; margin-top: .15rem; }
@media (max-width: 1100px) { .f-fiche-action { grid-template-columns: 1fr; } }
/* Retours sur l'outil (décision 0016) : menu du clic droit, élément visé, bouton flottant */
.f-retour-menu { position: fixed; z-index: 1100; background: var(--f-carte); border: 1px solid var(--f-bord);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 24, 40, .18); padding: .3rem; min-width: 220px; }
.f-retour-menu button { display: flex; align-items: center; gap: .5rem; width: 100%; border: 0;
  background: none; padding: .45rem .7rem; border-radius: 7px; font-size: .88rem; color: var(--f-texte);
  text-align: left; }
.f-retour-menu button:hover, .f-retour-menu button:focus { background: var(--f-accent-doux); color: var(--f-accent);
  outline: none; }
.f-retour-survol { outline: 2px dashed var(--f-accent) !important; outline-offset: 2px; }
.f-retour-cible, .f-retour-montre { outline: 3px solid #f59e0b !important; outline-offset: 2px;
  border-radius: 4px; }
.f-retour-cible { position: relative; z-index: 1051; background-color: var(--f-carte); }
.f-retour-flottant { position: fixed; right: 1rem; bottom: 1rem; z-index: 1000; display: flex;
  align-items: center; gap: .4rem; border: 1px solid var(--f-bord); background: var(--f-carte);
  color: var(--f-gris); border-radius: 999px; padding: .4rem .8rem; font-size: .8rem;
  box-shadow: 0 4px 12px rgba(16, 24, 40, .12); opacity: .85; }
.f-retour-flottant:hover { opacity: 1; color: var(--f-accent); border-color: var(--f-accent); }
.f-merci { text-align: center; padding: 2rem 1rem; }
.f-merci > .bi { font-size: 2.5rem; color: var(--f-vert); }
.f-retours td { vertical-align: top; }
.f-retour-texte { min-width: 260px; max-width: 480px; white-space: normal; }
.f-retour-suivi { display: flex; flex-direction: column; gap: .3rem; min-width: 170px; }
.f-retour-suivi select, .f-retour-suivi textarea { padding: .3rem .5rem; border: 1px solid var(--f-bord);
  border-radius: 8px; font-size: .82rem; background: var(--f-carte); }
.f-retour-ligne.traite, .f-retour-ligne.ecarte { opacity: .6; }
@media (max-width: 760px) { .f-retour-flottant span { display: none; } }
/* Bulle d'un retour sur la page commentée (décision 0016) */
.f-bulle { position: absolute; z-index: 1040; width: 320px; max-width: calc(100vw - 16px);
  background: #fffbeb; border: 1px solid #f59e0b; border-radius: 12px; padding: .7rem .85rem .6rem;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .18); font-size: .86rem; }
.f-bulle[hidden] { display: none; }
.f-bulle-fleche { position: absolute; width: 14px; height: 14px; background: #fffbeb;
  border: 1px solid #f59e0b; transform: rotate(45deg); }
.f-bulle.droite .f-bulle-fleche { left: -8px; top: 14px; border-top: 0; border-right: 0; }
.f-bulle.dessous .f-bulle-fleche { top: -8px; border-bottom: 0; border-right: 0; }
.f-bulle.f-bulle-cote { position: fixed; right: 1rem; top: 5rem; }
.f-bulle.f-bulle-cote .f-bulle-fleche { display: none; }
.f-bulle-entete { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.f-bulle-entete .f-fermer { margin-left: auto; border: 0; background: none; color: var(--f-gris); }
.f-bulle-qui { color: var(--f-gris); font-size: .78rem; }
.f-bulle-element { color: var(--f-gris); font-size: .78rem; margin-bottom: .3rem; }
.f-bulle-texte { white-space: normal; line-height: 1.5; margin-bottom: .6rem; overflow-wrap: anywhere; }
.f-bulle-suivi { min-width: 0; }
.f-bulle-pied { display: flex; justify-content: space-between; gap: .5rem; margin-top: .5rem;
  font-size: .8rem; }
/* Écran de connexion (décision 0018) */
.f-connexion { min-height: 80vh; display: flex; align-items: center; justify-content: center; }
.f-connexion-carte { width: min(400px, 100%); background: var(--f-carte); border: 1px solid var(--f-bord);
  border-radius: 14px; padding: 2rem 1.75rem; box-shadow: 0 10px 30px rgba(16, 24, 40, .08); }
.f-connexion-marque { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem;
  margin-bottom: 1.5rem; }
.f-connexion-marque .f-logo { width: 34px; height: 34px; border-radius: 9px; background: var(--f-accent);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.f-connexion-marque small { display: block; font-weight: 400; font-size: .75rem; color: var(--f-gris); }
.f-connexion-ou { display: flex; align-items: center; gap: .75rem; color: var(--f-gris); margin: 1rem 0;
  font-size: .8rem; }
.f-connexion-ou::before, .f-connexion-ou::after { content: ""; flex: 1; border-top: 1px solid var(--f-bord); }
/* Fil des échanges liés (décision 0021) : une ligne par action, décalée sous celle qu'elle suit */
.f-fil { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; }
.f-fil-etape { position: relative; display: flex; gap: .7rem; padding: .55rem 0 .55rem
  calc(var(--profondeur, 0) * 1.5rem); border-left: 0; }
.f-fil-etape + .f-fil-etape { border-top: 1px dashed var(--f-bord); }
.f-fil-point { flex: none; width: 12px; height: 12px; margin-top: .35rem; border-radius: 50%;
  background: var(--f-carte); border: 2px solid var(--f-accent); }
.f-fil-etape.fait .f-fil-point { background: var(--f-vert); border-color: var(--f-vert); }
.f-fil-etape.annule { opacity: .55; }
.f-fil-etape.ici { background: var(--f-accent-doux); border-radius: 8px; margin: 0 -.5rem;
  padding-right: .5rem; padding-left: calc(var(--profondeur, 0) * 1.5rem + .5rem); }
.f-fil-etape .f-pastille { margin: 0 .3rem; }
/* Liste désactivée (ex. objet type quand un texte libre est saisi) : grisée, non cliquable */
.f-formulaire select:disabled { background-color: #f2f4f7; color: #98a2b3; cursor: not-allowed; }
.f-combo:has(select:disabled) .f-combo-champ { background-color: #f2f4f7; color: #98a2b3;
  pointer-events: none; }
/* Filtres de l'accueil (décision 0022) */
.f-filtres-accueil { margin-bottom: 1rem; border-radius: 12px; }
.f-filtres-accueil input[type=search] { min-width: 240px; flex: 1; }
/* Liste déroulante à choix multiples (ex. autres consultants présents, décision 0025) */
.f-multi { position: relative; }
.f-multi > summary { list-style: none; display: flex; justify-content: space-between; align-items: center;
  gap: .5rem; padding: .45rem .75rem; border: 1px solid var(--f-bord); border-radius: 8px; cursor: pointer;
  background: var(--f-carte); color: var(--f-texte); }
.f-multi > summary::-webkit-details-marker { display: none; }
.f-multi > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-multi[open] > summary { border-color: var(--f-accent); }
.f-multi-panneau { margin-top: .35rem; border: 1px solid var(--f-bord); border-radius: 8px; padding: .5rem;
  background: var(--f-carte); }
.f-multi-recherche { width: 100%; padding: .35rem .6rem; border: 1px solid var(--f-bord); border-radius: 8px;
  margin-bottom: .4rem; }
.f-multi .f-cases { max-height: 220px; overflow-y: auto; }
