        :root { --primary-red: #c8102e; --primary-dark: #8b0a1f; --blue-accent: #0369a1; --green: #16a34a; --orange: #ea580c; --bg-light: #f8fafc; --text-dark: #1e293b; --text-gray: #64748b; --border: #e2e8f0; --shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { font-family: 'Segoe UI', Tahoma, sans-serif; background: var(--bg-light); color: var(--text-dark); line-height: 1.6; }
        .reconnect-banner { display: none; background: linear-gradient(135deg, var(--blue-accent), #0284c7); color: white; padding: 12px 25px; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
        .reconnect-banner.active { display: flex; }
        .reconnect-banner .btn { background: white; color: var(--blue-accent); padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; }
        .connection-banner { background: linear-gradient(135deg, var(--blue-accent), #0284c7); color: white; padding: 6px 15px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
        .connection-banner.connected { background: linear-gradient(135deg, var(--green), #15803d); }
        .connection-banner.error { background: linear-gradient(135deg, var(--orange), #c2410c); }
        .connection-banner.saving { background: linear-gradient(135deg, #6366f1, #4f46e5); }
        .connection-banner .message { display: flex; align-items: center; gap: 6px; font-size: 12px; }
        .connection-banner .actions { display: flex; gap: 6px; flex-wrap: wrap; }
        .connection-banner .btn-connect { background: white; color: var(--blue-accent); padding: 4px 10px; border: none; border-radius: 4px; font-weight: 600; cursor: pointer; font-size: 11px; }
        .connection-banner.connected .btn-connect { color: var(--green); }
        .header { background: linear-gradient(135deg, var(--primary-red), var(--primary-dark)); color: white; padding: 8px 15px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
        .header-title { font-size: 16px; font-weight: 600; }
        .header-actions { display: flex; gap: 8px; align-items: center; }
        .last-update { font-size: 10px; opacity: 0.8; margin-right: 8px; }
        .header h1 { font-size: 18px; font-weight: 600; }
        .header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
        .btn { padding: 5px 10px; border: none; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 500; transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px; }
        .btn-add { padding: 8px 16px; font-size: 13px; font-weight: 700; border-radius: 8px; letter-spacing: 0.3px; min-height: 36px; }
        .btn-primary { background: white; color: var(--primary-red); }
        .central-save-counter { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; padding: 3px 8px; border-radius: 12px; font-weight: 600; margin-left: 4px; }
        .central-save-counter.ok { background: rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); }
        .central-save-counter.warning { background: #fbbf24; color: #78350f; animation: pulse-warn 2s infinite; }
        @keyframes pulse-warn { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
        .btn-secondary { background: #f1f5f9; color: var(--text-dark); border: 1px solid #e2e8f0; }
        .btn-success { background: var(--green); color: white; }
        .btn-danger { background: #dc2626; color: white; }
        .btn-outline { background: transparent; border: 2px solid var(--primary-red); color: var(--primary-red); }
        .btn-transform { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; padding: 4px 10px; font-size: 10px; border-radius: 6px; }
        .btn-transform:hover { background: linear-gradient(135deg, #d97706, #b45309); transform: scale(1.05); }
        .nav-container { background: white; border-bottom: 1px solid var(--border); padding: 0 16px; display: flex; align-items: center; position: sticky; top: 0; z-index: 100; height: 48px; gap: 0; flex-wrap: wrap; }
        .nav-tab { padding: 0 14px; border: none; background: none; cursor: pointer; font-size: 13px; font-weight: 500; color: #64748b; border-bottom: 2px solid transparent; white-space: nowrap; height: 48px; display: inline-flex; align-items: center; gap: 6px; transition: color 0.15s; }
        .nav-tab:hover { color: #1e293b; background: none; }
        .nav-tab.active { color: var(--primary-red); border-bottom-color: var(--primary-red); background: none; font-weight: 600; }
        .nav-tab > svg { width: 15px; height: 15px; flex-shrink: 0; stroke: currentColor; }
        .nav-tab .badge { background: var(--primary-red); color: white; padding: 0 6px; border-radius: 10px; font-size: 9px; font-weight: 700; min-width: 18px; text-align: center; line-height: 18px; margin-left: 2px; }
        .nav-tab .badge.orange { background: var(--orange); }
        .badge-new { background: #dc2626; color: white; padding: 0 5px; border-radius: 10px; font-size: 9px; font-weight: 700; margin-left: 3px; min-width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; animation: badgePulse 2s ease-in-out 1; }
        .nav-dropdown-btn .badge-new { position: relative; top: -1px; }
        @keyframes badgePulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }
        .nav-dropdown { position: relative; display: inline-flex; height: 48px; }
        .nav-dropdown-btn { padding: 0 14px; border: none; background: none; cursor: pointer; font-size: 13px; font-weight: 500; color: #64748b; border-bottom: 2px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: 6px; height: 48px; transition: color 0.15s; }
        .nav-dropdown-btn:hover { color: #1e293b; background: none; }
        .nav-dropdown-btn.has-active { color: var(--primary-red); border-bottom-color: var(--primary-red); font-weight: 600; }
        .nav-dropdown-btn > svg { width: 15px; height: 15px; stroke: currentColor; }
        .nav-dropdown-btn .dd-arrow { font-size: 8px; transition: transform 0.2s; opacity: 0.4; }
        .nav-dropdown.open .dd-arrow { transform: rotate(180deg); }
        .nav-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: white; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 20px 50px -12px rgba(0,0,0,0.12); z-index: 1000; padding: 8px; min-width: 280px; animation: ddSlideIn 0.15s ease; }
        .nav-dropdown-menu.wide { min-width: 520px; }
        .nav-dropdown.open .nav-dropdown-menu { display: block; }
        @keyframes ddSlideIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
        .nav-dropdown-menu .dd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
        .nav-dropdown-menu .dd-grid.single { grid-template-columns: 1fr; }
        .nav-dropdown-menu .nav-tab { display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; border-bottom: none; padding: 10px 12px; border-radius: 8px; height: auto; font-size: 13px; font-weight: 400; color: #1e293b; white-space: normal; }
        .nav-dropdown-menu .nav-tab:hover { background: #f8fafc; color: #1e293b; }
        .nav-dropdown-menu .nav-tab:hover .dd-ico { transform: scale(1.1); }
        .nav-dropdown-menu .nav-tab.active { background: #fef2f2; color: var(--primary-red); border-left: none; padding-left: 12px; }
        .nav-dropdown-menu .nav-tab > svg { display: none; }
        .nav-dropdown-menu a.nav-tab { text-decoration: none; }
        .dd-ico { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.2s ease; }
        .dd-ico svg { width: 20px; height: 20px; opacity: 0.85; }
        .dd-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
        .dd-name { font-size: 13px; font-weight: 600; color: inherit; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
        .dd-desc { font-size: 11px; color: #94a3b8; margin-top: 1px; font-weight: 400; }
        .dd-notif { background: #c8102e; color: white; font-size: 9px; font-weight: 700; padding: 0 6px; border-radius: 10px; min-width: 18px; text-align: center; line-height: 18px; }
        .nav-search-btn { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #e2e8f0; border-radius: 8px; color: #94a3b8; font-size: 12px; cursor: pointer; transition: all 0.2s; margin-left: auto; background: none; white-space: nowrap; }
        .nav-search-btn:hover { border-color: #cbd5e1; color: #64748b; background: #f8fafc; }
        .nav-search-btn kbd { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 9px; font-family: inherit; color: #94a3b8; border: 1px solid #e2e8f0; }
        .cmd-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,0.4); backdrop-filter: blur(4px); z-index: 5000; align-items: flex-start; justify-content: center; padding-top: 14vh; }
        .cmd-overlay.show { display: flex; }
        .cmd-box { background: white; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.05); width: 500px; max-height: 420px; overflow: hidden; animation: cmdPop 0.12s ease; }
        @keyframes cmdPop { from { opacity: 0; transform: scale(0.96) translateY(-8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
        .cmd-input-wrap { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #f1f5f9; }
        .cmd-input { flex: 1; border: none; outline: none; font-size: 15px; font-family: inherit; color: #1e293b; }
        .cmd-input::placeholder { color: #cbd5e1; }
        .cmd-results { max-height: 320px; overflow-y: auto; padding: 6px; }
        .cmd-section-label { padding: 8px 12px 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: #94a3b8; font-weight: 700; }
        .cmd-result { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; cursor: pointer; transition: background 0.1s; }
        .cmd-result:hover { background: #f8fafc; }
        .cmd-result .cmd-ico { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; }
        .cmd-result .cmd-name { font-size: 13px; font-weight: 500; color: #1e293b; flex: 1; }
        .cmd-result .cmd-section { font-size: 10px; color: #cbd5e1; }
        .cmd-result .cmd-badge { background: #c8102e; color: white; font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 10px; }
        .cmd-hint { padding: 8px 14px; font-size: 10px; color: #94a3b8; border-top: 1px solid #f1f5f9; display: flex; gap: 16px; }
        .cmd-hint kbd { background: #f1f5f9; padding: 1px 5px; border-radius: 3px; font-size: 9px; border: 1px solid #e2e8f0; }
        .main-content { padding: 20px; }
        .tab-content { display: none; }
        .tab-content.active { display: block; }
        .filter-bar { background: white; padding: 15px; border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 15px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
        .filter-group { display: flex; flex-direction: column; gap: 4px; }
        .filter-group label { font-size: 11px; font-weight: 600; color: var(--text-gray); text-transform: uppercase; }
        .filter-group select, .filter-group input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; min-width: 130px; }
        .quick-filters { display: flex; gap: 8px; flex-wrap: wrap; }
        .quick-filter-btn { padding: 6px 14px; border: 2px solid var(--border); border-radius: 20px; background: white; cursor: pointer; font-size: 12px; font-weight: 500; }
        .quick-filter-btn:hover { border-color: #0369a1; color: #0369a1; }
        .quick-filter-btn.active { background: #0369a1; border-color: #0369a1; color: white; }
        .quick-filter-btn.success { background: white; border-color: var(--green); color: var(--green); }
        .quick-filter-btn.success.active { background: var(--green); border-color: var(--green); color: white; }
        .quick-filter-btn.danger { background: white; border-color: #dc2626; color: #dc2626; }
        .quick-filter-btn.danger.active { background: #991b1b; border-color: #991b1b; color: white; }
        .stats-grid { display: flex; flex-direction: column; gap: 16px; margin-bottom: 16px; }
        .dash-row { display: grid; gap: 16px; }
        .dash-r1 { grid-template-columns: 1fr 1fr 1fr; }
        .dash-r2 { grid-template-columns: 1fr 1fr 1fr 1fr; }
        .dash-r3 { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; }
        @media(max-width:1100px){ .dash-r1{grid-template-columns:1fr 1fr} .dash-r2{grid-template-columns:1fr 1fr} .dash-r3{grid-template-columns:1fr 1fr 1fr} }
        @media(max-width:700px){ .dash-r1,.dash-r2,.dash-r3{grid-template-columns:1fr} #configPanel-listes > div{grid-template-columns:1fr!important} }
        .dash-card { background: white; border-radius: 16px; padding: 20px; border: 1px solid #f1f5f9; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.02); transition: box-shadow 0.25s, transform 0.25s; overflow: hidden; }
        .dash-card[style*="cursor:pointer"]:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
        .dash-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.08); transform: translateY(-2px); }
        /* Welcome */
        .dash-welcome { background: linear-gradient(135deg, #c8102e 0%, #8b0a1f 100%); color: white; position: relative; border: none; }
        .dash-welcome::before { content:''; position:absolute; right:-20px; top:-40px; width:180px; height:180px; border-radius:50%; background:rgba(255,255,255,0.05); }
        .dash-welcome::after { content:''; position:absolute; right:60px; bottom:-50px; width:140px; height:140px; border-radius:50%; background:rgba(255,255,255,0.03); }
        .dash-welcome h3 { font-size:22px; font-weight:700; margin-bottom:6px; position:relative; z-index:1; }
        .dash-welcome p { font-size:13px; opacity:0.75; margin-bottom:20px; position:relative; z-index:1; }
        .dwk-row { display:flex; gap:28px; position:relative; z-index:1; }
        .dwk .dwk-label { font-size:9px; text-transform:uppercase; letter-spacing:0.8px; opacity:0.55; font-weight:600; margin-bottom:4px; }
        .dwk .dwk-val { font-size:28px; font-weight:800; line-height:1; }
        .dwk .dwk-trend { font-size:12px; font-weight:700; margin-left:8px; }
        .dwk .dwk-trend.up { color:#4ade80; }
        .dwk .dwk-trend.down { color:#fca5a5; }
        .dwk .dwk-bar { height:4px; width:90px; background:rgba(255,255,255,0.15); border-radius:4px; margin-top:8px; overflow:hidden; }
        .dwk .dwk-bar-fill { height:100%; border-radius:4px; }
        /* Big stat */
        .dash-stat .ds-label { font-size:11px; text-transform:uppercase; letter-spacing:0.5px; color:#94a3b8; font-weight:600; margin-bottom:10px; }
        .dash-stat .ds-val-row { display:flex; align-items:baseline; gap:10px; }
        .dash-stat .ds-val { font-size:36px; font-weight:800; color:#1e293b; letter-spacing:-1px; line-height:1; }
        .dash-stat .ds-trend { font-size:12px; font-weight:700; padding:3px 10px; border-radius:20px; display:inline-flex; align-items:center; gap:3px; }
        .dash-stat .ds-trend.up { color:#16a34a; background:#f0fdf4; }
        .dash-stat .ds-trend.down { color:#dc2626; background:#fef2f2; }
        .dash-stat .ds-trend.neutral { color:#64748b; background:#f8fafc; }
        .dash-stat .ds-sub { font-size:11px; color:#94a3b8; margin-top:6px; }
        .dash-stat .ds-chart { margin-top:16px; width:100%; height:64px; position:relative; }
        .dash-stat .ds-chart svg { width:100%; height:100%; display:block; }
        .dash-stat .ds-donut { display:flex; align-items:center; gap:16px; margin-top:14px; }
        .dash-stat .ds-donut svg { width:80px; height:80px; flex-shrink:0; }
        .dash-stat .ds-donut-big { font-size:14px; font-weight:700; color:#1e293b; }
        .dash-stat .ds-donut-sm { font-size:11px; color:#94a3b8; }
        /* Medium stat */
        .dash-med .dm-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
        .dash-med .dm-label { font-size:10px; text-transform:uppercase; letter-spacing:0.5px; color:#94a3b8; font-weight:600; }
        .dash-med .dm-period { font-size:9px; color:#cbd5e1; background:#f8fafc; padding:2px 8px; border-radius:10px; }
        .dash-med .dm-val-row { display:flex; align-items:baseline; gap:8px; }
        .dash-med .dm-val { font-size:28px; font-weight:800; color:#1e293b; letter-spacing:-0.5px; line-height:1; }
        .dash-med .dm-trend { font-size:11px; font-weight:700; }
        .dash-med .dm-trend.up { color:#16a34a; }
        .dash-med .dm-trend.down { color:#dc2626; }
        .dash-med .dm-trend.neutral { color:#94a3b8; }
        .dash-med .dm-chart { margin-top:14px; height:48px; width:100%; }
        .dash-med .dm-chart svg { width:100%; height:100%; display:block; }
        .dash-med .dm-progress { display:flex; align-items:center; gap:10px; margin-top:14px; }
        .dash-med .dm-progress-label { font-size:11px; color:#64748b; white-space:nowrap; }
        .dash-med .dm-progress-track { flex:1; height:6px; background:#f1f5f9; border-radius:6px; overflow:hidden; }
        .dash-med .dm-progress-fill { height:100%; border-radius:6px; }
        .dash-med .dm-progress-pct { font-size:11px; font-weight:700; color:#0369a1; }
        /* Icon card */
        .dash-ico { display:flex; align-items:center; gap:14px; padding:16px 18px; }
        .dash-ico .di-box { width:48px; height:48px; border-radius:14px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
        .dash-ico .di-box svg { width:24px; height:24px; }
        .dash-ico .di-val { font-size:16px; font-weight:800; color:#1e293b; }
        .dash-ico .di-pct { font-size:12px; font-weight:700; margin-left:4px; }
        .dash-ico .di-pct.up { color:#16a34a; }
        .dash-ico .di-pct.down { color:#dc2626; }
        .dash-ico .di-desc { font-size:11px; color:#94a3b8; margin-top:1px; }
        .dash-card[onclick] { transition: transform 0.15s, box-shadow 0.15s; }
        .dash-card[onclick]:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
        .dash-ico .di-stars { display:inline-flex; gap:1px; color:#facc15; font-size:14px; }
        .dashboard-year-badge { background: linear-gradient(135deg, var(--primary-red), #9f1239); color: white; padding: 8px 20px; border-radius: 20px; font-weight: 700; font-size: 18px; margin-right: auto; }
        .treemap-container { display: flex; flex-wrap: wrap; gap: 4px; min-height: 120px; }
        .treemap-item { display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; font-weight: 600; border-radius: 8px; padding: 10px; transition: transform 0.2s, box-shadow 0.2s; cursor: default; }
        .treemap-item:hover { transform: scale(1.02); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
        .treemap-item .name { font-size: 12px; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
        .treemap-item .count { font-size: 22px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
        .chart-evolution-container { background: white; border-radius: 12px; padding: 20px; margin-top: 20px; box-shadow: var(--shadow); }
        .chart-evolution-container h3 { margin: 0 0 20px 0; color: var(--text-dark); font-size: 16px; }
        .chart-evolution { display: flex; align-items: flex-end; justify-content: space-between; height: 250px; padding: 20px 10px 40px 10px; background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%); border-radius: 8px; position: relative; }
        .chart-year-group { display: flex; flex-direction: column; align-items: center; flex: 1; }
        .chart-year-label { position: absolute; bottom: 10px; font-weight: 700; font-size: 14px; color: var(--text-dark); }
        .chart-bars { display: flex; gap: 2px; align-items: flex-end; height: 180px; }
        .chart-bar { width: 14px; border-radius: 3px 3px 0 0; transition: all 0.3s; position: relative; cursor: pointer; }
        .chart-bar:hover { filter: brightness(1.1); }
        .chart-bar:hover::after { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #1e293b; color: white; padding: 4px 8px; border-radius: 4px; font-size: 11px; white-space: nowrap; z-index: 10; }
        .chart-legend { display: flex; gap: 15px; justify-content: center; margin-top: 15px; flex-wrap: wrap; }
        .chart-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-gray); }
        .chart-legend-color { width: 12px; height: 12px; border-radius: 3px; }
        .marche-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
        .marche-item:last-child { border-bottom: none; }
        .marche-info { flex: 1; }
        .marche-name { font-weight: 600; color: var(--text-dark); font-size: 13px; }
        .marche-bar { height: 6px; background: #e2e8f0; border-radius: 3px; margin-top: 4px; overflow: hidden; }
        .marche-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
        .marche-stats { text-align: right; min-width: 100px; }
        .marche-value { font-weight: 700; font-size: 14px; }
        .marche-reste { font-size: 11px; color: var(--text-gray); }
        .dashboard-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
        .chart-courbes-container { background: white; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
        .chart-courbes-container h3 { margin: 0 0 15px 0; font-size: 16px; color: var(--text-dark); }
        .chart-courbes { width: 100%; height: 250px; position: relative; }
        .chart-courbes svg { width: 100%; height: 100%; }
        .chart-courbes-legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 15px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
        .legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-gray); cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all 0.2s; }
        .legend-item:hover { background: #f1f5f9; }
        .legend-item.disabled { opacity: 0.4; text-decoration: line-through; }
        .legend-item input[type="checkbox"] { cursor: pointer; accent-color: var(--primary-red); }
        .legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-gray); }
        .legend-line { width: 25px; height: 3px; border-radius: 2px; }
        .image-mois-container { background: white; border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
        .image-mois-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; background: linear-gradient(135deg, #f8fafc, #f1f5f9); }
        .image-mois-header h3 { margin: 0; font-size: 16px; color: var(--text-dark); }
        .btn-sm { padding: 5px 10px; font-size: 11px; }
        .image-mois { flex: 1; min-height: 250px; background-size: cover; background-position: center; background-repeat: no-repeat; position: relative; }
        .image-mois::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: linear-gradient(transparent, rgba(0,0,0,0.3)); }
        .treemap-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
        .treemap-item { display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; font-weight: 600; border-radius: 8px; padding: 12px 8px; transition: transform 0.2s, box-shadow 0.2s; cursor: default; min-width: 80px; }
        .treemap-item:hover { transform: scale(1.03); box-shadow: 0 4px 15px rgba(0,0,0,0.25); }
        .treemap-item .name { font-size: 11px; text-shadow: 0 1px 2px rgba(0,0,0,0.3); text-align: center; }
        .treemap-item .count { font-size: 24px; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
        
        /* Résultats */
        .resultats-year-badge { background: linear-gradient(135deg, var(--primary-red), #9f1239); color: white; padding: 8px 20px; border-radius: 20px; font-weight: 700; font-size: 18px; margin-right: auto; }
        .resultats-content { padding: 0; display: flex; gap: 20px; }
        .resultats-sidebar { width: 200px; flex-shrink: 0; background: white; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); height: fit-content; position: sticky; top: 10px; }
        .resultats-sidebar h4 { margin: 0 0 15px 0; font-size: 14px; color: var(--text-dark); display: flex; align-items: center; gap: 8px; }
        .resultats-sidebar .filter-group { margin-bottom: 15px; }
        .resultats-sidebar .filter-group label { display: block; font-size: 11px; font-weight: 600; color: var(--text-gray); margin-bottom: 5px; text-transform: uppercase; }
        .resultats-sidebar .filter-group select, .resultats-sidebar .filter-group input { width: 100%; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px; }
        .resultats-sidebar .btn-reset { width: 100%; margin-top: 10px; }
        .resultats-main { flex: 1; min-width: 0; }
        .resultats-table-container { background: white; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
        .resultats-table-container h3 { margin: 0 0 15px 0; font-size: 16px; color: var(--text-dark); }
        .resultats-table { width: 100%; border-collapse: collapse; font-size: 13px; }
        .resultats-table th { background: linear-gradient(135deg, #f8fafc, #f1f5f9); padding: 12px 10px; text-align: center; font-weight: 600; color: var(--text-dark); border-bottom: 2px solid var(--primary-red); cursor: pointer; user-select: none; transition: background 0.2s; }
        .resultats-table th:hover { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); }
        .resultats-table th .sort-icon { margin-left: 4px; font-size: 10px; opacity: 0.5; }
        .resultats-table th.sorted .sort-icon { opacity: 1; }
        .resultats-table td { padding: 12px 10px; border-bottom: 1px solid #e2e8f0; text-align: center; }
        .resultats-table tr:hover { background: #fef2f2; }
        .resultats-table .amount { text-align: right; font-family: 'Consolas', monospace; }
        .resultats-table .center { text-align: center; }
        .resultats-table tfoot td { background: linear-gradient(135deg, #1e293b, #334155); color: white; font-weight: 700; }
        .clickable-export { cursor: pointer; transition: all 0.2s; position: relative; }
        .clickable-export:hover { background: #dbeafe !important; color: #1e40af; transform: scale(1.05); }
        .clickable-export:hover::after { content: '📥'; position: absolute; right: 2px; top: 2px; font-size: 10px; }
        .sortable-table th { cursor: pointer; }
        .sortable-table th:hover { background: linear-gradient(135deg, #e2e8f0, #cbd5e1); }
        .trend-up { color: #16a34a; font-weight: 700; }
        .trend-down { color: #dc2626; font-weight: 700; }
        .trend-flat { color: #d97706; font-weight: 700; }
        .progress-mini { width: 80px; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 8px; }
        .progress-mini-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
        .resultats-charts-row { display: grid; grid-template-columns: 1fr; gap: 20px; }
        .resultats-chart-card { background: white; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
        .resultats-chart-card h4 { margin: 0 0 20px 0; font-size: 15px; color: var(--text-dark); }
        .chart-comparison { padding: 15px 10px; }
        .butterfly-row { display: grid; grid-template-columns: 1fr 120px 1fr 50px; align-items: center; gap: 0; margin-bottom: 6px; height: 38px; }
        .butterfly-bar-left { display: flex; justify-content: flex-end; align-items: center; height: 30px; gap: 4px; }
        .butterfly-bar-left .bf-bar { height: 100%; border-radius: 6px 0 0 6px; display: flex; align-items: center; justify-content: flex-start; padding-left: 8px; min-width: 2px; transition: width 0.6s ease; }
        .butterfly-bar-right { display: flex; justify-content: flex-start; align-items: center; height: 30px; gap: 4px; }
        .butterfly-bar-right .bf-bar { height: 100%; border-radius: 0 6px 6px 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; min-width: 2px; transition: width 0.6s ease; }
        .bf-bar .bf-label { font-size: 11px; font-weight: 700; color: white; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,0.3); }
        .bf-label-out { font-size: 11px; font-weight: 600; color: var(--text-dark); white-space: nowrap; padding: 0 6px; }
        .butterfly-center { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-dark); padding: 0 6px; border-left: 2px solid #cbd5e1; border-right: 2px solid #cbd5e1; display: flex; align-items: center; justify-content: center; height: 100%; background: #f8fafc; }
        .butterfly-ratio { text-align: center; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 3px 0; }
        .butterfly-ratio.positive { color: #16a34a; }
        .butterfly-ratio.negative { color: #dc2626; }
        .butterfly-ratio.neutral { color: #64748b; }
        .butterfly-header { display: grid; grid-template-columns: 1fr 120px 1fr 50px; font-size: 11px; font-weight: 600; color: var(--text-gray); text-transform: uppercase; letter-spacing: 0.5px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px solid #e2e8f0; }
        .butterfly-header span:first-child { text-align: right; padding-right: 10px; }
        .butterfly-header span:nth-child(2) { text-align: center; }
        .butterfly-header span:nth-child(3) { text-align: left; padding-left: 10px; }
        .butterfly-header span:nth-child(4) { text-align: center; }
        .chart-comparison-legend { display: flex; gap: 30px; justify-content: center; margin-top: 15px; padding-top: 12px; border-top: 1px solid #e2e8f0; font-size: 12px; }
        
        /* Contributions Collaborateurs */
        .contrib-collab-container { background: white; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); margin-top: 20px; }
        .contrib-collab-container h3 { margin: 0 0 20px 0; font-size: 16px; color: var(--text-dark); }
        .contrib-collab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
        .contrib-card { background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); border-radius: 12px; padding: 20px; position: relative; overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; }
        .contrib-card:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
        .contrib-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 12px 12px 0 0; }
        .contrib-card .collab-avatar { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; color: white; margin-bottom: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
        .contrib-card .collab-name { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 15px; }
        .contrib-card .collab-stats { display: flex; flex-direction: column; gap: 10px; }
        .contrib-stat { display: flex; justify-content: space-between; align-items: center; }
        .contrib-stat-label { font-size: 11px; color: var(--text-gray); text-transform: uppercase; }
        .contrib-stat-value { font-size: 16px; font-weight: 700; color: var(--text-dark); }
        .contrib-bar-container { margin-top: 15px; }
        .contrib-bar { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
        .contrib-bar-fill { height: 100%; border-radius: 4px; transition: width 0.8s ease-out; }
        .contrib-pct-badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; color: white; margin-top: 10px; }
        .contrib-rank { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; box-shadow: 0 2px 8px rgba(245,158,11,0.4); }
        .contrib-rank.silver { background: linear-gradient(135deg, #94a3b8, #64748b); box-shadow: 0 2px 8px rgba(100,116,139,0.4); }
        .contrib-rank.bronze { background: linear-gradient(135deg, #d97706, #b45309); box-shadow: 0 2px 8px rgba(180,83,9,0.4); }
        .trend-arrow { display: inline-block; font-size: 18px; }
        .trend-arrow.up-strong { transform: rotate(-90deg); color: #16a34a; }
        .trend-arrow.up-mild { transform: rotate(-45deg); color: #22c55e; }
        .trend-arrow.flat { transform: rotate(0deg); color: #d97706; }
        .trend-arrow.down-mild { transform: rotate(45deg); color: #f97316; }
        .trend-arrow.down-strong { transform: rotate(90deg); color: #dc2626; }
        
        /* Comparatif mensuel */
        .comparatif-mensuel-container { background: white; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
        .comparatif-mensuel-container h3 { margin: 0 0 15px 0; font-size: 16px; color: var(--text-dark); }
        .collab-mensuel-container { background: white; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
        .collab-mensuel-container h3 { margin: 0 0 15px 0; font-size: 16px; color: var(--text-dark); text-align: center; }
        .collab-table { margin: 0 auto; }
        .collab-table td, .collab-table th { text-align: center !important; }
        .comparatif-table.collab-table th.marche-col { text-align: center !important; }
        .collab-marche-container { background: white; border-radius: 12px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
        .collab-marche-container h3 { margin: 0 0 15px 0; font-size: 16px; color: var(--text-dark); text-align: center; }
        .collab-marche-table { margin: 0 auto; border-collapse: collapse; font-size: 12px; }
        .collab-marche-table th { padding: 10px 8px; text-align: center; font-weight: 600; background: #f8fafc; border-bottom: 2px solid var(--primary-red); }
        .collab-marche-table td { padding: 8px 6px; text-align: center; border-bottom: 1px solid #e2e8f0; }
        .collab-marche-table tr:hover { background: #f8fafc; }
        .conquete-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
        .conquete-high { background: #dcfce7; color: #166534; }
        .conquete-medium { background: #fef3c7; color: #92400e; }
        .conquete-low { background: #fee2e2; color: #dc2626; }
        .comparatif-mensuel { overflow-x: auto; }
        .comparatif-table { width: 100%; border-collapse: collapse; font-size: 12px; }
        .comparatif-table th { padding: 10px 6px; text-align: center; font-weight: 600; background: #f8fafc; }
        .comparatif-table th.marche-col { text-align: left; min-width: 100px; background: linear-gradient(135deg, #f8fafc, #f1f5f9); }
        .comparatif-table th.mois-header { font-size: 11px; color: var(--text-gray); border-bottom: 2px solid var(--primary-red); }
        .comparatif-table td { padding: 8px 4px; text-align: center; border-bottom: 1px solid #e2e8f0; }
        .comparatif-table td.marche-cell { text-align: left; font-weight: 600; background: #fafafa; }
        .comparatif-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; }
        .comparatif-value { font-weight: 700; font-size: 14px; }
        .comparatif-delta { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; padding: 2px 5px; border-radius: 4px; font-weight: 600; }
        .comparatif-delta.positive { background: #dcfce7; color: #166534; }
        .comparatif-delta.negative { background: #fee2e2; color: #dc2626; }
        .comparatif-delta.neutral { background: #fef3c7; color: #92400e; }
        .comparatif-delta-arrow { font-size: 9px; }
        .comparatif-row-total { background: linear-gradient(135deg, #f1f5f9, #e2e8f0) !important; }
        .comparatif-row-total td { font-weight: 700 !important; }
        .table-container { background: white; border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
        .table-header { padding: 12px 15px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
        .table-header h2 { font-size: 16px; font-weight: 600; }
        .table-header .count { background: var(--bg-light); padding: 3px 10px; border-radius: 15px; font-size: 12px; color: var(--text-gray); }
        .search-box { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; width: 250px; font-size: 13px; }
        .table-scroll { overflow-x: auto; max-height: 500px; overflow-y: auto; }
        table { width: 100%; border-collapse: collapse; font-size: 12px; }
        #table-releveHeures th:first-child, #table-releveHeures td:first-child { width: 110px; text-align: left; }
        #table-releveHeures th:nth-child(2), #table-releveHeures td:nth-child(2) { width: 140px; text-align: left; }
        #table-releveHeures th:last-child, #table-releveHeures td:last-child { width: 70px; }
        #table-releveHeures th:nth-last-child(2), #table-releveHeures td:nth-last-child(2) { width: 160px; }
        #table-avancesClients th { white-space: nowrap; font-size: 11px; }
        #table-avancesClients td { font-size: 11px; vertical-align: middle; }
        thead { position: sticky; top: 0; z-index: 10; }
        th { background: #f1f5f9; padding: 10px 12px; text-align: center; font-weight: 600; border-bottom: 2px solid var(--border); white-space: nowrap; cursor: pointer; }
        th:hover { background: #e2e8f0; }
        th.sorted-asc::after { content: ' ▲'; color: var(--primary-red); }
        th.sorted-desc::after { content: ' ▼'; color: var(--primary-red); }
        td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: center; }
        tr:hover td { background: #fef2f2; }
        td[contenteditable="true"] { cursor: text; }
        td[contenteditable="true"]:focus { outline: 2px solid var(--primary-red); }
        td select.cell-select { border: none; background: transparent; font-size: 12px; cursor: pointer; padding: 2px; width: 100%; text-align: center; }
        td select.cell-select:focus { outline: 2px solid var(--primary-red); background: white; }
        .cell-input { border: none; background: transparent; font-size: inherit; font-family: inherit; padding: 2px 4px; width: 100%; }
        .cell-input:focus { outline: 2px solid var(--primary-red); background: white; }
        select.cell-input { cursor: pointer; }
        input[type="date"].cell-input { cursor: pointer; }
        input[type="number"].cell-input { cursor: text; }
        tr.total-row td { background: linear-gradient(135deg, var(--primary-red), var(--primary-dark)) !important; color: white !important; font-weight: 700; font-size: 13px; }
        .status { padding: 3px 8px; border-radius: 15px; font-size: 10px; font-weight: 600; text-transform: uppercase; }
        .status-emis, .status-1 { background: #dcfce7; color: #166534; }
        .status-en-cours { background: #fef3c7; color: #92400e; }
        .status-renonce { background: #fee2e2; color: #991b1b; }
        .status-refus-sl { background: #fce7f3; color: #9d174d; }
        .status-frigo { background: #e0e7ff; color: #3730a3; }
        .amount { font-weight: 600; }
        .compagnie-badge { background: #dbeafe; color: #1e40af; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
        .compagnie-badge.sl { background: #fce7f3; color: #9d174d; }
        .produit-badge { background: #f3e8ff; color: #7c3aed; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
        .produit-badge.courtage { background: #fef3c7; color: #92400e; }
        .type-badge { background: #e0f2fe; color: #0369a1; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
        .source-badge { background: #ecfdf5; color: #059669; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: 600; }
        .pilotage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; }
        .pilotage-card { background: white; border-radius: 10px; box-shadow: var(--shadow); padding: 15px; }
        .pilotage-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-red); }
        .classements-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
        .classement-pave { position: relative; overflow: hidden; border-radius: 16px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.02); cursor: pointer; transition: transform 0.25s, box-shadow 0.25s; background: white; border: 1px solid #f1f5f9; }
        .classement-pave:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
        .classement-icon { display: none; }
        .classement-label { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
        .classement-label::before { content: ''; width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
        #classementNational .classement-label::before { background: #c8102e; }
        #classementProdCible .classement-label::before { background: #7c3aed; }
        .classement-value { font-size: 60px; font-weight: 900; letter-spacing: -3px; line-height: 1; display: inline-block; }
        .classement-value sup { font-size: 18px; font-weight: 700; letter-spacing: 0; }
        .classement-periode { font-size: 10px; color: #94a3b8; margin-top: 4px; display: none; }
        .classement-row-layout { display: flex; align-items: center; gap: 24px; }
        .classement-right { flex: 1; }
        .classement-evolution { font-size: 12px; font-weight: 700; margin-bottom: 10px; text-align: left; }
        .classement-mini-bars { display: flex; align-items: flex-end; gap: 8px; height: 48px; justify-content: flex-start; }
        .classement-mini-bars .cbar { width: 28px; border-radius: 6px 6px 0 0; transition: height 0.5s ease; }
        .classement-mini-labels { display: flex; gap: 8px; margin-top: 3px; }
        .classement-mini-labels span { width: 28px; text-align: center; font-size: 8px; color: #94a3b8; font-weight: 600; }
        .classement-deco { display: none; }
        /* Modal détail apporteur */
        .modal-close { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 28px; cursor: pointer; color: #64748b; }
        .modal-close:hover { color: var(--primary-red); }
        .apporteur-popup-header { text-align: center; border-bottom: 2px solid var(--primary-red); padding-bottom: 15px; margin-bottom: 20px; }
        .apporteur-popup-header h2 { margin: 0 0 10px 0; font-size: 20px; color: #1e293b; }
        .apporteur-popup-total { display: inline-block; background: linear-gradient(135deg, var(--primary-red), #8b0a1f); color: white; padding: 8px 20px; border-radius: 20px; font-weight: 700; font-size: 16px; }
        .apporteur-marches-grid { display: flex; flex-direction: column; gap: 10px; }
        .apporteur-marche-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #f8fafc; border-radius: 8px; border-left: 4px solid var(--primary-red); }
        .apporteur-marche-item .marche-name { font-weight: 600; color: #1e293b; }
        .apporteur-marche-item .marche-count { font-size: 20px; font-weight: 700; color: var(--primary-red); }
        .apporteur-detail-footer { margin-top: 20px; padding-top: 15px; text-align: center; border-top: 1px solid #e2e8f0; flex-shrink: 0; }
        .apporteur-detail-footer .btn { padding: 10px 30px; }
        .pilotage-table { width: 100%; font-size: 12px; }
        .pilotage-table th { background: #f8fafc; padding: 8px; text-align: center; }
        .pilotage-table td { padding: 8px; border-bottom: 1px solid var(--border); }
        .pilotage-table tr:last-child td { font-weight: 700; background: #fef2f2; }
        .modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 2000; align-items: center; justify-content: center; padding: 20px; }
        .modal-overlay.active { display: flex; }
        .modal { background: white; border-radius: 15px; width: 100%; max-width: 700px; max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
        .modal h2 { background: linear-gradient(135deg, var(--primary-red), var(--primary-dark)); color: white; padding: 15px 20px; font-size: 18px; margin: 0; }
        .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; padding: 20px; }
        .form-group { display: flex; flex-direction: column; gap: 5px; }
        .form-group.full-width { grid-column: 1 / -1; }
        .form-group label { font-size: 12px; font-weight: 600; color: var(--text-gray); }
        .form-group label .required { color: var(--primary-red); }
        .form-group input, .form-group select, .form-group textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; transition: border-color 0.2s; }
        .form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary-red); }
        .form-group .calculated-field { background: #f8fafc; color: var(--text-gray); }
        .form-group .help-text { font-size: 11px; color: var(--text-gray); margin-top: 2px; }
        .modal-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 15px 20px; background: #f8fafc; border-top: 1px solid var(--border); }
        .config-section { background: white; border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 15px; overflow: hidden; }
        .config-section h3 { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); padding: 12px 15px; font-size: 14px; border-bottom: 1px solid var(--border); }
        .config-content { padding: 15px; }
        .config-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
        .config-item { background: #f1f5f9; padding: 5px 12px; border-radius: 20px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
        .config-item button { background: none; border: none; color: #dc2626; cursor: pointer; font-size: 14px; line-height: 1; }
        .config-item button.edit-btn { color: var(--blue-accent); font-size: 12px; }
        .config-item button.edit-btn:hover { color: #0284c7; }
        .config-add { display: flex; gap: 8px; }
        .config-add input { flex: 1; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
        .footer { text-align: center; padding: 15px; color: var(--text-gray); font-size: 12px; }
        .toast { position: fixed; bottom: 20px; right: 20px; padding: 12px 20px; border-radius: 8px; color: white; font-weight: 500; font-size: 13px; box-shadow: 0 10px 15px rgba(0,0,0,0.1); z-index: 3000; animation: slideIn 0.3s ease; }
        .toast.success { background: var(--green); }
        .toast.error { background: var(--primary-red); }
        .toast.info { background: var(--blue-accent); }
        .toast.warning { background: var(--orange); }
        @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
        .autocomplete-container { position: relative; }
        .autocomplete-list { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid var(--border); border-radius: 6px; max-height: 200px; overflow-y: auto; z-index: 100; box-shadow: var(--shadow); display: none; }
        .autocomplete-list.active { display: block; }
        /* Homme Clé chips */
        .hk-chip { padding:6px 14px;border:1.5px solid #e2e8f0;border-radius:20px;background:#f8fafc;font-size:12px;font-weight:600;cursor:pointer;transition:all .15s;color:#475569;white-space:nowrap }
        .hk-chip:hover { border-color:#c8102e;color:#c8102e;background:#fef2f2 }
        .hk-chip.active { background:#c8102e;color:white;border-color:#c8102e;box-shadow:0 2px 8px rgba(200,16,46,0.25) }
        .hk-chip-auto { font-style:italic;border-style:dashed }
        .hk-chip-auto.active { background:#f59e0b;border-color:#f59e0b;color:white;box-shadow:0 2px 8px rgba(245,158,11,0.25) }
        @media(max-width:900px) { #hk-container { grid-template-columns:1fr !important; } }
        .autocomplete-item { padding: 8px 12px; cursor: pointer; font-size: 12px; border-bottom: 1px solid var(--border); }
        .autocomplete-item:hover { background: #fef2f2; }
        .client-info { font-size: 11px; color: var(--green); margin-top: 3px; }
        .client-info.warning { color: var(--orange); }
        .no-num { background: #fef3c7 !important; }
        .recent-update { background: #dcfce7 !important; }
        .dda-info { padding: 10px 15px; border-radius: 8px; font-weight: 600; margin-left: auto; }
        .dda-info.ok { background: #dcfce7; color: #166534; }
        .dda-info.warning { background: #fee2e2; color: #dc2626; }
        .btn-recap-dda { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: white; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; display: flex; align-items: center; gap: 6px; }
        .btn-recap-dda:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4); }
        .recap-dda-grid { display: grid; gap: 10px; }
        .recap-dda-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 10px; transition: transform 0.2s; }
        .recap-dda-item:hover { transform: translateX(3px); }
        .recap-dda-item.ok { background: linear-gradient(135deg, #dcfce7, #bbf7d0); border-left: 4px solid #16a34a; }
        .recap-dda-item.warning { background: linear-gradient(135deg, #fee2e2, #fecaca); border-left: 4px solid #dc2626; }
        .recap-dda-name { font-weight: 600; font-size: 15px; color: #1e293b; }
        .recap-dda-stats { text-align: right; }
        .recap-dda-total { font-size: 12px; color: #64748b; margin-bottom: 2px; }
        .recap-dda-reste { font-size: 14px; font-weight: 700; }
        .recap-dda-reste.ok { color: #16a34a; }
        .recap-dda-reste.warning { color: #dc2626; }
        .fourniture-manquante { }
        .btn-recap-cout { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; font-weight: 600; padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; }
        .btn-recap-cout:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4); }
        .cout-mois-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 15px; }
        .cout-mois-item { background: #f8fafc; padding: 12px; border-radius: 8px; text-align: center; }
        .cout-mois-item .mois { font-size: 12px; color: #64748b; text-transform: uppercase; }
        .cout-mois-item .montant { font-size: 16px; font-weight: 700; color: #1e293b; }
        .cout-total { background: linear-gradient(135deg, var(--primary-red), #9f1239); color: white; padding: 15px; border-radius: 10px; text-align: center; margin-top: 15px; }
        .cout-total .label { font-size: 13px; opacity: 0.9; }
        .cout-total .montant { font-size: 24px; font-weight: 700; }
        .btn-fermer { background: linear-gradient(135deg, #64748b, #475569); color: white; padding: 12px 35px; font-size: 15px; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; }
        .btn-fermer:hover { background: linear-gradient(135deg, #475569, #334155); transform: scale(1.02); }
        .objectifs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; }
        .objectif-card { background: white; border-radius: 12px; padding: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
        .objectif-card h4 { margin: 0 0 10px 0; color: var(--primary-red); font-size: 14px; }
        .objectif-progress { margin-bottom: 10px; }
        .objectif-bar { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
        .objectif-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
        .objectif-bar-fill.good { background: linear-gradient(90deg, #16a34a, #22c55e); }
        .objectif-bar-fill.warning { background: linear-gradient(90deg, #d97706, #f59e0b); }
        .objectif-bar-fill.bad { background: linear-gradient(90deg, #dc2626, #ef4444); }
        .objectif-values { display: flex; justify-content: space-between; align-items: center; }
        .objectif-card .value { font-size: 18px; font-weight: 700; color: #1e293b; }
        .objectif-card .percent { font-size: 14px; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
        .objectif-card .percent.good { background: #dcfce7; color: #166534; }
        .objectif-card .percent.warning { background: #fef3c7; color: #92400e; }
        .objectif-card .percent.bad { background: #fee2e2; color: #dc2626; }
        .classement-section { background: linear-gradient(135deg, #f8fafc, #e2e8f0); border-radius: 12px; padding: 15px; margin-top: 15px; }
        .classement-section h4 { margin: 0 0 10px 0; color: #475569; }
        .classement-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
        .classement-mois { background: white; border-radius: 8px; padding: 8px; text-align: center; }
        .classement-mois .mois-label { font-size: 10px; color: #64748b; text-transform: uppercase; }
        .classement-mois .rang { font-size: 16px; font-weight: 700; color: #1e293b; }
        .classement-mois .rang.top { color: #16a34a; }
        .classement-mois input { width: 50px; text-align: center; border: 1px solid #e2e8f0; border-radius: 4px; padding: 4px; font-weight: 600; }
        .birthday-chip { display:inline-flex;align-items:center;gap:6px;background:white;border:1px solid #f59e0b;border-radius:20px;padding:5px 14px 5px 10px;cursor:pointer;transition:all 0.2s;text-decoration:none;color:#92400e;font-size:12px;font-weight:600 }
        .birthday-chip:hover { background:#fffbeb;transform:translateY(-1px);box-shadow:0 2px 8px rgba(245,158,11,0.2) }
        .birthday-chip .age { background:#f59e0b;color:white;border-radius:50%;width:22px;height:22px;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:700 }
        .inline-select { padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 4px; background: white; font-size: 12px; cursor: pointer; }
        .inline-select:focus { outline: none; border-color: var(--primary-red); }
        #jsonFileInput { display: none; }
        .action-cell { display: flex; gap: 4px; justify-content: center; align-items: center; }
    
        /* ===== COMMISSIONS TAB STYLES ===== */
        #tab-commissions .comm-nav-tabs { display: flex; background: white; border-bottom: 1px solid var(--border); padding: 0 15px; border-radius: 10px 10px 0 0; margin-bottom: 0; }
        #tab-commissions .comm-nav-tab { padding: 12px 20px; font-size: 13px; font-weight: 600; color: var(--text-gray); cursor: pointer; border-bottom: 3px solid transparent; border: none; background: none; }
        #tab-commissions .comm-nav-tab:hover { color: var(--primary-red); }
        #tab-commissions .comm-nav-tab.active { color: var(--primary-red); border-bottom-color: var(--primary-red); }
        #tab-commissions .comm-nav-tab.laurence.active { background: rgba(124,58,237,0.1); border-bottom-color: #7c3aed; color: #7c3aed; }
        #tab-commissions .comm-nav-tab.philippe.active { background: rgba(3,105,161,0.1); border-bottom-color: var(--blue-accent); color: var(--blue-accent); }
        #tab-commissions .comm-tab-content { display: none; }
        #tab-commissions .comm-tab-content.active { display: block; }
        #tab-commissions .comm-card { background: white; border-radius: 12px; box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
        #tab-commissions .comm-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; padding-bottom: 12px; border-bottom: 2px solid var(--primary-red); }
        #tab-commissions .comm-card-header.purple { border-bottom-color: #7c3aed; }
        #tab-commissions .comm-card-header.blue { border-bottom-color: var(--blue-accent); }
        #tab-commissions .comm-card-header.green { border-bottom-color: var(--green); }
        #tab-commissions .comm-card-header.orange { border-bottom-color: var(--orange); }
        #tab-commissions .comm-card-header h2 { font-size: 16px; font-weight: 600; }
        #tab-commissions .comm-card-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; }
        #tab-commissions .comm-card-icon.purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
        #tab-commissions .comm-card-icon.blue { background: linear-gradient(135deg, var(--blue-accent), #0284c7); }
        #tab-commissions .comm-card-icon.green { background: linear-gradient(135deg, var(--green), #15803d); }
        #tab-commissions .comm-card-icon.orange { background: linear-gradient(135deg, var(--orange), #c2410c); }
        #tab-commissions .comm-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 16px; }
        #tab-commissions .comm-stat-card { background: linear-gradient(135deg, #fff, #f8fafc); border-radius: 10px; padding: 10px; border: 1px solid var(--border); text-align: center; }
        #tab-commissions .comm-stat-card.blue { background: linear-gradient(135deg, var(--blue-accent), #0284c7); border: none; }
        #tab-commissions .comm-stat-card.blue .comm-stat-label, #tab-commissions .comm-stat-card.blue .comm-stat-value { color: white; }
        #tab-commissions .comm-stat-card.purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); border: none; }
        #tab-commissions .comm-stat-card.purple .comm-stat-label, #tab-commissions .comm-stat-card.purple .comm-stat-value { color: white; }
        #tab-commissions .comm-stat-card.green { background: linear-gradient(135deg, var(--green), #15803d); border: none; }
        #tab-commissions .comm-stat-card.green .comm-stat-label, #tab-commissions .comm-stat-card.green .comm-stat-value { color: white; }
        #tab-commissions .comm-stat-card.orange { background: linear-gradient(135deg, var(--orange), #c2410c); border: none; }
        #tab-commissions .comm-stat-card.orange .comm-stat-label, #tab-commissions .comm-stat-card.orange .comm-stat-value { color: white; }
        #tab-commissions .comm-stat-label { font-size: 8px; font-weight: 600; color: var(--text-gray); text-transform: uppercase; margin-bottom: 2px; }
        #tab-commissions .comm-stat-value { font-size: 16px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
        #tab-commissions .comm-form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
        #tab-commissions .comm-form-group { display: flex; flex-direction: column; gap: 4px; }
        #tab-commissions .comm-form-group label { font-size: 10px; font-weight: 600; color: var(--text-gray); text-transform: uppercase; }
        #tab-commissions .comm-form-group select, #tab-commissions .comm-form-group input { padding: 8px 12px; font-size: 13px; border: 2px solid var(--border); border-radius: 6px; background: white; }
        #tab-commissions .comm-table-container { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border); }
        #tab-commissions .comm-table-container table { width: 100%; border-collapse: collapse; font-size: 11px; }
        #tab-commissions .comm-table-container th { padding: 8px 4px; text-align: center; font-weight: 600; color: var(--text-gray); text-transform: uppercase; font-size: 8px; border-bottom: 2px solid var(--border); white-space: nowrap; background: linear-gradient(135deg, #f1f5f9, #e2e8f0); }
        #tab-commissions .comm-table-container td { padding: 6px 4px; border-bottom: 1px solid var(--border); text-align: center; font-size: 11px; }
        #tab-commissions .comm-table-container tbody tr:hover { background: rgba(200,16,46,0.03); }
        #tab-commissions .comm-table-container tbody tr.paid { background: rgba(22,163,74,0.08); }
        #tab-commissions .comm-table-container tbody tr.has-reprise { background: rgba(234,88,12,0.1); }
        #tab-commissions .client-name { font-weight: 600; text-align: left !important; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        #tab-commissions .input-mini { width: 50px; padding: 3px; font-size: 10px; font-family: 'JetBrains Mono', monospace; border: 1px solid var(--border); border-radius: 4px; text-align: center; }
        #tab-commissions .input-reprise { width: 65px; padding: 3px; font-size: 10px; font-family: 'JetBrains Mono', monospace; border: 1px solid var(--border); border-radius: 4px; text-align: right; }
        #tab-commissions .input-reprise.has-value { border-color: var(--orange); background: rgba(234,88,12,0.1); }
        #tab-commissions .amount { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
        #tab-commissions .amount.positive { color: var(--green); }
        #tab-commissions .amount.negative { color: var(--orange); }
        #tab-commissions .sub-tabs { display: flex; gap: 6px; margin-bottom: 16px; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
        #tab-commissions .sub-tab { padding: 6px 14px; font-size: 12px; font-weight: 500; color: var(--text-gray); cursor: pointer; border-radius: 6px 6px 0 0; background: none; border: none; }
        #tab-commissions .sub-tab:hover { background: rgba(0,0,0,0.05); }
        #tab-commissions .sub-tab.active { background: var(--blue-accent); color: white; }
        #tab-commissions .comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
        #tab-commissions .comparison-card { background: white; border-radius: 10px; padding: 12px; text-align: center; border: 2px solid var(--border); }
        #tab-commissions .comparison-card.positive { border-color: var(--green); background: rgba(22,163,74,0.05); }
        #tab-commissions .comparison-card.negative { border-color: var(--orange); background: rgba(234,88,12,0.05); }
        #tab-commissions .comparison-label { font-size: 9px; color: var(--text-gray); text-transform: uppercase; margin-bottom: 4px; }
        #tab-commissions .comparison-value { font-size: 18px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
        .tab-title-header { font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 3px solid var(--primary-red); display: flex; align-items: center; gap: 10px; }
        .tab-title-header .tab-title-icon { font-size: 24px; }
        .tab-title-header .tab-title-sub { font-size: 12px; font-weight: 400; color: var(--text-gray); margin-left: auto; }
        #dashboardAlertes > div:hover { transform: translateX(4px); transition: transform 0.2s; }
        #tab-commissions .remu-input { width: 70px; padding: 4px; font-size: 10px; text-align: right; font-family: 'JetBrains Mono', monospace; border: 1px solid var(--border); border-radius: 4px; }
        #tab-commissions .comm-table-sticky { max-height: 70vh; overflow-y: auto; }
        #tab-commissions .comm-table-sticky thead th { position: sticky; top: 0; z-index: 10; background: linear-gradient(135deg, #f1f5f9, #e2e8f0); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
        #tab-commissions .alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; font-size: 12px; }
        #tab-commissions .alert-warning { background: rgba(234,88,12,0.1); color: var(--orange); border: 1px solid rgba(234,88,12,0.2); }
        #tab-commissions .alert-info { background: rgba(3,105,161,0.1); color: var(--blue-accent); border: 1px solid rgba(3,105,161,0.2); }
        #tab-commissions .result-section { background: linear-gradient(135deg, #1e293b, #0f172a); border-radius: 12px; padding: 16px; color: white; margin-top: 16px; }
        #tab-commissions .result-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
        #tab-commissions .result-row:last-child { border-bottom: none; }
        #tab-commissions .result-label { font-size: 11px; color: rgba(255,255,255,0.7); }
        #tab-commissions .result-value { font-size: 14px; font-weight: 600; font-family: 'JetBrains Mono', monospace; }
        #tab-commissions .result-final { font-size: 20px; color: #4ade80; }
        #tab-commissions .produit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
        #tab-commissions .produit-item { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: #f8fafc; border-radius: 6px; border: 1px solid var(--border); font-size: 11px; }
        #tab-commissions .produit-item input { width: 14px; height: 14px; }
        #tab-commissions .ponderation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
        #tab-commissions .ponderation-item { background: #f8fafc; border: 2px solid var(--border); border-radius: 8px; padding: 10px; text-align: center; }
        #tab-commissions .ponderation-item.active { border-color: var(--green); background: rgba(22,163,74,0.05); }
        #tab-commissions .ponderation-range { font-size: 10px; font-weight: 600; color: var(--text-gray); margin-bottom: 4px; }
        #tab-commissions .ponderation-rate { font-size: 18px; font-weight: 700; color: var(--primary-red); font-family: 'JetBrains Mono', monospace; }
        #tab-commissions .checkbox-cell { width: 30px; }
        #tab-commissions .checkbox-cell input { width: 16px; height: 16px; cursor: pointer; }
        /* Admin password pages unified style handled inline */
        /* Solutions Retraite */
        .sr-select { width:100%;max-width:500px;padding:12px 16px;border:2px solid #e2e8f0;border-radius:12px;font-size:14px;color:#1e293b;background:white;cursor:pointer;appearance:auto;transition:border-color .2s; }
        .sr-select:focus { border-color:#7c3aed;outline:none; }
        .sr-step-hdr { display:flex;align-items:center;gap:10px;margin-bottom:14px;font-weight:700;font-size:15px;color:#1e293b; }
        .sr-step-num { width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,#7c3aed,#6d28d9);color:white;display:inline-flex;align-items:center;justify-content:center;font-size:13px;font-weight:800;flex-shrink:0; }
        .sr-step-block { margin-top:20px;padding-top:20px;border-top:1px dashed #e2e8f0; }
        .sr-statut-card { flex:1;min-width:200px;border-radius:12px;padding:16px 18px;border:1px solid;cursor:pointer;transition:all .15s; }
        .sr-statut-card:hover { transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.1); }
        .sr-btn { transition:all .2s ease !important; }
        .sr-btn:hover { transform:translateY(-1px); }

