    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
    :root {
      --pink-accent: #e91e8c;
      --pink-soft:   #fce7f3;
      --sidebar-w:   210px;
      --font:        'Poppins', sans-serif;
      --border:      #eedce8;
      --text:        #1a1a2e;
      --text-muted:  #9b8b99;
    }
    body { font-family: var(--font); display: flex; height: 100vh; overflow: hidden; background: #f9f4f8; color: var(--text); }

    /* SIDEBAR */
    #sidebar {
      width: var(--sidebar-w); min-width: var(--sidebar-w); background: #fff;
      border-right: 1px solid var(--border); display: flex; flex-direction: column;
      padding: 26px 20px; transition: all .28s cubic-bezier(.4,0,.2,1);
      z-index: 900; overflow: hidden; flex-shrink: 0;
      box-shadow: 2px 0 12px rgba(233,30,140,.04);
    }
    #sidebar.collapsed { width: 0; min-width: 0; padding: 0; border-right-width: 0; }
    #sidebar-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; white-space: nowrap; }
    #sidebar-logo .dot { width: 8px; height: 8px; background: var(--pink-accent); border-radius: 50%; }
    #sidebar-logo h1 { font-size: 14px; font-weight: 600; white-space: nowrap; }
    .nav-section-title {
      font-size: 10px; font-weight: 700; color: var(--pink-accent);
      text-transform: uppercase; letter-spacing: .1em;
      padding: 0 12px; margin: 14px 0 4px; white-space: nowrap;
    }
    .nav-section-title:first-child { margin-top: 0; }
    .nav-item {
      display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px;
      font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .15s;
      white-space: nowrap; color: var(--text-muted); margin-bottom: 2px;
    }
    .nav-item:hover { background: var(--pink-soft); color: var(--pink-accent); }
    .nav-item.active { background: var(--pink-soft); color: var(--pink-accent); }
    .nav-item.disabled { opacity: .4; cursor: not-allowed; }
    .nav-item.disabled:hover { background: none; color: var(--text-muted); }
    .nav-icon { width: 15px; height: 15px; flex-shrink: 0; }

    /* TOGGLE BTN */
    #toggle-btn {
      position: fixed; top: 16px; left: calc(var(--sidebar-w) - 18px); z-index: 1001;
      width: 28px; height: 28px; background: #fff; border: 1px solid var(--border); border-radius: 50%;
      display: flex; align-items: center; justify-content: center; cursor: pointer;
      transition: all .28s cubic-bezier(.4,0,.2,1); box-shadow: 0 1px 6px rgba(233,30,140,.15); color: var(--pink-accent);
    }
    #toggle-btn:hover { background: var(--pink-soft); }
    #toggle-btn.collapsed { left: 10px; }
    #toggle-btn svg { transition: transform .28s; }
    #toggle-btn.collapsed svg { transform: rotate(180deg); }

    /* MAIN */
    #main { flex: 1; display: flex; flex-direction: column; position: relative; overflow: hidden; min-width: 0; }

    /* BREADCRUMB */
    #breadcrumb-bar {
      position: absolute; top: 16px; left: 50%; transform: translateX(-50%); z-index: 600;
      background: #fff; border: 1px solid var(--border); border-radius: 30px; padding: 8px 18px;
      display: flex; align-items: center; gap: 3px; font-size: 12.5px; white-space: nowrap;
      box-shadow: 0 2px 12px rgba(0,0,0,.08); max-width: calc(100% - 220px); overflow: hidden;
      transition: left .28s cubic-bezier(.4,0,.2,1), transform .28s cubic-bezier(.4,0,.2,1);
    }
    /* When sidebar collapsed, shift breadcrumb right so toggle btn doesn't overlap */
    #main.sidebar-collapsed #breadcrumb-bar {
      left: calc(50% + 22px); transform: translateX(-50%);
    }
    .crumb { color: var(--text-muted); font-weight: 500; font-size: 12.5px; transition: color .15s; }
    .crumb.clickable { cursor: pointer; }
    .crumb.clickable:hover { color: var(--pink-accent); }
    .crumb.last { color: var(--text); font-weight: 600; }
    .crumb-election {
      color: var(--pink-accent) !important; font-weight: 600 !important; font-size: 11.5px;
    }
    .crumb-visite {
      color: #16a34a !important; font-weight: 600 !important; font-size: 11.5px;
    }
    .sep { color: #ddd; font-size: 10px; margin: 0 2px; }

    /* CONTROLS — shift right when sidebar collapses to avoid toggle-btn overlap */
    #controls-bar {
      position: absolute; top: 68px; left: 20px; right: 20px; z-index: 600;
      display: flex; gap: 8px; align-items: center;
      transition: left .28s cubic-bezier(.4,0,.2,1);
    }
    #election-dropdown { margin-left: auto; }
    #main.sidebar-collapsed #controls-bar { left: 1rem; padding-left: calc(28px + .5rem); }
    #back-btn {
      display: none;
      position: absolute; top: 16px; left: 20px; z-index: 600;
      transition: left .28s cubic-bezier(.4,0,.2,1);
    }
    #back-btn.visible { display: flex; }
    #main.sidebar-collapsed #back-btn { left: calc(28px + 1.5rem); }
    .btn-pill {
      display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--border);
      border-radius: 20px; padding: 7px 14px; font-size: 12px; font-weight: 500; font-family: var(--font);
      cursor: pointer; color: var(--text); transition: all .15s; box-shadow: 0 1px 6px rgba(0,0,0,.07); white-space: nowrap;
    }
    .btn-pill:hover { border-color: var(--pink-accent); color: var(--pink-accent); }
    .icon-pink { color: var(--pink-accent); }
    .dropdown { position: relative; }
    #dropdown-menu {
      position: absolute; top: calc(100% + 8px); left: 0; background: #fff; border: 1px solid var(--border);
      border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.12); padding: 8px 0; min-width: 200px;
      display: none; z-index: 1000; animation: dropIn .15s ease;
    }
    @keyframes dropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
    #dropdown-menu.open { display: block; }
    .menu-section-title { font-size: 10px; color: var(--text-muted); padding: 6px 16px 4px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
    .menu-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 16px; font-size: 12.5px; cursor: pointer; color: var(--text); transition: background .1s; }
    .menu-item:hover { background: var(--pink-soft); }
    .menu-item.active { color: var(--pink-accent); font-weight: 600; }
    .menu-item .check { color: var(--pink-accent); }

    /* MAP */
    #map { flex: 1; width: 100%; z-index: 1; }
    .leaflet-container { background: #f2ecf0 !important; }

    /* Remove focus outlines completely */
    .leaflet-interactive,
    .leaflet-interactive:focus,
    path.leaflet-interactive,
    path.leaflet-interactive:focus { outline: none !important; }

    /* Zoom controls bottom-left */
    .leaflet-bottom.leaflet-left { bottom: 0 !important; left: 0 !important; }
    .leaflet-control-zoom { margin: 0 0 20px 16px !important; border: 1px solid var(--border) !important; border-radius: 10px !important; overflow: hidden; }
    .leaflet-control-zoom a { font-family: var(--font) !important; color: var(--text) !important; border-bottom-color: var(--border) !important; }
    .leaflet-control-zoom a:hover { background-color: var(--pink-soft) !important; color: var(--pink-accent) !important; }

    .leaflet-tooltip {
      border: 1px solid var(--border) !important; border-radius: 8px !important;
      padding: 5px 11px !important; font-family: var(--font) !important;
      font-size: 12px !important; font-weight: 500 !important; color: var(--text) !important;
      box-shadow: 0 3px 12px rgba(0,0,0,.10) !important; background: #fff !important;
      max-width: min(360px, calc(100vw - 32px)) !important;
    }
    .leaflet-tooltip::before { display: none !important; }

    /* COMMUNE PANEL — right-side sliding panel, starts below breadcrumb */
    #commune-panel {
      position: absolute; top: 58px; right: 0; bottom: 0;
      z-index: 700; display: none; flex-direction: row; align-items: stretch; pointer-events: none;
    }
    #commune-panel.state-retracted,
    #commune-panel.state-partial,
    #commune-panel.state-full { display: flex; }

    /* Handle tab — pill-shaped, protrudes into the map area */
    #panel-handle {
      width: 0; position: relative; display: flex; align-items: center; pointer-events: all;
    }
    #panel-handle-btn {
      position: absolute;
      left: -50px;              /* fully visible in map — no clipping */
      width: 46px; height: 40px;
      background: #fff;
      border: 1.5px solid var(--pink-accent);
      border-radius: 10px 0 0 10px; /* tab shape: rounded left, flat on panel side */
      display: flex; align-items: center; justify-content: center;
      cursor: pointer;
      box-shadow: -4px 2px 14px rgba(233,30,140,.22);
      color: var(--pink-accent);
      transition: all .2s;
    }
    #panel-handle-btn:hover { background: var(--pink-soft); }

    /* When retracted: pill fully sticks out as a floating tab from right edge */
    #commune-panel.state-retracted #panel-content { display: none; }
    #commune-panel.state-retracted #panel-handle-btn {
      left: -58px;              /* more margin so it's clearly readable */
      width: 54px; height: 44px;
      background: var(--pink-accent);
      color: #fff;
      border-color: var(--pink-accent);
      border-radius: 12px 3px 3px 12px; /* fully rounded left, tiny radius right */
      box-shadow: -5px 2px 20px rgba(233,30,140,.45);
    }
    #commune-panel.state-retracted #panel-handle-btn:hover {
      background: #c2166e;
      box-shadow: -5px 2px 24px rgba(233,30,140,.6);
    }

    /* Content wrapper */
    #panel-content {
      background: #fff; border-left: 1px solid var(--border); display: flex; flex-direction: column;
      pointer-events: all; transition: width .3s cubic-bezier(.4,0,.2,1);
      box-shadow: -4px 0 24px rgba(0,0,0,.08); overflow: hidden; width: 380px;
    }
    /* In list context: no handle tab needed */
    #commune-panel.list-context #panel-handle { display: none !important; }

    /* Panel header */
    #panel-header { padding: 20px 20px 0 20px; flex-shrink: 0; }
    #panel-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
    #panel-commune-name { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .panel-header-actions { display: flex; gap: 4px; flex-shrink: 0; margin-left: 8px; }
    .panel-icon-btn {
      width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px;
      background: #fff; display: flex; align-items: center; justify-content: center;
      cursor: pointer; color: var(--text-muted); transition: all .15s;
    }
    .panel-icon-btn:hover { border-color: var(--pink-accent); color: var(--pink-accent); background: var(--pink-soft); }
    #panel-size-btn .compress-icon { display: none; }
    #panel-divider { height: 1px; background: var(--border); margin: 14px 0 0 0; }

    /* Panel scrollable body */
    #panel-body { flex: 1; overflow-y: auto; padding: 18px 20px 28px 20px; }
    #panel-body::-webkit-scrollbar { width: 4px; }
    #panel-body::-webkit-scrollbar-thumb { background: #e5d5e0; border-radius: 2px; }

    .panel-section { margin-bottom: 22px; }
    .panel-section-title { font-size: 12.5px; font-weight: 600; color: var(--pink-accent); margin-bottom: 14px; letter-spacing: .01em; }

    /* ── Collapsible sections ── */
    .panel-section-collapsible .panel-section-title {
      cursor: pointer; display: flex; align-items: center; gap: 6px; user-select: none;
    }
    .panel-chevron { transition: transform 0.25s ease; flex-shrink: 0; opacity: 0.7; }
    .panel-section-collapsible.collapsed .panel-chevron { transform: rotate(-90deg); }
    .panel-section-body {
      overflow: hidden; transition: max-height 0.3s ease, opacity 0.25s ease;
      max-height: 800px; opacity: 1;
    }
    .panel-section-collapsible.collapsed .panel-section-body { max-height: 0; opacity: 0; }

    .info-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: flex-start; }
    .info-label {
      font-size: 10.5px; font-weight: 600; color: var(--text-muted);
      min-width: 105px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .06em; padding-top: 3px;
    }
    .info-value { font-size: 12.5px; font-weight: 400; color: var(--text); line-height: 1.6; }

    /* Collapsible info-row (for Députés > 2, Conseillers > 4) */
    .info-row-collapsible .info-label {
      cursor: pointer; user-select: none;
    }
    .info-row-collapsible .info-label::before {
      content: '▾'; display: inline-block; margin-right: 4px; font-size: 9px;
      transition: transform .2s ease;
    }
    .info-row-collapsible.info-row-collapsed .info-label::before {
      transform: rotate(-90deg);
    }
    .info-row-collapsible.info-row-collapsed .info-value {
      max-height: 0; overflow: hidden; opacity: 0; margin: 0;
      transition: max-height .25s ease, opacity .2s ease;
    }
    .info-row-collapsible .info-value {
      max-height: 500px; opacity: 1;
      transition: max-height .35s ease, opacity .2s ease;
    }

    .badge {
      display: inline-block; padding: 3px 10px; border-radius: 20px;
      font-size: 11px; font-weight: 500; background: var(--pink-soft);
      color: var(--pink-accent); margin: 2px 3px 2px 0; line-height: 1.4;
    }
    /* Badge élu — fond teinté par parti + dot couleur, cliquable */
    .badge-elu {
      display: inline-flex; align-items: center; gap: 7px;
      padding: 4px 12px; border-radius: 20px; font-size: 11.5px; font-weight: 500;
      border: 1px solid; margin: 2px 4px 2px 0; line-height: 1.4; white-space: nowrap;
      cursor: pointer; text-decoration: none; color: var(--text);
      transition: filter .15s;
    }
    .badge-elu:hover { filter: brightness(.9); }
    .badge-elu-dot {
      width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
    }
    .badge-deleg {
      cursor: default;
      transition: background .15s, color .15s;
    }
    .badge-deleg:hover {
      background: var(--pink-accent);
      color: #fff;
    }
    .empty-value { color: var(--text-muted); font-style: italic; font-size: 12px; }

    /* Panel — section élections */
    .panel-elec-group { margin-bottom: 16px; }
    .panel-elec-group-title {
      font-size: 11px; font-weight: 700; color: var(--text); text-transform: uppercase;
      letter-spacing: .06em; margin-bottom: 8px;
    }
    /* Collapsible election group */
    .panel-elec-group.panel-section-collapsible .panel-elec-group-title {
      cursor: pointer; display: flex; align-items: center; gap: 6px; user-select: none;
    }
    .panel-elec-group.panel-section-collapsible.collapsed .panel-elec-group-title { margin-bottom: 0; }
    .panel-elec-tours { display: flex; flex-direction: column; gap: 0; }
    .panel-elec-tour { min-width: 0; padding: 0; }
    .panel-elec-tour + .panel-elec-tour { border-top: 1px solid #eee; margin-top: 8px; padding-top: 8px; }
    /* ── Panel columns wrapper ── */
    #panel-columns { display: block; }
    #panel-col-left, #panel-col-right { display: block; }

    /* ── 2-column layout in full state — independent scroll per column ── */
    #commune-panel.state-full #panel-body {
      overflow-y: hidden; display: flex; flex-direction: column;
    }
    #commune-panel.state-full #panel-columns {
      display: flex; gap: 20px; flex: 1; min-height: 0;
    }
    #commune-panel.state-full #panel-col-left,
    #commune-panel.state-full #panel-col-right {
      flex: 1; min-width: 0; overflow-y: auto; padding-right: 6px;
    }
    #commune-panel.state-full #panel-col-left::-webkit-scrollbar,
    #commune-panel.state-full #panel-col-right::-webkit-scrollbar { width: 4px; }
    #commune-panel.state-full #panel-col-left::-webkit-scrollbar-thumb,
    #commune-panel.state-full #panel-col-right::-webkit-scrollbar-thumb { background: #e5d5e0; border-radius: 2px; }

    #commune-panel.state-full .panel-elec-tours { flex-direction: row; }
    #commune-panel.state-full .panel-elec-tour { flex: 1; padding: 0 10px; }
    #commune-panel.state-full .panel-elec-tour:first-child { padding-left: 0; }
    #commune-panel.state-full .panel-elec-tour:last-child { padding-right: 0; }
    #commune-panel.state-full .panel-elec-tour + .panel-elec-tour { border-top: none; margin-top: 0; padding-top: 0; border-left: 1px solid #eee; }
    .panel-elec-tour-title {
      font-size: 10.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px;
    }
    .panel-elec-row {
      display: flex; align-items: center; gap: 6px; padding: 2px 0; font-size: 11px;
    }
    .panel-elec-badge {
      display: inline-block; padding: 2px 7px; border-radius: 10px; font-size: 10px;
      font-weight: 500; white-space: nowrap; border: 1.5px solid;
    }
    .panel-elec-right { text-align: right; white-space: nowrap; margin-left: auto; }
    .panel-elec-voix { font-weight: 300; color: var(--text-muted); font-size: 10px; }
    .panel-elec-pct { font-weight: 700; font-size: 11px; }
    .panel-elec-footer {
      margin-top: 4px; font-size: 9.5px; color: var(--text-muted); font-weight: 300;
    }
    /* Multi-circo dans le panel */
    .panel-elec-circo-title {
      font-size: 10px; font-weight: 600; color: var(--pink-accent);
      margin: 10px 0 4px; padding-top: 6px; border-top: 1px solid #f0e8ee;
    }
    .panel-elec-circo-title:first-child { margin-top: 0; border-top: none; padding-top: 0; }

    /* Bouton Tendance politique */
    #tendance-btn {
      display: none; align-items: center; gap: 6px;
      padding: 7px 14px; background: #fff; border: 1px solid var(--border);
      border-radius: 20px; font-size: 12px; font-weight: 500; font-family: var(--font);
      cursor: pointer; color: var(--text); white-space: nowrap;
      box-shadow: 0 1px 6px rgba(0,0,0,.07); transition: all .15s;
    }
    #tendance-btn:hover { border-color: var(--pink-accent); color: var(--pink-accent); }
    #tendance-btn.active {
      background: var(--pink-accent); color: #fff;
      border-color: var(--pink-accent);
      box-shadow: 0 2px 10px rgba(233,30,140,.3);
    }
    /* Bouton Élection split */
    #election-split {
      display: none; align-items: stretch;
      border-radius: 20px; overflow: hidden;
      border: 1px solid var(--border); background: #fff;
      box-shadow: 0 1px 6px rgba(0,0,0,.07); transition: all .15s;
    }
    #election-split:hover { border-color: var(--pink-accent); }
    #election-split #election-btn {
      display: flex; align-items: center; gap: 6px;
      padding: 7px 12px; font-size: 12px; font-weight: 500; font-family: var(--font);
      border: none; background: transparent; cursor: pointer;
      color: var(--text); white-space: nowrap; border-radius: 0; box-shadow: none;
    }
    #election-split #election-btn:hover { color: var(--pink-accent); }
    #election-chevron-btn {
      display: flex; align-items: center; justify-content: center;
      padding: 7px 10px; border: none; border-left: 1px solid var(--border);
      background: transparent; cursor: pointer; color: #888; transition: background .15s;
    }
    #election-chevron-btn:hover { background: rgba(0,0,0,.04); }
    /* Active state */
    #election-split.active {
      background: var(--pink-accent); border-color: var(--pink-accent);
      box-shadow: 0 2px 10px rgba(233,30,140,.3);
    }
    #election-split.active #election-btn { color: #fff; }
    #election-split.active #election-btn svg { stroke: #fff; }
    #election-split.active #election-chevron-btn {
      color: #fff; border-left-color: rgba(255,255,255,.3);
    }
    #election-split.active #election-chevron-btn:hover { background: rgba(255,255,255,.15); }
    #election-menu {
      position: absolute; top: calc(100% + 8px); right: 0; background: #fff; border: 1px solid var(--border);
      border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.12); padding: 8px 0; min-width: 200px;
      display: none; z-index: 1000; animation: dropIn .15s ease;
    }
    #election-menu.open { display: block; }
    #election-menu .menu-item .check { display: none; color: var(--pink-accent); }
    #election-menu .menu-item.active .check { display: inline; }

    /* Tooltip élection */
    .leaflet-tooltip.tt-election {
      line-height: 1.55; padding: 10px 14px !important; max-width: min(420px, calc(100vw - 32px)); min-width: 220px;
    }
    /* Multi-circo : grille 2 colonnes */
    .tt-election .elec-multi {
      display: grid; grid-template-columns: 1fr 1fr; gap: 8px 0;
    }
    .tt-election .elec-col {
      padding: 0 8px; border-left: 1px solid #eee;
    }
    .tt-election .elec-col:nth-child(odd) { border-left: none; padding-left: 0; }
    .tt-election .elec-col:nth-child(even) { padding-right: 0; }
    .tt-election .elec-col-title {
      font-size: 10px; font-weight: 600; color: var(--pink-accent);
      margin-bottom: 4px; white-space: nowrap;
    }
    .tt-election .elec-multi .elec-badge { font-size: 9.5px; padding: 1px 6px; }
    .tt-election .elec-multi .elec-row { gap: 5px; padding: 1.5px 0; font-size: 10.5px; }
    .tt-election .elec-multi .elec-pct { font-size: 10.5px; }
    .tt-election .elec-multi .elec-footer { font-size: 9.5px; gap: 4px; margin-top: 4px; padding-top: 3px; }
    .tt-election strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 6px; }
    .tt-election .elec-row {
      display: flex; align-items: center; justify-content: space-between;
      gap: 10px; padding: 2.5px 0; font-size: 11.5px;
    }
    .tt-election .elec-badge {
      display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 10.5px;
      font-weight: 500; white-space: nowrap; border: 1.5px solid;
    }
    .tt-election .elec-right {
      text-align: right; white-space: nowrap; margin-left: auto;
    }
    .tt-election .elec-voix { font-weight: 300; color: var(--text-muted); font-size: 11px; }
    .tt-election .elec-pct { font-weight: 700; font-size: 11.5px; }
    .tt-election .elec-footer {
      margin-top: 6px; padding-top: 5px; border-top: 1px solid #eee;
      font-size: 10.5px; color: var(--text-muted); font-weight: 300;
      display: flex; gap: 8px; justify-content: center;
    }

    /* Bouton Visite split (même pattern qu'Élection) */
    #visite-dropdown { position: relative; }
    #visite-split {
      display: none; align-items: stretch;
      border-radius: 20px; overflow: hidden;
      border: 1px solid var(--border); background: #fff;
      box-shadow: 0 1px 6px rgba(0,0,0,.07); transition: all .15s;
    }
    #visite-split:hover { border-color: #22c55e; }
    #visite-split #visite-btn {
      display: flex; align-items: center; gap: 6px;
      padding: 7px 12px; font-size: 12px; font-weight: 500; font-family: var(--font);
      border: none; background: transparent; cursor: pointer;
      color: var(--text); white-space: nowrap; border-radius: 0; box-shadow: none;
    }
    #visite-split #visite-btn:hover { color: #22c55e; }
    #visite-chevron-btn {
      display: flex; align-items: center; justify-content: center;
      padding: 7px 10px; border: none; border-left: 1px solid var(--border);
      background: transparent; cursor: pointer; color: #888; transition: background .15s;
    }
    #visite-chevron-btn:hover { background: rgba(0,0,0,.04); }
    #visite-split.active {
      background: #22c55e; border-color: #22c55e;
      box-shadow: 0 2px 10px rgba(34,197,94,.3);
    }
    #visite-split.active #visite-btn { color: #fff; }
    #visite-split.active #visite-btn svg { stroke: #fff; }
    #visite-split.active #visite-chevron-btn {
      color: #fff; border-left-color: rgba(255,255,255,.3);
    }
    #visite-split.active #visite-chevron-btn:hover { background: rgba(255,255,255,.15); }

    /* Panneau date visite */
    #visite-date-panel {
      position: absolute; top: calc(100% + 8px); right: 0; background: #fff;
      border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,.12); padding: 10px 0; min-width: 240px;
      display: none; z-index: 1000; animation: dropIn .15s ease;
    }
    #visite-date-panel.open { display: block; }
    #visite-date-panel .menu-item { position: relative; padding-right: 32px; }
    #visite-date-panel .menu-item.active { color: #22c55e; font-weight: 600; }
    #visite-date-panel .menu-item.active::after {
      content: '✓'; position: absolute; right: 14px; color: #22c55e;
    }
    .visite-date-separator {
      height: 1px; background: var(--border); margin: 8px 14px;
    }
    .visite-date-custom {
      padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 6px;
      background: #f8faf9; margin: 0 8px; border-radius: 8px;
    }
    .visite-date-custom-title {
      font-size: 10px; font-weight: 600; text-transform: uppercase;
      letter-spacing: .5px; color: var(--text-muted); margin-bottom: 2px;
    }
    .visite-date-row {
      display: flex; align-items: center; gap: 8px;
    }
    .visite-date-row label {
      font-size: 11px; font-weight: 600; color: #6b7280;
      min-width: 22px; text-align: right; text-transform: uppercase;
      letter-spacing: .3px;
    }
    .visite-date-row input[type="date"] {
      flex: 1; padding: 6px 10px; border: 1.5px solid #e5e7eb;
      border-radius: 8px; font-size: 12.5px; font-family: var(--font);
      outline: none; transition: all .2s; color: var(--text);
      background: #fff; -webkit-appearance: none; appearance: none;
    }
    .visite-date-row input[type="date"]:hover { border-color: #86efac; background: #f0fdf4; }
    .visite-date-row input[type="date"]:focus {
      border-color: #22c55e; background: #fff;
      box-shadow: 0 0 0 3px rgba(34,197,94,.10);
    }

    /* Légende familles politiques */
    #tendance-legend {
      display: none; position: absolute; bottom: 40px; right: 12px;
      background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
      border: 1px solid var(--border); border-radius: 12px;
      padding: 10px 14px; z-index: 650;
      box-shadow: 0 4px 20px rgba(0,0,0,.12); font-size: 11.5px;
    }
    #tendance-legend.visible { display: block; }
    .tleg-row { display: flex; align-items: center; gap: 7px; padding: 3px 0; }
    .tleg-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
    .tleg-label { color: var(--text); font-weight: 500; }
    /* Tooltip enrichi tendance */
    .leaflet-tooltip.tt-tendance { line-height: 1.55; padding: 6px 10px; }
    .leaflet-tooltip.tt-tendance strong { display: block; font-size: 12.5px; color: var(--text); }

    /* ══════════════════════════════════════════════════════════
       VISITE DETAIL PANEL
    ══════════════════════════════════════════════════════════ */
    #visite-detail-panel {
      position: fixed; top: 0; right: -400px; bottom: 0;
      width: 380px; background: #fff; z-index: 900;
      border-left: 1px solid var(--border);
      box-shadow: -4px 0 24px rgba(0,0,0,.08);
      transition: right .3s cubic-bezier(.4,0,.2,1);
      display: flex; flex-direction: column;
    }
    #visite-detail-panel.open { right: 0; }

    #visite-detail-content {
      flex: 1; display: flex; flex-direction: column; overflow: hidden;
    }
    #visite-detail-header {
      padding: 16px 20px 12px; flex-shrink: 0;
    }
    .visite-detail-title-row {
      display: flex; align-items: center; gap: 10px;
    }
    .visite-detail-title-row h2 {
      flex: 1; min-width: 0;
      margin: 0; font-size: 16px; font-weight: 600; color: var(--text);
      line-height: 1.3;
    }
    .visite-detail-title-row .visite-detail-title-edit {
      flex: 1; min-width: 0;
    }
    .visite-detail-title-row .panel-header-actions {
      flex-shrink: 0;
    }
    .visite-detail-date-row {
      display: flex; align-items: center; gap: 8px; margin-top: 6px;
    }
    .visite-detail-date {
      font-size: 13px; color: var(--text-muted);
      display: flex; align-items: center; gap: 6px;
    }
    .visite-detail-date-edit {
      padding: 6px 10px; border: 1.5px solid var(--border); border-radius: 8px;
      font-size: 13px; font-family: var(--font); outline: none;
    }
    .visite-detail-date-edit:focus { border-color: var(--pink-accent); }
    .visite-detail-title-edit {
      width: 100%; padding: 6px 10px;
      border: 1.5px solid var(--border); border-radius: 8px;
      font-size: 15px; font-weight: 600; font-family: var(--font); outline: none;
      color: var(--text); box-sizing: border-box;
    }
    .visite-detail-title-edit:focus { border-color: var(--pink-accent); }
    .visite-detail-commune-badge {
      display: inline-block; padding: 2px 10px; border-radius: 12px;
      background: #f0f0f0; color: #666;
      font-size: 11px; font-weight: 500; margin-top: 8px;
    }
    .visite-panel-divider { height: 1px; background: var(--border); margin: 0 20px; }

    #visite-detail-body {
      flex: 1; overflow-y: auto; padding: 18px 20px 28px 20px;
    }
    #visite-detail-body::-webkit-scrollbar { width: 4px; }
    #visite-detail-body::-webkit-scrollbar-thumb { background: #e5d5e0; border-radius: 2px; }

    .visite-detail-section { margin-bottom: 18px; }
    .visite-detail-label {
      display: block; font-size: 10px; font-weight: 700; text-transform: uppercase;
      letter-spacing: .5px; color: var(--text-muted); margin-bottom: 8px;
    }
    .visite-detail-section textarea {
      width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
      border-radius: 10px; font-size: 13px; font-family: var(--font);
      outline: none; resize: vertical; min-height: 100px; color: var(--text);
      background: var(--bg); transition: border-color .2s;
      box-sizing: border-box;
    }
    .visite-detail-section textarea:focus {
      border-color: var(--pink-accent); box-shadow: 0 0 0 3px rgba(233,30,99,.08);
    }
    .visite-file-item {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
      margin-bottom: 6px; background: #fafafa; font-size: 13px;
    }
    .visite-file-icon { font-size: 18px; flex-shrink: 0; }
    .visite-file-info { flex: 1; min-width: 0; }
    .visite-file-name {
      font-weight: 500; color: var(--text); white-space: nowrap;
      overflow: hidden; text-overflow: ellipsis;
    }
    .visite-file-size { font-size: 11px; color: var(--text-muted); }
    .visite-file-actions { display: flex; gap: 4px; flex-shrink: 0; }
    .visite-file-actions button {
      background: none; border: none; cursor: pointer; padding: 4px 6px;
      border-radius: 6px; color: var(--text-muted); font-size: 14px;
      transition: all .15s;
    }
    .visite-file-actions button:hover { background: #f3f4f6; color: var(--text); }
    .visite-file-actions button.delete-file:hover { background: #fee2e2; color: #ef4444; }
    .visite-upload-btn {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 8px 14px; border: 1.5px dashed var(--border); border-radius: 10px;
      font-size: 12.5px; font-weight: 500; color: var(--text-muted);
      cursor: pointer; transition: all .2s; font-family: var(--font);
    }
    .visite-upload-btn:hover { border-color: var(--pink-accent); color: var(--pink-accent); background: #fdf2f8; }
    .visite-upload-hint {
      font-size: 11px; color: #9ca3af; margin-top: 6px;
    }

    #visite-detail-footer {
      flex-shrink: 0; padding: 12px 20px; border-top: 1px solid var(--border);
      display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    }
    .visite-detail-actions-right {
      display: flex; align-items: center; gap: 10px;
    }
    .btn-delete-visite {
      background: none !important; border-color: #fca5a5 !important; color: #ef4444 !important;
      display: inline-flex; align-items: center; gap: 5px;
    }
    .btn-delete-visite:hover {
      background: #fef2f2 !important; border-color: #ef4444 !important;
    }
    .btn-visite-detail {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 5px 13px; border-radius: 20px; font-size: 11.5px; font-weight: 500;
      font-family: var(--font); cursor: pointer; white-space: nowrap;
      transition: all .15s; border: 1px solid var(--border);
      background: #fff; color: var(--text);
    }
    .btn-visite-detail:hover { border-color: var(--text-muted); }
    .visite-files-empty {
      font-size: 12px; color: #9ca3af; font-style: italic; padding: 6px 0;
    }

    /* ── Feed Actualités ── */
    .actu-item {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 0; border-bottom: 1px solid var(--border);
    }
    .actu-item:last-child { border-bottom: none; }
    .actu-thumb {
      width: 56px; height: 56px; border-radius: 6px;
      object-fit: cover; flex-shrink: 0; background: var(--pink-soft);
    }
    .actu-thumb-placeholder {
      width: 56px; height: 56px; border-radius: 6px;
      background: var(--pink-soft); flex-shrink: 0;
    }
    .actu-body { flex: 1; min-width: 0; }
    .actu-title {
      font-size: 11.5px; font-weight: 500; color: var(--text);
      line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2;
      -webkit-box-orient: vertical; overflow: hidden;
    }
    .actu-meta {
      font-size: 10px; color: var(--text-muted); margin-top: 3px;
    }
    .actu-read-btn {
      font-size: 10.5px; font-weight: 600; color: var(--pink-accent);
      text-decoration: none; white-space: nowrap; flex-shrink: 0;
      padding: 4px 10px; border: 1px solid var(--pink-accent);
      border-radius: 12px; transition: all .15s;
    }
    .actu-read-btn:hover {
      background: var(--pink-accent); color: #fff;
    }
    .actu-loading {
      font-size: 11px; color: var(--text-muted); padding: 12px 0;
    }
    .actu-empty {
      font-size: 11px; color: var(--text-muted); padding: 8px 0; font-style: italic;
    }
    .actu-delete-btn {
      display: none; flex-shrink: 0; width: 26px; height: 26px;
      border-radius: 50%; border: 1px solid #e8aaaa; background: #fff5f5;
      color: #d44; cursor: pointer; align-items: center; justify-content: center;
      font-size: 12px; transition: all .15s;
    }
    .actu-delete-btn:hover { background: #fde2e2; border-color: #d44; }
    .commune-panel-editing .actu-delete-btn { display: inline-flex; }
    .commune-panel-editing .panel-add-btn { display: none; }

    /* Panel + (add) button on section titles */
    .panel-add-btn {
      display: inline-flex; align-items: center; justify-content: center;
      width: 22px; height: 22px; border-radius: 50%;
      border: 1.5px solid var(--pink-accent); background: #fff;
      color: var(--pink-accent); cursor: pointer;
      margin-left: auto; flex-shrink: 0; transition: all .15s;
    }
    .panel-add-btn:hover { background: var(--pink-soft); }
    .panel-section-title { display: flex; align-items: center; }

    /* Commune panel footer */
    #panel-footer {
      flex-shrink: 0; padding: 12px 20px; border-top: 1px solid var(--border);
      display: flex; justify-content: flex-end; gap: 8px;
    }

    /* Article URL modal */
    .modal-overlay {
      position: fixed; inset: 0; z-index: 5000;
      background: rgba(0,0,0,.35); backdrop-filter: blur(3px);
      display: flex; align-items: center; justify-content: center;
    }
    .modal-card {
      background: #fff; border-radius: 16px; padding: 28px 24px 20px;
      width: 420px; max-width: 90vw;
      box-shadow: 0 8px 40px rgba(0,0,0,.18);
    }
    .modal-card h3 {
      font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--text);
    }
    .modal-card input[type="url"] {
      width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
      border-radius: 10px; font-size: 13px; font-family: var(--font);
      outline: none; transition: border .15s;
    }
    .modal-card input[type="url"]:focus { border-color: var(--pink-accent); }
    .modal-card textarea {
      width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
      border-radius: 10px; font-size: 13px; font-family: var(--font);
      outline: none; transition: border .15s; resize: vertical; min-height: 60px;
    }
    .modal-card textarea:focus { border-color: var(--pink-accent); }
    .emoji-picker {
      display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px;
    }
    .emoji-btn {
      border: 1.5px solid var(--border); background: #fff; border-radius: 8px;
      padding: 4px 8px; font-size: 16px; cursor: pointer; transition: all .15s;
      line-height: 1.2;
    }
    .emoji-btn[data-emoji=""] { font-size: 10px; color: var(--text-muted); padding: 4px 10px; }
    .emoji-btn:hover { border-color: var(--pink-accent); background: var(--pink-soft); }
    .emoji-btn.selected { border-color: var(--pink-accent); background: var(--pink-soft); box-shadow: 0 0 0 1px var(--pink-accent); }
    .modal-field-label {
      font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
      letter-spacing: .05em; margin-bottom: 4px; display: block;
    }
    /* Type picker (note/visite) */
    .info-type-picker { display: flex; gap: 6px; margin-bottom: 12px; }
    .info-type-btn {
      flex: 1; padding: 8px; border: 1.5px solid var(--border); border-radius: 10px;
      background: #fff; font-size: 12.5px; font-family: var(--font); cursor: pointer;
      text-align: center; transition: all .15s;
    }
    .info-type-btn:hover { border-color: var(--pink-accent); }
    .info-type-btn.selected { border-color: var(--pink-accent); background: var(--pink-soft); }

    /* Panel subsections */
    .panel-subsection { margin-bottom: 14px; }
    .panel-subsection:last-child { margin-bottom: 0; }
    .panel-subsection-title {
      font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase;
      letter-spacing: .05em; margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border);
    }

    /* Bouton Voir Plus */
    .btn-voir-plus {
      display: block; width: 100%; padding: 6px; border: 1px solid var(--border); border-radius: 8px;
      background: #fff; color: var(--pink-accent); font-size: 11.5px; font-weight: 500;
      cursor: pointer; text-align: center; margin-top: 8px; transition: all .15s;
    }
    .btn-voir-plus:hover { background: var(--pink-soft); }

    /* Modale Voir Plus */
    .modal-card-large {
      width: 600px; max-width: 95vw; height: 75vh;
      display: flex; flex-direction: column;
    }
    .voir-plus-header {
      display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
      flex-shrink: 0;
    }
    .voir-plus-header h3 { margin: 0; }
    .voir-plus-toolbar {
      display: flex; gap: 8px; margin-bottom: 12px; flex-shrink: 0; align-items: center;
      justify-content: flex-end;
    }
    .voir-plus-search { flex: 1; }
    .voir-plus-search input {
      width: 100%; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 10px;
      font-size: 13px; font-family: var(--font); outline: none; transition: border .15s;
    }
    .voir-plus-search input:focus { border-color: var(--pink-accent); }
    #voir-plus-period-dropdown .vp-period-panel {
      right: 0; left: auto;
    }
    @media (max-width: 600px) {
      #voir-plus-period-dropdown .vp-period-panel {
        right: auto; left: 50%; transform: translateX(-50%);
        min-width: 220px; max-width: calc(100vw - 40px);
      }
    }
    #voir-plus-list { flex: 1; overflow-y: auto; min-height: 0; }
    #voir-plus-pagination {
      padding-top: 12px; display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;
      flex-shrink: 0;
    }
    .voir-plus-edit-btn {
      padding: 6px 14px; border: 1.5px solid var(--pink-accent); border-radius: 20px;
      background: #fff; color: var(--pink-accent); font-size: 12px; font-weight: 500;
      font-family: var(--font); cursor: pointer; white-space: nowrap; transition: all .15s;
    }
    .voir-plus-edit-btn:hover { background: var(--pink-soft); }
    .voir-plus-edit-actions { display: flex; gap: 8px; align-items: center; }
    .voir-plus-editing .actu-delete-btn { display: inline-flex !important; }
    .voir-plus-editing .info-note-delete { display: inline-flex !important; }

    .modal-error {
      font-size: 11.5px; color: #d44; margin-top: 8px;
    }
    .modal-actions {
      display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px;
    }

    /* Info notes (text items in Informations section) */
    .info-note-item {
      display: flex; align-items: center; gap: 8px; padding: 8px 0;
      border-bottom: 1px solid var(--border); position: relative;
    }
    .info-note-item:last-child { border-bottom: none; }
    .info-note-emoji { font-size: 18px; flex-shrink: 0; }
    .info-note-body { flex: 1; min-width: 0; }
    .info-note-text { font-size: 12.5px; color: var(--text); line-height: 1.5; }
    .info-note-date { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
    .info-note-delete {
      flex-shrink: 0; width: 26px; height: 26px;
      border-radius: 50%; border: 1px solid #e8aaaa; background: #fff5f5;
      color: #d44; cursor: pointer; display: none;
      align-items: center; justify-content: center;
      font-size: 12px; transition: all .15s;
    }
    .info-note-delete:hover { background: #fde2e2; border-color: #d44; }
    .commune-panel-editing .info-note-delete { display: inline-flex; }

    /* LOADING */
    #loading {
      position: absolute; inset: 0; z-index: 2000; background: rgba(249,244,248,.92);
      display: flex; flex-direction: column; align-items: center; justify-content: center; backdrop-filter: blur(4px);
    }
    #loading.hidden { display: none; }
    .loading-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 28px 36px; text-align: center; box-shadow: 0 8px 32px rgba(233,30,140,.08); }
    .loading-card h2 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
    .loading-card p  { font-size: 12px; color: var(--text-muted); margin-bottom: 20px; }
    .loader { display: flex; align-items: center; justify-content: center; gap: 5px; }
    .loader span { width: 7px; height: 7px; background: var(--pink-accent); border-radius: 50%; animation: bounce 1.2s ease-in-out infinite; }
    .loader span:nth-child(2) { animation-delay: .2s; }
    .loader span:nth-child(3) { animation-delay: .4s; }
    @keyframes bounce { 0%,80%,100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
    .error-badge {
      position: absolute; bottom: 20px; right: 20px; z-index: 800; background: #fff;
      border: 1px solid #fee2e2; border-radius: 10px; padding: 10px 16px; font-size: 11.5px;
      color: #991b1b; box-shadow: 0 2px 12px rgba(0,0,0,.08); max-width: 320px; display: none;
    }
    /* ══════════════════════════════════════════════════════════
       LIST PAGE
    ══════════════════════════════════════════════════════════ */
    #list-page {
      display: none; flex: 1; flex-direction: column; overflow: hidden;
      background: #f7f2f6; min-width: 0;
      transition: padding-left .28s cubic-bezier(.4,0,.2,1);
    }
    #list-page.active { display: flex; }
    #list-page.sidebar-collapsed { padding-left: 28px; }

    /* List page title */
    #list-title {
      flex-shrink: 0; padding: 22px 36px 0;
      font-size: 20px; font-weight: 700; color: var(--text);
      letter-spacing: -.01em;
    }

    /* List breadcrumb + back button row */
    #list-breadcrumb { display: none; }
    .list-crumb { color: var(--text-muted); font-weight: 500; cursor: default; }
    .list-crumb.clickable { cursor: default; }
    .list-crumb.last { color: var(--text); font-weight: 600; }
    .list-sep { color: #ddd; margin: 0 3px; font-size: 11px; }
    #list-back-btn {
      display: none; align-items: center; gap: 6px;
      background: #fff; border: 1px solid var(--border); border-radius: 20px;
      padding: 5px 12px; font-size: 12px; font-weight: 500; font-family: var(--font);
      cursor: pointer; color: var(--text); transition: all .15s;
      box-shadow: 0 1px 6px rgba(0,0,0,.06);
    }
    #list-back-btn:hover { border-color: var(--pink-accent); color: var(--pink-accent); }
    #list-back-btn.visible { display: flex; }

    /* Panel mini-map section */
    #panel-mini-map-section { display: none; }
    #commune-panel.list-context #panel-mini-map-section { display: block; }
    #panel-mini-map {
      height: 200px; border-radius: 10px; overflow: hidden;
      border: 1px solid var(--border); margin-top: 4px;
    }
    /* Filter bar — back button between search and table */
    #list-filter-bar {
      flex-shrink: 0; padding: 10px 36px 0;
      display: flex; align-items: center; gap: 10px; min-height: 0;
    }
    #list-filter-bar:empty { display: none; }

    /* Filtres dropdown — intégrés dans la topbar */
    .list-filter-select {
      appearance: none; -webkit-appearance: none;
      height: 34px; padding: 0 26px 0 11px; font-size: 12px; font-family: var(--font);
      border: 1px solid var(--border); border-radius: 17px; background: #fff;
      color: var(--text); cursor: pointer; outline: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 24 24' fill='none' stroke='%23a09ab0' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 9px center;
      box-shadow: 0 1px 4px rgba(0,0,0,.06); transition: all .15s;
      max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .list-filter-select:hover { border-color: #c8a8d8; }
    .list-filter-select:focus { border-color: var(--pink-accent); outline: none; }
    .list-filter-select.active {
      border-color: var(--pink-accent); background-color: var(--pink-soft);
      color: var(--pink-accent); font-weight: 600;
    }
    #list-reset-btn {
      display: flex; align-items: center; gap: 5px;
      height: 34px; padding: 0 13px; border: 1.5px solid #d0c8d8; border-radius: 17px;
      background: #fff; font-size: 12px; font-weight: 600; font-family: var(--font);
      color: #b0a8bc; cursor: default; transition: all .2s; white-space: nowrap;
      box-shadow: 0 1px 4px rgba(0,0,0,.05); opacity: 0.65;
    }
    #list-reset-btn.active {
      border-color: var(--pink-accent); color: var(--pink-accent);
      cursor: pointer; opacity: 1; box-shadow: 0 1px 4px rgba(233,30,140,.1);
    }
    #list-reset-btn.active:hover { background: var(--pink-accent); color: #fff; }

    /* Top bar */
    #list-topbar {
      flex-shrink: 0; padding: 12px 36px 0 36px;
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    }
    #list-topbar-left  { display: flex; align-items: center; gap: 10px; }
    #list-topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
    #list-search-wrapper { position: relative; flex: 0 0 auto; }
    #list-search-icon {
      position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
      color: var(--text-muted); pointer-events: none; display: flex; align-items: center;
      transition: color .15s;
    }
    #list-search-input {
      background: #fff; border: 1px solid var(--border); border-radius: 24px;
      padding: 9px 18px 9px 38px; font-size: 13px; font-family: var(--font);
      color: var(--text); width: 260px; outline: none; transition: all .2s;
      box-shadow: 0 1px 6px rgba(0,0,0,.06);
    }
    #list-search-input::placeholder { color: var(--text-muted); }
    #list-search-input:focus { border-color: var(--pink-accent); width: 320px; box-shadow: 0 1px 12px rgba(233,30,140,.14); }
    #list-search-wrapper:focus-within #list-search-icon { color: var(--pink-accent); }

    /* List search autocomplete dropdown */
    #list-search-results {
      position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px;
      background: #fff; border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,.12); padding: 6px 0; max-height: 280px; overflow-y: auto;
      display: none; z-index: 1000; animation: dropIn .15s ease;
    }
    #list-search-results.open { display: block; }
    #list-search-results::-webkit-scrollbar { width: 4px; }
    #list-search-results::-webkit-scrollbar-thumb { background: #e5d5e0; border-radius: 2px; }

    /* Counter badge */
    #list-count {
      font-size: 12px; color: var(--text-muted); font-weight: 500; white-space: nowrap;
    }

    /* Table container */
    #list-table-wrap {
      flex: 1; overflow-y: auto; margin: 18px 36px 0 36px;
      background: #fff; border: 1px solid var(--border); border-radius: 16px;
      box-shadow: 0 2px 16px rgba(0,0,0,.05); overflow-x: auto;
    }
    #list-table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
    #list-table-wrap::-webkit-scrollbar-thumb { background: #e5d5e0; border-radius: 3px; }

    /* Table */
    #list-table { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
    #list-table colgroup col:nth-child(1) { width: 18%; }
    #list-table colgroup col:nth-child(2) { width: 14%; }
    #list-table colgroup col:nth-child(3) { width: 18%; }
    #list-table colgroup col:nth-child(4) { width: 15%; }
    #list-table colgroup col:nth-child(5) { width: 14%; }
    #list-table colgroup col:nth-child(6) { width: 21%; }
    .td-maire { font-size: 12px; color: var(--text); }
    #list-table thead { position: sticky; top: 0; z-index: 10; }
    #list-table thead th {
      background: #fff; border-bottom: 1.5px solid var(--border);
      padding: 13px 16px; text-align: left; font-size: 11px; font-weight: 600;
      color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em;
      cursor: pointer; user-select: none; white-space: nowrap;
      transition: color .15s; position: relative; overflow: hidden;
    }
    #list-table tbody td { overflow: hidden; text-overflow: ellipsis; }
    #list-table thead th:hover { color: var(--pink-accent); }
    #list-table thead th.sorted { color: var(--pink-accent); }
    #list-table thead th .sort-icon {
      display: inline-flex; align-items: center; margin-left: 5px; opacity: .35;
      transition: opacity .15s, transform .15s; vertical-align: middle;
    }
    #list-table thead th.sorted .sort-icon { opacity: 1; }
    #list-table thead th.sorted.desc .sort-icon { transform: rotate(180deg); }
    #list-table thead th:last-child { cursor: default; } /* actions col */
    #list-table thead th:last-child:hover { color: var(--text-muted); }

    #list-table tbody tr {
      border-bottom: 1px solid #f3edf1; transition: background .1s;
    }
    #list-table tbody tr:last-child { border-bottom: none; }
    #list-table tbody tr:hover { background: #fdf7fb; }
    #list-table tbody td {
      padding: 12px 16px; color: var(--text); vertical-align: middle; line-height: 1.4;
    }
    .td-commune { font-weight: 600; font-size: 13px; }
    .td-muted { color: var(--text-muted); font-size: 12px; }
    .td-badge-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
    .td-badge {
      display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px;
      font-weight: 500; background: var(--pink-soft); color: var(--pink-accent);
      white-space: nowrap;
    }
    .td-badge.grey { background: #f0ecf4; color: #7c6b80; }
    /* td-badge.clickable supprimé — filtres via dropdowns uniquement */

    /* Action buttons */
    .td-actions { display: flex; gap: 6px; align-items: center; }
    .btn-action {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 5px 13px; border-radius: 20px; font-size: 11.5px; font-weight: 500;
      font-family: var(--font); cursor: pointer; white-space: nowrap; transition: all .15s;
      border: 1px solid var(--border);
    }
    .btn-action-infos {
      background: #fff; color: var(--text);
    }
    .btn-action-infos:hover { border-color: var(--text-muted); }
    .btn-action-elus {
      background: var(--pink-soft); color: var(--pink-accent);
      border-color: #f9c8e5;
    }
    .btn-action-elus:hover { background: #fad5ec; border-color: var(--pink-accent); }

    /* Pagination */
    #list-pagination {
      flex-shrink: 0; padding: 14px 36px 18px;
      display: flex; align-items: center; justify-content: center; gap: 12px;
      position: relative;
    }
    .pg-pages { display: flex; align-items: center; gap: 4px; }
    .pg-btn {
      min-width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
      background: #fff; font-size: 12.5px; font-family: var(--font); font-weight: 500;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      color: var(--text); transition: all .12s; padding: 0 8px;
    }
    .pg-btn:hover { border-color: var(--pink-accent); color: var(--pink-accent); }
    .pg-btn.active { background: var(--pink-accent); color: #fff; border-color: var(--pink-accent); font-weight: 600; }
    .pg-btn:disabled { opacity: .35; cursor: not-allowed; }
    .pg-btn:disabled:hover { border-color: var(--border); color: var(--text); }
    .pg-dots { color: var(--text-muted); font-size: 13px; padding: 0 4px; display: flex; align-items: center; }
    .pg-ellipsis { display: flex; align-items: center; gap: 4px; }

    /* Per-page dropdown */
    #perpage-wrapper { position: absolute; right: 36px; }
    #perpage-btn {
      display: flex; align-items: center; gap: 7px; background: #fff;
      border: 1px solid var(--border); border-radius: 20px; padding: 7px 14px;
      font-size: 12px; font-weight: 500; font-family: var(--font); cursor: pointer;
      color: var(--text); box-shadow: 0 1px 6px rgba(0,0,0,.06); white-space: nowrap;
      transition: all .15s;
    }
    #perpage-btn:hover { border-color: var(--pink-accent); color: var(--pink-accent); }
    #perpage-menu {
      position: absolute; bottom: calc(100% + 8px); right: 0;
      background: #fff; border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,.12); padding: 6px 0; min-width: 120px;
      display: none; z-index: 1000; animation: dropIn .15s ease;
    }
    #perpage-menu.open { display: block; }
    .perpage-item {
      padding: 9px 16px; font-size: 12.5px; cursor: pointer; color: var(--text);
      transition: background .1s; display: flex; align-items: center; justify-content: space-between;
    }
    .perpage-item:hover { background: var(--pink-soft); }
    .perpage-item.active { color: var(--pink-accent); font-weight: 600; }
    #search-wrapper {
      position: relative;
    }
    #search-icon {
      position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
      color: var(--text-muted); pointer-events: none; display: flex; align-items: center;
    }
    #search-input {
      display: flex; align-items: center; background: #fff; border: 1px solid var(--border);
      border-radius: 20px; padding: 7px 14px 7px 32px; font-size: 12px; font-weight: 400; font-family: var(--font);
      color: var(--text); width: 200px; outline: none; transition: all .15s;
      box-shadow: 0 1px 6px rgba(0,0,0,.07);
    }
    #search-input::placeholder { color: var(--text-muted); }
    #search-input:focus { border-color: var(--pink-accent); width: 240px; box-shadow: 0 1px 10px rgba(233,30,140,.15); }
    #search-input:focus + #search-icon,
    #search-wrapper:focus-within #search-icon { color: var(--pink-accent); }
    #search-results {
      position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px;
      background: #fff; border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,.12); padding: 6px 0; max-height: 280px; overflow-y: auto;
      display: none; z-index: 1000; animation: dropIn .15s ease;
    }
    #search-results.open { display: block; }
    #search-results::-webkit-scrollbar { width: 4px; }
    #search-results::-webkit-scrollbar-thumb { background: #e5d5e0; border-radius: 2px; }
    .search-result-item {
      padding: 9px 16px; font-size: 12.5px; cursor: pointer; color: var(--text);
      transition: background .1s; display: flex; align-items: center; gap: 8px;
    }
    .search-result-item:hover { background: var(--pink-soft); color: var(--pink-accent); }
    .search-result-item .res-icon { color: var(--pink-accent); opacity: .6; flex-shrink: 0; }
    .search-result-item mark { background: none; color: var(--pink-accent); font-weight: 600; }
    .search-no-result { padding: 10px 16px; font-size: 12px; color: var(--text-muted); font-style: italic; }

    /* ── MOBILE TOP BAR — carte controls (floating glass card) ── */
    #mob-topbar {
      display: none; /* shown via media query */
      position: fixed; top: 50px; left: 12px; right: 12px;
      z-index: 940;
      background: rgba(255,255,255,.45);
      backdrop-filter: blur(28px) saturate(180%);
      -webkit-backdrop-filter: blur(28px) saturate(180%);
      border: 1px solid rgba(255,255,255,.55);
      border-radius: 22px;
      padding: 12px 14px;
      box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
      flex-direction: column; gap: 8px;
    }
    .mob-topbar-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
    .mob-btn {
      display: flex; align-items: center; gap: 5px; padding: 8px 14px;
      background: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.8);
      border-radius: 16px; font-size: 11.5px; font-weight: 500; font-family: var(--font);
      cursor: pointer; color: var(--text); white-space: nowrap;
      transition: all .15s; backdrop-filter: blur(8px);
      box-shadow: 0 1px 4px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.9);
    }
    .mob-btn:active { transform: scale(.96); background: rgba(233,30,140,.1); }
    .mob-btn.active { background: rgba(233,30,140,.12); color: var(--pink-accent); border-color: rgba(233,30,140,.25); }
    .mob-btn svg { flex-shrink: 0; }
    #mob-search-wrapper { position: relative; flex: 1; }
    #mob-search-input {
      width: 100%; padding: 8px 14px; font-size: 12px; font-family: var(--font);
      background: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.9);
      border-radius: 14px; outline: none; color: var(--text);
      box-shadow: inset 0 1px 3px rgba(0,0,0,.06);
    }
    #mob-search-input::placeholder { color: var(--text-muted); }
    #mob-search-results {
      position: absolute; top: calc(100% + 8px); left: 0; right: 0;
      background: rgba(255,255,255,.92); backdrop-filter: blur(20px);
      border: 1px solid rgba(255,255,255,.8); border-radius: 16px;
      box-shadow: 0 8px 32px rgba(0,0,0,.14); padding: 6px 0;
      max-height: 240px; overflow-y: auto; display: none; z-index: 1000;
      animation: dropIn .15s ease;
    }
    #mob-search-results.open { display: block; }

    /* ── MOBILE BOTTOM TAB BAR — floating glass card ── */
    #mobile-nav {
      display: none; /* shown via media query */
      position: fixed; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: 12px; right: 12px;
      z-index: 950;
      background: rgba(255,255,255,.45);
      backdrop-filter: blur(28px) saturate(180%);
      -webkit-backdrop-filter: blur(28px) saturate(180%);
      border: 1px solid rgba(255,255,255,.55);
      border-radius: 22px;
      padding: 6px;
      gap: 6px; justify-content: center;
      box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
    }
    .mob-tab {
      flex: 1; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px;
      padding: 10px 0; border: none; background: transparent; border-radius: 16px;
      font-size: 13px; font-weight: 600; font-family: var(--font);
      color: var(--text-muted); cursor: pointer; transition: all .2s;
    }
    .mob-tab.active {
      color: var(--pink-accent);
      background: rgba(255,255,255,.7);
      box-shadow: 0 1px 4px rgba(0,0,0,.06), inset 0 1px 0 rgba(255,255,255,.9);
    }
    .mob-tab svg { flex-shrink: 0; }

    /* ── Mobile sheets (mode picker, election picker) ── */
    .mob-sheet {
      display: none; position: fixed; top: 160px; left: 50%; transform: translateX(-50%);
      z-index: 960; background: rgba(255,255,255,.88); backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border: 1px solid rgba(255,255,255,.8); border-radius: 20px; padding: 8px 0;
      box-shadow: 0 8px 32px rgba(0,0,0,.15); min-width: 220px; animation: dropIn .15s ease;
    }
    .mob-sheet.open { display: block; }

    /* Mobile panel handle */
    #panel-mobile-handle { display: none; }

    @media (max-width: 640px) {
      /* Voir Plus modal — full screen on mobile */
      .modal-card-large {
        width: 100vw !important; max-width: 100vw !important;
        height: 100vh !important; max-height: 100vh !important;
        border-radius: 0 !important;
      }
      /* Prevent horizontal overflow from hidden panels */
      body { overflow-x: hidden; }
      /* Hide desktop nav */
      #sidebar, #toggle-btn { display: none; }
      #controls-bar { display: none; }
      #breadcrumb-bar { display: none; }
      /* Show mobile elements */
      #mobile-nav { display: flex; }
      #mob-topbar { display: flex; }
      /* Panel on mobile: full-width bottom sheet */
      #panel-content { width: 100% !important; }
      #commune-panel {
        position: fixed !important;
        left: 0; right: 0; top: auto; bottom: 0;
        height: 50vh; height: 50dvh;
        flex-direction: column; border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 32px rgba(0,0,0,.12);
        z-index: 960;
      }
      #commune-panel.state-partial,
      #commune-panel.state-full { display: flex; }
      /* Pleine page quand full (page carte) */
      #commune-panel.state-full:not(.list-context) {
        top: 0 !important; bottom: 0; left: 0; right: 0;
        height: 100vh !important; height: 100dvh !important;
        border-radius: 0;
        z-index: 970;
      }
      #commune-panel.state-full:not(.list-context) #panel-content {
        flex: 1; min-height: 0;
      }
      #commune-panel.state-full:not(.list-context) #panel-body {
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
      }
      /* Force single column on mobile — no independent scroll */
      #commune-panel.state-full #panel-body {
        overflow-y: auto !important; display: block !important;
      }
      #commune-panel.state-full #panel-columns {
        display: block !important;
      }
      #commune-panel.state-full #panel-col-left,
      #commune-panel.state-full #panel-col-right {
        overflow-y: visible !important; padding-right: 0 !important;
      }
      /* Panneau pleine page depuis la page liste */
      #commune-panel.list-context {
        top: 0 !important; bottom: 0; left: 0; right: 0; height: auto;
        border-radius: 0;
        z-index: 970;
      }
      #commune-panel.list-context #panel-content {
        flex: 1; min-height: 0;
      }
      #commune-panel.list-context #panel-body {
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
      }
      #commune-panel.list-context #panel-size-btn { display: none; }
      #commune-panel.state-retracted #panel-handle-btn { display: none; }
      #panel-handle { display: none; }
      /* Mobile panel handle bar */
      #panel-mobile-handle {
        display: flex; justify-content: center; padding: 10px 0 4px; cursor: grab; flex-shrink: 0;
      }
      #panel-mobile-handle .handle-pill {
        width: 36px; height: 5px; border-radius: 3px;
        background: #d4c8d2;
      }
      /* Panel header adjust for mobile */
      #panel-header { padding: 10px 20px 0 !important; }
      #panel-body { padding: 0 20px 80px !important; }
      /* Zoom controls above bottom tab bar */
      .leaflet-bottom.leaflet-left { bottom: 80px !important; }

      /* ── LIST PAGE RESPONSIVE ── */
      #list-page { padding-left: 0 !important; }
      #list-page.sidebar-collapsed { padding-left: 0 !important; }
      #list-title { padding: 14px 16px 0; font-size: 17px; }
      #list-topbar {
        padding: 10px 16px 0; flex-direction: column; align-items: stretch; gap: 8px;
      }
      #list-topbar-left { width: 100%; }
      #list-search-wrapper { flex: 1; }
      #list-search-input { width: 100% !important; font-size: 12px; }
      #list-search-input:focus { width: 100% !important; }
      #list-topbar-right {
        margin-left: 0; width: 100%;
        display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
      }
      .list-filter-select { font-size: 11px; padding: 7px 10px; width: 100%; }
      #list-reset-btn { grid-column: span 2; justify-content: center; }
      #list-count { font-size: 11px; }
      /* Table — masquer colonnes Maire, EPCI, Canton et Circo sur mobile */
      #list-table colgroup col:nth-child(2),
      #list-table colgroup col:nth-child(3),
      #list-table colgroup col:nth-child(4),
      #list-table colgroup col:nth-child(5),
      #list-table thead th:nth-child(2),
      #list-table thead th:nth-child(3),
      #list-table thead th:nth-child(4),
      #list-table thead th:nth-child(5),
      #list-table tbody td:nth-child(2),
      #list-table tbody td:nth-child(3),
      #list-table tbody td:nth-child(4),
      #list-table tbody td:nth-child(5) { display: none; }
      #list-table-wrap { margin: 10px 10px 0; border-radius: 12px; overflow-x: hidden; }
      #list-table { min-width: unset; width: 100%; font-size: 11.5px; table-layout: fixed; }
      /* Colonnes visibles : Commune (60%) | Actions (40%) */
      #list-table colgroup col:nth-child(1) { width: 60%; }
      #list-table colgroup col:nth-child(6) { width: 40%; }
      #list-table thead th { padding: 10px 6px; font-size: 10px; }
      #list-table thead th:first-child { padding-left: 14px; }
      #list-table tbody td { padding: 10px 6px; font-size: 11.5px; }
      #list-table tbody td:first-child { padding-left: 14px; }
      .td-commune { font-size: 12px; }
      /* Actions compactes sur mobile */
      .td-actions { gap: 4px; }
      .btn-action { padding: 4px 8px; font-size: 10px; }
      .btn-action svg { width: 9px; height: 9px; }
      /* Pagination responsive */
      #list-pagination { padding: 10px 16px 80px; gap: 8px; }
      #perpage-wrapper { position: static; margin-top: 8px; }
      .pg-btn { min-width: 30px; height: 30px; font-size: 11px; }

      /* Legend above bottom bar */
      #tendance-legend { bottom: 90px !important; right: 8px; max-width: 160px; font-size: 10.5px; }

      /* Hide topbar on liste page */
      #mob-topbar.hidden { display: none !important; }

      /* Elus page mobile */
      #elus-page { padding-left: 0 !important; padding-bottom: 80px !important; }
      #elus-page.sidebar-collapsed { padding-left: 0 !important; }
      #elus-title { padding: 14px 16px 0 !important; font-size: 17px !important; }
      #elus-topbar { padding: 10px 16px 0 !important; }
      #elus-search-input { width: 180px !important; }
      #elus-search-input:focus { width: 220px !important; }
      #elus-topbar-right { margin-top: 8px; }
      #elus-table-wrap { margin: 12px 10px 0 !important; overflow-x: hidden; }
      #elus-table { min-width: unset !important; width: 100% !important; table-layout: fixed !important; }
      #elus-table colgroup col:nth-child(4),
      #elus-table colgroup col:nth-child(5) { width: 0 !important; display: none; }
      #elus-table thead th:nth-child(4),
      #elus-table thead th:nth-child(5),
      #elus-table tbody td:nth-child(4),
      #elus-table tbody td:nth-child(5) { display: none; }
      /* Colonnes visibles : Commune (28%) | Nom (28%) | Prénom (24%) | Actions (20%) */
      #elus-table colgroup col:nth-child(1) { width: 28% !important; }
      #elus-table colgroup col:nth-child(2) { width: 28% !important; }
      #elus-table colgroup col:nth-child(3) { width: 24% !important; }
      #elus-table colgroup col:nth-child(6) { width: 20% !important; }
      #elus-table thead th { padding: 10px 6px !important; font-size: 10px !important; }
      #elus-table thead th:first-child { padding-left: 14px !important; }
      #elus-table tbody td { padding: 10px 6px !important; font-size: 11.5px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      #elus-table tbody td:first-child { padding-left: 14px !important; }
      #elus-pagination { padding: 10px 16px 20px; }
      #elus-perpage-wrapper { position: static; margin-top: 8px; }

      /* Visites page mobile */
      #visites-page { padding-left: 0 !important; padding-bottom: 80px !important; }
      #visites-page.sidebar-collapsed { padding-left: 0 !important; }
      #visites-page > h1 { padding: 14px 16px 0 !important; font-size: 17px !important; }
      #visites-topbar { padding: 10px 16px 0 !important; flex-direction: column; align-items: stretch !important; }
      #visites-topbar-left { flex-wrap: wrap; }
      #visites-search-input { width: 100% !important; }
      #visites-topbar-right { margin-top: 8px; }
      #visites-table-wrap { margin: 12px 10px 0 !important; }
      #visites-table thead th { padding: 10px 6px !important; font-size: 10px !important; }
      #visites-table thead th:first-child { padding-left: 14px !important; }
      #visites-table tbody td { padding: 10px 6px !important; font-size: 11.5px !important; }
      #visites-table tbody td:first-child { padding-left: 14px !important; }
      #visites-pagination { padding: 10px 16px 20px; }
      #visites-perpage-wrapper { position: static; margin-top: 8px; }

      /* Elu panel on mobile: full screen */
      #elu-panel {
        width: 100% !important; top: 0 !important; bottom: 0 !important;
        right: 0 !important; left: 0 !important;
        max-height: 0; overflow: hidden;
        border-left: none; border-radius: 0;
        box-shadow: none;
        z-index: 1100;
        transition: max-height .3s cubic-bezier(.4,0,.2,1);
        pointer-events: none;
      }
      #elu-panel.open {
        max-height: 100vh; max-height: 100dvh;
        overflow: visible;
        pointer-events: all;
      }
      #elu-panel-content { flex: 1; overflow-y: auto !important; display: flex; flex-direction: column; }
      #elu-panel-body { flex: 0 0 auto !important; }
      #elu-panel-footer {
        flex-shrink: 0 !important;
        position: sticky !important;
        bottom: 0 !important;
        background: #fff !important;
        padding: 12px 20px 24px !important;
        border-top: 1px solid var(--border) !important;
        margin-top: auto !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 70px) !important;
      }

      /* Visite detail panel on mobile: full screen */
      #visite-detail-panel {
        width: 100% !important; top: 0 !important; bottom: 0 !important;
        right: 0 !important; left: 0 !important;
        max-height: 0; overflow: hidden;
        border-left: none; border-radius: 0;
        box-shadow: none;
        z-index: 1100;
        transition: max-height .3s cubic-bezier(.4,0,.2,1);
        pointer-events: none;
        display: flex; flex-direction: column;
      }
      #visite-detail-panel.open {
        max-height: 100vh; max-height: 100dvh;
        overflow: hidden;
        pointer-events: all;
      }
      #visite-detail-content {
        flex: 1; overflow: hidden !important;
        display: flex; flex-direction: column;
        height: 100vh; height: 100dvh;
      }
      #visite-detail-body {
        flex: 1 1 0 !important;
        overflow-y: auto !important;
        min-height: 0 !important;
      }
      #visite-detail-footer {
        flex-shrink: 0 !important;
        background: #fff !important;
        padding: 12px 20px !important;
        border-top: 1px solid var(--border) !important;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px) !important;
      }
    }

    /* ══════════════════════════════════════════════════════════
       ELUS PAGE
    ══════════════════════════════════════════════════════════ */
    #elus-page {
      display: none; flex: 1; flex-direction: column; overflow: hidden;
      background: #f7f2f6; min-width: 0;
      transition: padding-left .28s cubic-bezier(.4,0,.2,1);
    }
    #elus-page.active { display: flex; }
    #elus-page.sidebar-collapsed { padding-left: 28px; }

    #elus-title {
      flex-shrink: 0; padding: 22px 36px 0;
      font-size: 20px; font-weight: 700; color: var(--text);
      letter-spacing: -.01em;
    }

    #elus-topbar {
      flex-shrink: 0; padding: 12px 36px 0 36px;
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    }
    #elus-topbar-left  { display: flex; align-items: center; gap: 10px; }
    #elus-topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
    #elus-search-wrapper { position: relative; flex: 0 0 auto; }
    .elus-search-icon {
      position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
      color: var(--text-muted); pointer-events: none; display: flex; align-items: center;
      transition: color .15s;
    }
    #elus-search-input {
      background: #fff; border: 1px solid var(--border); border-radius: 24px;
      padding: 9px 18px 9px 38px; font-size: 13px; font-family: var(--font);
      color: var(--text); width: 260px; outline: none; transition: all .2s;
      box-shadow: 0 1px 6px rgba(0,0,0,.06);
    }
    #elus-search-input::placeholder { color: var(--text-muted); }
    #elus-search-input:focus { border-color: var(--pink-accent); width: 320px; box-shadow: 0 1px 12px rgba(233,30,140,.14); }
    #elus-search-wrapper:focus-within .elus-search-icon { color: var(--pink-accent); }
    #elus-reset-btn {
      display: flex; align-items: center; gap: 5px;
      height: 34px; padding: 0 13px; border: 1.5px solid #d0c8d8; border-radius: 17px;
      background: #fff; font-size: 12px; font-weight: 600; font-family: var(--font);
      color: #b0a8bc; cursor: default; transition: all .2s; white-space: nowrap;
      box-shadow: 0 1px 4px rgba(0,0,0,.05); opacity: 0.65;
    }
    #elus-reset-btn.active {
      border-color: var(--pink-accent); color: var(--pink-accent);
      cursor: pointer; opacity: 1; box-shadow: 0 1px 4px rgba(233,30,140,.1);
    }
    #elus-reset-btn.active:hover { background: var(--pink-accent); color: #fff; }

    #elus-count {
      font-size: 12px; color: var(--text-muted); font-weight: 500; white-space: nowrap;
    }

    /* ── Add élu button ─────────── */
    .btn-add-elu {
      display: flex; align-items: center; gap: 5px;
      padding: 7px 14px; border: 1.5px solid var(--pink-accent); border-radius: 20px;
      background: var(--pink-accent); color: #fff; font-size: 12px; font-weight: 600;
      font-family: var(--font); cursor: pointer; white-space: nowrap;
      transition: all .15s; box-shadow: 0 2px 8px rgba(233,30,99,.2);
    }
    .btn-add-elu:hover { background: #c2185b; border-color: #c2185b; box-shadow: 0 4px 14px rgba(233,30,99,.3); }
    .btn-add-elu svg { stroke: #fff; }

    /* ── Add élu modal ─────────── */
    .add-elu-card {
      max-width: 520px; width: 95%; max-height: 90vh; display: flex; flex-direction: column;
    }
    .add-elu-card .modal-header {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 16px;
    }
    .add-elu-card .modal-header h3 { margin: 0; font-size: 18px; font-weight: 700; }
    .add-elu-form {
      flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px;
      padding-right: 4px;
    }
    .add-elu-section {
      display: flex; flex-direction: column; gap: 10px;
    }
    .add-elu-section-title {
      font-size: 10px; font-weight: 700; text-transform: uppercase;
      letter-spacing: .5px; color: var(--text-muted); margin-bottom: 2px;
    }
    .add-elu-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .add-elu-field { display: flex; flex-direction: column; gap: 4px; }
    .add-elu-field label {
      font-size: 12px; font-weight: 600; color: var(--text);
    }
    .add-elu-field label .required { color: var(--pink-accent); }
    .add-elu-field input,
    .add-elu-field select,
    .add-elu-field textarea {
      padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 10px;
      font-size: 13px; font-family: var(--font); outline: none; color: var(--text);
      background: #fff; transition: border-color .2s; width: 100%; box-sizing: border-box;
    }
    .add-elu-field input:focus,
    .add-elu-field select:focus,
    .add-elu-field textarea:focus {
      border-color: var(--pink-accent); box-shadow: 0 0 0 3px rgba(233,30,99,.08);
    }
    .add-elu-field textarea { resize: vertical; min-height: 70px; }
    .add-elu-commune-search { position: relative; }
    .add-elu-commune-dropdown {
      position: absolute; top: 100%; left: 0; right: 0;
      background: #fff; border: 1px solid var(--border); border-radius: 10px;
      box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 180px; overflow-y: auto;
      z-index: 1010; display: none;
    }
    .add-elu-commune-dropdown.open { display: block; }
    .add-elu-commune-option {
      padding: 9px 14px; font-size: 13px; cursor: pointer; transition: background .1s;
    }
    .add-elu-commune-option:hover { background: var(--pink-soft); }
    .add-elu-commune-option:first-child { border-radius: 10px 10px 0 0; }
    .add-elu-commune-option:last-child { border-radius: 0 0 10px 10px; }
    .mandats-chips {
      display: flex; flex-wrap: wrap; gap: 6px;
    }
    .mandat-chip {
      padding: 5px 12px; border: 1.5px solid var(--border); border-radius: 16px;
      background: #fff; font-size: 12px; font-weight: 500; font-family: var(--font);
      color: var(--text-muted); cursor: pointer; transition: all .15s;
      white-space: nowrap;
    }
    .mandat-chip:hover { border-color: #9ca3af; color: #374151; background: #f3f4f6; }
    .mandat-chip.active {
      background: #4b5563; border-color: #4b5563; color: #fff;
      box-shadow: 0 2px 6px rgba(75,85,99,.25);
    }
    .mandat-chip.active:hover { background: #374151; border-color: #374151; }
    .mandat-badge {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600;
      background: #f3f4f6; color: #4b5563; border: 1px solid #d1d5db;
      white-space: nowrap;
    }
    .mandats-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

    .add-elu-genre-row {
      display: flex; gap: 16px; align-items: center;
    }
    .add-elu-radio {
      display: flex; align-items: center; gap: 6px;
      font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer;
    }
    .add-elu-radio input[type="radio"] {
      width: 16px; height: 16px; accent-color: var(--pink-accent); cursor: pointer;
    }
    .add-elu-photo-upload {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 8px 14px; border: 1.5px dashed var(--border); border-radius: 10px;
      font-size: 12.5px; font-weight: 500; color: var(--text-muted);
      cursor: pointer; transition: all .2s; font-family: var(--font);
    }
    .add-elu-photo-upload:hover { border-color: var(--pink-accent); color: var(--pink-accent); }

    @media (max-width: 600px) {
      .add-elu-row-2 { grid-template-columns: 1fr; }
      .add-elu-card { width: 100%; max-width: none; border-radius: 18px 18px 0 0; margin-top: auto; }
    }

    /* ── Export split button (same pattern as Election) ─────────── */
    #export-dropdown { position: relative; }
    #export-split {
      display: flex; align-items: stretch;
      border-radius: 20px; overflow: hidden;
      border: 1px solid var(--border); background: #fff;
      box-shadow: 0 1px 6px rgba(0,0,0,.07); transition: all .15s;
    }
    #export-split:hover { border-color: var(--pink-accent); }
    #export-split #export-btn {
      display: flex; align-items: center; gap: 6px;
      padding: 7px 12px; font-size: 12px; font-weight: 500; font-family: var(--font);
      border: none; background: transparent; cursor: pointer;
      color: var(--text); white-space: nowrap; border-radius: 0; box-shadow: none;
    }
    #export-split #export-btn:hover { color: var(--pink-accent); }
    #export-chevron-btn {
      display: flex; align-items: center; justify-content: center;
      padding: 7px 10px; border: none; border-left: 1px solid var(--border);
      background: transparent; cursor: pointer; color: #888; transition: background .15s;
    }
    #export-chevron-btn:hover { background: rgba(0,0,0,.04); }
    #export-menu {
      display: none; position: absolute; top: calc(100% + 8px); right: 0;
      background: #fff; border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,.12); padding: 8px 0; min-width: 170px;
      z-index: 200;
    }
    #export-menu.open { display: block; }
    #export-menu .menu-item {
      padding: 9px 16px; font-size: 12.5px; font-weight: 500;
      color: #444; cursor: pointer; transition: background .15s;
    }
    #export-menu .menu-item:hover {
      background: var(--pink-soft); color: var(--pink-accent);
    }

    #elus-table-wrap {
      flex: 1; overflow-y: auto; margin: 18px 36px 0 36px;
      background: #fff; border: 1px solid var(--border); border-radius: 16px;
      box-shadow: 0 2px 16px rgba(0,0,0,.05); overflow-x: auto;
    }
    #elus-table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
    #elus-table-wrap::-webkit-scrollbar-thumb { background: #e5d5e0; border-radius: 3px; }

    #elus-table { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
    #elus-table colgroup col:nth-child(1) { width: 15%; }
    #elus-table colgroup col:nth-child(2) { width: 14%; }
    #elus-table colgroup col:nth-child(3) { width: 13%; }
    #elus-table colgroup col:nth-child(4) { width: 24%; }
    #elus-table colgroup col:nth-child(5) { width: 15%; }
    #elus-table colgroup col:nth-child(6) { width: 19%; }
    #elus-table thead { position: sticky; top: 0; z-index: 10; }
    #elus-table thead th {
      background: #fff; border-bottom: 1.5px solid var(--border);
      padding: 13px 16px; text-align: left; font-size: 11px; font-weight: 600;
      color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em;
      cursor: pointer; user-select: none; white-space: nowrap;
      transition: color .15s; position: relative; overflow: hidden;
    }
    #elus-table tbody td { overflow: hidden; text-overflow: ellipsis; }
    #elus-table thead th:hover { color: var(--pink-accent); }
    #elus-table thead th.sorted { color: var(--pink-accent); }
    #elus-table thead th .sort-icon {
      display: inline-flex; align-items: center; margin-left: 5px; opacity: .35;
      transition: opacity .15s, transform .15s; vertical-align: middle;
    }
    #elus-table thead th.sorted .sort-icon { opacity: 1; }
    #elus-table thead th.sorted.desc .sort-icon { transform: rotate(180deg); }
    #elus-table thead th:last-child { cursor: default; }
    #elus-table thead th:last-child:hover { color: var(--text-muted); }
    #elus-table tbody tr {
      border-bottom: 1px solid #f3edf1; transition: background .1s;
    }
    #elus-table tbody tr:last-child { border-bottom: none; }
    #elus-table tbody tr:hover { background: #fdf7fb; }
    #elus-table tbody td {
      padding: 12px 16px; color: var(--text); vertical-align: middle; line-height: 1.4;
    }
    .td-elu-nom { font-weight: 600; font-size: 13px; }
    .td-elu-commune { font-weight: 500; color: var(--text); }
    #elus-table tbody td { white-space: nowrap; }

    #elus-pagination {
      flex-shrink: 0; padding: 14px 36px 18px;
      display: flex; align-items: center; justify-content: center; gap: 12px;
      position: relative;
    }
    #elus-perpage-wrapper { position: absolute; right: 36px; }
    #elus-perpage-btn {
      display: flex; align-items: center; gap: 7px; background: #fff;
      border: 1px solid var(--border); border-radius: 20px; padding: 7px 14px;
      font-size: 12px; font-weight: 500; font-family: var(--font); cursor: pointer;
      color: var(--text); transition: all .15s;
    }
    #elus-perpage-btn:hover { border-color: var(--pink-accent); color: var(--pink-accent); }
    #elus-perpage-menu {
      position: absolute; bottom: calc(100% + 6px); right: 0;
      background: #fff; border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 8px 28px rgba(0,0,0,.12); padding: 6px 0;
      display: none; min-width: 130px; z-index: 100;
    }
    #elus-perpage-menu.open { display: block; }

    /* ══════════════════════════════════════════════════════════
       VISITES PAGE
    ══════════════════════════════════════════════════════════ */
    #visites-page {
      display: none; flex: 1; flex-direction: column; overflow: hidden;
      background: #f7f2f6; min-width: 0;
      transition: padding-left .28s cubic-bezier(.4,0,.2,1);
    }
    #visites-page.active { display: flex; }
    #visites-page.sidebar-collapsed { padding-left: 28px; }
    #visites-page > h1 {
      flex-shrink: 0; padding: 22px 36px 0;
      font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -.01em;
    }
    #visites-topbar {
      flex-shrink: 0; padding: 12px 36px 0 36px;
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    }
    #visites-topbar-left { display: flex; align-items: center; gap: 10px; }
    #visites-topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
    #visites-count { font-size: 12px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

    /* Search bar */
    #visites-search-wrapper {
      position: relative; display: flex; align-items: center;
    }
    .visites-search-icon {
      position: absolute; left: 12px; color: var(--text-muted); pointer-events: none;
    }
    #visites-search-input {
      width: 220px; height: 34px; padding: 0 12px 0 34px;
      border: 1.5px solid var(--border); border-radius: 17px;
      font-size: 12.5px; font-family: var(--font); outline: none;
      background: #fff; color: var(--text); transition: all .2s;
    }
    #visites-search-input::placeholder { color: var(--text-muted); }
    #visites-search-input:focus {
      border-color: var(--pink-accent);
      box-shadow: 0 0 0 3px rgba(233,30,140,.08);
    }

    /* Period split button (carte-style, pink) */
    #visites-period-dropdown, #voir-plus-period-dropdown { position: relative; }
    .vp-split-btn, #vp-split {
      display: flex; align-items: stretch;
      border-radius: 20px; overflow: hidden;
      border: 1px solid var(--border); background: #fff;
      box-shadow: 0 1px 6px rgba(0,0,0,.07); transition: all .15s;
    }
    .vp-split-btn:hover, #vp-split:hover { border-color: var(--pink-accent); }
    .vp-split-main, #vp-split #vp-btn {
      display: flex; align-items: center; gap: 6px;
      padding: 7px 12px; font-size: 12px; font-weight: 500; font-family: var(--font);
      border: none; background: transparent; cursor: pointer;
      color: var(--text); white-space: nowrap; border-radius: 0; box-shadow: none;
    }
    .vp-split-main:hover, #vp-split #vp-btn:hover { color: var(--pink-accent); }
    .vp-split-chevron, #vp-chevron-btn {
      display: flex; align-items: center; justify-content: center;
      padding: 7px 10px; border: none; border-left: 1px solid var(--border);
      background: transparent; cursor: pointer; color: #888; transition: background .15s;
    }
    .vp-split-chevron:hover, #vp-chevron-btn:hover { background: rgba(0,0,0,.04); }
    .vp-split-btn.active, #vp-split.active {
      background: var(--pink-accent); border-color: var(--pink-accent);
      box-shadow: 0 2px 10px rgba(233,30,140,.3);
    }
    .vp-split-btn.active .vp-split-main, #vp-split.active #vp-btn { color: #fff; }
    .vp-split-btn.active .vp-split-main svg, #vp-split.active #vp-btn svg { stroke: #fff; }
    .vp-split-btn.active .vp-split-chevron, #vp-split.active #vp-chevron-btn {
      color: #fff; border-left-color: rgba(255,255,255,.3);
    }
    .vp-split-btn.active .vp-split-chevron:hover, #vp-split.active #vp-chevron-btn:hover { background: rgba(255,255,255,.15); }

    /* Period dropdown panel */
    .vp-period-panel, #visites-period-panel {
      position: absolute; top: calc(100% + 8px); right: 0; background: #fff;
      border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 8px 32px rgba(0,0,0,.12); padding: 10px 0; min-width: 240px;
      display: none; z-index: 1000; animation: dropIn .15s ease;
    }
    .vp-period-panel.open, #visites-period-panel.open { display: block; }
    .vp-period-panel .menu-item, #visites-period-panel .menu-item { position: relative; padding-right: 32px; }
    .vp-period-panel .menu-item.active, #visites-period-panel .menu-item.active { color: var(--pink-accent); font-weight: 600; }
    .vp-period-panel .menu-item.active::after, #visites-period-panel .menu-item.active::after {
      content: '✓'; position: absolute; right: 14px; color: var(--pink-accent);
    }
    .vp-separator {
      height: 1px; background: var(--border); margin: 8px 14px;
    }
    .vp-custom {
      padding: 8px 14px 12px; display: flex; flex-direction: column; gap: 6px;
      background: #fdf2f8; margin: 0 8px; border-radius: 8px;
    }
    .vp-custom-title {
      font-size: 10px; font-weight: 600; text-transform: uppercase;
      letter-spacing: .5px; color: var(--text-muted); margin-bottom: 2px;
    }
    .vp-date-row {
      display: flex; align-items: center; gap: 8px;
    }
    .vp-date-row label {
      font-size: 11px; font-weight: 600; color: #6b7280;
      min-width: 22px; text-align: right; text-transform: uppercase;
      letter-spacing: .3px;
    }
    .vp-date-row input[type="date"] {
      flex: 1; padding: 6px 10px; border: 1.5px solid #e5e7eb;
      border-radius: 8px; font-size: 12.5px; font-family: var(--font);
      outline: none; transition: all .2s; color: var(--text);
      background: #fff; -webkit-appearance: none; appearance: none;
    }
    .vp-date-row input[type="date"]:hover { border-color: #f9a8d4; background: #fdf2f8; }
    .vp-date-row input[type="date"]:focus {
      border-color: var(--pink-accent); background: #fff;
      box-shadow: 0 0 0 3px rgba(233,30,140,.10);
    }
    #visites-reset-btn {
      display: flex; align-items: center; gap: 5px;
      height: 34px; padding: 0 13px; border: 1.5px solid #d0c8d8; border-radius: 17px;
      background: #fff; font-size: 12px; font-weight: 600; font-family: var(--font);
      color: #b0a8bc; cursor: default; transition: all .2s; white-space: nowrap;
      box-shadow: 0 1px 4px rgba(0,0,0,.05); opacity: 0.65;
    }
    #visites-reset-btn.active {
      border-color: var(--pink-accent); color: var(--pink-accent);
      cursor: pointer; opacity: 1; box-shadow: 0 1px 4px rgba(233,30,140,.1);
    }
    #visites-reset-btn.active:hover { background: var(--pink-accent); color: #fff; }
    #visites-table-wrap {
      flex: 1; overflow-y: auto; margin: 18px 36px 0 36px;
      background: #fff; border: 1px solid var(--border); border-radius: 16px;
      box-shadow: 0 2px 16px rgba(0,0,0,.05); overflow-x: auto;
    }
    #visites-table-wrap::-webkit-scrollbar { width: 6px; height: 6px; }
    #visites-table-wrap::-webkit-scrollbar-thumb { background: #e5d5e0; border-radius: 3px; }
    #visites-table { width: 100%; border-collapse: collapse; font-size: 12.5px; table-layout: fixed; }
    #visites-table thead { position: sticky; top: 0; z-index: 10; }
    #visites-table thead th {
      background: #fff; border-bottom: 1.5px solid var(--border);
      padding: 13px 16px; text-align: left; font-size: 11px; font-weight: 600;
      color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em;
      cursor: pointer; user-select: none; white-space: nowrap;
      transition: color .15s; position: relative; overflow: hidden;
    }
    #visites-table thead th:hover { color: var(--pink-accent); }
    #visites-table thead th.sorted { color: var(--pink-accent); }
    #visites-table thead th .sort-icon {
      display: inline-flex; align-items: center; margin-left: 5px; opacity: .35;
      transition: opacity .15s, transform .15s; vertical-align: middle;
    }
    #visites-table thead th.sorted .sort-icon { opacity: 1; }
    #visites-table thead th.sorted.desc .sort-icon { transform: rotate(180deg); }
    #visites-table thead th:last-child { cursor: default; }
    #visites-table thead th:last-child:hover { color: var(--text-muted); }
    #visites-table tbody tr {
      border-bottom: 1px solid #f3edf1; transition: background .1s;
    }
    #visites-table tbody tr:last-child { border-bottom: none; }
    #visites-table tbody tr:hover { background: #fdf7fb; }
    #visites-table tbody td {
      padding: 12px 16px; color: var(--text); vertical-align: middle; line-height: 1.4;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .td-visite-titre { font-weight: 600; font-size: 13px; }
    .td-visite-commune { font-weight: 500; color: var(--pink-accent); }
    #visites-pagination {
      flex-shrink: 0; padding: 14px 36px 18px;
      display: flex; align-items: center; justify-content: center; gap: 12px;
      position: relative;
    }
    #visites-perpage-wrapper { position: absolute; right: 36px; }
    #visites-perpage-btn {
      display: flex; align-items: center; gap: 7px; background: #fff;
      border: 1px solid var(--border); border-radius: 20px; padding: 7px 14px;
      font-size: 12px; font-weight: 500; font-family: var(--font); cursor: pointer;
      color: var(--text); transition: all .15s;
    }
    #visites-perpage-btn:hover { border-color: var(--pink-accent); color: var(--pink-accent); }
    #visites-perpage-menu {
      position: absolute; bottom: calc(100% + 6px); right: 0;
      background: #fff; border: 1px solid var(--border); border-radius: 12px;
      box-shadow: 0 8px 28px rgba(0,0,0,.12); padding: 6px 0;
      display: none; min-width: 130px; z-index: 100;
    }
    #visites-perpage-menu.open { display: block; }

    /* ══════════════════════════════════════════════════════════
       ELU PANEL
    ══════════════════════════════════════════════════════════ */
    #elu-panel {
      position: fixed; top: 0; right: -400px; bottom: 0;
      width: 380px; background: #fff; z-index: 900;
      border-left: 1px solid var(--border);
      box-shadow: -4px 0 24px rgba(0,0,0,.08);
      transition: right .3s cubic-bezier(.4,0,.2,1);
      display: flex; flex-direction: column;
    }
    #elu-panel.open { right: 0; }

    #elu-panel-content {
      flex: 1; display: flex; flex-direction: column; overflow: hidden;
    }
    #elu-panel-header {
      padding: 16px 20px 0; flex-shrink: 0; position: relative;
      display: flex; flex-direction: column; align-items: center; text-align: center;
    }
    #elu-panel-header > .panel-header-actions {
      position: absolute; top: 12px; right: 16px; z-index: 1;
    }
    #elu-photo-circle {
      width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
      background: var(--pink-soft); display: flex; align-items: center; justify-content: center;
      margin-bottom: 12px; border: 2px solid var(--pink-accent);
    }
    #elu-photo-circle img {
      width: 100%; height: 100%; object-fit: cover;
    }
    #elu-initials {
      font-size: 24px; font-weight: 700; color: var(--pink-accent);
    }
    #elu-panel-name {
      font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 4px;
    }
    .elu-panel-fonction-row {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      margin-bottom: 4px; flex-wrap: wrap;
    }
    #elu-panel-fonction {
      display: inline-block; padding: 3px 12px; border-radius: 20px;
      font-size: 11px; font-weight: 500; background: var(--pink-soft);
      color: var(--pink-accent);
    }
    #elu-panel-divider { height: 1px; background: var(--border); margin: 8px 20px; }
    #elu-panel-body {
      flex: 1; overflow-y: auto; padding: 18px 20px 28px 20px;
    }
    #elu-panel-body::-webkit-scrollbar { width: 4px; }
    #elu-panel-body::-webkit-scrollbar-thumb { background: #e5d5e0; border-radius: 2px; }

    #elu-panel-footer {
      flex-shrink: 0; padding: 12px 20px; border-top: 1px solid var(--border);
      display: flex; justify-content: flex-end; gap: 10px;
    }
    .btn-modifier {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 8px 20px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
      font-family: var(--font); cursor: pointer; white-space: nowrap;
      background: var(--pink-accent); color: #fff; border: none;
      transition: all .15s; box-shadow: 0 2px 8px rgba(233,30,140,.25);
    }
    .btn-modifier:hover { background: #c2166e; box-shadow: 0 2px 12px rgba(233,30,140,.4); }
    .btn-modifier.cancel {
      background: #fff; color: var(--text); border: 1px solid var(--border);
      box-shadow: none;
    }
    .btn-modifier.cancel:hover { border-color: var(--text-muted); }
    .btn-supprimer {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 8px 20px; border-radius: 20px; font-size: 12.5px; font-weight: 600;
      font-family: var(--font); cursor: pointer; white-space: nowrap;
      background: #fff; color: #e53e3e; border: 1px solid #e53e3e;
      transition: all .15s; box-shadow: none;
    }
    .btn-supprimer:hover { background: #e53e3e; color: #fff; box-shadow: 0 2px 8px rgba(229,62,62,.3); }

    /* Age badge */
    .elu-age-badge {
      display: inline-block; padding: 2px 8px;
      background: #f0f0f0; color: #666;
      border-radius: 10px; font-size: 11px; font-weight: 600;
      margin-left: 6px; vertical-align: middle;
    }
    /* Agenda button */
    .btn-agenda {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 4px 8px; border: 1px solid var(--border);
      border-radius: 8px; background: #fff; color: var(--pink-accent);
      cursor: pointer; font-size: 11px;
    }
    .btn-agenda:hover { background: var(--pink-soft); }
    /* Export contact button */
    .btn-export-contact {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 8px 14px; border: 1.5px solid var(--border);
      border-radius: 20px; background: #fff; color: var(--text);
      cursor: pointer; font-size: 12px; font-family: var(--font); font-weight: 500;
    }
    .btn-export-contact:hover { border-color: var(--pink-accent); color: var(--pink-accent); }

    /* Edit mode inputs inside panel */
    .elu-edit-input {
      width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
      font-size: 12.5px; font-family: var(--font); color: var(--text); outline: none;
      transition: border-color .15s;
    }
    .elu-edit-input:focus { border-color: var(--pink-accent); }
    .elu-edit-select {
      width: 100%; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px;
      font-size: 12.5px; font-family: var(--font); color: var(--text); outline: none;
      background: #fff; cursor: pointer;
    }
    .elu-edit-select:focus { border-color: var(--pink-accent); }

    #elu-panel-commune {
      display: inline-block; padding: 2px 10px; border-radius: 12px;
      background: #f0f0f0; color: #666;
      font-size: 11px; font-weight: 500;
    }
    #elu-panel-age-row {
      text-align: center; font-size: 11px; color: var(--text-muted);
      margin-top: 2px;
    }

    /* Info row with action buttons */
    .info-row-actions {
      display: flex; gap: 4px; margin-left: auto; flex-shrink: 0;
    }
    .btn-copy, .btn-link {
      width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 6px;
      background: #fff; display: flex; align-items: center; justify-content: center;
      cursor: pointer; color: var(--text-muted); transition: all .15s; flex-shrink: 0;
    }
    .btn-copy:hover, .btn-link:hover {
      border-color: var(--pink-accent); color: var(--pink-accent); background: var(--pink-soft);
    }
    .btn-copy.copied { border-color: #16a34a; color: #16a34a; background: #f0fdf4; }

    /* Notes textarea */
    .elu-notes-display {
      font-size: 12.5px; color: var(--text); line-height: 1.6; white-space: pre-wrap;
      word-break: break-word;
    }
    .elu-notes-textarea {
      width: 100%; min-height: 80px; padding: 8px 10px; border: 1px solid var(--border);
      border-radius: 8px; font-size: 12.5px; font-family: var(--font); color: var(--text);
      outline: none; resize: vertical; transition: border-color .15s;
    }
    .elu-notes-textarea:focus { border-color: var(--pink-accent); }

    /* Toast notification */
    .toast-notification {
      position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
      background: #333; color: #fff; padding: 10px 20px; border-radius: 10px;
      font-size: 13px; font-family: var(--font); z-index: 9999;
      opacity: 0; transition: opacity .3s, transform .3s;
      pointer-events: none; max-width: 90%; text-align: center;
    }
    .toast-notification.show { opacity: 1; transform: translateX(-50%) translateY(0); }

    /* ── Login modal ─────────────────────────────────────────────── */
    #login-modal { z-index: 10000; }
    #login-modal .modal-overlay { background: rgba(0,0,0,.5); }
    .login-modal-card {
      max-width: 360px; width: 90%; padding: 36px 32px 28px;
    }
    .login-header {
      display: flex; align-items: center; gap: 8px;
      justify-content: center; margin-bottom: 6px;
    }
    .login-header .dot {
      width: 8px; height: 8px; background: var(--pink-accent); border-radius: 50%;
    }
    .login-header h2 {
      font-size: 18px; font-weight: 700; color: var(--text);
    }
    .login-subtitle {
      text-align: center; font-size: 12.5px; color: var(--text-muted);
      margin-bottom: 22px;
    }
    #login-modal input {
      width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
      border-radius: 10px; font-size: 13px; font-family: var(--font);
      outline: none; margin-bottom: 10px; transition: border-color .2s;
    }
    #login-modal input:focus { border-color: var(--pink-accent); }
    .login-btn {
      width: 100%; margin-top: 8px; padding: 11px; font-size: 13.5px;
      text-align: center; justify-content: center;
    }
    .login-btn.loading { opacity: .6; pointer-events: none; }

    /* ── Logout button sidebar ───────────────────────────────────── */
    #sidebar > .nav-logout {
      margin-top: auto; color: var(--text-muted); flex-shrink: 0;
    }
    .nav-logout:hover { background: #fde8e8; color: #dc2626; }

    /* ── Mobile logout tab ───────────────────────────────────────── */
    .mob-tab-logout {
      color: var(--text-muted); min-width: 36px; flex: 0;
    }
    .mob-tab-logout:hover, .mob-tab-logout:active { color: #dc2626; }
