:root {
  --radius-lg: 28px;
  --radius-md: 20px;
  --shadow: 0 8px 32px 0 rgba(0,0,0,.18);
  --form-bg: #fff;
  --form-txt: #232323;
  --input-bg: #fafafa;
  --input-border: #eee;
  --placeholder: #b0b4b9;
  --accent: #25bb76;
  --danger: #ec5c5c;
  --add-bg: #f7f7fa;
  --add-txt: #919191;
  --form-padding: 18px 18px 12px 18px;
  --form-mobile-padding: 18px 12px 12px 12px;
  --form-mobile-bottom: 10px;
  --coords: #9a9a9a;
}
html, body {
  width: 100vw; height: 100vh; margin: 0; padding: 0;
  font-family: 'Inter', 'Arial', sans-serif;
  background: #f6f7fa; color: var(--form-txt);
  overscroll-behavior: none;
}
#map {
  position: absolute; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
}
.airbnb-map-base {
  filter: contrast(1.20) brightness(.97);
}
#midpoint-box {
  position: absolute; left: 2vw; top: 2vw; z-index: 10;
  background: var(--form-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--form-padding);
  min-width: 270px; max-width: 320px;
  display: flex; flex-direction: column; gap: 8px;
  border: none;
  transition: all 0.22s cubic-bezier(.7, .2, .19, 1.01);
}
#midpoint-box h1 {
  font-size: 1.05rem; font-weight: 700;
  margin: 0 0 2px 0; letter-spacing: -0.4px;
}
#mode-choice {
  margin-bottom: 10px;
  display: flex;
  background: #f0f1f5;
  border-radius: 12px;
  padding: 3px;
  gap: 0;
}
#mode-choice label {
  flex: 1;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  color: #888;
  border-radius: 9px;
  padding: 7px 10px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  user-select: none;
}
#mode-choice input[type="radio"] {
  display: none;
}
#mode-choice input[type="radio"]:checked + span {
  /* handled via label styling below */
}
#mode-choice label:has(input:checked) {
  background: #fff;
  color: #1a1a2e;
  box-shadow: 0 1px 4px rgba(0,0,0,0.10);
  font-weight: 600;
}
.input-wrap {
  position: relative;
  display: flex; align-items: center;
  margin-bottom: 6px;
  background: var(--input-bg);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--input-border);
  overflow: visible;
  transition: box-shadow 0.14s;
}
.input-wrap:focus-within {
  box-shadow: 0 0 0 2px var(--accent)33;
  border-color: var(--accent);
}
.input-wrap input {
  border: none; outline: none;
  font-size: 1rem; padding: 13px 16px;
  flex: 1; background: transparent; color: var(--form-txt);
  font-family: inherit; min-width: 0;
}
.input-wrap input::placeholder {
  color: var(--placeholder); font-weight: 500;
  letter-spacing: 0.01em;
}
.remove-btn {
  background: none; border: none;
  color: var(--danger); font-size: 1.25rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0.75;
  transition: background 0.1s, opacity 0.18s;
}
.remove-btn:active, .remove-btn:hover {
  background: #ffdada; opacity: 1;
}
.remove-btn[aria-hidden="true"] { display: none; }
#add-field-btn {
  display: flex; align-items: center;
  background: var(--add-bg); color: var(--add-txt);
  border: none; border-radius: var(--radius-md);
  padding: 12px 14px; margin: 0 0 2px 0;
  font-size: 1rem; cursor: pointer; font-weight: 500; gap: 7px;
  transition: background 0.13s, color 0.13s;
}
#add-field-btn:hover, #add-field-btn:active {
  background: #e5e7eb; color: #232323;
}
#add-field-btn:disabled {
  opacity: .5; pointer-events: none;
}
#voiture-warning {
  font-size: 0.8rem;
  color: #aaa;
  min-height: 0;
  margin-top: -6px;
  text-align: center;
}
#find-btn {
  background: #fff;
  color: var(--accent);
  border: 1.7px solid var(--accent);
  border-radius: 999px;
  height: 46px;
  min-width: 120px;
  padding: 0 28px;
  font-size: 1.06rem;
  font-weight: 600;
  box-shadow: 0 3px 13px 0 #1aac6612;
  outline: none;
  align-self: flex-end;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background .14s, color .14s, border .14s, box-shadow .16s;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#find-btn:hover, #find-btn:focus {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
#find-btn.loading {
  pointer-events: none;
  opacity: 0.7;
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
}
#find-btn .spinner {
  display: block;
  width: 22px; height: 22px;
  border: 3px solid #1aac6622;
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
  background: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pinDrop {
  0%   { transform: translateY(-36px) scale(0.7); opacity: 0; }
  60%  { transform: translateY(5px) scale(1.12); opacity: 1; }
  80%  { transform: translateY(-3px) scale(0.96); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes pinPop {
  0%   { transform: scale(0.2) rotate(-12deg); opacity: 0; }
  55%  { transform: scale(1.25) rotate(4deg); opacity: 1; }
  75%  { transform: scale(0.92) rotate(-2deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.pin-drop {
  animation: pinDrop 0.45s cubic-bezier(.36,.07,.19,.97) forwards;
}
.pin-pop {
  animation: pinPop 0.5s cubic-bezier(.36,.07,.19,.97) forwards;
}

#settings-btn {
  display: none; position: fixed; z-index: 21; right: 14px; bottom: 18px;
  background: #fff; color: #353535; border: none; border-radius: 50%;
  box-shadow: var(--shadow); width: 54px; height: 54px;
  align-items: center; justify-content: center; font-size: 1.6rem;
  cursor: pointer; border: 1.5px solid #efefef; opacity: 0.96;
  transition: box-shadow .19s, background .19s;
  outline: none;
}
#settings-btn:active {
  background: #f6f6f9; box-shadow: 0 2px 10px 0 #bbb3;
}
#app-store-btn {
  position: fixed; top: 2vw; right: 2vw; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  background: #000; color: #fff;
  border-radius: 12px; padding: 8px 14px;
  text-decoration: none; box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  border: none; outline: none;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
}
#app-store-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
#app-store-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
#app-store-btn svg {
  flex-shrink: 0;
  width: 18px; height: 22px;
}
#app-store-btn > div {
  display: flex; flex-direction: column;
  line-height: 1.1;
}
.app-store-text-small {
  font-size: 0.65rem; font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.app-store-text-large {
  font-size: 0.95rem; font-weight: 600;
  letter-spacing: -0.01em;
}
@media (max-width: 700px) {
  #app-store-btn {
    top: 12px; right: 12px;
    padding: 6px 11px; gap: 6px;
    border-radius: 10px;
  }
  #app-store-btn svg {
    width: 16px; height: 20px;
  }
  .app-store-text-small {
    font-size: 0.58rem;
  }
  .app-store-text-large {
    font-size: 0.85rem;
  }
}
@media (max-width: 700px) {
  #midpoint-box {
    left: 0; right: 0; top: unset; bottom: var(--form-mobile-bottom);
    width: 96vw; min-width: unset; max-width: unset; margin: 0 auto;
    border-radius: 24px; box-shadow: 0 4px 28px 0 #0002;
    padding: var(--form-mobile-padding); gap: 9px;
  }
  #midpoint-box h1 { font-size: 1.05rem; margin-bottom: 4px; }
  #settings-btn { display: flex; }
  #midpoint-box.hide-mobile { display: none !important; }
}
.popup-coords {
  color: var(--coords); font-size: 0.82em; font-weight: 500;
  letter-spacing: 0.01em; margin-bottom: 8px;
}
.popup-btn-row {
  display: flex; gap: 8px; margin-top: 0px;
}
.popup-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, 0.8); border: 1.5px solid #d4d4d4;
  border-radius: 28px; padding: 5px 14px 5px 10px;
  font-size: 0.88em; font-weight: 500; color: #1a1a1a;
  cursor: pointer; transition: border .16s, background .13s;
  outline: none; box-shadow: 0 1px 4px #1a1a1a0a;
  min-width: 0; user-select: none;
}
.popup-btn:active, .popup-btn:focus {
  background: rgba(243, 243, 247, 0.8); border-color: #bdbdbd;
}
.popup-btn .icon {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1em; margin-right: .1em;
}
.leaflet-marker-icon {
  object-fit: contain !important;
  width: 40px !important;
  height: 54px !important;
  max-width: 100% !important;
  max-height: 100% !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  image-rendering: auto;
}
.popup-btn img {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain !important;
  display: block;
}
.leaflet-control-attribution{display:none}
.leaflet-popup-content { font-size: 0.9rem; margin: 12px 14px; width: 250px !important; box-sizing: border-box; }
.leaflet-popup-content-wrapper {
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.8) !important;
}
.leaflet-popup-tip { background: rgba(255, 255, 255, 0.8) !important; }
.popup-address { font-weight: 600; font-size: 0.88em; margin-bottom: 3px; }
.stay-section {
  border-top: 1px solid #eeeeee;
  margin-top: 10px;
  padding-top: 9px;
}
.stay-heading {
  align-items: center;
  color: #34425b;
  display: flex;
  font-size: 0.76rem;
  gap: 5px;
  margin: 0 0 6px 2px;
}
.stay-heading > span {
  align-items: center;
  background: rgba(255, 241, 214, 0.8);
  border-radius: 6px;
  color: #e58a00;
  display: inline-flex;
  font-size: 0.88rem;
  height: 19px;
  justify-content: center;
  width: 19px;
  animation: starTwinkle 2.4s ease-in-out infinite;
  transform-origin: center;
  will-change: transform;
}
@keyframes starTwinkle {
  0%   { transform: rotate(0deg) scale(1); }
  15%  { transform: rotate(-12deg) scale(1.15); }
  30%  { transform: rotate(10deg) scale(1.08); }
  45%  { transform: rotate(0deg) scale(1); }
  60%  { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(0deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .stay-heading > span { animation: none; }
}
.stay-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; min-height: 42px; }
.stay-card, .stay-empty {
  align-items: center;
  background: linear-gradient(120deg, rgba(255, 249, 239, 0.8), rgba(242, 247, 255, 0.8));
  border: 1px solid #dce7fa;
  border-radius: 11px;
  color: #263551;
  display: flex;
  font-size: 0.72rem;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  text-decoration: none;
}
.stay-card:hover, .stay-empty:hover {
  background: linear-gradient(120deg, rgba(255, 243, 217, 0.85), rgba(234, 243, 255, 0.85));
  border-color: #a9c9f3;
  transform: translateY(-1px);
}
.stay-copy { min-width: 0; flex: 1 1 auto; }
.stay-card strong, .stay-card em { display: block; }
.stay-card em {
  color: #df8500;
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .04em;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.stay-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stay-card b {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  background: linear-gradient(120deg, #ff9a1a, #ff6d00, #e85d04);
  background-size: 200% 200%;
  border-radius: 7px;
  color: #fff;
  font-size: 0.6rem;
  margin-left: auto;
  padding: 6px 8px;
  text-align: center;
  white-space: nowrap;
  animation: profitezGlow 2.4s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(255, 130, 0, 0.55), 0 2px 10px rgba(255, 109, 0, 0.35);
  isolation: isolate;
}
.stay-card b::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.55) 45%, transparent 90%);
  animation: profitezShine 2.8s ease-in-out infinite;
  pointer-events: none;
}
.stay-card:hover b {
  animation-duration: 1.6s;
  transform: scale(1.04);
  transition: transform 0.2s ease;
}
.stay-card:hover b::after {
  animation-duration: 2s;
}
@keyframes profitezGlow {
  0%, 100% {
    background-position: 0% 50%;
    box-shadow: 0 0 8px rgba(255, 130, 0, 0.45), 0 2px 8px rgba(255, 109, 0, 0.3);
  }
  50% {
    background-position: 100% 50%;
    box-shadow: 0 0 16px rgba(255, 160, 0, 0.75), 0 0 24px rgba(255, 109, 0, 0.35);
  }
}
@keyframes profitezShine {
  0% { left: -120%; opacity: 0; }
  12% { opacity: 1; }
  45% { left: 140%; opacity: 1; }
  55%, 100% { left: 140%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .stay-card b,
  .stay-card b::after { animation: none; }
  .stay-card:hover b { transform: none; }
}
.stay-empty { color: #2859cc; font-weight: 700; justify-content: center; }
.stay-loading { display: flex; gap: 5px; padding: 11px 4px; }
.stay-loading i {
  animation: stayPulse 1.1s ease-in-out infinite;
  background: #e7edf7;
  border-radius: 6px;
  display: block;
  height: 10px;
}
.stay-loading i:nth-child(1) { width: 32%; }
.stay-loading i:nth-child(2) { animation-delay: .12s; width: 42%; }
.stay-loading i:nth-child(3) { animation-delay: .24s; width: 20%; }
@keyframes stayPulse {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}
.leaflet-control-zoom{box-shadow:0 2px 8px #0002;border-radius:14px}
::-webkit-scrollbar{width:0;background:transparent}

/* Autocomplétion */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid var(--input-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: -1px;
}
.autocomplete-item {
  padding: 11px 16px;
  cursor: pointer;
  font-size: 0.96rem;
  color: var(--form-txt);
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.08s;
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover,
.autocomplete-item.selected {
  background: #f8f9fa;
}
.autocomplete-item-label {
  font-weight: 500;
  color: #1a1a1a;
}
.autocomplete-item-context {
  font-size: 0.88rem;
  color: #757575;
  margin-top: 2px;
}
/* === SECTION CONTENU EDITORIAL === */
#content-section {
  position: relative;
  z-index: 1;
  background: #f7f8fc;
  padding: 48px 16px 64px;
}
.content-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.content-block {
  background: #fff;
  border-radius: 18px;
  padding: 28px 32px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.content-block h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 14px 0;
}
.content-block p, .content-block li, .content-block dd {
  font-size: 0.97rem;
  color: #444;
  line-height: 1.7;
  margin: 0 0 10px 0;
}
.content-block ol {
  padding-left: 20px;
  margin: 0;
}
.content-block ol li {
  margin-bottom: 8px;
}
.content-block dl {
  margin: 0;
}
.content-block dt {
  font-weight: 600;
  color: #232323;
  font-size: 0.97rem;
  margin-top: 16px;
}
.content-block dt:first-child {
  margin-top: 0;
}
.content-block dd {
  margin: 4px 0 0 0;
}
@media (max-width: 600px) {
  .content-block {
    padding: 20px 16px;
  }
  .content-block h2 {
    font-size: 1.05rem;
  }
}

/* === BARRE À PROPOS (collapsible, crawlable) === */
#about-bar {
  position: fixed;
  bottom: 14px;
  left: 14px;
  z-index: 20;
  font-family: 'Inter', 'Arial', sans-serif;
  max-width: min(420px, calc(100vw - 28px));
}
#about-head {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 999px;
  padding: 4px 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
#about-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.72rem;
  color: #777;
  cursor: pointer;
  font-family: inherit;
}
#about-toggle:hover, .about-link:hover { color: #333; }
.about-link {
  font-size: 0.72rem;
  color: #777;
  text-decoration: none;
}
.about-sep {
  font-size: 0.72rem;
  color: #ccc;
  user-select: none;
}
#about-arrow { transition: transform 0.2s; font-size: 0.65rem; }
#about-bar[data-open="true"] #about-arrow { transform: rotate(180deg); }
#about-content {
  margin-top: 6px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 12px 14px;
  max-height: 38vh;
  overflow-y: auto;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-grid h3 {
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #1a1a2e;
}
.about-grid p, .about-grid li, .about-grid dd {
  font-size: 0.72rem;
  color: #666;
  line-height: 1.5;
  margin: 0 0 3px;
}
.about-grid ol { padding-left: 14px; margin: 0; }
.about-grid dl { margin: 0; }
.about-grid dt { font-weight: 600; font-size: 0.72rem; color: #444; margin-top: 4px; }
.about-grid dt:first-child { margin-top: 0; }
@media (max-width: 600px) {
  #about-bar { bottom: 10px; left: 10px; max-width: calc(100vw - 20px); }
}

/* === PAGES LEGALES === */
.legal-page {
  min-height: 100vh;
  background: #f6f7fa;
  color: #232323;
}
.legal-page main {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}
.legal-back {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #666;
  text-decoration: none;
}
.legal-back:hover { color: #333; }
.legal-page h1 {
  font-size: 1.5rem;
  margin: 0 0 8px;
}
.legal-page h2 {
  font-size: 1rem;
  margin: 24px 0 8px;
}
.legal-page p, .legal-page li {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #444;
}
.legal-page a { color: #25bb76; }
