/* ════════════════════════════════════════
   MIKVEDEN — PAGE DE RÉSULTATS (s.php)
   Les cartes gardent le style d'origine (styles-s.css : .shadow-result, .overlay-gradient,
   .info1, .price…). Ce fichier n'ajoute que : titre + recherche sur la même ligne,
   pictos des services en ligne, distance, « Afficher plus », bandeaux du bas.
   Boutons : carrés arrondis, comme le reste du site.
   ════════════════════════════════════════ */

/* Le contenu ne passe plus sous l'ancien header fixe : on neutralise son décalage */
.search-page .mk-content-result { margin-top:0 !important; padding-top:26px !important; z-index:auto !important; position:relative; }

/* ── Ligne titre / recherche ──
   Le bouton (loupe ↔ croix) est ancré en bas à droite et la ligne garde la même hauteur
   ouverte ou fermée : le bouton ne bouge pas d'un pixel, le champ s'aligne exactement sur lui. */
.mk-res-head {
  --h-btn:52px; --gap:14px;
  position:relative; z-index:860;                 /* au-dessus du flou (850), sous le header (900) */
  display:flex; flex-direction:column; justify-content:flex-end;
  min-height:calc(var(--h-btn) + 34px);          /* = libellé + champ : hauteur identique dans les deux états */
  margin:0 0 10px; padding:0 calc(12px + var(--h-btn) + var(--gap)) 0 12px;
}
.mk-res-head-txt { min-width:0; }
.mk-res-head h1 {
  margin:0; font-family:var(--mk-serif); font-weight:400; color:var(--mk-teal);
  font-size:clamp(24px, 3vw, 34px); line-height:1.15; overflow-wrap:anywhere;
}
.mk-res-head p { margin:4px 0 0; font-size:13.5px; line-height:1.3; color:#7f8f8e; }

/* Libellé au-dessus du champ (même typographie que le titre, plus petite) */
.mk-slabel {
  display:none; margin:0 0 8px 4px; font-family:var(--mk-serif); font-weight:400;
  font-size:22px; line-height:26px; color:var(--mk-teal);
}

/* Bouton loupe / croix : même taille, même place */
.mk-sbtn {
  position:absolute; right:12px; bottom:0;
  width:var(--h-btn); height:var(--h-btn); border-radius:14px; border:0; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.mk-sbtn svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; }
.mk-sopen { background:var(--mk-rose); color:#fff; box-shadow:0 8px 20px rgba(183,110,121,.30); }
.mk-sopen:hover { box-shadow:0 10px 24px rgba(183,110,121,.42); }
.mk-sclose { display:none; background:#fff; color:var(--mk-teal); border:1px solid #eadfd5; box-shadow:0 8px 20px rgba(0,42,51,.08); }
.mk-sclose:hover { background:var(--mk-cream); }

/* États : le champ se superpose au titre (le titre garde sa place, invisible) → hauteur constante */
.mk-sfield {
  display:none; position:absolute; left:12px; bottom:0;
  right:calc(12px + var(--h-btn) + var(--gap)); min-width:0;
}
.mk-res-head.is-search .mk-res-head-txt { visibility:hidden; }
.mk-res-head.is-search .mk-sopen { display:none; }
.mk-res-head.is-search .mk-sfield { display:block; animation: mkSformIn .22s ease both; }
.mk-res-head.is-search .mk-slabel { display:block; }
.mk-res-head.is-search .mk-sclose { display:flex; animation: mkSformIn .22s ease both; }
@keyframes mkSformIn { from { opacity:0; } to { opacity:1; } }
/* Page sans recherche : titre puis champ, sans bouton ni libellé */
.mk-res-head.is-fixe { padding-right:12px; min-height:0; }
.mk-res-head.is-fixe .mk-res-head-txt { visibility:visible; margin-bottom:14px; }
.mk-res-head.is-fixe .mk-sfield { position:static; display:block; animation:none; }
.mk-res-head.is-fixe .mk-slabel { display:none; }

/* Champ : on garde le style d'origine (styles-s.css). On corrige seulement l'ancien
   comportement mobile : formulaire réduit à 0, et classe .onC au clic qui passait
   les icônes en blanc (picto invisible) et décalait le texte de 18 px. */
.mk-res-head form#search-form,
.mk-res-head form#search-form.onC,
.mk-res-head form#search-form input.searchText,
.mk-res-head form#search-form.onC input.searchText { width:100% !important; max-width:none !important; }
.mk-res-head form#search-form input.searchText,
.mk-res-head form#search-form.onC input.searchText { flex:1; min-width:0; margin-left:0 !important; font-size:16px; }
.mk-res-head form#search-form .search-box { margin:0 !important; border-radius:18px !important; }
.mk-res-head form#search-form .search-box button{ border-radius:14px !important; }
.mk-res-head form#search-form .pic-search,
.mk-res-head form#search-form.onC .pic-search { color:var(--mk-rose) !important; visibility:visible !important; opacity:1 !important; }
/* Liste des suggestions : toute la largeur du champ (elle était coincée à 40 px / 72 px des bords) */
.mk-res-head #result { left:0 !important; right:0 !important; top:calc(100% + 6px) !important; z-index:5; }
@media (max-width: 575px) {
  .mk-res-head #result, .mk-res-head #result li { font-size:14px; }
  .mk-res-head form#search-form input.searchText::placeholder { font-size:14px; }
}

@media (max-width: 575px) {
  .mk-res-head { --h-btn:46px; --gap:10px; min-height:calc(var(--h-btn) + 32px); }
  .mk-res-head h1 { font-size:24px; }
  .mk-slabel { font-size:20px; line-height:24px; }
  .mk-sbtn { border-radius:12px; }
  .mk-sbtn svg { width:20px; height:20px; }
}

/* Flou sur la page pendant la recherche */
.mk-sblur {
  position:fixed; inset:0; z-index:850;
  background:rgba(255,255,255,.5); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
  opacity:0; transition: opacity .25s ease;
}
.mk-sblur[hidden] { display:none; }
html.mk-search-open .mk-sblur { opacity:1; }


/* ── Cartes : style d'origine conservé ── */
.mk-content-result .result[hidden] { display:none !important; }
.mk-result-link { text-decoration:none !important; }
.mk-content-result .shadow-result .row { flex-wrap:nowrap; }
.mk-content-result .info1 { flex:1 1 auto; min-width:0; }
.mk-content-result .info2 { flex:0 0 auto; width:auto; max-width:none; }
.mk-content-result .price { white-space:nowrap; }   /* « 15 € » ne se coupe jamais */
.shadow-result.mk-noimg { background:linear-gradient(135deg, #b9a1a3 0%, #84a3a0 100%); }
.mk-content-result .result.is-new { animation: mkResIn .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes mkResIn { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }

/* Distance (en haut à droite) */
.mk-result-dist {
  position:absolute; z-index:99; top:14px; right:14px;
  display:inline-flex; align-items:center; gap:5px; padding:5px 11px; border-radius:999px;
  background:rgba(255,255,255,.88); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px);
  font-family:'Montserrat', sans-serif; font-size:12px; font-weight:600; color:var(--mk-teal);
  box-shadow:0 2px 10px rgba(0,0,0,.12);
}
.mk-result-dist i { font-size:10px; color:var(--mk-rose); }

/* Pictos des services en ligne (en haut à gauche) — infobulle au survol */
.mk-pics { position:absolute; z-index:99; top:14px; left:14px; display:flex; gap:6px; }
.mk-pic {
  position:relative; width:30px; height:30px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,117,141,.82); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px);
  box-shadow:0 2px 10px rgba(0,0,0,.15);
}
.mk-pic--don { background:rgba(183,110,121,.9); }
.mk-pic svg { width:16px; height:16px; fill:none; stroke:#fff; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.mk-pic--don svg { fill:#fff; stroke:none; width:15px; height:15px; }
.mk-pic::after {
  content:attr(data-tip); position:absolute; left:0; top:calc(100% + 8px); transform:translateY(-4px);
  padding:5px 9px; border-radius:8px; background:rgba(0,42,51,.92); color:#fff;
  font-family:'Montserrat', sans-serif; font-size:11.5px; font-weight:600; white-space:nowrap;
  opacity:0; pointer-events:none; transition: opacity .18s ease, transform .18s ease;
}
.mk-pic:hover::after { opacity:1; transform:none; }
@media (max-width: 575px) {
  .mk-pics { top:12px; left:12px; gap:5px; }
  .mk-pic { width:28px; height:28px; }
}

/* ── Afficher plus ── */
.mk-more { text-align:center; margin-top:30px; }
.mk-more-btn { background:#fff; color:var(--mk-rose); border:1px solid var(--mk-line); box-shadow:none; border-radius:14px; }
.mk-more-btn:hover { color:#fff; background:var(--mk-rose); }
.mk-more-n { font-weight:500; opacity:.8; }

/* ── Bandeau annuaire ── */
.mk-res-annu {
  display:flex; align-items:center; justify-content:space-between; gap:14px 20px; flex-wrap:wrap;
  margin:36px 12px 0; padding:18px 22px; border-radius:18px;
  background:linear-gradient(120deg, #e3f2f4 0%, #f4fafa 100%);
}
.mk-res-annu > div { display:flex; flex-direction:column; gap:2px; min-width:0; }
.mk-res-annu strong { color:var(--mk-teal); font-size:15px; }
.mk-res-annu span { color:#5f7f86; font-size:13px; }
.mk-res-annu-links { display:flex; flex-wrap:wrap; gap:8px; }
.mk-res-annu-links a {
  padding:9px 16px; border-radius:12px; background:#fff; border:1px solid #bfe0e5;
  font-size:13px; font-weight:600; color:var(--mk-teal) !important; text-decoration:none !important; white-space:nowrap;
}
.mk-res-annu-links a:hover { border-color:var(--mk-teal); }

/* ── Encart « votre mikvé n'apparaît pas » ── */
.mk-res-pro {
  display:flex; align-items:center; gap:16px; margin:14px 12px 0; padding:18px 22px;
  border-radius:18px; background:var(--mk-cream); border:1px dashed #ead9c6;
}
.mk-res-pro-ico {
  flex-shrink:0; width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:#fff; color:var(--mk-rose);
}
.mk-res-pro > div { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; font-size:13.5px; color:#7f8f8e; }
.mk-res-pro strong { color:var(--mk-teal); font-size:15px; }
.mk-res-pro-link { flex-shrink:0; white-space:nowrap; font-weight:600; color:var(--mk-rose) !important; }

@media (max-width: 575px) {
  .mk-res-annu, .mk-res-pro { margin-left:4px; margin-right:4px; padding:16px; }
  .mk-res-annu-links { width:100%; }
  .mk-res-annu-links a { flex:1; text-align:center; padding:9px 10px; }
  .mk-res-pro { display:grid; grid-template-columns:42px 1fr; gap:10px 14px; }
  .mk-res-pro > div { font-size:13px; }
  .mk-res-pro-link {
    grid-column:1 / -1; display:block; text-align:center; white-space:normal;
    padding:10px; border-radius:12px; background:#fff; border:1px solid var(--mk-line); text-decoration:none !important;
  }
}

/* ── État vide ── */
.mk-content-result .mk-empty { text-align:center; max-width:560px; margin:20px auto 0; color:#7f8f8e; }
.mk-empty-note a { color:var(--mk-rose); font-weight:600; }

@media (prefers-reduced-motion: reduce) {
  .mk-sblur, .mk-content-result .shadow-result, .mk-pic::after { transition:none; }
  .mk-content-result .result.is-new, .mk-res-head.is-search .mk-sfield { animation:none; }
}

/* Mesure de la hauteur du champ (invisible, le temps d'un calcul) */
.mk-res-head.is-mesure .mk-sfield { display:block; visibility:hidden; }