/* Carte interactive du plan d’investissement — page d’accueil UGP-MOD. */
.investment-map-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #f5f8fc 0%, #edf3f9 100%);
}
.investment-map-section::before {
  position: absolute;
  top: -11rem;
  right: -8rem;
  width: 27rem;
  height: 27rem;
  border: 1px solid rgba(7, 89, 168, .08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.investment-map-section .container { position: relative; z-index: 1; }
.investment-map-intro { max-width: 760px; }
.investment-map-kicker {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .85rem;
  color: var(--rdc-blue, #0759a8);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.investment-map-kicker::before { width: 25px; height: 2px; background: #f2c318; content: ""; }
.investment-map-title {
  margin: 0 0 .85rem;
  color: var(--rdc-blue-deep, #061f3c);
  font-size: clamp(1.8rem, 3.5vw, 2.65rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.investment-map-lead { max-width: 66ch; margin: 0 auto; color: #617286; font-size: 1rem; line-height: 1.7; }
.investment-map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .72fr);
  align-items: stretch;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: 2.5rem;
}
.investment-map-card,
.investment-map-detail {
  min-width: 0;
  border: 1px solid #e0e8f0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(12, 43, 75, .07);
}
.investment-map-card { padding: clamp(1rem, 2vw, 1.5rem); }
.investment-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .4rem;
}
.investment-map-toolbar label { color: #253a51; font-size: .84rem; font-weight: 650; }
.investment-map-select {
  width: min(100%, 245px);
  min-height: 44px;
  padding: .55rem 2.3rem .55rem .8rem;
  border: 1px solid #d3deea;
  border-radius: 9px;
  color: #213b56;
  background: #fff;
  font: inherit;
  font-size: .84rem;
}
.investment-map-select:focus-visible { outline: 3px solid rgba(7, 89, 168, .22); outline-offset: 2px; border-color: #0759a8; }
.investment-map-stage {
  position: relative;
  min-height: 410px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: .4rem;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 48%, #fff 0%, #f9fbfe 66%, #f2f6fa 100%);
}
.investment-map-svg { display: block; width: min(100%, 600px); height: auto; max-height: 560px; overflow: visible; }
.investment-map-svg path[data-name] {
  cursor: pointer;
  fill: #d8e1eb !important;
  stroke: #fff !important;
  stroke-width: 1.3px !important;
  vector-effect: non-scaling-stroke;
  transition: fill .16s ease, opacity .16s ease;
}
.investment-map-svg path[data-name]:hover,
.investment-map-svg path[data-name]:focus-visible { fill: #8db7df !important; }
.investment-map-svg path[data-name].is-selected { fill: #0759a8 !important; }
.investment-map-svg path[data-name].is-covered { fill: #5d9a80 !important; }
.investment-map-svg path[data-name].is-covered:hover,
.investment-map-svg path[data-name].is-covered:focus-visible { fill: #2d765a !important; }
.investment-map-svg path[data-name].is-covered.is-selected { fill: #0759a8 !important; }
.investment-map-svg path[data-name]:focus-visible { outline: 3px solid #f2c318; outline-offset: 2px; }
.investment-map-site-dots { pointer-events: none; }
.investment-map-site-dots circle { pointer-events: auto; cursor: pointer; fill: var(--site-color, #0759a8); stroke: #fff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; transition: r .16s ease, stroke-width .16s ease, opacity .16s ease; }
.investment-map-site-dots circle:hover, .investment-map-site-dots circle:focus-visible { r: 7.5; stroke-width: 2.5px; }
.investment-map-site-dots circle.is-selected { r: 7.5; stroke: #f2c318; stroke-width: 2.5px; }
.investment-map-province-label { pointer-events: none; fill: #496176; font-size: 8px; font-weight: 750; letter-spacing: .04em; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 3px; stroke-linejoin: round; }
.investment-map-detail-nav { position: relative; z-index: 2; display: grid; gap: .52rem; margin: -.35rem -.35rem 1.35rem; padding: .75rem .85rem; border: 1px solid #dce8f2; border-radius: 12px; background: #f7fafd; }
.investment-map-detail-nav strong { color: #0a4f8f; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; }
.investment-map-detail-nav span { display: grid; grid-template-columns: 12px 29px 1fr; align-items: start; gap: .35rem; color: #50657a; font-size: .71rem; line-height: 1.25; }
.investment-map-detail-nav b { color: #173d65; }
.investment-map-detail-nav em { font-style: normal; }
.investment-map-controls { position: absolute; z-index: 3; top: .75rem; right: .75rem; width: min(238px, 42%); max-height: calc(100% - 1.5rem); overflow-y: auto; display: flex; flex-direction: column; gap: .65rem; padding: .55rem; border: 1px solid rgba(8, 67, 123, .14); border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: 0 10px 24px rgba(13, 43, 74, .13); backdrop-filter: blur(8px); }
.investment-map-zoom-controls { display: flex; flex-direction: column; gap: .32rem; }
.investment-map-zoom-controls { position: absolute; z-index: 4; left: .75rem; bottom: .75rem; }
.investment-map-zoom-btn { width: 38px; height: 36px; border: 1px solid #cbd9e7; border-radius: 8px; color: #0759a8; background: rgba(255,255,255,.94); box-shadow: 0 5px 16px rgba(13,43,74,.13); cursor: pointer; font-size: 1.25rem; font-weight: 800; line-height: 1; }
.investment-map-zoom-btn:hover, .investment-map-zoom-btn:focus-visible { border-color: #0759a8; color: #fff; background: #0759a8; outline: none; }
.investment-map-control-btn { width: 100%; min-height: 34px; border: 1px solid #d3e0ec; border-radius: 8px; background: #fff; color: #0759a8; font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.investment-map-control-btn:hover, .investment-map-control-btn:focus-visible { border-color: #0759a8; background: #edf5fc; outline: none; }
.investment-map-vertical-legend { display: grid; gap: .45rem; padding-top: .4rem; border-top: 1px solid #e1e9f0; color: #3e5268; font-size: .67rem; line-height: 1.2; }
.investment-map-vertical-legend strong { color: #0a4f8f; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.investment-map-vertical-legend span { display: grid; grid-template-columns: 12px 29px 1fr; align-items: start; gap: .3rem; }
.investment-map-vertical-legend b { color: #173d65; }
.investment-map-dot { width: 10px; height: 10px; margin-top: 1px; border-radius: 50%; background: var(--legend-color); box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.investment-map-dot--09p { --legend-color: #3a9fe0; } .investment-map-dot--10b { --legend-color: #b40084; } .investment-map-dot--10e { --legend-color: #45a82f; } .investment-map-dot--30b { --legend-color: #e64c3c; } .investment-map-dot--60s { --legend-color: #f3ac18; }
.investment-map-legend { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; padding: .75rem .25rem 0; color: #5d6f82; font-size: .75rem; }
.investment-map-legend-item { display: inline-flex; align-items: center; gap: .5rem; }
.investment-map-swatch { width: 13px; height: 13px; flex: 0 0 auto; border: 1px solid #c2ceda; border-radius: 4px; background: #d8e1eb; }
.investment-map-swatch--selected { border-color: #0759a8; background: #0759a8; }
.investment-map-swatch--published { border-color: #5d9a80; background: #5d9a80; }
.investment-map-swatch--09p { border-color: #3a9fe0; background: #3a9fe0; border-radius: 50%; }
.investment-map-swatch--10b { border-color: #b40084; background: #b40084; border-radius: 50%; }
.investment-map-swatch--10e { border-color: #45a82f; background: #45a82f; border-radius: 50%; }
.investment-map-swatch--30b { border-color: #e64c3c; background: #e64c3c; border-radius: 50%; }
.investment-map-swatch--60s { border-color: #f3ac18; background: #f3ac18; border-radius: 50%; }
.investment-map-detail { padding: clamp(1.25rem, 2.4vw, 2rem); display: flex; flex-direction: column; }
.investment-map-detail-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.investment-map-detail-icon { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #d7e6f3; border-radius: 13px; color: #0759a8; background: #edf5fc; font-size: 1.15rem; }
.investment-map-status { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .7rem; border: 1px solid #e4eaf0; border-radius: 999px; color: #60748a; background: #f7f9fb; font-size: .68rem; font-weight: 700; letter-spacing: .025em; }
.investment-map-status::before { width: 7px; height: 7px; border-radius: 50%; background: #9aaabc; content: ""; }
.investment-map-status.is-published { border-color: #cbe4d5; color: #246447; background: #f0f8f3; }
.investment-map-status.is-published::before { background: #3b9b68; }
.investment-map-status.is-published.has-sites { border-color: #f1b7b7; color: #a32929; background: #fff1f1; }
.investment-map-status.is-published.has-sites::before { background: #d83b3b; }
.investment-map-detail h3 { margin: 0 0 .75rem; color: #102f52; font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.2; }
.investment-map-detail-copy { margin: 0; color: #5c6f83; font-size: .91rem; line-height: 1.7; }
.investment-map-sites { display: grid; gap: .65rem; max-height: min(48vh, 430px); overflow-y: auto; overscroll-behavior: contain; padding: 0 .35rem 0 0; margin: 1.1rem 0 0; list-style: none; }
.investment-map-sites li { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .8rem; border: 1px solid #e6edf4; border-radius: 9px; color: #293f57; background: #f9fbfd; font-size: .85rem; }
.investment-map-sites li::before { margin-top: .12rem; color: #2d765a; font-weight: 800; content: "•"; }
.investment-map-site-content { min-width: 0; display: grid; gap: .22rem; }
.investment-map-site-content strong { color: #293f57; font-size: .85rem; font-weight: 650; }
.investment-map-site-meta { color: #708196; font-size: .68rem; line-height: 1.4; }
.investment-map-note { margin: auto 0 0; padding: 1rem 0 0; color: #77879a; font-size: .74rem; line-height: 1.6; }
.investment-map-note strong { color: #5d6f82; }
.investment-map-loading { color: #60748a; font-size: .9rem; }
.investment-map-error { max-width: 42ch; padding: 1rem; color: #8c3b32; border: 1px solid #f1d1cb; border-radius: 10px; background: #fff7f5; text-align: center; }
html.dark .investment-map-section { background: linear-gradient(180deg, #10283c, #0c2133); }
html.dark .investment-map-title { color: #e8f1fa; }
html.dark .investment-map-lead, html.dark .investment-map-toolbar label { color: #c0cedc; }
html.dark .investment-map-card, html.dark .investment-map-detail { border-color: #2b455b; background: #152f45; box-shadow: 0 14px 38px rgba(0, 0, 0, .14); }
html.dark .investment-map-select { color: #e2edf7; border-color: #38536b; background: #10263a; }
html.dark .investment-map-stage { background: radial-gradient(ellipse at 50% 48%, #1c3a51, #142d43); }
html.dark .investment-map-svg path[data-name] { fill: #456177 !important; stroke: #19374e !important; }
html.dark .investment-map-svg path[data-name]:hover,
html.dark .investment-map-svg path[data-name]:focus-visible { fill: #5c8bb3 !important; }
html.dark .investment-map-svg path[data-name].is-selected { fill: #2e83c5 !important; }
html.dark .investment-map-svg path[data-name].is-covered { fill: #4f9173 !important; }
html.dark .investment-map-province-label { fill: #dbe7f2; stroke: rgba(16,40,60,.9); }
html.dark .investment-map-controls { background: rgba(18, 43, 69, .95); border-color: rgba(168, 200, 226, .24); }
html.dark .investment-map-control-btn { background: #173e62; border-color: #426584; color: #e6f1fa; }
html.dark .investment-map-zoom-btn { border-color: #426584; color: #e6f1fa; background: rgba(23,62,98,.95); }
html.dark .investment-map-zoom-btn:hover, html.dark .investment-map-zoom-btn:focus-visible { color: #fff; background: #2e83c5; }
html.dark .investment-map-vertical-legend { border-color: #426584; color: #d4e2ef; }
html.dark .investment-map-vertical-legend strong, html.dark .investment-map-vertical-legend b { color: #fff; }
html.dark .investment-map-detail-nav { border-color: #38536b; background: #102b43; }
html.dark .investment-map-detail-nav strong, html.dark .investment-map-detail-nav b { color: #fff; }
html.dark .investment-map-detail-nav span { color: #c4d2df; }
html.dark .investment-map-detail h3 { color: #e8f1fa; }
html.dark .investment-map-detail-copy, html.dark .investment-map-legend { color: #b4c4d3; }
html.dark .investment-map-status { color: #c3d0de; border-color: #395369; background: #1a354b; }
html.dark .investment-map-status.is-published.has-sites { border-color: #9b4d59; color: #ffc5c5; background: #4a2630; }
html.dark .investment-map-sites li { color: #dbe7f2; border-color: #344f65; background: #19354b; }
html.dark .investment-map-site-content strong { color: #dbe7f2; }
html.dark .investment-map-site-meta { color: #a6b9ca; }
html.dark .investment-map-note, html.dark .investment-map-note strong { color: #a6b9ca; }
.investment-map-pan-control { position: absolute; z-index: 4; left: .75rem; bottom: .75rem; display: inline-flex; align-items: center; gap: .42rem; min-height: 36px; padding: .45rem .7rem; border: 1px solid #cbd9e7; border-radius: 9px; color: #0759a8; background: rgba(255,255,255,.94); box-shadow: 0 5px 16px rgba(13,43,74,.13); cursor: pointer; font-size: .76rem; font-weight: 700; }
.investment-map-pan-control:hover, .investment-map-pan-control:focus-visible, .investment-map-pan-control.is-active { border-color: #0759a8; color: #fff; background: #0759a8; outline: none; }
.investment-map-svg.is-pan-enabled { cursor: grab; }
.investment-map-svg.is-pan-enabled:active { cursor: grabbing; }
html.dark .investment-map-pan-control { border-color: #426584; color: #e6f1fa; background: rgba(23,62,98,.95); }
html.dark .investment-map-pan-control:hover, html.dark .investment-map-pan-control:focus-visible, html.dark .investment-map-pan-control.is-active { color: #fff; background: #2e83c5; }
@media (max-width: 900px) {
  .investment-map-grid { grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr); }
  .investment-map-stage { min-height: 340px; }
}
@media (max-width: 720px) {
  .investment-map-grid { grid-template-columns: 1fr; }
  .investment-map-card { padding: .85rem; }
  .investment-map-stage { min-height: 0; aspect-ratio: 1 / 1.02; padding: .25rem; }
  .investment-map-svg { width: 100%; max-width: none; max-height: none; }
  .investment-map-dot { width: 8px; height: 8px; }
  .investment-map-detail { min-height: 270px; }
  .investment-map-sites { max-height: 34vh; overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 500px) {
  .investment-map-card { padding: .85rem; }
  .investment-map-toolbar { align-items: stretch; flex-direction: column; }
  .investment-map-select { width: 100%; }
  .investment-map-stage { aspect-ratio: 1 / 1.12; }
  .investment-map-legend { display: grid; grid-template-columns: 1fr; gap: .5rem; font-size: .68rem; }
  .investment-map-legend-item { align-items: flex-start; line-height: 1.35; }
  .investment-map-detail-nav { margin: -.15rem 0 1rem; padding: .65rem; }
  .investment-map-detail-nav span { grid-template-columns: 9px 23px 1fr; font-size: .65rem; }
  .investment-map-sites { max-height: 38vh; }
  .investment-map-zoom-controls { left: .45rem; bottom: .45rem; }
  .investment-map-zoom-btn { width: 34px; height: 32px; font-size: 1.1rem; }
  .investment-map-detail { padding: 1rem; }
  .investment-map-detail-top { align-items: flex-start; }
  .investment-map-detail h3 { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .investment-map-svg path[data-name] { transition: none; }
}
