/* La recherche D2 (src/d2-recherche.js) : la palette ⌘K de la maquette D2-bureau au bureau, le plein écran de Plans au
 * téléphone. Mêmes jetons que le reste (src/jetons.css) : typo fine, rayons, verre, sans halo. */
.d2-r-loupe, .d2-r-esc, .d2-r-annuler { display: none; }
.suggestions .r-ic { display: none; }

/* ── bureau : la palette ── */
@media (min-width: 900px) {
  html.d2-on body.page-app > .haut.d2-palette .recherche { display: flex !important; flex-wrap: wrap; align-items: center; height: auto !important; min-height: 48px; padding: 0 !important; overflow: hidden; border-radius: var(--r-panneau) !important; background: var(--verre-plein) !important; box-shadow: 0 20px 50px rgba(0, 0, 0, .25), var(--verre-filet) !important; font-family: var(--police); }
  html.d2-on body.page-app > .haut.d2-palette .recherche:focus-within { box-shadow: 0 20px 50px rgba(0, 0, 0, .25), var(--verre-filet) !important; }
  html.d2-on body.page-app > .haut.d2-palette :is(.marque-mini, .raccourci, .coq-tiroir-carte) { display: none !important; }
  html.d2-on body.page-app > .haut.d2-palette .d2-r-loupe { display: grid; place-items: center; width: 40px; height: 48px; margin-left: 6px; color: var(--attenue); }
  html.d2-on body.page-app > .haut.d2-palette .d2-r-loupe svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
  html.d2-on body.page-app > .haut.d2-palette input[name="q"] { flex: 1; min-width: 0; height: 48px; padding: 0 !important; border: 0; background: none; color: var(--encre); font: 400 var(--t-15)/1 var(--police); letter-spacing: 0; }
  html.d2-on body.page-app > .haut.d2-palette input[name="q"]::placeholder { color: var(--discret); }
  html.d2-on body.page-app > .haut.d2-palette input[name="q"]::-webkit-search-cancel-button { -webkit-appearance: none; }
  html.d2-on body.page-app > .haut.d2-palette .d2-r-esc { display: inline-block; margin: 0 6px; padding: 2px 6px; border-radius: var(--r-pastille); background: var(--actif); color: var(--attenue); font: 500 var(--t-11)/1.3 var(--police); }
  html.d2-on body.page-app > .haut.d2-palette .recherche-avancee { width: 28px; height: 28px; margin-right: 10px; display: grid; place-items: center; border: 0; border-radius: var(--r-bouton); background: none; color: var(--attenue); }
  html.d2-on body.page-app > .haut.d2-palette .recherche-avancee:hover { background: var(--survol); color: var(--encre); }
  html.d2-on body.page-app > .haut.d2-palette .recherche-avancee svg { width: 15px; height: 15px; }
  html.d2-on body.page-app > .haut.d2-palette .suggestions { position: static !important; flex-basis: 100%; max-height: min(440px, calc(100vh - 220px)); overflow-y: auto; margin: 0; padding: 6px !important; border: 0 !important; border-top: 1px solid var(--filet) !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  html.d2-on body.page-app > .haut.d2-palette .suggestions-titre { padding: 8px 10px 4px !important; color: var(--attenue) !important; font: 500 var(--t-11)/1.3 var(--police) !important; letter-spacing: 0 !important; text-transform: none !important; }
  html.d2-on body.page-app > .haut.d2-palette .suggestions a { min-height: 34px !important; padding: 0 10px !important; gap: 10px !important; justify-content: flex-start !important; border-radius: var(--r-bouton) !important; color: var(--texte) !important; font: 400 var(--t-13)/1.35 var(--police) !important; }
  html.d2-on body.page-app > .haut.d2-palette .suggestions a:hover, html.d2-on body.page-app > .haut.d2-palette .suggestions [aria-selected="true"] a { background: var(--actif) !important; }
  html.d2-on body.page-app > .haut.d2-palette .suggestions a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--attenue); }
  html.d2-on body.page-app > .haut.d2-palette .suggestions a span b { color: var(--encre); font-weight: 500; }
  html.d2-on body.page-app > .haut.d2-palette .suggestions small { margin-left: auto; color: var(--discret) !important; font: 400 var(--t-12)/1 var(--police) !important; font-variant-numeric: tabular-nums; }
  html.d2-on body.page-app > .haut.d2-palette .suggestions .r-ic { display: block; flex: none; width: 15px; height: 15px; fill: none; stroke: var(--attenue); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
}

/* ── téléphone : la capsule au repos, le plein écran en recherche ── */
@media (max-width: 899.98px) {
  html.d2-tel body.page-app > .haut .recherche:focus-within { box-shadow: var(--d2-ombre) !important; }
  html.d2-tel body.page-app > .haut .recherche input[name="q"] { border: 0 !important; outline: 0; box-shadow: none !important; background: none !important; color: var(--encre); font: 400 16px/1 var(--police); }
  html.d2-tel body.page-app > .haut .recherche input[name="q"]::placeholder { color: var(--discret); }
  html.d2-tel body.page-app > .haut .recherche input[name="q"]::-webkit-search-cancel-button { -webkit-appearance: none; }
  html.d2-tel body.page-app > .haut .d2-r-loupe { display: grid; place-items: center; width: 26px; color: var(--attenue); }
  html.d2-tel body.page-app > .haut .d2-r-loupe svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

  html.d2-r-plein body.page-app > .haut { position: fixed !important; inset: 0 !important; z-index: 2400 !important; width: auto !important; padding: calc(var(--d2-sa-t, 0px) + 8px) 0 0 !important; background: var(--fond-app); }
  html.d2-r-plein body.page-app > .haut .recherche { display: flex !important; flex-wrap: wrap; align-items: center; height: auto !important; padding: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.d2-r-plein body.page-app > .haut .coq-tiroir-carte { display: none !important; }
  html.d2-r-plein body.page-app > .haut .d2-r-loupe { height: 40px; width: 34px; margin-left: 16px; padding-left: 10px; border-radius: 12px 0 0 12px; background: var(--actif); }
  html.d2-r-plein body.page-app > .haut .recherche input[name="q"] { flex: 1; min-width: 0; height: 40px; padding: 0 10px 0 4px !important; border-radius: 0 12px 12px 0 !important; background: var(--actif) !important; }
  html.d2-r-plein body.page-app > .haut .d2-r-annuler { display: block; height: 40px; padding: 0 16px 0 12px; border: 0; background: none; color: var(--encre); font: 400 16px/1 var(--police); }
  html.d2-r-plein body.page-app > .haut .suggestions { position: static !important; flex-basis: 100%; height: calc(100vh - var(--d2-sa-t, 0px) - 64px); height: calc(100dvh - var(--d2-sa-t, 0px) - 64px); overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 8px 0 0; padding: 0 0 24px !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  html.d2-r-plein body.page-app > .haut .suggestions-titre { padding: 14px 16px 6px !important; color: var(--attenue) !important; font: 500 var(--t-13)/1.3 var(--police) !important; letter-spacing: 0 !important; text-transform: none !important; }
  html.d2-r-plein body.page-app > .haut .suggestions li[role="option"] + li[role="option"] a::before { content: ""; position: absolute; left: 50px; right: 0; top: 0; border-top: 1px solid var(--filet); }
  html.d2-r-plein body.page-app > .haut .suggestions a { position: relative; min-height: 52px !important; padding: 6px 16px !important; gap: 12px !important; justify-content: flex-start !important; border-radius: 0 !important; color: var(--texte) !important; font: 400 var(--t-15)/1.3 var(--police) !important; }
  html.d2-r-plein body.page-app > .haut .suggestions a:active, html.d2-r-plein body.page-app > .haut .suggestions [aria-selected="true"] a { background: var(--actif) !important; }
  html.d2-r-plein body.page-app > .haut .suggestions a span { flex: 1; min-width: 0; color: var(--attenue); }
  html.d2-r-plein body.page-app > .haut .suggestions a span b { color: var(--encre); font-weight: 500; }
  html.d2-r-plein body.page-app > .haut .suggestions small { max-width: 40%; overflow: hidden; text-overflow: ellipsis; color: var(--discret) !important; font: 400 var(--t-13)/1.2 var(--police) !important; font-variant-numeric: tabular-nums; }
  html.d2-r-plein body.page-app > .haut .suggestions .r-ic { display: block; flex: none; width: 22px; height: 22px; padding: 4px; box-sizing: content-box; border-radius: 50%; background: var(--actif); fill: none; stroke: var(--attenue); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
  html.d2-r-plein :is(.d2-flottants, .d2-actions-tel, .d2-fiche, .d2-kp, .d2-frise, .d2-voile-tel, .coq) { visibility: hidden; }
}

/* le champ seul, sans l'anneau ni le cadre de l'ancienne barre */
html:is(.d2-on, .d2-tel) body.page-app > .haut .recherche input[name="q"], html:is(.d2-on, .d2-tel) body.page-app > .haut .recherche input[name="q"]:focus { margin: 0 !important; border: 0 !important; outline: 0 !important; box-shadow: none !important; -webkit-appearance: none; appearance: none; }
html.d2-r-plein body.page-app > .haut { top: 0 !important; bottom: 0 !important; height: 100vh !important; height: 100dvh !important; max-height: none !important; box-shadow: none !important; border-radius: 0 !important; }
html.d2-r-plein body.page-app > .haut .recherche { gap: 0 !important; }
