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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 20px;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    /* Arrange items in a column */
    gap: 20px;
    flex-grow: 1;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 300px;
    /* Fixed width for the left panel */
}

.file-manager,
.notice {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 300px;
    /* Make notice scrollable with a max height */
}

.notice h2 {
    margin-bottom: 15px;
    color: #333;
}

.notice h3 {
    color: #007bff;
    margin-top: 20px;
    margin-bottom: 5px;
}

.notice h4 {
    color: #555;
    margin-top: 15px;
    margin-bottom: 5px;
}

.notice ul,
.notice ol {
    margin: 0;
    padding-left: 20px;
}

.notice li {
    margin-bottom: 5px;
}

.notice p {
    margin-bottom: 10px;
}

.notice pre {
    background-color: #eee;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 10px;
}

.notice code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
    width: 100%;
    /* Take full width */
}

.editor-container {
    position: fixed;
    top: 32px;
    left: 356px;
    gap: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 90%;
    /* Take full width */
}

.console-container {
    height: 150px;
    background-color: #1e1e1e;
    color: #f0f0f0;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    font-family: monospace;
    margin-top: 5px;
    display: flex;
    flex-direction: column;
}

.console-toolbar {
    background-color: #2d2d2d;
    padding: 5px;
    display: flex;
    justify-content: flex-end;
    border-bottom: 1px solid #444;
}

#clear-console-button {
    background-color: #333;
    color: #f0f0f0;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
}

#clear-console-button:hover {
    background-color: #444;
}

#console-header {
    background-color: #333;
    padding: 5px 10px;
    font-weight: bold;
    border-bottom: 1px solid #444;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    flex-shrink: 0;
}

#console-messages {
    padding: 10px;
    overflow-y: auto;
    flex-grow: 1;
    font-size: 14px;
    line-height: 1.4;
}

.console-line {
    margin-bottom: 3px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

#editor {
    height: 400px;
    /* Fixed height for the editor */
    border-radius: 8px;
    overflow: hidden;
}

#run-button {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#run-button:hover {
    background: #45a049;
}

.output-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#output {
    margin-top: 10px;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 4px;
    min-height: 100px;
}

.file-manager {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    /* Make file manager take full width of left panel */
}

.file-manager h2 {
    margin-bottom: 10px;
}

#file-list {
    list-style: none;
    padding: 0;
}

#file-list li {
    margin: 5px 0;
}

#file-list a {
    text-decoration: none;
    color: #007BFF;
}

#file-list a:hover {
    text-decoration: underline;
}


/* Ajoutez ceci à votre fichier CSS existant */


/* Style pour le modal */


/* Add these styles for the modal and program display */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    overflow: auto;
}


/* Updating the modal styles to add minimize functionality and better scrolling */

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 900px;
    height: 80vh;
    overflow: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transition: height 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.modal-controls {
    display: flex;
    gap: 15px;
}

.minimize-button,
.close-button {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.minimize-button:hover,
.close-button:hover,
.minimize-button:focus,
.close-button:focus {
    color: black;
    text-decoration: none;
}

.modal-minimized {
    height: 60px !important;
    overflow: hidden;
}

.alert-message {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#modal-output {
    flex-grow: 1;
    margin-bottom: 10px;
    padding-right: 10px;
    /* Add some padding for scrollbar */
}

.modal-minimized #modal-output,
.modal-minimized #modal-console {
    display: none;
}

#modal-output {
    flex-grow: 1;
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: white;
    min-height: 60%;
    overflow: auto;
    max-height: calc(60vh - 100px);
}

.program-container {
    width: 100%;
    height: 100%;
    border: none;
    overflow-y: auto;
    overflow-x: auto;
    padding-right: 10px;
}

#modal-console {
    background-color: #333333;
    color: #000000;
    padding: 10px;
    border-radius: 5px;
    font-family: monospace;
    white-space: pre-wrap;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}


/* Custom scrollbar styles */

#modal-output::-webkit-scrollbar,
#modal-console::-webkit-scrollbar,
.program-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#modal-output::-webkit-scrollbar-track,
#modal-console::-webkit-scrollbar-track,
.program-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#modal-output::-webkit-scrollbar-thumb,
#modal-console::-webkit-scrollbar-thumb,
.program-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#modal-output::-webkit-scrollbar-thumb:hover,
#modal-console::-webkit-scrollbar-thumb:hover,
.program-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}