/* ALPHEA SUITE — MENU UTILISATEUR PREMIUM */

.alphea-user-menu {
    position: relative;
    flex: 0 0 auto;
}

body.alphea-v2 .alphea-user-button {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    min-width: 156px !important;
    height: 46px !important;
    padding: 5px 10px 5px 6px !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    background: transparent !important;
    color: #0f172a !important;
    box-shadow: none !important;
    cursor: pointer !important;
}

body.alphea-v2 .alphea-user-button:hover,
body.alphea-v2 .alphea-user-menu.is-open .alphea-user-button {
    border-color: #dbe3ed !important;
    background: #f8fafc !important;
}

.alphea-user-button-copy {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
}

.alphea-user-button-copy strong {
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 850 !important;
}

.alphea-user-button-copy small {
    color: #64748b !important;
    font-size: 10px !important;
}

.alphea-user-chevron {
    color: #94a3b8;
    font-size: 12px;
    transition: transform 150ms ease;
}

.alphea-user-menu.is-open .alphea-user-chevron {
    transform: rotate(180deg);
}

.alphea-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 100000;
    width: 320px;
    overflow: hidden;
    border: 1px solid #dce3ed;
    border-radius: 18px;
    background: #ffffff;
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.20),
        0 8px 20px rgba(15, 23, 42, 0.08);
    animation: alpheaUserOpen 140ms ease-out;
}

.alphea-user-dropdown[hidden] {
    display: none !important;
}

@keyframes alpheaUserOpen {
    from {
        opacity: 0;
        transform: translateY(-7px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.alphea-user-profile {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    gap: 12px;
    padding: 17px;
    border-bottom: 1px solid #edf1f5;
    background: linear-gradient(180deg, #ffffff, #fafcff);
}

.alphea-user-profile-avatar {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(30, 58, 138, .22);
}

.alphea-user-profile > div:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.alphea-user-profile strong {
    color: #0f172a !important;
    font-size: 14px;
}

.alphea-user-profile span {
    color: #334155;
    font-size: 11px;
    font-weight: 700;
}

.alphea-user-profile small {
    color: #16a34a;
    font-size: 10px;
    font-weight: 700;
}

.alphea-user-links {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 9px;
}

.alphea-user-links a,
.alphea-user-logout {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #0f172a;
    text-decoration: none;
}

.alphea-user-links a:hover,
.alphea-user-links a:focus {
    border-color: #dbeafe;
    outline: none;
    background: #eff6ff;
}

.alphea-user-links a > span,
.alphea-user-logout > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #dce5f0;
    border-radius: 10px;
    background: #fff;
    color: #1d4ed8;
    font-weight: 850;
}

.alphea-user-links a > div,
.alphea-user-logout > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.alphea-user-links strong,
.alphea-user-logout strong {
    color: #16213a !important;
    font-size: 12px !important;
}

.alphea-user-links small,
.alphea-user-logout small {
    color: #64748b;
    font-size: 10px;
}

.alphea-user-separator {
    height: 1px;
    margin: 5px 6px;
    background: #edf1f5;
}

.alphea-user-section-title {
    padding: 3px 8px 4px;
    color: #94a3b8;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.alphea-user-logout-wrap {
    padding: 9px;
    border-top: 1px solid #edf1f5;
    background: #fbfcfe;
}

.alphea-user-logout:hover {
    background: #fef2f2;
    border-color: #fecaca;
}

.alphea-user-logout > span {
    border-color: #fecaca;
    color: #dc2626;
}

.alphea-user-logout strong {
    color: #b91c1c !important;
}

html[data-alphea-theme="dark"] .alphea-user-dropdown {
    border-color: #2e3d54;
    background: #101a2b;
}

html[data-alphea-theme="dark"] .alphea-user-profile {
    border-color: #26344a;
    background: linear-gradient(180deg, #142034, #101a2b);
}

html[data-alphea-theme="dark"] .alphea-user-profile strong,
html[data-alphea-theme="dark"] .alphea-user-links strong {
    color: #f1f5f9 !important;
}

html[data-alphea-theme="dark"] .alphea-user-profile span,
html[data-alphea-theme="dark"] .alphea-user-links small {
    color: #91a1b8;
}

html[data-alphea-theme="dark"] .alphea-user-links a:hover {
    border-color: #35527b;
    background: rgba(59, 130, 246, .14);
}

html[data-alphea-theme="dark"] .alphea-user-links a > span {
    border-color: #314a6c;
    background: #19283d;
    color: #78b5ff;
}

html[data-alphea-theme="dark"] .alphea-user-logout-wrap {
    border-color: #26344a;
    background: #0d1727;
}

@media (max-width: 1250px) {
    body.alphea-v2 .alphea-user-button {
        min-width: 44px !important;
        width: 44px !important;
        padding: 5px !important;
    }

    .alphea-user-button-copy,
    .alphea-user-chevron {
        display: none;
    }
}
