/* Écran Bonification : carte en vedette à gauche, récapitulatif à droite (empilés sur téléphone). */
.tuile.bonif { --c: var(--or); }
.bn-page { position: relative; height: 100%; overflow-y: auto; padding: calc(14px + env(safe-area-inset-top)) 0 calc(24px + env(safe-area-inset-bottom)); }
.bn-tete-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bn-bouton { border: 1px solid var(--verre-bord); background: var(--verre); color: var(--texte); border-radius: 12px; padding: 8px 12px; font: 600 13px var(--f-corps, inherit); cursor: pointer; text-decoration: none; }
.bn-bouton.neon { background: var(--neon); color: #0E0E0E; border-color: var(--neon); }
.bn-grille { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; max-width: 1320px; margin: 14px auto 0; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.bn-gauche { display: grid; gap: 14px; align-content: start; min-width: 0; }

/* Carte */
.bn-hero { position: relative; height: clamp(440px, 64vh, 680px); border-radius: 22px; overflow: hidden; border: 1px solid var(--verre-bord); background: var(--nuit-2); isolation: isolate; }
.bn-map { position: absolute; inset: 0; }
.bn-haut { position: absolute; z-index: 3; top: 12px; left: 12px; right: 12px; display: grid; gap: 8px; pointer-events: none; }
.bn-haut > * { pointer-events: auto; }
.bn-search { position: relative; }
.bn-search > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--gris); stroke-width: 2; stroke-linecap: round; }
.bn-search input { width: 100%; box-sizing: border-box; height: 50px; padding: 0 14px 0 40px; border-radius: 14px; border: 1px solid var(--verre-bord); background: rgba(14, 14, 14, .92); color: var(--texte); font: 500 15px inherit; box-shadow: none; }
.bn-search input:focus { outline: none; border-color: var(--neon); }
.bn-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: rgba(14, 14, 14, .97); border: 1px solid var(--verre-bord); border-radius: 14px; max-height: 300px; overflow-y: auto; z-index: 5; }
.bn-sugg li { padding: 9px 11px; border-radius: 10px; cursor: pointer; display: grid; }
.bn-sugg li small { color: var(--gris); }
.bn-sugg li[aria-selected="true"], .bn-sugg li:hover { background: rgba(42, 42, 42, .12); }
.bn-sugg li.vide { color: var(--gris); cursor: default; }
.bn-outils { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bn-outil { border: 1px solid var(--verre-bord); background: rgba(14, 14, 14, .85); color: var(--texte); border-radius: 999px; padding: 6px 12px; font: 600 12.5px inherit; cursor: pointer; }
.bn-outil[aria-pressed="true"] { background: var(--neon); color: #0E0E0E; border-color: var(--neon); }
.bn-legende { margin-left: auto; display: flex; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgba(14, 14, 14, .85); font-size: 12px; color: var(--gris); }
.bn-legende span { display: inline-flex; align-items: center; gap: 5px; }
.bn-pt { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.bn-pt.ok { background: var(--neon); } .bn-pt.reg { background: #2A2A2A; } .bn-pt.autour { background: #2A2A2A; opacity: .7; }

/* Épingles */
.bn-epingle { width: 38px; height: 46px; border: 0; padding: 0; background: none; cursor: pointer; position: relative; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
.bn-epingle::before { content: ""; position: absolute; left: 3px; top: 0; width: 32px; height: 32px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #8A8A8A; border: 3px solid #fff; }
.bn-epingle span { position: absolute; left: 0; right: 0; top: 7px; text-align: center; font: 700 14px var(--f-jeu); color: #0E0E0E; z-index: 1; }
.bn-epingle.ok::before { background: var(--neon); } .bn-epingle.reg::before { background: #2A2A2A; }
.bn-epingle.apercu::before { border-style: dashed; }
.bn-epingle.attente::before { animation: bn-attente 1.1s ease-in-out infinite; }
.bn-epingle.pop { animation: bn-pop .7s var(--ease); }
@keyframes bn-attente { 50% { background: #C8C8C8; } }
@keyframes bn-pop { 35% { transform: translateY(-10px) scale(1.25); } }

/* Fiche de l'immeuble sur la carte */
.bn-panneau { position: absolute; z-index: 4; left: 12px; right: 12px; bottom: 12px; max-height: calc(100% - 130px); overflow-y: auto; overscroll-behavior: contain; border-radius: 18px; padding: 14px 16px; background: rgba(14, 14, 14, .96); border: 1px solid var(--verre-bord); box-shadow: none; display: grid; gap: 10px; align-content: start; }
.bn-panneau.entre { animation: monte .45s var(--ease); }
@media (min-width: 900px) { .bn-panneau { left: auto; top: 112px; width: min(400px, 48%); max-height: none; } }
.bn-p-tete { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.bn-p-tete b { display: block; font: 700 17px/1.2 var(--f-jeu); letter-spacing: 0; }
.bn-p-tete small { color: var(--gris); font-size: 12.5px; }
.bn-n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 700 14px var(--f-jeu); background: #8A8A8A; color: #0E0E0E; flex: 0 0 auto; }
.bn-panneau.ok .bn-n, .bn-ligne.ok .bn-n { background: var(--neon); } .bn-panneau.reg .bn-n, .bn-ligne.reg .bn-n { background: #2A2A2A; }
.bn-x { border: 0; background: rgba(255,255,255,.08); color: var(--texte); width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.bn-verdict { display: grid; gap: 2px; padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,.06); font: 700 15px var(--f-jeu); letter-spacing: 0; }
.bn-verdict.ok { background: rgba(42, 42, 42, .14); color: var(--neon); }
.bn-verdict.reg { background: rgba(42, 42, 42, .14); color: #C8C8C8; }
.bn-verdict small { font: 500 12.5px inherit; color: var(--gris); letter-spacing: 0; }
.bn-panneau.attente .bn-verdict { display: flex; align-items: center; gap: 10px; font: 600 14px inherit; color: var(--gris); }
.bn-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--neon); animation: bn-tourne .8s linear infinite; }
@keyframes bn-tourne { to { transform: rotate(360deg); } }
.bn-msg-b { font-size: 12.5px; color: #C8C8C8; background: rgba(42, 42, 42,.1); border-radius: 10px; padding: 8px 10px; }
.bn-faits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.bn-faits > div { background: rgba(255,255,255,.05); border-radius: 10px; padding: 7px 9px; min-width: 0; }
.bn-faits small, .bn-chiffres small { display: block; color: var(--gris); font-size: 11px; }
.bn-faits b { display: block; font: 700 14px var(--f-jeu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--gris); }
.bn-details[open] summary { margin-bottom: 8px; }
.bn-crits { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bn-crits li { display: grid; grid-template-columns: 18px 1fr; gap: 7px; font-size: 12.5px; line-height: 1.35; }
.bn-crits i { font-style: normal; font-weight: 800; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: rgba(255,255,255,.1); }
.bn-crits li.ok i { background: var(--neon); color: #0E0E0E; } .bn-crits li.no i { background: var(--rouge); color: #fff; }
.bn-crits small { display: block; color: var(--gris); font-size: 11.5px; }
.bn-chiffres { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bn-chiffres b { display: block; font: 700 17px/1.2 var(--f-jeu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-chiffres .net b { color: var(--or); }
.bn-elec-l { font-size: 12px; color: #2A2A2A; }
.bn-ajuster { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bn-ajuster label { display: grid; gap: 3px; }
.bn-ajuster small { color: var(--gris); font-size: 11px; }
.bn-ajuster input:not([type="checkbox"]) { height: 36px; border-radius: 10px; border: 1px solid var(--verre-bord); background: rgba(255,255,255,.05); color: var(--texte); padding: 0 10px; font: 600 14px inherit; min-width: 0; }
.bn-case { display: flex !important; align-items: center; gap: 8px; grid-column: 1 / -1; font-size: 13px; }
.bn-actions { position: sticky; bottom: -14px; margin: 0 -16px -14px; padding: 12px 16px 14px; background: linear-gradient(transparent, rgba(14, 14, 14, .98) 30%); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bn-ajouter { flex: 1; border: 0; border-radius: 12px; padding: 12px 14px; background: var(--neon); color: #F2F2F2; font: 700 15px var(--f-jeu); letter-spacing: 0; cursor: pointer; box-shadow: none; }
.bn-ignorer { border: 1px solid var(--verre-bord); border-radius: 12px; padding: 11px 14px; background: transparent; color: var(--texte); font-weight: 600; cursor: pointer; }
.bn-dans { flex: 1; color: var(--neon); font-weight: 700; font-size: 13.5px; }

/* Bulle d'un point admissible */
.bn-pop .maplibregl-popup-content { border-radius: 14px; padding: 12px 14px; background: #0E0E0E; color: var(--texte); display: grid; gap: 4px; border: 1px solid var(--verre-bord); }
.bn-pop .maplibregl-popup-tip { border-top-color: #0E0E0E; }
.bn-pop b { font: 700 14px var(--f-jeu); } .bn-pop small { color: var(--gris); }
.bn-pop-chips { display: flex; gap: 5px; flex-wrap: wrap; } .bn-pop-chips span { background: rgba(42, 42, 42,.12); color: var(--neon); border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.bn-pop-chips .or { background: rgba(200, 200, 200,.14); color: var(--or); }
.bn-pop button { margin-top: 4px; border: 0; border-radius: 10px; padding: 8px 10px; background: var(--neon); color: #0E0E0E; font-weight: 700; cursor: pointer; }
.bn-pop .maplibregl-popup-close-button { color: var(--gris); }

/* Client et liste du dossier */
.bn-client { display: grid; gap: 6px; font: 600 12px var(--f-jeu); letter-spacing: 0; text-transform: none; color: var(--gris); }
.bn-client input { height: 48px; border-radius: 14px; border: 1px solid var(--verre-bord); background: var(--verre); color: var(--texte); padding: 0 14px; font: 600 16px var(--f-corps, inherit); letter-spacing: 0; text-transform: none; }
.bn-liste { display: grid; gap: 8px; }
.bn-ligne { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; text-align: left; padding: 12px; border-radius: 16px; border: 1px solid var(--verre-bord); background: var(--verre); color: var(--texte); font: inherit; cursor: pointer; }
.bn-ligne.vedette { border-color: var(--neon); }
.bn-ligne small { display: block; color: var(--gris); font-size: 12.5px; }
.bn-ligne-d { display: grid; justify-items: end; gap: 4px; }
.bn-ligne-d b { font: 700 15px var(--f-jeu); }
.bn-chip { border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.08); color: var(--gris); white-space: nowrap; }
.bn-chip.ok { background: rgba(42, 42, 42,.14); color: var(--neon); } .bn-chip.reg { background: rgba(42, 42, 42,.16); color: #C8C8C8; }
.bn-vide { color: var(--gris); font-size: 14px; margin: 4px 0; }

/* Récapitulatif */
.bn-recap { position: sticky; top: 0; align-self: start; border-radius: 22px; border: 1px solid var(--verre-bord); background: var(--verre); padding: 20px; display: grid; gap: 12px; }
.bn-k { font: 600 11px var(--f-jeu); letter-spacing: 0; text-transform: none; color: var(--gris); }
.bn-gros { font: 700 40px/1 var(--f-jeu); color: var(--or); }
.bn-sous { color: var(--gris); font-size: 12.5px; }
.bn-split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bn-split > div { background: rgba(255,255,255,.05); border-radius: 12px; padding: 9px 11px; }
.bn-split small { display: block; color: var(--gris); font-size: 11px; }
.bn-split b { font: 700 17px var(--f-jeu); } .bn-split .vert { color: var(--neon); }
.bn-barre { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; } .bn-barre i { display: block; height: 100%; background: var(--neon); transition: width .4s var(--ease); }
.bn-chips { display: flex; gap: 6px; }
.bn-elec { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(42, 42, 42,.08); border: 1px solid rgba(42, 42, 42,.25); }
.bn-elec b { font-size: 13.5px; } .bn-elec > b { color: #2A2A2A; font: 700 15px var(--f-jeu); white-space: nowrap; }
.bn-elec small { display: block; color: var(--gris); font-size: 11.5px; }
.bn-prix { display: grid; gap: 6px; font-size: 12.5px; color: var(--gris); }
.bn-prix > span { display: flex; justify-content: space-between; }
.bn-lien { background: none; border: 0; color: var(--neon); font: 600 12px inherit; cursor: pointer; padding: 0; }
.bn-prix-in { position: relative; } .bn-prix-in input { width: 100%; box-sizing: border-box; height: 46px; border-radius: 12px; border: 1px solid var(--verre-bord); background: rgba(255,255,255,.05); color: var(--texte); font: 700 20px var(--f-jeu); padding: 0 34px 0 12px; }
.bn-prix-in span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--gris); }
.bn-prix input[type="range"] { width: 100%; accent-color: var(--neon); }
.bn-langue { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--gris); }
.bn-langue .seg { display: flex; } .bn-langue .seg button.on { background: var(--neon); color: #0E0E0E; }
.bn-pdf { width: 100%; } .bn-pdf:disabled { opacity: .45; box-shadow: none; }
.bn-etat { color: var(--gris); font-size: 12px; text-align: center; }

/* Tiroir (dossiers, PDF) et fenêtre de contact */
.bn-tiroir { position: fixed; inset: 0; z-index: 40; }
.bn-tiroir-fond { position: absolute; inset: 0; background: rgba(14, 14, 14, .6); }
.bn-tiroir-boite { position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100%); background: var(--nuit-2); border-left: 1px solid var(--verre-bord); padding: calc(16px + env(safe-area-inset-top)) 16px 16px; overflow-y: auto; display: grid; gap: 10px; align-content: start; }
.bn-tiroir-boite header { display: flex; justify-content: space-between; align-items: center; }
.bn-tiroir-boite h2 { margin: 0; font: 700 20px var(--f-jeu); letter-spacing: 0; text-transform: none; }
.bn-t-ligne { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--verre-bord); background: var(--verre); color: var(--texte); text-align: left; font: inherit; cursor: pointer; width: 100%; box-sizing: border-box; }
.bn-t-ligne.on { border-color: var(--neon); }
.bn-t-ligne small { display: block; color: var(--gris); font-size: 12px; }
.bn-dlg { border: 1px solid var(--verre-bord); border-radius: 22px; padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--nuit-2); color: var(--texte); }
.bn-dlg::backdrop { background: rgba(14, 14, 14, .6); }
.bn-dlg form { padding: 20px; display: grid; gap: 12px; max-height: calc(100dvh - 40px); overflow-y: auto; box-sizing: border-box; }
.bn-dlg h2 { margin: 0; font: 700 20px var(--f-jeu); letter-spacing: 0; }
.bn-dlg p { margin: 0; color: var(--gris); font-size: 13px; }
.bn-champs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bn-champs label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--gris); }
.bn-champs .large { grid-column: 1 / -1; }
.bn-champs input:not([type="checkbox"]), .bn-champs select { height: 42px; border-radius: 11px; border: 1px solid var(--verre-bord); background: rgba(255,255,255,.05); color: var(--texte); padding: 0 11px; font: 500 15px inherit; color-scheme: dark; min-width: 0; }
.bn-msg { color: var(--rouge) !important; min-height: 1em; }
.bn-dlg-actions { display: flex; justify-content: flex-end; gap: 8px; } .bn-dlg-actions .btn-jeu { padding: 0 18px; }

@media (max-width: 1000px) {
  .bn-grille { grid-template-columns: minmax(0, 1fr); }
  .bn-recap { position: static; }
  .bn-legende { display: none; }
}
@media (max-width: 560px) {
  .bn-hero { height: 70vh; border-radius: 18px; }
  .bn-faits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bn-champs { grid-template-columns: 1fr; }
  .bn-tete-actions { width: 100%; }
}
/* Carte plus grande, tous les immeubles visibles */
.bn-hero { height: clamp(560px, 80vh, 980px); }
.bn-pt.autre { background: #8A8A8A; }
.bn-compte { align-self: start; justify-self: start; padding: 5px 10px; border-radius: 10px; background: rgba(14, 14, 14, .85); font-size: 12px; color: var(--gris); }
.bn-compte:empty { display: none; }
.bn-survol .maplibregl-popup-content { border-radius: 10px; padding: 7px 10px; background: #0E0E0E; color: var(--texte); border: 1px solid var(--verre-bord); display: grid; font-size: 12.5px; pointer-events: none; }
.bn-survol .maplibregl-popup-tip { border-top-color: #0E0E0E; }
.bn-survol small { color: var(--gris); }
@media (min-width: 900px) { .bn-panneau { top: 150px; } }
@media (max-width: 560px) { .bn-hero { height: 78vh; } }
/* Données modifiables dans la fiche : logements, année, valeur */
.bn-fait { display: grid; gap: 2px; background: rgba(255,255,255,.05); border-radius: 10px; padding: 7px 9px; min-width: 0; border: 1px solid transparent; }
.bn-fait small { color: var(--gris); font-size: 11px; }
.bn-fait input { width: 100%; min-width: 0; box-sizing: border-box; background: transparent; border: 0; border-bottom: 1px dashed rgba(255,255,255,.25); padding: 0 0 2px; color: var(--texte); font: 700 14px var(--f-jeu); outline: none; }
.bn-fait input:focus { border-bottom-color: var(--neon); }
.bn-fait.manque { border-color: #2A2A2A; background: rgba(42, 42, 42,.1); }
.bn-fait.manque input { border-bottom-color: #2A2A2A; color: #C8C8C8; }
.bn-fait.manque input::placeholder { color: #C8C8C8; opacity: .9; }
.bn-manque { font-size: 13px; color: #C8C8C8; background: rgba(42, 42, 42,.12); border: 1px solid rgba(42, 42, 42,.35); border-radius: 10px; padding: 8px 10px; }
/* Capture de l'outil d'Hydro-Québec */
.bn-capture { font-size: 12.5px; border-radius: 10px; padding: 8px 10px; }
.bn-capture.ok { color: var(--accent); background: rgba(42, 42, 42,.1); }
.bn-capture.non { color: #C8C8C8; background: rgba(42, 42, 42,.12); }
.bn-capture.attente { color: var(--text-muted); background: var(--surface); }
.bn-cap { font-size: 11px; font-weight: 700; color: var(--text-muted); } .bn-cap.ok { color: var(--accent); } .bn-cap.non { color: #C8C8C8; }
