/* ================================================
   Promoter Signup — standalone stylesheet
   ================================================ */

/* Page */
.ps-page {
    min-height: 100vh;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}

/* Card */
.ps-card {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
    padding: 2.5rem 2.5rem 2rem;
}

/* Header */
.ps-logo {
    width: 48px;
    height: 48px;
    background: #1a56db;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.ps-logo i {
    color: #fff;
    font-size: 1.25rem;
}

.ps-header {
    text-align: center;
    margin-bottom: 2rem;
}

.ps-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
}

.ps-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Alert */
.ps-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.ps-alert--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.ps-alert--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.ps-alert--warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Form */
.ps-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Row 2 colonnes */
.ps-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Champ */
.ps-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Label */
.ps-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
}

.ps-required {
    color: #ef4444;
    margin-left: 2px;
}

/* Inputs */
.ps-input,
.ps-form input:not([type="checkbox"]):not([type="hidden"]),
.ps-form select,
.ps-form textarea {
    width: 100%;
    padding: 0.65rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #111827;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.ps-form input:not([type="checkbox"]):not([type="hidden"]):focus,
.ps-form select:focus,
.ps-form textarea:focus {
    border-color: #1a56db;
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}

.ps-form textarea {
    min-height: 80px;
    resize: vertical;
}

/* Password Toggle */
.ps-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ps-password-wrapper input {
    padding-right: 2.75rem !important;
}

.ps-password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    outline: none;
    transition: color 0.15s ease;
}

.ps-password-toggle:hover {
    color: #374151;
}

/* Consentements */
.ps-checks {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ps-check {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.5;
}

.ps-check input[type="checkbox"] {
    margin-top: 2px;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    accent-color: #1a56db;
    cursor: pointer;
}

.ps-check a {
    color: #1a56db;
    text-decoration: none;
}

.ps-check a:hover {
    text-decoration: underline;
}

/* Captcha */
.ps-captcha {
    display: flex;
    justify-content: center;
}

/* Erreur */
.ps-error {
    font-size: 0.8rem;
    color: #dc2626;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ps-error::before {
    content: '⚠';
}

/* Validation HTMX */
.htmx-validation-error {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.htmx-validation-ok {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #059669;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Bouton */
.ps-submit {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1a56db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    margin-top: 0.25rem;
}

.ps-submit:hover {
    background: #1e429f;
}

.ps-submit:active {
    transform: scale(0.99);
}

/* Lien bas de page */
.ps-footer-link {
    text-align: center;
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 1.25rem 0 0;
}

.ps-footer-link a {
    color: #1a56db;
    font-weight: 500;
    text-decoration: none;
}

.ps-footer-link a:hover {
    text-decoration: underline;
}

/* Container HTMX vide */
#developer-custom-container:empty {
    display: none;
}

/* Responsive */
@media (max-width: 600px) {
    .ps-card {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: 8px;
    }

    .ps-row {
        grid-template-columns: 1fr;
    }

    .ps-title {
        font-size: 1.25rem;
    }
}
