/* Écosystème crypto · Carte et vue libre (ecosysteme_carte.js) — 3e passe, 15/10/2026 */
#ceCarte.cca { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; padding: 8px 12px 8px;
  background: radial-gradient(1200px 520px at 30% 0%, rgba(96,165,250,.05), transparent 70%),
              radial-gradient(1000px 520px at 85% 10%, rgba(233,216,166,.045), transparent 70%), #07090e; }
#ceCarte[hidden] { display: none !important; }
#cryEcoWrap.ce-wrap-fullscreen #ceCarte, #cryEcoWrap:fullscreen #ceCarte { top: 60px; }
/* mode page : le cadre tire sa hauteur du canevas (masqué ici) → la carte prend sa place dans le flux, à la hauteur de l'écran */
#cryEcoWrap:not(.ce-wrap-fullscreen):not(:fullscreen) #ceCarte.cca { position: relative; inset: auto; height: clamp(600px, calc(100vh - 70px), 900px); }

.cca-top { flex: none; display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 4px 4px; overflow: hidden; }
.cca-hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cca-hint, .cca-leg { margin: 0; font: 12px/1.45 "Inter", "DM Sans", sans-serif; color: #8d95b2; flex: 1; min-width: 0; }
.cca-hint b, .cca-leg b { color: #eef0f5; font-weight: 600; }
.cca-hint[hidden], .cca-leg[hidden] { display: none; }
.cca-leg { display: flex; align-items: center; flex-wrap: nowrap; gap: 4px 14px; white-space: nowrap; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.cca-x[hidden] { display: none; }
.cca-sep { color: #7a82a3; }
.cca-lt { display: inline-flex; align-items: center; gap: 6px; color: #c9cede; }
.cca-lt i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.cca-lt b { color: #fff; font-weight: 700; margin-left: 1px; }
.cca-x, .cca-tog { font: 500 11.5px "Inter", "DM Sans", sans-serif; color: #aeb5cc; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.1);
  border-radius: 99px; padding: 5px 12px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.cca-x { flex: none; }
.cca-x:hover, .cca-tog:hover { color: #fff; border-color: rgba(255,255,255,.28); }
.cca-tog i { width: 22px; height: 12px; border-radius: 99px; background: rgba(255,255,255,.14); position: relative; transition: background .15s; }
.cca-tog i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: #c9cede; transition: transform .15s; }
.cca-tog.is-on i { background: rgba(96,165,250,.55); }
.cca-tog.is-on i::after { transform: translateX(10px); background: #fff; }
.cca-svg { flex: 1 1 auto; width: 100%; min-height: 0; display: block; user-select: none; -webkit-user-select: none; touch-action: none; }
#ceCarte[data-mode="libre"] .cca-svg { cursor: grab; }
#ceCarte.is-glisse .cca-svg { cursor: grabbing; }

/* les deux mondes, la frontière, les étages */
.cca-monde { font: 700 11px "Inter", "DM Sans", sans-serif; letter-spacing: 2.2px; fill: #9db4f2; }
.cca-monde.is-regule { fill: #e9d8a6; }
.cca-monde-s { font-weight: 500; letter-spacing: .2px; fill: #6f7898; }
.cca-front { stroke: rgba(233,216,166,.28); stroke-width: 1.2; stroke-dasharray: 2 6; }
.cca-axe-v { stroke: rgba(255,255,255,.12); stroke-width: 1; }
.cca-etage { font: 700 9.5px "Inter", "DM Sans", sans-serif; letter-spacing: 1.8px; fill: #5f6886; }

/* quartiers (carte) : cartes sobres, la couleur est réservée au nom et aux anneaux */
.cca-zr { fill: rgba(255,255,255,.022); stroke: rgba(255,255,255,.065); stroke-width: 1; }
.cca-zacc { stroke: var(--zc); stroke-width: 2.2; stroke-linecap: round; opacity: .85; }
.cca-zt { font: 700 12.5px "Inter", "DM Sans", sans-serif; letter-spacing: .2px; fill: color-mix(in srgb, var(--zc) 78%, #fff); }
.cca-zs { font: 500 11px "Inter", "DM Sans", sans-serif; fill: #6f7898; }
.cca-zt-g { cursor: pointer; outline: none; }
.cca-zhit { fill: transparent; }
.cca-zt-g:hover .cca-zt, .cca-zt-g:focus-visible .cca-zt { text-decoration: underline; text-underline-offset: 3px; }
.cca-zt-g.is-on .cca-zt { fill: #fff; }
/* vue libre : territoires organiques + noms de quartier */
.cca-terr { fill: var(--zc); opacity: .085; }
.cca-zt.is-libre { font-size: 11px; letter-spacing: 1.6px; }

/* liens */
.cca-l { fill: none; stroke: #a9b8d8; opacity: .085; transition: opacity .15s; }
#ceCarte[data-mode="libre"] .cca-l { opacity: .16; }
#ceCarte.liens-off .cca-l { opacity: 0 !important; }
#ceCarte.is-focus .cca-l { opacity: .025 !important; }
.cca-fl { fill: none; opacity: .95; stroke-linecap: round; }
.cca-fl.is-q { opacity: .75; }

/* acteurs */
.cca-n { cursor: pointer; outline: none; transition: opacity .15s; }
.cca-halo { fill: var(--zc); opacity: 0; transition: opacity .15s; }
.cca-disque { fill: #0d121b; }
.cca-disque.is-clair { fill: #f3f4f6; }
.cca-anneau { fill: none; stroke: var(--zc); stroke-width: 1.6; opacity: .8; }
.cca-nm { font-family: "Inter", "DM Sans", sans-serif; font-weight: 600; fill: #d9dde8; paint-order: stroke; stroke: #07090e; stroke-width: 3.2px; stroke-linejoin: round; }
.cca-n:hover .cca-anneau, .cca-n:focus-visible .cca-anneau { opacity: 1; stroke-width: 2.4; }
.cca-n:hover .cca-halo { opacity: .14; }
#ceCarte.is-focus .cca-n { opacity: .16; }
#ceCarte.is-focus .cca-n.is-on, #ceCarte.is-focus .cca-n.is-voisin { opacity: 1; }
#ceCarte.is-focus .cca-n.is-on .cca-halo { opacity: .3; }
#ceCarte.is-focus .cca-n.is-on .cca-anneau { stroke: #fff; stroke-width: 2.6; opacity: 1; }
#ceCarte.is-focus .cca-n.is-on .cca-nm, #ceCarte.is-focus .cca-n.is-voisin .cca-nm { fill: #fff; }

/* zoom de la vue libre */
.cca-zoom { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 4px; z-index: 6; }
.cca-zoom[hidden] { display: none; }
.cca-zoom button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(13,17,26,.85); color: #c9cede;
  font: 600 17px/1 "Inter", sans-serif; cursor: pointer; }
.cca-zoom button:hover { color: #fff; border-color: rgba(255,255,255,.3); }

/* thème clair (sur cette page, body.dark-mode = CLAIR) */
body.dark-mode #ceCarte.cca { background: #f6f7fb; }
body.dark-mode .cca-nm { fill: #1b2030; stroke: #f6f7fb; }
body.dark-mode .cca-disque { fill: #fff; }
body.dark-mode .cca-zr { fill: rgba(15,23,42,.025); stroke: rgba(15,23,42,.09); }
body.dark-mode .cca-zt { fill: color-mix(in srgb, var(--zc) 70%, #000); }
body.dark-mode .cca-l { stroke: #5b6b8c; }
body.dark-mode .cca-monde { fill: #3557b7; } body.dark-mode .cca-monde.is-regule { fill: #8a6d1f; }
body.dark-mode .cca-hint b, body.dark-mode .cca-leg b { color: #141826; }

/* sélecteur de vue : Carte · Vue libre · 3D */
.cpl-modes { display: inline-flex; gap: 3px; padding: 3px; border-radius: 9px; background: rgba(13,17,23,.75); border: 1px solid rgba(94,175,246,.28); margin-right: 8px; }
.cpl-modes button { font: 600 11px "DM Mono", monospace; letter-spacing: .3px; color: #9ba1b8; background: none; border: 0; border-radius: 6px; padding: 6px 12px; cursor: pointer; }
.cpl-modes button:hover { color: #fff; }
.cpl-modes button.is-active { background: linear-gradient(135deg, #5eaff6, #a78bfa); color: #fff; }
/* le sélecteur couvre la 3D : les anciens boutons « Vue 3D » deviennent redondants */
#cryEco3DBtn, #cryEcoTb3D { display: none !important; }
.ce-fs-tb-actions .cpl-modes { margin-right: 6px; }
/* plus de bouton flottant ambigu (une croix sur la carte) : le panneau des filtres s'ouvre par « Filtres » dans la barre */
#cryEcoWrap#cryEcoWrap .ce-fs-restore { display: none !important; }
#cryEcoWrap#cryEcoWrap .ce-fs-panel.collapsed { display: none !important; }
.ce-fs-tb-btn.is-txt { width: auto !important; padding: 0 11px !important; gap: 7px; display: inline-flex; align-items: center; font: 600 11px "DM Mono", monospace; }
.ce-fs-tb-btn.is-txt span { white-space: nowrap; }
.ce-fs-tb-btn.is-on { background: rgba(94,175,246,.16) !important; color: #5eaff6 !important; border-color: rgba(94,175,246,.4) !important; }

/* panneau de fiche : chiffres du jour sourcés (cryEcoOpenPanel) */
.cep-metric-val.neg { color: #ff8095 !important; }
.cep-metric-sub { font-size: 9px !important; line-height: 1.3; white-space: normal !important; opacity: .8; }
.cep-nodata { margin: 4px 0 10px; padding: 8px 10px; border-radius: 8px; font: 11px/1.45 "DM Mono", monospace; color: #8b93b0;
  background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.12); }
.cep-more { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0 0 12px; font: 11px "DM Mono", monospace; color: #9ba1b8; }
.cep-more b.pos { color: #34d399; } .cep-more b.neg { color: #ff8095; }
.cep-more a { color: #5eaff6; text-decoration: none; border-bottom: 1px dotted rgba(94,175,246,.5); }
.cep-more a:hover { color: #fff; }
/* ── « Où est l'argent » (ecosysteme_argent.js) ── */
#sectionArgent .cea-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 6px; }
#sectionArgent .cea-seg { display: inline-flex; gap: 3px; padding: 3px; border-radius: 9px; background: rgba(13,17,23,.7); border: 1px solid rgba(94,175,246,.25); }
#sectionArgent .cea-seg button { font: 600 11px "DM Mono", monospace; color: #9ba1b8; background: none; border: 0; border-radius: 6px; padding: 7px 13px; cursor: pointer; }
#sectionArgent .cea-seg button:hover { color: #fff; }
#sectionArgent .cea-seg button.is-active { background: linear-gradient(135deg, #5eaff6, #a78bfa); color: #fff; }
#sectionArgent .cea-lead { margin: 6px 0 8px; font: 13.5px/1.6 "Inter", "DM Sans", sans-serif; color: #b6bccf; max-width: 980px; }
#sectionArgent .cea-lead b { color: #eceef2; }
#sectionArgent .cea-read { height: 30px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; white-space: nowrap; overflow: hidden;
  background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.06); font: 11.5px "DM Mono", monospace; color: #b6bccf; }
#sectionArgent .cea-read b { color: #fff; }
#sectionArgent .cea-idle { color: #6a7094; font-style: italic; font: italic 11.5px "DM Mono", monospace; }
#sectionArgent .cea-plot { margin-top: 8px; overflow-x: auto; }
#sectionArgent .cea-plot svg { display: block; }
#sectionArgent .cea-l { opacity: .5; transition: opacity .12s; cursor: default; }
#sectionArgent .cea-l:hover { opacity: .9; }
#sectionArgent .cea-l.is-off { opacity: .08; }
#sectionArgent .cea-t { font: 600 12px "Inter", "DM Sans", sans-serif; fill: #e6e9f2; }
#sectionArgent .cea-v { font: 10.5px "DM Mono", monospace; fill: #8b93b0; }
#sectionArgent .cea-src { margin: 10px 0 0; font: 10.5px/1.6 "DM Mono", monospace; color: #6a7094; }
#sectionArgent .cea-src a { color: #5eaff6; }
body.dark-mode #sectionArgent .cea-t { fill: #141826; } body.dark-mode #sectionArgent .cea-lead b { color: #141826; }
/* panneau d'un lien : nature et date de la source */
.cep-src { display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; font: 10.5px "DM Mono", monospace; }
.cep-src-nat { padding: 3px 8px; border-radius: 99px; color: var(--n); border: 1px solid color-mix(in srgb, var(--n) 55%, transparent);
  background: color-mix(in srgb, var(--n) 12%, transparent); letter-spacing: .3px; }
.cep-src-d { color: #9ba1b8; }

/* mode page : la colonne de légende (anciennes familles) doublait ce que la carte écrit sur ses quartiers */
.ce-map-layout.cca-pleine .ce-legend-sidebar { display: none; }
.ce-map-layout.cca-pleine { grid-template-columns: 1fr !important; }
.ce-map-layout.cca-pleine > *:first-child { width: 100%; }
