/* Eventin Carte - full (priorité sur thème / Leaflet) */
.eventin-carte-wrap {
  min-height: 500px;
  background: #f5f7fb;
  font-family: "Montserrat", sans-serif;
  /* Variables scopées au bloc pour ne pas écraser le thème */
  --ummisco-blue: #215cb3;
  --ummisco-green: #2e9b62;
  --bg-dark: #eef2f8;
  --bg-card: #ffffff;
  --bg-panel: #f8fafd;
  --accent: #215cb3;
  --accent-soft: rgba(33, 92, 179, 0.12);
  --accent-border: rgba(33, 92, 179, 0.24);
  --text: #152033;
  --text-secondary: #4f5e77;
  --border: #d7dfec;
  --surface: rgba(21, 32, 51, 0.045);
  --surface-hover: rgba(21, 32, 51, 0.08);
  --success: #2e9b62;
  --success-soft: rgba(46, 155, 98, 0.12);
  --success-border: rgba(46, 155, 98, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 16px rgba(0,0,0,0.1);
  box-sizing: border-box;
}
.eventin-carte-wrap,
.eventin-carte-wrap * { box-sizing: border-box !important; }
.eventin-carte-wrap input,
.eventin-carte-wrap select,
.eventin-carte-wrap button,
.eventin-carte-wrap textarea {
  font-family: "Montserrat", sans-serif !important;
}
.eventin-carte-wrap .app { min-height: 500px !important; }
  .select2-container--default .select2-selection--single { background-color: var(--bg-card); border: 1px solid var(--border); color: var(--text); height: 38px; }
  .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); line-height: 36px; padding-left: 0.75rem; }
  .select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; background: var(--bg-card); }
  .select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: var(--text-secondary) transparent transparent transparent; }
  .select2-container--default.select2-container--open .select2-selection__arrow b { border-color: transparent transparent var(--text-secondary) transparent; }
  .select2-dropdown { background: var(--bg-card); border: 1px solid var(--border); }
  .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--accent-soft); color: var(--text); }
  .select2-container--default .select2-results__option[aria-selected=true] { background: var(--accent-soft); color: var(--text); }
  .select2-search--dropdown .select2-search__field { background: var(--bg-dark); border: 1px solid var(--border); color: var(--text); }
  .select2-container--default .select2-results__option { color: var(--text); }
  .select2-container .select2-selection--single .select2-selection__placeholder { color: var(--text-secondary); }
  .filters .select2-container--default .select2-selection--single { background: #f7f9fd !important; border-color: var(--border); min-height: 44px; height: 44px; border-radius: 10px; }
  .filters .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); line-height: 42px; padding-left: 0.85rem; }
  .filters .select2-container--default .select2-selection--single .select2-selection__arrow { background: none !important; height: 42px; }
  .filters .select2-container--default .select2-selection--single .select2-selection__arrow b { border-color: var(--text-secondary) transparent transparent transparent; }
  .filters .select2-container--default.select2-container--open .select2-selection__arrow b { border-color: transparent transparent var(--text-secondary) transparent; }
  .eventin-carte-wrap .app {
    display: flex;
    flex-direction: column;
    height: 100vh;
  }
  .header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .header-left { display: flex; align-items: center; gap: 1rem; visibility: hidden; }
  .logo-mark {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--ummisco-blue) 0%, #1e4a8f 50%, var(--ummisco-green) 100%);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem; color: #fff;
  }
  .header h1 { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
  .header-sub { margin: 0.25rem 0 0 0; font-size: 0.8rem; color: var(--text-secondary); font-weight: 400; }
  .stats-bar {
    display: flex;
    gap: 1.5rem;
    font-size: 1.3rem;
    color: var(--text-secondary);
  }
  .stats-bar span { display: flex; align-items: center; gap: 0.35rem; }
  .stats-bar strong { color: var(--accent); font-weight: 600; }
  .main {
    display: flex;
    flex: 1;
    min-height: 0;
  }
  .sidebar {
    width: 400px;
    min-width: 360px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .filters {
    padding: 1.25rem;
    margin: 0.75rem;
    margin-bottom: 0;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(21,32,51,0.08);
    border: 1px solid var(--accent-border);
    min-width: 0;
    position: sticky;
    top: 0.75rem;
    z-index: 2;
  }
  .filters label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; color: #33415b; margin-bottom: 0.35rem; }
  .filters select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    background: #f7f9fd;
    color: var(--text);
    margin-bottom: 0.75rem;
    min-height: 44px;
  }
  .filters select:last-of-type { margin-bottom: 0; }
  .filters .search-wrap input {
    background: #f7f9fd;
    border: 1px solid var(--border);
    color: var(--text);
    min-height: 44px;
    padding: 0.65rem 0.85rem 0.65rem 2.25rem;
    border-radius: 10px;
  }
  .filters .search-wrap input::placeholder { color: var(--text-secondary); }
  .filters .search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
  .filters button {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    border: 1px solid var(--accent-border);
    background: #ffffff;
    color: var(--accent);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
  }
  .filters button:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
  .centre-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    margin: 0.75rem;
    margin-top: 0.6rem;
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(33, 92, 179, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(2px);
  }
  .centre-list::-webkit-scrollbar { width: 8px; }
  .centre-list::-webkit-scrollbar-track { background: transparent; }
  .centre-list::-webkit-scrollbar-thumb { background: rgba(79,94,119,0.3); border-radius: 999px; }
  .centre-list::-webkit-scrollbar-thumb:hover { background: rgba(79,94,119,0.45); }
  .centre-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s;
  }
  .centre-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(33,92,179,0.16); transform: translateY(-1px); }
  .centre-card.active { border-color: var(--accent); background: linear-gradient(180deg, #ffffff 0%, #f3f7ff 100%); box-shadow: 0 0 0 1px var(--accent), 0 8px 20px rgba(33,92,179,0.14); }
  .centre-card-content { display: flex; gap: 0.75rem; min-width: 0; }
  .centre-card-logo { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: contain; flex-shrink: 0; border: 1px solid var(--border); background: var(--bg-dark); }
  .centre-card-body { min-width: 0; flex: 1; }
  .centre-card h3 { margin: 0 0 0.25rem 0; font-size: 0.98rem; font-weight: 650; color: var(--text); }
  .centre-card p { margin: 0; font-size: 0.88rem; color: var(--text-secondary); line-height: 1.42; }
  .map-zone {
    flex: 1;
    position: relative;
    min-width: 0;
    overflow: hidden;
  }
  #map { width: 100%; height: 100%; min-height: 300px; background: #f5f5f5; }
  .map-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
.map-controls button {
    min-height: 38px;
    padding: 0 0.7rem;
    background: rgba(33, 92, 179, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(21, 32, 51, 0.22);
    backdrop-filter: blur(3px);
    transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
  }
  .map-controls button.btn-icon-only { width: 38px; padding: 0; font-size: 1rem; }
  .map-controls button:hover { background: #ffffff; color: var(--accent); border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 10px 20px rgba(21,32,51,0.2); }
  .map-controls button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
  .legend-stack {
    position: absolute;
    left: 1rem;
    bottom: 0.75rem;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    max-width: min(300px, calc(100% - 2rem));
    pointer-events: none;
  }
  .legend {
    position: static;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    box-shadow: 0 8px 20px rgba(21, 32, 51, 0.12);
    backdrop-filter: blur(2px);
    pointer-events: auto;
  }
  .legend-line { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.25rem; }
  .legend-line span { width: 24px; height: 2px; background: var(--accent); opacity: 0.8; border-radius: 1px; }
  .legend-line span.line-dashed { background: repeating-linear-gradient(90deg, var(--accent), var(--accent) 4px, transparent 4px, transparent 8px); }
  .legend-projects { max-width: 260px; }
  .legend-projects .legend-title { font-weight: 600; margin-bottom: 0.35rem; }
  .legend-projects .legend-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; margin-top: 0.25rem; }
  .project-line-popup { padding: 0.5rem 0.75rem; min-width: 200px; }
  .project-line-popup .popup-centres { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; color: var(--accent); }
  .project-line-popup .popup-projects { font-size: 0.85rem; color: var(--text-secondary); list-style: none; padding-left: 0; margin: 0; }
  .project-line-popup .popup-projects li { padding: 0.2rem 0; border-bottom: 1px solid var(--border); }
  .project-line-popup .popup-projects li:last-child { border-bottom: none; }
  .project-line-popup .popup-projects li::before { content: "• "; color: var(--accent); }
  .project-line-tooltip { font-size: 0.8rem; padding: 0.35rem 0.6rem; background: var(--bg-card) !important; border: 1px solid var(--border) !important; color: var(--text) !important; border-radius: var(--radius-sm); }
  .project-line-tooltip::before { border-top-color: var(--border) !important; }
  .project-line-flow { animation: project-line-flow 2s linear infinite; }
  @keyframes project-line-flow { to { stroke-dashoffset: -14; } }
  #legend-markers { order: 3; }
  #legend-membres { order: 2; }
  #legend { order: 1; }
  .detail-panel {
    position: absolute;
    top: 0; right: 0;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: var(--bg-panel);
    border-left: 1px solid var(--border);
    z-index: 1001;
    transform: translateX(calc(100% + 24px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.2s ease, visibility 0s linear 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -8px 0 32px rgba(0,0,0,0.3);
  }
  .detail-panel.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.3s ease, opacity 0.2s ease;
  }
  .detail-panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
  }
  .detail-panel-header-content { display: flex; align-items: center; gap: 0.75rem; flex: 1; min-width: 0; }
  .detail-panel-logo { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
  .detail-panel-header h2 { margin: 0; font-size: 1.08rem; font-weight: 700; letter-spacing: 0.01em; line-height: 1.3; color: var(--text); }
  .detail-tag-with-logo { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.65rem; font-size: 0.8rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }
  .detail-tag-with-logo img { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; }
  .detail-tag-with-logo.partner { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
  a { text-decoration: none; }
  a:hover, a:focus { text-decoration: none; }
  .detail-link { color: var(--accent); text-decoration: none; cursor: pointer; border: none; background: none; font: inherit; padding: 0; }
  .detail-link:hover { text-decoration: none; }
  .detail-section ul.detail-links { list-style: none; padding-left: 0; }
  .detail-section ul.detail-links li { margin-bottom: 0.35rem; }
  .detail-member { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
  .detail-member-avatar { width: 77px; height: 77px !important; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); background: var(--bg-card); }
  .detail-member-info { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
  .detail-member-name { font-size: 1rem; font-weight: 600; color: var(--text); }
  .detail-member-role { font-size: 0.75rem; color: var(--accent); }
  .detail-member-universite { font-size: 0.75rem; color: var(--text-secondary); }
  .detail-theme { margin-bottom: 0.4rem; }
  .detail-theme-thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: contain; flex-shrink: 0; border: 1px solid var(--border); background: var(--bg-card); }
  .detail-projet { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
  .detail-projet-thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: contain; flex-shrink: 0; border: 1px solid var(--border); background: var(--bg-card); }
  .filter-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.6rem; font-size: 0.8rem; background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 0.5rem; }
  .filter-chip button { border: none; background: none; color: var(--text); cursor: pointer; padding: 0 0.2rem; font-size: 1rem; line-height: 1; }
  .filter-chip button:hover { opacity: 0.8; }
  .member-dot { width: 14px; height: 14px; background: var(--success); border: 2px solid rgba(255,255,255,0.95); border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  .member-marker { z-index: 600 !important; }
  .member-marker-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.95); box-shadow: 0 2px 8px rgba(0,0,0,0.35); display: block; }
  .member-marker-photo-wrap { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,0.35); }
  .member-marker .leaflet-popup-content-wrapper { border-radius: 8px; overflow: hidden; }
  .member-popup { padding: 0.5rem; min-width: 180px; }
  .member-popup-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; float: left; margin-right: 0.6rem; border: 1px solid var(--border); }
  .member-popup-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; color: var(--text); }
  .member-popup-role { font-size: 0.78rem; color: var(--accent); margin-bottom: 0.1rem; }
  .member-popup-univ { font-size: 0.75rem; color: var(--text-secondary); }
  .tutelle-cluster-marker { border: none; background: transparent; }
  .tutelle-cluster-marker img { width: 36px; height: 36px; border-radius: 50%; object-fit: contain; border: 2px solid rgba(255,255,255,0.9); background: var(--bg-card); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
  .tutelle-popup { padding: 0.6rem; min-width: 200px; max-height: 320px; overflow-y: auto; }
  .tutelle-popup-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
  .tutelle-popup-title img { width: 28px; height: 28px; border-radius: 50%; object-fit: contain; }
  .tutelle-popup-members { font-size: 0.8rem; list-style: none; padding: 0; margin: 0; }
  .tutelle-popup-members li { padding: 0.35rem 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.5rem; }
  .tutelle-popup-members li:last-child { border-bottom: none; }
  .tutelle-popup-members .m-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
  .tutelle-popup-members .m-name { font-weight: 500; color: var(--text); }
  .tutelle-popup-members .m-role { font-size: 0.72rem; color: var(--accent); }
  .tutelle-popup-members .m-univ { font-size: 0.72rem; color: var(--text-secondary); }
  .detail-panel-close {
    width: 36px; height: 36px;
    border: none;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
  }
  .detail-panel-close:hover { color: var(--text); background: var(--border); }
  .detail-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
  }
  .detail-panel-body p { margin: 0 0 1rem 0; font-size: 1.05rem; line-height: 1.62; color: var(--text); }
  .detail-meta { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.25rem; }
  .detail-meta-item { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; }
  .detail-meta-item .icon { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.detail-meta-item .icon svg { width: 18px; height: 18px; fill: currentColor; }
  .detail-meta-item span { color: var(--text); font-size:1.05rem; line-height: 1.45; }
  .detail-section { margin-bottom: 1.25rem; }
  .detail-section-title { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; display: flex; align-items: center; gap: 0.4rem; }
  .detail-section-hint { font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 0.5rem; font-weight: 400; }
  .detail-section ul { margin: 0; padding-left: 1.2rem; }
  .detail-section ul.detail-links { padding-left: 0; margin-top: 0.25rem; }
  .detail-section li { margin-bottom: 0.25rem; font-size: 0.95rem; }
  .detail-section.detail-section-filter { background: var(--surface); border-radius: var(--radius-sm); padding: 0.75rem 0; }
  .detail-section.detail-section-filter .detail-section-title { margin-bottom: 0.15rem; }
  .detail-section.detail-section-filter .detail-section-hint { margin-bottom: 0.5rem; }
  .detail-section.detail-section-filter ul.detail-links { margin-top: 0; }
  .detail-section-filter .detail-theme,
  .detail-section-filter .detail-projet { margin-bottom: 0.4rem; }
  .detail-section-filter .detail-theme:last-child,
  .detail-section-filter .detail-projet:last-child { margin-bottom: 0; }
  .detail-section-filter .detail-theme > span { display: flex; align-items: stretch; gap: 0.5rem; }
  .detail-section-filter .detail-link { padding: 0.45rem 0.6rem; border-radius: 8px; background: #fff; color: var(--text); border: 1px solid var(--accent-border); transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; min-height: 2.75rem; text-align: left; display: flex; align-items: center; justify-content: flex-start; box-sizing: border-box; }
  .detail-section-filter .detail-theme .detail-link { flex: 1 1 0; min-width: 0; }
  .detail-section-filter .detail-projet .detail-link { width: 100%; }
  .detail-section-filter .detail-link:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--text); box-shadow: 0 0 0 1px var(--accent-border); }
  .detail-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.35rem; }
  .detail-tag { display: inline-block; padding: 0.35rem 0.65rem; font-size: 0.8rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }
  .detail-tag.partner { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
  .detail-tutelles-partners { display: flex; flex-direction: column; gap: 0.75rem; }
  .detail-partenaires-logos { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .detail-partenaire-logo { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; flex-shrink: 0; background: #fff; border: 1px solid var(--border); }
  .detail-partenaire-logo-wrap { width: 40px; height: 40px; border-radius: 8px; background: var(--success-soft); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--success); }
  .detail-partenaire-logo-wrap svg { width: 22px; height: 22px; fill: currentColor; }
  .detail-tutelle-item, .detail-partenaire-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm); background: var(--bg-card); border: 1px solid var(--border); }
  .detail-tutelle-item { border-left: 3px solid var(--accent); }
  .detail-partenaire-item { border-left: 3px solid var(--success); }
  .detail-tutelle-item img, .detail-partenaire-item img { width: 36px; height: 36px; border-radius: 6px; object-fit: contain; flex-shrink: 0; background: #fff; }
  .detail-tutelle-item .no-logo, .detail-partenaire-item .no-logo { width: 36px; height: 36px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; }
  .detail-partenaire-item .no-logo { background: var(--success-soft); color: var(--success); }
  .detail-tutelle-item span:last-child, .detail-partenaire-item span:last-child { font-size: 0.9rem; font-weight: 500; color: var(--text); }
  .detail-responsable-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-top: 0.35rem;
  }
  .detail-responsable-block p { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--text); }
  .detail-responsable-block p + p { margin-top: 0.5rem; }
  .detail-responsable-block .responsable-label,
  .detail-responsable-block .contacts-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; margin-bottom: 0.25rem; }
  .centre-list-count { font-size: 0.78rem; color: var(--text-secondary); margin: 0.8rem 0.9rem 0.2rem 0.9rem; padding: 0; border: none; border-radius: 0; display: block; background: transparent; font-weight: 600; }
  .detail-open .centre-list-count,
  .detail-open .centre-list { display: none !important; }
  .centre-card-meta { font-size: 0.7rem; color: var(--text-secondary); margin-top: 0.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .centre-card-meta span { display: inline-flex; align-items: center; gap: 0.2rem; }
  .search-wrap { margin-bottom: 0.75rem; }
  .search-wrap input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23b8c4d0' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 0.6rem center;
    color: var(--text);
  }
  .search-wrap input::placeholder { color: var(--text-secondary); }
  .search-wrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
  .empty-state { padding: 2rem 1rem; text-align: center; color: var(--text-secondary); font-size: 0.9rem; }
  .empty-state-icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.5; }
  .map-controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .detail-panel-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-fit-all { margin-top: 0.25rem; }
  .map-controls button { margin-bottom: 0.25rem; }
  .map-controls button:last-child { margin-bottom: 0; }
  .detail-panel-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
  .detail-panel-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: #fff !important;
    border-radius: var(--radius-sm);
    text-decoration: none !important;
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: filter 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 6px 14px rgba(33,92,179,0.25);
  }
  .detail-panel-footer a:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 10px 18px rgba(33,92,179,0.28); }
  .detail-panel-footer a:visited,
  .detail-panel-footer a:active,
  .detail-panel-footer a:focus {
    color: #fff !important;
  }
  .loading {
    position: absolute;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.3s;
  }
  .loading.hidden { opacity: 0; pointer-events: none; }
  .loading-spinner { width: 48px; height: 48px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
  .loading-text { margin-top: 1rem; font-size: 0.9rem; color: var(--text-secondary); }
  @keyframes spin { to { transform: rotate(360deg); } }
  .leaflet-popup-content-wrapper { border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; overflow: hidden; background: var(--bg-card); border: 1px solid var(--border); }
  .leaflet-popup-content { margin: 0; min-width: 260px; color: var(--text); }
.leaflet-popup-content h3 { color: var(--text); }
  .leaflet-container a.leaflet-popup-close-button { color: var(--text-secondary) !important; }
  .leaflet-popup-tip { background: var(--bg-card); }
  .marker-pin {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--ummisco-blue) 0%, #1e4a8f 100%);
    border: 2px solid rgba(255,255,255,0.9);
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(42, 101, 193, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    transition: transform 0.2s;
  }
  .marker-pin:hover { transform: scale(1.08); }
  .marker-pin-img {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: contain;
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    background: var(--bg-card);
    display: block;
  }
  /* Forcer la taille des marqueurs centres (priorité sur Leaflet) */
  .leaflet-marker-icon.custom-marker {
    width: 36px !important;
    height: 36px !important;
    margin-left: -18px !important;
    margin-top: -18px !important;
  }
  .custom-marker,
  .custom-marker .marker-pin,
  .custom-marker .marker-pin-img {
    width: 36px !important;
    height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }
  @media (max-width: 900px) {
    .sidebar { width: 260px; }
    .detail-panel { max-width: 100%; }
    .legend-stack { left: 0.65rem; bottom: 0.65rem; max-width: min(280px, calc(100% - 1.3rem)); gap: 0.4rem; }
  }
  @media (max-width: 640px) {
    .sidebar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 999; transform: translateX(-100%); }
    .sidebar.open-mobile { transform: translateX(0); }
    .stats-bar { display: none; }
  }
  .icon-svg { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .icon-svg svg { width: 1em; height: 1em; fill: currentColor; }
  .icon-18 { width: 18px; height: 18px; }
  .icon-20 { width: 20px; height: 20px; }
  .icon-24 { width: 24px; height: 24px; }

  /* --- Eventin Carte : overrides prioritaires (gagnent sur thème / Leaflet) --- */
  .eventin-carte-wrap .leaflet-container { font-family: inherit !important; }
.eventin-carte-wrap .leaflet-popup-content-wrapper { border-radius: 12px !important; box-shadow: 0 8px 24px rgba(21,32,51,0.15) !important; padding: 0 !important; overflow: hidden !important; background: var(--bg-card) !important; border: 1px solid var(--border) !important; }
  .eventin-carte-wrap .leaflet-popup-content { margin: 0 !important; min-width: 260px !important; color: var(--text) !important; }
.eventin-carte-wrap .leaflet-popup-tip { background: var(--bg-card) !important; }
  .eventin-carte-wrap .leaflet-container a.leaflet-popup-close-button { color: #555555 !important; }
  .eventin-carte-wrap .leaflet-marker-icon.custom-marker { width: 40px !important; height: 40px !important; margin-left: -20px !important; margin-top: -20px !important; }
  .eventin-carte-wrap .custom-marker,
  .eventin-carte-wrap .custom-marker .marker-pin,
  .eventin-carte-wrap .custom-marker .marker-pin-img { width: 40px !important; height: 40px !important; max-width: 40px !important; max-height: 40px !important; min-width: 40px !important; min-height: 40px !important; border-radius: 50% !important; }
  .eventin-carte-wrap .marker-pin { width: 40px !important; height: 40px !important; display: flex !important; align-items: center !important; justify-content: center !important; border-radius: 50% !important; }
  .eventin-carte-wrap .marker-pin-img { width: 40px !important; height: 40px !important; max-width: 40px !important; max-height: 40px !important; min-width: 40px !important; min-height: 40px !important; display: block !important; border-radius: 50% !important; object-fit: cover !important; }
  .eventin-carte-wrap .member-marker .leaflet-popup-content-wrapper { border-radius: 8px !important; }
  .eventin-carte-wrap .member-marker-photo,
  .eventin-carte-wrap .member-marker-photo-wrap { width: 44px !important; height: 44px !important; border-radius: 50% !important; }
  .eventin-carte-wrap .tutelle-cluster-marker img { width: 36px !important; height: 36px !important; }
  .eventin-carte-wrap #map { width: 100% !important; height: 100% !important; min-height: 300px !important; background: var(--bg-dark) !important; }
  .eventin-carte-wrap .map-zone { flex: 1 !important; min-width: 0 !important; position: relative !important; }
  .eventin-carte-wrap .sidebar { width: 400px !important; min-width: 360px !important; background: var(--bg-panel) !important; }
  .eventin-carte-wrap .main { display: flex !important; flex: 1 !important; min-height: 0 !important; }
  .eventin-carte-wrap .centre-card { background: var(--bg-card) !important; border: 1px solid var(--border) !important; }
.eventin-carte-wrap .detail-panel { background: var(--bg-panel) !important; }
  .eventin-carte-wrap .map-zone { overflow: hidden !important; }
  .eventin-carte-wrap .detail-panel {
    right: 0 !important;
    transform: translateX(calc(100% + 24px)) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 0.3s ease, opacity 0.2s ease, visibility 0s linear 0.3s !important;
  }
  .eventin-carte-wrap .detail-panel.open {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: transform 0.3s ease, opacity 0.2s ease !important;
  }
  .eventin-carte-wrap .select2-container--default .select2-selection--single {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
  }
  .eventin-carte-wrap .select2-container,
  .eventin-carte-wrap .select2-dropdown,
  .eventin-carte-wrap .leaflet-container,
  .eventin-carte-wrap .leaflet-popup-content-wrapper,
  .eventin-carte-wrap .leaflet-popup-content {
    font-family: "Montserrat", sans-serif !important;
  }
  .eventin-carte-wrap .filters { background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%) !important; border-radius: 12px !important; border: 1px solid var(--accent-border) !important; }

  /* Lisibilite forte du panneau detail sur fond clair */
  .eventin-carte-wrap .detail-panel,
  .eventin-carte-wrap .detail-panel * {
    color: var(--text);
  }
  .eventin-carte-wrap .detail-panel .detail-panel-body p,
  .eventin-carte-wrap .detail-panel .detail-meta-item span,
  .eventin-carte-wrap .detail-panel .detail-responsable-block p,
  .eventin-carte-wrap .detail-panel .detail-responsable-block .contacts-label {
    color: var(--text) !important;
  }
  .eventin-carte-wrap .detail-panel .detail-member-universite,
  .eventin-carte-wrap .detail-panel .detail-section-hint {
    color: var(--text-secondary) !important;
  }
  .eventin-carte-wrap .detail-panel .detail-section-title,
  .eventin-carte-wrap .detail-panel .detail-member-name,
  .eventin-carte-wrap .detail-panel #detail-title {
    color: var(--text) !important;
  }
  .eventin-carte-wrap .detail-panel .detail-link,
  .eventin-carte-wrap .detail-panel .detail-member-role {
    color: var(--accent) !important;
  }
  
 .centre-card p {font-size: 0.9rem;}
