/* ========================================================
   CORRECTIONS DE STRUCTURE ET LISIBILITÉ - VERSION IA
   ======================================================== */

/* Forcer la mise en page Desktop avec Sidebar fixe et Workspace fluide */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: #f4f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
}

.app {
  display: flex !important;
  flex-direction: row !important;
  min-height: 100vh !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Sidebar sombre permanente */
.sidebar {
  width: 260px !important;
  flex: 0 0 260px !important;
  background: #0b1018 !important;
  color: #f8fafc !important;
  padding: 24px 20px !important;
  display: flex !important;
  flex-direction: column !important;
  position: sticky !important;
  top: 0 !important;
  height: 100vh !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  z-index: 10 !important;
  border-right: 1px solid #1e293b !important;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 20px;
}
.sidebar .brand span span {
  color: #ff4938;
}

.sidebar .property {
  display: block !important;
  background: #151d28;
  border: 1px solid #233144;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 20px;
}
.sidebar .property img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}
.sidebar .property h2 {
  font-size: 13px !important;
  color: #ffffff !important;
  margin: 4px 0 !important;
}
.sidebar .property p {
  font-size: 10px !important;
  color: #94a3b8 !important;
  margin: 0 0 8px 0 !important;
}

.sidebar nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
}
.sidebar nav a {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  color: #94a3b8 !important;
  text-decoration: none !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  transition: background 0.15s, color 0.15s !important;
}
.sidebar nav a:hover {
  background: #192230 !important;
  color: #ffffff !important;
}
.sidebar nav a[aria-current="page"] {
  background: #1e293b !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-left: 3px solid #ff4938 !important;
}
.sidebar nav .nav-rank {
  width: 22px !important;
  height: 22px !important;
  border-radius: 6px !important;
  background: #233144 !important;
  color: #94a3b8 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 10px !important;
  font-weight: 700 !important;
}
.sidebar nav a[aria-current="page"] .nav-rank {
  background: #ff4938 !important;
  color: #ffffff !important;
}

.workspace {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #f8fafc !important;
}

.topbar {
  height: 60px !important;
  padding: 0 32px !important;
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

main {
  padding: 32px !important;
  max-width: 1200px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* ========================================================
   RÉSOLUTION DES COLLISIONS DE TEXTE (STYLE.CSS OVERRIDES)
   ======================================================== */

/* Annuler complètement les règles grid héritées de journey-overview */
.journey-overview,
.journey-overview a,
.journey-overview div {
  display: block !important;
  grid-template-columns: none !important;
  align-items: initial !important;
}

/* Cartes épurées et lisibles */
.clean-step-card {
  display: block !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  text-decoration: none !important;
  color: #1e293b !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
  transition: transform 0.15s, border-color 0.15s !important;
}
.clean-step-card:hover {
  transform: translateY(-2px) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06) !important;
}
.clean-step-card-head {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 8px !important;
}
.clean-step-card-head .step-num {
  width: 26px !important;
  height: 26px !important;
  border-radius: 8px !important;
  background: #ebf8fa !important;
  color: #0284c7 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.clean-step-card-head strong {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}
.clean-step-card p {
  font-size: 11px !important;
  color: #64748b !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

/* Grille des étapes sur la vue d'ensemble */
.steps-dashboard-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  gap: 16px !important;
  margin-top: 16px !important;
}

/* ========================================================
   COMPOSANTS IA MODERNES ET NETS
   ======================================================== */

.ai-hero-action {
  background: #0f172a !important;
  color: #ffffff !important;
  border-radius: 14px !important;
  padding: 24px 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  margin-bottom: 24px !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08) !important;
}
.ai-hero-action h3 {
  font-size: 17px !important;
  color: #ffffff !important;
  margin: 0 0 6px 0 !important;
  font-weight: 600 !important;
}
.ai-hero-action p {
  color: #94a3b8 !important;
  font-size: 12px !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}
.ai-hero-action .btn-ai,
.btn-ai {
  background: #ff4938 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 30px !important;
  padding: 10px 22px !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}
.btn-ai:hover {
  background: #e03b2c !important;
}

.ai-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  margin-bottom: 24px;
}

/* CARTE SOMBRE ÉVALUATION HAUTE LISIBILITÉ */
.ai-card-dark {
  background: #0b1018 !important;
  color: #f8fafc !important;
  border: 1px solid #233144 !important;
  border-radius: 14px !important;
  padding: 24px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
  margin-bottom: 24px;
}
.ai-card-dark .eyebrow {
  color: #38bdf8 !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 0.06em !important;
}
.valuation-big-price {
  font-size: 38px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: -0.03em !important;
  margin: 10px 0 !important;
  display: flex !important;
  align-items: baseline !important;
  gap: 8px !important;
}
.valuation-currency {
  font-size: 18px !important;
  font-weight: 500 !important;
  color: #38bdf8 !important;
}
.valuation-range {
  font-size: 13px !important;
  color: #cbd5e1 !important;
  margin-bottom: 18px !important;
}
.valuation-range strong {
  color: #ffffff !important;
}
.valuation-subgrid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  border-top: 1px solid #233144 !important;
  padding-top: 16px !important;
}
.valuation-sublabel {
  font-size: 10.5px !important;
  color: #94a3b8 !important;
  display: block !important;
  margin-bottom: 4px !important;
}
.valuation-subvalue {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
}

/* Grille des documents */
.docs-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
}
.doc-box {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 125px !important;
  transition: all 0.2s ease !important;
}
.doc-box.loaded {
  border-color: #22c55e !important;
  background: #f0fdf4 !important;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.08) !important;
}
.doc-box.loaded .doc-status {
  color: #15803d !important;
  font-weight: 600 !important;
  font-size: 11px !important;
}
.doc-box.loaded .doc-title {
  color: #0f172a !important;
}
.btn-view-doc {
  background: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid #0f172a !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  cursor: pointer !important;
}
.btn-view-doc:hover {
  background: #1e293b !important;
  color: #ffffff !important;
}
.doc-box-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
}
.doc-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: #e0f2fe !important;
  color: #0369a1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 11px !important;
}
.doc-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}
.doc-status {
  font-size: 10px !important;
  color: #64748b !important;
  margin-top: 2px !important;
}
.doc-actions {
  display: flex !important;
  gap: 8px !important;
  margin-top: 14px !important;
  align-items: center !important;
}

.btn-mini {
  padding: 5px 10px !important;
  font-size: 10px !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  cursor: pointer !important;
}
.btn-mini:hover {
  background: #f1f5f9 !important;
}

/* Grille des faits extraits */
.facts-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
  gap: 14px !important;
  margin-top: 16px !important;
}
.fact-card {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
}
.fact-card label {
  display: block !important;
  font-size: 10px !important;
  color: #64748b !important;
  margin-bottom: 4px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  font-weight: 600 !important;
}
.fact-card input, .fact-card select {
  width: 100% !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  padding: 2px 0 !important;
}
.fact-card input:focus, .fact-card select:focus {
  border-bottom: 1px solid #0284c7 !important;
  outline: none !important;
  background: #ffffff !important;
}
.fact-source {
  font-size: 9px !important;
  color: #94a3b8 !important;
  margin-top: 4px !important;
}

/* Onglets */
.clean-tabs {
  display: flex !important;
  gap: 8px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  margin-bottom: 20px !important;
}
.clean-tab {
  padding: 10px 18px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #64748b !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  cursor: pointer !important;
}
.clean-tab.active {
  color: #0f172a !important;
  font-weight: 600 !important;
  border-bottom-color: #ff4938 !important;
}

/* Table portails */
.portal-table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin-top: 14px !important;
}
.portal-table th {
  text-align: left !important;
  font-size: 10px !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 10px 14px !important;
  border-bottom: 2px solid #e2e8f0 !important;
}
.portal-table td {
  padding: 14px !important;
  border-bottom: 1px solid #edf2f7 !important;
  font-size: 12px !important;
  vertical-align: middle !important;
}
.portal-badge {
  display: inline-block !important;
  padding: 3px 8px !important;
  border-radius: 12px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}
.portal-badge.online { background: #def7ec !important; color: #03543f !important; }
.portal-badge.ready { background: #fef08a !important; color: #854d0e !important; }
.portal-badge.paused { background: #f1f5f9 !important; color: #475569 !important; }

/* Textarea IA */
.ai-text-area {
  width: 100% !important;
  min-height: 180px !important;
  padding: 14px !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  box-sizing: border-box !important;
}

/* ========================================================
   CONCIERGE IA & RAG SAVOIR SUISSE - TIROIR LATÉRAL
   ======================================================== */
#concierge-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0b1018;
  color: #ffffff;
  border: 1px solid #1e293b;
  padding: 12px 18px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  z-index: 100;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#concierge-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
  background: #151d28;
}
.concierge-pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  display: inline-block;
}

#concierge-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
#concierge-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

#concierge-drawer {
  position: fixed;
  top: 0;
  right: -500px;
  width: 480px;
  max-width: 92vw;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transition: right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
#concierge-drawer.open {
  right: 0;
}

.concierge-header {
  padding: 18px 22px;
  background: #0b1018;
  color: #ffffff;
  border-bottom: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.concierge-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.concierge-header p {
  margin: 3px 0 0;
  font-size: 11px;
  color: #94a3b8;
}
.concierge-close {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.concierge-close:hover {
  color: #ffffff;
}

.concierge-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #f8fafc;
}

.concierge-search-wrap {
  position: relative;
}
.concierge-search-wrap input {
  width: 100%;
  padding: 12px 40px 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  background: #ffffff;
  box-sizing: border-box;
  color: #0f172a;
}
.concierge-search-wrap input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.concierge-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #64748b;
}

.concierge-filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.concierge-filter-pill {
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.concierge-filter-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.concierge-faq-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.concierge-faq-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}
.concierge-faq-card strong {
  font-size: 12.5px;
  color: #1e293b;
  display: block;
}
.concierge-faq-card small {
  font-size: 10.5px;
  color: #64748b;
  display: block;
  margin-top: 2px;
}
.concierge-faq-arrow {
  color: #94a3b8;
  font-weight: 700;
  font-size: 14px;
}

/* DISCUSSION RAG */
.concierge-chat-history {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-bubble-user {
  align-self: flex-end;
  background: #2563eb;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 14px 14px 2px 14px;
  max-width: 85%;
  font-size: 12.5px;
  line-height: 1.45;
}
.chat-bubble-ai {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  padding: 14px 16px;
  border-radius: 14px 14px 14px 2px;
  max-width: 95%;
  font-size: 12.5px;
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.chat-bubble-ai strong {
  color: #0f172a;
}
.chat-bubble-ai .rag-source {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  font-size: 10.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========================================================
   MODULE AUDIT GÉOSPATIAL & VIE DE QUARTIER (GOOGLE MAPS & SWISSTOPO)
   ======================================================== */
.geo-audit-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.geo-audit-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.geo-tag-live {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}
.geo-tag-live::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}
.geo-grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 992px) {
  .geo-grid-main {
    grid-template-columns: 1fr;
  }
}
.geo-map-container {
  background: #0f172a;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  position: relative;
  display: flex;
  flex-direction: column;
}
.geo-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 11px;
  border-bottom: 1px solid #1e293b;
}
.geo-map-switch {
  display: flex;
  gap: 4px;
}
.geo-map-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}
.geo-map-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.geo-map-frame {
  width: 100%;
  height: 290px;
  border: none;
  background: #e2e8f0;
}
.geo-poi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  background: #151d28;
  border-top: 1px solid #1e293b;
}
.geo-poi-chip {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
}
.geo-poi-chip:hover, .geo-poi-chip.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* 4 METRICS DE QUARTIER */
.geo-scores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.geo-score-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.geo-score-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 8px;
}
.geo-score-num {
  font-size: 11.5px;
  font-weight: 800;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 5px;
  display: inline-block;
}
.geo-score-num.blue {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.geo-score-num.amber {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}
.geo-score-card h4 {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}
.geo-score-card p {
  font-size: 11px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

/* SIMULATEUR DE TRAJET PENDULAIRE */
.geo-commute-section {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 16px 18px;
  margin-top: 18px;
}
.geo-commute-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.geo-dest-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.geo-dest-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.geo-dest-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}
.geo-commute-result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
}
.geo-commute-metric {
  display: flex;
  align-items: center;
  gap: 10px;
}
.geo-commute-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.geo-commute-data strong {
  display: block;
  font-size: 13.5px;
  color: #0f172a;
}
.geo-commute-data span {
  font-size: 10.5px;
  color: #64748b;
}



/* Scoped correction: sourced map block only. */
.geo-source-block h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.35; }
.geo-source-block .geo-audit-header p:not(.eyebrow), .geo-source-block .geo-source-footer p,
.geo-source-block .geo-source-list p { font-size: 14px; line-height: 1.65; color: var(--muted, #64748b); }
.geo-source-block .geo-map-toolbar { flex-wrap: wrap; gap: 12px; }
.geo-source-block .geo-map-toolbar > span { flex: 1 1 240px; font-weight: 600; }
.geo-source-block .geo-map-frame { display: block; width: 100%; height: 460px; border: 0; background: var(--surface, #f8fafc); }
.geo-source-block .geo-source-footer { margin-top: 14px; }
.geo-source-block .geo-source-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 20px; }
.geo-source-block .geo-source-list article { border-top: 1px solid var(--line, #e2e8f0); padding-top: 12px; }
.geo-source-block .geo-source-list h4 { margin: 0; font-size: 15px; }
.geo-source-block .geo-source-list a { font-size: 14px; text-decoration: underline; }
@media (max-width: 620px) { .geo-source-block .geo-source-list { grid-template-columns: 1fr; } .geo-source-block .geo-map-frame { height: 360px; } }

.geo-source-block .geo-map-consent { padding: 32px 24px; background: var(--surface, #f8fafc); color: var(--ink, #121212); }
.geo-source-block .geo-map-consent p { font-size: 14px; line-height: 1.65; }

/* Toast d'erreur IA (17.10.2026) : lisible, plus long */
#toast.error{background:#7f1d1d;border-color:#fca5a5;color:#fff}

/* Fenêtre « L’IA travaille » (Miguel, 18.10) : au-dessus de tout, jusqu’à la fin du traitement. */
#ai-busy-overlay{position:fixed;inset:0;z-index:10000;display:none;align-items:center;justify-content:center;background:rgba(11,16,24,.72);backdrop-filter:blur(3px)}
#ai-busy-overlay.open{display:flex}
.ai-busy-card{background:#fff;color:#0f172a;border-radius:16px;padding:28px 32px;max-width:420px;width:calc(100% - 40px);text-align:center;box-shadow:0 24px 60px rgba(0,0,0,.35)}
.ai-busy-card strong{display:block;font-size:17px;margin:14px 0 6px}
.ai-busy-card p{font-size:13px;color:#334155;margin:0 0 10px;line-height:1.5}
.ai-busy-card small{font-size:11px;color:#64748b}
.ai-busy-ring{width:44px;height:44px;margin:0 auto;border-radius:50%;border:4px solid #e2e8f0;border-top-color:#ff4938;animation:ai-busy-spin .9s linear infinite}
@keyframes ai-busy-spin{to{transform:rotate(360deg)}}
body.ai-busy{overflow:hidden}

/* Documents requis manquants (étape 1) */
.doc-box.missing-required{border-color:#fca5a5 !important;background:#fff7f7 !important}
.facts-group summary::-webkit-details-marker{color:#2b6cb0}
.facts-group summary{list-style:revert}
.facts-group[open] summary{margin-bottom:8px}

/* Indicateur « l’IA réfléchit » dans les bulles et boutons (Miguel, 18.10 : il était invisible) */
.ai-spinner{display:inline-block;width:12px;height:12px;border-radius:50%;border:2px solid #cbd5e1;border-top-color:#ff4938;animation:ai-busy-spin .9s linear infinite;vertical-align:-2px;margin-right:4px}

/* Étape 3 simplifiée (Miguel, 18.10) : validation visible, trois actions, historique replié */
.pw-validate{margin-top:18px;padding:14px 16px;border:1px solid #bbf7d0;background:#f0fdf4;border-radius:10px}
.pw-validate .eyebrow{margin:0 0 6px;color:#15803d}
.pw-actions-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:12px}
.pw-actions-3 article{border:1px solid #e2e8f0;border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:8px}
.pw-actions-3 article p{font-size:12px;color:#475569;line-height:1.5;margin:0;flex:1}
.pw-actions-3 article button{width:100%;justify-content:center}
.pw-timeline{list-style:none;padding:0;margin:10px 0;display:flex;flex-direction:column;gap:6px}
.pw-timeline li{display:flex;justify-content:space-between;gap:12px;font-size:12px;border-bottom:1px solid #f1f5f9;padding:6px 0}
.pw-timeline li small{color:#64748b;white-space:nowrap}
.pw-warning{color:#b91c1c;font-weight:600}
@media (max-width:760px){.pw-actions-3{grid-template-columns:1fr}}

/* Miguel 18.10 (responsive) : the four neighbourhood cards overflowed a 390 px screen. */
.geo-scores-grid { min-width: 0; }
.geo-score-card { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .geo-scores-grid { grid-template-columns: 1fr; }
}
