*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:       #1aab8a;
  --teal-dark:  #0d7a64;
  --navy:       #0d2b2b;
  --bg:         #eef4f3;
  --white:      #ffffff;
  --text-muted: #5a7070;
  --pill-bg:    #dff0ec;
  --radius-pill:50px;
  --font: 'Plus Jakarta Sans', sans-serif;
}

html, body { font-family: var(--font); background: var(--bg); color: var(--navy); -webkit-font-smoothing: antialiased; }

/* ═══ NAV ═══ */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(13,43,43,.07);
  box-shadow: 0 1px 0 rgba(13,43,43,.02);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.lang-dropdown-wrap { position: relative; }
.lang-dropdown-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(13,43,43,.06); border: none; cursor: pointer;
  font-family: var(--font); font-size: .82rem; font-weight: 700;
  color: var(--navy); padding: 7px 12px; border-radius: 20px;
  transition: background .15s;
}
.lang-dropdown-btn:hover { background: rgba(13,43,43,.11); }
.lang-dropdown-menu {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--white); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(13,43,43,.13);
  border: 1px solid rgba(13,43,43,.08);
  overflow: hidden; min-width: 140px;
  animation: dropIn .15s ease; z-index: 200;
}
.lang-dropdown-menu.open { display: block; }
.lang-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 10px 14px;
  background: none; border: none; cursor: pointer;
  font-family: var(--font); font-size: .84rem; font-weight: 600;
  color: var(--navy); text-align: left; transition: background .15s;
}
.lang-dropdown-item:hover { background: var(--bg); }
.lang-dropdown-item.active { color: var(--teal); }
@media (max-width: 480px) { .lang-dropdown-wrap { font-size: .74rem; } }

.logo {
  display: flex; align-items: center;
  font-family: var(--font); font-size: 1.2rem; font-weight: 800;
  letter-spacing: -.02em; gap: 4px; text-decoration: none;
}
.logo-img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.logo .l1 { color: var(--navy); }
.logo .l2 { color: var(--teal); }

.btn-pro {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal); color: var(--white);
  padding: 10px 22px; border-radius: var(--radius-pill);
  font-family: var(--font); font-weight: 700; font-size: .88rem;
  text-decoration: none; border: none; cursor: pointer;
  transition: background .22s, transform .18s, box-shadow .22s;
  box-shadow: 0 4px 18px rgba(26,171,138,.28);
}
.btn-pro:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(26,171,138,.38); }

.burger { display: none !important; }

.mobile-menu { max-height: 0; overflow: hidden; transition: max-height .3s ease; border-top: 1px solid transparent; }
.mobile-menu.open { max-height: 400px; border-top-color: rgba(13,43,43,.07); }
.mobile-menu ul { list-style: none; padding: 12px 24px 18px; display: flex; flex-direction: column; }
.mobile-menu a { display: block; padding: 14px 4px; color: var(--navy); text-decoration: none; font-size: 1rem; font-weight: 600; border-bottom: 1px solid rgba(13,43,43,.05); transition: color .2s; }
.mobile-menu li:last-child a { border-bottom: none; }
.mobile-menu a:hover { color: var(--teal); }

.nav-pro { position: relative; }
.dropdown {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--white); border-radius: 14px;
  box-shadow: 0 8px 32px rgba(13,43,43,.14);
  border: 1px solid rgba(13,43,43,.08);
  min-width: 244px; overflow: hidden;
  animation: dropIn .18s ease; z-index: 200;
}
.dropdown.open { display: block; }
@keyframes dropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.dropdown-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; cursor: pointer;
  transition: background .15s; text-decoration: none; color: var(--navy);
}
.dropdown-item:hover { background: var(--bg); }
.dropdown-item:not(:last-child) { border-bottom: 1px solid rgba(13,43,43,.06); }
.dropdown-item-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--pill-bg); display: grid; place-items: center; font-size: 1rem; flex-shrink: 0; }
.dropdown-item-title { font-size: .85rem; font-weight: 700; color: var(--navy); }
.dropdown-item-desc  { font-size: .74rem; color: var(--text-muted); margin-top: 1px; }

/* ═══ CHATBOT ═══ */
.page { display: flex; flex-direction: column; height: calc(100dvh - 65px); max-width: 900px; margin: 0 auto; }
.chat-area { flex: 1; overflow-y: auto; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #b2ddd5 transparent; display: flex; flex-direction: column; }
.chat-area::-webkit-scrollbar { width: 4px; }
.chat-area::-webkit-scrollbar-thumb { background: #b2ddd5; border-radius: 4px; }

.welcome-screen { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 24px; gap: 10px; }
.welcome-screen.hidden { display: none; }
.welcome-logo { width: 72px; height: 72px; object-fit: contain; margin-bottom: 4px; animation: floatLogo 3s ease-in-out infinite; }
@keyframes floatLogo { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
.welcome-title { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; color: var(--navy); }
.welcome-subtitle { font-size: .97rem; color: var(--text-muted); text-align: center; line-height: 1.6; max-width: 440px; }

.suggestions { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; width: 100%; max-width: 680px; margin-top: 24px; }
.suggestion-card { background: var(--white); border: 1.5px solid rgba(13,43,43,.1); border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .15s; text-align: left; font-family: var(--font); display: flex; flex-direction: row; align-items: center; gap: 12px; }
.suggestion-card:hover { border-color: var(--teal); box-shadow: 0 4px 20px rgba(26,171,138,.12); transform: translateY(-2px); }
.suggestion-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--pill-bg); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.suggestion-text { font-size: .88rem; font-weight: 600; color: var(--navy); line-height: 1.4; }

.messages { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.messages.hidden { display: none; }
.msg { max-width: 78%; padding: 11px 16px; border-radius: 18px; font-size: .9rem; line-height: 1.55; word-break: break-word; animation: msgIn .25s ease; }
@keyframes msgIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.msg.bot { background: var(--white); border: 1px solid rgba(13,43,43,.1); color: var(--navy); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: linear-gradient(135deg,var(--teal-dark),var(--teal)); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing-bubble { background: var(--white); border: 1px solid rgba(13,43,43,.1); align-self: flex-start; border-bottom-left-radius: 4px; padding: 12px 16px; }
.typing-inner { display: flex; align-items: center; gap: 8px; }
.typing-label { font-size: .78rem; color: var(--teal-dark); font-weight: 500; font-style: italic; }
.dots { display: flex; gap: 3px; align-items: center; }
.dots span { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); animation: bounce 1.2s infinite; display: block; }
.dots span:nth-child(2){animation-delay:.2s} .dots span:nth-child(3){animation-delay:.4s}
@keyframes bounce{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-5px)}}

.cards-wrap { width: 100%; align-self: flex-start; }
.cards-row { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #b2ddd5 transparent; }
.cards-row::-webkit-scrollbar { height: 3px; }
.cards-row::-webkit-scrollbar-thumb { background: #b2ddd5; border-radius: 4px; }
.sc-card { min-width: 190px; max-width: 190px; background: #fff; border-radius: 12px; border: 1px solid #c8e6df; overflow: hidden; scroll-snap-align: start; flex-shrink: 0; box-shadow: 0 2px 10px rgba(13,43,43,.1); display: flex; flex-direction: column; }
.sc-cph { width: 100%; height: 105px; background: #d0ede7; display: flex; align-items: center; justify-content: center; font-size: 34px; }
.sc-cimg { width: 100%; height: 105px; object-fit: cover; display: block; background: #e4f4f0; }
.sc-cbody { padding: 9px 10px 6px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.sc-ctitle { font-size: 12.5px; font-weight: 700; color: #111827; line-height: 1.3; }
.sc-csub { font-size: 11px; color: #6b7280; line-height: 1.35; }
.sc-cbtns { display: flex; flex-direction: column; border-top: 1px solid #f0f0f0; margin-top: 6px; }
.sc-cbtn { display: block; padding: 7px 8px; font-size: 11.5px; font-weight: 600; text-align: center; border: none; border-top: 1px solid #f0f0f0; background: #fff; cursor: pointer; text-decoration: none; font-family: var(--font); line-height: 1.3; width: 100%; }
.sc-cbtn:first-child { border-top: none; }
.sc-cbtn:hover { background: #edf7f4; }
.sc-cbtn.sc-post { color: var(--teal); }
.sc-cbtn.sc-url { color: #2563eb; }
.sc-cbtn:disabled { opacity: .4; cursor: not-allowed; }
.swipe-hint { font-size: 10.5px; color: #9ca3af; display: block; margin-top: 4px; text-align: center; }
.sc-map-focus { position: relative; width: 100%; height: 320px; border-radius: 12px; overflow: hidden; border: 1px solid #c8e6df; flex-shrink: 0; }
.sc-map-leaflet { position: absolute; inset: 0; }
.sc-map-focus .leaflet-control-attribution { font-size: 9px; }
.sc-carousel-fade { position: absolute; bottom: 0; left: 0; right: 0; height: 76px; z-index: 890; pointer-events: none; background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,.92) 52%); }
.sc-carousel { position: absolute; bottom: 0; left: 0; right: 0; z-index: 900; display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; }
.sc-carousel::-webkit-scrollbar { display: none; }
.sc-carousel-item { flex-shrink: 0; background: #fff; border-radius: 10px; padding: 7px 11px; min-width: 210px; max-width: 250px; box-shadow: 0 2px 14px rgba(0,0,0,.14); cursor: pointer; border: 2px solid transparent; transition: border-color .2s, box-shadow .2s; }
.sc-carousel-item.active { border-color: #0d9488; box-shadow: 0 4px 18px rgba(13,148,136,.22); }
.sc-carousel-name { font-size: 12.5px; font-weight: 700; color: var(--navy); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-carousel-sub { font-size: 10.5px; color: #6b7280; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.sc-carousel-cta { display: block; margin-top: 3px; color: #0d9488; font-size: 11.5px; font-weight: 600; background: none; border: none; cursor: pointer; font-family: var(--font); padding: 0; text-align: left; }
.sc-view-toggle { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 8px; padding: 8px 12px; background: none; border: 1.5px solid var(--teal); border-radius: 8px; color: var(--teal); font-size: 12.5px; font-weight: 600; font-family: var(--font); cursor: pointer; transition: background .15s; }
.sc-view-toggle:hover { background: #edf7f4; }
@keyframes scFadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.sc-fade { animation: scFadeIn .22s ease forwards; }

.input-bar { padding: 16px 20px 20px; background: transparent; flex-shrink: 0; }
.input-wrapper { display: flex; align-items: flex-end; gap: 12px; }
.new-chat-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid rgba(13,43,43,.12); background: var(--white); font-size: 1.3rem; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color .2s, color .2s; margin-bottom: 2px; }
.new-chat-btn:hover { border-color: var(--teal); color: var(--teal); }
.input-box { flex: 1; border: 1.5px solid rgba(13,43,43,.12); border-radius: 16px; background: var(--white); display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; transition: border-color .2s, box-shadow .2s; }
.input-box:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(26,171,138,.1); }
.input-row { display: flex; align-items: center; gap: 10px; }
#chat-input { flex: 1; border: none; background: transparent; font-family: var(--font); font-size: .92rem; color: var(--navy); outline: none; resize: none; line-height: 1.5; max-height: 120px; overflow-y: auto; }
#chat-input::placeholder { color: #aabdba; }
.geo-btn {
  width: 30px; height: 30px; border-radius: 50%;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--text-muted);
  transition: color .2s;
}
.geo-btn:hover { color: var(--teal); }
.geo-btn svg { width: 18px; height: 18px; }
.geo-btn.locating { color: var(--teal); }
.geo-btn.locating svg { animation: geoPulse .7s ease-in-out infinite; }
.geo-btn.located { color: var(--teal); }
@keyframes geoPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }

/* ── Modal géolocalisation refusée ── */
.geo-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(13,43,43,.45); z-index: 3000;
  align-items: center; justify-content: center; padding: 24px;
}
.geo-modal-overlay.geo-modal-visible { display: flex; }
.geo-modal {
  background: #fff; border-radius: 16px; padding: 24px;
  max-width: 340px; width: 100%;
  box-shadow: 0 8px 32px rgba(13,43,43,.18);
  animation: msgIn .22s ease;
}
.geo-modal-title { font-size: 1rem; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.geo-modal-body { font-size: .88rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 18px; }
.geo-modal-ok {
  width: 100%; padding: 10px; background: var(--teal);
  color: #fff; border: none; border-radius: 10px;
  font-family: var(--font); font-size: .9rem; font-weight: 700;
  cursor: pointer; transition: background .2s;
}
.geo-modal-ok:hover { background: var(--teal-dark); }

/* ── Toast géolocalisation accordée ── */
.geo-toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--navy); color: #fff;
  padding: 10px 20px; border-radius: 50px;
  font-family: var(--font); font-size: .84rem; font-weight: 600;
  box-shadow: 0 4px 16px rgba(13,43,43,.25);
  z-index: 3000; pointer-events: none;
  opacity: 0; transition: opacity .25s, transform .25s;
  white-space: nowrap;
}
.geo-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

#send-btn { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,var(--teal-dark),var(--teal)); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 3px 10px rgba(26,171,138,.4); transition: transform .15s, box-shadow .15s, opacity .2s; opacity: .5; }
#send-btn.active { opacity: 1; }
#send-btn:hover.active { transform: scale(1.08); box-shadow: 0 5px 16px rgba(26,171,138,.55); }
#send-btn svg { width: 15px; height: 15px; fill: #fff; }
.input-actions { display: flex; align-items: center; gap: 8px; }
.action-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--white); border: 1px solid rgba(13,43,43,.1); border-radius: 50px; padding: 5px 12px; font-family: var(--font); font-size: .76rem; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: border-color .2s, color .2s; }
.action-chip:hover { border-color: var(--teal); color: var(--teal); }
.action-chip svg { width: 13px; height: 13px; }
.disclaimer { text-align: center; font-size: .73rem; color: #aabdba; margin-top: 10px; }

@media (max-width: 768px) {
  .nav-inner { padding: 12px 20px; }
  .logo { font-size: 1.1rem; }
}
@media (max-width: 600px) {
  .page { max-width: 100%; }
  .suggestions { grid-template-columns: 1fr 1fr; gap: 10px; }
  .welcome-title { font-size: 1.6rem; }
  .messages { padding: 16px; }
  .chat-area { padding-bottom: 90px; }
  .sc-view-toggle { display: none; }
  .input-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: 10px 12px env(safe-area-inset-bottom, 12px);
    background: var(--bg);
    z-index: 2000;
  }
  #chat-input { font-size: 16px; }
}
@media (max-width: 480px) {
  .nav-inner { padding: 10px 12px; gap: 8px; }
  .logo { font-size: 1rem; }
}
@media (max-width: 400px) { .suggestions { grid-template-columns: 1fr; } }

/* ═══ PAGES SPÉCIALITÉ / VILLE ═══ */
.page-intro {
  padding: 14px 24px 16px;
  border-bottom: 1px solid rgba(13,43,43,.07);
  margin-bottom: 4px;
}
.page-intro h1 {
  font-size: 1.15rem; font-weight: 800; color: var(--navy);
  letter-spacing: -.02em; margin-bottom: 5px;
}
.page-intro p { font-size: .83rem; color: var(--text-muted); line-height: 1.6; }

@media (max-width: 600px) {
  .page-intro { padding: 10px 16px 14px; }
  .page-intro h1 { font-size: .95rem; }
  .page-intro p { font-size: .78rem; }
}
.page.compact { height: calc(100dvh - 65px); }