/* ============================================================================
   recherche.css — [RECHERCHEDESIGN 2026-06-13] REFONTE VISUELLE du moteur de
   recherche du secteur. La MÉCANIQUE (R2/R2.1/R2.2/R2.3) est INCHANGÉE :
   recherche.ui.js reste byte-identique au live (?v=2026-06-13-advisor1).
   SEUL le look change — aucun nom de classe/id touché, aucune logique déplacée.

   Brief Nicolas (2026-06-13) : « le moteur de recherche est dégueulasse, des
   gros boutons bleus, aucune mise en page sympa ». → on prolonge l'identité
   pastel/or posée le 12-06 (MENUPOLISH : surfaces pastel dégradé, pastilles
   d'icône pleines, titres encre, or scintillant, ombres douces, rayons ronds).

   Palette (code_couleur.md / design_system.md — RIEN hors canon) :
     SAPHIR mission #2563eb (candidat 1 spec moteur_recherche_secteur § 5.4 —
       à valider Nicolas in vivo). C'est l'ACCENT (règle 60-30-10).
     ENCRE #0f172a / slate-2 #334155 / slate-3 #64748b — texte & neutres.
     ROSE #be185d = prix (annonce). GRIS ardoise = couverture (inconnu).
     ORANGE #b45309/#fef3c7 = famille « à revoir » (confiance localisation R2.1).
   Deux signaux jamais mélangés : GRIS = info manquante · ORANGE = non confirmé.

   Principes design (design_system.md §6) :
     - mobile-first, plein soleil : texte sombre sur fond clair, contraste AAA
       sur les chiffres/CTA, touch targets >= 44px.
     - hiérarchie 3 niveaux : action (CTA, grand chiffre) / contexte / détail.
     - 60-30-10 : fond clair, texte slate, saphir en accent — pas de sapin.
     - chips = pilules élégantes (repos neutre, sélection saphir pastel→plein).
     - cards aérées, ombres douces, rayons 12-18px cards / 999px chips.
   ============================================================================ */

:root {
  --oprch-c: #2563eb;            /* saphir mission (accent) */
  --oprch-c-d: #1d4ed8;          /* saphir sombre (texte sur clair, hover) */
  --oprch-c-dd: #1e3a8a;         /* saphir profond (titres sur pastel) */
  --oprch-c-soft: #eff6ff;       /* pastel saphir très clair (surfaces) */
  --oprch-c-soft2: #dbeafe;      /* pastel saphir (bordures douces) */
  --oprch-warn: #b45309;
  --oprch-warn-bg: #fef3c7;
  --oprch-ink: #0f172a;
  --oprch-ink-2: #334155;
  --oprch-ink-3: #64748b;
  --oprch-line: #e7ecf3;
  --oprch-surface: #ffffff;
  --oprch-bg: #f4f7fb;
  --oprch-shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 2px 8px rgba(15,23,42,.05);
  --oprch-shadow-md: 0 2px 6px rgba(15,23,42,.06), 0 12px 30px rgba(15,23,42,.10);
  --oprch-shadow-c: 0 6px 18px rgba(37,99,235,.30);   /* relief CTA saphir */
}

/* ============================== panneau plein écran ======================= */
#oprch {
  position: fixed; inset: 0; z-index: 9300;
  background:
    radial-gradient(120% 60% at 50% -10%, #eef3fb 0%, rgba(238,243,251,0) 60%),
    var(--oprch-bg);
  display: flex; flex-direction: column;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#oprch[hidden] { display: none; }
.oprch-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }

/* ---- en-tête : encre profonde teintée saphir + hairline or discret ------- */
.oprch-head {
  display: flex; align-items: center; gap: 11px;
  padding: calc(12px + env(safe-area-inset-top)) 14px 13px;
  background: linear-gradient(135deg, #0c1426 0%, #111c30 45%, #16243f 100%);
  color: #fff; flex: 0 0 auto; position: relative;
}
.oprch-head::after {            /* fine ligne d'accent : saphir → or, signature maison */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--oprch-c) 0%, #60a5fa 45%, #d4a017 100%);
  opacity: .9;
}
.oprch-back {
  width: 44px; height: 44px; border: 0; border-radius: 13px;
  background: rgba(255,255,255,.10); color: #fff;
  font-size: 26px; line-height: 1; cursor: pointer; flex: 0 0 auto;
  transition: background .15s;
}
.oprch-back:active { background: rgba(255,255,255,.20); }
.oprch-ttl-zone { flex: 1 1 auto; min-width: 0; }
.oprch-ttl { font-size: 19px; font-weight: 800; letter-spacing: -.3px; line-height: 1.15; }
.oprch-sub {
  font-size: 12.5px; opacity: .78; display: flex; align-items: center; gap: 6px;
  margin-top: 2px; font-weight: 600;
}
.oprch-hbtns { display: flex; gap: 8px; flex: 0 0 auto; }
.oprch-hb {
  height: 40px; padding: 0 15px; border: 0; border-radius: 999px;
  font-size: 13.5px; font-weight: 800; cursor: pointer; letter-spacing: .1px;
  transition: filter .15s, background .15s;
}
.oprch-hb:active { filter: brightness(.92); }
.oprch-hb-map {
  background: rgba(255,255,255,.13); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.oprch-hb-pin {
  background: linear-gradient(135deg, #3b82f6, var(--oprch-c));
  color: #fff; box-shadow: var(--oprch-shadow-c);
}

/* récap critères actifs (résultats) — pilules saphir sur bandeau encre */
.oprch-chips-actifs {
  display: flex; gap: 7px; overflow-x: auto; padding: 9px 14px;
  background: linear-gradient(135deg, #0c1426, #16243f); flex: 0 0 auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.oprch-chips-actifs::-webkit-scrollbar { display: none; }
.oprch-chips-actifs span {
  flex: 0 0 auto; padding: 5px 12px; border-radius: 999px;
  background: rgba(59,130,246,.20);
  box-shadow: inset 0 0 0 1px rgba(96,165,250,.45);
  color: #dbeafe; font-size: 12px; font-weight: 700; white-space: nowrap;
}

/* R2.1 — comptage par source en tête des résultats */
.oprch-srcbar {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 10px 14px; flex: 0 0 auto;
  background: var(--oprch-surface); border-bottom: 1px solid var(--oprch-line);
}
.oprch-srcbar[hidden] { display: none; }
.oprch-srcbar .sc {
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(15,23,42,.04);
}
.oprch-srcbar .sc b { font-size: 13.5px; font-weight: 900; }
.oprch-srcbar .sc.dpe { background: #fef2f2; color: #b91c1c; }        /* DPE = rouge ADEME */
.oprch-srcbar .sc.dvf { background: #ecfeff; color: #0e7490; }        /* notaire/DVF = cyan */
.oprch-srcbar .sc.ann { background: #fdf4ff; color: #a21caf; }        /* annonce = rose/fuchsia */
.oprch-srcbar .sc-i { margin-left: auto; }

.oprch-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  padding: 16px 14px calc(18px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

/* ---- footer collant : le COMPTEUR DOUBLE mis en valeur ------------------- */
.oprch-foot {
  flex: 0 0 auto; display: flex; align-items: center; gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--oprch-surface);
  border-top: 1px solid var(--oprch-line);
  box-shadow: 0 -10px 28px rgba(15,23,42,.07);
}
.oprch-foot[hidden] { display: none; }
/* R2.2 — compteur honnête : grand chiffre saphir + libellé + pilule possibles.
   On le pose dans une mini-surface pastel pour le mettre EN VALEUR. */
.oprch-count {
  flex: 1 1 auto; display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.oprch-count .ln { display: flex; align-items: baseline; gap: 8px; }
.oprch-count b {
  font-size: 30px; font-weight: 900; letter-spacing: -.8px;
  line-height: 1; color: var(--oprch-c-d);
  font-variant-numeric: tabular-nums;
}
.oprch-count .lb { font-size: 13px; color: var(--oprch-ink-3); font-weight: 700; }
.oprch-count .ln .oprch-i { align-self: center; }
.oprch-poss-pill {
  align-self: flex-start; display: inline-flex; align-items: baseline; gap: 5px;
  border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #f1f5f9, #e7edf5);
  box-shadow: inset 0 0 0 1px #d6deea;
  color: #475569; font-size: 12.5px; font-weight: 800; padding: 5px 12px;
  cursor: pointer; white-space: nowrap; transition: filter .15s;
}
.oprch-poss-pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #94a3b8; align-self: center; margin-right: 1px;
}
.oprch-poss-pill:active { filter: brightness(.96); }
.oprch-poss-pill[hidden] { display: none; }
.oprch-poss-pill span { font-weight: 700; color: #64748b; }
.oprch-see {
  height: 50px; padding: 0 28px; border: 0; border-radius: 15px;
  background: linear-gradient(135deg, #3b82f6 0%, var(--oprch-c) 100%);
  color: #fff; font-size: 16px; font-weight: 800; letter-spacing: .2px;
  cursor: pointer; box-shadow: var(--oprch-shadow-c);
  transition: filter .15s, box-shadow .15s;
}
.oprch-see:active { filter: brightness(.93); }
.oprch-see:disabled {
  opacity: 1; background: #e7edf5; color: #b6c0d0;
  box-shadow: none; cursor: default;
}

/* ============================== écran filtres ============================= */
.oprch-sec {
  margin: 0 0 16px;
  background: var(--oprch-surface);
  border: 1px solid var(--oprch-line); border-radius: 16px;
  padding: 14px 14px 15px; box-shadow: var(--oprch-shadow-sm);
}
.oprch-k {
  font-size: 11.5px; font-weight: 800; color: var(--oprch-ink-2);
  text-transform: uppercase; letter-spacing: .7px;
  margin: 0 0 11px; display: flex; align-items: center; gap: 7px;
}
.oprch-cov {
  font-size: 11px; font-weight: 800; color: var(--oprch-c-d);
  text-transform: none; letter-spacing: 0;
  background: var(--oprch-c-soft); border-radius: 999px; padding: 2px 9px;
}
.oprch-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* CHIP de filtre — fini les gros boutons bleus criards : repos neutre élégant,
   sélection = saphir pastel→plein avec relief doux. */
.oprch-c {
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  border: 1.5px solid #d8e0ea; background: #fbfcfe; color: var(--oprch-ink-2);
  font-size: 14.5px; font-weight: 700; cursor: pointer;
  transition: border-color .14s, background .14s, color .14s, box-shadow .14s;
}
.oprch-c:active { background: #f1f5f9; }
.oprch-c.sel {
  background: linear-gradient(135deg, #3b82f6, var(--oprch-c));
  border-color: var(--oprch-c); color: #fff;
  box-shadow: var(--oprch-shadow-c);
}
.oprch-i {
  width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid #b6c0d0;
  background: #fff; color: var(--oprch-ink-3); font-size: 11px; font-weight: 800;
  font-style: italic; line-height: 1; cursor: pointer; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; transition: border-color .14s, color .14s;
}
.oprch-i:active { border-color: var(--oprch-c); color: var(--oprch-c); }
.oprch-sub .oprch-i { border-color: rgba(255,255,255,.4); color: rgba(255,255,255,.8); background: transparent; }

/* steppers surface */
.oprch-steps { display: flex; gap: 10px; }
.oprch-step {
  flex: 1 1 0; display: flex; align-items: center; gap: 8px;
  background: #fbfcfe; border: 1.5px solid #d8e0ea; border-radius: 13px;
  padding: 6px 9px;
}
.oprch-step .lbl { font-size: 12px; font-weight: 800; color: var(--oprch-ink-3); width: 30px; }
.oprch-step .mm {
  width: 40px; height: 40px; border: 0; border-radius: 11px;
  background: var(--oprch-c-soft); color: var(--oprch-c-d);
  font-size: 21px; font-weight: 800; cursor: pointer; transition: background .14s;
}
.oprch-step .mm:active { background: var(--oprch-c-soft2); }
.oprch-step .val { flex: 1 1 auto; text-align: center; font-size: 16px; font-weight: 900; color: var(--oprch-ink); font-variant-numeric: tabular-nums; }
.oprch-step .un { font-size: 11px; color: #94a3b8; font-weight: 700; }

/* R2.1 — toggle « biens non confirmés » (orange = famille « à revoir ») */
.oprch-toggle {
  display: flex; align-items: center; gap: 11px;
  min-height: 48px; width: 100%; padding: 0 14px;
  border: 1.5px solid #d8e0ea; border-radius: 13px; background: #fbfcfe;
  cursor: pointer; text-align: left; transition: border-color .14s, background .14s;
}
.oprch-toggle .kn {
  position: relative; flex: 0 0 auto;
  width: 44px; height: 25px; border-radius: 999px; background: #cbd5e1; transition: background .15s;
}
.oprch-toggle .kn::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(15,23,42,.3); transition: transform .15s;
}
.oprch-toggle.on { border-color: var(--oprch-warn); background: var(--oprch-warn-bg); }
.oprch-toggle.on .kn { background: var(--oprch-warn); }
.oprch-toggle.on .kn::after { transform: translateX(19px); }
.oprch-toggle .tl { font-size: 14px; font-weight: 800; color: var(--oprch-ink-2); }
.oprch-toggle.on .tl { color: var(--oprch-warn); }

.oprch-reset-zone { padding: 6px 0 12px; text-align: center; }
.oprch-reset {
  border: 0; background: transparent; color: var(--oprch-ink-3);
  font-size: 13.5px; font-weight: 700; text-decoration: underline; cursor: pointer;
  min-height: 44px; padding: 0 16px;
}

/* ============================== résultats ================================= */
.oprch-list { display: flex; flex-direction: column; gap: 9px; }
.oprch-row {
  display: flex; align-items: stretch; gap: 6px;
  background: var(--oprch-surface); border: 1px solid var(--oprch-line);
  border-radius: 15px; overflow: hidden;
  box-shadow: var(--oprch-shadow-sm);
  transition: box-shadow .15s, border-color .15s;
}
.oprch-row:active { box-shadow: var(--oprch-shadow-md); }
.oprch-row.unk {
  background: #fbfcfe; border-style: dashed; border-color: #d8e0ea;
  box-shadow: none;
}
/* R2.3 R-c — case à cocher (même geste que cocher des rues en tournée) */
.oprch-pick {
  flex: 0 0 auto; align-self: center; margin-left: 12px;
  width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  border: 2px solid #c4cdda; background: #fff; position: relative;
  transition: border-color .14s, background .14s;
}
.oprch-pick[aria-checked="true"] {
  border-color: var(--oprch-c);
  background: linear-gradient(135deg, #3b82f6, var(--oprch-c));
  box-shadow: 0 2px 7px rgba(37,99,235,.35);
}
.oprch-pick[aria-checked="true"]::after {
  content: ''; position: absolute; left: 7px; top: 3px;
  width: 6px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0;
  transform: rotate(43deg);
}
/* R2.3 R-c — bien VISITÉ pendant l'itinéraire : grisé + ✓ */
.oprch-row.done { opacity: .55; }
.oprch-row.done .oprch-pick { border-color: #94a3b8; background: #94a3b8; box-shadow: none; }
.oprch-row.done .oprch-row-go .tx b::after {
  content: ' ✓'; color: var(--oprch-c); font-weight: 900;
}
.oprch-row-go {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px;
  border: 0; background: transparent; text-align: left; cursor: pointer;
  padding: 12px 2px 12px 13px; min-height: 60px;
}
.oprch-row-go .tx { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.oprch-row-go .tx b {
  font-size: 14.5px; font-weight: 800; color: var(--oprch-ink); letter-spacing: -.1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oprch-row-go .tx i {
  font-style: normal; font-size: 12.5px; color: var(--oprch-ink-2); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.oprch-row-go .tx i .src {
  font-style: normal; font-size: 9px; font-weight: 900; color: var(--oprch-c-d);
  vertical-align: super; margin-left: 1px;
}
.oprch-prix { color: #be185d; font-weight: 900; }
/* R2.2 — tag « info manquante » par ligne possible : GRIS (couverture) */
.oprch-qtag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  border: 1px dashed #cbd5e1; background: #f4f7fb; color: #64748b;
  font-size: 10.5px; font-weight: 800; white-space: nowrap; vertical-align: middle;
}
/* badges statut agent — pleins, lisibles plein soleil */
.oprch-badge {
  flex: 0 0 auto; align-self: center; padding: 4px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .2px; white-space: nowrap;
}
.oprch-badge.st-FLYER { background: #f3e8ff; color: #7c3aed; }
.oprch-badge.st-A_REVOIR { background: #fef3c7; color: #b45309; }
.oprch-badge.st-MANDAT { background: #dcfce7; color: #15803d; }
.oprch-badge.st-VISITE { background: #e0f2fe; color: #0369a1; }
.oprch-badge.st-JAMAIS { background: #eef2f7; color: #64748b; }
.oprch-badge.st-EXCLU { background: #fee2e2; color: #b91c1c; }
.oprch-warn {
  flex: 0 0 auto; align-self: center; width: 27px; height: 27px;
  border-radius: 50%; border: 0; background: #fef3c7; color: #b45309;
  font-size: 13px; font-weight: 900; cursor: pointer;
}

/* R2.1 — HYPOTHÈSE (annonce non confirmée), famille « à revoir » (orange) */
.oprch-row.hypo { border-color: #f3d18a; box-shadow: inset 4px 0 0 var(--oprch-warn), var(--oprch-shadow-sm); }
.oprch-hypo-b {
  flex: 0 0 auto; align-self: center; margin: 0 2px;
  padding: 4px 10px; border: 0; border-radius: 999px;
  background: var(--oprch-warn-bg); color: var(--oprch-warn);
  font-size: 10.5px; font-weight: 800; letter-spacing: .2px; white-space: nowrap; cursor: pointer;
}
.oprch-pv-row.hypo .s { color: var(--oprch-warn); }
.oprch-pv-flag {
  display: inline-block; padding: 1px 7px; border-radius: 999px;
  background: var(--oprch-warn-bg); color: var(--oprch-warn);
  font-size: 10px; font-weight: 800; margin-left: 4px;
}

/* R2.1 — bannière orange en tête de fiche (#feature-panel) */
.oprch-fiche-hypo {
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 10px 14px;
  background: var(--oprch-warn-bg); color: var(--oprch-warn);
  border-bottom: 1px solid #f3d18a;
  font-size: 13px; font-weight: 800;
}
.oprch-fiche-hypo .ic { font-size: 14px; }
.oprch-fiche-hypo .tx { flex: 1 1 auto; }
.oprch-fiche-hypo .oprch-i { border-color: #d6a955; color: var(--oprch-warn); background: transparent; }
.oprch-prov {
  flex: 0 0 auto; align-self: stretch; width: 44px; border: 0;
  border-left: 1px solid #f1f5f9; background: transparent; color: #b6c0d0;
  font-size: 13px; font-weight: 800; font-style: italic; cursor: pointer;
  font-family: Georgia, serif; transition: color .14s;
}
.oprch-prov:active { color: var(--oprch-c); }

.oprch-more {
  display: block; width: 100%; margin: 12px 0 0; min-height: 48px;
  border: 1.5px dashed #cbd5e1; border-radius: 14px; background: #fff;
  color: var(--oprch-ink-2); font-size: 14px; font-weight: 700; cursor: pointer;
}
/* R2.2 — section « pourraient correspondre » (statut b) : GRIS ardoise */
.oprch-poss-sec {
  display: block; width: 100%; margin: 12px 0 0; min-height: 48px;
  border: 1.5px dashed #cbd5e1; border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  color: var(--oprch-ink-2); font-size: 14px; font-weight: 800; cursor: pointer;
  padding: 9px 14px;
}
.oprch-poss-sec .q { font-weight: 700; color: #94a3b8; font-size: 12.5px; }
.oprch-poss-zone {
  margin-top: 14px; border: 1.5px dashed #cbd5e1; border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc, #eef2f7); padding: 12px 12px 10px;
}
.oprch-poss-head {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 800; color: var(--oprch-ink-2);
  text-transform: uppercase; letter-spacing: .5px; margin: 0 2px 11px;
}
.oprch-poss-chips {
  display: flex; gap: 7px; overflow-x: auto; margin: 0 0 11px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.oprch-poss-chips::-webkit-scrollbar { display: none; }
.oprch-pc {
  flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 5px;
  min-height: 38px; padding: 0 13px; border-radius: 999px;
  border: 1.5px solid #cbd5e1; background: #fff; color: var(--oprch-ink-2);
  font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.oprch-pc b { font-weight: 900; }
.oprch-pc.sel { background: #475569; border-color: #475569; color: #fff; }
.oprch-poss-list { display: flex; flex-direction: column; gap: 9px; }
.oprch-unk-cap { text-align: center; font-size: 12px; color: #94a3b8; font-weight: 700; padding: 9px 0; }

.oprch-empty {
  padding: 30px 20px; text-align: center; color: var(--oprch-ink-3);
  font-size: 14.5px; font-weight: 600;
}
.oprch-load { display: flex; justify-content: center; padding: 36px 0; }
.oprch-spin {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid var(--oprch-c-soft2); border-top-color: var(--oprch-c);
  animation: oprch-rot .8s linear infinite;
}
@keyframes oprch-rot { to { transform: rotate(360deg); } }

/* ===================== dock carte « Revenir à la liste » ================== */
#oprch-go {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px;
  z-index: 9290; pointer-events: none;
}
#oprch-go[hidden] { display: none; }
#oprch-go > button {
  pointer-events: auto; display: block; width: 100%;
  min-height: 50px; border: 0; border-radius: 15px;
  background: var(--opsem-mission-color, var(--oprch-c)); color: #fff;
  font-size: 16px; font-weight: 800; cursor: pointer;
  box-shadow: 0 10px 26px rgba(15,23,42,.30);
  text-align: left; padding: 0 18px;
}
#oprch-go .rg-sub {
  pointer-events: none; margin: 7px 4px 0; font-size: 12.5px; font-weight: 700;
  color: var(--oprch-ink); background: rgba(255,255,255,.94); border-radius: 10px;
  padding: 7px 11px; display: inline-block;
  box-shadow: 0 4px 12px rgba(15,23,42,.16);
}
#oprch-go .rg-sub:empty { display: none; }
/* R2.3 R-c — contrôles d'itinéraire (Visité / Bien suivant) */
.oprch-route-ctrl {
  pointer-events: auto; display: flex; gap: 8px; margin: 9px 0 0;
}
.oprch-route-ctrl[hidden] { display: none; }
.oprch-route-ctrl button {
  flex: 1 1 0; min-height: 46px; border: 0; border-radius: 13px;
  font-size: 14.5px; font-weight: 800; cursor: pointer;
  box-shadow: 0 6px 16px rgba(15,23,42,.20);
}
.oprch-route-ctrl .rc-done { background: #fff; color: var(--opsem-mission-color, var(--oprch-c)); }
.oprch-route-ctrl .rc-next {
  background: var(--opsem-mission-color, var(--oprch-c)); color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45), 0 6px 16px rgba(15,23,42,.20);
}

/* ============================ ⓘ / feuilles ================================ */
#oprch-info { position: fixed; inset: 0; z-index: 9400; }
.oprch-info-scrim { position: absolute; inset: 0; background: rgba(11,18,33,.5); opacity: 0; transition: opacity .18s; }
#oprch-info.on .oprch-info-scrim { opacity: 1; }
.oprch-info-card {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(16px); opacity: 0; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .2s;
  max-height: 76vh; overflow-y: auto;
  box-shadow: 0 -16px 40px rgba(15,23,42,.22);
}
#oprch-info.on .oprch-info-card { transform: none; opacity: 1; }
.oprch-grab { width: 44px; height: 4px; border-radius: 999px; background: #dde3ec; margin: 5px auto 14px; }
.oprch-info-card p { font-size: 14.5px; line-height: 1.55; color: var(--oprch-ink-2); margin: 0 0 14px; }
.oprch-info-close {
  display: block; width: 100%; min-height: 48px; border: 0; border-radius: 13px;
  background: #f1f5f9; color: var(--oprch-ink-2); font-size: 14.5px; font-weight: 800; cursor: pointer;
}

/* provenance */
.oprch-pv-ttl { font-size: 15.5px; font-weight: 800; color: var(--oprch-ink); margin: 0 0 10px; }
.oprch-pv-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #f1f5f9;
}
.oprch-pv-row .s { font-size: 12.5px; font-weight: 800; color: var(--oprch-c-d); white-space: nowrap; }
.oprch-pv-row .v { font-size: 13.5px; font-weight: 600; color: var(--oprch-ink); text-align: right; }
.oprch-pv-foot { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; }
.oprch-pv-fiche {
  flex: 1 1 auto; min-height: 48px; border: 0; border-radius: 13px;
  background: var(--oprch-ink); color: #fff; font-size: 14.5px; font-weight: 800; cursor: pointer;
}

/* feuille épingler */
.oprch-pin-ttl {
  font-size: 17px; font-weight: 800; color: var(--oprch-ink);
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
}
.oprch-pin-badge {
  padding: 4px 10px; border-radius: 999px; background: var(--oprch-c-soft); color: var(--oprch-c-d);
  font-size: 11px; font-weight: 800; letter-spacing: .2px; white-space: nowrap;
}
.oprch-pin-recap { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 16px; align-items: center; }
.oprch-pin-recap span {
  padding: 5px 11px; border-radius: 999px; background: var(--oprch-c-soft);
  box-shadow: inset 0 0 0 1px var(--oprch-c-soft2); color: #1e40af; font-size: 12px; font-weight: 700;
}
.oprch-pin-recap .n { background: var(--oprch-ink); box-shadow: none; color: #fff; }
/* R2.2 — choix du périmètre épinglé : correspondent / à vérifier */
.oprch-pin-scope { display: flex; gap: 8px; margin: 0 0 16px; }
.oprch-pin-scope .ps {
  flex: 1 1 0; min-height: 50px; padding: 0 10px; border-radius: 13px;
  border: 1.5px solid #d8e0ea; background: #fbfcfe; color: var(--oprch-ink-2);
  font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.oprch-pin-scope .ps b { font-weight: 900; }
.oprch-pin-scope .ps.sel {
  background: linear-gradient(135deg, #3b82f6, var(--oprch-c));
  border-color: var(--oprch-c); color: #fff; box-shadow: var(--oprch-shadow-c);
}
.oprch-pin-field { display: block; margin: 0 0 16px; }
.oprch-pin-field span { display: block; font-size: 11.5px; font-weight: 800; color: var(--oprch-ink-3); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 6px; }
.oprch-pin-field input {
  width: 100%; min-height: 50px; border: 1.5px solid #d8e0ea; border-radius: 13px;
  padding: 0 14px; font-size: 15px; font-weight: 600; color: var(--oprch-ink); background: #fbfcfe;
  transition: border-color .14s, background .14s;
}
.oprch-pin-field input:focus { outline: none; border-color: var(--oprch-c); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.14); }
.oprch-pin-save {
  display: block; width: 100%; min-height: 52px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, var(--oprch-c));
  color: #fff; font-size: 16px; font-weight: 800; cursor: pointer;
  box-shadow: var(--oprch-shadow-c);
}
.oprch-pin-save:disabled { opacity: 1; background: #e7edf5; color: #b6c0d0; box-shadow: none; }
.oprch-err { margin: 10px 0 0; color: #b91c1c; font-size: 13.5px; font-weight: 700; text-align: center; }
.oprch-pin-done { text-align: center; padding: 8px 0 4px; }
.oprch-pin-done .ok {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, var(--oprch-c)); color: #fff;
  font-size: 28px; font-weight: 900; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px; box-shadow: var(--oprch-shadow-c);
}
.oprch-pin-done .t { font-size: 17px; font-weight: 800; color: var(--oprch-ink); margin: 0 0 8px; }
.oprch-pin-done .s { font-size: 13.5px; color: var(--oprch-ink-2); font-weight: 600; margin: 10px 0 18px; }

/* ============== R2.3 R-a — bande d'aiguillage (écran filtres) ============== */
.oprch-aig {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 14px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--oprch-c-soft) 0%, #e3edfd 100%);
  border-bottom: 1px solid var(--oprch-c-soft2);
}
.oprch-aig[hidden] { display: none; }
.oprch-aig .lb { font-size: 12.5px; font-weight: 800; color: var(--oprch-c-dd); white-space: nowrap; }
.oprch-ac {
  display: inline-flex; align-items: baseline; gap: 5px;
  min-height: 36px; padding: 0 13px; border-radius: 999px;
  border: 1.5px solid #bfdbfe; background: #fff; color: var(--oprch-c-d);
  font-size: 12.5px; font-weight: 800; cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(37,99,235,.10);
}
.oprch-ac b { font-weight: 900; }
.oprch-ac.hot {
  background: linear-gradient(135deg, #3b82f6, var(--oprch-c));
  border-color: var(--oprch-c); color: #fff; box-shadow: var(--oprch-shadow-c);
}
.oprch-aig .oprch-i { margin-left: auto; background: rgba(255,255,255,.6); border-color: #9bbcf5; }
/* flash de la section visée par la suggestion (scroll + halo saphir) */
@keyframes oprch-secflash {
  0% { box-shadow: 0 0 0 3px rgba(37,99,235,.55), var(--oprch-shadow-md); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0), var(--oprch-shadow-sm); }
}
.oprch-sec.flash { animation: oprch-secflash 1.4s ease-out 1; }

/* ============== R2.3 R-b — quartier (sections cadastrales) ================ */
.oprch-qbtn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 17px; border-radius: 13px;
  border: 1.5px solid var(--oprch-c); background: var(--oprch-c-soft); color: var(--oprch-c-d);
  font-size: 14.5px; font-weight: 800; cursor: pointer;
}
.oprch-qbtn svg { flex: 0 0 auto; }
.oprch-qbtn.mini { min-height: 40px; padding: 0 13px; font-size: 13px; border-color: #d8e0ea; color: var(--oprch-ink-2); background: #fbfcfe; }
.oprch-qzone { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.oprch-qchip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 6px 0 15px; border-radius: 13px;
  background: linear-gradient(135deg, #3b82f6, var(--oprch-c)); color: #fff;
  font-size: 14px; font-weight: 800; box-shadow: var(--oprch-shadow-c);
}
.oprch-qchip .x {
  width: 34px; height: 34px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.2); color: #fff;
  font-size: 15px; font-weight: 800; cursor: pointer; line-height: 1;
}
.oprch-qchip-com { font-weight: 700; opacity: .92; }
/* R2.3 R-b-PRÉCISION — l'entrée quartier vit DANS le sélecteur de communes */
.oprch-q-in-com {
  margin-top: 11px; padding-top: 11px; border-top: 1px dashed #dde3ec;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* dock du mode choix (en bas) */
#oprch-qdock {
  position: fixed; left: 10px; right: 10px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 9290; pointer-events: none;
}
#oprch-qdock[hidden] { display: none; }
#oprch-qdock .qd-bar {
  pointer-events: auto; display: flex; align-items: stretch; gap: 8px;
  background: var(--opsem-mission-color, var(--oprch-c));
  border-radius: 16px; padding: 8px;
  box-shadow: 0 10px 26px rgba(15,23,42,.30);
}
#oprch-qdock .qd-cancel {
  flex: 0 0 auto; min-height: 46px; padding: 0 14px; border: 0; border-radius: 11px;
  background: rgba(255,255,255,.14); color: #fff;
  font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap;
}
#oprch-qdock .qd-mid {
  flex: 1 1 auto; display: flex; align-items: baseline; justify-content: center;
  gap: 5px; color: #fff; align-self: center; min-width: 0;
}
#oprch-qdock .qd-mid b { font-size: 21px; font-weight: 900; }
#oprch-qdock .qd-mid span { font-size: 12.5px; font-weight: 700; opacity: .85; }
#oprch-qdock .qd-go {
  flex: 0 0 auto; min-height: 46px; padding: 0 17px; border: 0; border-radius: 11px;
  background: #fff; color: var(--oprch-c-d);
  font-size: 14.5px; font-weight: 900; cursor: pointer; white-space: nowrap;
}
#oprch-qdock .qd-go:disabled { opacity: .45; cursor: default; }
#oprch-qdock .qd-sub {
  pointer-events: none; margin: 7px 4px 0; font-size: 12.5px; font-weight: 700;
  color: var(--oprch-ink); background: rgba(255,255,255,.94); border-radius: 10px;
  padding: 7px 11px; display: inline-block;
  box-shadow: 0 4px 12px rgba(15,23,42,.16);
}

/* ============= R2.3 R-c — barre « Lancer l'itinéraire de prospection » ===== */
#oprch-route {
  flex: 0 0 auto; display: flex; align-items: stretch; gap: 9px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--oprch-surface); border-top: 1px solid var(--oprch-line);
  box-shadow: 0 -10px 24px rgba(15,23,42,.10);
}
#oprch-route[hidden] { display: none; }
.oprch-route-go {
  flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start;
  justify-content: center; gap: 1px;
  min-height: 54px; padding: 0 17px; border: 0; border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, var(--opsem-mission-color, var(--oprch-c)));
  color: #fff; cursor: pointer; text-align: left;
  box-shadow: var(--oprch-shadow-c);
}
.oprch-route-go .rt-n { font-size: 12px; font-weight: 700; opacity: .92; }
.oprch-route-go .rt-n b { font-size: 13px; font-weight: 900; }
.oprch-route-go .rt-lb { font-size: 15px; font-weight: 900; letter-spacing: .2px; }
.oprch-route-clr {
  flex: 0 0 auto; width: 54px; border: 1px solid var(--oprch-line); border-radius: 14px;
  background: #f8fafc; color: var(--oprch-ink-3); font-size: 18px; font-weight: 800; cursor: pointer;
}

/* desktop : panneau en colonne (la carte reste visible à droite) */
@media (min-width: 900px) {
  #oprch { right: auto; width: 432px; box-shadow: 10px 0 40px rgba(15,23,42,.14); }
  #oprch-go { left: 452px; right: auto; width: 360px; }
  #oprch-qdock { left: 452px; right: auto; width: 420px; }
}
