.cdb-canvas-wrapper {
    margin: 20px 0;
}

.cdb-canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cdb-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: white;
    touch-action: none;
    cursor: crosshair;
}

.cdb-saved-drawing {
    text-align: center;
}

.cdb-saved-drawing img {
    max-width: 100%;
    height: auto;
    border: 2px solid #4CAF50;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.cdb-front-buttons {
    margin-top: 15px;
    text-align: center;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cdb-front-buttons button {
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.cdb-front-buttons button:first-child {
    background: #f0f0f0;
    border-color: #ccc;
    color: #333;
}

.cdb-front-buttons button:first-child:hover {
    background: #e0e0e0;
}

.cdb-front-buttons button:last-child {
    background: #4CAF50;
    color: white;
    border-color: #45a049;
}

.cdb-front-buttons button:last-child:hover {
    background: #45a049;
}

.cdb-front-buttons button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cdb-save-message {
    color: #4CAF50;
    margin-top: 10px;
    padding: 5px;
    font-weight: bold;
    text-align: center;
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
} 

/* Styles pour la galerie */
.cdb-gallery-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.cdb-gallery-header {
    text-align: center;
    margin-bottom: 30px;
}

.cdb-gallery-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.cdb-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.cdb-gallery-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.cdb-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.cdb-gallery-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    cursor: pointer;
    background: #f5f5f5;
}

.cdb-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cdb-gallery-image:hover img {
    transform: scale(1.05);
}

.cdb-gallery-info {
    padding: 15px;
}

.cdb-gallery-date {
    display: block;
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.cdb-gallery-actions {
    display: flex;
    gap: 10px;
}

.cdb-button {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    flex: 1;
    text-align: center;
}

.cdb-button-download {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.cdb-button-download:hover {
    background: #e0e0e0;
}

.cdb-button-view {
    background: #4CAF50;
    color: white;
}

.cdb-button-view:hover {
    background: #45a049;
}

.cdb-button-primary {
    background: #4CAF50;
    color: white;
    padding: 12px 24px;
    display: inline-block;
}

.cdb-gallery-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.cdb-gallery-pagination {
    text-align: center;
    margin-top: 40px;
}

.cdb-gallery-pagination .page-numbers {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.cdb-gallery-pagination .page-numbers.current {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.cdb-gallery-message {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 12px;
    margin: 20px;
}

@media (max-width: 768px) {
    .cdb-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }
    
    .cdb-gallery-actions {
        flex-direction: column;
    }
}

/* Styles pour la barre d'outils */
.cdb-toolbar {
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.cdb-toolbar span {
    color: white;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.cdb-toolbar input[type="color"] {
    width: 50px;
    height: 40px;
    padding: 2px;
    border: 2px solid white;
    border-radius: 8px;
    cursor: pointer;
    background: white;
}

.cdb-toolbar input[type="range"] {
    width: 150px;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.cdb-toolbar input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cdb-tool-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cdb-tool-btn[data-tool="brush"] {
    background: white;
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

.cdb-tool-btn[data-tool="brush"]:hover,
.cdb-tool-btn[data-tool="brush"].active {
    background: #4CAF50;
    color: white;
}

.cdb-tool-btn[data-tool="eraser"] {
    background: white;
    color: #dc3545;
    border: 2px solid #dc3545;
}

.cdb-tool-btn[data-tool="eraser"]:hover,
.cdb-tool-btn[data-tool="eraser"].active {
    background: #dc3545;
    color: white;
}

/* Animation pour les messages */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cdb-front-buttons > div:not(.cdb-front-buttons) {
    animation: slideIn 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .cdb-toolbar {
        flex-direction: column;
        padding: 15px;
    }
    
    .cdb-toolbar > * {
        width: 100%;
        margin: 5px 0 !important;
    }
    
    .cdb-toolbar input[type="range"] {
        width: 100%;
    }
    
    .cdb-toolbar div {
        display: flex;
        gap: 10px;
        width: 100%;
    }
    
    .cdb-tool-btn {
        flex: 1;
        text-align: center;
    }
}
