/* keyhome24 sur téléphone : présentation façon application. Rien ne change au-dessus de 760 px. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: kh-vt-out .16s ease both; }
::view-transition-new(root) { animation: kh-vt-in .22s ease both; }
@keyframes kh-vt-out { to { opacity: 0; transform: translateX(-12px); } }
@keyframes kh-vt-in { from { opacity: 0; transform: translateX(16px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

.kh-tabbar, .kh-back, .kh-fbar, .kh-sheet, .kh-sheet-bg, .kh-toasts, .kh-mini, .kh-swipe, .kh-map-tools, .kh-map-strip, .kh-langm, .kh-progress { display: none; }

@media (max-width: 760px) {
  html { -webkit-tap-highlight-color: transparent; }
  body.kh-app { padding-bottom: calc(66px + env(safe-area-inset-bottom)); overscroll-behavior-y: none; }
  body.kh-app a, body.kh-app button, body.kh-app label, body.kh-app summary, body.kh-app select { touch-action: manipulation; }
  body.kh-app input:not([type=checkbox]):not([type=radio]), body.kh-app select, body.kh-app textarea { font-size: 16px !important; }
  body.kh-app button:active, body.kh-app .btn:active, body.kh-app .kh-card:active { transform: scale(.98); transition: transform .08s; }

  /* Barre de progression lors du changement de page */
  .kh-progress { display: block; position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 90; background: #ffd60a; transition: width .25s ease, opacity .2s; pointer-events: none; }
  .kh-progress.go { width: 70%; transition: width 6s cubic-bezier(.1,.6,.2,1); }

  /* En-tête fin */
  body.kh-app .kh-top { position: sticky; top: 0; z-index: 45; padding-top: env(safe-area-inset-top); }
  body.kh-app .kh-top > div { min-height: 54px !important; padding-top: 6px !important; padding-bottom: 6px !important; flex-wrap: nowrap !important; gap: 8px !important; }
  body.kh-app .kh-top .kh-burger { display: none !important; }
  body.kh-app .kh-top > div > a:first-child span:first-child { width: 30px !important; height: 30px !important; }
  body.kh-app .kh-top > div > a:first-child span:nth-child(2) { font-size: 21px !important; }
  .kh-back { display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; margin-left: -8px; border: 0; border-radius: 12px; background: transparent; color: #10131f; }
  .kh-back svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  .kh-langm { display: flex; align-items: center; gap: 4px; margin-left: auto; font: 800 14px 'Plus Jakarta Sans', Arial, sans-serif; color: #10131f; }
  .kh-langm select { appearance: none; -webkit-appearance: none; border: 1px solid #d5d9e6; border-radius: 10px; background: #fff; padding: 0 10px; min-height: 36px; font-size: 14px !important; font-weight: 800; color: #10131f; }

  /* Barre d'onglets */
  .kh-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid #e4e6ee; }
  .kh-tabbar a { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; color: #6b7086; font: 700 11px 'Plus Jakarta Sans', Arial, sans-serif; text-decoration: none; border-radius: 12px; }
  .kh-tabbar a svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .kh-tabbar a.on { color: #1a3cff; }
  .kh-tabbar a.on svg { stroke-width: 2.5; }
  .kh-tab-plus { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-top: -18px; border-radius: 16px; background: #1a3cff; color: #fff; box-shadow: 0 6px 16px rgba(26,60,255,.35); }
  .kh-tab-plus svg { stroke: #fff !important; stroke-width: 2.8 !important; }
  .kh-tab-pub span:last-child { color: #10131f; }
  .kh-tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; background: #e5484d; color: #fff; font: 800 11px/18px Arial, sans-serif; font-style: normal; text-align: center; }
  /* Écrans de détail, de saisie et de discussion : pas de barre d'onglets, place à l'action. */
  body.r-listings-show .kh-tabbar, body.r-listings-create .kh-tabbar, body.r-listings-edit .kh-tabbar, body.r-requests-create .kh-tabbar, body.r-requests-edit .kh-tabbar, body.r-account-conversation .kh-tabbar, body.r-conversation-show .kh-tabbar, body.r-payment-show .kh-tabbar, body.r-requests-pay .kh-tabbar { display: none; }
  body.r-listings-show, body.r-listings-create, body.r-listings-edit, body.r-requests-create, body.r-requests-edit, body.r-account-conversation, body.r-conversation-show, body.r-payment-show, body.r-requests-pay { padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  body.kh-app #cookie-bar { bottom: calc(66px + env(safe-area-inset-bottom)) !important; position: fixed !important; left: 8px; right: 8px; border: 1px solid #e4e6ee !important; border-radius: 16px; box-shadow: 0 8px 28px rgba(16,19,31,.18); z-index: 55; }
  body.kh-app #cookie-bar button { min-height: 44px; }


  /* ===== Fiche d'annonce, design mobile ===== */
  body.r-listings-show .kh-top { display: none !important; }
  body.r-listings-show main { padding-left: 14px !important; padding-right: 14px !important; gap: 12px !important; }
  body.r-listings-show .kh-swipe { margin: 0 calc(50% - 50vw) !important; width: 100vw; }
  body.r-listings-show .kh-swipe > .kh-track { aspect-ratio: auto; height: min(62vw + 40px, 340px); padding-top: env(safe-area-inset-top); background: #dfe4f7; }
  .kh-float { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; gap: 8px; z-index: 3; pointer-events: none; }
  .kh-float .kh-sp { flex: 1; }
  .kh-float button { pointer-events: auto; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 21px; background: rgba(255,255,255,.94); color: #10131f; box-shadow: 0 2px 10px rgba(16,19,31,.18); }
  .kh-float svg, .kh-mobfav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
  .kh-float button.on, .kh-mobfav.on { color: #e5484d; }
  .kh-float button.on svg, .kh-mobfav.on svg { fill: #e5484d; }
  body.r-listings-show .kh-swipe > .kh-count { bottom: 34px !important; }
  body.r-listings-show .kh-cols { gap: 12px !important; margin-top: -22px; position: relative; z-index: 2; }
  body.r-listings-show .kh-cols section { padding: 18px !important; border-radius: 20px !important; border: 0 !important; box-shadow: 0 1px 3px rgba(16,19,31,.06), 0 6px 18px rgba(16,19,31,.05); }
  body.r-listings-show .kh-cols section h2 { font-size: 19px !important; margin: 0 0 10px !important; letter-spacing: -0.02em; }
  .kh-tcard { padding-top: 16px !important; position: relative; z-index: 3; }
  body.r-listings-show .kh-cols section { position: relative; z-index: 3; }
  .kh-tcard > span:first-child { font-size: 12px !important; padding: 4px 9px !important; }
  .kh-tprice { margin: 10px 0 2px; font: 800 30px/1.1 'Plus Jakarta Sans', Arial, sans-serif !important; letter-spacing: -0.03em; color: #10131f; }
  .kh-tprice span { font-size: 15px !important; font-weight: 700 !important; color: #4c5166 !important; }
  .kh-tcharges { font-size: 13px; font-weight: 700; color: #4c5166; }
  .kh-tcharges + .kh-tcharges { margin-top: -2px; }
  .kh-tcard h1 { font-size: 20px !important; line-height: 1.25 !important; margin: 10px 0 4px !important; letter-spacing: -0.02em !important; }
  .kh-tcard > p { font-size: 14px !important; margin: 0 !important; color: #4c5166 !important; }
  .kh-tcard > p + div { margin-top: 2px !important; font-size: 12px !important; }
  body.r-listings-show .kh-tcard > div:last-child { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; overflow: visible !important; margin: 14px 0 0 !important; padding: 0 !important; flex-wrap: wrap !important; }
  body.r-listings-show .kh-tcard > div:last-child > div { min-width: 0 !important; padding: 10px !important; border-radius: 14px !important; background: #f3f5fb !important; }
  body.r-listings-show .kh-tcard > div:last-child > div > div:first-child { font-size: 11px !important; line-height: 1.25; word-break: break-word; hyphens: auto; }
  body.r-listings-show .kh-tcard > div:last-child > div > div:last-child { font-size: 16px !important; }
  .kh-pcard { border: 0 !important; }
  .kh-pcard .kh-moved { display: none !important; }
  .kh-pcard > div:not(.kh-acts) { font-size: 14px !important; }
  .kh-acts { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; margin-top: 12px !important; }
  .kh-acts > *, .kh-acts form button { min-height: 50px !important; border-radius: 14px !important; font-size: 13px !important; width: 100%; }
  .kh-pcard > p:last-child { margin-top: 12px !important; padding: 10px 12px !important; border-radius: 12px; background: #fff6d6; font-size: 13px !important; color: #5a4a00 !important; }
  body.r-listings-show #post-map { height: 190px !important; border-radius: 14px !important; }
  .kh-equip > div > div { font-size: 15px !important; padding: 5px 0 !important; }
  body.r-listings-show .kh-mobar { position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 55; display: flex !important; align-items: center; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important; background: rgba(255,255,255,.97) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid #e4e6ee !important; box-shadow: 0 -4px 18px rgba(16,19,31,.06); }
  body.r-listings-show .kh-mobar > div:first-child, body.r-listings-show .kh-mobar .kh-mobfav { display: none !important; }
  body.r-listings-show .kh-mobar > div:first-child > div:first-child { font-size: 18px !important; font-weight: 800 !important; }
  body.r-listings-show .kh-mobar a[href="#contact"] { flex: 1 1 100%; min-height: 54px; padding: 0 22px !important; display: flex !important; align-items: center; justify-content: center; gap: 10px; border-radius: 16px !important; font-size: 17px !important; font-weight: 800 !important; box-shadow: 0 6px 18px rgba(26,60,255,.3); }
  body.r-listings-show .kh-mobar a[href="#contact"] svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
  .kh-mobfav { flex: none; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border: 1px solid #d5d9e6; border-radius: 14px; background: #fff; color: #10131f; }
  body.r-listings-show .kh-mini { padding-top: calc(6px + env(safe-area-inset-top)); }
  /* Visionneuse plein écran */
  .kh-viewer { position: fixed; inset: 0; z-index: 120; background: #000; }
  .kh-viewer[hidden] { display: none; }
  .kh-vtrack { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
  .kh-vtrack::-webkit-scrollbar { display: none; }
  .kh-vslide { flex: 0 0 100%; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; scroll-snap-align: center; scroll-snap-stop: always; }
  .kh-vslide img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
  .kh-vclose { position: absolute; top: calc(10px + env(safe-area-inset-top)); right: 12px; width: 46px; height: 46px; border: 0; border-radius: 23px; background: rgba(255,255,255,.18); color: #fff; font: 400 32px/46px Arial, sans-serif; }
  .kh-vcount { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; font: 800 14px Arial, sans-serif; pointer-events: none; }
  body.kh-viewing { overflow: hidden !important; }
  body.kh-viewing .kh-mobar, body.kh-viewing .kh-mini, body.kh-viewing .kh-tabbar, body.kh-viewing #cookie-bar { display: none !important; }

  /* Annonces similaires : bande qui défile, cartes verticales */
  .kh-similar h2 { font-size: 20px !important; }
  .kh-similar-grid { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px !important; margin: 0 calc(50% - 50vw); padding: 2px 14px 8px; scrollbar-width: none; }
  .kh-similar-grid::-webkit-scrollbar { display: none; }
  .kh-similar-grid > .kh-card { flex: 0 0 72%; scroll-snap-align: start; }
  body .kh-similar-grid .kh-card:not(.is-feat) > a:not(.kh-heart) { display: block !important; min-height: 0; }
  body .kh-similar-grid .kh-card:not(.is-feat) .kh-card-media { aspect-ratio: 4 / 3 !important; height: auto !important; min-height: 0; }
  body .kh-similar-grid .kh-card:not(.is-feat) .kh-card-body { padding: 10px 12px 12px !important; }
  body .kh-similar-grid .kh-card:not(.is-feat) .kh-card-body > div:first-child { font-size: 18px !important; }
  .kh-similar-grid .kh-card .kh-heart-f { top: 8px !important; right: 8px !important; }
  .kh-rv-list { margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
  .kh-rv-card { flex-basis: 150px; }
  .kh-rv h2 { font-size: 20px; }

  /* Pas de publicité sur téléphone */
  body.kh-app aside[aria-label^="Espace promotionnel"], body.kh-app aside.ad, body.kh-app aside[aria-label="Publicité"] { display: none !important; }

  /* Petites notifications */
  .kh-toasts { display: flex; flex-direction: column; align-items: center; gap: 8px; position: fixed; left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 95; pointer-events: none; }
  .kh-toast { max-width: 100%; padding: 12px 16px; border-radius: 14px; background: #10131f; color: #fff; font: 700 14px/1.35 'Plus Jakarta Sans', Arial, sans-serif; box-shadow: 0 10px 30px rgba(16,19,31,.3); animation: kh-toast .25s ease both; pointer-events: auto; }
  .kh-toast.out { animation: kh-toast-out .25s ease both; }
  @keyframes kh-toast { from { opacity: 0; transform: translateY(12px); } }
  @keyframes kh-toast-out { to { opacity: 0; transform: translateY(12px); } }
  body.kh-app .alert.ok.kh-toasted { display: none !important; }

  /* Panneau qui monte du bas */
  .kh-sheet-bg { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(16,19,31,.45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .kh-sheet { display: flex; flex-direction: column; gap: 14px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 81; max-height: 86dvh; overflow-y: auto; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); box-sizing: border-box; background: #fff; border-radius: 22px 22px 0 0; transform: translateY(105%); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
  .kh-sheet::before { content: ""; align-self: center; width: 40px; height: 5px; border-radius: 3px; background: #d5d9e6; flex: none; }
  .kh-sheet.open { transform: none; }
  .kh-sheet-bg.open { opacity: 1; pointer-events: auto; }
  .kh-sheet h3 { margin: 0; font: 800 20px 'Plus Jakarta Sans', Arial, sans-serif; color: #10131f; }
  .kh-sheet p { margin: 0; font-size: 15px; line-height: 1.45; color: #4c5166; }
  .kh-sheet label { display: flex !important; flex-direction: column; gap: 6px; font-size: 14px !important; font-weight: 800 !important; color: #10131f !important; }
  .kh-sheet label input, .kh-sheet label select { width: 100% !important; min-height: 48px !important; box-sizing: border-box; }
  .kh-sheet-actions { display: flex; gap: 10px; position: sticky; bottom: calc(-18px - env(safe-area-inset-bottom)); margin: 4px -18px calc(-18px - env(safe-area-inset-bottom)); padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #eef0f5; }
  .kh-sheet-actions button { flex: 1 1 0; min-height: 50px; border-radius: 14px; border: 2px solid #1a3cff; background: #1a3cff; color: #fff; font: 800 16px 'Plus Jakarta Sans', Arial, sans-serif; }
  .kh-sheet-actions button.alt { background: #fff; color: #10131f; border-color: #d5d9e6; }
  .kh-sheet-actions button.danger { background: #e5484d; border-color: #e5484d; }
  .kh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .kh-chips button { min-height: 42px; min-width: 52px; padding: 0 14px; border-radius: 999px; border: 2px solid #d5d9e6; background: #fff; color: #10131f; font: 800 15px 'Plus Jakarta Sans', Arial, sans-serif; }
  .kh-chips button[aria-pressed=true] { border-color: #1a3cff; background: #eef1ff; color: #1a3cff; }

  /* Recherche en une ligne */
  .kh-fbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; flex: 1 1 100%; width: 100%; box-sizing: border-box; grid-column: 1 / -1; }
  .kh-fbar .kh-fq { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 14px; min-height: 50px; border-radius: 14px; background: #fff; border: 1px solid #d5d9e6; box-shadow: 0 2px 10px rgba(16,19,31,.06); }
  .kh-fbar .kh-fq svg { flex: none; width: 20px; height: 20px; fill: none; stroke: #6b7086; stroke-width: 2.2; stroke-linecap: round; }
  .kh-fbar .kh-fq input { flex: 1 1 auto; min-width: 0; border: 0 !important; outline: none; background: transparent; height: 48px !important; padding: 0 !important; box-shadow: none !important; font-weight: 700; color: #10131f; }
  .kh-fbtn { position: relative; flex: none; display: flex; align-items: center; gap: 6px; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1px solid #d5d9e6; background: #fff; color: #10131f; font: 800 15px 'Plus Jakarta Sans', Arial, sans-serif; }
  .kh-fbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
  .kh-fbtn b { min-width: 20px; height: 20px; border-radius: 10px; background: #1a3cff; color: #fff; font-size: 12px; line-height: 20px; text-align: center; }
  .kh-recent { display: flex; flex-direction: column; margin-top: 6px; border-radius: 14px; background: #fff; border: 1px solid #e4e6ee; overflow: hidden; }
  .kh-recent button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border: 0; border-top: 1px solid #f0f1f5; background: #fff; color: #10131f; font: 700 15px 'Plus Jakarta Sans', Arial, sans-serif; text-align: left; }
  .kh-recent button:first-child { border-top: 0; }
  .kh-recent small { padding: 8px 14px 4px; font: 800 12px Arial, sans-serif; color: #6b7086; text-transform: uppercase; letter-spacing: .04em; }
  form.kh-filters.kh-collapsed > div > label:not(.kh-keep), form.kh-filters.kh-collapsed > label:not(.kh-keep), form.kh-filters.kh-collapsed > button[type=submit] { display: none !important; }
  form.kh-filters.kh-collapsed > div:has(> label):not(.kh-fbar) { display: block !important; padding: 0 !important; background: transparent !important; box-shadow: none !important; border: 0 !important; }

  /* Accueil et liste : en-tête bleu plus court, annonces dès le premier écran */
  body.r-home .kh-home-search, body.r-listings form#search > div:last-of-type { padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
  body.r-home main > section:first-child h1, body.r-listings form#search h1 { font-size: 27px !important; }
  body.r-listings form#search h1 + div, body.r-listings form#search > div:first-child > svg { display: none !important; }
  body.r-listings form#search > div:first-child { margin-bottom: 10px !important; }
  body.r-listings section:first-of-type > div { padding-top: 16px !important; padding-bottom: 16px !important; }
  
  .kh-res-head { position: sticky; top: calc(54px + env(safe-area-inset-top)); z-index: 30; margin: 0 -16px !important; padding: 8px 16px !important; background: rgba(243,244,248,.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); flex-wrap: nowrap !important; gap: 8px !important; }
  .kh-res-head h2 { font-size: 15px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; margin: 0 !important; }
  .kh-res-head label { font-size: 0 !important; flex: none; }
  .kh-res-head select { min-height: 40px !important; font-size: 14px !important; font-weight: 800; border-radius: 12px !important; max-width: 128px; }
  .kh-res-head .kh-fbtn, .kh-res-head .kh-maplink { min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: 12px; }
  .kh-maplink { display: flex; align-items: center; gap: 6px; border: 1px solid #d5d9e6; background: #fff; color: #10131f; font-weight: 800; text-decoration: none; flex: none; }
  .kh-maplink svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
  .kh-more { display: none !important; }
  .kh-loading-more { display: flex; justify-content: center; padding: 18px; color: #6b7086; font-weight: 700; }

  /* Cartes d'annonces compactes */
  .kh-grid { display: flex !important; flex-direction: column; gap: 10px !important; }
  .kh-card:not(.is-feat) > a:not(.kh-heart) { display: grid !important; grid-template-columns: 124px minmax(0,1fr); min-height: 112px; }
  .kh-card:not(.is-feat) .kh-card-media { aspect-ratio: auto !important; height: 100% !important; min-height: 112px; border-radius: 0 !important; }
  .kh-card:not(.is-feat) .kh-card-media > span { top: 6px !important; left: 6px !important; padding: 3px 7px !important; font-size: 11px !important; }
  .kh-card:not(.is-feat) .kh-card-body { padding: 10px 44px 10px 12px !important; gap: 3px !important; justify-content: center; }
  .kh-card:not(.is-feat) .kh-card-body > div:first-child { font-size: 19px !important; }
  .kh-card:not(.is-feat) .kh-card-body > div:last-child span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kh-card:not(.is-feat) .kh-heart-f { top: 8px !important; right: 8px !important; }
  .kh-card:not(.is-feat) .kh-heart { width: 36px !important; height: 36px !important; }
  .kh-card .kh-heart.pop { animation: kh-pop .35s ease; }
  @keyframes kh-pop { 40% { transform: scale(1.3); } }
  /* Photos qui défilent dans la carte */
  .kh-card-media.kh-sw { overflow: hidden; }
  .kh-sw-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; z-index: 0; }
  .kh-sw-track::-webkit-scrollbar { display: none; }
  .kh-sw-track img { flex: 0 0 100%; width: 100% !important; height: 100% !important; object-fit: cover; scroll-snap-align: start; position: static !important; }
  .kh-card-media.kh-sw > span { z-index: 2; }
  .kh-dots { z-index: 2; position: absolute; bottom: 6px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
  .kh-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.6); }
  .kh-dots i.on { background: #fff; width: 14px; }

  .kh-card.is-feat .kh-dots { bottom: 40px; }
  /* Bandes qui défilent à l'horizontale */
  .kh-hscroll { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px !important; margin-left: -16px !important; margin-right: -16px !important; padding: 2px 16px 8px !important; scrollbar-width: none; grid-template-columns: none !important; }
  .kh-hscroll::-webkit-scrollbar { display: none; }
  .kh-hscroll > * { flex: 0 0 auto !important; scroll-snap-align: start; }
  .kh-cats > a { width: 112px; }
  .kh-cities > a { min-width: 120px; }
  .kh-trust > div, .kh-steps > div { width: 220px; }
  .kh-grid.kh-hscroll-cards { flex-direction: row !important; }
  .kh-grid.kh-hscroll-cards > .kh-card { width: 82%; }

  /* Pied de page en sections repliables */
  body.kh-app .kh-foot > div > div:not(:first-child) { flex: 1 1 100% !important; min-width: 0 !important; border-top: 1px solid #d5dcf5; }
  body.kh-app .kh-foot > div > div:not(:first-child) > div:first-child { display: flex; align-items: center; justify-content: space-between; min-height: 48px; cursor: pointer; }
  body.kh-app .kh-foot > div > div:not(:first-child) > div:first-child::after { content: "+"; font-size: 22px; font-weight: 600; color: #4c5166; }
  body.kh-app .kh-foot > div > div.kh-open > div:first-child::after { content: "−"; }
  body.kh-app .kh-foot > div > div:not(:first-child):not(.kh-open) > a { display: none !important; }
  body.kh-app .kh-foot a { min-height: 44px; display: flex !important; align-items: center; }
  body.kh-app .kh-foot > div { gap: 0 !important; }
  body.r-map .kh-foot, body.r-listings-show .kh-foot, body.r-account-conversation .kh-foot { display: none; }

  /* Fiche d'annonce */
  .kh-mini { display: flex; align-items: center; gap: 6px; position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding: calc(6px + env(safe-area-inset-top)) 10px 6px; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid #e4e6ee; transform: translateY(-110%); transition: transform .2s; }
  .kh-mini.show { transform: none; }
  .kh-mini b { flex: 1 1 auto; min-width: 0; font: 800 16px 'Plus Jakarta Sans', Arial, sans-serif; color: #10131f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kh-mini button, .kh-mini a { flex: none; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 12px; background: transparent; color: #10131f; }
  .kh-mini svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  body.r-listings-show .kh-gal.kh-hasswipe { display: none !important; }
  .kh-swipe { display: block; position: relative; margin: 0 -16px; }
  .kh-swipe > .kh-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 4 / 3; background: #e9edff; }
  .kh-swipe > .kh-track::-webkit-scrollbar { display: none; }
  .kh-swipe img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
  .kh-swipe > .kh-count { position: absolute; right: 12px; bottom: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(16,19,31,.7); color: #fff; font: 800 13px Arial, sans-serif; }
  body.r-listings-show nav.kh-crumbs, body.r-listings-show nav[aria-label="Fil d'Ariane"] { display: none !important; }
  body.r-listings-show main { padding-top: 0 !important; }
  body.r-listings-show .kh-cols, body.r-listings-show .kh-cols section, body.r-listings-show .kh-cols aside { min-width: 0 !important; max-width: 100% !important; }
  .kh-clamp { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
  .kh-more-btn { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; margin-top: 6px; border-radius: 12px; border: 2px solid #1a3cff; background: #fff; color: #1a3cff; font: 800 15px 'Plus Jakarta Sans', Arial, sans-serif; }
  .kh-equip.kh-folded > div > div:nth-child(n+7) { display: none !important; }
  body.r-listings-show .kh-mobar { padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important; }
  .kh-lightbox { z-index: 100 !important; background: #000 !important; }
  .kh-lightbox img { touch-action: pinch-zoom; max-width: 100vw !important; max-height: calc(100dvh - 140px) !important; border-radius: 0 !important; }
  .kh-lightbox [data-a=close] { top: calc(10px + env(safe-area-inset-top)) !important; right: 10px !important; width: 48px; height: 48px; border-radius: 24px !important; background: rgba(255,255,255,.16) !important; }
  .kh-lightbox span { position: absolute !important; left: 50% !important; right: auto !important; top: auto !important; bottom: calc(22px + env(safe-area-inset-bottom)) !important; transform: translateX(-50%); padding: 7px 14px !important; border-radius: 999px !important; background: rgba(255,255,255,.16) !important; color: #fff !important; font: 800 14px Arial, sans-serif !important; }
  body:has(.kh-lightbox:not([hidden])) .kh-mobar, body:has(.kh-lightbox:not([hidden])) .kh-mini, body:has(.kh-lightbox:not([hidden])) #cookie-bar { display: none !important; }
  .kh-lightbox button[data-a=prev], .kh-lightbox button[data-a=next] { display: none; }

  /* Carte plein écran */
  body.r-map .kh-mapage { padding: 0 !important; gap: 0 !important; max-width: none !important; }
  body.r-map .kh-mapage > h1 { display: none !important; }
  body.r-map { overflow: hidden; height: 100dvh; }
  html:has(body.r-map), body.r-map { overflow: hidden !important; height: 100%; }
  body.r-map .kh-mapage > form.kh-filters { position: fixed; top: calc(var(--kh-top, 55px) + 8px); left: 10px; right: 10px; z-index: 520; margin: 0 !important; padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
  body.r-map .kh-map-wrap { display: block !important; position: fixed !important; top: var(--kh-top, 55px); left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 1; margin: 0 !important; }
  body.r-map #map { height: 100% !important; width: 100% !important; min-height: 0 !important; border-radius: 0 !important; border: 0 !important; }
  body.r-map .kh-map-side { display: none !important; }
  body.r-map .leaflet-top { top: 66px; }
  body.r-map .leaflet-bottom.leaflet-right { bottom: 0; }
  body.r-map .leaflet-control-attribution { font-size: 9px; }
  .kh-map-tools { display: flex; flex-direction: column; gap: 8px; position: absolute; right: 10px; top: 72px; z-index: 510; }
  .kh-map-tools button, .kh-map-pill { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 46px; min-height: 46px; padding: 0 12px; border: 0; border-radius: 14px; background: #fff; color: #10131f; font: 800 14px 'Plus Jakarta Sans', Arial, sans-serif; box-shadow: 0 4px 14px rgba(16,19,31,.18); text-decoration: none; }
  .kh-map-tools svg, .kh-map-pill svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .kh-map-area { position: absolute; top: 72px; left: 50%; transform: translateX(-50%); z-index: 510; white-space: nowrap; }
  .kh-map-area[hidden] { display: none !important; }
  .kh-map-strip { display: flex; gap: 10px; position: absolute; left: 0; right: 0; bottom: 12px; z-index: 510; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 12px; scrollbar-width: none; }
  .kh-map-strip::-webkit-scrollbar { display: none; }
  .kh-map-strip a { flex: 0 0 78%; display: grid; grid-template-columns: 96px minmax(0,1fr); min-height: 92px; overflow: hidden; border-radius: 16px; background: #fff; color: #10131f; text-decoration: none; box-shadow: 0 6px 20px rgba(16,19,31,.2); scroll-snap-align: center; border: 2px solid transparent; }
  .kh-map-strip a.on { border-color: #1a3cff; }
  .kh-map-strip a > span:first-child { background: #e9edff center / cover no-repeat; }
  .kh-map-strip a > span:last-child { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 12px; min-width: 0; }
  .kh-map-strip b { font-size: 17px; font-weight: 800; }
  .kh-map-strip em { font-style: normal; font-size: 13px; font-weight: 600; color: #4c5166; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kh-map-list { position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%); z-index: 511; background: #10131f !important; color: #fff !important; }

  /* Publier : boutons fixés en bas, progression visible */
  body.r-listings-create #w-nav, body.r-listings-edit #w-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0 !important; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important; background: rgba(255,255,255,.97); border-top: 1px solid #e4e6ee; display: flex; gap: 10px; }
  body.r-listings-create #w-nav button, body.r-listings-edit #w-nav button { flex: 1 1 0; min-height: 50px; font-size: 16px; }
  body.r-listings-create #w-nav > span, body.r-listings-edit #w-nav > span { display: none; }
  body.r-listings-create #w-bar, body.r-listings-edit #w-bar { transition: width .3s; }
  .kh-draft { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #eef1ff; color: #10131f; font-weight: 700; font-size: 14px; }
  .kh-draft button { min-height: 40px; border: 0; background: transparent; color: #1a3cff; font-weight: 800; font-size: 14px; }
  .kh-ph { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 10px; }
  .kh-ph figure { position: relative; margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #e9edff; }
  .kh-ph img { width: 100%; height: 100%; object-fit: cover; }
  .kh-ph figure:first-child::after { content: "Principale"; position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 8px; background: #ffd60a; font: 800 11px Arial, sans-serif; color: #10131f; }
  .kh-ph .kh-ph-a { position: absolute; bottom: 4px; left: 4px; right: 4px; display: flex; justify-content: space-between; }
  .kh-ph .kh-ph-a button { width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255,255,255,.92); font: 800 16px Arial, sans-serif; color: #10131f; }

  /* Discussion : saisie fixée en bas */
  body.r-account-conversation .thread + form, body.r-conversation-show .thread + form { position: sticky; bottom: 0; z-index: 20; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: #fff; }
  body.r-account-conversation .thread + form .f > :first-child:not(textarea), body.r-account-conversation .thread + form .xs { display: none; }
  body.r-account-conversation .thread + form label.f { font-size: 0 !important; }
  body.r-account-conversation .thread + form textarea { font-size: 16px !important; min-height: 46px; max-height: 140px; border-radius: 22px !important; padding: 11px 16px !important; resize: none; }
  body.r-account-conversation main > a:first-child, body.r-account-conversation main > h1 { display: none !important; }

  /* Mon espace : menu présenté comme les réglages du téléphone */
  body.r-account .kh-side { flex-direction: column !important; overflow: visible !important; padding: 6px !important; }
  body.r-account .kh-side a, body.r-account .kh-side button { width: 100%; box-sizing: border-box; min-height: 52px; justify-content: flex-start !important; text-align: left; border-radius: 12px; }
  body.r-account .kh-side a::after { content: "›"; font-size: 24px; font-weight: 600; color: #a0a4b8; margin-left: auto; padding-left: 10px; }
  body.r-account .kh-side > div:first-child { display: none !important; }

  /* Pas de publicité sur téléphone */
  body.kh-app aside.ad, body.kh-app aside.kh-promo { display: none !important; }
  /* Bas des photos : pastilles et étiquettes lisibles */
  .kh-swipe::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(to top, rgba(16,19,31,.45), rgba(16,19,31,0)); pointer-events: none; }
  .kh-swipe > .kh-count { z-index: 2; }
  .kh-card-media { position: relative; }
  .kh-dots { z-index: 2; }

  /* Zones à toucher assez grandes */
  body.kh-app nav.kh-crumbs a, body.kh-app nav[aria-label="Fil d'Ariane"] a { display: inline-flex; align-items: center; min-height: 40px; }
}
@media (max-width: 760px) { .kh-res-head .kh-maplink span { display: none; } .kh-res-head h2 { overflow: visible !important; } }
