/* ══ VARIABLES ═══════════════════════════════════════════════════ */
:root {
  --orange:    #EF7900;
  --orange-lt: #FFF3E6;
  --orange-brd:#FED7AA;
  --navy:      #0D1A8C;
  --navy-lt:   #EEF1FF;
  --dark:      #1F2937;
  --gray-bg:   #F3F4F6;
  --gray-brd:  #E5E7EB;
  --text:      #111827;
  --muted:     #6B7280;
  --green:     #10B981;
  --green-dk:  #065F46;
  --red:       #EF4444;
  --radius-md: 12px;
  --radius-lg: 16px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  background: #fff;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
}
body { display: flex; flex-direction: column; }

/* ══ ONGLETS ════════════════════════════════════════════════════ */
.loc-tabs {
  display: flex; border-bottom: 2px solid var(--gray-brd); flex-shrink: 0;
}
.loc-tab {
  flex: 1; padding: 13px 8px; border: none; background: none;
  font-size: 13px; font-weight: 700; color: var(--muted);
  cursor: pointer; transition: color .15s; display: flex;
  align-items: center; justify-content: center; gap: 6px;
}
.loc-tab.active {
  color: var(--navy);
  border-bottom: 2.5px solid var(--navy); margin-bottom: -2px;
}

/* ══ PANELS ══════════════════════════════════════════════════════ */
.loc-panel { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.loc-panel.active { display: flex; }

/* ══ PANEL QUARTIER ═════════════════════════════════════════════ */
.panel-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.panel-intro {
  padding: 16px 16px 0;
  font-size: 14px; color: var(--muted); line-height: 1.6;
}

/* Autocomplete */
.ac-wrap { position: relative; padding: 14px 16px 0; }
.ac-input {
  width: 100%;
  border: 1.5px solid var(--gray-brd); border-radius: var(--radius-md);
  padding: 12px 40px 12px 42px;
  font-size: 14px; color: var(--text); outline: none;
  background: #FAFAFA; font-family: inherit;
  transition: border-color .2s;
}
.ac-input:focus { border-color: var(--navy); background: #fff; }
.ac-search-icon {
  position: absolute; left: 28px; top: 26px;
  color: var(--muted); font-size: 16px; pointer-events: none;
}
.ac-clear {
  position: absolute; right: 28px; top: 26px;
  background: none; border: none; font-size: 16px;
  color: var(--muted); cursor: pointer; display: none;
  line-height: 1; padding: 2px;
  transition: color .15s;
}
.ac-clear:hover { color: var(--text); }

/* Dropdown */
.ac-list {
  margin: 8px 16px 0;
  border: 1.5px solid var(--gray-brd); border-radius: var(--radius-md);
  overflow-y: auto; max-height: 220px;
  background: #fff; display: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.ac-item {
  padding: 11px 14px; font-size: 13px; color: var(--text);
  cursor: pointer; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--gray-bg);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover,
.ac-item.hl { background: var(--navy-lt); color: var(--navy); }
.ac-item i   { color: var(--muted); font-size: 14px; flex-shrink: 0; }
.ac-item-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ac-empty    { padding: 14px; font-size: 13px; color: var(--muted); text-align: center; }

/* Sélection active */
.ac-selected {
  margin: 10px 16px 0;
  background: var(--navy-lt); border: 1.5px solid var(--navy);
  border-radius: var(--radius-md); padding: 12px 14px;
  display: none; align-items: center; gap: 10px;
}
.ac-sel-icon { font-size: 20px; flex-shrink: 0; }
.ac-sel-info { flex: 1; }
.ac-sel-label { font-size: 13px; font-weight: 700; color: var(--navy); }
.ac-sel-sub   { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ac-sel-change {
  font-size: 12px; color: var(--orange); cursor: pointer;
  font-weight: 700; white-space: nowrap;
  text-decoration: underline; text-underline-offset: 2px;
}

/* Hint */
.loc-hint {
  padding: 10px 16px 0;
  font-size: 12px; color: var(--muted); line-height: 1.6;
}

/* Chips populaires */
.pop-label {
  padding: 14px 16px 6px;
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px;
}
.pop-chips {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px;
}
.pop-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1.5px solid var(--gray-brd); border-radius: 20px;
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  color: var(--text); background: #fff; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.pop-chip:hover { border-color: var(--navy); background: var(--navy-lt); color: var(--navy); }
.pop-chip i { color: var(--orange); font-size: 12px; }

/* Notice */
.loc-notice {
  margin: 0 16px 14px;
  background: var(--orange-lt); border: 1px solid var(--orange-brd);
  border-radius: 10px; padding: 10px 12px;
  font-size: 12px; color: #92400E;
  display: flex; gap: 8px; align-items: flex-start; line-height: 1.5;
}
.loc-notice i { flex-shrink: 0; margin-top: 1px; color: var(--orange); }

/* Bouton confirmer */
.btn-confirm {
  display: none; margin: 0 16px 16px;
  width: calc(100% - 32px);
  background: var(--orange); color: #fff;
  border: none; border-radius: var(--radius-md);
  padding: 14px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .15s;
  align-items: center; justify-content: center; gap: 8px;
}
.btn-confirm.visible { display: flex; }
.btn-confirm:hover   { background: #d46a00; }
.btn-confirm.success { background: var(--green-dk); }

/* ══ PANEL GPS ═══════════════════════════════════════════════════ */
.map-wrap {
  flex: 1; position: relative;
  background: #e8eef4; overflow: hidden; min-height: 250px;
}
.map-svg { width: 100%; height: 100%; display: block; }

.map-locate-btn {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: var(--navy); color: #fff; border: none;
  border-radius: var(--radius-md); padding: 12px 24px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(13,26,140,.3);
  display: flex; align-items: center; gap: 8px;
  transition: background .2s, opacity .2s;
}
.map-locate-btn.located { background: var(--orange); }
.map-locate-btn:disabled { opacity: .65; cursor: not-allowed; }

.map-address-bar {
  padding: 12px 16px;
  background: #fff; border-top: 1px solid var(--gray-brd);
  font-size: 13px; color: var(--muted);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; min-height: 50px;
}
.map-addr-text { flex: 1; color: var(--text); font-weight: 700; }
.map-addr-placeholder { flex: 1; color: var(--muted); font-size: 12px; }

.map-notice {
  margin: 8px 16px 0;
  background: #F0FDF4; border: 1px solid #BBF7D0;
  border-radius: 10px; padding: 10px 12px;
  font-size: 12px; color: var(--green-dk);
  display: flex; gap: 8px; align-items: flex-start; line-height: 1.5;
}
.map-notice i { flex-shrink: 0; margin-top: 1px; color: var(--green); }

/* ── Toast ────────────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark); color: #fff;
  padding: 11px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  opacity: 0; transition: all .25s;
  pointer-events: none; z-index: 500; white-space: nowrap;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Fil d'Ariane ────────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.bc-step      { color: var(--muted); font-weight: 600; text-decoration: none; }
.bc-step.done { color: var(--navy); }
.bc-step.done:hover { text-decoration: underline; }
.bc-sep       { color: var(--gray-brd); font-size: 14px; }
.bc-step:last-child { color: var(--text); }

/* ── Avatar + bulle dialogue ─────────────────────────────────────── */
.avatar-row {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px;
}
.avatar-wrap  { text-align: center; flex-shrink: 0; }
.avatar-img {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.avatar-name {
  font-size: 11px; color: var(--muted);
  text-align: center; margin-top: 4px; font-weight: 600;
}
.bubble {
  background: #fff;
  border: 1px solid var(--gray-brd);
  border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: 12px 14px;
  font-size: 14px; color: var(--text); font-style: italic;
  flex: 1; line-height: 1.5;
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
}

/* ══ PAGE ════════════════════════════════════════════════════════ */
.page { max-width: 520px; margin: 0 auto; padding: 9px 14px 0; }
