/* Referral — section shop (hors carte produit) */

.shop-section--referral {
    margin-top: clamp(1rem, 3vw, 2rem);
    margin-bottom: clamp(3.5rem, 8vw, 5.5rem);
    padding-top: clamp(2.5rem, 6vw, 4rem);
    border-top: 1px solid rgba(44, 18, 59, 0.1);
}

.shop-referral {
    display: flex;
    flex-direction: column;
    gap: clamp(1.75rem, 4.5vw, 2.75rem);
    max-width: 52rem;
}

.shop-referral__header {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.8vw, 1.5rem);
}

.shop-referral__title {
    line-height: 1.08;
    letter-spacing: -0.03em;
    max-width: 14ch;
}

.shop-referral__lead {
    line-height: 1.5;
    max-width: 38rem;
}

/* Récompenses */
.shop-referral__rewards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.shop-referral__reward {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    padding: 0.85rem 1.15rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(104, 92, 143, 0.18);
    box-shadow: 0 4px 18px rgba(44, 18, 59, 0.06);
}

.shop-referral__reward img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.shop-referral__reward-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #685C8F;
    width: 100%;
    line-height: 1.2;
}

.shop-referral__reward:not(.shop-referral__reward--uses) .shop-referral__reward-label {
    width: auto;
}

.shop-referral__reward-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #2C123B;
    line-height: 1;
}

.shop-referral__reward:first-child .shop-referral__reward-value {
    color: #A030FF;
}

.shop-referral__reward-suffix {
    font-size: 0.9rem;
    font-weight: 600;
    color: #685C8F;
}

.shop-referral__reward--uses {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    background: color-mix(in srgb, #A030FF 6%, #fff);
    border-color: color-mix(in srgb, #A030FF 20%, transparent);
}

.shop-referral__reward--uses .shop-referral__reward-value,
.shop-referral__reward--uses .shop-referral__reward-suffix {
    display: inline;
}

/* Lien + bouton */
.shop-referral__actions {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    padding: clamp(1rem, 2.5vw, 1.25rem);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(160, 48, 255, 0.1) 0%, rgba(255, 48, 160, 0.06) 55%, rgba(255, 176, 48, 0.08) 100%);
    border: 1px solid rgba(160, 48, 255, 0.16);
    box-shadow: 0 8px 28px rgba(160, 48, 255, 0.1);
}

.shop-referral__input {
    flex: 1;
    min-width: 0;
    padding: 0.85rem 1.1rem;
    border: 1.5px solid rgba(104, 92, 143, 0.28);
    border-radius: 14px;
    font-size: 0.88rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 500;
    color: #2C123B;
    background: #fff;
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(44, 18, 59, 0.04);
}

.shop-referral__input:focus {
    outline: none;
    border-color: #A030FF;
    box-shadow:
        inset 0 1px 2px rgba(44, 18, 59, 0.04),
        0 0 0 3px rgba(160, 48, 255, 0.2);
}

.shop-referral__copy {
    flex-shrink: 0;
    align-self: center;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff !important;
    cursor: pointer;
    background: linear-gradient(135deg, #A030FF 0%, #FF30A0 48%, #FFB030 100%) !important;
    --btn-3d-shadow: color-mix(in srgb, #A030FF 76%, black);
    box-shadow:
        0 var(--btn-3d-md-depth, 4px) 0 var(--btn-3d-shadow),
        0 8px 22px rgba(160, 48, 255, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.shop-referral__copy:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow:
        0 var(--btn-3d-md-depth-hover, 6px) 0 var(--btn-3d-shadow),
        0 10px 26px rgba(160, 48, 255, 0.42);
}

.shop-referral__copy:active {
    transform: translateY(2px);
    box-shadow:
        0 var(--btn-3d-md-depth-active, 2px) 0 var(--btn-3d-shadow),
        0 4px 14px rgba(160, 48, 255, 0.28);
}

.shop-referral__copy.is-copied {
    background: linear-gradient(135deg, #3d9d6a 0%, #52b87a 100%) !important;
    --btn-3d-shadow: color-mix(in srgb, #3d9d6a 76%, black);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 640px) {
    .shop-referral__title {
        max-width: none;
    }

    .shop-referral__rewards {
        flex-direction: column;
    }

    .shop-referral__reward {
        width: 100%;
        box-sizing: border-box;
    }

    .shop-referral__actions {
        flex-direction: column;
    }

    .shop-referral__copy {
        width: 100%;
        text-align: center;
    }
}
