/* Recherche foncière : hiérarchie de la fiche carte, verre D2 et contenu sans troncature. */
.pg.fs .fs-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 4; padding: 14px 16px; background: var(--verre); backdrop-filter: var(--verre-flou); -webkit-backdrop-filter: var(--verre-flou); border-bottom: 1px solid var(--filet); }
.pg.fs .fs-tete h2 { margin: 0; font-size: var(--t-17); font-weight: 600; }
.pg.fs .fs-tri { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--attenue); font-size: var(--t-12); white-space: nowrap; }
.pg.fs .fs-tri[hidden], .pg.fs .fs-vues[hidden] { display: none; }
.pg.fs .fs-tri select { flex: 1; min-width: 0; border: 0; padding: 6px; border-radius: var(--r-pastille); background: var(--champ); color: var(--encre); font: inherit; }
.pg.fs .fs-vues { display: flex; gap: 2px; padding: 3px; background: var(--champ); border-radius: var(--r-bouton); }
.pg.fs .fs-vues button, .pg.fs .fs-actions button, .pg.fs .fs-tri button { border: 0; background: none; color: var(--attenue); font: inherit; font-size: var(--t-12); cursor: pointer; padding: 7px 9px; border-radius: var(--r-pastille); }
.pg.fs .fs-vues button[aria-pressed="true"] { background: var(--actif); color: var(--encre); box-shadow: inset 0 0 0 1px var(--filet); }
.pg.fs .fs-liste { display: none; list-style: none; padding: 0; margin: 0; }
.pg.fs:not([data-fs-vue="tableau"]) .fc-table-cadre > .fc-table.fs-source { display: none; }
.pg.fs:not([data-fs-vue="tableau"]) .fs-liste { display: block; }
.pg.fs .fs-liste li { padding: 16px; border-top: 1px solid var(--filet); }
.pg.fs .fs-liste li:hover { background: var(--survol); }
.pg.fs .fs-liste li.fs-choisie { background: var(--actif); box-shadow: inset 2px 0 var(--encre); }
.pg.fs .fs-localiser { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; border: 0; padding: 0; background: none; color: var(--encre); font: inherit; text-align: left; cursor: pointer; }
.pg.fs .fs-surtitre { display: block; color: var(--attenue); font-size: var(--t-11); margin-bottom: 3px; }
.pg.fs .fs-reference { display: block; font-size: var(--t-17); font-weight: 600; overflow-wrap: anywhere; }
.pg.fs .fs-lieu { display: block; font-size: var(--t-13); color: var(--texte); margin-top: 3px; }
.pg.fs .fs-localiser-lib { flex: none; font-size: var(--t-12); color: var(--attenue); }
.pg.fs .fs-liste dl { margin: 12px 0; }
.pg.fs .fs-liste dt { font-size: var(--t-11); color: var(--attenue); }
.pg.fs .fs-liste dd { margin: 3px 0 0; font-size: var(--t-13); color: var(--encre); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; white-space: normal; }
.pg.fs .fs-cles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-block: 1px solid var(--filet); }
.pg.fs .fs-cles > div { padding: 12px 10px 12px 0; min-width: 0; }
.pg.fs .fs-cles > div + div { padding-left: 12px; border-left: 1px solid var(--filet); }
.pg.fs .fs-cles dd { font-size: var(--t-17); font-weight: 500; }
.pg.fs .fs-informations summary { display: flex; align-items: center; justify-content: space-between; min-height: 36px; cursor: pointer; color: var(--texte); font-size: var(--t-12); }
.pg.fs .fs-informations summary span { color: var(--attenue); }
.pg.fs .fs-informations summary::after { content: '+'; margin-left: 8px; }
.pg.fs .fs-informations[open] summary::after { content: '−'; }
.pg.fs .fs-informations summary span { margin-left: auto; }
.pg.fs .fs-informations dl > div { display: grid; grid-template-columns: minmax(90px, .85fr) minmax(0,1.3fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--filet); }
.pg.fs .fs-informations dd { margin: 0; text-align: right; }
.pg.fs .fs-informations dd small { display: block; margin-top: 5px; font-size: var(--t-11); line-height: 1.5; color: var(--attenue); }
.pg.fs .fs-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pg.fs .fs-actions button { color: var(--encre); }
.pg.fs .fs-actions button:first-child { background: var(--plein); color: var(--plein-texte); }
.pg.fs .fs-actions button:hover { box-shadow: inset 0 0 0 1px var(--filet-fort); }
.pg.fs :is(.fs-tete,.fs-liste) :is(button,summary,select):focus-visible { outline: 2px solid var(--encre); outline-offset: 3px; }
.pg.fs .d2f-cartes { display: none !important; }
.d2f-retour { display: flex; align-items: center; gap: 6px; max-width: calc(100vw - 24px); padding: 6px; border-radius: var(--r-panneau); background: var(--verre); backdrop-filter: var(--verre-flou); -webkit-backdrop-filter: var(--verre-flou); box-shadow: var(--verre-ombre); }
.d2f-retour .d2f-position { font-size: var(--t-12); color: var(--attenue); white-space: nowrap; }
.d2f-retour .d2-bt:disabled { opacity: .4; cursor: default; }
@media (min-width: 900px) {
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f.fs .fc-plateau[data-colonne] { --fs-largeur: min(420px, 42%); grid-template-columns: minmax(0,1fr) var(--fs-largeur); position: relative; }
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f.fs .fc-plateau[data-colonne] > .fc-carte { grid-column: 1 / -1; grid-row: 1; border: 0; border-radius: 0 0 var(--r-carte) var(--r-carte); box-shadow: none; }
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f.fs .fc-plateau[data-colonne] > .fc-resultats { grid-column: 2; grid-row: 1; z-index: 5; margin: 12px 12px 12px 0; border: 1px solid var(--filet); border-radius: var(--r-panneau); background: color-mix(in srgb, var(--verre) 65%, var(--panneau)); backdrop-filter: var(--verre-flou); -webkit-backdrop-filter: var(--verre-flou); box-shadow: var(--verre-ombre); }
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f.fs[data-fs-vue="tableau"] .fc-plateau[data-colonne] { --fs-largeur: 62%; }
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f.fs .fc-synthese { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; background: transparent; }
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f.fs .fc-synthese > div { background: transparent; }
  .pg.fs .d2f-apercu { left: 12px; right: auto; width: 350px; max-width: calc(100% - var(--fs-largeur,420px) - 36px); max-height: 60%; overflow-y: auto; }
  .pg.fs .d2f-ap-dl dd { white-space: normal; overflow: visible; }
  .pg.fs .d2f-ap-dl dt { white-space: normal; }
  .pg.fs .fc-outils { right: calc(var(--fs-largeur,420px) + 12px) !important; }
  /* le même header dans tous les modes (Henri, 30/10/2026 : « je veux le même partout ») : Filtres, PDF · Excel et Recherches
     ne bougent jamais, l'action propre au mode (Exporter, Autour de moi) passe à leur gauche ; même hauteur de « Résultats » */
  .pg.d2f .og-droite > :not(.fm-bouton) { order: -1; }
  .pg.fs .fs-tete { min-height: 64px; box-sizing: border-box; align-content: flex-start; }
  /* la poignée de largeur (src/d2-foncier-largeur.js), sur le bord gauche du panneau ; même dessin que .fl-poignee */
  .pg.fs .fs-poignee { position: absolute; z-index: 6; top: 24px; bottom: 24px; right: calc(var(--fs-largeur,420px) - 5px); grid-column: 1 / -1; grid-row: 1; width: 10px; cursor: ew-resize; touch-action: none; }
  .pg.fs .fs-poignee::after { content: ''; position: absolute; top: 50%; left: 3px; width: 4px; height: 36px; margin-top: -18px; border-radius: var(--r-fin); background: var(--filet-fort); }
  .pg.fs .fs-poignee:hover::after, .pg.fs .fs-poignee.fs-tire::after, .pg.fs .fs-poignee:focus-visible::after { background: var(--encre); }
  .pg.fs .fs-poignee:focus-visible { outline: none; }
}
@media (max-width: 899px) {
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f > .og-barre { display: flex; flex-wrap: wrap; height: auto; padding: 10px 12px; gap: 8px; }
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f .og-choix { flex: 1; min-width: 0; max-width: calc(100% - 80px); overflow: hidden; }
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f .og-droite { display: flex; flex: 1 0 100%; flex-wrap: wrap; gap: 6px; margin: 0; }
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f .og-droite .bouton { flex: 0 1 auto; width: auto; min-width: 40px; min-height: 44px; height: auto; padding: 7px 9px; white-space: nowrap; }
  /* Filtres, PDF · Excel et Recherches au même endroit dans tous les modes (91S-1092) : la place de droite est réservée, occupée ou non par l'action propre au mode (Exporter, Autour de moi) */
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f .og-droite > .bouton:not(.fm-bouton) { flex: 0 0 72px; justify-content: center; }
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f .og-droite:not(:has(> :not(.fm-bouton)))::after { content: ""; flex: 0 0 72px; }
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f .fc-table :is(td,th) { height: auto; min-height: 36px; overflow: visible; white-space: normal; }
  .pg.fs .fs-tete { padding: 10px 12px; position: relative; }
  .pg.fs .fs-liste li { padding: 14px 4px; }
  .pg.fs .fs-vues button, .pg.fs .fs-actions button { min-height: 44px; }
  .pg.fs .pc-mobile-tri { display: none; }
  .d2f-retour { flex-wrap: wrap; justify-content: center; width: max-content; }
  .d2f-retour [data-d2f-retour] { flex-basis: 100%; }
}
.pg.fs .fs-historique { display: flex; flex: none; gap: 2px; }
.pg.fs .fs-historique button { width: 32px; height: var(--h-bouton); padding: 0; border: 0; border-radius: var(--r-bouton); background: var(--champ); color: var(--encre); font: inherit; cursor: pointer; }
.pg.fs .fs-historique button:disabled { opacity: .35; cursor: default; }
.pg.fs .fs-historique button:focus-visible { outline: 2px solid var(--encre); }
@media (max-width: 899px) { .pg.fs .d2f-outils { display: flex; gap: 8px; align-items: center; } .pg.fs .d2f-cherche { min-width: 0; flex: 1; } }

.pg.fs .fc-resultats .fc-compte, .pg.fs .fc-resultats .pc-identite { color: var(--texte); }
.pg.fs .pc-identite { height: auto; white-space: normal; overflow-wrap: anywhere; }

.pg.fs .fs-reference-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; position: sticky; top: 0; z-index: 5; padding: 10px 0; background: var(--verre-plein); }
.pg.fs .fs-reference-nav span { margin-right: auto; color: var(--attenue); font-size: var(--t-12); }
.pg.fs .fs-reference-nav button { min-height: var(--h-bouton); padding: 6px 9px; color: var(--encre); background: var(--champ); border: 0; border-radius: var(--r-bouton); font: inherit; font-size: var(--t-12); cursor: pointer; }
.pg.fs .fs-reference-nav button:disabled { opacity: .4; cursor: default; }
.pg.fs .rf-fiche { background: color-mix(in srgb, var(--verre) 65%, var(--panneau)); backdrop-filter: var(--verre-flou); -webkit-backdrop-filter: var(--verre-flou); }

/* La vue Sociétés dans la sidebar (Henri, 28/10/2026 : « améliore ») : le contenu à 16 px du bord comme l'en-tête et le
   résumé ; l'en-tête se fond dans le panneau et ne prend son fond que quand le contenu passe dessous (src/d2-foncier-sidebar.js,
   classe fs-defile) : son propre flou, posé sur celui du panneau, le faisait plus sombre que le reste */
.pg.fs .fc-resultats > .ps { padding: 0 16px; }
.pg.fs .fc-resultats:not(.fs-defile) > .fs-tete { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; }
.pg.fs .fc-resultats.fs-defile > .fs-tete { background: var(--verre-plein, var(--verre)); }
.pg.fs .ps [data-capital-siren] + [data-capital-siren] { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--filet); }
.pg.fs .ps .capital-entete b { font-size: var(--t-13); font-weight: 600; }
.pg.fs .ps .ps-legende { margin-top: 8px; }
.pg.fs .ps .ps-legende summary { cursor: pointer; color: var(--texte); }

/* La liste compacte (Henri, 28/10/2026 : « rends plus compacte » la sidebar) : une parcelle par ligne de ~48 px, référence et
   commune à gauche, surface et zone à droite ; « Caractéristiques et sources » repliable dessous ; les actions (Fiche
   complète, Ajouter à l'ensemble) seulement sur la parcelle choisie. Avant : ~275 px par parcelle. */
:is(html, html[data-theme]) .pg.fs .fs-liste li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 8px 16px; }
:is(html, html[data-theme]) .pg.fs .fs-liste li > .fs-localiser { grid-column: 1; min-width: 0; }
:is(html, html[data-theme]) .pg.fs .fs-liste li > .fs-localiser > span:first-child { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
:is(html, html[data-theme]) .pg.fs .fs-liste .fs-surtitre, :is(html, html[data-theme]) .pg.fs .fs-liste .fs-localiser-lib { display: none; }
:is(html, html[data-theme]) .pg.fs .fs-liste .fs-reference { display: inline; font-size: var(--t-13); font-weight: 600; white-space: nowrap; }
:is(html, html[data-theme]) .pg.fs .fs-liste .fs-lieu { overflow: hidden; color: var(--attenue); font-size: var(--t-12); white-space: nowrap; text-overflow: ellipsis; }
:is(html, html[data-theme]) .pg.fs .fs-liste li > .fs-cles { grid-column: 2; display: flex; gap: 10px; margin: 0; border: 0; }
:is(html, html[data-theme]) .pg.fs .fs-liste .fs-cles > div, :is(html, html[data-theme]) .pg.fs .fs-liste .fs-cles > div + div { padding: 0; border: 0; text-align: right; }
:is(html, html[data-theme]) .pg.fs .fs-liste .fs-cles dt { display: none; }
:is(html, html[data-theme]) .pg.fs .fs-liste .fs-cles dd { margin: 0; font-size: var(--t-12); font-weight: 500; white-space: nowrap; }
:is(html, html[data-theme]) .pg.fs .fs-liste li > .fs-informations { grid-column: 1 / -1; }
:is(html, html[data-theme]) .pg.fs .fs-liste .fs-informations summary { min-height: 22px; font-size: var(--t-11); color: var(--attenue); }
:is(html, html[data-theme]) .pg.fs .fs-liste .fs-informations:not([open]) summary { display: none; }
:is(html, html[data-theme]) .pg.fs .fs-liste li.fs-choisie .fs-informations summary, :is(html, html[data-theme]) .pg.fs .fs-liste li:hover .fs-informations summary { display: flex; }
:is(html, html[data-theme]) .pg.fs .fs-liste li > .fs-actions { grid-column: 1 / -1; display: none; margin-top: 6px; }
:is(html, html[data-theme]) .pg.fs .fs-liste li.fs-choisie > .fs-actions { display: flex; }
:is(html, html[data-theme]) .pg.fs .fs-liste .fs-actions button { padding: 4px 9px; font-size: var(--t-12); }
@media (max-width: 899px) { :is(html, html[data-theme]) .pg.fs .fs-liste li { padding: 10px 4px; } :is(html, html[data-theme]) .pg.fs .fs-liste .fs-informations summary { display: flex; min-height: 32px; } }
/* la vue Valeur : sidebar plus large, valeur centrale en clé, fourchette · confiance · usage · surface dessous */
@media (min-width: 900px) {
  :is(html, html[data-theme]) :is(.page-app, body) .pg.d2f.fs[data-fs-valeur]:not([data-fs-vue="tableau"]) .fc-plateau[data-colonne] { --fs-largeur: min(520px, 46%); }
}
:is(html, html[data-theme]) .pg.fs .fs-liste li > .fs-sous { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 2px 0 0; font-size: var(--t-11); color: var(--attenue); font-variant-numeric: tabular-nums; }
:is(html, html[data-theme]) .pg.fs .fs-liste li > .fs-sous span:first-child { color: var(--texte); }
:is(html, html[data-theme]) .pg.fs[data-fs-valeur] .fs-liste .fs-cles dd { font-size: var(--t-13); font-weight: 600; }
/* la vue Valeur aussi à 16 px du bord, comme la vue Sociétés */
.pg.fs .fc-resultats > .pv { padding: 0 16px; }
/* le détail d'une parcelle dépliée (vue Valeur), recopié sous sa ligne : un bloc pleine largeur qui passe à la ligne */
:is(html, html[data-theme]) .pg.fs .fs-liste li.fs-detail { display: block; min-width: 0; padding: 2px 12px 12px; overflow-wrap: anywhere; font-size: var(--t-12); color: var(--texte); }
:is(html, html[data-theme]) .pg.fs .fs-liste li.fs-detail table { width: 100%; table-layout: fixed; }
