* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  }

body {
font-family: Arial, Helvetica, sans-serif;
background: #F7F5FC;
color: #17151F;
}

.login-page {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}

.login-card {
width: 100%;
max-width: 430px;
background: white;
border-radius: 24px;
padding: 42px;
box-shadow: 0 15px 50px rgba(50, 30, 80, 0.08);
}

.logo {
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
margin-bottom: 32px;
font-size: 28px;
font-weight: 700;
color: #7C3AED;
}

.logo-icon {
width: 44px;
height: 44px;
border-radius: 13px;
background: #7C3AED;
color: white;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
font-weight: 700;
}

h1 {
text-align: center;
font-size: 28px;
margin-bottom: 10px;
}

.subtitle {
text-align: center;
color: #777180;
margin-bottom: 32px;
font-size: 15px;
}

.input-group {
margin-bottom: 20px;
}

.input-group label {
display: block;
margin-bottom: 8px;
font-size: 14px;
font-weight: 600;
}

.input-group input {
width: 100%;
height: 50px;
border: 1px solid #DDD8E5;
border-radius: 12px;
padding: 0 15px;
font-size: 15px;
outline: none;
transition: 0.2s;
}

.input-group input:focus {
border-color: #7C3AED;
box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10);
}

.login-button {
width: 100%;
height: 52px;
border: none;
border-radius: 12px;
background: #7C3AED;
color: white;
font-size: 15px;
font-weight: 700;
cursor: pointer;
transition: 0.2s;
}

.login-button:hover {
transform: translateY(-1px);
background: #6D28D9;
}

.login-button:active {
transform: translateY(0);
}

.login-info {
text-align: center;
margin-top: 25px;
color: #8A8492;
font-size: 12px;
line-height: 1.5;
}

@media (max-width: 500px) {
.login-card {
padding: 30px 22px;
border-radius: 20px;
}

h1 {
    font-size: 24px;
}
}
.app {
min-height: 100vh;
display: flex;
background: #F7F5FC;
}

.sidebar {
width: 250px;
min-height: 100vh;
background: white;
border-right: 1px solid #ECE8F2;
padding: 25px 16px;
display: flex;
flex-direction: column;
}

.brand {
display: flex;
align-items: center;
gap: 10px;
padding: 0 10px;
margin-bottom: 40px;
font-size: 25px;
font-weight: 700;
color: #7C3AED;
}

.brand-icon {
width: 42px;
height: 42px;
border-radius: 12px;
background: #7C3AED;
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
}

.navigation {
display: flex;
flex-direction: column;
gap: 6px;
}

.nav-item {
display: flex;
align-items: center;
gap: 13px;
height: 48px;
padding: 0 14px;
border-radius: 12px;
text-decoration: none;
color: #6F6978;
font-size: 14px;
font-weight: 600;
transition: 0.2s;
}

.nav-item span:first-child {
width: 20px;
text-align: center;
font-size: 19px;
}

.nav-item:hover {
background: #F4F0FA;
color: #7C3AED;
}

.nav-item.active {
background: #F0EAFE;
color: #7C3AED;
}

/* Onglets réservés au staff : actif en jaune comme les autres onglets ont leur couleur active. */
.nav-item.staff-nav.active {
background: #FFF4BF;
color: #9A6700;
}

.nav-item.staff-nav:hover {
background: #FFF8D9;
color: #9A6700;
}

.sidebar-bottom {
margin-top: auto;
display: flex;
flex-direction: column;
gap: 6px;
}

.logout-button {
width: 100%;
height: 48px;
border: none;
background: transparent;
border-radius: 12px;
padding: 0 14px;
display: flex;
align-items: center;
gap: 13px;
color: #8A8492;
font-size: 14px;
font-weight: 600;
cursor: pointer;
text-align: left;
}

.logout-button:hover {
background: #F9F7FB;
color: #7C3AED;
}

.main-content {
flex: 1;
min-width: 0;
}

.topbar {
height: 90px;
background: white;
border-bottom: 1px solid #ECE8F2;
padding: 0 45px;
display: flex;
align-items: center;
justify-content: space-between;
}

.topbar h1 {
text-align: left;
font-size: 24px;
margin-bottom: 5px;
}

.topbar p {
color: #8A8492;
font-size: 13px;
}

.mail-button {
position: relative;
width: 44px;
height: 44px;
border: 1px solid #E5E0EB;
border-radius: 12px;
background: white;
cursor: pointer;
font-size: 18px;
}

.notification-dot {
position: absolute;
top: 5px;
right: 5px;
width: 9px;
height: 9px;
border-radius: 50%;
background: #7C3AED;
box-shadow: 0 0 0 2px #fff;
pointer-events: none;
z-index: 2;
}

.content {
max-width: 1050px;
margin: 0 auto;
padding: 40px 30px 60px;
}

.welcome-card {
background: #7C3AED;
color: white;
border-radius: 22px;
padding: 32px;
margin-bottom: 38px;
}

.welcome-small {
opacity: 0.8;
font-size: 13px;
margin-bottom: 8px;
}

.welcome-card h2 {
font-size: 25px;
margin-bottom: 10px;
}

.welcome-card p {
line-height: 1.5;
font-size: 14px;
}

.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}

.section-header h2 {
font-size: 19px;
}

.profile-card {
background: white;
border: 1px solid #ECE8F2;
border-radius: 18px;
padding: 22px;
display: flex;
align-items: center;
gap: 18px;
margin-bottom: 38px;
}

.profile-avatar {
width: 62px;
height: 62px;
flex-shrink: 0;
border-radius: 18px;
background: #F0EAFE;
color: #7C3AED;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
font-weight: 700;
}

.profile-info {
flex: 1;
}

.profile-info h3 {
font-size: 17px;
margin-bottom: 4px;
}

.profile-info p {
color: #817A8C;
font-size: 13px;
margin-top: 3px;
}

.secondary-button {
border: 1px solid #DDD8E5;
background: white;
border-radius: 10px;
padding: 10px 15px;
cursor: pointer;
font-weight: 600;
color: #5E5868;
}

.secondary-button:hover {
border-color: #7C3AED;
color: #7C3AED;
}

.text-button {
border: none;
background: transparent;
color: #7C3AED;
font-weight: 600;
cursor: pointer;
}

.empty-card {
background: white;
border: 1px solid #ECE8F2;
border-radius: 18px;
padding: 35px;
text-align: center;
}

.empty-icon {
font-size: 30px;
color: #7C3AED;
margin-bottom: 10px;
}

.empty-card h3 {
margin-bottom: 7px;
}

.empty-card p {
color: #817A8C;
font-size: 13px;
max-width: 450px;
margin: auto;
line-height: 1.5;
}

@media (max-width: 750px) {

.sidebar {
    width: 75px;
    padding: 20px 10px;
}

.brand {
    justify-content: center;
    padding: 0;
}

.brand span,
.nav-item span:last-child,
.logout-button span:last-child {
    display: none;
}

.nav-item,
.logout-button {
    justify-content: center;
    padding: 0;
}

.topbar {
    padding: 0 20px;
}

.content {
    padding: 25px 15px;
}

.profile-card {
    align-items: flex-start;
    flex-wrap: wrap;
}

.secondary-button {
    width: 100%;
}

}
.profile-page {
min-height: 100vh;
background: #F7F5FC;
display: flex;
align-items: center;
justify-content: center;
padding: 30px 20px;
}

.profile-setup-card {
width: 100%;
max-width: 560px;
background: white;
border-radius: 24px;
padding: 40px;
box-shadow: 0 15px 50px rgba(50, 30, 80, 0.08);
}

.profile-brand {
justify-content: flex-start;
padding: 0;
margin-bottom: 30px;
}

.setup-header {
margin-bottom: 30px;
}

.setup-header h1 {
text-align: left;
margin-bottom: 8px;
}

.setup-header p {
color: #817A8C;
font-size: 14px;
line-height: 1.5;
}

.input-group label span {
color: #9993A1;
font-weight: 400;
}

.input-group select,
.input-group textarea {
width: 100%;
border: 1px solid #DDD8E5;
border-radius: 12px;
padding: 13px 15px;
font-family: inherit;
font-size: 14px;
outline: none;
background: white;
}

.input-group select {
height: 50px;
}

.input-group textarea {
height: 100px;
resize: vertical;
}

.input-group select:focus,
.input-group textarea:focus {
border-color: #7C3AED;
box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10);
}

.interests {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
}

.interest {
cursor: pointer;
}

.interest input {
display: none;
}

.interest span {
display: block;
border: 1px solid #E2DDE9;
border-radius: 12px;
padding: 13px;
font-size: 13px;
transition: 0.2s;
}

.interest input:checked + span {
background: #F0EAFE;
border-color: #7C3AED;
color: #7C3AED;
font-weight: 600;
}

/* Centres d'intérêt détaillés */
.interest-dropdown {
    border: 1px solid #E2DDE9;
    border-radius: 12px;
    background: #FFFFFF;
    overflow: hidden;
}

.interest-dropdown summary {
    list-style: revert;
    cursor: pointer;
    padding: 13px;
    font-size: 13px;
    font-weight: 500;
    user-select: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.interest-dropdown summary::-webkit-details-marker {
    display: inline-block;
}

.interest-dropdown[open] summary {
    background: #F0EAFE;
    color: #7C3AED;
    font-weight: 600;
    border-bottom: 1px solid #E2DDE9;
}

.interest-details {
    padding: 10px;
    animation: interestDropdownOpen 0.18s ease-out;
    transform-origin: top;
}

.interest-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 36px;
    gap: 7px;
}

.interest-options label {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    height: 36px;
    box-sizing: border-box;
    padding: 7px 9px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
}

.interest-options label:hover {
    background: #F7F4FC;
}

.interest-options input {
    display: inline-block;
    width: 15px;
    height: 15px;
    min-width: 15px;
    min-height: 15px;
    margin: 0;
    accent-color: #7C3AED;
}

@keyframes interestDropdownOpen {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.interest-custom {
    width: 100%;
    box-sizing: border-box;
    margin-top: 9px;
    padding: 10px 11px;
    border: 1px solid #E2DDE9;
    border-radius: 9px;
    outline: none;
    font-size: 12px;
}

.interest-custom:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.10);
}

@media (max-width: 550px) {

.profile-setup-card {
    padding: 28px 20px;
}

.interests {
    grid-template-columns: 1fr;
}

}



/* ======================================================
   LYNK — PROFILS / BADGES / STATUTS / PHOTO
   ====================================================== */

.profile-avatar,
.profile-avatar-large {
    position: relative;
    overflow: visible;
}

.lynk-status-dot {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,.16);
    z-index: 3;
}

.lynk-status-dot[data-status="online"] { background: #22C55E; }
.lynk-status-dot[data-status="offline"] { background: #9CA3AF; }
.lynk-status-dot[data-status="course"] { background: linear-gradient(135deg, #EF4444, #F97316); }

.lynk-name-line {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.lynk-badges {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 20px;
    position: relative;
    top: -3px;
}

.lynk-badge-icon {
    width: 19px;
    height: 19px;
    object-fit: contain;
    display: block;
}

.profile-photo-picker {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid #E2DDE9;
    border-radius: 16px;
    background: #FCFAFF;
    margin-bottom: 22px;
}

.profile-photo-preview {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    border-radius: 22px;
    background: #F0EAFE;
    color: #7C3AED;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.profile-photo-actions { flex: 1; min-width: 0; }

.profile-photo-label {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    background: #F0EAFE;
    border: 1px solid #DDD0FA;
    color: #6D28D9;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer;
    transition: .18s ease;
    margin-bottom: 7px !important;
}

.profile-photo-label:hover {
    background: #E9DDFD;
    transform: translateY(-1px);
}

.profile-photo-input { display: none; }

.profile-photo-help {
    color: #817A8C;
    font-size: 12px;
    line-height: 1.4;
}

.birthday-line {
    color: #817A8C;
    font-size: 13px;
    margin-top: 7px;
}

.birthday-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    font-size: 19px;
    line-height: 1;
    min-width: 28px;
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .profile-photo-picker { align-items: flex-start; }
}

.profile-character-group {
    margin-top: -6px;
}

.avatar-character-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-character-row input {
    flex: 1;
}

.avatar-character-preview {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 16px;
    background: #F0EAFE;
    color: #7C3AED;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    font-weight: 700;
    border: 1px solid #DDD0FA;
}

.profile-photo-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 7px;
    padding: 7px 10px;
    border: 0;
    background: transparent;
    color: #6D28D9;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
}

.profile-photo-remove:hover {
    background: #F0EAFE;
}

/* ==================================================
   CARACTÈRE DE PROFIL — SETTINGS
   ================================================== */
.character-input-wrap {
    position: relative;
    width: min(100%, 260px);
    margin-top: 12px;
}

.character-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #F0EAFE;
    color: #7C3AED;
    font-size: 13px;
    font-weight: 800;
    pointer-events: none;
}

.character-input {
    width: 100% !important;
    height: 46px !important;
    box-sizing: border-box;
    border: 1px solid #DED7EA !important;
    border-radius: 13px !important;
    background: #FAF9FD !important;
    color: #24202B !important;
    padding: 0 14px 0 50px !important;
    font-size: 15px !important;
    font-weight: 600;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.character-input::placeholder {
    color: #9B94A8;
    font-weight: 500;
    opacity: 1;
}

.character-input:hover {
    border-color: #C9BDE2 !important;
    background: #FFFFFF !important;
}

.character-input:focus {
    border-color: #7C3AED !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .10) !important;
}

@media (max-width: 600px) {
    .character-input-wrap {
        width: 100%;
    }
}


/* =========================================================
   LYNK — MISE EN PAGE FIXE / RESPONSIVE
   ========================================================= */

/* La barre latérale reste toujours entièrement visible. */
.app {
    min-height: 100dvh;
    height: 100dvh;
}

.sidebar {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    flex: 0 0 250px;
    padding: clamp(10px, 2.2vh, 25px) 16px;
}

.brand {
    margin-bottom: clamp(10px, 3.5vh, 40px);
    flex-shrink: 0;
}

.navigation {
    gap: clamp(2px, 0.7vh, 6px);
    min-height: 0;
}

.nav-item,
.logout-button {
    height: clamp(38px, 5.5vh, 48px);
    flex-shrink: 0;
}

.sidebar-bottom {
    gap: clamp(2px, 0.7vh, 6px);
    flex-shrink: 0;
}

/* Sur les écrans peu hauts, on compacte encore la sidebar. */
@media (max-height: 720px) and (min-width: 751px) {
    .sidebar {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .brand {
        margin-bottom: 10px;
    }

    .brand-icon {
        width: 36px;
        height: 36px;
    }

    .navigation {
        gap: 2px;
    }

    .nav-item,
    .logout-button {
        height: 38px;
    }
}

@media (max-height: 620px) and (min-width: 751px) {
    .brand {
        font-size: 20px;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .nav-item,
    .logout-button {
        height: 34px;
        font-size: 13px;
    }

    .nav-item span:first-child {
        font-size: 17px;
    }
}

/* Chat : la page elle-même ne défile plus.
   Seule la liste des messages défile. */
.chat-page .main-content,
.chat-page .content {
    height: 100dvh;
    min-height: 0 !important;
}

.chat-page .content {
    overflow: hidden;
}

.chat-page #messagesContainer {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.chat-page .topbar {
    flex: 0 0 90px;
}

.chat-page #messageForm {
    flex: 0 0 auto;
}

/* Discussions : les listes peuvent défiler à l'intérieur,
   mais jamais la page entière. */
.discussions-page .main-content {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.discussions-page .content {
    height: calc(100dvh - 90px);
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Anniversaires : cinq entrées compactes restent visibles. */
#upcomingBirthdays {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
}

#upcomingBirthdays .profile-card {
    margin: 0 !important;
    padding: 12px 16px;
    min-height: 64px;
}

#upcomingBirthdays .profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 19px;
}

#upcomingBirthdays .profile-info h3 {
    margin-bottom: 2px;
}

#upcomingBirthdays .profile-info p {
    margin-top: 0;
}

/* =========================================================
   LYNK — SIDEBAR FIXE, CONTENU SCROLLABLE
   ========================================================= */
.app {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    min-height: 0;
    flex-shrink: 0;
    overflow: hidden;
    z-index: 100;
}

.main-content {
    height: 100dvh;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
}

/* Le scroll de la page ne fait jamais bouger la sidebar. */
@media (max-width: 750px) {
    .sidebar {
        position: sticky;
        top: 0;
    }
}

/* =========================================================
   LYNK — SIDEBAR RÉTRACTABLE + ANIMATIONS
   ========================================================= */
.sidebar {
    position: sticky;
    top: 0;
    width: 250px;
    flex: 0 0 250px;
    transition: width .34s cubic-bezier(.22,1,.36,1),
                flex-basis .34s cubic-bezier(.22,1,.36,1),
                padding .34s cubic-bezier(.22,1,.36,1);
}

.sidebar-toggle {
    position: absolute;
    top: 18px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 1px solid #E8E1F1;
    border-radius: 9px;
    background: #fff;
    color: #7C3AED;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 4px 14px rgba(45, 30, 70, .07);
    transition: transform .25s ease, background .2s ease, box-shadow .2s ease;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.sidebar-toggle:hover {
    background: #F5F0FF;
    transform: scale(1.05);
}

.sidebar-toggle:active { transform: scale(.94); }

.sidebar.collapsed {
    width: 78px;
    flex-basis: 78px;
    padding-left: 10px;
    padding-right: 10px;
}

.sidebar.collapsed .brand {
    justify-content: center;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}

.sidebar.collapsed .brand > span,
.sidebar.collapsed .nav-item > span:last-child,
.sidebar.collapsed .logout-button > span:last-child {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transform: translateX(-7px);
    pointer-events: none;
}

.sidebar .brand > span,
.sidebar .nav-item > span:last-child,
.sidebar .logout-button > span:last-child {
    opacity: 1;
    width: auto;
    transform: translateX(0);
    transition: opacity .18s ease, transform .28s ease, width .34s ease;
}

.sidebar.collapsed .nav-item,
.sidebar.collapsed .logout-button {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar.collapsed .nav-item {
    gap: 0;
}

.sidebar.collapsed .logout-button {
    gap: 0;
}

.sidebar.collapsed .nav-item > span:first-child,
.sidebar.collapsed .logout-button > span:first-child {
    margin: 0;
}

.sidebar.collapsed .sidebar-toggle {
    right: 9px;
}

/* Animation générale des cartes et boutons */
.profile-card, .welcome-card, .empty-card, .section-header,
.secondary-button, .mail-button, .nav-item, .logout-button {
    transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease,
                border-color .22s ease, opacity .22s ease;
}

.profile-card:hover {
    transform: translateY(-2px);
}

.secondary-button:hover, .mail-button:hover {
    transform: translateY(-1px);
}

/* Notification de déconnexion : arrive depuis le bas */
.lynk-logout-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    pointer-events: none;
}

.lynk-logout-sheet {
    position: absolute;
    left: 50%;
    bottom: 22px;
    width: min(460px, calc(100vw - 32px));
    padding: 20px;
    background: rgba(255,255,255,.98);
    border: 1px solid #E8E1F1;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(48, 31, 75, .18);
    transform: translate(-50%, calc(100% + 40px));
    opacity: 0;
    transition: transform .42s cubic-bezier(.22,1,.36,1), opacity .28s ease;
    pointer-events: auto;
}

.lynk-logout-overlay.visible .lynk-logout-sheet {
    transform: translate(-50%, 0);
    opacity: 1;
}

.lynk-logout-title {
    font-size: 17px;
    font-weight: 750;
    color: #272230;
    margin-bottom: 6px;
}

.lynk-logout-text {
    color: #817A8C;
    font-size: 13px;
    margin-bottom: 16px;
}

.lynk-logout-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.lynk-logout-actions button {
    border: 0;
    border-radius: 11px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}

.lynk-logout-cancel { background: #000; color: #fff; }
html[data-theme="dark"] .lynk-logout-cancel { background: #000; color: #fff; border: 1px solid #333; }
.lynk-logout-confirm { background: #7C3AED; color: white; }
.lynk-logout-actions button:hover { transform: translateY(-1px); }

/* Match */
.discover-match-card {
    animation: lynkDiscoverIn .48s cubic-bezier(.22,1,.36,1) both;
}

@keyframes lynkDiscoverIn {
    from { opacity: 0; transform: translateY(16px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.discover-match-button {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #7C3AED, #9B6AF2);
    color: white;
    font-size: 15px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(124,58,237,.22);
    transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.discover-match-button:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(124,58,237,.28); filter: brightness(1.02); }
.discover-match-button:active { transform: translateY(0) scale(.99); }
.discover-match-button:disabled { cursor: wait; opacity: .75; transform: none; }

.discover-loader {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    padding: 24px;
    color: #7C3AED;
    font-weight: 650;
}

.discover-loader-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #7C3AED;
    animation: lynkPulse 1s ease-in-out infinite;
}
.discover-loader-dot:nth-child(2) { animation-delay: .14s; }
.discover-loader-dot:nth-child(3) { animation-delay: .28s; }
@keyframes lynkPulse { 0%,80%,100% { transform: scale(.55); opacity:.35; } 40% { transform: scale(1); opacity:1; } }

.discover-interest-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.discover-interest {
    padding: 6px 9px;
    border-radius: 9px;
    background: #F3EEFF;
    color: #6D32D8;
    font-size: 12px;
    font-weight: 650;
}

@media (max-width: 750px) {
    .sidebar:not(.collapsed) { width: 250px; flex-basis: 250px; }
    .sidebar.collapsed { width: 68px; flex-basis: 68px; }
}

@media (max-width: 750px) {
    .sidebar:not(.collapsed) .brand > span,
    .sidebar:not(.collapsed) .nav-item > span:last-child,
    .sidebar:not(.collapsed) .logout-button > span:last-child {
        display: inline;
        opacity: 1;
        width: auto;
        transform: translateX(0);
        pointer-events: auto;
    }

    .sidebar:not(.collapsed) .nav-item,
    .sidebar:not(.collapsed) .logout-button {
        justify-content: flex-start;
        padding-left: 14px;
        padding-right: 14px;
        gap: 13px;
    }
}


/* =========================================================
   LYNK — CHAT : HAUTEUR EXACTE DE LA FENÊTRE
   La barre d'envoi reste toujours visible.
   Quand les messages dépassent l'espace disponible,
   seul #messagesContainer défile.
   ========================================================= */

html:has(body.chat-page),
body.chat-page {
    height: 100%;
    min-height: 100%;
    overflow: hidden !important;
}

body.chat-page .app {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

body.chat-page .main-content {
    height: 100dvh;
    min-height: 0;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

body.chat-page .topbar {
    flex: 0 0 90px;
    height: 90px;
    min-height: 90px;
}

body.chat-page .content {
    flex: 1 1 auto;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 18px 24px 18px !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* La discussion utilise toute la largeur disponible à droite de la sidebar. */
body.chat-page .main-content {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
}

body.chat-page .topbar {
    width: 100%;
    box-sizing: border-box;
    padding-left: 24px;
    padding-right: 24px;
}

body.chat-page #typingIndicator {
    flex: 0 0 auto;
}

body.chat-page #messagesContainer {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 12px !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

body.chat-page #errorMessage {
    flex: 0 0 auto;
    margin-bottom: 8px !important;
}

body.chat-page #messageForm {
    flex: 0 0 auto !important;
    width: 100%;
    margin-top: 8px;
    box-sizing: border-box;
}

@media (max-width: 750px) {
    body.chat-page .content {
        padding: 12px 15px 12px !important;
    }

    body.chat-page .topbar {
        flex-basis: 70px;
        height: 70px;
        min-height: 70px;
    }
}


/* =========================================================
   LYNK — MODALES DU CHAT : ANIMATIONS
   ========================================================= */
.lynk-modal {
    display: none;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(26, 18, 38, .34);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 3000;
    opacity: 0;
    transition: opacity .24s ease;
}

.lynk-modal.is-open {
    opacity: 1;
}

.lynk-modal.is-closing {
    opacity: 0;
}

.lynk-modal-card {
    width: 100%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 24px 70px rgba(35, 20, 55, .18);
    transform: translateY(22px) scale(.97);
    opacity: .2;
    transition: transform .30s cubic-bezier(.22, 1, .36, 1),
                opacity .22s ease;
}

.lynk-modal.is-open .lynk-modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.lynk-modal.is-closing .lynk-modal-card {
    transform: translateY(14px) scale(.98);
    opacity: 0;
}

.leave-confirm-card {
    max-width: 430px;
    text-align: center;
    padding: 32px;
}

.leave-confirm-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0EAFE;
    color: #7C3AED;
    font-size: 25px;
    font-weight: 700;
}

.leave-confirm-card h2 {
    margin-bottom: 9px;
    font-size: 21px;
}

.leave-confirm-card p {
    color: #817A8C;
    font-size: 13px;
    line-height: 1.55;
    margin: 0 auto 24px;
    max-width: 340px;
}

.leave-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.leave-confirm-actions .secondary-button,
.leave-confirm-actions .danger-button {
    min-width: 125px;
}

.danger-button {
    border: 1px solid #F0B8B8;
    background: #FFF5F5;
    color: #B42318;
    border-radius: 10px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.danger-button:hover {
    background: #FEECEC;
    border-color: #E99B9B;
    transform: translateY(-1px);
}

.danger-button:active {
    transform: translateY(0);
}

.danger-button:disabled {
    opacity: .65;
    cursor: wait;
    transform: none;
}

.danger-button.is-loading {
    position: relative;
}

.danger-button.is-loading::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    vertical-align: -2px;
    border: 2px solid rgba(180, 35, 24, .22);
    border-top-color: #B42318;
    border-radius: 50%;
    animation: lynkSpin .65s linear infinite;
}

@keyframes lynkSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
    .lynk-modal {
        padding: 14px;
    }

    .lynk-modal-card {
        border-radius: 19px;
        padding: 22px;
    }

    .leave-confirm-actions {
        flex-direction: column-reverse;
    }

    .leave-confirm-actions .secondary-button,
    .leave-confirm-actions .danger-button {
        width: 100%;
    }
}


/* ==========================================================
   BOÎTE AUX LETTRES — NOTIFICATIONS LYNK
   ========================================================== */

.lynk-notification-card {
    position: relative;
    width: 100%;
    border: 1px solid #ECE8F2;
    border-radius: 18px;
    background: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    cursor: pointer;
    margin-bottom: 12px;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.lynk-notification-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(60, 39, 90, .08);
}

.lynk-notification-card.is-unread {
    background: #F4EEFF;
    border-color: #E4D7FF;
}

.lynk-notification-card.is-unread strong {
    font-weight: 800;
}

.lynk-notification-card.is-read strong {
    font-weight: 600;
}

.lynk-notification-card-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #7C3AED;
}

.lynk-notification-card-dot.hidden {
    visibility: hidden;
}

.lynk-notification-card-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 14px;
    background: #EEE6FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.lynk-notification-card-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lynk-notification-card-content strong,
.lynk-notification-card-content span,
.lynk-notification-card-content small {
    overflow: hidden;
    text-overflow: ellipsis;
}

.lynk-notification-card-content strong {
    color: #17151F;
    font-size: 15px;
}

.lynk-notification-card-content span {
    color: #686170;
    font-size: 13px;
    line-height: 1.45;
}

.lynk-notification-card-content small {
    color: #9A93A4;
    font-size: 11px;
}

.lynk-notification-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    pointer-events: none;
}

.lynk-notification-modal.visible {
    visibility: visible;
    pointer-events: auto;
}

.lynk-notification-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(25, 18, 35, .35);
    opacity: 0;
    transition: opacity .28s ease;
}

.lynk-notification-modal.visible .lynk-notification-backdrop {
    opacity: 1;
}

.lynk-notification-sheet {
    position: relative;
    width: min(680px, calc(100vw - 28px));
    margin-bottom: 20px;
    padding: 30px;
    background: white;
    border: 1px solid #E8E0F2;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(43, 26, 66, .22);
    transform: translateY(110%);
    opacity: .3;
    transition: transform .38s cubic-bezier(.22,1,.36,1), opacity .28s ease;
}

.lynk-notification-modal.visible .lynk-notification-sheet {
    transform: translateY(0);
    opacity: 1;
}

.lynk-notification-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #F4F0F8;
    color: #5F5968;
    font-size: 24px;
    cursor: pointer;
}

.lynk-notification-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #EEE6FF;
    color: #7C3AED;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    margin-bottom: 16px;
}

.lynk-notification-kicker {
    color: #7C3AED;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 7px;
}

.lynk-notification-sheet h2 {
    font-size: 22px;
    margin-bottom: 12px;
    color: #17151F;
}

.lynk-notification-sheet p {
    color: #5F5968;
    line-height: 1.65;
    white-space: pre-wrap;
    margin-bottom: 18px;
}

.lynk-notification-sheet small {
    color: #9A93A4;
}

body.notification-modal-open {
    overflow: hidden;
}


/* =========================================================
   LYNK — CONFIRMATIONS ET NOTIFICATIONS PERSONNALISÉES
   ========================================================= */
.danger-icon {
    background: #FFF0F0 !important;
    color: #B42318 !important;
}

.lynk-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 5000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 13px 16px;
    border-radius: 15px;
    background: #17151F;
    color: white;
    box-shadow: 0 18px 45px rgba(35,20,55,.22);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(.97);
    transition: opacity .22s ease, transform .28s cubic-bezier(.22,1,.36,1);
}
.lynk-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.lynk-toast.is-success { background: #20152F; }
.lynk-toast.is-error { background: #4A1717; }
.lynk-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.13);
    flex: 0 0 24px;
}
.mailbox-loading-card {
    animation: lynkLoadingPulse 1.3s ease-in-out infinite;
}
@keyframes lynkLoadingPulse {
    0%,100% { opacity: .72; }
    50% { opacity: 1; }
}
@media (max-width: 600px) {
    .lynk-toast { right: 16px; left: 16px; bottom: 16px; max-width: none; }
}

/* =========================================================
   LYNK — RÉCOMPENSES / BADGES
   ========================================================= */
.lynk-rewards-page,
.lynk-badges-page {
    padding-bottom: 48px;
}

.rewards-hero,
.badges-intro-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #f7f1ff 0%, #ffffff 100%);
    border: 1px solid #eadffb;
    box-shadow: 0 14px 40px rgba(74, 45, 110, .07);
    margin-bottom: 30px;
}

.rewards-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #7C3AED;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
}

.rewards-hero h2,
.badges-intro-card h2 {
    margin: 0 0 7px;
    font-size: 25px;
    color: #17151F;
}

.rewards-hero p,
.badges-intro-card p {
    margin: 0;
    color: #6c6675;
    line-height: 1.55;
}

.rewards-badges-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    background: #7C3AED !important;
    color: white !important;
    border-color: #7C3AED !important;
    box-shadow: 0 10px 24px rgba(124, 58, 237, .22);
}

.rewards-section {
    margin-top: 30px;
}

.missions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.mission-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    border: 1px solid #ebe7f0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(31, 20, 45, .05);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.mission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(31, 20, 45, .08);
}

.mission-card.is-complete {
    border-color: #dcc8ff;
    background: #fcfaff;
}

.mission-badge-image {
    position: relative;
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f3f7;
    border: 1px solid #e7e2eb;
}

.mission-badge-image img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.mission-badge-image.is-locked img,
.badge-card.is-locked .badge-card-image img {
    opacity: .3;
    filter: grayscale(1);
}

.mission-complete-check,
.badge-equipped-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #7C3AED;
    color: white;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(124, 58, 237, .28);
}

.mission-card-content {
    min-width: 0;
    flex: 1;
}

.mission-card-topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.mission-status,
.mission-check-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #8b8495;
}

.mission-check-label {
    color: #7C3AED;
}

.mission-card h3 {
    margin: 0 0 5px;
    color: #19161f;
    font-size: 17px;
}

.mission-card p {
    margin: 0 0 12px;
    color: #777080;
    font-size: 13px;
    line-height: 1.45;
}

.mission-card small {
    display: block;
    margin-top: 7px;
    color: #8c8594;
    font-size: 11px;
}

.mission-progress {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #eeeaf2;
}

.mission-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #7C3AED;
    transition: width .5s ease;
}

.special-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.special-badge-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 16px;
    border: 1px solid #e9e4ef;
    border-radius: 16px;
    background: #fff;
}

.special-badge-image {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f3f8;
}

.special-badge-image img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.special-badge-card strong,
.special-badge-card span {
    display: block;
}

.special-badge-card strong {
    font-size: 13px;
    color: #201c27;
}

.special-badge-card span {
    margin-top: 3px;
    color: #8b8495;
    font-size: 11px;
}

.reward-empty-card,
.reward-loading-card {
    padding: 25px;
    border-radius: 18px;
    border: 1px dashed #ded8e6;
    color: #847d8e;
    background: #fff;
    text-align: center;
}

.badges-intro-card {
    margin-bottom: 30px;
}

.equipped-preview {
    min-width: 210px;
    min-height: 72px;
    padding: 10px 14px;
    border-radius: 17px;
    border: 1px solid #e8e0f2;
    background: rgba(255,255,255,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: #8b8495;
    font-size: 12px;
    text-align: center;
}

.equipped-preview img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.equipped-preview div span,
.equipped-preview div strong {
    display: block;
    text-align: left;
}

.equipped-preview div strong {
    color: #211c28;
    font-size: 13px;
}

.equipped-preview div span {
    margin-top: 3px;
    color: #8b8495;
    font-size: 11px;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.badge-card {
    position: relative;
    min-width: 0;
    padding: 17px;
    border: 1px solid #e7e2eb;
    border-radius: 19px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(31, 20, 45, .04);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.badge-card:not(:disabled):hover {
    transform: translateY(-3px);
    border-color: #cdb0ff;
    box-shadow: 0 14px 30px rgba(124, 58, 237, .1);
}

.badge-card.is-equipped {
    border: 2px solid #7C3AED;
    background: #fcf9ff;
}

.badge-card:disabled {
    cursor: default;
}

.badge-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 16px;
    background: #f7f5f9;
    border: 1px solid #ece8ef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 13px;
}

.badge-card-image img {
    width: 65%;
    height: 65%;
    object-fit: contain;
}

.badge-lock {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(35, 30, 42, .8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.badge-card strong,
.badge-card > span {
    display: block;
}

.badge-card strong {
    color: #211c28;
    font-size: 14px;
}

.badge-card > span {
    margin-top: 5px;
    color: #8b8495;
    font-size: 11px;
    line-height: 1.4;
}

.lynk-badge-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
}

.lynk-badges {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 2px;
    vertical-align: middle;
}

.lynk-badge-equipped {
    animation: lynkBadgePop .3s cubic-bezier(.22,1,.36,1);
}

@keyframes lynkBadgePop {
    from { transform: scale(.65); opacity: .2; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 950px) {
    .missions-grid { grid-template-columns: 1fr; }
    .badges-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .rewards-hero,
    .badges-intro-card { flex-direction: column; align-items: stretch; }
    .equipped-preview { min-width: 0; }
    .badges-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 500px) {
    .mission-card { align-items: flex-start; padding: 15px; }
    .mission-badge-image { width: 70px; height: 70px; flex-basis: 70px; }
    .mission-badge-image img { width: 48px; height: 48px; }
    .badges-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .badge-card { padding: 11px; }
}

/* ======================================================
   CLASSEMENTS
   ====================================================== */
.lynk-rankings-page { padding-bottom: 40px; }
.rankings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ranking-card { background: #fff; border: 1px solid rgba(124,58,237,.10); border-radius: 24px; padding: 22px; box-shadow: 0 10px 30px rgba(39,20,80,.06); }
.ranking-card-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 16px; }
.ranking-card-header h2 { margin: 4px 0 0; }
.ranking-list { display:flex; flex-direction:column; gap:10px; }
.ranking-row { display:grid; grid-template-columns: 34px 42px minmax(0,1fr) auto; align-items:center; gap:10px; padding:12px; border-radius:16px; background:#f8f6fd; }
.ranking-position { font-weight:800; text-align:center; color:#6b6477; }
.ranking-avatar { width:42px; height:42px; border-radius:50%; display:grid; place-items:center; background:#ede9fe; color:#7c3aed; font-weight:800; }
.ranking-user { min-width:0; display:flex; flex-direction:column; gap:2px; }
.ranking-user strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ranking-user span { color:#7c7487; font-size:.82rem; }
.ranking-value { font-weight:800; color:#7c3aed; white-space:nowrap; }
.ranking-top-1 { background:linear-gradient(90deg,#f4efff,#fff); }
.ranking-top-2 { background:linear-gradient(90deg,#f7f5fc,#fff); }
.ranking-top-3 { background:linear-gradient(90deg,#faf8f3,#fff); }
@media (max-width: 900px) { .rankings-grid { grid-template-columns: 1fr; } }


/* =========================================================
   LYNK — RÉCOMPENSES / REFONTE VISUELLE
   ========================================================= */
.lynk-rewards-page { max-width: 1180px; margin: 0 auto; }
.rewards-hero {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 34px 36px;
    border: 1px solid #e9ddff;
    border-radius: 28px;
    background: radial-gradient(circle at 85% 15%, rgba(124,58,237,.18), transparent 30%), linear-gradient(135deg, #fbf9ff 0%, #f2eaff 100%);
    box-shadow: 0 18px 50px rgba(64,35,105,.08);
}
.rewards-hero::after { content:""; position:absolute; width:220px; height:220px; right:-100px; bottom:-120px; border-radius:50%; background:rgba(124,58,237,.08); }
.rewards-hero-copy { position:relative; z-index:1; max-width:680px; }
.rewards-hero h2 { font-size:clamp(28px,3vw,38px); letter-spacing:-.035em; margin:0 0 9px; }
.rewards-hero p { max-width:620px; font-size:14px; }
.rewards-badges-button { position:relative; z-index:2; min-width:165px; gap:12px; border-radius:14px !important; }
.rewards-badges-button span { font-size:18px; transition:transform .2s ease; }
.rewards-badges-button:hover span { transform:translateX(3px); }
.rewards-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:18px 0 34px; }
.rewards-stat-card { display:flex; align-items:center; gap:13px; min-height:82px; padding:16px 18px; border:1px solid #ece8f2; border-radius:20px; background:#fff; box-shadow:0 8px 25px rgba(31,20,45,.045); }
.rewards-stat-icon { width:44px; height:44px; flex:0 0 44px; display:grid; place-items:center; border-radius:14px; background:#f3ebff; font-size:20px; }
.rewards-stat-card strong,.rewards-stat-card span { display:block; }
.rewards-stat-card strong { color:#211b29; font-size:19px; line-height:1.1; }
.rewards-stat-card div span { margin-top:4px; color:#8b8495; font-size:11px; }
.rewards-section-heading { margin-bottom:14px; }
.rewards-section-heading h2 { margin:2px 0 4px; font-size:23px; }
.rewards-section-heading p { margin:0; color:#81798c; font-size:13px; }
.missions-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px; }
.mission-card { align-items:flex-start; flex-direction:column; padding:18px; border-radius:22px; min-height:245px; }
.mission-badge-image { width:72px; height:72px; flex-basis:72px; border-radius:18px; background:linear-gradient(145deg,#faf8fc,#f1edf5); }
.mission-badge-image img { width:52px; height:52px; }
.mission-card-content { width:100%; }
.mission-card h3 { font-size:16px; margin-bottom:5px; }
.mission-card p { min-height:38px; }
.mission-card-topline { margin-bottom:9px; }
.mission-status { color:#9b94a4; }
.mission-card.is-complete { box-shadow:0 10px 30px rgba(124,58,237,.09); }
.rewards-info-card { display:flex; align-items:center; gap:16px; margin-top:22px; padding:18px 20px; border:1px solid #e8e1f2; border-radius:20px; background:#faf8ff; }
.rewards-info-icon { width:42px; height:42px; flex:0 0 42px; display:grid; place-items:center; border-radius:13px; background:#eee3ff; }
.rewards-info-card strong { display:block; color:#28202f; font-size:14px; }
.rewards-info-card p { margin:4px 0 0; color:#7e7688; font-size:12px; line-height:1.45; }
.rewards-info-card .secondary-button { margin-left:auto; white-space:nowrap; }
@media (max-width:900px){ .rewards-stats{grid-template-columns:repeat(2,1fr)} .missions-grid{grid-template-columns:repeat(2,1fr)} }
@media (max-width:650px){ .rewards-hero{padding:25px 22px; flex-direction:column; align-items:stretch} .rewards-stats{grid-template-columns:1fr 1fr} .missions-grid{grid-template-columns:1fr} .rewards-info-card{align-items:flex-start; flex-wrap:wrap} .rewards-info-card .secondary-button{margin-left:58px} }


/* =========================================================
   LYNK — RÉCOMPENSES : ANIMATIONS + BOUTON BADGES
   ========================================================= */
.rewards-hero {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
    animation: rewardsHeroIn .65s cubic-bezier(.2,.8,.2,1) both;
}
.rewards-hero::before {
    content:"";
    position:absolute;
    width:420px;
    height:420px;
    right:-170px;
    top:-220px;
    border-radius:50%;
    background:rgba(124,58,237,.07);
    animation: rewardsOrb 7s ease-in-out infinite;
}
.rewards-badges-button {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:13px 17px 13px 14px !important;
    border:1px solid rgba(124,58,237,.18) !important;
    background:linear-gradient(135deg,#7c3aed,#8b5cf6) !important;
    color:#fff !important;
    box-shadow:0 10px 25px rgba(124,58,237,.25), inset 0 1px 0 rgba(255,255,255,.22);
    transition:transform .22s ease, box-shadow .22s ease;
}
.rewards-badges-button::before {
    content:"";
    width:31px;
    height:31px;
    margin-right:2px;
    border-radius:10px;
    background:rgba(255,255,255,.16);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.12);
}
.rewards-badges-button:hover {
    transform:translateY(-3px);
    box-shadow:0 15px 32px rgba(124,58,237,.32), inset 0 1px 0 rgba(255,255,255,.25);
}
.rewards-badges-button:active { transform:translateY(-1px) scale(.985); }
.rewards-badges-button span { position:relative; z-index:2; }
.rewards-stats .rewards-stat-card { animation: rewardCardIn .55s cubic-bezier(.2,.8,.2,1) both; }
.rewards-stats .rewards-stat-card:nth-child(1){animation-delay:.08s}
.rewards-stats .rewards-stat-card:nth-child(2){animation-delay:.14s}
.rewards-stats .rewards-stat-card:nth-child(3){animation-delay:.20s}
.rewards-stats .rewards-stat-card:nth-child(4){animation-delay:.26s}
.reward-animate-in { animation: rewardCardIn .55s cubic-bezier(.2,.8,.2,1) both; }
.mission-card:hover { transform:translateY(-5px); transition:transform .22s ease, box-shadow .22s ease; }
.mission-card.is-complete .mission-badge-image { animation: badgePulse 2.8s ease-in-out infinite; }
@keyframes rewardsHeroIn { from{opacity:0;transform:translateY(14px) scale(.985)} to{opacity:1;transform:none} }
@keyframes rewardCardIn { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:none} }
@keyframes rewardsOrb { 0%,100%{transform:translate3d(0,0,0) scale(1)} 50%{transform:translate3d(-20px,18px,0) scale(1.08)} }
@keyframes badgePulse { 0%,100%{box-shadow:0 0 0 0 rgba(124,58,237,0)} 50%{box-shadow:0 0 0 7px rgba(124,58,237,.06)} }
@media (prefers-reduced-motion: reduce) {
  .rewards-hero,.rewards-stats .rewards-stat-card,.reward-animate-in,.mission-card.is-complete .mission-badge-image { animation:none !important; }
  .mission-card,.rewards-badges-button { transition:none !important; }
}
@media (max-width:650px){ .rewards-hero{align-items:stretch} .rewards-badges-button{width:100%} }


/* =========================================================
   LYNK — RÉCOMPENSES : CENTRAGE DES EMOJIS + ENTRÉE GLOBALE
   ========================================================= */
.rewards-stat-icon,
.rewards-info-icon {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    align-content:center !important;
    text-align:center !important;
    line-height:1 !important;
    padding:0 !important;
    overflow:hidden;
    font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
}
.rewards-stat-icon {
    position:relative;
}
.rewards-stat-icon::first-line {
    line-height:1;
}
.rewards-page-enter .lynk-rewards-page {
    animation: rewardsFullPageIn .72s cubic-bezier(.2,.8,.2,1) both;
}
.rewards-page-enter .rewards-hero {
    animation: rewardsHeroEnterFromSidebar .72s cubic-bezier(.2,.8,.2,1) both !important;
}
.rewards-page-enter .rewards-stat-card {
    animation-name: rewardsStatEnterFromSidebar !important;
}
.rewards-page-enter .mission-card {
    animation-name: rewardsMissionEnterFromSidebar !important;
}
.rewards-page-enter .rewards-badges-button {
    animation: rewardsButtonEnterFromSidebar .75s .12s cubic-bezier(.2,.8,.2,1) both;
}
.rewards-nav-click {
    animation: rewardsNavPulse .18s ease both !important;
}
@keyframes rewardsFullPageIn {
    from { opacity:0; transform:translateY(10px); }
    to { opacity:1; transform:none; }
}
@keyframes rewardsHeroEnterFromSidebar {
    from { opacity:0; transform:translateY(24px) scale(.975); filter:blur(3px); }
    to { opacity:1; transform:none; filter:none; }
}
@keyframes rewardsStatEnterFromSidebar {
    from { opacity:0; transform:translateY(20px) scale(.97); }
    to { opacity:1; transform:none; }
}
@keyframes rewardsMissionEnterFromSidebar {
    from { opacity:0; transform:translateY(22px); }
    to { opacity:1; transform:none; }
}
@keyframes rewardsButtonEnterFromSidebar {
    from { opacity:0; transform:translateX(18px) scale(.96); }
    to { opacity:1; transform:none; }
}
@keyframes rewardsNavPulse {
    0% { transform:scale(1); }
    55% { transform:scale(.96); }
    100% { transform:scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .rewards-page-enter .lynk-rewards-page,
    .rewards-page-enter .rewards-hero,
    .rewards-page-enter .rewards-stat-card,
    .rewards-page-enter .mission-card,
    .rewards-page-enter .rewards-badges-button,
    .rewards-nav-click { animation:none !important; }
}

/* =========================================================
   LYNK — MICRO-INTERACTIONS GLOBALES
   ========================================================= */

/* Pression sur tous les boutons/liens interactifs */
.lynk-pressing {
    transform: scale(.965) !important;
    transition: transform .12s ease !important;
}

/* Entrée commune des pages : les blocs montent légèrement */
.lynk-page-enter .main-content > * {
    animation: lynkPageRise .62s cubic-bezier(.22,1,.36,1) both;
    animation-iteration-count: 1;
}

.lynk-page-enter .main-content > *:nth-child(2) { animation-delay: .055s; }
.lynk-page-enter .main-content > *:nth-child(3) { animation-delay: .105s; }
.lynk-page-enter .main-content > *:nth-child(4) { animation-delay: .15s; }

.lynk-page-enter .content > *,
.lynk-page-enter .main-content .content > * {
    animation: lynkPageRise .58s cubic-bezier(.22,1,.36,1) both;
    animation-iteration-count: 1;
}

.lynk-page-enter .content > *:nth-child(2) { animation-delay: .06s; }
.lynk-page-enter .content > *:nth-child(3) { animation-delay: .11s; }
.lynk-page-enter .content > *:nth-child(4) { animation-delay: .16s; }
.lynk-page-enter .content > *:nth-child(5) { animation-delay: .21s; }

@keyframes lynkPageRise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Loader boîte aux lettres : trois vrais points animés. */
.mailbox-loading-card .lynk-mailbox-loader {
    width: 58px;
    height: 30px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.mailbox-loading-card .lynk-mailbox-loader span {
    display: block;
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #7C3AED;
    animation: lynkMailboxDot 1.05s ease-in-out infinite;
    will-change: transform, opacity;
}

.mailbox-loading-card .lynk-mailbox-loader span:nth-child(2) {
    animation-delay: .15s;
}

.mailbox-loading-card .lynk-mailbox-loader span:nth-child(3) {
    animation-delay: .30s;
}

@keyframes lynkMailboxDot {
    0%, 65%, 100% { transform: translateY(0) scale(.72); opacity: .35; }
    32% { transform: translateY(-8px) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .lynk-page-enter .main-content > *,
    .lynk-page-enter .content > *,
    .lynk-page-enter .main-content .content > *,
    .lynk-mailbox-loader span {
        animation: none !important;
    }
    .lynk-pressing { transform: none !important; }
}


/* LYNK MAILBOX — loader demandes d'amis, trois points animés */
.mailbox-loading-card {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.mailbox-loading-card .lynk-mailbox-loader {
    width: 72px !important;
    height: 34px !important;
    margin: 0 auto 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}
.mailbox-loading-card .lynk-mailbox-loader span {
    display: block !important;
    width: 9px !important;
    height: 9px !important;
    min-width: 9px !important;
    min-height: 9px !important;
    border-radius: 50% !important;
    background: #7C3AED !important;
    opacity: .35;
    transform: translateY(0) scale(.7);
    animation: lynkMailboxDots 1s ease-in-out infinite !important;
}
.mailbox-loading-card .lynk-mailbox-loader span:nth-child(2) { animation-delay: .16s !important; }
.mailbox-loading-card .lynk-mailbox-loader span:nth-child(3) { animation-delay: .32s !important; }
@keyframes lynkMailboxDots {
    0%, 100% { transform: translateY(0) scale(.7); opacity: .35; }
    40% { transform: translateY(-7px) scale(1); opacity: 1; }
    70% { transform: translateY(0) scale(.82); opacity: .65; }
}


/* MAILBOX LOADER v3 — trois points toujours visibles et animés */
.mailbox-loading-card .lynk-mailbox-loader {
  display:flex !important;
  width:82px !important;
  height:28px !important;
  margin:0 auto 14px !important;
  align-items:center !important;
  justify-content:center !important;
  gap:9px !important;
}
.mailbox-loading-card .lynk-mailbox-loader span {
  display:block !important;
  width:10px !important;
  height:10px !important;
  min-width:10px !important;
  min-height:10px !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:50% !important;
  background:#7C3AED !important;
  opacity:.35 !important;
  transform:translateY(0) scale(.72) !important;
  animation:lynkMailboxLoaderV3 1.05s ease-in-out infinite !important;
}
.mailbox-loading-card .lynk-mailbox-loader span:nth-child(2){animation-delay:.17s !important}
.mailbox-loading-card .lynk-mailbox-loader span:nth-child(3){animation-delay:.34s !important}
@keyframes lynkMailboxLoaderV3{
  0%,100%{transform:translateY(0) scale(.72);opacity:.35}
  35%{transform:translateY(-9px) scale(1);opacity:1}
  60%{transform:translateY(0) scale(.84);opacity:.65}
}

/* =========================================================
   CORRECTION — bouton « Mes badges »
   Le carré décoratif vide ne doit pas apparaître dans le bouton.
   ========================================================= */
.rewards-badges-button::before {
    content: none !important;
    display: none !important;
}

.rewards-badges-button {
    gap: 10px !important;
    padding-left: 17px !important;
}

/* =========================================================
   LYNK — EFFET DE SURVOL GLOBAL
   Tous les boutons et blocs interactifs se soulèvent légèrement
   au passage de la souris.
   ========================================================= */

button,
.btn,
.button,
.login-button,
.secondary-button,
a.button,
a.login-button,
a.secondary-button,
[role="button"],
.sidebar-item,
.nav-item,
.tab-button,
.action-card,
.card-button,
.clickable,
.conversation-item,
.search-result,
.user-card,
.profile-card,
.announcement-card,
.reward-card,
.badge-card,
.mission-card,
.mailbox-card,
.mailbox-item,
.ranking-card,
.discover-card,
.rewards-badges-button {
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease;
}

button:hover,
.btn:hover,
.button:hover,
.login-button:hover,
.secondary-button:hover,
a.button:hover,
a.login-button:hover,
a.secondary-button:hover,
[role="button"]:hover,
.sidebar-item:hover,
.nav-item:hover,
.tab-button:hover,
.action-card:hover,
.card-button:hover,
.clickable:hover,
.conversation-item:hover,
.search-result:hover,
.user-card:hover,
.profile-card:hover,
.announcement-card:hover,
.reward-card:hover,
.badge-card:hover,
.mission-card:hover,
.mailbox-card:hover,
.mailbox-item:hover,
.ranking-card:hover,
.discover-card:hover,
.rewards-badges-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.14);
}

/* Les éléments désactivés ne doivent pas se soulever. */
button:disabled,
button[disabled],
.disabled,
[aria-disabled="true"] {
    transform: none !important;
    box-shadow: none !important;
    cursor: default;
}

/* Respecte le réglage système de réduction des animations. */
@media (prefers-reduced-motion: reduce) {
    button,
    .btn,
    .button,
    .login-button,
    .secondary-button,
    a.button,
    a.login-button,
    a.secondary-button,
    [role="button"],
    .sidebar-item,
    .nav-item,
    .tab-button,
    .action-card,
    .card-button,
    .clickable,
    .conversation-item,
    .search-result,
    .user-card,
    .profile-card,
    .announcement-card,
    .reward-card,
    .badge-card,
    .mission-card,
    .mailbox-card,
    .mailbox-item,
    .ranking-card,
    .discover-card,
    .rewards-badges-button {
        transition: none !important;
    }

    button:hover,
    .btn:hover,
    .button:hover,
    .login-button:hover,
    .secondary-button:hover,
    a.button:hover,
    a.login-button:hover,
    a.secondary-button:hover,
    [role="button"]:hover,
    .sidebar-item:hover,
    .nav-item:hover,
    .tab-button:hover,
    .action-card:hover,
    .card-button:hover,
    .clickable:hover,
    .conversation-item:hover,
    .search-result:hover,
    .user-card:hover,
    .profile-card:hover,
    .announcement-card:hover,
    .reward-card:hover,
    .badge-card:hover,
    .mission-card:hover,
    .mailbox-card:hover,
    .mailbox-item:hover,
    .ranking-card:hover,
    .discover-card:hover,
    .rewards-badges-button:hover {
        transform: none !important;
    }
}

/* =========================================================
   SURVOL — BLOCS / CARTES
   Tous les blocs interactifs se soulèvent aussi au passage
   de la souris, pas seulement les boutons.
   ========================================================= */

.rewards-hero,
.rewards-special-section,
.special-badge-card,
.rewards-stat-card,
.mission-card,
.reward-card,
.rewards-info-card,
.badges-intro-card,
.badge-card,
.conversation-card,
.conversation-item,
.profile-card,
.user-card,
.search-result,
.discover-card,
.announcement-card,
.mailbox-card,
.mailbox-item,
.ranking-card,
.action-card,
.clickable-card,
.info-card,
.settings-card,
.setting-card,
.form-card,
.empty-card,
.welcome-card {
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}

.rewards-hero:hover,
.rewards-special-section:hover,
.special-badge-card:hover,
.rewards-stat-card:hover,
.mission-card:hover,
.reward-card:hover,
.rewards-info-card:hover,
.badges-intro-card:hover,
.badge-card:hover,
.conversation-card:hover,
.conversation-item:hover,
.profile-card:hover,
.user-card:hover,
.search-result:hover,
.discover-card:hover,
.announcement-card:hover,
.mailbox-card:hover,
.mailbox-item:hover,
.ranking-card:hover,
.action-card:hover,
.clickable-card:hover,
.info-card:hover,
.settings-card:hover,
.setting-card:hover,
.form-card:hover,
.empty-card:hover,
.welcome-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.13);
}

/* Les gros conteneurs de page ne doivent pas bouger. */
.app,
.main-content,
.content,
.sidebar,
.topbar,
.navigation,
.rewards-stats,
.missions-grid,
.badges-grid,
.special-badges-row {
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .rewards-hero,
    .rewards-special-section,
    .special-badge-card,
    .rewards-stat-card,
    .mission-card,
    .reward-card,
    .rewards-info-card,
    .badges-intro-card,
    .badge-card,
    .conversation-card,
    .conversation-item,
    .profile-card,
    .user-card,
    .search-result,
    .discover-card,
    .announcement-card,
    .mailbox-card,
    .mailbox-item,
    .ranking-card,
    .action-card,
    .clickable-card,
    .info-card,
    .settings-card,
    .setting-card,
    .form-card,
    .empty-card,
    .welcome-card {
        transition: none !important;
    }

    .rewards-hero:hover,
    .rewards-special-section:hover,
    .special-badge-card:hover,
    .rewards-stat-card:hover,
    .mission-card:hover,
    .reward-card:hover,
    .rewards-info-card:hover,
    .badges-intro-card:hover,
    .badge-card:hover,
    .conversation-card:hover,
    .conversation-item:hover,
    .profile-card:hover,
    .user-card:hover,
    .search-result:hover,
    .discover-card:hover,
    .announcement-card:hover,
    .mailbox-card:hover,
    .mailbox-item:hover,
    .ranking-card:hover,
    .action-card:hover,
    .clickable-card:hover,
    .info-card:hover,
    .settings-card:hover,
    .setting-card:hover,
    .form-card:hover,
    .empty-card:hover,
    .welcome-card:hover {
        transform: none !important;
    }
}

/* Profil personnel sur l'accueil : carte cliquable */
#ownProfileCard {
    cursor: pointer;
}

#ownProfileCard:focus-visible {
    outline: 2px solid #7C3AED;
    outline-offset: 3px;
}


/* =========================================================
   LYNK — CHAT / PARAMÈTRES DE CONVERSATION
   ========================================================= */
.chat-page #conversationSettingsButton {
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.chat-page .chat-message-row {
    animation: lynk-message-in .22s ease both;
}

@keyframes lynk-message-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.conversation-settings-page .settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1.15fr);
    gap: 24px;
    align-items: start;
}

.conversation-settings-page .settings-card {
    background: rgba(255,255,255,.92);
    border: 2px solid #1B1340;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 5px 0 #1B1340;
}

.conversation-settings-page .member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #ECE8F2;
}

.conversation-settings-page .member-row:last-child { border-bottom: 0; }

.conversation-settings-page .member-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0EAFE;
    color: #7C3AED;
    font-weight: 800;
    border: 2px solid #1B1340;
}

.conversation-settings-page .member-avatar img {
    width: 100%; height: 100%; object-fit: cover;
}

.conversation-settings-page .member-main { flex: 1; min-width: 0; }
.conversation-settings-page .member-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.conversation-settings-page .permission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 0;
}
.conversation-settings-page .danger-zone {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #ECE8F2;
}

@media (max-width: 850px) {
    .conversation-settings-page .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .conversation-settings-page .settings-card { padding: 18px; }
    .conversation-settings-page .member-row { align-items: flex-start; flex-wrap: wrap; }
    .conversation-settings-page .member-actions { width: 100%; justify-content: flex-start; padding-left: 54px; }
    .chat-page #conversationSettingsButton { font-size: 0; min-width: 44px; padding: 0 12px; }
    .chat-page #conversationSettingsButton::first-letter { font-size: 18px; }
}


/* Espacement supplémentaire des blocs de discussions */
.discussions-page #conversationsContainer,
.discussions-page #friendsContainer {
    margin-top: 14px;
}
.discussions-page #friendsContainer {
    margin-bottom: 20px;
}
.discussions-page .section-header + #conversationsContainer,
.discussions-page .section-header + #friendsContainer {
    padding-top: 2px;
}


/* Bouton paramètres des conversations : navigation dédiée, jamais une déconnexion. */
.conversation-settings-icon-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    border-radius: 13px;
}

/* Icône de l'onglet Paramètres utilisée comme bouton de conversation. */
.conversation-settings-tab-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}

/* Flèche globale des demandes de compte (page Administration) : rétracte
   ou déplie d'un coup toutes les demandes. */
.account-requests-toggle {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--violet-soft);
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform .18s ease, background-color .15s ease;
}

.account-requests-toggle:hover {
    transform: translateY(-1px);
    background: var(--sun-soft);
}

/* =========================================================
   LYNK — ONGLETS STAFF : MÊME HOVER QUE LES AUTRES ONGLETS
   Annonces et Administration gardent leur identité jaune.
   ========================================================= */
.nav-item.staff-nav:hover,
.nav-item.staff-nav:focus-visible {
    background: #FFF8D9 !important;
    color: #9A6700 !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(154, 103, 0, 0.14);
}

.nav-item.staff-nav.active,
.nav-item.staff-nav.active:hover,
.nav-item.staff-nav.active:focus-visible {
    background: #FFF4BF !important;
    color: #9A6700 !important;
}

.nav-item.staff-nav.active:hover,
.nav-item.staff-nav.active:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(154, 103, 0, 0.14);
}


/* =========================================================
   LYNK — FLECHE SIDEBAR MOBILE
   Toujours visible sur l'accueil et les autres pages.
   ========================================================= */
@media (max-width: 750px) {
    .sidebar {
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
    }

    .sidebar .sidebar-toggle {
        display: flex !important;
        position: absolute !important;
        top: 18px !important;
        right: 10px !important;
        width: 30px !important;
        height: 30px !important;
        z-index: 1001 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .sidebar.collapsed .sidebar-toggle {
        right: 9px !important;
    }
}


/* =========================================================
   LYNK — SIDEBAR MOBILE : RETRACTION + NAVIGATION STAFF
   ========================================================= */
@media (max-width: 750px) {
    .app {
        display: flex !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .sidebar {
        flex: 0 0 250px !important;
        width: 250px !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        transition: flex-basis .34s cubic-bezier(.22,1,.36,1),
                    width .34s cubic-bezier(.22,1,.36,1),
                    padding-left .34s cubic-bezier(.22,1,.36,1),
                    padding-right .34s cubic-bezier(.22,1,.36,1) !important;
        will-change: width, flex-basis;
    }

    .sidebar.collapsed {
        flex: 0 0 68px !important;
        width: 68px !important;
        min-width: 68px !important;
    }

    .main-content {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        width: auto !important;
    }

    .sidebar .navigation {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        scrollbar-width: thin;
        padding-right: 2px;
        position: relative !important;
        z-index: 1002 !important;
        pointer-events: auto !important;
        touch-action: pan-y;
    }

    .sidebar .navigation .nav-item {
        position: relative !important;
        z-index: 1003 !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    .sidebar .sidebar-bottom {
        flex: 0 0 auto !important;
    }

    .sidebar .sidebar-toggle {
        touch-action: manipulation !important;
    }
}

/* Missions Pulse : illustrations sans fond */
.mission-badge-image {
    background: transparent !important;
    border-color: transparent !important;
}
.mission-badge-image img {
    background: transparent !important;
}

/* Cartes de badges : conserver l'illustration sans fond */
.badge-card-image {
    background: transparent !important;
    border-color: transparent !important;
}
.badge-card-image img {
    background: transparent !important;
}


/* Icône personnalisée de l’onglet Administration */
.nav-item .admin-tab-icon {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
    flex: 0 0 20px;
}

.sidebar.collapsed .nav-item .admin-tab-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
}

/* Icône personnalisée de l’onglet Paramètres */
.nav-item .settings-tab-icon {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
    flex: 0 0 20px;
}

.sidebar.collapsed .nav-item .settings-tab-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
}

/* Icônes des onglets Accueil, Rechercher, Match, Annonces, Pulse et Récompenses. */
.nav-item .nav-tab-icon,
.nav-item .match-tab-icon {
    width: 20px;
    height: 20px;
    display: block;
    object-fit: contain;
    flex: 0 0 20px;
    pointer-events: none;
}

.sidebar.collapsed .nav-item .nav-tab-icon,
.sidebar.collapsed .nav-item .match-tab-icon {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
}

/* Icône personnalisée de l’onglet Déconnexion */
.logout-tab-icon-wrap {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.logout-tab-icon {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}
