/* ============================================================
   Page /services — répertoire des professionnels auto
   ============================================================ */

/* ---- Variables ---- */
:root {
  --sv-navy:  #0B1F3A;
  --sv-navy2: #132d52;
  --sv-blue:  #2A6FCC;
  --sv-blue2: #4585db;
  --sv-blue3: #e8f1fb;
  --sv-g50:   #f7f8fa;
  --sv-g100:  #eef0f4;
  --sv-g200:  #dde1ea;
  --sv-g400:  #9aa3b8;
  --sv-g600:  #636d85;
  --sv-g900:  #111827;
  --sv-green: #22c55e;
  --sv-amber: #f59e0b;
  --sv-r:     10px;
  --sv-rl:    14px;
  --sv-sd:    0 1px 4px rgba(11,31,58,.07);
  --sv-sm:    0 4px 18px rgba(11,31,58,.11);
  --sv-sl:    0 10px 40px rgba(11,31,58,.18);
}

/* Cette feuille n'est chargée que sur /services :
   protège Chrome Android contre tout débordement horizontal résiduel */
html, body {
  overflow-x: hidden;
}

/* ============================================================
   TOPBAR : recherche + chips + tri
   ============================================================ */
.sv-topbar {
  background: #fff;
  border-bottom: 1px solid var(--sv-g200);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  /* clip empêche tout overflow horizontal sans créer de scroll container
     (contrairement à overflow:hidden qui casse position:fixed sur Android) */
  overflow-x: clip;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--sv-sd);
}
/* Sur mobile le sv-page-wrap n'est pas overflow:hidden donc sticky marche.
   Le wrapper débute sous le header fixe : top:0 colle en haut du wrapper. */
@media (max-width: 991.98px) {
  .sv-topbar { top: 0; }
}

.sv-search-wrap {
  position: relative;
  /* flex:1 → occupe tout l'espace libre sans déborder */
  flex: 1 1 0;
  min-width: 0;
  max-width: 260px;
}
/* Autocomplétion communes (geo.api.gouv.fr) */
.sv-search-dd {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 400;
  background: #fff;
  border: 1px solid var(--sv-g200);
  border-radius: var(--sv-r);
  box-shadow: var(--sv-sm);
  max-height: min(280px, 42vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sv-search-dd-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--sv-g100);
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  color: var(--sv-navy);
  transition: background 0.12s;
}
.sv-search-dd-item:last-child {
  border-bottom: none;
}
.sv-search-dd-item:hover,
.sv-search-dd-item:focus-visible {
  background: var(--sv-blue3);
  outline: none;
}
.sv-search-dd-main {
  font-weight: 700;
}
.sv-search-dd-meta {
  font-size: 11px;
  color: var(--sv-g400);
  font-weight: 500;
}
.sv-search-wrap input {
  width: 100%;
  height: 38px;
  padding: 0 10px 0 32px;
  border: 1.5px solid var(--sv-g200);
  border-radius: var(--sv-r);
  font-size: 13px;
  background: var(--sv-g50);
  outline: none;
  transition: border-color .15s;
}
.sv-search-wrap input:focus { border-color: var(--sv-blue); background: #fff; }
.sv-search-wrap input::placeholder { color: var(--sv-g400); }
.sv-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--sv-g400);
  pointer-events: none;
}

.sv-sort {
  height: 38px;
  padding: 0 8px;
  border: 1.5px solid var(--sv-g200);
  border-radius: var(--sv-r);
  font-size: 12px;
  color: var(--sv-g600);
  background: #fff;
  cursor: pointer;
  outline: none;
  flex: 0 0 auto;       /* taille naturelle, mais ne déborde pas */
  max-width: 130px;
}
@media (max-width: 575.98px) {
  .sv-sort { max-width: 110px; font-size: 11px; }
}

/* ============================================================
   WRAPPER PAGE — desktop full-viewport
   ============================================================ */
.sv-page-wrap {
  display: flex;
  flex-direction: column;
  /* Desktop: laisse respirer la page (pas de compression de la liste) */
  min-height: calc(100vh - var(--site-header-height, 68px));
  height: auto;
  overflow: visible;
}
.sv-page-title { flex-shrink: 0; }

/* En-tête hero (réf. « déjà utilisé autour de vous ») */
.sv-hero {
  padding: 10px 16px 14px;
  flex-shrink: 0;
}
.sv-hero-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sv-blue);
  margin: 0 0 4px;
}
.sv-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--sv-navy);
  margin: 0 0 6px;
  line-height: 1.2;
}
.sv-hero-lead {
  font-size: 13px;
  color: var(--sv-g600);
  margin: 0;
  max-width: 52ch;
  line-height: 1.45;
}

@media (max-width: 991.98px) {
  .sv-page-wrap {
    height: auto;
    overflow: visible;
    overflow-x: clip;
    /* Réserve l'espace pour la barre de navigation mobile en bas */
    padding-bottom: 5.5rem;
  }
}

/* ============================================================
   BARRE CATÉGORIES — carrousel horizontal (maquette temp/)
   ============================================================ */
.sv-categories-bar {
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--sv-g200);
  padding: 0 12px;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.sv-cat-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 0 10px;
}
.sv-cat-scroll::-webkit-scrollbar { display: none; }
.sv-cat-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  padding-bottom: 1px;
}

/* Pont entre en-têtes (hero, recherche, catégories) et la grille : en desktop
   c’est le seul enfant flex:1 de .sv-page-wrap — hauteur résolue pour la grille. */
.sv-main-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
}
.sv-main-stage > .sv-layout {
  flex: 1 1 0%;
  min-height: 0;
}

/* ============================================================
   LAYOUT — desktop : colonne cartes | carte (principale)
   Mobile : pile verticale ; carte en tiroir plein écran (FAB)
   ============================================================ */
.sv-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(320px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: 'cards map';
  gap: 12px;
  overflow: hidden;
  align-items: stretch;
  padding: 0 12px;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.sv-cards-col {
  grid-area: cards;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--sv-g200);
  border-radius: 12px;
}
@media (max-width: 991.98px) {
  .sv-main-stage {
    flex: none;
  }
  .sv-main-stage > .sv-layout {
    flex: none;
  }
  .sv-layout {
    display: flex;
    flex-direction: column;
    flex: none;
    height: auto;
    min-height: 0;
    overflow-y: visible;
    overflow-x: clip;
    grid-template-columns: unset;
    grid-template-rows: unset;
    grid-template-areas: unset;
    gap: 0;
    padding: 0;
  }
  .sv-cards-col {
    max-height: none;
    overflow: visible;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* ============================================================
   Desktop /services — APPROCHE EXPLICITE
   On ne s’appuie plus sur la chaîne flex/grid héritée (fragile :
   un seul maillon avec overflow:hidden + max-height:100% suffisait
   à clipper les colonnes).
   À la place : hauteur calculée directement sur les colonnes, et
   on libère totalement les ancêtres (height/overflow). Le footer
   passe sous la zone si l’écran est court — c’est volontaire.
   ============================================================ */
@media (min-width: 992px) {

  /* — Ancêtres : on neutralise tout ce qui pouvait écraser la hauteur — */
  body.page-services main.site-main,
  body.page-services main.site-main > .sv-page-root,
  body.page-services main.site-main > .sv-page-root > .sv-page-wrap,
  body.page-services .sv-main-stage {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* — Bandeaux compacts pour gagner de la hauteur utile — */
  body.page-services .sv-hero          { padding: 6px 16px 8px; }
  body.page-services .sv-hero-title    { font-size: 1.2rem; margin-bottom: 4px; }
  body.page-services .sv-hero-lead     { font-size: 12px;   margin-bottom: 0;  }
  body.page-services .sv-topbar        { padding: 6px 12px; }
  body.page-services .sv-categories-bar .sv-cat-scroll { padding: 4px 0 6px; }

  /* — Grille : on l’aligne sur la hauteur des deux colonnes — */
  body.page-services .sv-layout {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    grid-template-rows: auto !important;
    align-items: stretch;
  }

  /* — HAUTEUR EXPLICITE des deux colonnes —
     Base = 100dvh − 220 (chrome) ; + 20 % sur demande utilisateur.
     Sur 1080p → ~1030 px. Sur 1440p → ~1465 px. Sur 13" (~800p) → ~700 px.
     La page scrolle naturellement si la zone dépasse la fenêtre. */
  body.page-services .sv-cards-col,
  body.page-services .sv-map-wrap {
    height: calc((100vh - 220px) * 1.2) !important;
    min-height: calc((100vh - 220px) * 1.2) !important;
    max-height: calc((100vh - 220px) * 1.2) !important;
    align-self: stretch;
  }
  @supports (height: 100dvh) {
    body.page-services .sv-cards-col,
    body.page-services .sv-map-wrap {
      height: calc((100dvh - 220px) * 1.2) !important;
      min-height: calc((100dvh - 220px) * 1.2) !important;
      max-height: calc((100dvh - 220px) * 1.2) !important;
    }
  }
  /* Pour positionner les boutons de scroll de la liste */
  body.page-services .sv-cards-col {
    position: relative;
  }

  /* — Carte interne : remplir le wrapper (flex column) — */
  body.page-services .sv-map-wrap {
    position: relative !important;
    top: auto !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body.page-services .sv-map-panel {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body.page-services #sv-map {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
  }
  body.page-services .sv-map-cta { flex-shrink: 0; }

  body.page-services .sv-panel-hd { padding: 6px 12px; }
}

body.sv-map-drawer-active {
  overflow: hidden;
  touch-action: none;
}
/* Verrou de scroll quand le modal détail est ouvert : empêche la page
   sous-jacente de défiler. On évite `touch-action: none` qui bloquait
   le scroll natif du body interne du modal sur iOS Safari. */
body.sv-modal-open {
  overflow: hidden;
}

/* ============================================================
   INDICATEURS DE SCROLL — colonne de gauche
   Deux pastilles flottantes (chevron haut & bas) + dégradés blancs
   en haut/bas de la liste pour signaler qu’il reste du contenu.
   ============================================================ */
.sv-list-scroll-btn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--sv-g200);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(11, 31, 58, 0.18);
  cursor: pointer;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--sv-navy);
  transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.14s, box-shadow 0.18s;
  opacity: 0.94;
}
.sv-list-scroll-btn:hover {
  background: var(--sv-blue);
  border-color: var(--sv-blue);
  color: #fff;
  box-shadow: 0 8px 22px rgba(42, 111, 204, 0.32);
}
.sv-list-scroll-btn:focus-visible {
  outline: 2px solid var(--sv-blue);
  outline-offset: 2px;
}
.sv-list-scroll-btn:active {
  transform: translateX(-50%) scale(0.94);
}
.sv-list-scroll-btn[hidden] {
  display: none !important;
}
.sv-list-scroll-btn--up {
  top: 56px;
}
.sv-list-scroll-btn--down {
  bottom: 14px;
  animation: sv-pulse-down 1.8s ease-in-out infinite;
}
.sv-list-scroll-btn--down:hover,
.sv-list-scroll-btn--down:focus-visible {
  animation: none;
}
@keyframes sv-pulse-down {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(3px); }
}

/* Dégradés haut/bas : effet « il y a plus de contenu » sur la liste. */
.sv-list-fade {
  position: absolute;
  left: 1px;
  right: 1px;
  height: 28px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.sv-list-fade--top {
  top: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.95), rgba(255,255,255,0));
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.sv-list-fade--bottom {
  bottom: 1px;
  background: linear-gradient(to top, rgba(255,255,255,0.95), rgba(255,255,255,0));
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}
.sv-cards-col.is-scrollable-up    .sv-list-fade--top    { opacity: 1; }
.sv-cards-col.is-scrollable-down  .sv-list-fade--bottom { opacity: 1; }

/* Ces commandes ne servent que sur desktop (la liste mobile flue dans la page). */
@media (max-width: 991.98px) {
  .sv-list-scroll-btn,
  .sv-list-fade {
    display: none !important;
  }
}

/* ============================================================
   CHIPS CATÉGORIES (grille historique retirée → piste horizontale)
   ============================================================ */
.sv-cat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 3px;
  border-radius: 8px;
  cursor: pointer;
  border: 1.5px solid var(--sv-g200);
  background: #fff;
  text-align: center;
  min-width: 0;
  outline: none;
  transition:
    transform .18s cubic-bezier(.2,.7,.2,1),
    box-shadow .18s cubic-bezier(.2,.7,.2,1),
    background-color .14s ease,
    border-color .14s ease,
    color .14s ease;
}
.sv-cat:hover {
  border-color: var(--sv-blue);
  background: var(--sv-blue3);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11,31,58,.08);
}
.sv-cat:hover .sv-cat-icon { color: var(--sv-blue); }
.sv-cat:active { transform: translateY(0) scale(.97); box-shadow: 0 1px 2px rgba(11,31,58,.06); }
.sv-cat:focus-visible {
  outline: 2px solid var(--sv-blue);
  outline-offset: 2px;
  border-color: var(--sv-blue);
}

/* État sélectionné : fill brand + check discret en coin haut-droit */
.sv-cat.on {
  border-color: var(--sv-blue);
  background: var(--sv-blue3);
  box-shadow:
    0 0 0 2px rgba(42,111,204,.18),
    0 4px 10px rgba(42,111,204,.12);
}
.sv-cat.on .sv-cat-icon  { color: var(--sv-blue); }
.sv-cat.on .sv-cat-label { color: var(--sv-blue); }
.sv-cat.on:not(.sv-cat--chip)::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sv-blue);
  box-shadow:
    0 0 0 2px #fff,
    0 1px 2px rgba(11,31,58,.2);
  /* mini-tick en SVG data-uri, blanc centré */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6.5l2 2 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
  transform: scale(0);
  animation: sv-cat-pop .22s cubic-bezier(.2,.8,.2,1.2) forwards;
}
@keyframes sv-cat-pop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
/* Préférence système "reduce motion" */
@media (prefers-reduced-motion: reduce) {
  .sv-cat, .sv-cat:hover, .sv-cat:active,
  .sv-pro, .sv-pro:hover, .sv-pro:active { transition: none; transform: none; }
  .sv-cat.on:not(.sv-cat--chip)::after { animation: none; transform: scale(1); }
}

/* Icônes SVG de catégories — héritent de color:, animation douce */
.sv-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 2px;
  color: var(--sv-navy);
  transition: color .14s ease, transform .14s ease;
}
.sv-cat-icon .sv-ico,
.sv-cat-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  overflow: visible;
}

.sv-cat-label { font-size: 9px; font-weight: 700; color: var(--sv-g600); text-transform: uppercase; letter-spacing: .4px; line-height: 1.2; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.sv-cat.on .sv-cat-label { color: var(--sv-blue); }
.sv-cat-count { font-size: 9px; color: var(--sv-g400); background: var(--sv-g100); padding: 1px 5px; border-radius: 8px; }

/* Chips carrousel (pilules une ligne) */
.sv-cat.sv-cat--chip {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 11px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 0;
  border-width: 1.5px;
}
.sv-cat.sv-cat--chip:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.08);
}
.sv-cat.sv-cat--chip:active { transform: scale(0.98); }
.sv-cat.sv-cat--chip .sv-cat-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 0;
}
.sv-cat.sv-cat--chip .sv-cat-icon .sv-ico,
.sv-cat.sv-cat--chip .sv-cat-icon svg {
  width: 17px;
  height: 17px;
}
.sv-cat.sv-cat--chip .sv-cat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--sv-g900);
  max-width: none;
}
.sv-cat.sv-cat--chip .sv-cat-count {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
}
.sv-cat.sv-cat--chip.on {
  background: var(--sv-blue);
  border-color: var(--sv-blue);
  color: #fff;
  box-shadow: 0 2px 10px rgba(42, 111, 204, 0.35);
}
.sv-cat.sv-cat--chip.on .sv-cat-icon,
.sv-cat.sv-cat--chip.on .sv-cat-label { color: #fff; }
.sv-cat.sv-cat--chip.on .sv-cat-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* Icône SVG utilitaire (liste, modal, marqueur carte) */
.sv-ico { display: block; stroke: currentColor; fill: none; }

/* En-tête résultats */
.sv-panel-hd {
  padding: 8px 14px;
  border-bottom: 1px solid var(--sv-g100);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sv-panel-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--sv-navy);
}
.sv-panel-count em { color: var(--sv-blue); font-style: normal; }
.sv-panel-sub { font-size: 11px; color: var(--sv-g400); }
.sv-btn-locate {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1.5px solid var(--sv-g200);
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: var(--sv-g600);
  cursor: pointer;
  white-space: nowrap;
  transition: all .14s;
  flex-shrink: 0;
}
.sv-btn-locate:hover { border-color: var(--sv-blue); color: var(--sv-blue); }

/* Liste des services — colonne unique à côté de la carte */
.sv-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  border-top: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--sv-g200) transparent;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 992px) {
  .sv-list {
    border-top: 1px solid var(--sv-g100);
    margin-top: 0;
    padding-top: 10px;
  }
}
.sv-list::-webkit-scrollbar { height: 4px; width: 4px; }
.sv-list::-webkit-scrollbar-thumb { background: var(--sv-g200); border-radius: 4px; }

/* Sur mobile : colonne unique, hauteur limitée */
@media (max-width: 991.98px) {
  .sv-list {
    max-height: 52vh;
    background-color: transparent;
    border-top: 1px solid var(--sv-g100);
    min-height: 0;
    padding: 8px 10px 12px;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateZ(0);
  }
}

/* Carte de service */
.sv-pro {
  padding: 14px 15px;
  background: #fff;
  cursor: pointer;
  display: flex;
  gap: 10px;
  border: 1px solid var(--sv-g200);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(11,31,58,.06);
  outline: none;
  transition:
    transform .2s cubic-bezier(.2,.7,.2,1),
    box-shadow .2s cubic-bezier(.2,.7,.2,1),
    border-color .14s ease,
    background-color .14s ease;
}
.sv-pro:hover {
  border-color: var(--sv-blue);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(11,31,58,.10), 0 2px 6px rgba(11,31,58,.06);
}
.sv-pro:active { transform: translateY(0) scale(.995); }
.sv-pro:focus-visible { outline: 2px solid var(--sv-blue); outline-offset: 2px; }
.sv-pro.sel {
  border-color: var(--sv-blue);
  background: linear-gradient(180deg, var(--sv-blue3) 0%, #fff 60%);
  box-shadow: 0 0 0 2px rgba(42,111,204,.15), 0 6px 18px rgba(42,111,204,.12);
}
.sv-pro.sel .sv-pro-avatar,
.sv-pro.sel .sv-pro-media { box-shadow: 0 4px 12px rgba(11,31,58,.25), inset 0 1px 0 rgba(255,255,255,.22); }

/* Sur mobile : séparateurs de lignes */
@media (max-width: 991.98px) {
  .sv-pro {
    border: none;
    border-bottom: 1px solid var(--sv-g100);
    border-radius: 0;
    box-shadow: none;
  }
  .sv-pro.sel { border-left: 3px solid var(--sv-blue); padding-left: 10px; }
}

.sv-pro-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(11,31,58,.18), inset 0 1px 0 rgba(255,255,255,.18);
}
.sv-pro-avatar .sv-ico,
.sv-pro-avatar svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  stroke-width: 1.7;
  fill: none;
}

/* Carte sans photo : picto type sobre */
.sv-pro-avatar.sv-pro-avatar--type {
  background: var(--sv-g100);
  color: var(--sv-navy);
  box-shadow: inset 0 0 0 1px var(--sv-g200);
}
.sv-pro-avatar.sv-pro-avatar--type .sv-ico,
.sv-pro-avatar.sv-pro-avatar--type svg {
  stroke: currentColor;
  color: inherit;
}

/* Vignette photo (upload ou Google) */
.sv-pro-media {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(11,31,58,.14);
  background: var(--sv-g100);
}
.sv-pro-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sv-pro-body { flex: 1; min-width: 0; }

.sv-pro-row1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.sv-pro-name { font-size: 13px; font-weight: 700; color: var(--sv-navy); line-height: 1.25; }
.sv-pro-dist { font-size: 11px; color: var(--sv-g400); flex-shrink: 0; margin-top: 1px; }

.sv-pro-row2 { display: flex; align-items: center; gap: 5px; margin-top: 2px; flex-wrap: wrap; }
.sv-pro-type {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--sv-g100);
  color: var(--sv-g600);
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}
.sv-pro-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--sv-g600);
}
.sv-pro-star { color: #f59e0b; font-size: 10px; }
.sv-pro-city { font-size: 11px; color: var(--sv-g400); }

.sv-pro-desc {
  font-size: 12px;
  color: var(--sv-g600);
  margin-top: 4px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sv-pills {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.sv-pill {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--sv-blue3);
  color: var(--sv-blue);
  font-weight: 500;
  border: 1px solid #c7dcf5;
  white-space: nowrap;
}

@media (max-width: 991.98px) {
  .sv-pills {
    gap: 2px;
    margin-top: 3px;
  }
  .sv-pill {
    font-size: 8px;
    padding: 1px 5px;
    border-radius: 10px;
    border-width: 1px;
  }
}

.sv-pro-actions { display: flex; gap: 5px; margin-top: 7px; }
.sv-btn-profil {
  flex: 1;
  height: 29px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  background: var(--sv-blue);
  color: #fff;
  transition: background .14s;
}
.sv-btn-profil:hover { background: var(--sv-blue2); }
.sv-btn-tel {
  height: 29px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1.5px solid var(--sv-g200);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  color: var(--sv-g600);
  transition: all .14s;
  white-space: nowrap;
}
.sv-btn-tel:hover { border-color: var(--sv-navy); color: var(--sv-navy); }

/* Cartes compactes dans la colonne « rail » */
.sv-pro.sv-pro--rail {
  padding: 8px 10px;
  gap: 8px;
}
/* Mise en avant (abonnement répertoire) */
.sv-pro.sv-pro--boost {
  border: 1.5px solid var(--sv-amber);
  border-radius: calc(var(--sv-r) + 2px);
  box-shadow: 0 2px 14px rgba(245, 158, 11, 0.22);
  background: linear-gradient(145deg, #fffef6 0%, #fff 55%);
}
.sv-partner-pill {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 5px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  vertical-align: middle;
  line-height: 1.2;
}
.sv-partner-pill--lg {
  font-size: 11px;
  padding: 3px 9px;
  margin-left: 8px;
}
.sv-pro-row1 .sv-pro-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.sv-modal-name .sv-partner-pill--lg {
  margin-left: 0;
  margin-top: 4px;
  display: inline-block;
}
.sv-pro.sv-pro--rail .sv-pro-media {
  width: 44px;
  height: 44px;
}
.sv-pro.sv-pro--rail .sv-pro-avatar {
  width: 40px;
  height: 40px;
}
.sv-pro.sv-pro--rail .sv-pro-avatar .sv-ico,
.sv-pro.sv-pro--rail .sv-pro-avatar svg {
  width: 21px;
  height: 21px;
}
@media (max-width: 991.98px) {
  .sv-pro.sv-pro--rail .sv-pro-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
/* Desktop : masquer description et pastilles pour voir plus de fiches à l’écran */
@media (min-width: 992px) {
  .sv-pro.sv-pro--rail .sv-pro-desc,
  .sv-pro.sv-pro--rail .sv-pills {
    display: none;
  }
  .sv-pro.sv-pro--rail .sv-pro-actions {
    margin-top: 4px;
  }
  .sv-pro.sv-pro--rail .sv-btn-profil {
    height: 26px;
    font-size: 11px;
  }
  .sv-pro.sv-pro--rail .sv-btn-tel {
    height: 26px;
    font-size: 11px;
    padding: 0 8px;
  }
}

@media (max-width: 991.98px) {
  .sv-page-root,
  .sv-page-wrap,
  .sv-main-stage,
  .sv-layout,
  .sv-cards-col,
  .sv-list,
  .sv-topbar,
  .sv-categories-bar {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  .sv-layout,
  .sv-cards-col,
  .sv-list {
    overflow-x: hidden;
  }
  .sv-topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .sv-panel-hd {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .sv-panel-hd > div {
    min-width: 0;
    flex: 1 1 150px;
  }
  .sv-btn-locate {
    flex: 1 1 auto;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
  }
  .sv-search-wrap {
    width: auto;
    max-width: none;
    min-width: 0;
  }
  .sv-sort {
    min-width: 0;
    max-width: 100%;
  }
  .sv-pro {
    padding-left: 12px;
    padding-right: 12px;
    max-width: 100%;
  }
  .sv-pro-row1,
  .sv-pro-row2,
  .sv-pro-body {
    min-width: 0;
    max-width: 100%;
  }
  .sv-pro-row2 {
    gap: 4px;
  }
  .sv-pro-name {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .sv-pro-dist {
    max-width: 42%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .sv-pro-type {
    white-space: normal;
    line-height: 1.2;
    max-width: 100%;
  }
  .sv-pro-rating,
  .sv-pro-city {
    min-width: 0;
    max-width: 100%;
  }
  .sv-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
  }
  .sv-pro-actions {
    gap: 4px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
  }
  .sv-btn-profil {
    min-width: 0;
    font-size: 11px;
    width: 100%;
  }
  .sv-btn-tel {
    font-size: 11px;
    padding: 0 8px;
    min-width: 0;
    white-space: normal;
    max-width: 100%;
  }
}

.sv-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--sv-g400);
  font-size: 13px;
}

/* ============================================================
   CARTE
   ============================================================ */
.sv-map-wrap {
  grid-area: map;
  position: relative;
  background: #fff;
  border: 1px solid var(--sv-g200);
  border-radius: 12px;
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* Bloc intermédiaire : seule zone extensible entre chrome carte et CTA (Leaflet sur #sv-map). */
.sv-map-panel {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}
/* Desktop : plus de sticky sur la carte — la ligne grille + flex interne fixent la hauteur. */
@media (max-width: 991.98px) {
  .sv-map-wrap {
    position: fixed;
    inset: 0;
    z-index: 260;
    border: none;
    border-radius: 0;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    box-shadow: -8px 0 32px rgba(11, 31, 58, 0.18);
  }
  .sv-map-wrap.sv-map-drawer-open {
    transform: translateX(0);
  }
}
.sv-map-drawer-close {
  display: none;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 820;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: #fff;
  box-shadow: var(--sv-sm);
  font-size: 18px;
  line-height: 1;
  color: var(--sv-navy);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
@media (max-width: 991.98px) {
  .sv-map-drawer-close {
    display: flex;
  }
}
.sv-map-fab {
  display: none;
  position: fixed;
  bottom: calc(5.5rem + 14px);
  right: 16px;
  z-index: 190;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: var(--sv-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--sv-sl);
}
.sv-map-fab i { font-size: 14px; opacity: 0.9; }
@media (max-width: 991.98px) {
  .sv-map-fab {
    display: inline-flex;
  }
}
@media (min-width: 992px) {
  .sv-map-fab {
    display: none !important;
  }
}
#sv-map {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  height: auto;
  z-index: 1;
}

/* Filtre gris global sur la carte */
#sv-map .leaflet-tile-pane {
  filter: grayscale(1) contrast(0.95) brightness(1.02);
}

@media (max-width: 991.98px) {
  .sv-map-wrap { min-height: 0; }
  #sv-map {
    flex: 1 1 0%;
    min-height: 0;
    height: auto;
  }
}
.sv-map-locate-btn {
  position: absolute;
  bottom: 24px;
  right: 12px;
  z-index: 800;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: none;
  background: #fff;
  box-shadow: var(--sv-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--sv-navy);
  cursor: pointer;
  transition: background .14s;
}
.sv-map-locate-btn:hover { background: var(--sv-g50); }

/* CTA carte */
.sv-map-cta {
  position: absolute;
  bottom: 24px;
  left: 16px;
  z-index: 800;
  background: var(--sv-navy);
  color: #fff;
  padding: 14px 16px;
  border-radius: var(--sv-rl);
  box-shadow: var(--sv-sl);
  max-width: 210px;
}
@media (max-width: 991.98px) { .sv-map-cta { display: none; } }
.sv-map-cta strong { font-size: 13px; font-weight: 700; display: block; margin-bottom: 3px; }
.sv-map-cta p { font-size: 11px; color: rgba(255,255,255,.6); line-height: 1.5; margin: 0 0 8px; }
.sv-map-cta-btn {
  display: block;
  width: 100%;
  height: 31px;
  background: var(--sv-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .14s;
  text-align: center;
  line-height: 31px;
  text-decoration: none;
}
.sv-map-cta-btn:hover { background: var(--sv-blue2); color: #fff; }

/* ============================================================
   POPUP LEAFLET
   ============================================================ */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  padding: 0 !important;
  box-shadow: var(--sv-sl) !important;
  overflow: hidden;
  border: 1px solid var(--sv-g200) !important;
}
.leaflet-popup-content { margin: 0 !important; }

.sv-popup {
  padding: 13px 15px;
  min-width: 200px;
  font-family: inherit;
}
.sv-popup-name { font-size: 13px; font-weight: 700; color: var(--sv-navy); }
.sv-popup-type { font-size: 11px; color: var(--sv-g400); margin-top: 2px; }
.sv-popup-rating { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--sv-g600); margin-top: 5px; }
.sv-popup-star  { color: #f59e0b; }
.sv-popup-btn {
  display: block;
  width: 100%;
  height: 29px;
  background: var(--sv-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  margin-top: 9px;
  transition: background .14s;
}
.sv-popup-btn:hover { background: var(--sv-blue2); }

/* ============================================================
   MODAL — pop-up détail (depuis « Voir le profil » de la popup carte)
   Overlay positionné ENTRE les barres de navigation (haut + bas mobile)
   pour que le modal ne soit jamais coupé par celles-ci.
   Tailles dimensionnées pour rester dans la zone visible.
   ============================================================ */
.sv-overlay {
  display: none;
  position: fixed;
  /* Top sous le bandeau fixe (68 px mobile, 88 px desktop via media). */
  top: var(--site-header-height, 68px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: rgba(11, 31, 58, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 992px) {
  .sv-overlay { top: var(--site-header-height, 88px); }
}
/* Mobile / tablette : on remonte le bas pour ne pas couvrir la pc-bottom-nav (5.5rem ≈ 88 px). */
@media (max-width: 991.98px) {
  .sv-overlay { bottom: 5.5rem; }
}
.sv-overlay.open {
  display: flex;
  /* `safe center` : centré quand le modal tient, sinon collé au début de l'overlay
     pour que le haut reste accessible (au lieu de sortir au-dessus). */
  align-items: safe center;
  justify-content: center;
  padding: 20px 20px;
}

.sv-modal {
  background: #fff;
  border-radius: var(--sv-rl);
  /* −12 % en largeur par rapport à la version précédente */
  width: min(600px, 100%);
  /* −30 % en hauteur : 530 px de plafond pixel, calage sur la zone overlay sinon. */
  max-height: min(calc(100vh - 40px), 530px);
  box-shadow: 0 18px 48px rgba(11, 31, 58, 0.30), 0 4px 14px rgba(11, 31, 58, 0.16);
  animation: svup 0.24s cubic-bezier(.2, .7, .25, 1);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: auto;
}
@supports (height: 100dvh) {
  .sv-modal { max-height: min(calc(100dvh - 40px), 530px); }
}

/* Empêche le saut latéral quand on ouvre le modal (scrollbar body cachée). */
html { scrollbar-gutter: stable; }

/* — Photo : compacte (max 170 px desktop) pour laisser de la place au contenu. — */
.sv-modal-photo-wrap {
  position: relative;
  margin: 0;
  background: var(--sv-g100);
  flex-shrink: 0;
  width: 100%;
  height: clamp(110px, 16vh, 170px);
  overflow: hidden;
}
.sv-modal-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.sv-modal-photo-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px 6px;
  font-size: 9px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(transparent, rgba(11, 31, 58, 0.88));
  pointer-events: none;
}
.sv-modal-photo-cap a {
  color: #fff;
  text-decoration: underline;
  pointer-events: auto;
}
@keyframes svup {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.sv-modal-photo-wrap:first-child {
  border-radius: var(--sv-rl) var(--sv-rl) 0 0;
}
.sv-modal-hd {
  background: linear-gradient(135deg, var(--sv-navy) 0%, var(--sv-navy2) 100%);
  padding: 16px 52px 16px 20px;
  border-radius: 0;
  position: relative;
  flex-shrink: 0;
}
/* Pas de bandeau photo : en-tête arrondi en haut */
.sv-modal > .sv-modal-hd:first-child {
  border-radius: var(--sv-rl) var(--sv-rl) 0 0;
}
.sv-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .14s;
}
.sv-modal-close:hover { background: rgba(255,255,255,.1); color: #fff; }

.sv-modal-header-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sv-modal-header-row > div:last-child { min-width: 0; flex: 1 1 auto; }
.sv-modal-name { overflow-wrap: anywhere; }
.sv-modal-avatar {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.18);
  color: #fff;
}
.sv-modal-avatar .sv-ico,
.sv-modal-avatar svg {
  width: 25px;
  height: 25px;
  stroke: #fff;
  stroke-width: 1.7;
  fill: none;
}
.sv-modal-name { font-size: 17px; font-weight: 800; color: #fff; line-height: 1.25; }
.sv-modal-sub  { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 3px; }

.sv-modal-stats {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sv-modal-stat-val { font-size: 15px; font-weight: 700; color: #fff; }
.sv-modal-stat-val.good { color: var(--sv-green); }
.sv-modal-stat-lbl { font-size: 10px; color: rgba(255,255,255,.45); margin-top: 1px; }

.sv-modal-body {
  padding: 14px 20px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--sv-g200) transparent;
  /* Indicateur visuel de scroll : dégradé blanc en bas du body
     géré par background-attachment: local sur le contenu. */
  background:
    /* dégradé bas (visible quand contenu sous la ligne) */
    linear-gradient(to bottom, transparent 70%, rgba(255, 255, 255, 0.96) 100%) bottom / 100% 28px no-repeat local,
    #fff;
}
.sv-modal-body::-webkit-scrollbar { width: 6px; }
.sv-modal-body::-webkit-scrollbar-track { background: transparent; }
.sv-modal-body::-webkit-scrollbar-thumb {
  background: var(--sv-g200);
  border-radius: 4px;
}
.sv-modal-body::-webkit-scrollbar-thumb:hover { background: var(--sv-g400); }
.sv-modal-section { margin-bottom: 14px; }
.sv-modal-section:last-child { margin-bottom: 0; }
.sv-modal-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--sv-navy);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 8px;
}
.sv-modal-desc { font-size: 13px; color: var(--sv-g600); line-height: 1.65; }

.sv-modal-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.sv-modal-info-lbl { font-size: 10px; color: var(--sv-g400); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.sv-modal-info-val { font-size: 13px; color: var(--sv-g900); font-weight: 500; margin-top: 2px; }
.sv-modal-info-val a { color: var(--sv-blue); text-decoration: none; }
.sv-modal-info-val a:hover { text-decoration: underline; }

.sv-modal-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sv-modal-service-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--sv-g50);
  border: 1px solid var(--sv-g200);
  font-size: 12px;
  color: var(--sv-g900);
}

.sv-modal-footer {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--sv-g100);
  background: #fff;
}
.sv-modal-btn-primary {
  flex: 1;
  height: 40px;
  background: var(--sv-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background .14s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sv-modal-btn-primary:hover { background: var(--sv-blue2); color: #fff; }
.sv-modal-btn-secondary {
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--sv-g200);
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--sv-g600);
  transition: all .14s;
}
.sv-modal-btn-secondary:hover { border-color: var(--sv-navy); color: var(--sv-navy); }

/* ============================================================
   MODAL — mobile : bottom-sheet plein largeur, plafonné en hauteur.
   L'overlay est déjà positionné entre top-nav et bottom-nav,
   le modal s'aligne au bas de cette zone (au-dessus de la bottom-nav).
   ============================================================ */
@media (max-width: 767.98px) {
  .sv-overlay.open {
    padding: 0;
    align-items: flex-end;
    justify-content: stretch;
  }

  .sv-modal {
    width: 100%;
    max-width: 100%;
    height: auto;
    /* Plafonné à 65 % de la zone overlay (qui est déjà au-dessus de la bottom-nav). */
    max-height: 65dvh;
    border-radius: 18px 18px 0 0;
    margin: 0;
    box-shadow: 0 -10px 36px rgba(11, 31, 58, 0.28);
    animation: sv-sheet-up 0.28s cubic-bezier(.2, .7, .25, 1);
  }
  /* Fallback navigateurs sans dvh */
  @supports not (height: 1dvh) {
    .sv-modal { max-height: 65vh; }
  }

  /* Coins arrondis appliqués au PREMIER enfant (photo OU header) */
  .sv-modal > .sv-modal-photo-wrap:first-child,
  .sv-modal > .sv-modal-hd:first-child {
    border-radius: 18px 18px 0 0 !important;
  }

  /* Swipe handle décoratif (indique « tirer pour fermer », visuel uniquement). */
  .sv-modal::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 2px;
    z-index: 12;
    pointer-events: none;
  }

  .sv-modal-photo-wrap { height: clamp(110px, 18vh, 160px); }
  .sv-modal-hd        { padding: 18px 56px 12px 16px; }
  .sv-modal-close {
    width: 38px;
    height: 38px;
    top: 12px;
    right: 12px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.10);
  }
  .sv-modal-body   { padding: 12px 16px 14px; }
  .sv-modal-footer {
    padding: 10px 16px 12px;
    flex-wrap: wrap;
  }
  .sv-modal-btn-primary {
    width: 100%;
    flex: 1 1 100%;
    height: 44px;
    font-size: 14px;
  }
  .sv-modal-btn-secondary {
    flex: 1 1 100%;
    height: 44px;
    font-size: 14px;
  }
}

@keyframes sv-sheet-up {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Très petits écrans : encore plus serré sur les paddings horizontaux */
@media (max-width: 359.98px) {
  .sv-modal-hd     { padding: 14px 48px 10px 14px; }
  .sv-modal-body   { padding: 10px 14px 12px; }
  .sv-modal-footer { padding: 8px 14px 10px; }
}

/* Attribution Google */
.sv-google-attr {
  font-size: 10px;
  color: var(--sv-g400);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Feedback géoloc */
#sv-locate-feedback {
  font-size: 11px;
  color: #dc3545;
  padding: 4px 14px 6px;
  display: none;
}

/* ──────────────────────────────────────────────────────────────
   Marqueurs carte (Leaflet divIcon) — goutte arrondie premium
   ────────────────────────────────────────────────────────────── */
.sv-marker { background: transparent !important; border: none !important; }
.sv-marker-pin {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  /* Dégradé interne top→bottom pour donner du volume : le fond posé
     en variable CSS (couleur catégorie) reçoit un highlight discret
     en haut-gauche et un léger assombrissement en bas-droite.
     → rend les tons brand moyens/clairs plus "vivants" sans casser la couleur. */
  background-image:
    linear-gradient(135deg,
      rgba(255,255,255,.18) 0%,
      rgba(255,255,255,0)   45%,
      rgba(0,0,0,.14)       100%);
  box-shadow:
    0 4px 10px rgba(11,31,58,.35),
    0 1px 3px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.32);
  transition: transform .18s ease, box-shadow .18s ease;
}
.sv-marker-pin--boost {
  box-shadow:
    0 4px 10px rgba(11,31,58,.35),
    0 0 0 3px rgba(245, 158, 11, 0.98),
    0 1px 3px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.32);
}
.sv-marker-pin::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: radial-gradient(circle at 28% 26%, rgba(255,255,255,.26), transparent 60%);
  pointer-events: none;
}
.sv-marker-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: rotate(45deg);
  z-index: 1;
}
.sv-marker-ico .sv-ico,
.sv-marker-ico svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  /* Halo discret sous le trait : améliore la lisibilité sur les fonds
     les plus clairs (#3E85E4) sans alourdir les fonds plus sombres. */
  filter:
    drop-shadow(0 1px 1.2px rgba(0,0,0,.35))
    drop-shadow(0 0 1px rgba(0,0,0,.20));
}
.leaflet-marker-icon:hover .sv-marker-pin {
  transform: rotate(-45deg) scale(1.08);
  box-shadow:
    0 8px 18px rgba(11,31,58,.45),
    0 2px 4px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.32);
}
