/* ============================================================
   MOTS-01 (27.10.2026) — recherche par mots-clés et fourchette de prix
   Champ « nom ou prestation » et « Budget » de la carte de /villes ; filtre « Prix » de /recherche et des pages métier.
   Chargé par pages/villes.php et pages/resultats.php (option « css » de gb_debut). Couleurs : celles de annuaire.css.
   ============================================================ */

/* ---------- Le panneau des prix (commun) ---------- */
.prix-panneau { --pp-a: 0; --pp-b: 1; display: grid; gap: 12px; }
.pp-titre { margin: 0; display: flex; flex-direction: column; gap: 2px; font-weight: 750; color: var(--encre); line-height: 1.3; }
.pp-titre small { font-weight: 500; font-size: .84rem; color: var(--muet); }
.pp-histo { display: flex; align-items: flex-end; gap: 2px; height: 64px; padding: 0 11px; }
.pp-histo span { flex: 1 1 0; min-width: 0; height: var(--h); min-height: 3px; border-radius: 4px 4px 1px 1px; background: var(--prune); opacity: .85; transition: background .15s, opacity .15s; }
.pp-histo span.hors { background: var(--ligne-forte); opacity: .75; }
.pp-curseurs { position: relative; height: 28px; margin-top: -8px; }
.pp-curseurs::before, .pp-curseurs::after { content: ""; position: absolute; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; pointer-events: none; }
.pp-curseurs::before { left: 11px; right: 11px; background: var(--ligne); }
.pp-curseurs::after { left: calc(11px + (100% - 22px) * var(--pp-a)); right: calc(11px + (100% - 22px) * (1 - var(--pp-b))); background: var(--prune); }
.pp-curseurs input[type="range"] { position: absolute; inset: 0; z-index: 1; width: 100%; height: 28px; margin: 0; padding: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.pp-curseurs input[type="range"]::-webkit-slider-runnable-track { height: 28px; background: none; border: 0; }
.pp-curseurs input[type="range"]::-moz-range-track { height: 28px; background: none; border: 0; }
.pp-curseurs input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: #fff; border: 2px solid var(--prune); box-shadow: 0 2px 6px rgb(36 29 33 / .25); cursor: grab; }
.pp-curseurs input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--prune); box-shadow: 0 2px 6px rgb(36 29 33 / .25); cursor: grab; }
.pp-curseurs input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; transform: scale(1.08); }
.pp-curseurs input[type="range"]:focus-visible { outline: none; }
.pp-curseurs input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--rose-doux), 0 2px 6px rgb(36 29 33 / .25); }
.pp-curseurs input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--rose-doux), 0 2px 6px rgb(36 29 33 / .25); }
.pp-bornes { display: flex; justify-content: space-between; margin: -6px 0 0; font-size: .8rem; color: var(--muet); }
.pp-valeurs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 10px; }
.pp-valeurs label { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 6px; min-width: 0; padding: 6px 12px 8px; border: 1px solid var(--ligne-forte); border-radius: var(--r-s); background: #fff; }
.pp-valeurs label:focus-within { border-color: var(--prune); box-shadow: 0 0 0 3px var(--rose-doux); }
.pp-valeurs label span { grid-column: 1 / -1; font-size: .76rem; font-weight: 650; color: var(--muet); }
.pp-valeurs input { min-width: 0; width: 100%; border: 0; padding: 2px 0; background: transparent; font: inherit; font-weight: 750; font-size: 1rem; color: var(--encre); outline: none; -moz-appearance: textfield; }
.pp-valeurs input::-webkit-outer-spin-button, .pp-valeurs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pp-valeurs em { font-style: normal; font-weight: 650; color: var(--muet); }
.pp-tiret { padding-bottom: 12px; color: var(--muet); }
.pp-sans { display: flex; align-items: flex-start; gap: 8px; font-size: .9rem; color: var(--encre-2); cursor: pointer; line-height: 1.35; }
.pp-sans input { margin: 2px 0 0; accent-color: var(--prune); width: 17px; height: 17px; flex: 0 0 auto; }
.pp-sans small { color: var(--muet); }
.pp-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pp-effacer { border: 0; background: none; padding: 0; color: var(--prune); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- /recherche et pages métier : le bouton « Prix » et son panneau sous la barre ---------- */
.filtre-prix .fp-euro { font-weight: 800; font-size: .85em; color: var(--prune); }
.filtre-prix.on .fp-euro { display: none; }   /* « jusqu'à 100 € » dit déjà la devise */
.filtre-prix .ic { width: 1em; height: 1em; }
.filtre-prix[aria-expanded="true"] .ic { transform: rotate(180deg); }
.prix-tiroir { display: none; position: absolute; z-index: 25; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: min(440px, calc(100vw - 2 * var(--gouttiere))); padding: 18px; background: #fff; border: 1px solid var(--ligne); border-radius: var(--r); box-shadow: var(--ombre-forte); }
.prix-tiroir.ouvert, .prix-tiroir:target { display: block; animation: pp-entree .18s ease-out; }
@keyframes pp-entree { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
/* ordinateur : calé sous le bouton « Prix » (position donnée par annuaire.js) */
.prix-tiroir.cale { left: var(--pt-x); transform: none; animation-name: pp-entree-cale; }
@keyframes pp-entree-cale { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* téléphone : une feuille qui monte du bas de l'écran, sur un voile (annuaire.js la pose dans <body>) */
.prix-tiroir.feuille { position: fixed; z-index: 96; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 88vh; max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  transform: none; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); border: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 34px rgb(36 29 33 / .22); animation-name: pp-feuille; animation-duration: .24s; }
.prix-tiroir.feuille::before { content: ""; display: block; width: 42px; height: 4px; margin: 0 auto 14px; border-radius: 4px; background: var(--ligne-forte); }
.prix-tiroir.feuille .pp-actions .bouton { flex: 1 1 auto; justify-content: center; min-height: 48px; }
@keyframes pp-feuille { from { transform: translateY(100%); } to { transform: none; } }
.pp-voile { position: fixed; inset: 0; z-index: 95; background: rgb(36 29 33 / .4); animation: pp-voile .2s ease-out; }
.pp-voile[hidden] { display: none; }
@keyframes pp-voile { from { opacity: 0; } to { opacity: 1; } }
html.pp-feuille-ouverte, html.pp-feuille-ouverte body { overflow: hidden; }
html.pp-feuille-ouverte .basculer-carte { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .prix-tiroir.ouvert, .prix-tiroir:target, .prix-tiroir.feuille, .pp-voile { animation: none; } .pp-histo span { transition: none; } }

/* ce que la recherche a compris (sous le titre) */
.mots-messages { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: .95rem; color: var(--encre-2); }
.mots-messages a { color: var(--prune); font-weight: 700; }
.mm-voisins { color: var(--muet); }

/* ---------- /villes : « nom ou prestation », budget, compte ---------- */
.autour-quoi { margin-bottom: 10px; }
/* la petite croix qui vide le champ : aux couleurs du site (au lieu du bleu du navigateur) */
.autour-champ input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin-left: 6px; cursor: pointer; color: var(--muet);
  background: linear-gradient(45deg, transparent 43%, currentColor 43%, currentColor 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, currentColor 43%, currentColor 57%, transparent 57%); }
.autour-champ input[type="search"]::-webkit-search-cancel-button:hover { color: var(--prune); }
.autour-quoi .suggestions { z-index: 31; }
.autour-prix { margin-top: 14px; background: #fff; border: 1px solid var(--ligne-forte); border-radius: var(--r-s); }
.autour-prix[hidden], .autour-compte[hidden] { display: none; }
.autour-prix > summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; cursor: pointer; font-weight: 650; color: var(--encre); }
.autour-prix > summary::-webkit-details-marker { display: none; }
.autour-prix > summary b { margin-left: auto; color: var(--prune); font-weight: 750; }
.autour-prix > summary .ic { color: var(--muet); }
.autour-prix[open] > summary .ic { transform: rotate(180deg); }
.autour-prix.on { border-color: var(--prune); box-shadow: 0 0 0 3px var(--rose-doux); }
.prix-panneau-carte { padding: 2px 16px 16px; }
.autour-compte { margin: 12px 0 0; padding: 10px 14px; border-radius: var(--r-s); background: var(--rose-doux); color: var(--encre-2); font-size: .92rem; line-height: 1.4; }
.autour-compte b { color: var(--prune-fonce); }
.autour-compte small { display: block; margin-top: 2px; color: var(--muet); }
.autour.filtre-charge .autour-carte-in { opacity: .6; transition: opacity .2s; }
.al-texte .al-soin { color: var(--prune); font-weight: 650; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.al-notes { display: block; margin-top: 4px; font-size: .88rem; color: var(--muet); }
.al-lien { border: 0; background: none; padding: 0; color: var(--prune); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
