        .menu-section-label {
            font-size: 9px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1.2px;
            color: var(--gray-300);
            padding: 14px 18px 5px;
        }

        /* Back to hub */
        .sidebar-home {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            margin: 8px 12px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 11px;
            font-weight: 600;
            color: var(--nge-primary);
            background: rgba(0,44,119,0.06);
            border: none;
            text-decoration: none;
            transition: all 0.15s ease;
            font-family: inherit;
        }
        .sidebar-home:hover {
            background: rgba(0,44,119,0.1);
            color: #001a4d;
        }
        .sidebar-home svg { flex-shrink: 0; }

        .menu-item-icon {
            margin-right: 12px;
            width: 20px;
            height: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .menu-item-icon svg {
            stroke: currentColor;
        }

        .menu-badge {
            margin-left: auto;
            font-size: 10px;
            font-weight: 700;
            min-width: 18px;
            height: 18px;
            line-height: 18px;
            text-align: center;
            border-radius: 9px;
            padding: 0 5px;
            flex-shrink: 0;
        }

        .menu-badge-danger {
            background: #ef4444;
            color: #fff;
        }

        .menu-footer {
            padding: 12px 18px;
            border-top: 1px solid rgba(0,44,119,0.1);
            background: var(--white);
            flex-shrink: 0;
        }

        .menu-footer .user-info {
            text-align: center;
            font-size: 11px;
            color: rgba(0,44,119,0.5);
            line-height: 1.4;
        }

        .menu-footer .user-info strong {
            color: var(--nge-primary);
            font-size: 12px;
            font-weight: 600;
        }

        .menu-footer .menu-logout {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            width: 100%;
            margin-top: 10px;
            padding: 6px 12px;
            background: none;
            border: 1px solid var(--gray-300);
            border-radius: 6px;
            font-size: 11px;
            font-weight: 500;
            cursor: pointer;
            color: var(--gray-500);
            transition: all 0.2s ease;
        }

        .menu-footer .menu-logout:hover {
            border-color: var(--red-500);
            color: var(--red-500);
            background: rgba(239, 68, 68, 0.05);
        }

        .menu-footer .menu-logout svg {
            stroke: currentColor;
        }

        .menu-version {
            font-size: 10px;
            color: var(--gray-400);
            letter-spacing: 0.5px;
        }

        .menu-logo img {
            max-width: 80px;
            opacity: 0.5;
            transition: opacity 0.2s;
        }

        .menu-logo img:hover {
            opacity: 0.8;
        }

        .sidebar-footer-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 8px;
        }
        .sidebar-footer-brand {
            font-weight: 800;
            font-size: 14px;
            letter-spacing: -0.3px;
            cursor: pointer;
            text-decoration: none;
            transition: opacity 0.15s ease;
        }
        .sidebar-footer-brand:hover { opacity: 0.7; }
        .sidebar-footer-brand .fb1 { color: #002C77; }
        .sidebar-footer-brand .fb2 { color: #f6be00; }

        .refresh-btn {
            width: 100%;
            padding: 6px 14px;
            background: var(--nge-secondary);
            color: var(--nge-primary);
            border: none;
            border-radius: 4px;
            font-weight: 700;
            font-size: 12px;
            cursor: pointer;
            transition: var(--transition);
            margin-bottom: 12px;
            font-family: inherit;
        }

        .refresh-btn:hover {
            background: #d4a200;
        }

        .user-info {
            text-align: center;
            font-size: 12px;
            color: var(--gray-600);
        }

        .user-info strong {
            color: var(--nge-primary);
        }

        /* ===== TIMELINE ===== */
        .timeline-container {
            background: var(--white);
            border-bottom: 2px solid var(--nge-secondary);
            padding: 6px 20px 4px;
            display: none;
            z-index: 40;
            flex-shrink: 0;
        }

        .timeline-header {
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin-bottom: 0;
        }

        .timeline-info {
            flex: 1;
        }

        .timeline-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--gray-900);
        }

        /* sous-titre + meta sur une même ligne pour gagner de la hauteur */
        .timeline-subtitle {
            font-size: 12px;
            color: var(--gray-500);
            margin-top: 1px;
            display: inline-block;
            margin-right: 12px;
        }

        .timeline-meta {
            font-size: 12px;
            color: var(--gray-400);
            margin-top: 0;
            display: inline-block;
        }

        /* ===== VUE SYNTHÈSE (lecture seule, toutes phases sur un écran) ===== */
        .syn-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
            gap: 12px;
        }
        .syn-card {
            border: 1px solid var(--gray-200);
            border-radius: 8px;
            background: var(--white);
            overflow: hidden;
        }
        .syn-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 12px;
            background: var(--gray-50);
            border-bottom: 1px solid var(--gray-200);
        }
        .syn-title { font-size: 13px; font-weight: 700; color: var(--nge-primary); }
        .syn-edit {
            border: none; background: none; color: var(--nge-secondary);
            font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px;
        }
        .syn-edit:hover { text-decoration: underline; }
        .syn-body { padding: 6px 12px 10px; }
        .syn-row {
            display: flex; justify-content: space-between; gap: 10px;
            padding: 4px 0; border-bottom: 1px dashed var(--gray-100); font-size: 12px;
        }
        .syn-row:last-child { border-bottom: none; }
        .syn-k { color: var(--gray-500); flex-shrink: 0; }
        .syn-v { color: var(--gray-900); font-weight: 500; text-align: right; word-break: break-word; }
        .syn-empty { color: var(--gray-400); font-size: 12px; font-style: italic; padding: 4px 0; }
        .syn-badge { background: rgba(34,197,94,0.15); color: #16a34a; padding: 1px 7px; border-radius: 10px; font-size: 10px; font-weight: 600; }
        /* Bandeau cliquable → retour à la synthèse */
        .bandeau-v2-clickable { cursor: pointer; border-radius: 6px; transition: background 0.12s; }
        .bandeau-v2-clickable:hover { background: var(--gray-50); }
        /* Indicateur de phase actuelle + barre d'avancement (remplace le stepper) */
        .phase-actuelle { display: flex; flex-direction: column; gap: 4px; min-width: 170px; }
        .phase-actuelle-head { display: flex; align-items: center; gap: 8px; }
        .phase-actuelle-badge { color: #fff; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 12px; white-space: nowrap; }
        .phase-actuelle-sousetat { font-size: 11px; color: var(--gray-500); white-space: nowrap; }
        .phase-progress { height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
        .phase-progress-bar { height: 100%; border-radius: 3px; transition: width 0.3s; }
        .phase-progress-label { font-size: 10px; color: var(--gray-400); }

        .timeline-actions {
            display: none;
        }

        .bandeau-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 8px;
        }

        .bandeau-actions-left {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .bandeau-actions .action-tile,
        .bandeau-actions-left .action-tile {
            flex-direction: row;
            padding: 4px 10px;
            min-width: auto;
            font-size: 11px;
            gap: 4px;
        }

        .bandeau-actions .action-tile .tile-icon {
            font-size: 13px;
        }

        .bandeau-actions .action-tile .tile-label {
            font-size: 11px;
        }

        .action-tile {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 6px 14px;
            border-radius: var(--radius);
            cursor: pointer;
            transition: var(--transition);
            border: 1px solid var(--gray-200);
            background: var(--white);
            box-shadow: var(--shadow-sm);
            min-width: 56px;
            gap: 2px;
        }

        .action-tile:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .action-tile .tile-icon {
            font-size: 14px;
        }

        .action-tile .tile-label {
            font-size: 9px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .action-tile.edit {
            color: var(--nge-primary);
            border-color: var(--nge-primary-light);
        }

        .action-tile.edit:hover {
            background: var(--nge-primary-light);
        }

        .action-tile.save {
            background: var(--nge-primary);
            color: var(--white);
            border-color: var(--nge-primary);
        }

        .action-tile.save:hover {
            background: var(--nge-primary-dark);
        }

        .action-tile.cancel {
            color: var(--orange-500);
            border-color: rgba(249, 115, 22, 0.2);
        }

        .action-tile.cancel:hover {
            background: rgba(249, 115, 22, 0.1);
        }

        .action-tile.delete {
            color: var(--red-500);
            border-color: rgba(239, 68, 68, 0.2);
        }

        .action-tile.delete:hover {
            background: rgba(239, 68, 68, 0.1);
        }

        /* ===== ONGLETS FICHE ===== */
        .timeline-tabs-row {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 2px 0 4px;
        }

        .phase-item {
            cursor: pointer;
        }

        .phase-card {
            background: var(--white);
            border: 1.5px solid var(--gray-200);
            border-radius: 6px;
            padding: 5px 14px;
            text-align: center;
            transition: all 0.15s;
            color: rgba(0,44,119,0.5);
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.4px;
            cursor: pointer;
            font-family: 'IBM Plex Sans', 'Century Gothic', sans-serif;
        }

        .phase-card:hover:not(.disabled) {
            border-color: var(--nge-fond);
            color: var(--nge-fond);
        }

        .phase-card.active {
            background: var(--nge-primary);
            color: var(--white);
            border-color: var(--nge-primary);
            box-shadow: 0 2px 8px rgba(0,44,119,0.25);
        }

        .phase-card.disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        /* ===== BANDEAU V2 LAYOUT ===== */
        .bandeau-v2 {
            width: 100%;
            background: var(--white);
            border: 1px solid var(--gray-200);
            border-radius: 10px;
            padding: 8px 20px;
            box-shadow: 0 1px 4px rgba(0,0,0,0.06);
            display: flex;
            align-items: center;
            gap: 24px;
        }

        .bandeau-v2-left {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .bandeau-v2-right {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .bandeau-v2-title {
            font-size: 17px;
            font-weight: 700;
            color: var(--gray-900);
            line-height: 1.2;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .bandeau-v2-num { color: var(--gray-900); }
        .bandeau-v2-sep { color: var(--gray-300); margin: 0 4px; }
        .bandeau-v2-intitule { color: var(--gray-700); }

        .bandeau-v2-subtitle {
            display: flex;
            align-items: center;
            gap: 16px;
            font-size: 11px;
            color: var(--gray-500);
            line-height: 1.2;
        }

        .bandeau-v2-meta {
            font-size: 12px;
            color: var(--gray-400);
        }

        /* Row2 legacy — plus utilisé mais conservé */
        .bandeau-v2-row2 {
            display: none;
            align-items: center;
            gap: 24px;
            margin-top: 6px;
            padding-top: 6px;
            border-top: 1px solid var(--gray-100);
        }

        /* Onglets permanents (gauche) */
        .bandeau-v2-tabs-permanent {
            display: flex;
            align-items: center;
            gap: 6px;
            flex-shrink: 0;
        }

        .tab-permanent {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 6px 14px;
            min-width: 130px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            color: var(--gray-500);
            background: var(--gray-50);
            border: 1.5px solid var(--gray-200);
            cursor: pointer;
            transition: all 0.15s;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            font-family: 'IBM Plex Sans', 'Century Gothic', sans-serif;
        }

        .tab-permanent:hover {
            border-color: var(--nge-fond);
            color: var(--nge-fond);
            background: rgba(0,44,119,0.04);
        }

        .tab-permanent-active {
            background: var(--nge-primary) !important;
            color: var(--white) !important;
            border-color: var(--nge-primary) !important;
            box-shadow: 0 3px 10px rgba(0,44,119,0.35);
            transform: translateY(-1px);
            border-bottom: 3px solid var(--nge-primary) !important;
        }

        .tab-permanent-active:hover {
            background: var(--nge-primary) !important;
            color: var(--white) !important;
            border-color: var(--nge-primary) !important;
        }

        .tab-permanent-icon {
            font-size: 13px;
        }

        /* Stepper temporel */
        .bandeau-v2-stepper {
            display: flex;
            align-items: center;
            gap: 0;
            flex-shrink: 0;
        }

        .stepper-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            min-width: 70px;
        }

        .stepper-dot {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 17px;
            font-weight: 700;
            color: #fff;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .stepper-dot-active {
            box-shadow: 0 2px 10px rgba(0,0,0,0.25);
            transform: scale(1.15);
        }

        .stepper-dot-done {
            font-size: 13px;
        }

        .stepper-dot-future {
            opacity: 0.4;
        }

        .stepper-label {
            font-size: 12px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            white-space: nowrap;
        }

        .stepper-sous-etat {
            font-size: 10px;
            font-weight: 500;
            white-space: nowrap;
        }

        .stepper-line {
            height: 3px;
            flex: 1;
            min-width: 30px;
            max-width: 80px;
            border-radius: 2px;
            margin: 0 4px;
            align-self: center;
            margin-bottom: 30px;
            transition: background 0.2s;
        }

        /* Legacy carousel (masqué) */
        .carousel-phases { display: none; }

        /* Legacy bandeau (masqué) */
        .bandeau-layout { display: none; }

        /* ===== CONTENT AREA ===== */
        .content-area {
            flex: 1;
            padding: 16px;
            position: relative;
            overflow-y: auto;
            overflow-x: hidden;
            min-width: 0;
        }

        .screen {
            display: none;
        }

        .screen.active {
            display: block;
            animation: fadeIn 0.3s ease-out;
        }
        #carteScreen.active {
            display: flex !important;
            flex-direction: column;
            height: calc(100vh - 100px);
            overflow: hidden;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ===== CARDS ===== */
        .card {
            background: var(--white);
            border-radius: var(--radius-lg);
            border: 1px solid var(--gray-200);
            margin-bottom: 14px;
            overflow: hidden;
        }

        .card-header {
            padding: 10px 16px;
            border-bottom: 1px solid var(--gray-200);
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: rgba(0,44,119,0.025);
        }

        .card-title {
            font-size: 12px;
            font-weight: 700;
            color: var(--nge-primary);
        }

        .card-content {
            padding: 14px 16px;
        }

        /* ===== BUTTONS ===== */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 7px 14px;
            border-radius: 4px;
            font-weight: 500;
            font-size: 12px;
            transition: var(--transition);
            cursor: pointer;
            border: none;
            text-decoration: none;
            font-family: inherit;
        }

        .btn-primary {
            background: var(--nge-primary);
            color: var(--white);
        }

        .btn-primary:hover {
            background: #003494;
        }

        .btn-secondary {
            background: transparent;
            color: var(--gray-500);
            border: 1px solid var(--gray-200);
        }

        .btn-secondary:hover {
            background: var(--gray-100);
        }

        .btn-accent {
            background: var(--nge-secondary);
            color: var(--nge-primary);
            font-weight: 700;
        }

        .btn-accent:hover {
            background: #d4a200;
        }

        .btn-sm {
            padding: 4px 10px;
            font-size: 11px;
        }

        .btn-lg {
            padding: 10px 20px;
            font-size: 14px;
        }

        /* ===== FORMS ===== */
        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .form-label {
            font-size: 10px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            color: var(--gray-400);
        }

        .form-control {
            padding: 7px 10px;
            border: 1px solid var(--gray-200);
            border-radius: 4px;
            font-size: 12px;
            transition: var(--transition);
            background: var(--gray-100);
            color: var(--gray-800);
            font-family: inherit;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--nge-fond);
            background: var(--white);
            box-shadow: none;
        }

        .form-control:disabled {
            background: var(--gray-100);
            color: var(--gray-800);
            cursor: default;
            border-color: var(--gray-200);
        }

        select.form-control:disabled {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            background-image: none;
            cursor: default;
            -webkit-text-fill-color: var(--gray-800);
            opacity: 1;
        }

        /* Mode édition : champs actifs bordure bleue NGE */
        .form-control:not(:disabled) {
            border-color: var(--nge-fond);
            background: var(--white);
        }

        /* ===== FILTERS ===== */
        .filters {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            align-items: end;
            background: var(--white);
            padding: 10px 16px;
            border-radius: var(--radius-lg);
            margin-bottom: 14px;
            border: 1px solid var(--gray-200);
        }

        .filter-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 120px;
        }

        .filter-label {
            font-size: 12px;
            font-weight: 500;
            color: var(--gray-600);
        }

        .filter-control {
            padding: 8px 12px;
            border: 1px solid var(--gray-300);
            border-radius: var(--radius);
            font-size: 13px;
            background: var(--white);
        }

        .search-input {
            min-width: 200px;
        }

        /* ===== TABLES ===== */
        .table-container {
            overflow-x: auto;
            border-radius: var(--radius-lg);
            border: 1px solid var(--gray-200);
            max-height: 600px;
            overflow-y: auto;
        }

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

        .table th {
            background: var(--gray-100);
            padding: 8px 12px;
            text-align: left;
            font-weight: 600;
            font-size: 9px;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--gray-400);
            border-bottom: 2px solid var(--gray-200);
            position: sticky;
            top: 0;
            z-index: 10;
            white-space: nowrap;
        }

        .table th.sortable {
            cursor: pointer;
            user-select: none;
        }

        .table th.sortable:hover {
            background: var(--gray-200);
            color: var(--nge-primary);
        }

        .sort-icon {
            font-size: 10px;
            color: var(--gray-300);
            margin-left: 4px;
        }

        .table td {
            padding: 10px 12px;
            border-bottom: 1px solid var(--gray-200);
            color: var(--gray-800);
            vertical-align: middle;
            font-size: 12px;
        }

        .table td:first-child {
            color: var(--nge-primary);
        }

        .table tbody tr {
            transition: var(--transition);
            cursor: pointer;
        }

        .table tbody tr:hover {
            background: rgba(0,44,119,0.03);
        }

        .table tbody tr:last-child td {
            border-bottom: none;
        }

        .table tbody tr.selected {
            background: rgba(246,190,0,0.08);
        }

        /* ===== CRM ===== */
        .crm-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 20px;
            border-bottom: 2px solid var(--gray-200);
        }

        .crm-tab {
            padding: 10px 24px;
            background: transparent;
            color: var(--gray-500);
            border: none;
            border-bottom: 2px solid transparent;
            margin-bottom: -2px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            transition: var(--transition);
        }

        .crm-tab:hover {
            color: var(--nge-primary);
        }

        .crm-tab.active {
            color: var(--nge-primary);
            border-bottom-color: var(--nge-primary);
        }

        .badge-type {
            display: inline-block;
            padding: 2px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 600;
            white-space: nowrap;
        }

        .crm-filters {
            display: flex;
            gap: 12px;
            align-items: center;
            margin-bottom: 16px;
            flex-wrap: wrap;
        }

        .crm-filters input,
        .crm-filters select {
            padding: 8px 12px;
            border: 1px solid var(--gray-300);
            border-radius: var(--radius);
            font-size: 13px;
        }

        .crm-filters input {
            flex: 1;
            max-width: 300px;
        }

        /* CRM Pagination */
        .crm-pagination {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            margin-top: 8px;
            border-top: 1px solid var(--gray-200);
        }

        .crm-pagination-info {
            font-size: 13px;
            color: var(--gray-500);
        }

        .crm-pagination-btns {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .crm-pagination-page {
            font-size: 13px;
            color: var(--gray-600);
            font-weight: 500;
        }

        /* CRM Autocomplete */
        .crm-autocomplete {
            position: relative;
        }

        .crm-autocomplete-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid var(--gray-300);
            border-radius: var(--radius);
            max-height: 200px;
            overflow-y: auto;
            z-index: 1200;
            display: none;
            box-shadow: var(--shadow-md);
        }

        .crm-autocomplete-results.visible {
            display: block;
        }

        .crm-autocomplete-item {
            padding: 8px 12px;
            cursor: pointer;
            font-size: 13px;
            border-bottom: 1px solid var(--gray-100);
        }

        .crm-autocomplete-item:hover {
            background: var(--gray-50);
        }

        .crm-autocomplete-item:last-child {
            border-bottom: none;
        }

        /* ===== STATUS BADGES ===== */
        .status {
            display: inline-flex;
            align-items: center;
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .status-active {
            background: rgba(34, 197, 94, 0.1);
            color: var(--green-500);
        }

        .status-pending {
            background: rgba(249, 115, 22, 0.1);
            color: var(--orange-500);
        }

        .status-completed {
            background: var(--nge-primary-light);
            color: var(--nge-primary);
        }

        /* ===== DASHBOARD SPECIFIC ===== */
        .dashboard-filters {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 10px;
            margin-bottom: 14px;
            padding: 14px 16px;
            background: var(--white);
            border-radius: var(--radius-lg);
            border: 1px solid var(--gray-200);
        }

        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 16px;
            margin-bottom: 24px;
        }

        .stat-card {
            background: var(--white);
            padding: 14px 16px;
            border-radius: var(--radius-lg);
            border: 1px solid var(--gray-200);
            border-top: 3px solid var(--nge-primary);
            text-align: center;
            transition: var(--transition);
            cursor: pointer;
            position: relative;
        }

        .stat-card:hover {
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

        .stat-card-active {
            border-color: var(--nge-primary);
            border-top-color: var(--nge-secondary);
            box-shadow: var(--shadow-md);
            transform: translateY(-1px);
            background: rgba(246,190,0,0.06);
        }

        .stat-link {
            display: block;
            margin-top: 8px;
            font-size: 11px;
            color: var(--nge-primary);
            text-decoration: none;
            cursor: pointer;
            font-weight: 500;
            opacity: 0;
            transition: opacity 0.2s ease;
        }

        .stat-card:hover .stat-link,
        .stat-card-active .stat-link {
            opacity: 1;
        }

        .stat-link:hover {
            text-decoration: underline;
        }

        .stat-number {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 26px;
            font-weight: 700;
            color: var(--nge-primary);
            margin-bottom: 4px;
            line-height: 1;
        }

        .stat-label {
            font-size: 9px;
            color: var(--gray-400);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .chart-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }

        .chart-container {
            background: var(--white);
            padding: 14px 16px;
            border-radius: var(--radius-lg);
            border: 1px solid var(--gray-200);
        }

        .chart-title {
            font-size: 11px;
            font-weight: 700;
            color: var(--nge-primary);
            margin-bottom: 12px;
            text-align: center;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .chart-container canvas {
            max-height: 250px !important;
        }

        /* ===== LOADING ===== */
        .loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 60px;
            color: var(--gray-500);
        }

        .spinner {
            width: 28px;
            height: 28px;
            border: 3px solid var(--gray-200);
            border-top: 3px solid var(--nge-fond);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 12px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* ===== SECTION TITLES ===== */
        .section-title {
            font-size: 13px;
            font-weight: 700;
            color: var(--nge-primary);
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--nge-secondary);
            display: flex;
            align-items: center;
            gap: 8px;
            font-family: 'IBM Plex Sans', 'Century Gothic', sans-serif;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .section-title::before {
            content: '■';
            color: var(--nge-secondary);
            font-size: 14px;
        }

        /* ===== SECTION TITLE ROW (titre + crayon) ===== */
        .section-title-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .section-title-row .section-title {
            flex: 1;
        }

        .section-edit-btn {
            background: none;
            border: 1px solid var(--gray-200);
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            padding: 3px 7px;
            color: var(--gray-400);
            transition: var(--transition);
            margin-bottom: 10px;
        }

        .section-edit-btn:hover {
            background: rgba(246,190,0,0.12);
            border-color: var(--nge-secondary);
            color: var(--nge-primary);
        }

        /* Tuile de section */
        .section-tile {
            background: var(--white);
            border: 1px solid var(--gray-200);
            border-radius: var(--radius-lg);
            padding: 14px 16px;
            margin-bottom: 10px;
        }

        /* ===== UTILITY ===== */
        .hidden { display: none !important; }
        .text-center { text-align: center; }
        .mb-4 { margin-bottom: 16px; }
        .mt-4 { margin-top: 16px; }

        /* ===== MODAL STYLES ===== */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 20, 60, 0.45);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            backdrop-filter: blur(2px);
        }

        /* GPS modal doit apparaître au-dessus des modales de section */
        #gpsModal.modal-overlay,
        #carteViewOverlay.modal-overlay {
            z-index: 1100;
        }

        .modal-content {
            background: var(--white);
            border-radius: var(--radius-lg);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
            max-width: 900px;
            width: 92vw;
            max-height: 92vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .modal-header {
            padding: 14px 18px;
            background: var(--nge-primary);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h3 {
            font-size: 13px;
            font-weight: 600;
            color: var(--white);
            margin: 0;
        }

        .modal-header h3.section-title {
            color: var(--white);
            border-bottom: none;
            padding-bottom: 0;
            font-size: 13px;
        }

        .modal-header h3.section-title::before {
            color: var(--nge-secondary);
        }

        .btn-close {
            background: none;
            border: none;
            font-size: 18px;
            cursor: pointer;
            color: rgba(255,255,255,0.7);
            padding: 2px 6px;
            border-radius: 4px;
            transition: var(--transition);
            line-height: 1;
        }

        .btn-close:hover {
            color: var(--white);
            background: rgba(255,255,255,0.2);
        }

        .modal-body {
            padding: 18px;
            flex: 1;
            overflow-y: auto;
        }

        .modal-footer {
            padding: 12px 18px;
            border-top: 1px solid var(--gray-200);
            display: flex;
            justify-content: flex-end;
            gap: 8px;
        }

        .gps-search {
            display: flex;
            gap: 12px;
            margin-bottom: 16px;
            align-items: center;
        }

        .gps-search input {
            flex: 1;
        }

        .gps-info {
            margin-top: 16px;
        }

        /* ===== TECHNIQUE TAGS ===== */
        .technique-tag {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 10px;
            background: var(--nge-primary);
            color: var(--white);
            border-radius: 16px;
            font-size: 12px;
            font-weight: 500;
        }

        .technique-tag-remove {
            background: none;
            border: none;
            color: var(--white);
            cursor: pointer;
            padding: 0;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            transition: var(--transition);
        }

        .technique-tag-remove:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        #techniquesContainer {
            min-height: 44px;
            transition: var(--transition);
        }

        #techniquesContainer:focus-within {
            border-color: var(--nge-primary);
            box-shadow: 0 0 0 3px var(--nge-primary-light);
        }

        /* Icons */
        .icon-excel::before { content: "📊"; }
        .icon-list::before { content: "📋"; }
        .icon-detail::before { content: "📄"; }
        .icon-dashboard::before { content: "📈"; }
        .icon-edit::before { content: "✏️"; }
        .icon-save::before { content: "💾"; }
        .icon-cancel::before { content: "❌"; }
        .icon-refresh::before { content: "🔄"; }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 768px) {
            .form-grid {
                grid-template-columns: 1fr;
            }
            
            .filters, .dashboard-filters {
                grid-template-columns: 1fr;
            }
            
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .chart-grid {
                grid-template-columns: 1fr;
            }
        }

        /* ===== CRM STYLES ===== */
        .crm-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 24px;
            background: var(--white);
            border-radius: var(--radius-lg);
            padding: 4px;
            box-shadow: var(--shadow-sm);
        }

        .crm-tab {
            flex: 1;
            padding: 12px 20px;
            background: transparent;
            border: none;
            border-radius: var(--radius);
            cursor: pointer;
            font-weight: 500;
            font-size: 14px;
            color: var(--gray-600);
            transition: var(--transition);
            text-align: center;
        }

        .crm-tab:hover:not(.active) {
            background: var(--gray-100);
            color: var(--gray-700);
        }

        .crm-tab.active {
            background: var(--nge-primary);
            color: var(--white);
            box-shadow: var(--shadow-sm);
        }

        /* Screen header */
        .screen-header {
            margin-bottom: 14px;
            text-align: center;
        }

        .screen-header h2 {
            font-size: 18px;
            color: var(--nge-primary);
            margin-bottom: 4px;
            font-weight: 700;
        }

        .screen-header p {
            color: var(--gray-400);
            font-size: 12px;
        }

        /* Subsections */
        .subsection-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--nge-primary);
            margin-bottom: 16px;
            margin-top: 30px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--nge-primary-light);
        }

        .subsection-title:first-child {
            margin-top: 0;
        }

        /* ===== GO/NOGO SLIDERS ===== */
        .gonogo-slider {
            -webkit-appearance: none;
            appearance: none;
            height: 6px;
            border-radius: 3px;
            background: var(--gray-200);
            outline: none;
            transition: accent-color 0.2s;
            accent-color: #94a3b8;
            padding: 0;
            border: none;
        }

        .gonogo-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: currentColor;
            cursor: pointer;
            border: 2px solid white;
            box-shadow: 0 1px 4px rgba(0,0,0,0.2);
        }

        .gonogo-slider::-moz-range-thumb {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: currentColor;
            cursor: pointer;
            border: 2px solid white;
            box-shadow: 0 1px 4px rgba(0,0,0,0.2);
        }

        .gonogo-slider:disabled {
            opacity: 0.7;
            cursor: default;
        }

        .gonogo-slider:disabled::-webkit-slider-thumb {
            cursor: default;
        }

        .gonogo-slider:disabled::-moz-range-thumb {
            cursor: default;
        }

        /* ===== WIZARD STEPS (Intervenant) ===== */
        .wizard-steps {
            display: flex;
            gap: 4px;
            margin-bottom: 16px;
            border-bottom: 2px solid var(--gray-200);
            padding-bottom: 12px;
        }

        .wizard-step {
            flex: 1;
            text-align: center;
            padding: 8px 4px;
            font-size: 13px;
            font-weight: 500;
            color: var(--gray-400);
            border-radius: var(--radius) var(--radius) 0 0;
            background: var(--gray-50);
            transition: var(--transition);
        }

        .wizard-step.active {
            color: var(--nge-primary);
            background: var(--nge-primary-light);
            font-weight: 600;
            border-bottom: 2px solid var(--nge-primary);
            margin-bottom: -2px;
        }

        .wizard-step.done {
            color: var(--green-500);
            background: rgba(34, 197, 94, 0.08);
        }

        /* ===== KANBAN ===== */
        .kanban-filters {
            display: flex;
            gap: 16px;
            padding: 16px 24px;
            background: var(--white);
            border-bottom: 1px solid var(--gray-200);
            flex-wrap: wrap;
            align-items: flex-end;
        }

        .kanban-filters .filter-group {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .kanban-filters .filter-label {
            font-size: 11px;
            font-weight: 600;
            color: var(--gray-500);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .kanban-filters .filter-control {
            padding: 6px 10px;
            border: 1px solid var(--gray-200);
            border-radius: var(--radius);
            font-size: 13px;
            min-width: 160px;
        }

        .kanban-phase-checks {
            display: flex;
            gap: 12px;
            align-items: center;
        }
        .kanban-phase-check {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
        }
        .kanban-phase-check input { cursor: pointer; }

        .kanban-container {
            display: flex;
            gap: 12px;
            padding: 16px;
            height: calc(100vh - 140px);
            overflow: hidden;
        }

        .kanban-column {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: var(--gray-100);
            border-radius: var(--radius-lg);
            overflow: hidden;
            min-width: 0;
            transition: background 0.2s;
        }

        .kanban-column.drag-over {
            background: var(--gray-200);
            outline: 2px dashed var(--gray-400);
            outline-offset: -2px;
        }

        .kanban-column-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 16px;
            color: var(--white);
            font-weight: 700;
            font-size: 13px;
            letter-spacing: 0.05em;
            flex-shrink: 0;
        }

        .kanban-count {
            background: rgba(255,255,255,0.25);
            padding: 2px 10px;
            border-radius: 12px;
            font-size: 12px;
        }

        .kanban-cards {
            flex: 1;
            overflow-y: auto;
            padding: 8px;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .kanban-empty {
            text-align: center;
            color: var(--gray-400);
            padding: 32px 16px;
            font-size: 13px;
        }

        .kanban-card {
            background: var(--white);
            border-radius: var(--radius);
            padding: 10px 12px;
            border-left: 4px solid var(--gray-300);
            box-shadow: var(--shadow-sm);
            cursor: grab;
            transition: box-shadow 0.15s, transform 0.15s, opacity 0.15s;
        }

        .kanban-card:hover {
            box-shadow: var(--shadow-md);
            transform: translateY(-1px);
        }

        .kanban-card:active {
            cursor: grabbing;
        }

        .kanban-card.dragging {
            opacity: 0.4;
            transform: rotate(2deg);
        }

        .kanban-card-num {
            font-size: 11px;
            font-weight: 700;
            color: var(--nge-primary);
            margin-bottom: 2px;
        }

        .kanban-card-title {
            font-size: 13px;
            font-weight: 500;
            color: var(--gray-800);
            line-height: 1.3;
            margin-bottom: 4px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .kanban-card-meta {
            font-size: 11px;
            color: var(--gray-500);
            margin-bottom: 6px;
        }

        .kanban-card-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 8px;
        }

        .kanban-card-dir {
            font-size: 10px;
            color: var(--gray-400);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .kanban-etat {
            font-size: 10px;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 10px;
            white-space: nowrap;
        }

        .kanban-etat-encours {
            background: rgba(34,197,94,0.12);
            color: #16a34a;
        }

        .kanban-etat-veille {
            background: rgba(249,115,22,0.12);
            color: #ea580c;
        }

        .kanban-etat-archive {
            background: var(--gray-100);
            color: var(--gray-500);
        }

        .kanban-gng {
            font-size: 10px;
            font-weight: 700;
            padding: 2px 6px;
            border-radius: 10px;
            white-space: nowrap;
        }
        .kanban-gng-go { background: rgba(34,197,94,0.15); color: #16a34a; }
        .kanban-gng-gocond { background: rgba(249,115,22,0.15); color: #ea580c; }
        .kanban-gng-nogo { background: rgba(239,68,68,0.15); color: #dc2626; }
        .kanban-gng-reporter { background: rgba(139,92,246,0.15); color: #7c3aed; }
        .kanban-gng-none { background: var(--gray-100); color: var(--gray-400); font-size: 10px; }

        /* ===== BARRE SOUS-ETAT ===== */
        .sous-etat-bar {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            margin-top: 4px;
        }
        .sous-etat-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 14px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            transition: box-shadow 0.2s;
        }
        .sous-etat-bar:hover .sous-etat-badge {
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        }
        .sous-etat-icon { font-size: 14px; }
        .sous-etat-chevron { font-size: 12px; opacity: 0.6; margin-left: 2px; }
        .sous-etat-hint {
            font-size: 11px;
            color: var(--gray-400);
            font-style: italic;
        }

        /* ===== BOUTON AVANCEMENT ===== */
        .avancement-btn {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 16px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: box-shadow 0.2s, opacity 0.15s;
            white-space: nowrap;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            border: none;
            flex-shrink: 0;
        }
        .avancement-btn:hover {
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
            opacity: 0.9;
        }
        .avancement-btn-icon { font-size: 13px; }
        .avancement-btn-label { font-size: 12px; }

        /* ===== MODAL SOUS-ETAT ===== */
        .se-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .se-modal {
            background: var(--white);
            border-radius: 12px;
            width: 420px;
            max-width: 92vw;
            box-shadow: 0 16px 48px rgba(0,0,0,0.35);
            overflow: hidden;
            border: 1px solid var(--gray-200);
        }
        .se-modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 20px;
            color: #fff;
        }
        .se-modal-title {
            font-size: 15px;
            font-weight: 700;
            letter-spacing: 0.3px;
        }
        .se-modal-close {
            cursor: pointer;
            font-size: 16px;
            opacity: 0.8;
            padding: 2px 6px;
            border-radius: 4px;
        }
        .se-modal-close:hover { opacity: 1; background: rgba(255,255,255,0.2); }
        .se-modal-body {
            padding: 12px 16px 16px;
        }
        .se-modal-section {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--gray-500);
            padding: 10px 4px 4px;
            border-bottom: 1px solid var(--gray-100);
            margin-bottom: 2px;
        }
        .se-modal-section-transition { color: #2563eb; }
        .se-modal-section-archive { color: #64748b; }
        .se-option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s;
            position: relative;
            border: 1px solid transparent;
            margin: 2px 0;
        }
        .se-option:hover { background: rgba(0,0,0,0.04); border-color: var(--se-color, var(--gray-300)); }
        .se-option-selected { background: rgba(0,0,0,0.04); border-color: var(--se-color, var(--gray-300)); }
        .se-option-icon { font-size: 18px; width: 24px; text-align: center; color: var(--se-color, var(--gray-600)); }
        .se-option-label { font-size: 14px; font-weight: 700; color: var(--gray-900); flex: 1; }
        .se-option-check { color: #16a34a; font-size: 16px; font-weight: 700; }
        .se-option-arrow {
            font-size: 10px;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 6px;
            white-space: nowrap;
        }
        .se-option-transition { border-left: 3px solid var(--se-color, #3b82f6); }
        .se-option-archive { opacity: 0.85; }
        .se-option-archive:hover { opacity: 1; }


/* ===== RESPONSIVE SpoNGE (shell sidebar/topbar géré par fondata.css) ===== */
@media (max-width: 900px) {
  .form-grid, .filters, .dashboard-filters, .chart-grid,
  [style*="1fr 1fr"], [style*="1fr 1fr 1fr"], [style*="repeat(2"], [style*="repeat(3"], [style*="repeat(4"] {
    grid-template-columns: 1fr !important;
  }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .content-area table, .crm-table, table.data-table { display: block; overflow-x: auto; white-space: nowrap; max-width: 100%; }
  .modal, .modal-content, .section-modal { max-width: 96vw !important; width: 96vw !important; }
}
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr !important; }
}

/* ===== Pont design-system : éléments de shell propres à SpoNGE ===== */
/* (le shell .app/.sidebar/.topbar/.nav-item/.page vient de fondata.css) */
.sidebar .menu-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .nav-item { font-size: 12.5px; }
.sidebar .nav-item .menu-item-icon { margin-right: 2px; width: 18px; height: 18px; }
.nav-item.disabled { opacity: .4; cursor: not-allowed; }
/* item de menu actif (bleu plein) → icône blanche */
.menu-nav .nav-item.active .menu-item-icon svg { stroke: #fff; }
.menu-section-label { padding: 12px 20px 5px; }
/* Fiche affaire active, mise en avant en haut de la sidebar */
#detailMenuWrapper { padding: 8px 10px 6px; }
#detailMenuWrapper .nav-item { margin: 0; border-radius: 10px; box-shadow: var(--shadow-sm); }
#detailMenuWrapper hr { display: none; }

/* ===== Modernisation des vues internes (cohérence avec l'accueil cockpit) ===== */
/* Conteneurs : rayon + ombre douce homogènes */
.table-container { border-radius: 10px; box-shadow: var(--shadow-sm); }
.card, .chart-container { border-radius: 10px; box-shadow: var(--shadow-sm); }

/* Tables : en-tête plus clair, lignes aérées, ligne sélectionnée = bleu NGE + accent jaune */
.table th { background: var(--gray-50); padding: 10px 12px; border-bottom: 1px solid var(--gray-200); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--gray-100); }
.table td:first-child { font-weight: 600; }
.table tbody tr:hover { background: rgba(0,44,119,0.04); }
.table tbody tr.selected { background: var(--nge-primary-light); box-shadow: inset 3px 0 0 var(--nge-secondary); }

/* KPIs dashboard : police cohérente avec l'accueil + survol plus net */
.stat-number { font-family: var(--font); font-size: 28px; }
.stat-card { border-radius: 10px; }
.stat-card:hover { transform: translateY(-2px); }

/* Kanban : colonnes plus douces, cartes arrondies + survol net */
.kanban-column { background: var(--gray-50); border: 1px solid var(--gray-200); }
.kanban-card { border-radius: 8px; }
.kanban-card:hover { transform: translateY(-2px); }

/* Onglets de la fiche : actif épuré, aligné sur la navigation */
.tab-permanent { border-radius: 8px; }
.tab-permanent-active { box-shadow: var(--shadow-sm) !important; transform: none !important; border-bottom: 1.5px solid var(--nge-primary) !important; }

/* Filtres : champs cohérents (fond clair, focus bleu NGE) */
.filter-control, .crm-filters input, .crm-filters select {
  background: var(--gray-100); border-color: var(--gray-200); border-radius: 8px; transition: var(--transition);
}
.filter-control:focus, .crm-filters input:focus, .crm-filters select:focus {
  outline: none; background: #fff; border-color: var(--nge-fond); box-shadow: 0 0 0 3px var(--nge-primary-light);
}

/* Modales internes : rayon homogène */
.modal-content, .section-modal, .se-modal { border-radius: 12px; }
