/* Custom File Upload - Front-end Styles */

.cfu-upload-section {
    margin: 20px 0;
    font-family: inherit;
}

.cfu-upload-container {
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.cfu-upload-header {
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #e34235 0%, #e0c52a 100%);
    color: white;
    border-radius: 6px 6px 0 0;
}

.cfu-upload-header i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.cfu-upload-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.cfu-upload-subtitle {
    display: block;
    font-size: 12px;
    opacity: 0.9;
}

.cfu-upload-zone {
    position: relative;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cfu-upload-zone.dragover {
    background: #ff980010;
    border-color: #ff9800;
    border-style: solid;
}

.cfu-file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.cfu-upload-content {
    pointer-events: none;
}

.cfu-upload-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.cfu-upload-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.cfu-upload-text strong {
    color: #ff9800;
}

.cfu-upload-info {
    font-size: 12px;
    color: #999;
}

.cfu-file-preview {
    background: white;
    border-top: 1px solid #eee;
    padding: 15px;
}

.cfu-preview-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cfu-preview-icon {
    font-size: 24px;
    color: #ff9800;
    flex-shrink: 0;
}

.cfu-preview-info {
    flex: 1;
    min-width: 0;
}

.cfu-preview-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cfu-preview-size {
    font-size: 12px;
    color: #666;
}

.cfu-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.cfu-remove-file:hover {
    background: #c82333;
}

.cfu-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    margin: 0 20px;
    border-radius: 4px;
}

.cfu-status-uploading {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.cfu-status-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.cfu-status-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.cfu-status-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.cfu-status-text {
    flex: 1;
    font-weight: 500;
}

.cfu-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.cfu-progress-fill {
    height: 100%;
    background: #ff9800;
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .cfu-upload-zone {
        padding: 30px 15px;
    }

    .cfu-upload-icon {
        font-size: 36px;
    }

    .cfu-upload-text {
        font-size: 14px;
    }

    .cfu-preview-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .cfu-status {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.cfu-file-preview,
.cfu-status {
    animation: fadeIn 0.3s ease-out;
}

.cfu-status.fade-out {
    animation: fadeOut 0.3s ease-out;
}

/* État masqué de la dropzone */
.cfu-upload-zone.hidden {
    display: none;
}
