.workflow-container {
    padding: 15px 5px;
    width: 100%;
    overflow-x: auto;
}

.workflow-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 650px; /* Assure la lisibilité sur mobile via un scroll horizontal */
}

.wf-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex: 1;
}

/* Connecteurs entre les cartes */
.wf-connector {
    height: 3px;
    background-color: #e2e8f0;
    flex-grow: 1;
    margin-top: 28px;
    border-radius: 2px;
    transition: background-color 0.4s ease;
}

.wf-connector.active {
    background: linear-gradient(90deg, #0d6efd, #0d6efd);
}

/* Cercle principal de l'icône */
.wf-node {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.wf-icon {
    font-size: 1.25rem;
    color: #64748b;
}

/* Badge indicateur d'état (en bas à droite de l'icône) */
.wf-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #94a3b8;
    color: #ffffff;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Cartes de contenu sous le noeud */
.wf-content {
    margin-top: 12px;
}

.wf-step-num {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 700;
    display: block;
}

.wf-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin: 2px 0;
    color: #1e293b;
}

.wf-status-text {
    font-size: 0.75rem;
    font-weight: 600;
}

/* ÉTATS : Completed (Terminé avec succès) */
.wf-step.completed .wf-node {
    background-color: #e0f2fe;
    border-color: #0284c7;
}

.wf-step.completed .wf-icon {
    color: #0284c7;
}

.wf-step.completed .wf-badge {
    background-color: #10b981;
}

/* ÉTATS : Active (En cours de traitement) */
.wf-step.active .wf-node {
    background-color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transform: scale(1.08);
}

.wf-step.active .wf-icon {
    color: #3b82f6;
}

.wf-step.active .wf-badge {
    background-color: #f59e0b;
}

/* ÉTATS : Rejected (Avis défavorable / Refusé) */
.wf-step.rejected .wf-node {
    background-color: #fef2f2;
    border-color: #ef4444;
}

.wf-step.rejected .wf-icon {
    color: #ef4444;
}

.wf-step.rejected .wf-badge {
    background-color: #ef4444;
}

/* ÉTATS : Pending (En attente) */
.wf-step.pending {
    opacity: 0.6;
}