/* ═══════════════════════════════════════════════════════════════════
   ARPENTIQ — GABARIT DE PAGE  ·  SOURCE UNIQUE DES ESPACEMENTS

   POURQUOI CE FICHIER EXISTE
   Avant lui, l'espacement d'une page de tableau etait defini a SIX
   endroits differents, poses a six epoques :
     1. layout-tokens.css      --shellv2-main-pt/px/pb
     2. .shellv2-main          padding !important
     3. #page-clients          padding en style INLINE dans index.html
     4. .pp-page               son propre padding + max-width:1320px
     5. .prp-scope / .prp-*    leurs propres retraits
     6. .donna-chrome          marges negatives compensatoires
   Resultat : corriger une marge en revelait une autre, indefiniment.

   DESORMAIS : tout l'espacement des pages a tableau se regle ICI.
   Les cinq pages (Clients, Biens, Dossiers, Prospects, Prospection)
   partagent la meme structure, donc le meme gabarit :

     ┌──────────┬────────────────────────────────────────┐
     │          │  bande TITRE      (--aqp-gut lateral)  │
     │  navbar  │  bande FILTRES    (--aqp-gut lateral)  │
     │          │  ENTETE colonnes  (--aqp-pad lateral)  │  collant
     │          │  lignes           (--aqp-pad lateral)  │  defilent
     └──────────┴────────────────────────────────────────┘

   Pour changer une respiration : UNE variable ci-dessous. Rien d'autre.
   ═══════════════════════════════════════════════════════════════════ */

:root{
  /* retrait lateral des bandes titre + filtres */
  --aqp-gut: 24px;
  /* retrait lateral du tableau (entete + lignes) */
  --aqp-pad: 24px;
  /* espace entre la bande de filtres et l'entete du tableau */
  --aqp-gap: 0px;
}

/* ── 1. La page : plus AUCUN retrait propre ───────────────────────────
   On neutralise ici, une fois, les six sources historiques. Les pages
   sans tableau ne sont pas concernees (selecteur :has). */
body.shell-v2-on .shellv2-main:has(.aqt-wrap),
body.shell-v2-on .shellv2-main:has(.aqt-wrap) > *,
body.shell-v2-on [id^="page-"]:has(.aqt-wrap),
body.shell-v2-on .pp-page:has(.aqt-wrap),
body.shell-v2-on .pp-list-host,
body.shell-v2-on .prp-scope:has(.aqt-wrap),
body.shell-v2-on .prp-table-scroll,
body.shell-v2-on .prp-onecol:has(.aqt-wrap),
body.shell-v2-on .clients-layout:has(.aqt-wrap),
body.shell-v2-on .clients-main:has(.aqt-wrap),
body.shell-v2-on .biens-main-v2:has(.aqt-wrap),
body.shell-v2-on #vt-estis,
#prp-aqt-host, #biens-aqt-host, #pp-aqt-host, #doss-aqt-host{
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 0 !important;
  max-width: none !important;
  /* un enfant de flex/grid a min-width:auto : sans ca il GRANDIT avec son
     contenu au lieu de retrecir, et le tableau sort de l'ecran. */
  min-width: 0 !important;
}

/* ── 2. Les bandes titre + filtres ────────────────────────────────── */
body.shell-v2-on .shellv2-main:has(.aqt-wrap) .donna-chrome{
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
  margin: 0 0 var(--aqp-gap) 0 !important;
}
body.shell-v2-on .shellv2-main:has(.aqt-wrap) .dchrome-head,
body.shell-v2-on .shellv2-main:has(.aqt-wrap) .dchrome-filters,
body.shell-v2-on .shellv2-main:has(.aqt-wrap) .dchrome-scroll{
  width: 100% !important;
  box-sizing: border-box !important;
  padding-left: var(--aqp-gut) !important;
  padding-right: var(--aqp-gut) !important;
}

/* ── 2 bis. Le parent DIRECT du tableau, quel qu'il soit ──────────────
   Chaque page passe au composant un conteneur different (celui de Clients
   n'a ni id ni classe stable). On le vise donc par sa RELATION au tableau
   plutot que par son nom : c'etait le dernier retrait qui echappait au
   gabarit. */
body.shell-v2-on :has(> .aqt-wrap){
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ── 3. Le tableau ────────────────────────────────────────────────── */
/* Bords droits : plus aucun angle arrondi sur le cadre du tableau
   (le tableau va bord a bord, une carte arrondie n'a plus de sens). */
body.shell-v2-on .aqt-tbl,
body.shell-v2-on .aqt-tbl.aqt-compta,
body.shell-v2-on .cs-tbl-wrap{
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
body.shell-v2-on .aqt-tbl > div[data-aqt-rows]{ background: var(--surface); }
body.shell-v2-on .aqt-wrap{
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.shell-v2-on .aqt-row{
  padding-left: var(--aqp-pad) !important;
  padding-right: var(--aqp-pad) !important;
}


/* ── [b2225] LE gap de Clients : identifie, pas devine ────────────────────
   Structure reelle de la page :
     #page-clients > .clients-layout > .clients-main
                                        ├─ .clients-filters   ← vestige
                                        └─ .clients-table     ← le tableau

   `.clients-filters` est l'ANCIENNE barre de filtres, remplacee par
   DonnaChrome. donna-chrome.css tente bien de la masquer :
       .clients-filters { display:none !important }        (0,1,0)
   mais filter-bar.css la re-affiche avec une specificite superieure :
       body.clients-dfb-on #page-clients .clients-main
       .clients-filters { display:block !important }        (0,4,1)
   Entre deux !important, c'est la specificite qui tranche, pas l'ordre de
   chargement : la regle qui l'AFFICHE gagnait. Ce div vide occupait donc
   toute la hauteur entre la bande de filtres et l'entete du tableau.

   On la masque avec une specificite superieure (0,5,1), uniquement quand la
   page utilise le nouveau tableau. */
body.shell-v2-on.clients-dfb-on #page-clients .clients-main .clients-filters,
body.shell-v2-on #page-clients .clients-main .clients-filters{
  display: none !important;
}


/* ══════════════════════════════════════════════════════════════════════
   [b2233] LA FENETRE DU TABLEAU — plein ecran + entete fixe
   ══════════════════════════════════════════════════════════════════════
   Deux retours d'Anthony qui n'en font qu'un : « le tableau prospect doit
   aller en bas de l'ecran comme les autres » et « les entetes doivent
   rester fixes au scroll ».

   ETAT AVANT :
   - Prospects : son hote #prp-aqt-host EST .prp-table-scroll, qui portait
     max-height:calc(100vh - 150px) + overflow:auto + cadre. D'ou le tableau
     coupe avec du vide dessous — le fameux « pas jusqu'en bas ».
   - Entetes : .aqt-thead ne pouvait PAS coller. .aqt-wrap a overflow-x:auto,
     ce qui rend overflow-y:auto par calcul -> c'est LUI le scrollport du
     sticky, or il n'a aucune hauteur bornee donc il ne defile jamais
     verticalement. Et .aqt-tbl porte overflow:hidden, qui coupe le sticky
     une deuxieme fois.

   PRINCIPE : l'hote du tableau devient une COLONNE FLEX de la hauteur
   exacte du viewport moins les deux bandes du chrome. Le .aqt-wrap prend
   la place restante et defile en interne ; le pied reste visible en bas.
   L'entete colle a 0 dans ce scrollport.
   Compta est VOLONTAIREMENT hors scope : sa page porte des KPI au-dessus
   du tableau et gere deja sa propre hauteur (.ca-content). */

:root{
  /* bande titre 48px + bande filtres 44px du DonnaChrome */
  --aqp-chrome: 92px;
}

body.shell-v2-on #page-clients    :has(> .aqt-wrap),
body.shell-v2-on #page-biens      :has(> .aqt-wrap),
body.shell-v2-on #page-prospects  :has(> .aqt-wrap),
body.shell-v2-on #page-vendeurs   :has(> .aqt-wrap),
body.shell-v2-on #page-prospection:has(> .aqt-wrap){
  display: flex !important;
  flex-direction: column !important;
  height: calc(100vh - var(--aqp-chrome)) !important;
  min-height: 0 !important;
  /* neutralise le cadre + la hauteur bornee de .prp-table-scroll (Prospects) */
  max-height: none !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
body.shell-v2-on #page-clients    :has(> .aqt-wrap) > .aqt-wrap,
body.shell-v2-on #page-biens      :has(> .aqt-wrap) > .aqt-wrap,
body.shell-v2-on #page-prospects  :has(> .aqt-wrap) > .aqt-wrap,
body.shell-v2-on #page-vendeurs   :has(> .aqt-wrap) > .aqt-wrap,
body.shell-v2-on #page-prospection:has(> .aqt-wrap) > .aqt-wrap{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}
/* [b2235] .aqt-bulk est desormais une pill fixed (hors flux) et .aqt-foot vit
   DANS le .aqt-wrap (fin de scroll) — plus aucun des deux n'est un item flex de
   l'hote. Le pied ne defile pas horizontalement avec la table large. */
body.shell-v2-on .aqt-wrap > .aqt-foot{ position: sticky; left: 0; }

/* L'entete colle. Prealable indispensable : .aqt-tbl porte overflow:hidden
   (il servait a rogner les coins arrondis, qui n'existent plus ici) — un
   ancetre a overflow non-visible neutralise position:sticky en silence. */
body.shell-v2-on .aqt-tbl,
body.shell-v2-on .aqt-tbl.aqt-compta{ overflow: visible !important; }
body.shell-v2-on .aqt-thead{
  position: sticky;
  top: 0;
  z-index: 4;
}
/* [b2257] PROSPECTION : son hote (#pp-aqt-host) vit dans .pp-list-host, lui-meme
   dans .pp-page — la regle generique `#page-prospection :has(> .aqt-wrap)` ne
   suffisait pas, l'hote n'heritait d'aucune hauteur bornee, donc le .aqt-wrap
   ne defilait pas et le sticky restait inerte. On le borne explicitement. */
body.shell-v2-on #pp-aqt-host{
  display:flex !important; flex-direction:column !important;
  /* [b2259] les 24px que je retranchais laissaient une bande blanche sous le
     tableau. La page a deja son padding-bottom : la fenetre du tableau doit
     aller jusqu'au bas du viewport, pas s'arreter avant. */
  height: calc(100vh - var(--aqp-chrome)) !important;
  min-height: 0 !important; overflow: visible !important;
}
body.shell-v2-on #pp-aqt-host > .aqt-wrap{
  flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important;
}


/* ══════════════════════════════════════════════════════════════════════
   [b2242] Respirations demandees par Anthony
   ══════════════════════════════════════════════════════════════════════ */

/* S1 — Un peu d'air AU-DESSUS du plateau, en VUE KANBAN UNIQUEMENT.
   Les tableaux restent colles a la bande de filtres (c'est voulu : la ligne
   d'entete fait la separation) ; les cartes d'un kanban, elles, ont besoin de
   respirer sous la bande. Dossiers : #vt-kanban porte deja les 24px lateraux
   (b2232). Prospects : le plateau n'apparait qu'en vue kanban, on cible donc
   directement .vend-board-wrap dans .prp-scope. */
body.shell-v2-on #page-vendeurs #vt-kanban{ padding-top: 16px !important; }
body.shell-v2-on #page-prospects .prp-scope .vend-board-wrap{ padding-top: 16px !important; }

/* S2 — PILOTAGE : le contenu retrouve ses marges. La page est montee nue dans
   #page-statistiques, sans le gabarit .pp-page (24px 28px 40px) des autres
   pages de prospection : le rail collait au bord gauche et au chrome. */
body.shell-v2-on #page-statistiques{
  padding: 20px 28px 40px !important;
  box-sizing: border-box;
}

/* S3 — PROSPECTION, VUE CARTE PLEIN CADRE. La carte occupe toute la zone de
   contenu sous le chrome, bord a bord et sans coins arrondis. Les 28px de
   padding lateral de .pp-page sont annules par une marge negative de meme
   valeur (le reste de la page les garde), et la hauteur reprend la variable
   de chrome partagee avec les tableaux. */
/* [b2243] La HAUTEUR est mesuree en JS (_ppFitMapHeight) : le CSS ne peut pas
   deviner ce qui precede la carte dans .pp-page, d'ou le haut rogne et le vide
   en bas de b2242. Ici on ne garde que le plein cadre lateral et l'absence de
   coins arrondis — et surtout PAS de marge negative en haut, qui glissait la
   carte sous la bande de filtres. */
body.shell-v2-on #page-prospection .pp-mode-map .pp-leads-map-host{
  border-radius: 0 !important;
  margin: 0 -28px -40px !important;
  width: auto !important;
  min-height: 0 !important;
}

/* ══════════════════════════════════════════════════════════════════════
   [b2260] AGENDA PLEIN CADRE — au bon niveau cette fois
   ══════════════════════════════════════════════════════════════════════
   Ma tentative b2259 posait le flex sur `#page-agenda > les vues`. Faux a deux
   titres, releve dans le code :
     1. les vues ne sont PAS enfants directs de la page — la chaine reelle est
        #page-agenda > .cal > (.agenda-week-wrap | .mois-wrap | .agenda-list-wrap) ;
     2. surtout, les vues Semaine et Mois portaient leur hauteur EN INLINE et EN
        !important (calc(100vh - 152px) / (100vh - 200px)) : aucune feuille de
        style ne pouvait les battre. Ces inline sont retires cote JS (b2260).
   La chaine flex est donc posee page -> .cal -> vue, chaque maillon avec
   min-height:0 (sans quoi un enfant flex refuse de retrecir sous son contenu). */
/* [b2270] REGRESSION QUE J'AI INTRODUITE EN b2260. J'avais mis
   `display:flex !important` sur #page-agenda. Le shell masque les pages
   inactives par un `style="display:none"` INLINE — et un !important de feuille
   bat un inline sans !important. Resultat : la page Agenda restait AFFICHEE sur
   toutes les autres pages, reduite a 40px, d'ou la bande vide que l'inspecteur
   montre sur Tâches (div#page-agenda 1222x40).
   Le :not() garantit qu'on ne force JAMAIS l'affichage d'une page masquee. */
body.shell-v2-on #page-agenda:not([style*="none"]){
  height: calc(100vh - var(--aqp-chrome)) !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box;
  overflow: hidden !important;
}
body.shell-v2-on #page-agenda > .cal{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}
/* La barre d'options ne s'etire pas ; elle n'existe qu'en mode non-chrome. */
body.shell-v2-on #page-agenda .cal-top{ flex: 0 0 auto; }

/* Les trois vues ne defilent pas de la meme facon :
   - SEMAINE : grille horaire, le scroll est interne au wrap ;
   - MOIS    : grille fixe 1fr/340px, elle ne defile pas, elle se compresse ;
   - LISTE   : flux vertical, scroll interne. */
body.shell-v2-on #page-agenda > .cal > .agenda-week-wrap{
  flex: 1 1 auto !important; min-height: 0 !important; overflow: auto !important;
  max-height: none !important; height: auto !important;
}
body.shell-v2-on #page-agenda > .cal > .mois-wrap{
  flex: 1 1 auto !important; min-height: 0 !important;
  max-height: none !important; height: auto !important;
}
body.shell-v2-on #page-agenda > .cal > .mois-wrap > .cal-grid,
body.shell-v2-on #page-agenda > .cal > .mois-wrap > .agenda-month-grid{
  min-height: 0; overflow: auto;
}
body.shell-v2-on #page-agenda > .cal > .agenda-list-wrap{
  flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important;
}


/* ═══ [b2612] LE NOIR ADOUCI SUR TOUTES LES FICHES (Anthony : « toutes les
   fiches n'ont pas le bon theme noir, il faut le theme noir adouci »).
   L'app a son noir adouci depuis v1149 (tc.css : gris-bleute #0f1115,
   « tu as oublie d'adoucir le theme noir » — le meme retour, deja).
   Les KITS des fiches redefinissent leurs jetons scopes en NOIR PUR (#000) :
   aqfic-core (.aqfic), fiche-core (.fic), fiche-dossier (.aqfic.fdos),
   fiches-margot (.fmg), modales-margot (#amd-root). Les kits ne se modifient
   pas (regle) : SURCHARGE applicative ici — ce fichier charge apres eux
   (index:2867), la cascade nous revient. Jetons = COPIE VERBATIM de tc.css
   :root[data-theme=noir] ; si tc.css evolue, evoluer ici aussi.
   BONUS par construction : le fond des fiches devient IDENTIQUE au fond de
   l'app derriere -> le « gap » du bas de la fiche prospect (bande de fond
   visible sous le contenu) disparait sans toucher aux hauteurs. */
[data-theme="noir"] .aqfic,
[data-theme="noir"] .aqfic.fdos,
[data-theme="noir"] .fic,
.fmg[data-theme="noir"],
[data-theme="noir"] .fmg,
#amd-root[data-theme="noir"],
/* [b2614] deux scopes rates au premier passage (retour d'Anthony sur
   l'agenda) : l'AGENDA (.agn, agenda-margot2 — les deux formes de scope) et
   les cartes AQ (#aq-root, arpentiq-ui). Balayage complet du parc fait :
   restent volontairement en noir pur legal.css (mode doc) et pwa-mobile. */
.agn[data-theme="noir"],
[data-theme="noir"] .agn,
[data-theme="noir"] #aq-root{
  --bg:#0f1115; --surface:#16181d; --s2:#1c1e24; --s3:#23262d;
  --border:rgba(255,255,255,.07); --border-hi:rgba(255,255,255,.12);
  --text:#e7e9ee; --text-dim:#a8adbd; --muted:#6a7080;
  --accent:#8b7bff; --accent-hi:#a89dff; --accent-dim:rgba(139,123,255,.13);
  --chaud:#ff6680; --tiede:#f0c050; --froid:#5ca8ff; --green:#4fd49a;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 20px rgba(0,0,0,.5);
  --shadow-lg:0 16px 40px -10px rgba(0,0,0,.6);
}


/* ═══ [b2628] LE HERO DE LA HOME AQH, FACON MESSAGE D'ARPE (Anthony —
   2e passe : la b2625 avait patche accueil-page, or la home VIVANTE est le
   kit AQH (arpe-home.js, monte par accueil-aqh) qui rend son propre hero ;
   le titre neuf y transitait deja via heroHtml(), d'ou le mirage. Kit
   intouchable -> surcharge ici. Le composer vit DANS le hero (meme largeur
   720) : text-align:left suffit a caler le titre sur le bord gauche du
   champ. */
.aqh-hero .aqh-orb{ display:none; }
.aqh-hero{ text-align:left; }


/* ═══ [b2629] REPRENDRE EN LIGNE + SUGGESTIONS ETIQUETEES A GAUCHE
   (Anthony). Le kit AQH centrait et laissait wrapper : trois reprises aux
   longs libelles s'empilaient. Desormais : une seule LIGNE alignee a
   gauche, chips ellipsees a 340px (« tu les croppes avec ... »), et la
   rangee de suggestions recoit son etiquette SUGGESTIONS (::before, meme
   style que le .aqh-rlb du kit) — symetrie avec REPRENDRE. */
.aqh-resume{ justify-content:flex-start; flex-wrap:nowrap; overflow:hidden; }
.aqh-resume .aqh-rc{
  flex:0 1 auto; min-width:0; max-width:340px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.aqh-sugg{ justify-content:flex-start; align-items:center; }
.aqh-sugg::before{
  content:'SUGGESTIONS';
  font-family:var(--mono); font-size:9.5px; font-weight:600;
  letter-spacing:.12em; color:var(--muted); margin-right:2px;
}
.aqh-sugg:empty::before{ content:none; }


/* ═══ [b2633] PALETTE PAR CATEGORIE DE DOCUMENT (Anthony : « une legere
   couleur differente selon la categorie pour visualiser direct »). Les
   chips portent deja le slug (data-fdp-slug cote dossier, data-doc-slug
   cote bien) : une teinte translucide par famille, lisible en light comme
   en noir adouci. Autres = gris par defaut du composant. */
[data-fdp-slug="diagnostics"], [data-doc-slug="diagnostics"]{
  background:rgba(245,158,11,.14)!important; color:#b45309!important; }
[data-fdp-slug="copro"], [data-doc-slug="copro"]{
  background:rgba(59,130,246,.13)!important; color:#1d4ed8!important; }
[data-fdp-slug="urbanisme"], [data-doc-slug="urbanisme"]{
  background:rgba(20,184,166,.14)!important; color:#0f766e!important; }
[data-fdp-slug="travaux"], [data-doc-slug="travaux"]{
  background:rgba(34,197,94,.14)!important; color:#15803d!important; }
[data-fdp-slug="fiscal"], [data-doc-slug="fiscal"]{
  background:rgba(168,85,247,.13)!important; color:#7e22ce!important; }
[data-fdp-slug="mandat"], [data-doc-slug="mandat"]{
  background:var(--accent-dim,rgba(139,123,255,.14))!important; color:var(--accent,#6d5ce6)!important; }
[data-fdp-slug="pieces_perso"], [data-doc-slug="pieces_perso"]{
  background:rgba(236,72,153,.12)!important; color:#be185d!important; }
[data-theme="noir"] [data-fdp-slug="diagnostics"], [data-theme="noir"] [data-doc-slug="diagnostics"]{ color:#fbbf24!important; }
[data-theme="noir"] [data-fdp-slug="copro"], [data-theme="noir"] [data-doc-slug="copro"]{ color:#93c5fd!important; }
[data-theme="noir"] [data-fdp-slug="urbanisme"], [data-theme="noir"] [data-doc-slug="urbanisme"]{ color:#5eead4!important; }
[data-theme="noir"] [data-fdp-slug="travaux"], [data-theme="noir"] [data-doc-slug="travaux"]{ color:#86efac!important; }
[data-theme="noir"] [data-fdp-slug="fiscal"], [data-theme="noir"] [data-doc-slug="fiscal"]{ color:#d8b4fe!important; }
[data-theme="noir"] [data-fdp-slug="pieces_perso"], [data-theme="noir"] [data-doc-slug="pieces_perso"]{ color:#f9a8d4!important; }


/* ═══ [b2641] LE MENU ⋯ AU-DESSUS DES ONGLETS, POUR DE VRAI (le b2640 ne
   pouvait pas marcher : fiche-glue b2464 pose .rhead{z-index:1} et
   .rec>.tabs{z-index:5} — le pop est ENFERME dans le contexte d'empilement
   du rhead, aucun z-index d'enfant ne s'en echappe ; et le .fcp-pop
   {z-index:100999} perdait de toute facon en specificite contre le z:40 de
   fiche-glue. Prouve au harnais Puppeteer : elementFromPoint touchait les
   onglets a travers le pop. Le fix remonte le RHEAD lui-meme, mais SEULEMENT
   quand un menu y est ouvert — la ceinture b2464 (onglets devant la barre)
   reste intacte au repos. Vaut pour toutes les fiches au chrome .aqfic. */
#bien-page-root .fic .rhead:has(.fcp-menu.on),
.aqfic .rhead:has(.fcp-menu.on){ z-index: 6; }

/* ═══ [b2644] LA FAMILLE ENTIERE, PAS L'OCCURRENCE (Anthony, 2 captures :
   les menus ⋯ dossier et prospect doivent etre comme celui du client).
   (1) PROSPECT/LEAD : meme enterrement qu'en b2641 — b2487 avait remonte
   `.aqfic .rhead` a z:4 au-dessus des onglets sticky z:3 de leadpros, puis
   fiche-glue b2464 a pose `.rec>.tabs{z:5}` (specificite superieure) et a
   silencieusement inverse le rapport : le pop fpv3-mm/flv3-mm (z:40, piege
   du contexte) repasse sous la barre d'onglets. Meme remede que b2641,
   etendu a la famille : le rhead remonte quand SON menu est ouvert. */
.aqfic .rhead:has(.fpv3-mm:not([hidden])),
.aqfic .rhead:has(.flv3-mm:not([hidden])){ z-index: 6; }

/* ═══ [b2645] UNE SEULE PEAU POUR TOUS LES MENUS ⋯ (Anthony, 4 captures :
   les pops doivent tous suivre S3-dossier, le declencheur doit suivre
   S4-client partout). Feuille chargee en DERNIER : toutes les egalites de
   specificite se resolvent ici, y compris fiche-dossier.css:705 (padding 0
   vertical, 12px — les lignes collees de b2644) et la base .abtn de
   fiche-glue (12px) dont heritait le pop CLIENT pendant que le dossier
   etait a 13 : c'etait CA la difference S2/S3. */

/* — le conteneur : memes cotes que le fcp-pop de fiche-glue — */
.aqfic .rhead .fcp-pop, #bien-page-root .fic .rhead .fcp-pop,
.aqfic .rhead .fpv3-mm, .aqfic .rhead .flv3-mm{
  min-width:200px; padding:5px; gap:2px; border-radius:10px;
  background:var(--surface, #fff); border:1px solid var(--border);
  box-shadow:0 4px 12px rgba(20,22,31,.10), 0 12px 32px rgba(20,22,31,.12);
}

/* — les rangs : lignes 13px/600, icone 14, gap 9 — */
.aqfic .rhead .fcp-pop .abtn, #bien-page-root .fic .rhead .fcp-pop .abtn,
.aqfic.fdos .rhead .fcp-pop .abtn,
.aqfic .rhead .fpv3-mi, .aqfic .rhead .flv3-mi{
  display:flex; align-items:center; width:100%; height:auto;
  padding:8px 10px; gap:9px; justify-content:flex-start; text-align:left;
  font-family:inherit; font-size:13px; font-weight:600; line-height:1.2;
  color:var(--text); white-space:nowrap; cursor:pointer;
  border:0; border-radius:7px; background:transparent; box-shadow:none;
}
.aqfic .rhead .fcp-pop .abtn svg, #bien-page-root .fic .rhead .fcp-pop .abtn svg,
.aqfic.fdos .rhead .fcp-pop .abtn svg,
.aqfic .rhead .fpv3-mi svg, .aqfic .rhead .flv3-mi svg{
  width:14px; height:14px; flex:none;
}
.aqfic .rhead .fcp-pop .abtn:hover, #bien-page-root .fic .rhead .fcp-pop .abtn:hover,
.aqfic.fdos .rhead .fcp-pop .abtn:hover,
.aqfic .rhead .fpv3-mi:hover, .aqfic .rhead .flv3-mi:hover{
  background:var(--s2, #f3f4f7); transform:none; box-shadow:none;
}

/* — le rang destructeur : rouge S3, SANS separateur (leadpros en posait un).
   Specificite (0,4,0) : elle doit BATTRE la regle de rangs ci-dessus (0,3,0)
   qui pose color:var(--text) — vu au harnais, le danger ressortait noir. — */
.aqfic .rhead .fpv3-mm .fpv3-danger, .aqfic .rhead .flv3-mm .fpv3-danger{
  color:var(--chaud, #e5484d); margin-top:0;
  border-top:0; border-radius:7px; padding-top:8px;
}
.aqfic .rhead .fpv3-mm .fpv3-danger:hover, .aqfic .rhead .flv3-mm .fpv3-danger:hover{
  background:color-mix(in srgb, var(--chaud, #e5484d) 10%, transparent);
}

/* — le declencheur ⋯ : S4 (le bouton client, recette fiche-glue) partout — */
.aqfic .rhead .fcp-more, #bien-page-root .fic .rhead .fcp-more,
.aqfic.fdos .rhead .fcp-more,
.aqfic .rhead .abtn[data-fpv3-more], .aqfic .rhead .abtn[data-flv3-more]{
  width:26px; height:26px; padding:0; gap:0; justify-content:center;
  border-radius:8px; border:1px solid var(--border);
  background:var(--surface, #fff); color:var(--text);
}
.aqfic .rhead .fcp-more svg, #bien-page-root .fic .rhead .fcp-more svg,
.aqfic.fdos .rhead .fcp-more svg,
.aqfic .rhead .abtn[data-fpv3-more] svg, .aqfic .rhead .abtn[data-flv3-more] svg{
  width:14px; height:14px;
}


/* ═══ [b2655] LA CARTE DANS LA PEEK BOX (handoff Margot pp_peekbox_map).
   L'overlay recouvre TOUTE la peek (inset:0, par-dessus le padding — bord a
   bord, spec), z:3 dans le contexte du .aqt-peek. Pastille accent + halo,
   etiquette blanche a droite, bouton Fermer seul controle. */
.aqt-peek{ position:relative; }
.ppk-map{
  position:absolute; inset:0; z-index:3; overflow:hidden;
  border:1px solid var(--border, #e4e7ee); border-radius:0;
  background:var(--s2, #f1f3f7);
  opacity:0; transition:opacity .4s ease;
}
.ppk-map > .ppk-canvas, .ppk-map > .ppk-canvas.maplibregl-map{
  position:absolute; inset:0; width:auto; height:auto;
}
/* [b2658] Specificite (0,2,0) via l'ancetre .ppk-map : le reset
   .pp-scope button{background:transparent;border:none;color:inherit}
   (prospection.css:72, (0,1,1)) battait les classes seules — le Fermer
   sortait transparent sans bord et le Voir-la-fiche perdait fond noir et
   texte blanc, quasi invisible sur la carte. Une cause, deux symptomes. */
.ppk-map .ppk-close{
  position:absolute; z-index:6; right:12px; top:12px;
  font-size:11px; font-weight:600; color:var(--text, #14161f);
  background:var(--surface, #fff); border:1px solid var(--border, #e4e7ee);
  border-radius:7px; padding:6px 11px; cursor:pointer; font-family:inherit;
  box-shadow:0 2px 6px rgba(20,22,31,.1);
}
.ppk-mk{ display:flex; align-items:center; gap:9px; pointer-events:none; }
.ppk-pin{
  width:12px; height:12px; border-radius:50%; flex:none;
  background:var(--accent, #6b5cf5);
  box-shadow:0 0 0 5px color-mix(in srgb, var(--accent, #6b5cf5) 22%, transparent),
             0 0 0 12px color-mix(in srgb, var(--accent, #6b5cf5) 10%, transparent);
}
.ppk-lab{
  display:flex; flex-direction:column; gap:1px;
  background:var(--surface, #fff); border-radius:8px; padding:7px 11px;
  box-shadow:0 2px 6px rgba(20,22,31,.07), 0 20px 44px -22px rgba(20,22,31,.45);
  white-space:nowrap;
}
.ppk-lab .a{ font-size:11.5px; font-weight:600; color:var(--text, #14161f); }
.ppk-lab .s{ font-size:10px; color:var(--muted, #8a93ab); }
/* [b2657] second bouton : primaire noir, bas de carte (regle DS : fond
   var(--text), jamais de violet plein) */
.ppk-map .ppk-fiche{
  /* [b2659] en bas a DROITE (Anthony), aligne sur le Fermer (right:12) */
  position:absolute; z-index:6; right:12px; bottom:12px;
  font-size:12px; font-weight:600; color:var(--bg, #fff);
  background:var(--text, #14161f); border:0; border-radius:10px;
  padding:9px 15px; cursor:pointer; font-family:inherit;
  box-shadow:0 2px 6px rgba(20,22,31,.18);
}
/* [b2660] settle du canvas a la revelation : zoom-out 1.04->1 cote
   compositor, aucun cout tuiles */
/* [b2671] le settle EST l'effet de zoom (le flyTo decodait des tuiles en
   plein vol) : plus ample (1.12->1), compositeur pur. */
.ppk-map .ppk-canvas{ opacity:0; transform:scale(1.12);
  transition:opacity .55s ease, transform 1.25s cubic-bezier(.16,.84,.24,1);
  will-change:opacity,transform; }
.ppk-map .ppk-canvas.ppk-settle{ opacity:1; transform:scale(1); }
@media (prefers-reduced-motion: reduce){
  .ppk-map .ppk-canvas{ transform:none; transition:opacity .3s ease; }
}
/* [b2672] zoom +/- sous le Fermer : meme peau que lui, (0,2,0) contre le
   reset .pp-scope button (b2658) */
.ppk-map .ppk-zoom{
  position:absolute; z-index:6; right:12px; top:50px;
  display:flex; flex-direction:column; gap:6px;
}
.ppk-map .ppk-zoom button{
  width:30px; height:30px; display:flex; align-items:center; justify-content:center;
  font-size:15px; font-weight:600; line-height:1; color:var(--text, #14161f);
  background:var(--surface, #fff); border:1px solid var(--border, #e4e7ee);
  border-radius:7px; cursor:pointer; font-family:inherit; padding:0;
  box-shadow:0 2px 6px rgba(20,22,31,.1);
}
.ppk-map .ppk-zoom button:hover{ background:var(--s2, #f3f4f7); }

/* [b2657] pop-in du marqueur a la carte prete */
.ppk-mk{ opacity:0; transform:scale(.6); transform-origin:6px center;
  transition:opacity .4s ease, transform .5s cubic-bezier(.2,1.2,.3,1); }
.ppk-mk.on{ opacity:1; transform:scale(1); }

/* ═══ [b2669] « DEMANDER A ARPE » IDENTIQUE SUR LES FICHES LEAD/PROSPECT
   (Anthony, capture : « pas exactement comme sur les autres pages »). Le
   markup EST canonique (_shellAskDonnaBtn repris tel quel, v1967) — c'est
   le CONTEXTE qui divergeait : le reset `.pp-scope button{background:
   transparent;border:none;color:inherit}` (prospection.css:72, (0,1,1)) bat
   le `.dna-ask` (0,1,0) — le meme reset qui a mange les boutons de la carte
   peek en b2658. Reaffirmation VERBATIM du bloc canonique de
   page-header.css:855 en (0,2,0), feuille chargee en dernier. */
.pp-scope .dna-ask{ display:inline-flex; align-items:center; gap:6px; font:inherit;
  height:26px; box-sizing:border-box;
  font-size:12px; font-weight:500; color:var(--text); background:var(--surface);
  border:1px solid var(--border); border-radius:8px; padding:0 10px;
  cursor:pointer; white-space:nowrap;
  box-shadow:0 1px 2px rgba(20,22,31,.06), 0 3px 8px rgba(20,22,31,.05);
  transition:box-shadow .16s, transform .16s, border-color .16s; }
.pp-scope .dna-ask svg{ width:12px; height:12px; color:var(--text); flex-shrink:0; }
[data-theme="noir"] .pp-scope .dna-ask{ box-shadow:0 1px 2px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.4); }
.pp-scope .dna-ask:hover{ transform:translateY(-1px); border-color:var(--border-hi,var(--border));
  box-shadow:0 2px 4px rgba(20,22,31,.08), 0 8px 20px rgba(20,22,31,.1); }
[data-theme="noir"] .pp-scope .dna-ask:hover{ box-shadow:0 2px 4px rgba(0,0,0,.6), 0 10px 26px rgba(0,0,0,.55); }

/* ═══ [b2673] VUE CARTE BIENS : LES OUTILS A DROITE, PEAU AQLM (Anthony,
   2 captures : « comme sur la map PP, tous a droite, certains blancs,
   certains transparents »). Kit arpe-biens INTACT : on repositionne et on
   repeint par-dessus, (0,2,0)+ pour battre arpe-biens.css ET la feuille
   maplibre-gl.css chargee en dernier (lecon b2656). Colonne : zoom natif
   +/- en carte blanche a deux etages (peau .aqlm-zoom), puis les chips
   icone 34x34 (peau .aqlm-tool) — le libelle texte disparait, l'icone du
   kit reste. */
.arpe-biens .ab-mtools{
  /* [b2674] la colonne porte TOUT (zoom natif deplace dedans par
     _abOrdonnerOutils) : elle demarre en haut. */
  left:auto; right:10px; top:10px;
  flex-direction:column; align-items:flex-end; gap:8px;
}
.arpe-biens .ab-zoomslot{ display:block; }
.arpe-biens .ab-mtool{
  width:34px; height:34px; padding:0; gap:0; justify-content:center;
  font-size:0; line-height:0;                    /* efface « Recadrer/Fond/Liste » */
  /* [b2674] les « transparents » de la capture : chip translucide sans
     bordure, pleine surface au survol */
  border-radius:11px; border:0;
  color:var(--text, #14161f);
  background:color-mix(in srgb, var(--surface, #fff) 68%, transparent);
  box-shadow:none;
}
.arpe-biens .ab-mtool svg{ width:16px; height:16px; }
.arpe-biens .ab-mtool:hover{ background:var(--surface, #fff); color:var(--text, #14161f);
  box-shadow:0 1px 2px rgba(20,22,31,.06), 0 3px 8px rgba(20,22,31,.05); }

/* le zoom natif maplibre prend la peau .aqlm-zoom (carte blanche, deux
   etages, filet interieur) — specificite (0,2,x) > maplibre-gl.css */
.arpe-biens .maplibregl-ctrl-top-right{ top:10px; right:10px; }
.arpe-biens .ab-zoomslot .maplibregl-ctrl-group,
.arpe-biens .maplibregl-ctrl-top-right .maplibregl-ctrl-group{
  margin:0; background:var(--surface, #fff);
  border:1px solid var(--border-hi, var(--border)); border-radius:9px;
  box-shadow:0 1px 2px rgba(20,22,31,.06), 0 3px 8px rgba(20,22,31,.05);
  overflow:hidden;
}
.arpe-biens .ab-zoomslot .maplibregl-ctrl-group button,
.arpe-biens .maplibregl-ctrl-top-right .maplibregl-ctrl-group button{
  width:34px; height:32px; border:0; background:transparent;
  color:var(--text-dim, #6b7280);
}
.arpe-biens .ab-zoomslot .maplibregl-ctrl-group button:hover,
.arpe-biens .maplibregl-ctrl-top-right .maplibregl-ctrl-group button:hover{
  background:var(--s2, #f3f4f7); color:var(--text, #14161f);
}
.arpe-biens .ab-zoomslot .maplibregl-ctrl-group button + button,
.arpe-biens .maplibregl-ctrl-top-right .maplibregl-ctrl-group button + button{
  border-top:1px solid var(--border, #e4e7ee);
}

/* — plus d'anneau bleu au clic, quel que soit son porteur — */
.aqfic .rhead .fcp-more:focus, .aqfic .rhead .fcp-more:focus-visible,
#bien-page-root .fic .rhead .fcp-more:focus, #bien-page-root .fic .rhead .fcp-more:focus-visible,
.aqfic.fdos .rhead .fcp-more:focus, .aqfic.fdos .rhead .fcp-more:focus-visible,
.aqfic .rhead .abtn[data-fpv3-more]:focus, .aqfic .rhead .abtn[data-fpv3-more]:focus-visible,
.aqfic .rhead .abtn[data-flv3-more]:focus, .aqfic .rhead .abtn[data-flv3-more]:focus-visible{
  outline:none; box-shadow:none; border-color:var(--border);
}
