/**
 * Styles pour l'interface d'upload d'acte et génération IA
 * Version corrigée - Barre de progression horizontale sans lignes
 */

/* ===== CONTAINER PRINCIPAL ===== */
.acte-upload-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin-top: 1rem;
}

/* ===== ZONE D'UPLOAD ===== */
.upload-zone {
    border: 2px dashed #000091;
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.upload-zone:hover {
    border-color: #1212ff;
    background: #f5f5fe;
}

.upload-zone.drag-over {
    border-color: #18753c;
    background: #e8f5e8;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    margin-bottom: 1rem;
    opacity: 0.7;
}

.upload-zone h3 {
    color: #000091;
    font-size: 1.25rem;
    margin: 1rem 0;
    font-weight: 600;
}

.upload-zone p {
    color: #666;
    margin: 0.5rem 0;
}

.upload-help {
    font-size: 0.875rem;
    color: #999;
}

.link-button {
    background: none;
    border: none;
    color: #000091;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
}

.link-button:hover {
    color: #1212ff;
}

/* ===== PRÉVISUALISATION FICHIER ===== */
.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid #18753c;
    border-radius: 8px;
}

.file-icon {
    font-size: 2.5rem;
}

.file-info {
    flex: 1;
    text-align: left;
}

.file-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.875rem;
    color: #666;
}

.remove-file {
    background: #ce614a;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file:hover {
    background: #b5573f;
}

/* ===== STATUT DU PROCESSUS - VERSION CORRIGÉE ===== */
.process-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    position: relative;
    overflow: hidden; /* Empêche le débordement */
}

/* Ligne de fond continue */
.process-status::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.status-step {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.3;
    transition: opacity 0.3s;
    position: relative;
    z-index: 1;
}

.status-step.active {
    opacity: 1;
}

/* Ligne de progression entre les étapes actives */
.status-step.active ~ .status-step.active::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: -100%;
    width: 100%;
    height: 2px;
    background: #18753c;
    z-index: 0;
}

.status-icon {
    font-size: 1.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50%;
    border: 2px solid #ddd;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.status-step.active .status-icon {
    border-color: #000091;
    background: #e3e3fd;
}

.status-label {
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}

.status-step.active .status-label {
    color: #000091;
    font-weight: 600;
}

/* ===== BARRE DE PROGRESSION ===== */
.progress-bar {
    background: #e0e0e0;
    border-radius: 10px;
    height: 10px;
    margin: 1.5rem 0;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, #000091, #1212ff);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
}

/* ===== BOUTON GÉNÉRER ===== */
#generate-ai-btn {
    width: 100%;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    font-size: 1.1rem;
}

#generate-ai-btn .btn-icon {
    font-size: 1.25rem;
}

#generate-ai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== RÉSULTAT DE GÉNÉRATION - SIMPLIFIÉ ===== */
.generation-result {
    display: none; /* Caché par défaut car on applique directement le texte */
}

/* ===== ALERTES ===== */
.acte-alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    animation: slideDown 0.3s ease;
}

.alert-error {
    background: #fef4f4;
    border-left: 4px solid #ce614a;
    color: #ce614a;
}

.alert-success {
    background: #e8f5e8;
    border-left: 4px solid #18753c;
    color: #18753c;
}

.alert-warning {
    background: #fff4e5;
    border-left: 4px solid #ff9940;
    color: #ff9940;
}

/* ===== AI PROCESSING ===== */
.ai-processing {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f0f0ff;
    border-radius: 8px;
    margin: 1rem 0;
}

.ai-processing .ai-icon {
    font-size: 1.5rem;
}

.ai-processing strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.processing {
    animation: pulse 2s infinite;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .acte-upload-container {
        padding: 1rem;
    }
    
    .upload-zone {
        padding: 2rem 1rem;
    }
    
    /* Barre de progression verticale sur mobile */
    .process-status {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .process-status::before {
        top: 10%;
        bottom: 10%;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: auto;
    }
    
    .status-step {
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
    }
    
    .status-icon {
        margin-right: 1rem;
    }
    
    .status-label {
        margin-top: 0;
        text-align: left;
    }
}

/* ===== LOADER SPINNER ===== */
.spinner-ai {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 145, 0.3);
    border-top-color: #000091;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}