/* --- Styles de base --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
}

h1 {
    text-align: center;
}

/* --- Layout (Disposition) --- */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
}

header nav a {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
}

section#corps {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px;
    justify-content: center;
    align-items: flex-start;
}

section#corps div#resultDiv {
    display: flex;
}

section#corps div#resultDiv h2 {
    padding: 10px;
}

section#corps canvas {
    margin: 10px;
}

/* --- Colonnes --- */
#left, #right {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#left { 
    flex: 1; 
    max-width: 500px; 
}

#right { 
    flex: 2; 
    min-height: 400px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

/* --- Formulaire --- */
fieldset {
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    padding: 10px;
}

legend { 
    font-weight: bold; 
    color: #2c3e50; 
}

label { 
    display: inline-block; 
    width: 220px; 
    margin-bottom: 5px; 
    font-size: 0.9rem; 
}

input[type="text"], input[type="number"], select {
    width: 150px;
    padding: 5px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Version réduite pour les champs côte à côte (ex: Résolution X Y) */
input.inline-input { 
    width: 70px !important; 
}

button {
    width: 100%;
    padding: 10px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
}

button:hover { 
    background-color: #219150; 
}

/* --- Canvas & Visualisation --- */
#result {
    width: 70%;
    height: auto;
    border: 2px dashed #bdc3c7;
    background: #fafafa;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    section#corps { 
        flex-direction: column; 
    }
    #left { 
        max-width: 100%; 
    }
}