        body {
            margin: 0;
            overflow: hidden;
            font-family: Arial, sans-serif;
            background: #ffffff;
        }
        #cavaliere-panel {
            position: absolute;
            top: 170px;
            left: 20px;
            background: rgba(240, 240, 240, 0.95);
            padding: 15px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            z-index: 100;
            border: 1px solid #ddd;
            min-width: 200px;
            display: none;
        }
        #cavaliere-panel.visible { display: block; }
        #cavaliereAngle, #cavaliereCoeff {
            position: absolute;
            width: 100%;
            height: 4px;
            top: 8px;
            left: 0;
            -webkit-appearance: none;
            appearance: none;
            background: transparent;
            pointer-events: all;
            outline: none;
            z-index: 2;
        }
        #cavaliereAngle::-webkit-slider-thumb,
        #cavaliereCoeff::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px; height: 14px;
            border-radius: 50%;
            background: #4b4b4b;
            cursor: pointer;
            border: 2px solid #fff;
            box-shadow: 0 0 2px rgba(0,0,0,0.4);
        }
        #cavaliereAngle::-moz-range-thumb,
        #cavaliereCoeff::-moz-range-thumb {
            width: 14px; height: 14px;
            border-radius: 50%;
            background: #4b4b4b;
            cursor: pointer;
            border: 2px solid #fff;
            box-shadow: 0 0 2px rgba(0,0,0,0.4);
        }
         .double-slider-group { margin-bottom: 10px; }
            .double-slider-group label { font-size: 12px; display: block; margin-bottom: 4px; }
            .double-slider-wrap {
                position: relative;
                height: 20px;
                width: 100%;
            }
            .double-slider-wrap input[type=range] {
                position: absolute;
                width: 100%;
                height: 4px;
                top: 8px;
                left: 0;
                -webkit-appearance: none;
                appearance: none;
                background: transparent;
                pointer-events: none;
                outline: none;
            }
            .double-slider-wrap input[type=range]::-webkit-slider-thumb {
                -webkit-appearance: none;
                appearance: none;
                width: 14px; height: 14px;
                border-radius: 50%;
                background: #4b4b4b;
                cursor: pointer;
                pointer-events: all;
                border: 2px solid #fff;
                box-shadow: 0 0 2px rgba(0,0,0,0.4);
            }
            .double-slider-wrap input[type=range]::-moz-range-thumb {
                width: 14px; height: 14px;
                border-radius: 50%;
                background: #4b4b4b;
                cursor: pointer;
                pointer-events: all;
                border: 2px solid #fff;
                box-shadow: 0 0 2px rgba(0,0,0,0.4);
            }
            .double-slider-track {
                position: absolute;
                top: 10px;
                left: 0;
                right: 0;
                height: 4px;
                background: #ddd;
                border-radius: 2px;
                pointer-events: none;
            }
            .double-slider-range {
                position: absolute;
                top: 10px;
                height: 4px;
                background: #4b4b4b;
                border-radius: 2px;
                pointer-events: none;
            }
            .double-slider-values {
                font-size: 10px;
                color: #666;
                text-align: right;
                margin-top: 2px;
            }
            /* Zoom : poignée unique avec même style */
            #zoomSlider {
                position: absolute;
                width: 100%;
                height: 4px;
                top: 8px;
                left: 0;
                -webkit-appearance: none;
                appearance: none;
                background: transparent;
                pointer-events: all;
                outline: none;
                z-index: 2;
            }
            #zoomSlider::-webkit-slider-thumb {
                -webkit-appearance: none;
                appearance: none;
                width: 14px; height: 14px;
                border-radius: 50%;
                background: #4b4b4b;
                cursor: pointer;
                border: 2px solid #fff;
                box-shadow: 0 0 2px rgba(0,0,0,0.4);
            }
            #zoomSlider::-moz-range-thumb {
                width: 14px; height: 14px;
                border-radius: 50%;
                background: #4b4b4b;
                cursor: pointer;
                border: 2px solid #fff;
                box-shadow: 0 0 2px rgba(0,0,0,0.4);
            }
            /* Theta : même style que zoom */
            #thetaSlider {
                position: absolute;
                width: 100%;
                height: 4px;
                top: 8px;
                left: 0;
                -webkit-appearance: none;
                appearance: none;
                background: transparent;
                pointer-events: all;
                outline: none;
                z-index: 2;
            }
            #thetaSlider::-webkit-slider-thumb {
                -webkit-appearance: none;
                appearance: none;
                width: 14px; height: 14px;
                border-radius: 50%;
                background: #4b4b4b;
                cursor: pointer;
                border: 2px solid #fff;
                box-shadow: 0 0 2px rgba(0,0,0,0.4);
            }
            #thetaSlider::-moz-range-thumb {
                width: 14px; height: 14px;
                border-radius: 50%;
                background: #4b4b4b;
                cursor: pointer;
                border: 2px solid #fff;
                box-shadow: 0 0 2px rgba(0,0,0,0.4);
            }
        #container {
            width: 100vw;
            height: 100vh;
            position: relative;
            top: -50px;
        }
        #controls {
            position: absolute;
            top: 485px;
            right: 20px;
            background: rgba(240, 240, 240, 0.95);
            padding: 10px 15px 5px 15px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            z-index: 100;
            border: 1px solid #ddd;
            font-size: 12px;
            min-width: 200px;
        }
        #controls.collapsed {
            display: none;
        }
        #examples-panel {
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(240, 240, 240, 0.95);
            padding: 15px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            z-index: 100;
            border: 1px solid #ddd;
            min-width: 200px;
            display: block;
        }
        #examples-panel.collapsed {
            display: none;
        }
        #grid-builder {
            position: absolute;
            bottom: 20px;
            left: 20px;
            background: rgba(240, 240, 240, 0.95);
            padding: 25px 15px 5px 25px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            z-index: 100;
            border: 1px solid #ddd;
        }
        #grid-builder.collapsed {
            display: none;
        }
        #grid-container {
            display: grid;
            grid-template-columns: repeat(8, 30px);
            grid-template-rows: repeat(8, 30px);
            gap: 0px;
            background: #ddd;
            padding: 0px;
            border: none;
            position: relative;
        }
        #sliders-panel {
            position: absolute;
            top: 70px;
            right: 20px;
            background: rgba(240, 240, 240, 0.95);
            padding: 15px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            z-index: 100;
            border: 1px solid #ddd;
            min-width: 200px;
        }
        #sliders-panel.collapsed {
            display: none;
        }
        .slider-group {
            margin-bottom: 8px;
        }
        .slider-group:last-child {
            margin-bottom: 0;
        }
        .slider-group label {
            display: block;
            font-size: 12px;
            color: #555;
            margin-bottom: 2px;
        }
        .slider-group input[type="range"] {
            width: 100%;
        }
        .height-eyes-container {
            border: 1px solid #999;
            padding: 5px;
            border-radius: 3px;
            background: #f5f5f5;
            margin-top: 8px;
        }
        #camera-angles {
            position: absolute;
            top: 303px;
            right: 20px;
            background: rgba(240, 240, 240, 0.95);
            padding: 10px 15px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            z-index: 101;
            border: 1px solid #ddd;
            display: none;
            font-size: 14px;
            color: #333;
            min-width: 200px;
        }
        #camera-angles.visible {
            display: block;
        }
        #camera-angles button {
            margin-top: 10px;
            padding: 5px 10px;
            background: #f8f9fa;
            border: 1px solid #ccc;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }
        #camera-angles button:hover {
            background: #e9ecef;
        }
        .toolbar {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            gap: 8px;
            z-index: 101;
        }
        select {
            padding: 2px;
            border: 1px solid #ccc;
            border-radius: 3px;
            font-size: 12px;
            background: white;
        }
        .icon-button {
            background: #f8f9fa;
            color: #495057;
            border: 1px solid #dee2e6;
            padding: 8px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            position: relative;
        }
        .icon-button:hover {
            background: #e9ecef;
            border-color: #adb5bd;
        }
        .icon-button.active {
            background: #6c757d;
            border-color: #5a6268;
            box-shadow: 0 2px 4px rgba(0,0,0,0.15);
        }
        .icon-button.active svg {
            stroke: white;
        }
        .icon-button.active:hover {
            background: #5a6268;
            border-color: #495057;
        }
        .tooltip {
            position: absolute;
            bottom: -35px;
            left: 50%;
            transform: translateX(-50%);
            background: #333;
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            white-space: nowrap;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s;
            z-index: 1000;
        }
        .icon-button:hover .tooltip {
            opacity: 1;
        }
        /* Styles pour la popup de documentation */
        .popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            display: none;
        }
        .popup {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            max-width: 700px;
            max-height: 80vh;
            overflow-y: auto;
            z-index: 1001;
            padding: 0;
        }
        .popup-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 12px 12px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .popup-title {
            font-size: 1.5em;
            font-weight: bold;
            margin: 0;
            flex-grow: 1;
        }
        .popup-close {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background 0.2s;
        }
        .popup-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }
        .popup-content {
            padding: 25px;
            line-height: 1.6;
        }
        .popup-section {
            margin: 20px;
        }
        .popup-section h3 {
            color: #333;
            font-size: 1.2em;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 2px solid #eee;
        }
        .popup-section ul {
            margin: 10px 0;
            padding-left: 20px;
        }
        .popup-section li {
            margin: 5px 0;
        }
        .control-group {
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        label {
            color: #555;
            font-size: 12px;
            margin: 0;
        }
        input[type="range"] {
            width: 100px;
        }
        .value-display {
            display: inline-block;
            margin-left: 10px;
            color: #333;
            font-weight: bold;
        }
        .eye-row {
            position: absolute;
            top: -26px;
            left: 0px;
            display: flex;
            gap: 0px;
        }
        .eye-column {
            position: absolute;
            left: -26px;
            top: 0px;
            display: flex;
            flex-direction: column;
            gap: 0px;
        }
        .eye-icon {
            width: 30px;
            height: 20px;
            cursor: pointer;
            text-align: center;
            font-size: 16px;
            user-select: none;
        }
        .eye-icon-vertical {
            width: 25px;
            height: 30px;
            cursor: pointer;
            text-align: center;
            font-size: 16px;
            user-select: none;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .grid-cell {
            width: 30px;
            height: 30px;
            background: #fff;
            border: 1px solid #ccc;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: bold;
            color: #333;
            transition: background-color 0.2s;
            user-select: none;
        }
        .grid-cell:hover:not([data-height="0"]) {
            background: #ff6666 !important;
            color: #fff;
        }
        .grid-cell[data-height="0"]:hover {
            background: #ffffff !important;
        }
        .grid-cell.dimmed:hover {
            background: #ffffff !important;
            color: #999;
        }
        .grid-cell.hide-numbers {
            color: transparent !important;
        }
        .grid-cell[data-height="0"] { background: #ffffff; }
        .grid-cell.eye-hovered {
            background: #ff6666 !important;
            color: #fff;
        }
        .grid-cell.isolated-focus {
            border-color: #000000 !important;
        }
        .grid-cell.isolated-dimmed {
            background: #ffffff !important;
            color: #999;
        }
        .height-control {
            margin-top: 8px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .height-control input[type="range"] {
            width: 240px;
        }
        .height-control-label {
            font-size: 12px;
            color: #555;
            min-width: 80px;
        }
        .height-eyes-row {
            display: flex;
            gap: 4.66px;
            margin-top: 3px;
            margin-left: -3px;
            justify-content: flex-start;
        }
        .height-eye-icon {
            width: 25px;
            height: 20px;
            cursor: pointer;
            text-align: center;
            font-size: 14px;
            user-select: none;
        }
        input[type="color" i] {
            appearance: auto;
            inline-size: 40px;
            block-size: 27px;
            cursor: pointer;
            box-sizing: border-box;
            border-width: 0px;
            border-style: solid;
            padding: 1px 1Spx;
        }
