.social-pill-group {
    position: relative;
    display: inline-flex;
    z-index: 102;
}

.social-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto;
    max-width: 100%;
    height: auto;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid rgba(28, 28, 27, 0.08);
    border-radius: 12px;
    background: #ffffff;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: rgb(28, 28, 27);
    font-family: "TikTok Sans", sans-serif;
    font-size: 14px;
    line-height: 24px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease-out, color 0.2s ease-out, border-color 0.2s ease-out;
}

.social-pill:hover,
.social-pill-group:hover .social-pill,
.social-pill-group.is-open .social-pill {
    background: #1c1c1b;
    color: #e3ef68;
    text-decoration: none;
    border: 1px solid #242423;
}

.social-pill--trigger {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
}

.social-pill__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    flex-shrink: 0;
}

.social-pill__icon-svg {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.social-pill__count {
    display: inline-block;
    font-size: 14px;
    font-family: "TikTok Sans", sans-serif;
    font-weight: 600;
    line-height: 14px;
    color: inherit;
}

.social-pill__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    padding: 6px;
    border: 1px solid #242423;
    border-radius: 12px;
    background: #1c1c1b;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none;
    transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
    z-index: 9999;
    will-change: top, left, opacity;
}

.social-pill__dropdown::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.social-pill__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px;
    border-radius: 10px;
    color: #f4f8cc;
    font-family: "TikTok Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.social-pill__item:hover {
    background: #242423;
    text-decoration: underline;
}

.social-pill__item.is-disabled {
    opacity: 0.6;
    cursor: default;
}

.social-pill__item-name {
    font-weight: 400;
    text-transform: uppercase;
}

.social-pill-group.drop-up .social-pill__dropdown {
    top: auto;
    bottom: calc(100% + 8px);
}

.social-pill-group.align-right .social-pill__dropdown {
    left: auto;
    right: 0;
}

/* On évite le hover-open CSS, car le dropdown est déplacé dans body par JS */
/* Supprimé volontairement :
@media (hover: hover) and (pointer: fine) {
    .social-pill-group:hover .social-pill__dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}
*/

.social-pill-group.is-open .social-pill__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

.social-pill__dropdown-header {
    padding: 4px;
    gap: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.social-pill__dropdown-header--icon {
    color: var(--vert);
    height: 20px;
    width: 20px;
}

.social-pill__dropdown-header--count {
    color: var(--vert);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-weight: 600;
}

.social-pill__dropdown-header--count span {
    color: #8d8d8d;
    font-weight: 400;
}

.social-pill__dropdown-divider {
    width: 100%;
    height: 1px;
    background-color: #323231;
    margin-bottom: 6px;
}

.menu-mobile .social-pill {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* Très important quand le dropdown est déplacé dans body */
body > .social-pill__dropdown {
    position: fixed !important;
    transform: none !important;
    pointer-events: auto;
}