#ecofin-safe-wrapper {
    max-width: 700px;
}

.ecofin-box,
.ecofin-pilier-box {
    background: #0d47a1;
    color: #fff;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
}

.ecofin-piliers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ecofin-pilier-box {
    flex: 1 1 45%;
    display: flex;
    justify-content: space-between;
}

#validation-message {
    margin: 10px 0;
    font-weight: bold;
}

#validation-message.error {
    color: red;
}

/* ----------------------
   1. Dépôt : choix du pilier
---------------------- */
#depot-pilier {
    display: none;
    margin: 10px 0;
}

#depot-pilier select {
    width: 100%;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* ----------------------
   2. Retrait : frais et total
---------------------- */
#retrait-frais {
    display: none;
    margin: 10px 0;
    background: #1565c0; /* légèrement différent pour distinction */
    padding: 10px;
    border-radius: 6px;
    color: #fff;
}

#retrait-frais div {
    margin: 4px 0;
}

/* ----------------------
   3. Virement entre piliers
---------------------- */
#virement-piliers {
    display: none;
    margin: 10px 0;
}

#virement-piliers select {
    width: 48%;
    padding: 6px;
    margin-right: 4%;
    border-radius: 4px;
    border: 1px solid #ccc;
}

#virement-piliers select:last-child {
    margin-right: 0;
}

/* ----------------------
   4. Virement autre Eco-partenaire
---------------------- */
#virement-autre {
    display: none;
    margin: 10px 0;
}

#virement-autre input {
    width: 100%;
    padding: 6px;
    margin-bottom: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* ----------------------
   5. Validation message frais
---------------------- */
#frais-ecofin,
#frais-gestion,
#total-retrait {
    font-weight: bold;
}

/* Boutons valider et envoyer */
#transmettre-doc-btn,
#valider-montant,
#submit-btn {
    background-color: #0073aa; /* bleu Ecofin */
    color: #fff;
    font-weight: bold;
    font-size: 12px;
    padding: 6px 12px; /* réduit la taille des boutons */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}
#transmettre-doc-btn,
#valider-montant:hover,
#submit-btn:hover {
    background-color: #005177; /* bleu plus foncé au hover */
}

#valider-montant:disabled,
#submit-btn:disabled {
    background-color: #a0c4dc; /* gris-bleu quand désactivé */
    cursor: not-allowed;
}

/* --- CSS à ajouter --- */
.button-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px; /* espace entre spinner et texte si besoin */
}

.button-loading .spinner {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg);}
    100% { transform: rotate(360deg);}
}

