
        /* ===== PROJECT MANAGER ===== */
        .project-manager {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: var(--space-8);
            max-width: 800px;
            margin: var(--space-6) auto;
        }

        .project-manager h2 {
            font-size: 18px;
            margin-bottom: var(--space-2);
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: var(--space-2);
        }

        .project-manager > p {
            color: var(--text-light);
            font-size: 14px;
            margin-bottom: var(--space-5);
        }

        .pm-section {
            margin-bottom: var(--space-6);
        }

        .pm-section h3 {
            font-size: 15px;
            font-weight: 700;
            margin-bottom: var(--space-3);
            display: flex;
            align-items: center;
            gap: var(--space-2);
        }

        .pm-add-row {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .pm-add-row .pm-search-wrapper {
            flex: 1;
            position: relative;
        }
        .pm-add-row .pm-search-input {
            width: 100%;
            padding: 8px 16px;
            border: 1.5px solid var(--border);
            border-radius: 6px;
            font-size: 14px;
            outline: none;
            background: white;
            font-family: inherit;
        }
        .pm-add-row .pm-search-input:focus {
            border-color: var(--primary);
        }
        .pm-search-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            max-height: 220px;
            overflow-y: auto;
            background: white;
            border: 1.5px solid var(--primary);
            border-top: none;
            border-radius: 0 0 6px 6px;
            z-index: 50;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .pm-search-dropdown.open {
            display: block;
        }
        .pm-search-dropdown .pm-dd-item {
            padding: var(--space-2) 16px;
            font-size: 14px;
            cursor: pointer;
            border-bottom: 1px solid var(--border);
        }
        .pm-search-dropdown .pm-dd-item:last-child {
            border-bottom: none;
        }
        .pm-search-dropdown .pm-dd-item:hover,
        .pm-search-dropdown .pm-dd-item.active {
            background: #fff0f5;
            color: var(--accent);
        }
        .pm-search-dropdown .pm-dd-item .pm-dd-id {
            font-size: 11px;
            color: var(--text-light);
        }
        .pm-search-dropdown .pm-dd-empty {
            padding: 8px 16px;
            font-size: 13px;
            color: var(--text-light);
            font-style: italic;
        }

        .pm-selected-list {
            list-style: none;
        }

        .pm-selected-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            padding: var(--space-3) var(--space-4);
            border: 1px solid var(--border);
            border-radius: 8px;
            margin-bottom: var(--space-2);
            background: #fafbfc;
            transition: background var(--transition-base), border-color var(--transition-base);
        }

        .pm-selected-item:hover {
            border-color: var(--primary-light);
            background: #fff0f5;
        }

        .pm-selected-item .pm-proj-info {
            display: flex;
            align-items: center;
            gap: var(--space-3);
            flex: 1;
        }

        .pm-proj-icon {
            width: 36px; height: 36px;
            border-radius: 8px;
            background: var(--deep-koamaru);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 14px;
            flex-shrink: 0;
        }

        .pm-proj-name {
            font-weight: 600;
            font-size: 14px;
        }

        .pm-proj-id {
            font-size: 12px;
            color: var(--text-light);
        }

        .pm-remove-btn {
            background: none;
            border: 1.5px solid var(--danger);
            color: var(--danger);
            padding: 8px var(--space-3);
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: var(--space-1);
            transition: background var(--transition-base), color var(--transition-base);
        }

        .pm-remove-btn:hover {
            background: var(--danger);
            color: white;
        }

        .pm-empty {
            text-align: center;
            padding: var(--space-6);
            color: var(--text-light);
            font-size: 14px;
            background: #fafbfc;
            border-radius: 8px;
            border: 1.5px dashed var(--border);
        }

        .pm-count {
            background: var(--primary);
            color: white;
            padding: 2px var(--space-2);
            border-radius: 12px;
            font-size: 12px;
            font-weight: 700;
        }

        /* ===== STATUS MAPPING CONFIG ===== */
        .mapping-card {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: var(--space-8);
            max-width: 900px;
            margin: var(--space-6) auto;
        }

        .mapping-card h2 {
            font-size: 18px;
            margin-bottom: var(--space-2);
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: var(--space-2);
        }

        .mapping-card > p {
            color: var(--text-light);
            font-size: 14px;
            margin-bottom: var(--space-5);
        }

        .mapping-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        .mapping-table th {
            background: var(--bg);
            padding: 8px var(--space-3);
            text-align: left;
            font-weight: 700;
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-light);
            border-bottom: 2px solid var(--border);
        }

        .mapping-table td {
            padding: 8px var(--space-3);
            border-bottom: 1px solid var(--border);
            vertical-align: middle;
        }

        .mapping-table tr:hover td {
            background: #fff0f5;
        }

        .mapping-table select, .mapping-table input {
            padding: 8px 8px;
            border: 1.5px solid var(--border);
            border-radius: 6px;
            font-size: 13px;
            outline: none;
            background: white;
            width: 100%;
        }

        .mapping-table select:focus, .mapping-table input:focus {
            border-color: var(--primary);
        }

        .mapping-actions {
            display: flex;
            gap: 8px;
            margin-top: var(--space-4);
        }

        .btn-small {
            padding: 8px var(--space-3);
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: var(--space-1);
            transition: background var(--transition-base), color var(--transition-base);
        }

        .btn-danger-small {
            background: none;
            border: 1px solid var(--danger);
            color: var(--danger);
        }

        .btn-danger-small:hover {
            background: var(--danger);
            color: white;
        }

        /* Derived status badges */
        .badge-backlog { background: var(--border); color: #424242; }
        .badge-assigned { background: #e0e0f5; color: var(--primary); }
        .badge-in-progress { background: #ffe0ec; color: var(--accent); }
        .badge-completed { background: #e8f5e9; color: var(--success); }

        /* Key fields display in tables */
        .field-planning {
            font-size: 12px;
            color: var(--text);
            white-space: nowrap;
        }
        .field-taille {
            font-size: 12px;
            font-weight: 600;
            color: var(--primary);
        }

        /* ===== BADGES CONFIG ===== */
        .badges-config-grid { display: flex; flex-direction: column; gap: var(--space-2); }

        .badges-config-category { margin-bottom: var(--space-2); }

        .badges-config-category-label {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-light);
            padding: var(--space-3) 0 8px;
            border-bottom: 1px solid var(--border, #eee);
            margin-bottom: var(--space-2);
        }

        .badge-config-card {
            display: flex;
            flex-direction: column;
            gap: 8px;
            background: var(--bg, var(--bg));
            border: 1px solid var(--border, #eee);
            border-radius: 8px;
            padding: 16px var(--space-4);
            transition: opacity 0.2s;
        }

        .badge-config-card--disabled { opacity: 0.5; }

        .badge-config-header {
            display: flex;
            align-items: center;
            gap: var(--space-3);
        }

        .badge-config-name {
            font-size: 14px;
            font-weight: 700;
            color: var(--text);
        }

        .badge-config-desc {
            font-size: 12px;
            color: var(--text-light);
            margin-top: 2px;
        }

        .badges-config-param {
            display: flex;
            align-items: center;
            gap: 8px;
            padding-left: var(--space-12);
        }

        .badges-config-param label {
            font-size: 12px;
            color: var(--text-light);
            white-space: nowrap;
        }

        .badge-rule-input {
            border: 1px solid var(--border, #ddd);
            border-radius: 6px;
            padding: var(--space-1) var(--space-2);
            font-size: 13px;
            background: var(--card);
            color: var(--text);
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 38px;
            height: 22px;
            flex-shrink: 0;
        }

        .toggle-switch input { opacity: 0; width: 0; height: 0; }

        .toggle-slider {
            position: absolute;
            inset: 0;
            background: #ccc;
            border-radius: 22px;
            cursor: pointer;
            transition: background 0.2s;
        }

        .toggle-slider::before {
            content: '';
            position: absolute;
            width: 16px; height: 16px;
            left: 3px; top: 3px;
            background: white;
            border-radius: 50%;
            transition: transform 0.2s;
        }

        .toggle-switch input:checked + .toggle-slider { background: var(--accent); }
        .toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

        /* ===== CONFIG RÈGLES — SECTION LIST ===== */
        .regles-section-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: var(--space-6);
        }

        .regles-section-row {
            display: grid;
            grid-template-columns: 1fr auto auto auto auto;
            align-items: center;
            gap: var(--space-3);
            padding: 8px 16px;
            background: var(--bg, var(--bg));
            border-radius: 8px;
            border: 1.5px solid var(--border);
        }

        .regles-section-name {
            font-size: 14px;
            font-weight: 600;
            color: var(--text);
        }

        .regles-custom-tag {
            font-size: 10px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .04em;
            color: var(--accent);
            background: rgba(245,10,99,0.08);
            padding: 1px 6px;
            border-radius: 4px;
            margin-left: 8px;
            vertical-align: middle;
        }

        .regles-delete-btn {
            width: 28px;
            height: 28px;
            border: 1.5px solid var(--border);
            background: var(--card);
            border-radius: 5px;
            cursor: pointer;
            font-size: 12px;
            color: var(--text-light);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: border-color 0.15s, color 0.15s;
        }
        .regles-delete-btn:hover {
            border-color: var(--danger);
            color: var(--danger);
        }

        .regles-select {
            width: 100%;
            padding: var(--space-2) 8px;
            border: 1.5px solid var(--border);
            border-radius: 6px;
            font-size: 13px;
            outline: none;
            background: var(--card);
            color: var(--text);
            font-family: inherit;
        }
        .regles-select:focus { border-color: var(--primary); }

        .regles-toggle {
            width: 40px;
            height: 22px;
            border-radius: 11px;
            background: var(--border);
            cursor: pointer;
            position: relative;
            transition: background 0.2s;
            flex-shrink: 0;
        }
        .regles-toggle.on {
            background: var(--accent, var(--accent));
        }
        .regles-toggle-thumb {
            position: absolute;
            top: 3px;
            left: 3px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: white;
            transition: transform 0.2s;
            box-shadow: 0 1px 3px rgba(0,0,0,0.18);
        }
        .regles-toggle.on .regles-toggle-thumb {
            transform: translateX(18px);
        }

        .regles-edit-btn {
            font-size: 12px;
            padding: 4px var(--space-3);
        }

        .regles-move-btns {
            display: flex;
            gap: var(--space-1);
        }
        .regles-move-btn {
            width: 28px;
            height: 28px;
            border: 1.5px solid var(--border);
            background: var(--card);
            border-radius: 5px;
            cursor: pointer;
            font-size: 11px;
            color: var(--text-light);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: border-color 0.15s, color 0.15s;
        }
        .regles-move-btn:hover:not(:disabled) {
            border-color: var(--primary);
            color: var(--primary);
        }
        .regles-move-btn:disabled {
            opacity: 0.3;
            cursor: default;
        }

        /* ===== CONFIG RÈGLES — MODAL ===== */
        #reglesEditModal {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.45);
            z-index: 1100;
            align-items: center;
            justify-content: center;
            padding: var(--space-5);
        }

        .regles-modal-box {
            background: var(--card);
            border-radius: var(--radius);
            box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,53,0.18));
            width: 100%;
            max-width: 560px;
            max-height: 80vh;
            display: flex;
            flex-direction: column;
        }

        .regles-modal-header {
            padding: var(--space-5) var(--space-6) var(--space-4);
            border-bottom: 1.5px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .regles-modal-header h3 {
            font-size: 16px;
            font-weight: 700;
            color: var(--primary);
        }

        .regles-modal-body {
            padding: var(--space-5) var(--space-6);
            overflow-y: auto;
            flex: 1;
        }

        .regles-modal-footer {
            padding: var(--space-4) var(--space-6);
            border-top: 1.5px solid var(--border);
            display: flex;
            gap: 8px;
            justify-content: flex-end;
        }

        .regles-modal-list-group {}
        .regles-modal-list-label {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .07em;
            color: var(--text-light);
            margin-bottom: var(--space-2);
        }

        .regles-item-block {
            display: flex;
            align-items: flex-start;
            gap: var(--space-2);
            margin-bottom: var(--space-2);
        }
        .regles-item-fields {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }
        .regles-item-input,
        .regles-item-title,
        .regles-item-q {
            width: 100%;
            padding: var(--space-2) 8px;
            border: 1.5px solid var(--border);
            border-radius: 6px;
            font-size: 13px;
            outline: none;
        }
        .regles-item-input:focus,
        .regles-item-title:focus,
        .regles-item-q:focus {
            border-color: var(--primary);
        }
        .regles-item-text,
        .regles-item-r,
        .regles-textarea {
            width: 100%;
            padding: var(--space-2) 8px;
            border: 1.5px solid var(--border);
            border-radius: 6px;
            font-size: 13px;
            outline: none;
            resize: vertical;
            font-family: inherit;
        }
        .regles-item-text:focus,
        .regles-item-r:focus,
        .regles-textarea:focus {
            border-color: var(--primary);
        }
        .regles-remove-item {
            background: none;
            border: none;
            cursor: pointer;
            color: var(--text-light);
            font-size: 14px;
            padding: 8px;
            line-height: 1;
            flex-shrink: 0;
            margin-top: var(--space-1);
        }
        .regles-remove-item:hover { color: var(--danger, var(--danger)); }

        .regles-add-btn {
            background: none;
            border: 1.5px dashed var(--border);
            border-radius: 6px;
            color: var(--text-light);
            font-size: 13px;
            padding: 8px 16px;
            cursor: pointer;
            width: 100%;
            text-align: left;
            transition: border-color 0.15s, color 0.15s;
        }
        .regles-add-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
        }