/* Styles pour l'éditeur de code */
.code-editor-container {
    position: relative;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
}

.code-editor-textarea {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: none;
    outline: none;
    resize: none;
    background: transparent;
    color: transparent;
    caret-color: #f8f8f2;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    z-index: 2;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
}

.code-editor-highlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    border: none;
    background: #23241f;
    color: #f8f8f2;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    z-index: 1;
    white-space: pre;
    overflow-wrap: normal;
    overflow: auto;
    pointer-events: none;
}

.code-editor-ghost-text {
    position: absolute;
    top: 0;
    left: 0;
    color: #f8f8f2;
    opacity: 0.4;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    z-index: 3;
    pointer-events: none;
    white-space: pre;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.code-editor-textarea,
.code-editor-highlight,
.code-editor-ghost-text {
    padding: 0px 0px 0px 20px; /* Même padding que les autres éléments */
}

.code-editor-autocomplete {
    position: absolute;
    background: #3e3d32;
    border: 1px solid #75715e;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    min-width: 150px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.code-editor-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    color: #f8f8f2;
    border-bottom: 1px solid #49483e;
}

.code-editor-autocomplete-item:hover,
.code-editor-autocomplete-item.selected {
    background: #49483e;
}

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

/* Scrollbar styling */
.code-editor-highlight::-webkit-scrollbar,
.code-editor-textarea::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.code-editor-highlight::-webkit-scrollbar-track,
.code-editor-textarea::-webkit-scrollbar-track {
    background: #23241f;
}

.code-editor-highlight::-webkit-scrollbar-thumb,
.code-editor-textarea::-webkit-scrollbar-thumb {
    background: #75715e;
    border-radius: 4px;
}

.code-editor-highlight::-webkit-scrollbar-thumb:hover,
.code-editor-textarea::-webkit-scrollbar-thumb:hover {
    background: #a6a6a2;
}