/* ============================================================
   BMO Transfer — Styles Public (formulaire + suivi)
   ============================================================ */

.bmo-wrap {
    max-width: 680px;
    margin: 24px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1e1e1e;
    position: relative;
}

/* Titres */
.bmo-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #1e3a5f;
}

.bmo-subtitle {
    color: #666;
    margin-bottom: 24px;
    font-size: .95rem;
}

/* Champs */
.bmo-field {
    margin-bottom: 18px;
}

.bmo-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: .9rem;
    color: #333;
}

.bmo-field input,
.bmo-field select,
.bmo-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #d1d9e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color .2s;
    box-sizing: border-box;
    background: #fff;
}

.bmo-field input:focus,
.bmo-field select:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, .15);
}

.bmo-field input.bmo-error,
.bmo-field select.bmo-error {
    border-color: #d63638;
}

.bmo-field .bmo-field-error {
    color: #d63638;
    font-size: .82rem;
    margin-top: 4px;
}

.bmo-required {
    color: #d63638;
}

/* Groupes de deux colonnes */
.bmo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .bmo-row { grid-template-columns: 1fr; }
}

/* Section avec titre */
.bmo-section-title {
    font-weight: 700;
    font-size: 1rem;
    color: #2271b1;
    border-bottom: 2px solid #e8f0fa;
    padding-bottom: 6px;
    margin: 24px 0 16px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .8rem;
}

/* Boutons */
.bmo-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.bmo-btn-primary   { background: #2271b1; color: #fff; }
.bmo-btn-primary:hover  { background: #135e96; transform: translateY(-1px); }

.bmo-btn-secondary { background: #f0f0f1; color: #333; }
.bmo-btn-secondary:hover { background: #ddd; }

.bmo-btn-success   { background: #00a32a; color: #fff; }
.bmo-btn-success:hover { background: #007a1f; transform: translateY(-1px); }

.bmo-btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }

.bmo-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Messages */
.bmo-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .95rem;
}

.bmo-message.bmo-success { background: #d8ffd8; color: #0a4a0a; border-left: 4px solid #00a32a; }
.bmo-message.bmo-error   { background: #ffd8d8; color: #4a0a0a; border-left: 4px solid #d63638; }
.bmo-message.bmo-info    { background: #e8f0fa; color: #1e3a5f; border-left: 4px solid #2271b1; }

/* Résumé avant confirmation */
.bmo-summary {
    background: #f8fafc;
    border: 1px solid #d1d9e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.bmo-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eef0f3;
    font-size: .9rem;
}

.bmo-summary-row:last-child { border-bottom: none; }
.bmo-summary-row .label  { color: #666; }
.bmo-summary-row .value  { font-weight: 600; }

/* Résultat final */
.bmo-result-box {
    text-align: center;
    padding: 32px;
    border-radius: 12px;
    margin: 16px 0;
}

.bmo-result-box.success { background: #d8ffd8; border: 2px solid #00a32a; }
.bmo-result-box.error   { background: #ffd8d8; border: 2px solid #d63638; }

.bmo-result-icon  { font-size: 3rem; margin-bottom: 12px; }
.bmo-result-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }

.bmo-result-ref {
    background: rgba(0,0,0,.05);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: .9rem;
    margin-top: 12px;
}

/* Tableau de suivi */
.bmo-result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.bmo-result-table tr { border-bottom: 1px solid #eee; }
.bmo-result-table td { padding: 8px 12px; font-size: .9rem; }
.bmo-result-table td:first-child { font-weight: 600; color: #666; width: 50%; }

/* Loader */
.bmo-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 100;
}

.bmo-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #d1d9e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: bmo-spin .8s linear infinite;
}

@keyframes bmo-spin {
    to { transform: rotate(360deg); }
}

/* Cache */
.bmo-hidden { display: none !important; }
