/* Styles pour le système de recadrage d'images */

/* Conteneur principal du recadrage */
.crop-container {
    position: relative;
    max-width: 100%;
    height: 450px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.crop-container:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.crop-container.has-image {
    border-style: solid;
    border-color: #28a745;
    background: #fff;
}

/* Image à recadrer */
.crop-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
}

/* Contrôles de recadrage */
.crop-controls {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.crop-controls .btn {
    margin: 5px;
    min-width: 120px;
}

.crop-controls .btn-group {
    margin: 10px 0;
}

/* Aperçu en temps réel */
.crop-preview {
    width: 180px;
    height: 180px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    margin: 15px auto;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.crop-preview.logo {
    width: 180px;
    height: 180px;
    border-radius: 8px;
}

.crop-preview.banner {
    width: 300px;
    height: 75px;
    border-radius: 6px;
}

.crop-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.crop-preview-label {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    font-size: 12px;
    padding: 2px 5px;
}

/* Indicateurs de dimensions */
.crop-dimensions {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding: 10px;
    background: #e9ecef;
    border-radius: 6px;
    font-size: 14px;
}

.crop-dimensions .dimension-item {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.crop-dimensions .dimension-label {
    font-weight: bold;
    color: #495057;
}

.crop-dimensions .dimension-value {
    color: #007bff;
    font-family: 'Courier New', monospace;
}

/* État de chargement */
.crop-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.crop-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 10px;
}

/* Messages d'erreur et succès */
.crop-alert {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid;
}

.crop-alert.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.crop-alert.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Instructions */
.crop-instructions {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.5;
}

.crop-instructions h6 {
    color: #004085;
    margin-bottom: 10px;
}

.crop-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.crop-instructions li {
    margin-bottom: 5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .crop-container {
        height: 300px;
        margin: 15px 0;
    }
    
    .crop-controls {
        padding: 15px;
    }
    
    .crop-controls .btn {
        min-width: 100px;
        margin: 3px;
    }
    
    .crop-preview {
        width: 150px;
        height: 150px;
    }
    
    .crop-preview.banner {
        width: 240px;
        height: 60px;
    }
    
    .crop-dimensions {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animation pour les transitions */
.crop-fade-in {
    animation: cropFadeIn 0.3s ease-in-out;
}

@keyframes cropFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styles pour les boutons de navigation */
.crop-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.crop-navigation .nav-info {
    flex: 1;
}

.crop-navigation .nav-title {
    font-size: 18px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
}

.crop-navigation .nav-subtitle {
    color: #6c757d;
    font-size: 14px;
}

.crop-navigation .nav-actions {
    display: flex;
    gap: 10px;
}

/* Styles pour les tooltips */
.crop-tooltip {
    position: relative;
}

.crop-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* Amélioration des styles pour les dropzones */
.crop-dropzone {
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crop-dropzone:hover {
    border-color: #0056b3;
    background: #f0f8ff;
}

.crop-dropzone.dragover {
    border-color: #28a745;
    background: #f0fff4;
}

.crop-dropzone-icon {
    font-size: 48px;
    color: #007bff;
    margin-bottom: 15px;
}

.crop-dropzone-text {
    color: #495057;
    font-size: 16px;
    margin-bottom: 10px;
}

.crop-dropzone-hint {
    color: #6c757d;
    font-size: 14px;
} 