/* ==========================================================================
   PROFIL & JOURNAL PERSONNEL (Design Moderne & Immersif)
   ========================================================================== */

.profile-card { 
    background: var(--bg-card); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glow); 
    border-radius: var(--radius); 
    text-align: center; 
    overflow: hidden; 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3); 
    margin-bottom: 20px;
}

.profile-cover { 
    height: 130px; 
    background: var(--accent-gradient); 
    background-size: cover; 
    background-position: center; 
    position: relative; 
}

.profile-avatar-container { 
    margin-top: -50px; 
    position: relative; 
    display: inline-block; 
}

.avatar-lg { 
    width: 96px; 
    height: 96px; 
    border-radius: 50%; 
    background: #030712; 
    border: 4px solid var(--bg-card);
    color: var(--accent-cyan); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 2.5rem; 
    font-weight: 800; 
    box-shadow: var(--shadow-glow); 
    overflow: hidden; 
    object-fit: cover; 
    margin: 0 auto;
    transition: transform 0.3s ease;
}
.avatar-lg:hover { transform: scale(1.05); }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

.stats-row { 
    display: flex; 
    justify-content: center; 
    gap: 35px; 
    margin: 18px 0; 
    font-weight: 600; 
    color: var(--text-muted); 
    font-size: 0.9rem; 
}
.stats-row span { 
    color: var(--text-main); 
    font-size: 1.15rem; 
    display: block; 
    font-weight: 800; 
    background: var(--accent-gradient); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.online { background: #10b981; box-shadow: 0 0 10px #10b981; }
.offline { background: #64748b; }

.user-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 12px 16px; 
    border-bottom: 1px solid var(--border-glow); 
    font-size: 0.9rem; 
    transition: background 0.2s ease;
}
.user-item:hover { background: rgba(56, 189, 248, 0.04); }


/* ==========================================================================
   MENU DÉROULANT PROFIL (Style Facebook / Threads)
   ========================================================================== */
.fb-menu-container {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    z-index: 50;
}

.fb-menu-header {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--text-main);
    background: rgba(56, 189, 248, 0.05);
    transition: background 0.2s ease;
}
.fb-menu-header:hover { background: rgba(56, 189, 248, 0.1); }

#fb-menu-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.8rem;
    color: var(--accent-cyan);
}

.fb-menu-container.open #fb-menu-arrow {
    transform: rotate(180deg);
}

.fb-menu-dropdown {
    display: none;
    flex-direction: column;
    border-top: 1px solid var(--border-glow);
    background: var(--bg-deep);
}

.fb-menu-container.open .fb-menu-dropdown {
    display: flex;
    animation: fadeInMenu 0.25s ease;
}
@keyframes fadeInMenu { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.fb-menu-item {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}
.fb-menu-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.fb-menu-item.active {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent-cyan);
    border-left: 3px solid var(--accent-cyan);
}

.subtab-content { display: none; }
.subtab-content.active { display: block; }


/* ==========================================================================
   STYLE DU JOURNAL PERSONNEL DANS LE PROFIL
   ========================================================================== */
#user-journal-container {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#user-journal-container h3 {
    font-size: 1.15rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    display: inline-block;
}


/* ==========================================================================
   NOUVELLES FONCTIONNALITÉS MODERNES (Ajoutées sans supprimer l'existant)
   ========================================================================== */

/* 1. Grille de Médias interactive façon Instagram */
.media-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 14px;
}
.media-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    border: 1px solid var(--border-glow);
    transition: transform 0.2s ease, filter 0.2s ease;
}
.media-gallery-item:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}
.media-gallery-item img, 
.media-gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 2. Badge de modification rapide sur l'avatar du profil */
.avatar-edit-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background: var(--accent-gradient);
    color: #030712;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    border: 2px solid var(--bg-card);
}