/* Espace parrainage. Reprend les codes de l'espace crédits : cartes, ronds bleus pâles,
   boutons en contour, pastilles arrondies. */

.referral-page .card-title {
    font-weight: 700;
    color: var(--bh-accent-dark);
}

.referral-page .card-title small.grey {
    font-weight: 400;
}

/* ---------------------------------------------------------------- Code et lien */

.referral-share-card {
    border-left: 4px solid var(--bh-blue-dark);
}

.referral-code-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.referral-code-block,
.referral-link-block {
    margin-bottom: 18px;
}

.referral-code-row,
.referral-link-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.referral-code {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bh-blue-soft-bg);
    color: var(--bh-accent-dark);
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    font-family: inherit;
    overflow-wrap: anywhere;
}

.referral-link-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 1px solid var(--bh-border);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13px;
    color: #4B5563;
    background: #fff;
}

.referral-link-input:focus {
    outline: none;
    border-color: var(--bh-blue-dark);
}

.referral-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1px solid var(--bh-blue-dark);
    color: var(--bh-blue-dark);
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.referral-copy-btn:hover,
.referral-copy-btn:focus {
    background: var(--bh-blue-soft-bg);
    outline: none;
}

.referral-copy-btn.is-copied {
    background: #E3F5EC;
    border-color: #1F7A52;
    color: #1F7A52;
}

.referral-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.referral-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid var(--bh-blue-dark);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.referral-btn.is-primary {
    background: var(--bh-blue-dark);
    color: #fff;
}

.referral-btn.is-primary:hover,
.referral-btn.is-primary:focus {
    background: var(--bh-blue-dark-hover);
    border-color: var(--bh-blue-dark-hover);
    color: #fff;
    text-decoration: none;
}

.referral-btn.is-ghost {
    background: #fff;
    color: var(--bh-blue-dark);
}

.referral-btn.is-ghost:hover,
.referral-btn.is-ghost:focus {
    background: var(--bh-blue-soft-bg);
    color: var(--bh-blue-dark-hover);
    text-decoration: none;
}

.referral-btn.is-copied {
    background: #E3F5EC;
    border-color: #1F7A52;
    color: #1F7A52;
}

/* Sert de source à la copie, sans être visible. */
.referral-hidden-message {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* ---------------------------------------------------------------- Progression */

.referral-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.referral-stat {
    flex: 1 1 0;
    min-width: 0;
    background: var(--bh-gray-section);
    border-radius: 10px;
    padding: 14px 8px;
    text-align: center;
}

.referral-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--bh-accent-dark);
    line-height: 1.1;
}

.referral-stat-value.is-ok {
    color: #1F7A52;
}

.referral-stat-label {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-top: 3px;
}

.referral-tier-current {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bh-blue-soft-bg);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--bh-accent-dark);
    margin-bottom: 14px;
}

.referral-tier-current i {
    color: var(--bh-blue-dark);
    font-size: 17px;
}

.referral-progress-bar {
    height: 10px;
    background: var(--bh-gray-section);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.referral-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--bh-blue-dark), var(--bh-blue-dark-hover));
    border-radius: 999px;
    transition: width 0.4s ease;
}

.referral-progress-hint {
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 20px;
}

.referral-progress-hint i {
    color: #E8A33D;
}

/* ---------------------------------------------------------------- Paliers */

.referral-tiers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.referral-tier {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--bh-border);
    border-radius: 10px;
    padding: 12px 14px;
}

.referral-tier.is-current {
    border-color: var(--bh-blue-dark);
    background: var(--bh-blue-soft-bg);
}

.referral-tier-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bh-gray-section);
    color: #9CA3AF;
    font-size: 13px;
    flex-shrink: 0;
}

.referral-tier.is-reached .referral-tier-icon {
    background: #E3F5EC;
    color: #1F7A52;
}

.referral-tier-text {
    flex: 1 1 auto;
    min-width: 0;
}

.referral-tier-name {
    font-weight: 700;
    color: var(--bh-accent-dark);
    font-size: 14px;
}

.referral-tier-amount {
    font-weight: 700;
    color: var(--bh-blue-dark);
    font-size: 15px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ---------------------------------------------------------------- Filleuls */

.referral-list.is-scrollable {
    max-height: 340px;
    overflow-y: auto;
    padding-right: 6px;
}

.referral-list.is-scrollable::-webkit-scrollbar {
    width: 6px;
}

.referral-list.is-scrollable::-webkit-scrollbar-thumb {
    background: var(--bh-border);
    border-radius: 3px;
}

.referral-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--bh-border);
}

.referral-row:last-child {
    border-bottom: none;
}

.referral-row-company {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.referral-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bh-blue-soft-bg);
    color: var(--bh-blue-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.referral-row-name {
    font-weight: 600;
    color: var(--bh-accent-dark);
    font-size: 15px;
    overflow-wrap: anywhere;
}

.referral-row-status {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.referral-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

.referral-status.is-ok {
    background: #E3F5EC;
    color: #1F7A52;
}

.referral-status.is-pending {
    background: var(--bh-gray-section);
    color: #6B7280;
}

.referral-row-credits {
    font-weight: 700;
    color: #1F7A52;
    font-size: 14px;
    white-space: nowrap;
}

/* ---------------------------------------------------------------- Rattrapage et divers */

.referral-attach-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.referral-attach-input {
    flex: 1 1 220px;
    min-width: 0;
    border: 1px solid var(--bh-border);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.referral-attach-input:focus {
    outline: none;
    border-color: var(--bh-blue-dark);
}

.referral-empty {
    text-align: center;
    color: #9CA3AF;
    padding: 30px 16px;
}

.referral-empty i {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.5;
}

.referral-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bh-blue-soft-bg);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13.5px;
    color: var(--bh-accent-dark);
}

.referral-hint i {
    color: var(--bh-blue-dark);
}

/* ---------------------------------------------------------------- Téléphone */

@media (max-width: 767.98px) {
    .referral-code {
        font-size: 17px;
        letter-spacing: 1px;
        padding: 12px;
    }

    .referral-code-row,
    .referral-link-row {
        flex-direction: column;
    }

    .referral-copy-btn {
        justify-content: center;
    }

    .referral-share-actions .referral-btn {
        flex: 1 1 100%;
    }

    .referral-stats {
        gap: 8px;
    }

    .referral-stat {
        padding: 11px 4px;
    }

    .referral-stat-value {
        font-size: 20px;
    }

    .referral-stat-label {
        font-size: 11px;
        line-height: 1.25;
    }

    .referral-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .referral-row-status {
        width: 100%;
        justify-content: space-between;
    }

    .referral-attach-form .referral-btn {
        width: 100%;
    }
}
