/* ============================================
   KINEMA+ V2 - STYLES DES PROFILS
   ============================================ */

/* ========== PAGE PROFIL ========== */
.profile-page {
    min-height: 100vh;
    padding-top: 60px;
    background: var(--bg-secondary);
}

/* ========== COVER PHOTO ========== */
.profile-cover {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    overflow: hidden;
}

.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-edit-cover {
    position: absolute;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-edit-cover:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-2px);
}

/* ========== PROFILE HEADER ========== */
.profile-header {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--spacing-lg);
    align-items: end;
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    margin-top: -60px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.profile-avatar-section {
    position: relative;
}

.profile-avatar {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--bg-primary);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-edit-avatar {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-edit-avatar:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* ========== PROFILE INFO ========== */
.profile-info {
    padding-top: var(--spacing-lg);
}

.profile-name-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.profile-name-section h1 {
    font-size: var(--font-3xl);
    margin: 0;
}

.verified-badge {
    color: var(--primary-color);
    font-size: var(--font-xl);
}

.profile-username {
    color: var(--text-secondary);
    font-size: var(--font-lg);
    margin-bottom: var(--spacing-md);
}

.profile-bio {
    font-size: var(--font-md);
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    max-width: 600px;
}

.profile-meta {
    display: flex;
    gap: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: var(--font-sm);
}

.profile-meta span {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

/* ========== PROFILE ACTIONS ========== */
.profile-actions {
    display: flex;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-lg);
}

.profile-actions .btn {
    white-space: nowrap;
}

/* ========== PROFILE STATS ========== */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    padding: var(--spacing-xl);
    margin: 0 var(--spacing-lg) var(--spacing-lg);
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.profile-stats .stat-item {
    text-align: center;
    transition: transform var(--transition-fast);
}

.profile-stats .stat-item:hover {
    transform: translateY(-5px);
}

.profile-stats .stat-value {
    font-size: var(--font-3xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.profile-stats .stat-label {
    font-size: var(--font-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========== PROFILE CONTENT ========== */
.profile-content {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
}

/* ========== TABS ========== */
.tabs {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.tabs-nav {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 2px solid var(--border-color);
}

.tabs-nav::-webkit-scrollbar {
    display: none;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-lg);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    margin-bottom: -2px;
}

.tab-item:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-item i {
    font-size: var(--font-lg);
}

/* ========== TAB CONTENT ========== */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ========== POSTS GRID ========== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.games-list,
.wins-list,
.likes-list,
.bookmarks-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* ========== MODAL OPTIONS ========== */
.options-list {
    display: flex;
    flex-direction: column;
}

.option-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--font-md);
    font-weight: 500;
}

.option-item:last-child {
    border-bottom: none;
}

.option-item:hover {
    background: var(--bg-secondary);
}

.option-item i {
    font-size: var(--font-xl);
    width: 24px;
}

.option-item.danger {
    color: var(--danger-color);
}

.option-item.danger:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* ========== USERS LIST (FOLLOWERS/FOLLOWING) ========== */
.users-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-height: 500px;
    overflow-y: auto;
}

.user-list-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    transition: background var(--transition-fast);
}

.user-list-item:hover {
    background: var(--bg-secondary);
}

.user-list-item .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-list-info {
    flex: 1;
    min-width: 0;
}

.user-list-name {
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.user-list-username {
    font-size: var(--font-sm);
    color: var(--text-secondary);
}

.user-list-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.btn-follow-small {
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: var(--font-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-follow-small:hover {
    background: var(--primary-dark);
}

.btn-follow-small.following {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .profile-cover {
        height: 200px;
    }

    .profile-header {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        padding: 0 var(--spacing-md) var(--spacing-md);
        margin-top: -50px;
    }

    .profile-avatar {
        width: 100px;
        height: 100px;
    }

    .btn-edit-avatar {
        width: 32px;
        height: 32px;
        font-size: var(--font-sm);
    }

    .profile-info {
        padding-top: var(--spacing-md);
    }

    .profile-name-section h1 {
        font-size: var(--font-2xl);
    }

    .profile-actions {
        padding-top: 0;
        width: 100%;
    }

    .profile-actions .btn {
        flex: 1;
    }

    .profile-actions .btn span {
        display: none;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
        padding: var(--spacing-lg);
        margin: 0 var(--spacing-md) var(--spacing-md);
    }

    .profile-stats .stat-value {
        font-size: var(--font-2xl);
    }

    .profile-content {
        padding: 0 var(--spacing-md) var(--spacing-md);
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .tab-item {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-sm);
    }

    .btn-edit-cover span {
        display: none;
    }
}

@media (max-width: 480px) {
    .profile-cover {
        height: 150px;
    }

    .profile-header {
        margin-top: -40px;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }

    .btn-edit-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .profile-name-section h1 {
        font-size: var(--font-xl);
    }

    .verified-badge {
        font-size: var(--font-lg);
    }

    .profile-username {
        font-size: var(--font-md);
    }

    .profile-bio {
        font-size: var(--font-sm);
    }

    .profile-meta {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .profile-stats {
        grid-template-columns: 1fr;
        padding: var(--spacing-md);
    }

    .profile-stats .stat-item {
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--border-color);
    }

    .profile-stats .stat-item:last-child {
        border-bottom: none;
    }

    .tab-item i {
        font-size: var(--font-md);
    }

    .tab-item span {
        font-size: 11px;
    }
}

/* ========== ANIMATIONS SPÉCIFIQUES ========== */
@keyframes profileLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-header {
    animation: profileLoad 0.5s ease;
}

.profile-stats {
    animation: profileLoad 0.6s ease;
}

/* ========== EMPTY STATES ========== */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--bg-primary);
    border-radius: var(--border-radius);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-lg);
}

.empty-state h3 {
    font-size: var(--font-xl);
    margin-bottom: var(--spacing-md);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

/* ========== LOADING SKELETON ========== */
.skeleton-post {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}