body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    background: #2c3e50;
}

header, footer {
    background: #1a252f;
    color: white;
    padding: 10px 20px;
    text-align: center;
}

main {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #ecf0f1;
}

#palette, #properties {
    width: 220px;
    padding: 20px;
    background: #bdc3c7;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

#editor-area {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #95a5a6;
    padding: 10px;
}

#editor-2d, #visualizer-3d {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Important pour le visualisateur */
#canvas-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

#gameCanvas {
    background: #fff;
    border: 2px solid #34495e;
    max-height: 90%;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

#visualizerCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

#game-info {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px;
    border-radius: 8px;
    min-width: 150px;
}

#game-message {
    font-weight: bold;
    color: #f1c40f;
    font-size: 1.2em;
}

button {
    padding: 10px;
    cursor: pointer;
    background: #2980b9;
    color: white;
    border: none;
    border-radius: 4px;
    margin-bottom: 5px;
}
button:hover { background: #3498db; }
button.active { background: #27ae60; border: 2px solid #2ecc71; }
input, select { padding: 5px; width: 100%; box-sizing: border-box; }

#canvas-container {
    cursor: crosshair; 
    position: relative;
    overflow: hidden;
}