/* ===== Global ===== */
/* Nouveau style cozy vert pastel */
body {
    background: linear-gradient(135deg, #eafaf1 0%, #d6ecd6 100%);
    color: #35694a;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
}

/* ===== Canvas ===== */
#canvas {
    border: 4px solid #b7eac7;
    border-radius: 18px;
    image-rendering: pixelated;
    cursor: crosshair;
    display: block;
    margin: 20px auto;
    background: #fff;
    box-shadow: 0 4px 24px rgba(76, 175, 80, 0.07);
}

/* ===== Palette ===== */
#palette {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 10px auto 0 auto;
    gap: 0;
}

.color {
    width: 34px;
    height: 34px;
    margin: 2px 6px 0 6px;
    border: 2px solid #fff;
    border-radius: 8px 8px 12px 12px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.08);
    position: relative;
    cursor: pointer;
    z-index: 2;
    display: inline-block;
}

.palette-base {
    position: relative;
    width: 34px;
    height: 18px;
    margin: 0 6px 10px 6px;
    z-index: 1;
    display: inline-block;
}

.palette-svg {
    width: 34px;
    height: 18px;
    display: block;
}

/* ===== Galerie des créations ===== */
#gallery {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 150px;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid #b7eac7;
    padding: 5px;
    background: rgba(214,236,214,0.7);
    border-radius: 12px;
}

#gallery img {
    width: 100%;
    margin-bottom: 5px;
    border: 2px solid #a3d9a5;
    border-radius: 8px;
}

/* ===== Pubs style années 2000 ===== */
#ads {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 160px;
    background: rgba(183,234,199,0.7);
    padding: 10px;
    border: 2px solid #a3d9a5;
    font-weight: bold;
    text-align: center;
    z-index: 5;
    color: #35694a;
    border-radius: 12px;
}

.ad {
    margin-bottom: 10px;
    color: #35694a;
}

/* ===== Boutons / Brushes ===== */
button {
    margin: 5px;
    padding: 8px 18px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(90deg, #b7eac7 0%, #a3d9a5 100%);
    color: #35694a;
    border: 2px solid #a3d9a5;
    border-radius: 10px;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    transition: background 0.2s, color 0.2s;
}
button:hover {
    background: #a3d9a5;
    color: #2e5c3c;
}

input[type="color"] {
    margin-left: 10px;
    width: 60px;
    height: 30px;
    vertical-align: middle;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid #b7eac7;
    background: #fff;
}

/* ===== Responsive ===== */
@media screen and (max-width: 900px) {
    #canvas {
        width: 90%;
        height: auto;
    }
    #gallery, #ads {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: auto;
        margin: 10px auto;
    }
}