/* Styles et animations pour l'interface de dessin */
/* Styles principaux du projet dessin */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 25px;
}

header h1 {
    color: #667eea;
    font-size: 2.2rem;
    margin-bottom: 8px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

header p {
    color: #666;
    font-size: 1rem;
}

.canvas-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    background: #f0f0f0;
    border-radius: 15px;
    padding: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

canvas {
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: crosshair;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

canvas:hover {
    transform: scale(1.01);
}

.tools {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.tool-group {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 15px;
    flex: 1;
    min-width: 180px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.tool-group:nth-child(1) { animation-delay: 0.1s; }
.tool-group:nth-child(2) { animation-delay: 0.2s; }
.tool-group:nth-child(3) { animation-delay: 0.3s; }
.tool-group:nth-child(4) { animation-delay: 0.4s; }
.tool-group:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-group:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.tool-group h3 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 1rem;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

button {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

button:hover {
    background: #5a67d8;
    transform: scale(1.05);
}

button.active {
    background: #48bb78;
    box-shadow: 0 0 10px rgba(72,187,120,0.5);
}

.color-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.color-box {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.color-box:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#customColor {
    width: 100%;
    height: 40px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 5px;
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

#sizeValue {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.shortcuts {
    list-style: none;
    font-size: 0.8rem;
}

.shortcuts li {
    margin: 5px 0;
    color: #555;
}

kbd {
    background: #333;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.7rem;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    canvas {
        width: 100%;
        height: auto;
    }
    
    .tools {
        flex-direction: column;
    }
    
    .tool-group {
        min-width: auto;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
}
