/* ==========================================================================
   SD Trading Form - styles front-end
   ========================================================================== */

.sdtf-form {
    max-width: 560px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
}

/* Pas d'espace résiduel sous le formulaire */
.sdtf-form,
.sdtf-form .sdtf-message:empty {
    margin-bottom: 0 !important;
}

.sdtf-form *,
.sdtf-form *::before,
.sdtf-form *::after {
    box-sizing: border-box;
}

/* ---------- Variante par défaut ---------- */

.sdtf-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #111;
    text-align: center;
}

.sdtf-subtitle {
    margin: 0 0 18px;
    font-size: 14px;
    color: #555;
    text-align: center;
}

.sdtf-logo {
    text-align: center;
    margin-bottom: 18px;
}

.sdtf-logo img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.sdtf-hl {
    color: #f59e0b;
}

.sdtf-fields {
    display: block;
}

.sdtf-compact .sdtf-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.sdtf-field {
    margin-bottom: 12px;
    position: relative;
}

.sdtf-compact .sdtf-field {
    margin-bottom: 0;
}

.sdtf-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sdtf-field input {
    width: 100%;
    padding: 13px 15px 13px 42px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.4;
    background: #fff;
    color: #111;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}

.sdtf-field input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
}

.sdtf-field input::placeholder {
    color: #9ca3af;
}

.sdtf-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.sdtf-submit {
    width: 100%;
    padding: 14px 18px;
    margin-top: 10px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background .15s, transform .05s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    -webkit-appearance: none;
    appearance: none;
}

.sdtf-submit:hover:not(:disabled) {
    background: #16a34a;
}

.sdtf-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.sdtf-submit:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.sdtf-btn-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sdtf-spin .7s linear infinite;
}

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

.sdtf-message {
    display: none;
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
}

.sdtf-message.sdtf-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.sdtf-message.sdtf-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ==========================================================================
   Variante "card-dark" : reproduit exactement le visuel actuel de Hustle
   Fond bleu marine foncé, titre blanc avec surlignage orange, icônes grises
   ========================================================================== */

.sdtf-form.sdtf-card-dark {
    background: #0b1f3a;
    background: linear-gradient(180deg, #0d2340 0%, #09182c 100%);
    border-radius: 16px;
    padding: 34px 34px 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    max-width: 600px;
}

.sdtf-card-dark .sdtf-logo {
    margin-bottom: 18px;
}

.sdtf-card-dark .sdtf-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 22px;
    text-align: center;
}

.sdtf-card-dark .sdtf-subtitle {
    color: #cfd8e3;
    margin: -12px 0 20px;
}

.sdtf-card-dark .sdtf-hl {
    color: #f59e0b;
    font-weight: 700;
}

.sdtf-card-dark .sdtf-field input {
    background: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 4px;
    padding: 13px 15px 13px 42px;
    color: #111;
    font-size: 14px;
    height: 46px;
}

.sdtf-card-dark .sdtf-field input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .25);
}

.sdtf-card-dark .sdtf-field input::placeholder {
    color: #9ca3af;
}

.sdtf-card-dark .sdtf-icon {
    color: #6b7280;
}

.sdtf-card-dark .sdtf-submit {
    background: #4caf50;
    border-radius: 4px;
    font-size: 14px;
    height: 46px;
    padding: 0 18px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 14px;
}

.sdtf-card-dark .sdtf-submit:hover:not(:disabled) {
    background: #3f9c42;
}

.sdtf-card-dark .sdtf-message {
    margin-top: 16px;
}

/* Accessibility */
.sdtf-form .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Responsive */
@media (max-width: 600px) {
    .sdtf-form.sdtf-card-dark {
        padding: 24px 20px 22px;
        border-radius: 12px;
    }
    .sdtf-card-dark .sdtf-title {
        font-size: 16px;
    }
    .sdtf-compact .sdtf-fields {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .sdtf-compact .sdtf-field {
        margin-bottom: 12px;
    }
    .sdtf-title {
        font-size: 19px;
    }
}
