        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: #fff;
            color: #111827;
        }

        @keyframes shimmer {
            0% {
                background-position: 200% 0
            }
            100% {
                background-position: -200% 0
            }
        }

        @keyframes pulse {
            0%, 100% {
                opacity: 1
            }
            50% {
                opacity: .35
            }
        }

        .wrap {
            max-width: 960px;
            margin: 0 auto;
            padding: 28px 24px 60px;
        }

        @media (min-width: 1280px) {
            .wrap {
                max-width: 1200px;
            }
        }

        @media (min-width: 1536px) {
            .wrap {
                max-width: 1480px;
            }
        }

        /* top-right bar — mobile uniquement */
        .top-bar {
            position: fixed;
            top: 12px;
            right: 18px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 11px;
            color: #9ca3af;
            z-index: 50;
        }

        @media (min-width: 1024px) {
            .top-bar {
                display: none;
            }
        }

        .dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .dot.on {
            background: #16a34a;
        }

        .dot.off {
            background: #dc2626;
        }

        .top-bar .ver {
            background: #f3f4f6;
            border-radius: 3px;
            padding: 1px 5px;
            font-family: monospace;
            font-size: 10px;
            color: #6b7280;
        }

        .top-sync {
            background: none;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            color: #6b7280;
            font-size: 11px;
            padding: 2px 8px;
            cursor: pointer;
            transition: all .1s;
        }

        .top-sync:hover {
            border-color: #9ca3af;
            color: #374151;
        }

        .top-sync:disabled {
            opacity: .5;
            cursor: default;
        }

        /* auth loading */
        .auth-screen {
            position: fixed;
            inset: 0;
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: #9ca3af;
        }

        /* Drain banner — mise à jour en attente */
        .drain-banner {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            background: #fffbeb;
            border: 1.5px solid #f59e0b;
            border-radius: 8px;
            padding: 12px 16px;
            margin-bottom: 16px;
            color: #92400e;
            font-size: 14px;
        }

        .drain-banner-icon { font-size: 20px; flex-shrink: 0; }

        .drain-banner-title { font-weight: 700; margin-bottom: 2px; }

        .drain-banner-sub { font-size: 13px; opacity: .85; }

        /* header row — barre de recherche + notifications */
        .page-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
        }

        .page-header .search-wrap {
            flex: 1;
        }

        /* search */
        .search-wrap {
            position: relative;
        }

        .search-wrap .icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: #9ca3af;
            font-size: 15px;
            pointer-events: none;
        }

        .search-wrap input {
            width: 100%;
            padding: 10px 36px 10px 36px;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            font-size: 14px;
            color: #111827;
            background: #fafafa;
            outline: none;
            transition: border-color .15s;
        }

        .search-wrap input:focus {
            border-color: #6b7280;
        }

        .search-wrap .clear {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: #e5e7eb;
            border: none;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            cursor: pointer;
            font-size: 11px;
            color: #6b7280;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* tabs */
        .tabs {
            display: flex;
            gap: 0;
            margin-bottom: 28px;
            border-bottom: 1px solid #e5e7eb;
            overflow-x: auto;
            scrollbar-width: none;
        }

        .tabs::-webkit-scrollbar {
            display: none;
        }

        .tabs button {
            padding: 10px 20px;
            border: none;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            background: none;
            color: #9ca3af;
            border-bottom: 2px solid transparent;
            margin-bottom: -1px;
            transition: all .15s;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .tabs button.active {
            color: #111827;
            border-bottom-color: #111827;
        }

        /* séparateur et onglets favoris */
        .tab-sep {
            width: 1px;
            background: #e5e7eb;
            margin: 8px 4px;
            flex-shrink: 0;
        }

        .tabs button.fav-proj {
            font-size: 13px;
            padding: 10px 14px;
            color: #7c3aed;
        }

        .tabs button.fav-proj:hover {
            color: #6d28d9;
        }

        .tabs button.fav-proj.active {
            color: #7c3aed;
            border-bottom-color: #7c3aed;
        }

        .tabs button.fav-srv {
            font-size: 13px;
            padding: 10px 14px;
            color: #374151;
        }

        .tabs button.fav-srv:hover {
            color: #111827;
        }

        .tabs button.fav-srv.active {
            color: #111827;
            border-bottom-color: #374151;
        }

        /* server heading */
        .srv-head {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 10px;
            border-bottom: 2px solid #e5e7eb;
            padding-bottom: 8px;
        }

        .srv-head .name {
            font-size: 16px;
            font-weight: 700;
            color: #111827;
        }

        .srv-head .ip {
            font-size: 12px;
            color: #9ca3af;
            font-family: monospace;
        }

        /* client status dot */
        .client-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .client-dot.online {
            background: #16a34a;
        }

        .client-dot.offline {
            background: #dc2626;
        }

        .client-dot.unknown {
            background: #d1d5db;
        }

        .version-badge {
            font-size: 10px;
            font-family: monospace;
            padding: 1px 5px;
            border-radius: 3px;
        }

        .version-ok {
            background: #f0fdf4;
            color: #15803d;
        }

        .version-mismatch {
            background: #fef3c7;
            color: #92400e;
        }

        /* project heading */
        .proj-head {
            font-size: 13px;
            font-weight: 600;
            color: #7c3aed;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* branch block */
        .branch-row {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 0;
        }

        .branch-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .branch-dot.running {
            animation: pulse 1.5s infinite;
        }

        .branch-name {
            font-size: 14px;
            font-weight: 600;
            color: #111827;
            font-family: monospace;
        }

        .branch-meta {
            font-size: 11px;
            color: #9ca3af;
        }

        .subdir-badge {
            font-size: 10px;
            font-weight: 600;
            font-family: monospace;
            color: #5b21b6;
            background: #ede9fe;
            border-radius: 4px;
            padding: 1px 5px;
            margin-left: 4px;
            flex-shrink: 0;
        }

        /* pause button */
        .pause-btn {
            background: none;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            color: #6b7280;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 8px;
            cursor: pointer;
            flex-shrink: 0;
            transition: all .1s;
        }

        .pause-btn:hover {
            border-color: #9ca3af;
        }

        .pause-btn.paused {
            border-color: #f59e0b;
            color: #d97706;
            background: #fffbeb;
        }

        .pause-btn.paused:hover {
            background: #fef3c7;
        }

        .manual-deploy-btn {
            background: none;
            border: 1px solid #6ee7b7;
            border-radius: 4px;
            color: #059669;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 8px;
            cursor: pointer;
            flex-shrink: 0;
            transition: all .1s;
        }

        .manual-deploy-btn:hover {
            background: #ecfdf5;
            border-color: #059669;
        }

        /* commit card */
        .commit {
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            background: #fff;
            overflow: hidden;
        }

        .commit.queued {
            background: #fafafa;
            opacity: .7;
        }

        .commit-head {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            cursor: pointer;
            user-select: none;
        }

        .commit-arrow {
            color: #9ca3af;
            font-size: 10px;
            transition: transform .15s;
            flex-shrink: 0;
        }

        .commit-arrow.open {
            transform: rotate(90deg);
        }

        .commit-hash {
            font-size: 12px;
            color: #6b7280;
            background: #f3f4f6;
            padding: 1px 6px;
            border-radius: 3px;
            flex-shrink: 0;
            font-family: monospace;
        }

        .commit-msg {
            font-size: 13px;
            color: #374151;
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .commit-author {
            font-size: 11px;
            color: #9ca3af;
            flex-shrink: 0;
        }

        .commit-time {
            font-size: 10px;
            color: #d1d5db;
            flex-shrink: 0;
        }

        .commit-linked {
            font-size: 10px;
            color: #7c3aed;
            background: #faf5ff;
            padding: 1px 5px;
            border-radius: 3px;
            flex-shrink: 0;
            font-family: monospace;
            border: 1px solid #e9d5ff;
        }

        .commit-duration {
            font-size: 10px;
            color: #9ca3af;
            flex-shrink: 0;
            font-family: monospace;
        }

        /* badge */
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 4px;
            line-height: 1.4;
            white-space: nowrap;
        }

        .badge.sm {
            font-size: 10px;
            padding: 1px 6px;
        }

        .badge-done {
            color: #16a34a;
            background: #f0fdf4;
        }

        .badge-running {
            color: #2563eb;
            background: #eff6ff;
        }

        .badge-pending {
            color: #9ca3af;
            background: #f9fafb;
        }

        .badge-queued {
            color: #a855f7;
            background: #faf5ff;
        }

        .badge-failed {
            color: #dc2626;
            background: #fef2f2;
        }

        .badge-cancelled {
            color: #d1d5db;
            background: #f9fafb;
        }

        .badge-superseded {
            color: #9ca3af;
            background: #f3f4f6;
            text-decoration: line-through;
        }

        .badge-missing {
            color: #f59e0b;
            background: #fffbeb;
        }

        .proj-head.missing {
            opacity: .55;
        }

        .del-btn {
            color: #dc2626 !important;
            border-color: #fca5a5 !important;
        }

        .del-btn:hover {
            background: #fef2f2 !important;
            border-color: #dc2626 !important;
        }

        .cancel-btn {
            background: none;
            border: 1px solid #fbbf24;
            border-radius: 4px;
            color: #d97706;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 8px;
            cursor: pointer;
            flex-shrink: 0;
            transition: all .1s;
        }

        .cancel-btn:hover {
            background: #fffbeb;
            border-color: #d97706;
        }

        .cancel-btn:disabled {
            opacity: .5;
            cursor: default;
        }

        .retry-btn {
            background: none;
            border: 1px solid #fca5a5;
            border-radius: 4px;
            color: #dc2626;
            font-size: 11px;
            font-weight: 600;
            padding: 2px 8px;
            cursor: pointer;
            flex-shrink: 0;
            transition: all .1s;
        }

        .retry-btn:hover {
            background: #fef2f2;
            border-color: #dc2626;
        }

        .retry-btn:disabled {
            opacity: .5;
            cursor: default;
        }

        .commit.superseded {
            opacity: .45;
        }

        .commit.superseded .commit-msg {
            text-decoration: line-through;
            color: #9ca3af;
        }

        /* progress bar */
        .bar-track {
            flex: 1;
            height: 4px;
            background: #e5e7eb;
            border-radius: 4px;
            overflow: hidden;
        }

        .bar-fill {
            height: 100%;
            border-radius: 4px;
            transition: width .4s;
        }

        .bar-fill.running {
            background-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
        }

        /* subtasks */
        .subtasks {
            border-top: 1px solid #f3f4f6;
            padding: 8px 14px 10px 38px;
        }

        .st-row {
            display: grid;
            grid-template-columns: 14px 1fr auto auto;
            align-items: center;
            gap: 8px;
            padding: 3px 0;
            font-size: 13px;
        }

        .st-row.dim {
            color: #9ca3af;
        }

        .st-dot {
            font-size: 10px;
            text-align: center;
        }

        .st-dot.running {
            animation: pulse 1.5s infinite;
        }

        .st-bar-wrap {
            display: flex;
            align-items: center;
            gap: 6px;
            min-width: 90px;
        }

        .st-pct {
            font-size: 11px;
            color: #2563eb;
            font-variant-numeric: tabular-nums;
            min-width: 28px;
            text-align: right;
        }

        .st-timing {
            font-size: 11px;
            color: #9ca3af;
            font-family: monospace;
            white-space: nowrap;
        }

        .error-box {
            margin-top: 6px;
            padding: 8px 10px;
            background: #fef2f2;
            border-radius: 6px;
            font-size: 12px;
            color: #dc2626;
            font-family: monospace;
            white-space: pre-wrap;
            word-break: break-all;
        }

        .error-dl-btn {
            background: none;
            border: 1px solid #fca5a5;
            border-radius: 3px;
            color: #dc2626;
            font-size: 10px;
            padding: 1px 6px;
            cursor: pointer;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .error-dl-btn:hover {
            background: #fef2f2;
        }

        .progress-mini {
            display: flex;
            align-items: center;
            gap: 6px;
            width: 90px;
            flex-shrink: 0;
        }

        .progress-mini .pct {
            font-size: 10px;
            color: #6b7280;
            font-variant-numeric: tabular-nums;
            min-width: 24px;
        }

        .empty {
            text-align: center;
            padding: 48px 0;
            color: #9ca3af;
            font-size: 14px;
        }

        .section {
            margin-bottom: 32px;
        }

        .indent {
            margin-left: 8px;
        }

        .indent2 {
            margin-left: 8px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .indent3 {
            margin-left: 15px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .proj-srv-head {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 8px;
        }

        .proj-srv-name {
            font-size: 13px;
            font-weight: 600;
            color: #374151;
        }

        .proj-srv-ip {
            font-size: 11px;
            color: #9ca3af;
            font-family: monospace;
        }

        /* add / action buttons */
        .add-btn {
            background: none;
            border: 1px dashed #d1d5db;
            border-radius: 4px;
            color: #9ca3af;
            font-size: 11px;
            padding: 2px 8px;
            cursor: pointer;
            line-height: 1.4;
            flex-shrink: 0;
        }

        .add-btn:hover {
            border-color: #9ca3af;
            color: #6b7280;
        }

        .show-more-btn {
            font-size: 11px;
            color: #9ca3af;
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px 0;
            text-decoration: underline;
            text-decoration-style: dotted;
        }

        .show-more-btn:hover {
            color: #6b7280;
        }

        /* task rows */
        .drag-handle {
            cursor: grab;
            color: #d1d5db;
            font-size: 13px;
            flex-shrink: 0;
            user-select: none;
        }

        .drag-handle:hover {
            color: #9ca3af;
        }

        .task-row.dragging {
            opacity: 0.3;
        }

        .task-row.drag-over {
            border-color: #6b7280;
            background: #f3f4f6;
        }

        .tasks-wrap {
            margin: 2px 0 8px 15px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .task-row {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            padding: 5px 10px;
            background: #f9fafb;
            border-radius: 6px;
            border: 1px solid #f3f4f6;
        }

        .task-row.mandatory {
            background: #f0fdf4;
            border-color: #bbf7d0;
        }

        .task-row.system {
            background: #eff6ff;
            border-color: #bfdbfe;
        }

        .task-lock {
            font-size: 11px;
            color: #93c5fd;
            flex-shrink: 0;
        }

        .task-icon {
            font-size: 11px;
            color: #9ca3af;
            flex-shrink: 0;
            width: 14px;
            text-align: center;
        }

        .task-cmd {
            font-family: monospace;
            color: #374151;
            font-size: 12px;
            word-break: break-all;
            flex: 1;
        }

        .task-label {
            color: #374151;
            font-size: 12px;
            flex: 1;
        }

        .task-link-text {
            color: #7c3aed;
            font-weight: 600;
            font-size: 12px;
            flex: 1;
        }

        .branch-ph {
            background: #fef3c7;
            color: #92400e;
            border-radius: 3px;
            padding: 0 3px;
            font-family: monospace;
            font-size: 11px;
        }

        .macro-ph {
            background: #e0f2fe;
            color: #0369a1;
            border-radius: 3px;
            padding: 0 3px;
            font-family: monospace;
            font-size: 11px;
        }

        .task-del-btn {
            background: none;
            border: none;
            cursor: pointer;
            color: #d1d5db;
            font-size: 13px;
            flex-shrink: 0;
            padding: 0 2px;
            line-height: 1;
        }

        .task-del-btn:hover {
            color: #dc2626;
        }

        /* branch tasks section */
        .branch-tasks-section {
            margin: 4px 0 6px 15px;
        }

        .branch-tasks-head {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            font-weight: 600;
            color: #9ca3af;
            text-transform: uppercase;
            letter-spacing: .05em;
            margin-bottom: 4px;
        }

        .branch-tasks-head span {
            flex: 1;
        }

        /* task modal */
        .task-type-tabs {
            display: flex;
            gap: 6px;
            margin: 14px 0 16px;
        }

        .task-type-btn {
            flex: 1;
            padding: 8px;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            background: #f9fafb;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            color: #6b7280;
            transition: all .1s;
        }

        .task-type-btn.active {
            border-color: #111827;
            background: #111827;
            color: #fff;
        }

        .subdir-toggle {
            display: flex;
            gap: 6px;
            margin-top: 6px;
        }
        .subdir-btn {
            padding: 5px 16px;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            background: #f9fafb;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            color: #6b7280;
            font-family: monospace;
            transition: all .1s;
        }
        .subdir-btn.active {
            border-color: #7c3aed;
            background: #ede9fe;
            color: #5b21b6;
        }

        .pm2-info-box {
            margin-top: 14px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 14px;
        }
        .pm2-info-title {
            font-size: 12px;
            font-weight: 700;
            color: #374151;
            margin: 0 0 8px;
        }
        .pm2-info-text {
            font-size: 12px;
            color: #6b7280;
            line-height: 1.6;
            margin: 0 0 6px;
        }
        .pm2-info-text code {
            background: #e5e7eb;
            border-radius: 3px;
            padding: 1px 4px;
            font-family: monospace;
            font-size: 11px;
            color: #111827;
        }
        .pm2-code-block {
            margin-top: 10px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            overflow: hidden;
        }
        .pm2-code-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: #e5e7eb;
            padding: 5px 10px;
            font-size: 11px;
            font-weight: 600;
            color: #4b5563;
            font-family: monospace;
        }
        .pm2-dl-btn {
            background: #fff;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            padding: 2px 8px;
            font-size: 11px;
            font-weight: 600;
            color: #374151;
            cursor: pointer;
        }
        .pm2-dl-btn:hover { background: #f3f4f6; }
        .pm2-code {
            margin: 0;
            padding: 10px 12px;
            background: #1e293b;
            color: #e2e8f0;
            font-family: monospace;
            font-size: 11px;
            line-height: 1.7;
            overflow-x: auto;
            white-space: pre;
        }

        .modal-textarea {
            resize: vertical;
            min-height: 72px;
            font-family: monospace;
            font-size: 13px;
        }

        .modal-hint {
            font-size: 11px;
            color: #9ca3af;
            margin-top: 8px;
        }

        .modal-hint code {
            background: #f3f4f6;
            padding: 1px 4px;
            border-radius: 3px;
            color: #374151;
            font-family: monospace;
            cursor: pointer;
            transition: background .1s;
        }

        .modal-hint code:hover {
            background: #e5e7eb;
        }

        .macros-row {
            display: flex;
            gap: 6px;
            margin-top: 6px;
            flex-wrap: wrap;
        }

        .macro-chip {
            background: #e0f2fe;
            color: #0369a1;
            border: 1px solid #bae6fd;
            border-radius: 3px;
            padding: 2px 7px;
            font-family: monospace;
            font-size: 11px;
            cursor: pointer;
            transition: background .1s;
        }

        .macro-chip:hover {
            background: #bae6fd;
        }

        /* modal */
        .overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .45);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100;
        }

        .modal {
            background: #fff;
            border-radius: 12px;
            padding: 24px;
            width: 380px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
        }
        .modal-wide {
            width: 520px;
        }

        .modal-title {
            font-size: 15px;
            font-weight: 700;
            margin-bottom: 16px;
        }

        .modal label {
            display: block;
            font-size: 11px;
            font-weight: 600;
            color: #6b7280;
            margin-bottom: 4px;
            margin-top: 14px;
            text-transform: uppercase;
            letter-spacing: .05em;
        }

        .modal label:first-of-type {
            margin-top: 0;
        }

        .modal-input {
            width: 100%;
            padding: 8px 12px;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            font-size: 14px;
            outline: none;
            color: #111827;
            background: #fafafa;
        }

        .modal-input:focus {
            border-color: #6b7280;
            background: #fff;
        }

        .modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            margin-top: 20px;
        }

        .btn {
            padding: 7px 16px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            transition: background .1s;
        }

        .btn-ghost {
            background: #f3f4f6;
            color: #374151;
        }

        .btn-ghost:hover {
            background: #e5e7eb;
        }

        .btn-primary {
            background: #111827;
            color: #fff;
        }

        .btn-primary:hover {
            background: #1f2937;
        }

        .btn-primary:disabled {
            background: #d1d5db;
            cursor: default;
        }

        .btn-danger {
            background: #dc2626;
            color: #fff;
        }

        .btn-danger:hover {
            background: #b91c1c;
        }

        /* disconnect overlay */
        .disconnect-overlay {
            position: fixed;
            inset: 0;
            z-index: 10000;
            background: rgba(0,0,0,0.55);
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(2px);
        }
        .disconnect-card {
            background: #fff;
            border-radius: 12px;
            padding: 32px 40px;
            text-align: center;
            box-shadow: 0 8px 32px rgba(0,0,0,0.25);
            max-width: 360px;
        }
        .disconnect-spinner {
            width: 36px;
            height: 36px;
            border: 3px solid #e5e7eb;
            border-top-color: #7c3aed;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto 18px;
        }
        .disconnect-title {
            font-size: 16px;
            font-weight: 600;
            color: #111827;
            margin-bottom: 6px;
        }
        .disconnect-sub {
            font-size: 13px;
            color: #6b7280;
        }

        /* confirm modal */
        .confirm-msg {
            font-size: 14px;
            color: #374151;
            line-height: 1.5;
            margin-top: 4px;
        }

        /* commit detail modal */
        .commit-detail-modal {
            width: 660px;
            max-width: 96vw;
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            padding-bottom: 16px;
        }

        .commit-detail-hdr {
            display: flex;
            align-items: baseline;
            gap: 10px;
            margin-bottom: 4px;
            flex-wrap: wrap;
        }

        .commit-detail-msg {
            font-size: 14px;
            font-weight: 700;
            color: #111827;
            flex: 1;
            min-width: 0;
            word-break: break-word;
        }

        .commit-detail-meta {
            font-size: 11px;
            color: #9ca3af;
            margin-bottom: 14px;
        }

        .commit-detail-list {
            overflow-y: auto;
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding-bottom: 4px;
        }

        .commit-detail-item {
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            overflow: hidden;
        }

        .commit-detail-loc {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            background: #f9fafb;
            border-bottom: 1px solid #f3f4f6;
            font-size: 12px;
            flex-wrap: wrap;
        }

        .cdl-srv {
            font-weight: 700;
            color: #111827;
        }

        .cdl-proj {
            color: #7c3aed;
            font-weight: 600;
        }

        .cdl-br {
            font-family: monospace;
            color: #374151;
            font-size: 11px;
        }

        .cdl-sep {
            color: #d1d5db;
        }

        .commit-detail-footer {
            padding: 12px 0 0;
            border-top: 1px solid #f3f4f6;
            display: flex;
            justify-content: flex-end;
        }

        /* hash cliquable */
        .commit-hash {
            cursor: pointer;
        }

        .commit-hash:hover {
            background: #e5e7eb;
        }

        /* star */
        .star-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 15px;
            color: #d1d5db;
            padding: 0 2px;
            line-height: 1;
            flex-shrink: 0;
            transition: color .1s;
        }

        .star-btn:hover {
            color: #f59e0b;
        }

        .star-btn.fav {
            color: #f59e0b;
        }

        /* favorites sections */
        .fav-sep {
            font-size: 11px;
            font-weight: 700;
            color: #9ca3af;
            text-transform: uppercase;
            letter-spacing: .06em;
            margin-bottom: 14px;
            padding-bottom: 6px;
            border-bottom: 1px solid #f3f4f6;
        }

        .fav-sep + .fav-sep {
            margin-top: 8px;
        }

        /* ── Responsive layout ── */
        .layout {
            display: flex;
            min-height: 100vh;
        }

        .sidebar {
            width: 220px;
            flex-shrink: 0;
            position: fixed;
            top: 0;
            left: 0;
            bottom: 0;
            background: #fff;
            border-right: 1px solid #e5e7eb;
            overflow-y: auto;
            z-index: 40;
            flex-direction: column;
        }

        .sidebar-logo {
            padding: 18px 20px 14px;
            font-size: 13px;
            font-weight: 700;
            color: #111827;
            border-bottom: 1px solid #e5e7eb;
        }

        .sidebar-logo small {
            display: block;
            font-weight: 400;
            font-family: monospace;
            font-size: 10px;
            color: #9ca3af;
            margin-top: 2px;
        }

        .sidebar-nav {
            padding: 6px 0;
            flex: 1;
        }

        .sidebar-tab {
            display: block;
            width: 100%;
            text-align: left;
            padding: 9px 20px;
            border: none;
            background: none;
            font-size: 13px;
            font-weight: 500;
            color: #6b7280;
            cursor: pointer;
            transition: all .1s;
            border-left: 3px solid transparent;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .sidebar-tab:hover {
            background: #f9fafb;
            color: #374151;
        }

        .sidebar-tab.active {
            color: #111827;
            background: #f3f4f6;
            border-left-color: #111827;
            font-weight: 600;
        }

        .sidebar-tab.fav-proj {
            color: #7c3aed;
            font-size: 12px;
        }

        .sidebar-tab.fav-proj.active {
            border-left-color: #7c3aed;
            background: #faf5ff;
        }

        .sidebar-tab.fav-srv {
            color: #374151;
            font-size: 12px;
        }

        .sidebar-tab.fav-srv.active {
            border-left-color: #374151;
        }

        .sidebar-sep {
            height: 1px;
            background: #e5e7eb;
            margin: 6px 14px;
        }

        .sidebar-foot {
            padding: 14px 16px;
            border-top: 1px solid #e5e7eb;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .main-area {
            flex: 1;
            min-width: 0;
        }

        @media (min-width: 1024px) {
            .main-area {
                margin-left: 220px;
            }
        }

        /* sections — colonne unique */
        .sections-grid {
            display: flex;
            flex-direction: column;
        }

        /* sidebar branch submenu */
        .sidebar-proj-row {
            display: flex;
            align-items: stretch;
        }

        .sidebar-proj-row .sidebar-tab {
            flex: 1;
            min-width: 0;
        }

        .sidebar-expand-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
            border-radius: 4px;
            background: none;
            border: none;
            cursor: pointer;
            color: #c4b5fd;
            font-size: 13px;
            font-weight: 600;
            transition: transform .2s cubic-bezier(.4,0,.2,1), background .12s, color .12s;
            flex-shrink: 0;
            margin: auto 8px auto 0;
            line-height: 1;
        }

        .sidebar-expand-btn:hover {
            background: #f3e8ff;
            color: #7c3aed;
        }

        .sidebar-expand-btn.open {
            transform: rotate(90deg);
            color: #7c3aed;
        }

        .sidebar-tab.fav-proj.parent-active {
            background: #faf5ff;
            color: #7c3aed;
            border-left-color: #c4b5fd;
        }

        .sidebar-branches {
            padding: 2px 8px 4px;
            display: flex;
            flex-direction: column;
            gap: 1px;
        }

        .sidebar-branch {
            display: block;
            width: 100%;
            text-align: left;
            padding: 5px 10px 5px 22px;
            border: none;
            border-radius: 6px;
            background: none;
            font-size: 11px;
            color: #9ca3af;
            cursor: pointer;
            font-family: monospace;
            transition: background .1s, color .1s;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .sidebar-branch:hover {
            background: #f3f4f6;
            color: #6b7280;
        }

        .sidebar-branch.active {
            color: #7c3aed;
            background: #ede9fe;
            font-weight: 500;
        }

        /* bouton "Voir les notifications" dans le header */
        .notif-wrap {
            position: relative;
            flex-shrink: 0;
        }

        .notif-view-btn {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 9px 14px;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            background: #fafafa;
            color: #374151;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            white-space: nowrap;
            transition: border-color .15s, background .15s, color .15s;
        }
        .notif-view-btn:hover { border-color: #9ca3af; background: #fff; }
        .notif-view-btn.has-unread { border-color: #3b82f6; color: #2563eb; background: #eff6ff; }

        .notif-count {
            background: #dc2626;
            color: #fff;
            font-size: 9px;
            font-weight: 700;
            min-width: 16px;
            height: 16px;
            border-radius: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
            line-height: 1;
        }

        /* notification panel */
        .notif-panel {
            position: absolute;
            top: calc(100% + 6px);
            right: 0;
            width: 360px;
            max-width: calc(100vw - 24px);
            max-height: 480px;
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            box-shadow: 0 8px 30px rgba(0,0,0,.15);
            z-index: 60;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .notif-panel-hdr {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px 8px;
            border-bottom: 1px solid #f3f4f6;
            font-size: 12px;
            font-weight: 700;
            color: #374151;
            flex-shrink: 0;
        }

        .notif-panel-hdr button {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 11px;
            color: #9ca3af;
            padding: 0;
        }
        .notif-panel-hdr button:hover { color: #374151; }

        .notif-del-all-btn {
            font-size: 11px;
            color: #dc2626;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
        }
        .notif-del-all-btn:hover { color: #b91c1c; }

        .notif-item-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 4px;
            flex-shrink: 0;
        }

        .notif-del-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 13px;
            color: #e5e7eb;
            padding: 0;
            line-height: 1;
            transition: color .1s;
        }
        .notif-del-btn:hover { color: #dc2626; }

        .notif-list {
            overflow-y: auto;
            flex: 1;
        }

        .notif-item {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            padding: 8px 14px;
            border-bottom: 1px solid #f9fafb;
            cursor: default;
        }

        .notif-item.unread {
            background: #f0f9ff;
        }

        .notif-item-body {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            flex: 1;
            min-width: 0;
            cursor: pointer;
            border-radius: 6px;
            padding: 2px 4px;
            margin: -2px -4px;
            transition: background 0.1s;
        }

        .notif-item-body:hover { background: rgba(59,130,246,0.07); }

        .notif-icon {
            font-size: 14px;
            flex-shrink: 0;
            margin-top: 1px;
        }

        .notif-content { flex: 1; min-width: 0; }

        .notif-title {
            font-size: 12px;
            font-weight: 600;
            color: #111827;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .notif-body {
            font-size: 11px;
            color: #6b7280;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-top: 1px;
        }

        .notif-time {
            font-size: 10px;
            color: #d1d5db;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .notif-empty {
            padding: 28px 14px;
            text-align: center;
            font-size: 12px;
            color: #9ca3af;
        }

        /* bouton "Me notifier" sur branches et commits */
        .notif-sub-btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: none;
            border: 1px solid #e5e7eb;
            border-radius: 5px;
            cursor: pointer;
            font-size: 11px;
            font-weight: 500;
            color: #6b7280;
            padding: 2px 8px;
            flex-shrink: 0;
            transition: border-color .15s, color .15s, background .15s;
            white-space: nowrap;
        }
        .notif-sub-btn:hover { border-color: #3b82f6; color: #2563eb; background: #eff6ff; }
        .notif-sub-btn.subscribed { border-color: #3b82f6; color: #2563eb; background: #eff6ff; }