/* ============================================================
   PATCH CSS - CORRECTION FORCÉE POUR LES FORMULAIRES (Overrides)
   ============================================================ */

/* 1. Boutons (Suivant, Précédent, Publier) */
[class$="-btn"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 24px !important;
    border-radius: 30px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    transition: all 0.2s ease !important;
}

[class$="-btn-primary"] {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #ffffff !important;
}

[class$="-btn-success"] {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
}

[class$="-btn-secondary"] {
    background: #ffffff !important;
    color: #6b7280 !important;
    border: 1.5px solid #e5e7eb !important;
}

[class$="-btn"]:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* 2. Alerte "Nom requis" */
[class$="-alert"] {
    padding: 12px 16px !important;
    border-radius: 12px !important;
    margin: 10px 0 !important;
    display: none;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-align: center !important;
}

[class$="-alert"].show {
    display: block !important;
    animation: slideDown 0.3s ease !important;
}

[class$="-alert"].error {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border-left: 4px solid #ef4444 !important;
}

[class$="-alert"].success {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border-left: 4px solid #10b981 !important;
}

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

/* 3. Cercles des étapes (1, 2, 3) */
[class$="-step-circle"] {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background: #f3f4f6 !important;
    border: 2px solid #e5e7eb !important;
    color: #9ca3af !important;
    margin: 0 auto !important;
}

[class$="-step-item"].active [class$="-step-circle"] {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border-color: #667eea !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3) !important;
}

[class$="-step-item"].completed [class$="-step-circle"] {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

[class$="-step-label"] {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    text-align: center !important;
    margin-top: 8px !important;
    white-space: nowrap !important;
}

[class$="-step-item"].active [class$="-step-label"] {
    color: #667eea !important;
    font-weight: 600 !important;
}

/* 4. Ligne entre les étapes */
[class$="-step-line"] {
    height: 3px !important;
    background: #e5e7eb !important;
    flex: 1 !important;
    margin: 0 15px !important;
    margin-top: -30px !important; /* Aligne la ligne avec les cercles */
    z-index: 1 !important;
}

[class$="-step-line"].completed {
    background: linear-gradient(90deg, #667eea, #764ba2) !important;
}

/* 5. Conteneur des étapes (pour éviter que ça se colle) */
[class$="-steps"] {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    margin-bottom: 30px !important;
    padding: 0 10px !important;
}

[class$="-step-item"] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
    z-index: 2 !important;
    flex: 1 !important;
}

/* 6. Corriger les inputs pour qu'ils soient plus hauts */
[class$="-input"], [class$="-select"], [class$="-textarea"] {
    height: auto !important;
    min-height: 48px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    background-color: #ffffff !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 12px !important;
}

[class$="-input"]:focus, [class$="-select"]:focus, [class$="-textarea"]:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
    outline: none !important;
}

/* 7. Le compteur d'étape (Étape 2/3) */
[class$="-step-counter"] {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #9ca3af !important;
    background: #f3f4f6 !important;
    padding: 8px 16px !important;
    border-radius: 30px !important;
    white-space: nowrap !important;
}

.sell-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: wisdak-spin 0.8s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* On désactive l'animation quand le texte est affiché à la fin */
.sell-spinner span {
    animation: none;
}